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..ea963cf7ff19 --- /dev/null +++ b/sdk/chaos/Azure.ResourceManager.Chaos/tsp-location.yaml @@ -0,0 +1,4 @@ +directory: specification/chaos/Chaos.Management +commit: 6e702986ee542ebd38d0ab2e2f2c00ab48a50b45 +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..4360758fe66f --- /dev/null +++ b/sdk/chaos/Azure.ResourceManager.Chaos/tspCodeModel.json @@ -0,0 +1,19240 @@ +{ + "$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" + } + } + } + ] + }, + { + "$ref": "128" + }, + { + "$ref": "83" + }, + { + "$ref": "84" + }, + { + "$ref": "100" + }, + { + "$id": "151", + "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": "152", + "kind": "property", + "name": "error", + "serializedName": "error", + "doc": "The error object.", + "type": { + "$id": "153", + "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": "154", + "kind": "property", + "name": "code", + "serializedName": "code", + "doc": "The error code.", + "type": { + "$id": "155", + "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": "156", + "json": { + "$id": "157", + "name": "code" + } + } + }, + { + "$id": "158", + "kind": "property", + "name": "message", + "serializedName": "message", + "doc": "The error message.", + "type": { + "$id": "159", + "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": "160", + "json": { + "$id": "161", + "name": "message" + } + } + }, + { + "$id": "162", + "kind": "property", + "name": "target", + "serializedName": "target", + "doc": "The error target.", + "type": { + "$id": "163", + "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": "164", + "json": { + "$id": "165", + "name": "target" + } + } + }, + { + "$id": "166", + "kind": "property", + "name": "details", + "serializedName": "details", + "doc": "The error details.", + "type": { + "$id": "167", + "kind": "array", + "name": "ArrayErrorDetail", + "valueType": { + "$ref": "153" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorDetail.details", + "serializationOptions": { + "$id": "168", + "json": { + "$id": "169", + "name": "details" + } + } + }, + { + "$id": "170", + "kind": "property", + "name": "additionalInfo", + "serializedName": "additionalInfo", + "doc": "The error additional info.", + "type": { + "$id": "171", + "kind": "array", + "name": "ArrayErrorAdditionalInfo", + "valueType": { + "$id": "172", + "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": "173", + "kind": "property", + "name": "type", + "serializedName": "type", + "doc": "The additional info type.", + "type": { + "$id": "174", + "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": "175", + "json": { + "$id": "176", + "name": "type" + } + } + }, + { + "$id": "177", + "kind": "property", + "name": "info", + "serializedName": "info", + "doc": "The additional info.", + "type": { + "$id": "178", + "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": "179", + "json": { + "$id": "180", + "name": "info" + } + } + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorDetail.additionalInfo", + "serializationOptions": { + "$id": "181", + "json": { + "$id": "182", + "name": "additionalInfo" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorResponse.error", + "serializationOptions": { + "$id": "183", + "json": { + "$id": "184", + "name": "error" + } + } + } + ] + }, + { + "$ref": "153" + }, + { + "$ref": "172" + }, + { + "$ref": "178" + }, + { + "$id": "185", + "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": "186", + "kind": "property", + "name": "value", + "serializedName": "value", + "doc": "The Capability items on this page", + "type": { + "$id": "187", + "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": "188", + "json": { + "$id": "189", + "name": "value" + } + } + }, + { + "$id": "190", + "kind": "property", + "name": "nextLink", + "serializedName": "nextLink", + "doc": "The link to the next page of items", + "type": { + "$id": "191", + "kind": "url", + "name": "ResourceLocation", + "crossLanguageDefinitionId": "TypeSpec.Rest.ResourceLocation", + "baseType": { + "$id": "192", + "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": "193", + "json": { + "$id": "194", + "name": "nextLink" + } + } + } + ] + }, + { + "$id": "195", + "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": "196", + "kind": "property", + "name": "value", + "serializedName": "value", + "doc": "The Operation items on this page", + "type": { + "$id": "197", + "kind": "array", + "name": "ArrayOperation", + "valueType": { + "$id": "198", + "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": "199", + "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": "200", + "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": "201", + "json": { + "$id": "202", + "name": "name" + } + } + }, + { + "$id": "203", + "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": "204", + "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": "205", + "json": { + "$id": "206", + "name": "isDataAction" + } + } + }, + { + "$id": "207", + "kind": "property", + "name": "display", + "serializedName": "display", + "doc": "Localized display information for this particular operation.", + "type": { + "$id": "208", + "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": "209", + "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": "210", + "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": "211", + "json": { + "$id": "212", + "name": "provider" + } + } + }, + { + "$id": "213", + "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": "214", + "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": "215", + "json": { + "$id": "216", + "name": "resource" + } + } + }, + { + "$id": "217", + "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": "218", + "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": "219", + "json": { + "$id": "220", + "name": "operation" + } + } + }, + { + "$id": "221", + "kind": "property", + "name": "description", + "serializedName": "description", + "doc": "The short, localized friendly description of the operation; suitable for tool tips and detailed views.", + "type": { + "$id": "222", + "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": "223", + "json": { + "$id": "224", + "name": "description" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.Operation.display", + "serializationOptions": { + "$id": "225", + "json": { + "$id": "226", + "name": "display" + } + } + }, + { + "$id": "227", + "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": "228", + "json": { + "$id": "229", + "name": "origin" + } + } + }, + { + "$id": "230", + "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": "231", + "json": { + "$id": "232", + "name": "actionType" + } + } + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.OperationListResult.value", + "serializationOptions": { + "$id": "233", + "json": { + "$id": "234", + "name": "value" + } + } + }, + { + "$id": "235", + "kind": "property", + "name": "nextLink", + "serializedName": "nextLink", + "doc": "The link to the next page of items", + "type": { + "$id": "236", + "kind": "url", + "name": "ResourceLocation", + "crossLanguageDefinitionId": "TypeSpec.Rest.ResourceLocation", + "baseType": { + "$id": "237", + "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": "238", + "json": { + "$id": "239", + "name": "nextLink" + } + } + } + ] + }, + { + "$ref": "198" + }, + { + "$ref": "208" + }, + { + "$id": "240", + "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": "241", + "kind": "property", + "name": "properties", + "serializedName": "properties", + "doc": "The properties of the target resource.", + "type": { + "$id": "242", + "kind": "dict", + "keyType": { + "$id": "243", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "valueType": { + "$id": "244", + "kind": "unknown", + "name": "unknown", + "crossLanguageDefinitionId": "", + "decorators": [] + }, + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.Chaos.Target.properties", + "serializationOptions": { + "$id": "245", + "json": { + "$id": "246", + "name": "properties" + } + } + }, + { + "$id": "247", + "kind": "property", + "name": "location", + "serializedName": "location", + "doc": "Azure resource location.", + "type": { + "$id": "248", + "kind": "string", + "name": "azureLocation", + "crossLanguageDefinitionId": "Azure.Core.azureLocation", + "baseType": { + "$id": "249", + "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": "250", + "json": { + "$id": "251", + "name": "location" + } + } + } + ] + }, + { + "$id": "252", + "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": "253", + "kind": "property", + "name": "value", + "serializedName": "value", + "doc": "The Target items on this page", + "type": { + "$id": "254", + "kind": "array", + "name": "ArrayTarget", + "valueType": { + "$ref": "240" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.Chaos.TargetListResult.value", + "serializationOptions": { + "$id": "255", + "json": { + "$id": "256", + "name": "value" + } + } + }, + { + "$id": "257", + "kind": "property", + "name": "nextLink", + "serializedName": "nextLink", + "doc": "The link to the next page of items", + "type": { + "$id": "258", + "kind": "url", + "name": "ResourceLocation", + "crossLanguageDefinitionId": "TypeSpec.Rest.ResourceLocation", + "baseType": { + "$id": "259", + "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": "260", + "json": { + "$id": "261", + "name": "nextLink" + } + } + } + ] + }, + { + "$id": "262", + "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": "263", + "kind": "property", + "name": "properties", + "serializedName": "properties", + "doc": "The properties of the capability type resource.", + "type": { + "$id": "264", + "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": "265", + "kind": "property", + "name": "publisher", + "serializedName": "publisher", + "doc": "String of the Publisher that this Capability Type extends.", + "type": { + "$id": "266", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.Chaos.CapabilityTypeProperties.publisher", + "serializationOptions": { + "$id": "267", + "json": { + "$id": "268", + "name": "publisher" + } + } + }, + { + "$id": "269", + "kind": "property", + "name": "targetType", + "serializedName": "targetType", + "doc": "String of the Target Type 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.targetType", + "serializationOptions": { + "$id": "271", + "json": { + "$id": "272", + "name": "targetType" + } + } + }, + { + "$id": "273", + "kind": "property", + "name": "displayName", + "serializedName": "displayName", + "doc": "Localized string of the display name.", + "type": { + "$id": "274", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.Chaos.CapabilityTypeProperties.displayName", + "serializationOptions": { + "$id": "275", + "json": { + "$id": "276", + "name": "displayName" + } + } + }, + { + "$id": "277", + "kind": "property", + "name": "description", + "serializedName": "description", + "doc": "Localized string of the description.", + "type": { + "$id": "278", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.Chaos.CapabilityTypeProperties.description", + "serializationOptions": { + "$id": "279", + "json": { + "$id": "280", + "name": "description" + } + } + }, + { + "$id": "281", + "kind": "property", + "name": "parametersSchema", + "serializedName": "parametersSchema", + "doc": "URL to retrieve JSON schema of the Capability Type parameters.", + "type": { + "$id": "282", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.Chaos.CapabilityTypeProperties.parametersSchema", + "serializationOptions": { + "$id": "283", + "json": { + "$id": "284", + "name": "parametersSchema" + } + } + }, + { + "$id": "285", + "kind": "property", + "name": "urn", + "serializedName": "urn", + "doc": "String of the URN for this Capability Type.", + "type": { + "$id": "286", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.Chaos.CapabilityTypeProperties.urn", + "serializationOptions": { + "$id": "287", + "json": { + "$id": "288", + "name": "urn" + } + } + }, + { + "$id": "289", + "kind": "property", + "name": "kind", + "serializedName": "kind", + "doc": "String of the kind of 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.kind", + "serializationOptions": { + "$id": "291", + "json": { + "$id": "292", + "name": "kind" + } + } + }, + { + "$id": "293", + "kind": "property", + "name": "azureRbacActions", + "serializedName": "azureRbacActions", + "doc": "Control plane actions necessary to execute capability type.", + "type": { + "$id": "294", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "295", + "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": "296", + "json": { + "$id": "297", + "name": "azureRbacActions" + } + } + }, + { + "$id": "298", + "kind": "property", + "name": "azureRbacDataActions", + "serializedName": "azureRbacDataActions", + "doc": "Data plane actions necessary to execute capability type.", + "type": { + "$id": "299", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "300", + "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": "301", + "json": { + "$id": "302", + "name": "azureRbacDataActions" + } + } + }, + { + "$id": "303", + "kind": "property", + "name": "requiredAzureRoleDefinitionIds", + "serializedName": "requiredAzureRoleDefinitionIds", + "doc": "Required Azure Role Definition Ids to execute capability type.", + "type": { + "$id": "304", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "305", + "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": "306", + "json": { + "$id": "307", + "name": "requiredAzureRoleDefinitionIds" + } + } + }, + { + "$id": "308", + "kind": "property", + "name": "runtimeProperties", + "serializedName": "runtimeProperties", + "doc": "Runtime properties of this Capability Type.", + "type": { + "$id": "309", + "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": "310", + "kind": "property", + "name": "kind", + "serializedName": "kind", + "doc": "String of the kind of the resource's action type (continuous or discrete).", + "type": { + "$id": "311", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.Chaos.CapabilityTypePropertiesRuntimeProperties.kind", + "serializationOptions": { + "$id": "312", + "json": { + "$id": "313", + "name": "kind" + } + } + } + ] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.Chaos.CapabilityTypeProperties.runtimeProperties", + "serializationOptions": { + "$id": "314", + "json": { + "$id": "315", + "name": "runtimeProperties" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": true, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.Chaos.CapabilityType.properties", + "serializationOptions": { + "$id": "316", + "json": { + "$id": "317", + "name": "properties" + } + } + } + ] + }, + { + "$ref": "264" + }, + { + "$ref": "309" + }, + { + "$id": "318", + "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": "319", + "kind": "property", + "name": "value", + "serializedName": "value", + "doc": "The CapabilityType items on this page", + "type": { + "$id": "320", + "kind": "array", + "name": "ArrayCapabilityType", + "valueType": { + "$ref": "262" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.Chaos.CapabilityTypeListResult.value", + "serializationOptions": { + "$id": "321", + "json": { + "$id": "322", + "name": "value" + } + } + }, + { + "$id": "323", + "kind": "property", + "name": "nextLink", + "serializedName": "nextLink", + "doc": "The link to the next page of items", + "type": { + "$id": "324", + "kind": "url", + "name": "ResourceLocation", + "crossLanguageDefinitionId": "TypeSpec.Rest.ResourceLocation", + "baseType": { + "$id": "325", + "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": "326", + "json": { + "$id": "327", + "name": "nextLink" + } + } + } + ] + }, + { + "$id": "328", + "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": "329", + "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": "330", + "kind": "property", + "name": "tags", + "serializedName": "tags", + "doc": "Resource tags.", + "type": { + "$id": "331", + "kind": "dict", + "keyType": { + "$id": "332", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "valueType": { + "$id": "333", + "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": "334", + "json": { + "$id": "335", + "name": "tags" + } + } + }, + { + "$id": "336", + "kind": "property", + "name": "location", + "serializedName": "location", + "doc": "The geo-location where the resource lives", + "type": { + "$id": "337", + "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": "338", + "json": { + "$id": "339", + "name": "location" + } + } + } + ] + }, + "properties": [ + { + "$id": "340", + "kind": "property", + "name": "identity", + "serializedName": "identity", + "doc": "The managed service identities assigned to this resource.", + "type": { + "$id": "341", + "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": "342", + "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": "343", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "344", + "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": "345", + "json": { + "$id": "346", + "name": "principalId" + } + } + }, + { + "$id": "347", + "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": "348", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "349", + "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": "350", + "json": { + "$id": "351", + "name": "tenantId" + } + } + }, + { + "$id": "352", + "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": "353", + "json": { + "$id": "354", + "name": "type" + } + } + }, + { + "$id": "355", + "kind": "property", + "name": "userAssignedIdentities", + "serializedName": "userAssignedIdentities", + "doc": "The identities assigned to this resource by the user.", + "type": { + "$id": "356", + "kind": "dict", + "keyType": { + "$id": "357", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "valueType": { + "$id": "358", + "kind": "nullable", + "type": { + "$id": "359", + "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": "360", + "kind": "property", + "name": "clientId", + "serializedName": "clientId", + "doc": "The client ID of the assigned identity.", + "type": { + "$id": "361", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "362", + "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": "363", + "json": { + "$id": "364", + "name": "clientId" + } + } + }, + { + "$id": "365", + "kind": "property", + "name": "principalId", + "serializedName": "principalId", + "doc": "The principal ID of the assigned identity.", + "type": { + "$id": "366", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "367", + "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": "368", + "json": { + "$id": "369", + "name": "principalId" + } + } + } + ] + }, + "namespace": "Azure.ResourceManager.Chaos" + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ManagedServiceIdentity.userAssignedIdentities", + "serializationOptions": { + "$id": "370", + "json": { + "$id": "371", + "name": "userAssignedIdentities" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.Chaos.Experiment.identity", + "serializationOptions": { + "$id": "372", + "json": { + "$id": "373", + "name": "identity" + } + } + }, + { + "$id": "374", + "kind": "property", + "name": "properties", + "serializedName": "properties", + "doc": "The properties of the experiment resource.", + "type": { + "$id": "375", + "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": "376", + "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": "377", + "json": { + "$id": "378", + "name": "provisioningState" + } + } + }, + { + "$id": "379", + "kind": "property", + "name": "steps", + "serializedName": "steps", + "doc": "List of steps.", + "type": { + "$id": "380", + "kind": "array", + "name": "ArrayChaosExperimentStep", + "valueType": { + "$id": "381", + "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": "382", + "kind": "property", + "name": "name", + "serializedName": "name", + "doc": "String of the step name.", + "type": { + "$id": "383", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.Chaos.ChaosExperimentStep.name", + "serializationOptions": { + "$id": "384", + "json": { + "$id": "385", + "name": "name" + } + } + }, + { + "$id": "386", + "kind": "property", + "name": "branches", + "serializedName": "branches", + "doc": "List of branches.", + "type": { + "$id": "387", + "kind": "array", + "name": "ArrayChaosExperimentBranch", + "valueType": { + "$id": "388", + "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": "389", + "kind": "property", + "name": "name", + "serializedName": "name", + "doc": "String of the branch name.", + "type": { + "$id": "390", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.Chaos.ChaosExperimentBranch.name", + "serializationOptions": { + "$id": "391", + "json": { + "$id": "392", + "name": "name" + } + } + }, + { + "$id": "393", + "kind": "property", + "name": "actions", + "serializedName": "actions", + "doc": "List of actions.", + "type": { + "$id": "394", + "kind": "array", + "name": "ArrayChaosExperimentAction", + "valueType": { + "$id": "395", + "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": "396", + "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": "397", + "json": { + "$id": "398", + "name": "type" + } + } + }, + "properties": [ + { + "$id": "399", + "kind": "property", + "name": "name", + "serializedName": "name", + "doc": "String that represents a Capability URN.", + "type": { + "$id": "400", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.Chaos.ChaosExperimentAction.name", + "serializationOptions": { + "$id": "401", + "json": { + "$id": "402", + "name": "name" + } + } + }, + { + "$ref": "396" + } + ], + "discriminatedSubtypes": { + "$id": "403", + "continuous": { + "$id": "404", + "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": "395" + }, + "properties": [ + { + "$id": "405", + "kind": "property", + "name": "duration", + "serializedName": "duration", + "doc": "ISO8601 formatted string that represents a duration.", + "type": { + "$id": "406", + "kind": "duration", + "name": "duration", + "encode": "ISO8601", + "wireType": { + "$id": "407", + "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": "408", + "json": { + "$id": "409", + "name": "duration" + } + } + }, + { + "$id": "410", + "kind": "property", + "name": "parameters", + "serializedName": "parameters", + "doc": "List of key value pairs.", + "type": { + "$id": "411", + "kind": "array", + "name": "ArrayKeyValuePair", + "valueType": { + "$id": "412", + "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": "413", + "kind": "property", + "name": "key", + "serializedName": "key", + "doc": "The name of the setting for the action.", + "type": { + "$id": "414", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.Chaos.KeyValuePair.key", + "serializationOptions": { + "$id": "415", + "json": { + "$id": "416", + "name": "key" + } + } + }, + { + "$id": "417", + "kind": "property", + "name": "value", + "serializedName": "value", + "doc": "The value of the setting for the action.", + "type": { + "$id": "418", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.Chaos.KeyValuePair.value", + "serializationOptions": { + "$id": "419", + "json": { + "$id": "420", + "name": "value" + } + } + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.Chaos.ContinuousAction.parameters", + "serializationOptions": { + "$id": "421", + "json": { + "$id": "422", + "name": "parameters" + } + } + }, + { + "$id": "423", + "kind": "property", + "name": "selectorId", + "serializedName": "selectorId", + "doc": "String that represents a selector.", + "type": { + "$id": "424", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.Chaos.ContinuousAction.selectorId", + "serializationOptions": { + "$id": "425", + "json": { + "$id": "426", + "name": "selectorId" + } + } + }, + { + "$id": "427", + "kind": "property", + "name": "type", + "serializedName": "type", + "doc": "Enum that discriminates between action models.", + "type": { + "$id": "428", + "kind": "constant", + "valueType": { + "$id": "429", + "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": "430", + "json": { + "$id": "431", + "name": "type" + } + } + } + ] + }, + "delay": { + "$id": "432", + "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": "395" + }, + "properties": [ + { + "$id": "433", + "kind": "property", + "name": "duration", + "serializedName": "duration", + "doc": "ISO8601 formatted string that represents a duration.", + "type": { + "$id": "434", + "kind": "duration", + "name": "duration", + "encode": "ISO8601", + "wireType": { + "$id": "435", + "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": "436", + "json": { + "$id": "437", + "name": "duration" + } + } + }, + { + "$id": "438", + "kind": "property", + "name": "type", + "serializedName": "type", + "doc": "Enum that discriminates between action models.", + "type": { + "$id": "439", + "kind": "constant", + "valueType": { + "$id": "440", + "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": "441", + "json": { + "$id": "442", + "name": "type" + } + } + } + ] + }, + "discrete": { + "$id": "443", + "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": "395" + }, + "properties": [ + { + "$id": "444", + "kind": "property", + "name": "parameters", + "serializedName": "parameters", + "doc": "List of key value pairs.", + "type": { + "$id": "445", + "kind": "array", + "name": "ArrayKeyValuePair", + "valueType": { + "$ref": "412" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.Chaos.DiscreteAction.parameters", + "serializationOptions": { + "$id": "446", + "json": { + "$id": "447", + "name": "parameters" + } + } + }, + { + "$id": "448", + "kind": "property", + "name": "selectorId", + "serializedName": "selectorId", + "doc": "String that represents a selector.", + "type": { + "$id": "449", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.Chaos.DiscreteAction.selectorId", + "serializationOptions": { + "$id": "450", + "json": { + "$id": "451", + "name": "selectorId" + } + } + }, + { + "$id": "452", + "kind": "property", + "name": "type", + "serializedName": "type", + "doc": "Enum that discriminates between action models.", + "type": { + "$id": "453", + "kind": "constant", + "valueType": { + "$id": "454", + "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": "455", + "json": { + "$id": "456", + "name": "type" + } + } + } + ] + } + } + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.Chaos.ChaosExperimentBranch.actions", + "serializationOptions": { + "$id": "457", + "json": { + "$id": "458", + "name": "actions" + } + } + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.Chaos.ChaosExperimentStep.branches", + "serializationOptions": { + "$id": "459", + "json": { + "$id": "460", + "name": "branches" + } + } + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.Chaos.ExperimentProperties.steps", + "serializationOptions": { + "$id": "461", + "json": { + "$id": "462", + "name": "steps" + } + } + }, + { + "$id": "463", + "kind": "property", + "name": "selectors", + "serializedName": "selectors", + "doc": "List of selectors.", + "type": { + "$id": "464", + "kind": "array", + "name": "ArrayChaosTargetSelector", + "valueType": { + "$id": "465", + "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": "466", + "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": "467", + "json": { + "$id": "468", + "name": "type" + } + } + }, + "properties": [ + { + "$id": "469", + "kind": "property", + "name": "id", + "serializedName": "id", + "doc": "String of the selector ID.", + "type": { + "$id": "470", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.Chaos.ChaosTargetSelector.id", + "serializationOptions": { + "$id": "471", + "json": { + "$id": "472", + "name": "id" + } + } + }, + { + "$ref": "466" + }, + { + "$id": "473", + "kind": "property", + "name": "filter", + "serializedName": "filter", + "doc": "Model that represents available filter types that can be applied to a targets list.", + "type": { + "$id": "474", + "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": "475", + "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": "476", + "json": { + "$id": "477", + "name": "type" + } + } + }, + "properties": [ + { + "$ref": "475" + } + ], + "discriminatedSubtypes": { + "$id": "478", + "Simple": { + "$id": "479", + "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": "474" + }, + "properties": [ + { + "$id": "480", + "kind": "property", + "name": "parameters", + "serializedName": "parameters", + "doc": "Model that represents the Simple filter parameters.", + "type": { + "$id": "481", + "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": "482", + "kind": "property", + "name": "zones", + "serializedName": "zones", + "doc": "List of Azure availability zones to filter targets by.", + "type": { + "$id": "483", + "kind": "array", + "name": "Array", + "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": "Microsoft.Chaos.ChaosTargetSimpleFilterParameters.zones", + "serializationOptions": { + "$id": "485", + "json": { + "$id": "486", + "name": "zones" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.Chaos.ChaosTargetSimpleFilter.parameters", + "serializationOptions": { + "$id": "487", + "json": { + "$id": "488", + "name": "parameters" + } + } + }, + { + "$id": "489", + "kind": "property", + "name": "type", + "serializedName": "type", + "doc": "Enum that discriminates between filter types. Currently only `Simple` type is supported.", + "type": { + "$id": "490", + "kind": "constant", + "valueType": { + "$id": "491", + "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": "492", + "json": { + "$id": "493", + "name": "type" + } + } + } + ] + } + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.Chaos.ChaosTargetSelector.filter", + "serializationOptions": { + "$id": "494", + "json": { + "$id": "495", + "name": "filter" + } + } + } + ], + "discriminatedSubtypes": { + "$id": "496", + "List": { + "$id": "497", + "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": "465" + }, + "properties": [ + { + "$id": "498", + "kind": "property", + "name": "targets", + "serializedName": "targets", + "doc": "List of Target references.", + "type": { + "$id": "499", + "kind": "array", + "name": "ArrayTargetReference", + "valueType": { + "$id": "500", + "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": "501", + "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": "502", + "json": { + "$id": "503", + "name": "type" + } + } + }, + { + "$id": "504", + "kind": "property", + "name": "id", + "serializedName": "id", + "doc": "String of the resource ID of a Target resource.", + "type": { + "$id": "505", + "kind": "string", + "name": "armResourceIdentifier", + "crossLanguageDefinitionId": "Azure.Core.armResourceIdentifier", + "baseType": { + "$id": "506", + "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": "507", + "json": { + "$id": "508", + "name": "id" + } + } + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.Chaos.ChaosTargetListSelector.targets", + "serializationOptions": { + "$id": "509", + "json": { + "$id": "510", + "name": "targets" + } + } + }, + { + "$id": "511", + "kind": "property", + "name": "type", + "serializedName": "type", + "doc": "Enum of the selector type.", + "type": { + "$id": "512", + "kind": "constant", + "valueType": { + "$id": "513", + "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": "514", + "json": { + "$id": "515", + "name": "type" + } + } + } + ] + }, + "Query": { + "$id": "516", + "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": "465" + }, + "properties": [ + { + "$id": "517", + "kind": "property", + "name": "queryString", + "serializedName": "queryString", + "doc": "Azure Resource Graph (ARG) Query Language query for target resources.", + "type": { + "$id": "518", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.Chaos.ChaosTargetQuerySelector.queryString", + "serializationOptions": { + "$id": "519", + "json": { + "$id": "520", + "name": "queryString" + } + } + }, + { + "$id": "521", + "kind": "property", + "name": "subscriptionIds", + "serializedName": "subscriptionIds", + "doc": "Subscription id list to scope resource query.", + "type": { + "$id": "522", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "523", + "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": "524", + "json": { + "$id": "525", + "name": "subscriptionIds" + } + } + }, + { + "$id": "526", + "kind": "property", + "name": "type", + "serializedName": "type", + "doc": "Enum of the selector type.", + "type": { + "$id": "527", + "kind": "constant", + "valueType": { + "$id": "528", + "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": "529", + "json": { + "$id": "530", + "name": "type" + } + } + } + ] + } + } + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.Chaos.ExperimentProperties.selectors", + "serializationOptions": { + "$id": "531", + "json": { + "$id": "532", + "name": "selectors" + } + } + } + ] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": true, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.Chaos.Experiment.properties", + "serializationOptions": { + "$id": "533", + "json": { + "$id": "534", + "name": "properties" + } + } + } + ] + }, + { + "$ref": "341" + }, + { + "$ref": "359" + }, + { + "$ref": "375" + }, + { + "$ref": "381" + }, + { + "$ref": "388" + }, + { + "$ref": "395" + }, + { + "$ref": "404" + }, + { + "$ref": "412" + }, + { + "$ref": "432" + }, + { + "$ref": "443" + }, + { + "$ref": "465" + }, + { + "$ref": "474" + }, + { + "$ref": "479" + }, + { + "$ref": "481" + }, + { + "$ref": "497" + }, + { + "$ref": "500" + }, + { + "$ref": "516" + }, + { + "$ref": "329" + }, + { + "$id": "535", + "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": "536", + "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": "537", + "json": { + "$id": "538", + "name": "status" + } + } + }, + { + "$id": "539", + "kind": "property", + "name": "name", + "serializedName": "name", + "doc": "The name of the operationStatus resource", + "type": { + "$id": "540", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.ArmOperationStatus.name", + "serializationOptions": { + "$id": "541", + "json": { + "$id": "542", + "name": "name" + } + } + }, + { + "$id": "543", + "kind": "property", + "name": "startTime", + "serializedName": "startTime", + "doc": "Operation start time", + "type": { + "$id": "544", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "rfc3339", + "wireType": { + "$id": "545", + "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": "546", + "json": { + "$id": "547", + "name": "startTime" + } + } + }, + { + "$id": "548", + "kind": "property", + "name": "endTime", + "serializedName": "endTime", + "doc": "Operation complete time", + "type": { + "$id": "549", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "rfc3339", + "wireType": { + "$id": "550", + "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": "551", + "json": { + "$id": "552", + "name": "endTime" + } + } + }, + { + "$id": "553", + "kind": "property", + "name": "percentComplete", + "serializedName": "percentComplete", + "doc": "The progress made toward completing the operation", + "type": { + "$id": "554", + "kind": "float64", + "name": "float64", + "crossLanguageDefinitionId": "TypeSpec.float64", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.ArmOperationStatus.percentComplete", + "serializationOptions": { + "$id": "555", + "json": { + "$id": "556", + "name": "percentComplete" + } + } + }, + { + "$id": "557", + "kind": "property", + "name": "error", + "serializedName": "error", + "doc": "Errors that occurred if the operation ended with Canceled or Failed status", + "type": { + "$ref": "153" + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.ArmOperationStatus.error", + "serializationOptions": { + "$id": "558", + "json": { + "$id": "559", + "name": "error" + } + } + } + ] + }, + { + "$id": "560", + "kind": "model", + "name": "ExperimentUpdate", + "namespace": "Azure.ResourceManager.Chaos", + "crossLanguageDefinitionId": "Microsoft.Chaos.ExperimentUpdate", + "usage": "Input,Json", + "doc": "Describes an experiment update.", + "decorators": [], + "properties": [ + { + "$id": "561", + "kind": "property", + "name": "tags", + "serializedName": "tags", + "doc": "Resource tags.", + "type": { + "$id": "562", + "kind": "dict", + "keyType": { + "$id": "563", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "valueType": { + "$id": "564", + "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": "565", + "json": { + "$id": "566", + "name": "tags" + } + } + }, + { + "$id": "567", + "kind": "property", + "name": "identity", + "serializedName": "identity", + "doc": "The managed service identities assigned to this resource.", + "type": { + "$ref": "341" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.Chaos.ExperimentUpdate.identity", + "serializationOptions": { + "$id": "568", + "json": { + "$id": "569", + "name": "identity" + } + } + } + ] + }, + { + "$id": "570", + "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": "571", + "kind": "property", + "name": "value", + "serializedName": "value", + "doc": "The Experiment items on this page", + "type": { + "$id": "572", + "kind": "array", + "name": "ArrayExperiment", + "valueType": { + "$ref": "328" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.Chaos.ExperimentListResult.value", + "serializationOptions": { + "$id": "573", + "json": { + "$id": "574", + "name": "value" + } + } + }, + { + "$id": "575", + "kind": "property", + "name": "nextLink", + "serializedName": "nextLink", + "doc": "The link to the next page of items", + "type": { + "$id": "576", + "kind": "url", + "name": "ResourceLocation", + "crossLanguageDefinitionId": "TypeSpec.Rest.ResourceLocation", + "baseType": { + "$id": "577", + "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": "578", + "json": { + "$id": "579", + "name": "nextLink" + } + } + } + ] + }, + { + "$id": "580", + "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": "581", + "kind": "property", + "name": "properties", + "serializedName": "properties", + "doc": "The properties of experiment execution status.", + "type": { + "$id": "582", + "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": "583", + "kind": "property", + "name": "status", + "serializedName": "status", + "doc": "The status of the execution.", + "type": { + "$id": "584", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.Chaos.ExperimentExecutionProperties.status", + "serializationOptions": { + "$id": "585", + "json": { + "$id": "586", + "name": "status" + } + } + }, + { + "$id": "587", + "kind": "property", + "name": "startedAt", + "serializedName": "startedAt", + "doc": "String that represents the start date time.", + "type": { + "$id": "588", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "rfc3339", + "wireType": { + "$id": "589", + "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": "590", + "json": { + "$id": "591", + "name": "startedAt" + } + } + }, + { + "$id": "592", + "kind": "property", + "name": "stoppedAt", + "serializedName": "stoppedAt", + "doc": "String that represents the stop date time.", + "type": { + "$id": "593", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "rfc3339", + "wireType": { + "$id": "594", + "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": "595", + "json": { + "$id": "596", + "name": "stoppedAt" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": true, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.Chaos.ExperimentExecution.properties", + "serializationOptions": { + "$id": "597", + "json": { + "$id": "598", + "name": "properties" + } + } + } + ] + }, + { + "$ref": "582" + }, + { + "$id": "599", + "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": "600", + "kind": "property", + "name": "value", + "serializedName": "value", + "doc": "The ExperimentExecution items on this page", + "type": { + "$id": "601", + "kind": "array", + "name": "ArrayExperimentExecution", + "valueType": { + "$ref": "580" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.Chaos.ExperimentExecutionListResult.value", + "serializationOptions": { + "$id": "602", + "json": { + "$id": "603", + "name": "value" + } + } + }, + { + "$id": "604", + "kind": "property", + "name": "nextLink", + "serializedName": "nextLink", + "doc": "The link to the next page of items", + "type": { + "$id": "605", + "kind": "url", + "name": "ResourceLocation", + "crossLanguageDefinitionId": "TypeSpec.Rest.ResourceLocation", + "baseType": { + "$id": "606", + "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": "607", + "json": { + "$id": "608", + "name": "nextLink" + } + } + } + ] + }, + { + "$id": "609", + "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": "610", + "kind": "property", + "name": "type", + "serializedName": "type", + "doc": "String of the resource type.", + "type": { + "$id": "611", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.Chaos.ExperimentExecutionDetails.type", + "serializationOptions": { + "$id": "612", + "json": { + "$id": "613", + "name": "type" + } + } + }, + { + "$id": "614", + "kind": "property", + "name": "id", + "serializedName": "id", + "doc": "String of the fully qualified resource ID.", + "type": { + "$id": "615", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.Chaos.ExperimentExecutionDetails.id", + "serializationOptions": { + "$id": "616", + "json": { + "$id": "617", + "name": "id" + } + } + }, + { + "$id": "618", + "kind": "property", + "name": "name", + "serializedName": "name", + "doc": "String of the resource name.", + "type": { + "$id": "619", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.Chaos.ExperimentExecutionDetails.name", + "serializationOptions": { + "$id": "620", + "json": { + "$id": "621", + "name": "name" + } + } + }, + { + "$id": "622", + "kind": "property", + "name": "properties", + "serializedName": "properties", + "doc": "The properties of the experiment execution details.", + "type": { + "$id": "623", + "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": "624", + "kind": "property", + "name": "status", + "serializedName": "status", + "doc": "The status of the execution.", + "type": { + "$id": "625", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.Chaos.ExperimentExecutionDetailsProperties.status", + "serializationOptions": { + "$id": "626", + "json": { + "$id": "627", + "name": "status" + } + } + }, + { + "$id": "628", + "kind": "property", + "name": "startedAt", + "serializedName": "startedAt", + "doc": "String that represents the start date time.", + "type": { + "$id": "629", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "rfc3339", + "wireType": { + "$id": "630", + "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": "631", + "json": { + "$id": "632", + "name": "startedAt" + } + } + }, + { + "$id": "633", + "kind": "property", + "name": "stoppedAt", + "serializedName": "stoppedAt", + "doc": "String that represents the stop date time.", + "type": { + "$id": "634", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "rfc3339", + "wireType": { + "$id": "635", + "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": "636", + "json": { + "$id": "637", + "name": "stoppedAt" + } + } + }, + { + "$id": "638", + "kind": "property", + "name": "failureReason", + "serializedName": "failureReason", + "doc": "The reason why the execution failed.", + "type": { + "$id": "639", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.Chaos.ExperimentExecutionDetailsProperties.failureReason", + "serializationOptions": { + "$id": "640", + "json": { + "$id": "641", + "name": "failureReason" + } + } + }, + { + "$id": "642", + "kind": "property", + "name": "lastActionAt", + "serializedName": "lastActionAt", + "doc": "String that represents the last action date time.", + "type": { + "$id": "643", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "rfc3339", + "wireType": { + "$id": "644", + "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": "645", + "json": { + "$id": "646", + "name": "lastActionAt" + } + } + }, + { + "$id": "647", + "kind": "property", + "name": "runInformation", + "serializedName": "runInformation", + "doc": "The information of the experiment run.", + "type": { + "$id": "648", + "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": "649", + "kind": "property", + "name": "steps", + "serializedName": "steps", + "doc": "The steps of the experiment run.", + "type": { + "$id": "650", + "kind": "array", + "name": "ArrayStepStatus", + "valueType": { + "$id": "651", + "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": "652", + "kind": "property", + "name": "stepName", + "serializedName": "stepName", + "doc": "The name of the step.", + "type": { + "$id": "653", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.Chaos.StepStatus.stepName", + "serializationOptions": { + "$id": "654", + "json": { + "$id": "655", + "name": "stepName" + } + } + }, + { + "$id": "656", + "kind": "property", + "name": "stepId", + "serializedName": "stepId", + "doc": "The id of the step.", + "type": { + "$id": "657", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.Chaos.StepStatus.stepId", + "serializationOptions": { + "$id": "658", + "json": { + "$id": "659", + "name": "stepId" + } + } + }, + { + "$id": "660", + "kind": "property", + "name": "status", + "serializedName": "status", + "doc": "The value of the status of the step.", + "type": { + "$id": "661", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.Chaos.StepStatus.status", + "serializationOptions": { + "$id": "662", + "json": { + "$id": "663", + "name": "status" + } + } + }, + { + "$id": "664", + "kind": "property", + "name": "branches", + "serializedName": "branches", + "doc": "The array of branches.", + "type": { + "$id": "665", + "kind": "array", + "name": "ArrayBranchStatus", + "valueType": { + "$id": "666", + "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": "667", + "kind": "property", + "name": "branchName", + "serializedName": "branchName", + "doc": "The name of the branch status.", + "type": { + "$id": "668", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.Chaos.BranchStatus.branchName", + "serializationOptions": { + "$id": "669", + "json": { + "$id": "670", + "name": "branchName" + } + } + }, + { + "$id": "671", + "kind": "property", + "name": "branchId", + "serializedName": "branchId", + "doc": "The id of the branch status.", + "type": { + "$id": "672", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.Chaos.BranchStatus.branchId", + "serializationOptions": { + "$id": "673", + "json": { + "$id": "674", + "name": "branchId" + } + } + }, + { + "$id": "675", + "kind": "property", + "name": "status", + "serializedName": "status", + "doc": "The status of the branch.", + "type": { + "$id": "676", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.Chaos.BranchStatus.status", + "serializationOptions": { + "$id": "677", + "json": { + "$id": "678", + "name": "status" + } + } + }, + { + "$id": "679", + "kind": "property", + "name": "actions", + "serializedName": "actions", + "doc": "The array of actions.", + "type": { + "$id": "680", + "kind": "array", + "name": "ArrayActionStatus", + "valueType": { + "$id": "681", + "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": "682", + "kind": "property", + "name": "actionName", + "serializedName": "actionName", + "doc": "The name of the action status.", + "type": { + "$id": "683", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.Chaos.ActionStatus.actionName", + "serializationOptions": { + "$id": "684", + "json": { + "$id": "685", + "name": "actionName" + } + } + }, + { + "$id": "686", + "kind": "property", + "name": "actionId", + "serializedName": "actionId", + "doc": "The id of the action status.", + "type": { + "$id": "687", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.Chaos.ActionStatus.actionId", + "serializationOptions": { + "$id": "688", + "json": { + "$id": "689", + "name": "actionId" + } + } + }, + { + "$id": "690", + "kind": "property", + "name": "status", + "serializedName": "status", + "doc": "The status of the action.", + "type": { + "$id": "691", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.Chaos.ActionStatus.status", + "serializationOptions": { + "$id": "692", + "json": { + "$id": "693", + "name": "status" + } + } + }, + { + "$id": "694", + "kind": "property", + "name": "startTime", + "serializedName": "startTime", + "doc": "String that represents the start time of the action.", + "type": { + "$id": "695", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "rfc3339", + "wireType": { + "$id": "696", + "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": "697", + "json": { + "$id": "698", + "name": "startTime" + } + } + }, + { + "$id": "699", + "kind": "property", + "name": "endTime", + "serializedName": "endTime", + "doc": "String that represents the end time of the action.", + "type": { + "$id": "700", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "rfc3339", + "wireType": { + "$id": "701", + "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": "702", + "json": { + "$id": "703", + "name": "endTime" + } + } + }, + { + "$id": "704", + "kind": "property", + "name": "targets", + "serializedName": "targets", + "doc": "The array of targets.", + "type": { + "$id": "705", + "kind": "array", + "name": "ArrayExperimentExecutionActionTargetDetailsProperties", + "valueType": { + "$id": "706", + "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": "707", + "kind": "property", + "name": "status", + "serializedName": "status", + "doc": "The status of the execution.", + "type": { + "$id": "708", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.Chaos.ExperimentExecutionActionTargetDetailsProperties.status", + "serializationOptions": { + "$id": "709", + "json": { + "$id": "710", + "name": "status" + } + } + }, + { + "$id": "711", + "kind": "property", + "name": "target", + "serializedName": "target", + "doc": "The target for the action.", + "type": { + "$id": "712", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.Chaos.ExperimentExecutionActionTargetDetailsProperties.target", + "serializationOptions": { + "$id": "713", + "json": { + "$id": "714", + "name": "target" + } + } + }, + { + "$id": "715", + "kind": "property", + "name": "targetFailedTime", + "serializedName": "targetFailedTime", + "doc": "String that represents the failed date time.", + "type": { + "$id": "716", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "rfc3339", + "wireType": { + "$id": "717", + "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": "718", + "json": { + "$id": "719", + "name": "targetFailedTime" + } + } + }, + { + "$id": "720", + "kind": "property", + "name": "targetCompletedTime", + "serializedName": "targetCompletedTime", + "doc": "String that represents the completed date time.", + "type": { + "$id": "721", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "rfc3339", + "wireType": { + "$id": "722", + "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": "723", + "json": { + "$id": "724", + "name": "targetCompletedTime" + } + } + }, + { + "$id": "725", + "kind": "property", + "name": "error", + "serializedName": "error", + "doc": "The error of the action.", + "type": { + "$id": "726", + "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": "727", + "kind": "property", + "name": "code", + "serializedName": "code", + "doc": "The error code.", + "type": { + "$id": "728", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.Chaos.ExperimentExecutionActionTargetDetailsError.code", + "serializationOptions": { + "$id": "729", + "json": { + "$id": "730", + "name": "code" + } + } + }, + { + "$id": "731", + "kind": "property", + "name": "message", + "serializedName": "message", + "doc": "The error message", + "type": { + "$id": "732", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.Chaos.ExperimentExecutionActionTargetDetailsError.message", + "serializationOptions": { + "$id": "733", + "json": { + "$id": "734", + "name": "message" + } + } + } + ] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.Chaos.ExperimentExecutionActionTargetDetailsProperties.error", + "serializationOptions": { + "$id": "735", + "json": { + "$id": "736", + "name": "error" + } + } + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.Chaos.ActionStatus.targets", + "serializationOptions": { + "$id": "737", + "json": { + "$id": "738", + "name": "targets" + } + } + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.Chaos.BranchStatus.actions", + "serializationOptions": { + "$id": "739", + "json": { + "$id": "740", + "name": "actions" + } + } + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.Chaos.StepStatus.branches", + "serializationOptions": { + "$id": "741", + "json": { + "$id": "742", + "name": "branches" + } + } + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.Chaos.ExperimentExecutionDetailsPropertiesRunInformation.steps", + "serializationOptions": { + "$id": "743", + "json": { + "$id": "744", + "name": "steps" + } + } + } + ] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.Chaos.ExperimentExecutionDetailsProperties.runInformation", + "serializationOptions": { + "$id": "745", + "json": { + "$id": "746", + "name": "runInformation" + } + } + } + ] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": true, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.Chaos.ExperimentExecutionDetails.properties", + "serializationOptions": { + "$id": "747", + "json": { + "$id": "748", + "name": "properties" + } + } + } + ] + }, + { + "$ref": "623" + }, + { + "$ref": "648" + }, + { + "$ref": "651" + }, + { + "$ref": "666" + }, + { + "$ref": "681" + }, + { + "$ref": "706" + }, + { + "$ref": "726" + }, + { + "$id": "749", + "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": "750", + "kind": "property", + "name": "properties", + "serializedName": "properties", + "doc": "The properties of the target type resource.", + "type": { + "$id": "751", + "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": "752", + "kind": "property", + "name": "displayName", + "serializedName": "displayName", + "doc": "Localized string of the display name.", + "type": { + "$id": "753", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.Chaos.TargetTypeProperties.displayName", + "serializationOptions": { + "$id": "754", + "json": { + "$id": "755", + "name": "displayName" + } + } + }, + { + "$id": "756", + "kind": "property", + "name": "description", + "serializedName": "description", + "doc": "Localized string of the description.", + "type": { + "$id": "757", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.Chaos.TargetTypeProperties.description", + "serializationOptions": { + "$id": "758", + "json": { + "$id": "759", + "name": "description" + } + } + }, + { + "$id": "760", + "kind": "property", + "name": "propertiesSchema", + "serializedName": "propertiesSchema", + "doc": "URL to retrieve JSON schema of the Target Type properties.", + "type": { + "$id": "761", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.Chaos.TargetTypeProperties.propertiesSchema", + "serializationOptions": { + "$id": "762", + "json": { + "$id": "763", + "name": "propertiesSchema" + } + } + }, + { + "$id": "764", + "kind": "property", + "name": "resourceTypes", + "serializedName": "resourceTypes", + "doc": "List of resource types this Target Type can extend.", + "type": { + "$id": "765", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "766", + "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": "767", + "json": { + "$id": "768", + "name": "resourceTypes" + } + } + } + ] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": true, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.Chaos.TargetType.properties", + "serializationOptions": { + "$id": "769", + "json": { + "$id": "770", + "name": "properties" + } + } + } + ] + }, + { + "$ref": "751" + }, + { + "$id": "771", + "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": "772", + "kind": "property", + "name": "value", + "serializedName": "value", + "doc": "The TargetType items on this page", + "type": { + "$id": "773", + "kind": "array", + "name": "ArrayTargetType", + "valueType": { + "$ref": "749" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.Chaos.TargetTypeListResult.value", + "serializationOptions": { + "$id": "774", + "json": { + "$id": "775", + "name": "value" + } + } + }, + { + "$id": "776", + "kind": "property", + "name": "nextLink", + "serializedName": "nextLink", + "doc": "The link to the next page of items", + "type": { + "$id": "777", + "kind": "url", + "name": "ResourceLocation", + "crossLanguageDefinitionId": "TypeSpec.Rest.ResourceLocation", + "baseType": { + "$id": "778", + "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": "779", + "json": { + "$id": "780", + "name": "nextLink" + } + } + } + ] + }, + { + "$id": "781", + "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": "782", + "kind": "property", + "name": "id", + "serializedName": "id", + "doc": "Fully qualified ID for the async operation.", + "type": { + "$id": "783", + "kind": "string", + "name": "armResourceIdentifier", + "crossLanguageDefinitionId": "Azure.Core.armResourceIdentifier", + "baseType": { + "$id": "784", + "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": "785", + "json": { + "$id": "786", + "name": "id" + } + } + }, + { + "$id": "787", + "kind": "property", + "name": "name", + "serializedName": "name", + "doc": "Name of the async operation.", + "type": { + "$id": "788", + "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": "789", + "json": { + "$id": "790", + "name": "name" + } + } + }, + { + "$id": "791", + "kind": "property", + "name": "status", + "serializedName": "status", + "doc": "Operation status.", + "type": { + "$id": "792", + "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": "793", + "json": { + "$id": "794", + "name": "status" + } + } + }, + { + "$id": "795", + "kind": "property", + "name": "percentComplete", + "serializedName": "percentComplete", + "doc": "Percent of the operation that is complete.", + "type": { + "$id": "796", + "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": "797", + "json": { + "$id": "798", + "name": "percentComplete" + } + } + }, + { + "$id": "799", + "kind": "property", + "name": "startTime", + "serializedName": "startTime", + "doc": "The start time of the operation.", + "type": { + "$id": "800", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "rfc3339", + "wireType": { + "$id": "801", + "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": "802", + "json": { + "$id": "803", + "name": "startTime" + } + } + }, + { + "$id": "804", + "kind": "property", + "name": "endTime", + "serializedName": "endTime", + "doc": "The end time of the operation.", + "type": { + "$id": "805", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "rfc3339", + "wireType": { + "$id": "806", + "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": "807", + "json": { + "$id": "808", + "name": "endTime" + } + } + }, + { + "$id": "809", + "kind": "property", + "name": "operations", + "serializedName": "operations", + "doc": "The operations list.", + "type": { + "$id": "810", + "kind": "array", + "name": "ArrayOperationStatusResult", + "valueType": { + "$ref": "781" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.OperationStatusResult.operations", + "serializationOptions": { + "$id": "811", + "json": { + "$id": "812", + "name": "operations" + } + } + }, + { + "$id": "813", + "kind": "property", + "name": "error", + "serializedName": "error", + "doc": "If present, details of the operation error.", + "type": { + "$ref": "153" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.OperationStatusResult.error", + "serializationOptions": { + "$id": "814", + "json": { + "$id": "815", + "name": "error" + } + } + }, + { + "$id": "816", + "kind": "property", + "name": "resourceId", + "serializedName": "resourceId", + "doc": "Fully qualified ID of the resource against which the original async operation was started.", + "type": { + "$id": "817", + "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": "818", + "json": { + "$id": "819", + "name": "resourceId" + } + } + } + ] + } + ], + "clients": [ + { + "$id": "820", + "kind": "client", + "name": "ChaosClient", + "namespace": "Azure.ResourceManager.Chaos", + "doc": "Chaos Management Client", + "operations": [], + "parameters": [ + { + "$id": "821", + "name": "endpoint", + "nameInRequest": "endpoint", + "doc": "Service host", + "type": { + "$id": "822", + "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": "823", + "type": { + "$id": "824", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "https://management.azure.com" + } + } + ], + "decorators": [ + { + "$id": "825", + "name": "TypeSpec.@service", + "arguments": { + "$id": "826", + "options": { + "$id": "827", + "title": "ChaosManagementClient" + } + } + } + ], + "crossLanguageDefinitionId": "Microsoft.Chaos", + "apiVersions": [ + "2024-11-01-preview", + "2025-01-01" + ], + "children": [ + { + "$id": "828", + "kind": "client", + "name": "Capabilities", + "namespace": "Azure.ResourceManager.Chaos", + "operations": [ + { + "$id": "829", + "name": "get", + "resourceName": "Capability", + "doc": "Get a Capability resource that extends a Target resource.", + "accessibility": "public", + "parameters": [ + { + "$id": "830", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "831", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "832", + "type": { + "$id": "833", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-01-01" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "834", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "835", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "836", + "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": "837", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "838", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "839", + "name": "parentProviderNamespace", + "nameInRequest": "parentProviderNamespace", + "doc": "The parent resource provider namespace.", + "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": "parentResourceType", + "nameInRequest": "parentResourceType", + "doc": "The parent resource type.", + "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": "parentResourceName", + "nameInRequest": "parentResourceName", + "doc": "The parent resource name.", + "type": { + "$id": "844", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "845", + "name": "targetName", + "nameInRequest": "targetName", + "doc": "String that represents a Target resource name.", + "type": { + "$id": "846", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "847", + "name": "capabilityName", + "nameInRequest": "capabilityName", + "doc": "String that represents a Capability resource name.", + "type": { + "$id": "848", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "849", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "850", + "kind": "constant", + "valueType": { + "$id": "851", + "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": "852", + "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": "853", + "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": "854", + "parameter": { + "$ref": "830" + }, + "value": { + "$id": "855", + "kind": "string", + "type": { + "$ref": "831" + }, + "value": "2025-01-01" + } + }, + { + "$id": "856", + "parameter": { + "$ref": "847" + }, + "value": { + "$id": "857", + "kind": "string", + "type": { + "$ref": "848" + }, + "value": "Shutdown-1.0" + } + }, + { + "$id": "858", + "parameter": { + "$ref": "839" + }, + "value": { + "$id": "859", + "kind": "string", + "type": { + "$ref": "840" + }, + "value": "Microsoft.Compute" + } + }, + { + "$id": "860", + "parameter": { + "$ref": "843" + }, + "value": { + "$id": "861", + "kind": "string", + "type": { + "$ref": "844" + }, + "value": "exampleVM" + } + }, + { + "$id": "862", + "parameter": { + "$ref": "841" + }, + "value": { + "$id": "863", + "kind": "string", + "type": { + "$ref": "842" + }, + "value": "virtualMachines" + } + }, + { + "$id": "864", + "parameter": { + "$ref": "837" + }, + "value": { + "$id": "865", + "kind": "string", + "type": { + "$ref": "838" + }, + "value": "exampleRG" + } + }, + { + "$id": "866", + "parameter": { + "$ref": "834" + }, + "value": { + "$id": "867", + "kind": "string", + "type": { + "$ref": "835" + }, + "value": "6b052e15-03d3-4f17-b2e1-be7f07588291" + } + }, + { + "$id": "868", + "parameter": { + "$ref": "845" + }, + "value": { + "$id": "869", + "kind": "string", + "type": { + "$ref": "846" + }, + "value": "Microsoft-VirtualMachine" + } + } + ], + "responses": [ + { + "$id": "870", + "response": { + "$ref": "852" + }, + "statusCode": 200, + "bodyValue": { + "$id": "871", + "kind": "model", + "type": { + "$ref": "82" + }, + "value": { + "$id": "872", + "name": { + "$id": "873", + "kind": "string", + "type": { + "$ref": "91" + }, + "value": "Shutdown-1.0" + }, + "type": { + "$id": "874", + "kind": "string", + "type": { + "$ref": "95" + }, + "value": "Microsoft.Chaos/targets/capabilities" + }, + "id": { + "$id": "875", + "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": "876", + "kind": "model", + "type": { + "$ref": "128" + }, + "value": { + "$id": "877", + "description": { + "$id": "878", + "kind": "string", + "type": { + "$ref": "138" + }, + "value": "Shutdown an Azure Virtual Machine for a defined period of time." + }, + "parametersSchema": { + "$id": "879", + "kind": "string", + "type": { + "$ref": "142" + }, + "value": "https://schema.centralus.chaos-prod.azure.com/targets/Microsoft-VirtualMachine/capabilities/Shutdown-1.0.json" + }, + "publisher": { + "$id": "880", + "kind": "string", + "type": { + "$ref": "130" + }, + "value": "Microsoft" + }, + "targetType": { + "$id": "881", + "kind": "string", + "type": { + "$ref": "134" + }, + "value": "VirtualMachine" + }, + "urn": { + "$id": "882", + "kind": "string", + "type": { + "$ref": "146" + }, + "value": "urn:csci:microsoft:virtualMachine:shutdown/1.0" + } + } + }, + "systemData": { + "$id": "883", + "kind": "model", + "type": { + "$ref": "100" + }, + "value": { + "$id": "884", + "createdAt": { + "$id": "885", + "kind": "string", + "type": { + "$ref": "109" + }, + "value": "2020-05-14T05:08:38.4662189Z" + }, + "lastModifiedAt": { + "$id": "886", + "kind": "string", + "type": { + "$ref": "121" + }, + "value": "2020-05-14T05:08:38.4662189Z" + } + } + } + } + } + } + ] + } + ] + }, + { + "$id": "887", + "name": "createOrUpdate", + "resourceName": "Capability", + "doc": "Create or update a Capability resource that extends a Target resource.", + "accessibility": "public", + "parameters": [ + { + "$id": "888", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "889", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "890", + "type": { + "$id": "891", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-01-01" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "892", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "893", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "894", + "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": "895", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "896", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "897", + "name": "parentProviderNamespace", + "nameInRequest": "parentProviderNamespace", + "doc": "The parent resource provider namespace.", + "type": { + "$id": "898", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "899", + "name": "parentResourceType", + "nameInRequest": "parentResourceType", + "doc": "The parent resource type.", + "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": "parentResourceName", + "nameInRequest": "parentResourceName", + "doc": "The parent resource name.", + "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": "targetName", + "nameInRequest": "targetName", + "doc": "String that represents a Target resource name.", + "type": { + "$id": "904", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "905", + "name": "capabilityName", + "nameInRequest": "capabilityName", + "doc": "String that represents a Capability resource name.", + "type": { + "$id": "906", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "907", + "name": "contentType", + "nameInRequest": "Content-Type", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$id": "908", + "kind": "constant", + "valueType": { + "$id": "909", + "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": "910", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "911", + "kind": "constant", + "valueType": { + "$id": "912", + "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": "913", + "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": "914", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "82" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + }, + { + "$id": "915", + "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": "916", + "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": "917", + "parameter": { + "$ref": "888" + }, + "value": { + "$id": "918", + "kind": "string", + "type": { + "$ref": "889" + }, + "value": "2025-01-01" + } + }, + { + "$id": "919", + "parameter": { + "$ref": "913" + }, + "value": { + "$id": "920", + "kind": "model", + "type": { + "$ref": "82" + }, + "value": { + "$id": "921", + "properties": { + "$id": "922", + "kind": "model", + "type": { + "$ref": "128" + }, + "value": { + "$id": "923" + } + } + } + } + }, + { + "$id": "924", + "parameter": { + "$ref": "905" + }, + "value": { + "$id": "925", + "kind": "string", + "type": { + "$ref": "906" + }, + "value": "Shutdown-1.0" + } + }, + { + "$id": "926", + "parameter": { + "$ref": "897" + }, + "value": { + "$id": "927", + "kind": "string", + "type": { + "$ref": "898" + }, + "value": "Microsoft.Compute" + } + }, + { + "$id": "928", + "parameter": { + "$ref": "901" + }, + "value": { + "$id": "929", + "kind": "string", + "type": { + "$ref": "902" + }, + "value": "exampleVM" + } + }, + { + "$id": "930", + "parameter": { + "$ref": "899" + }, + "value": { + "$id": "931", + "kind": "string", + "type": { + "$ref": "900" + }, + "value": "virtualMachines" + } + }, + { + "$id": "932", + "parameter": { + "$ref": "895" + }, + "value": { + "$id": "933", + "kind": "string", + "type": { + "$ref": "896" + }, + "value": "exampleRG" + } + }, + { + "$id": "934", + "parameter": { + "$ref": "892" + }, + "value": { + "$id": "935", + "kind": "string", + "type": { + "$ref": "893" + }, + "value": "6b052e15-03d3-4f17-b2e1-be7f07588291" + } + }, + { + "$id": "936", + "parameter": { + "$ref": "903" + }, + "value": { + "$id": "937", + "kind": "string", + "type": { + "$ref": "904" + }, + "value": "Microsoft-VirtualMachine" + } + } + ], + "responses": [ + { + "$id": "938", + "response": { + "$ref": "914" + }, + "statusCode": 200, + "bodyValue": { + "$id": "939", + "kind": "model", + "type": { + "$ref": "82" + }, + "value": { + "$id": "940", + "name": { + "$id": "941", + "kind": "string", + "type": { + "$ref": "91" + }, + "value": "Shutdown-1.0" + }, + "type": { + "$id": "942", + "kind": "string", + "type": { + "$ref": "95" + }, + "value": "Microsoft.Chaos/targets/capabilities" + }, + "id": { + "$id": "943", + "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": "944", + "kind": "model", + "type": { + "$ref": "128" + }, + "value": { + "$id": "945", + "description": { + "$id": "946", + "kind": "string", + "type": { + "$ref": "138" + }, + "value": "Shutdown an Azure Virtual Machine for a defined period of time." + }, + "parametersSchema": { + "$id": "947", + "kind": "string", + "type": { + "$ref": "142" + }, + "value": "https://schema.centralus.chaos-prod.azure.com/targets/Microsoft-VirtualMachine/capabilities/Shutdown-1.0.json" + }, + "publisher": { + "$id": "948", + "kind": "string", + "type": { + "$ref": "130" + }, + "value": "Microsoft" + }, + "targetType": { + "$id": "949", + "kind": "string", + "type": { + "$ref": "134" + }, + "value": "VirtualMachine" + }, + "urn": { + "$id": "950", + "kind": "string", + "type": { + "$ref": "146" + }, + "value": "urn:csci:microsoft:virtualMachine:shutdown/1.0" + } + } + }, + "systemData": { + "$id": "951", + "kind": "model", + "type": { + "$ref": "100" + }, + "value": { + "$id": "952", + "createdAt": { + "$id": "953", + "kind": "string", + "type": { + "$ref": "109" + }, + "value": "2020-05-14T05:08:38.4662189Z" + }, + "lastModifiedAt": { + "$id": "954", + "kind": "string", + "type": { + "$ref": "121" + }, + "value": "2020-05-14T05:08:38.4662189Z" + } + } + } + } + } + }, + { + "$id": "955", + "response": { + "$ref": "915" + }, + "statusCode": 201, + "bodyValue": { + "$id": "956", + "kind": "model", + "type": { + "$ref": "82" + }, + "value": { + "$id": "957", + "name": { + "$id": "958", + "kind": "string", + "type": { + "$ref": "91" + }, + "value": "Shutdown-1.0" + }, + "type": { + "$id": "959", + "kind": "string", + "type": { + "$ref": "95" + }, + "value": "Microsoft.Chaos/targets/capabilities" + }, + "id": { + "$id": "960", + "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": "961", + "kind": "model", + "type": { + "$ref": "128" + }, + "value": { + "$id": "962", + "description": { + "$id": "963", + "kind": "string", + "type": { + "$ref": "138" + }, + "value": "Shutdown an Azure Virtual Machine for a defined period of time." + }, + "parametersSchema": { + "$id": "964", + "kind": "string", + "type": { + "$ref": "142" + }, + "value": "https://schema.centralus.chaos-prod.azure.com/targets/Microsoft-VirtualMachine/capabilities/Shutdown-1.0.json" + }, + "publisher": { + "$id": "965", + "kind": "string", + "type": { + "$ref": "130" + }, + "value": "Microsoft" + }, + "targetType": { + "$id": "966", + "kind": "string", + "type": { + "$ref": "134" + }, + "value": "VirtualMachine" + }, + "urn": { + "$id": "967", + "kind": "string", + "type": { + "$ref": "146" + }, + "value": "urn:csci:microsoft:virtualMachine:shutdown/1.0" + } + } + }, + "systemData": { + "$id": "968", + "kind": "model", + "type": { + "$ref": "100" + }, + "value": { + "$id": "969", + "createdAt": { + "$id": "970", + "kind": "string", + "type": { + "$ref": "109" + }, + "value": "2020-05-14T05:08:38.4662189Z" + }, + "lastModifiedAt": { + "$id": "971", + "kind": "string", + "type": { + "$ref": "121" + }, + "value": "2020-05-14T05:08:38.4662189Z" + } + } + } + } + } + } + ] + } + ] + }, + { + "$id": "972", + "name": "delete", + "resourceName": "Capability", + "doc": "Delete a Capability that extends a Target resource.", + "accessibility": "public", + "parameters": [ + { + "$id": "973", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "974", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "975", + "type": { + "$id": "976", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-01-01" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "977", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "978", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "979", + "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": "980", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "981", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "982", + "name": "parentProviderNamespace", + "nameInRequest": "parentProviderNamespace", + "doc": "The parent resource provider namespace.", + "type": { + "$id": "983", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "984", + "name": "parentResourceType", + "nameInRequest": "parentResourceType", + "doc": "The parent resource type.", + "type": { + "$id": "985", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "986", + "name": "parentResourceName", + "nameInRequest": "parentResourceName", + "doc": "The parent resource name.", + "type": { + "$id": "987", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "988", + "name": "targetName", + "nameInRequest": "targetName", + "doc": "String that represents a Target resource name.", + "type": { + "$id": "989", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "990", + "name": "capabilityName", + "nameInRequest": "capabilityName", + "doc": "String that represents a Capability resource name.", + "type": { + "$id": "991", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "992", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "993", + "kind": "constant", + "valueType": { + "$id": "994", + "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": "995", + "statusCodes": [ + 200 + ], + "headers": [], + "isErrorResponse": false + }, + { + "$id": "996", + "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": "997", + "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": "998", + "parameter": { + "$ref": "973" + }, + "value": { + "$id": "999", + "kind": "string", + "type": { + "$ref": "974" + }, + "value": "2025-01-01" + } + }, + { + "$id": "1000", + "parameter": { + "$ref": "990" + }, + "value": { + "$id": "1001", + "kind": "string", + "type": { + "$ref": "991" + }, + "value": "Shutdown-1.0" + } + }, + { + "$id": "1002", + "parameter": { + "$ref": "982" + }, + "value": { + "$id": "1003", + "kind": "string", + "type": { + "$ref": "983" + }, + "value": "Microsoft.Compute" + } + }, + { + "$id": "1004", + "parameter": { + "$ref": "986" + }, + "value": { + "$id": "1005", + "kind": "string", + "type": { + "$ref": "987" + }, + "value": "exampleVM" + } + }, + { + "$id": "1006", + "parameter": { + "$ref": "984" + }, + "value": { + "$id": "1007", + "kind": "string", + "type": { + "$ref": "985" + }, + "value": "virtualMachines" + } + }, + { + "$id": "1008", + "parameter": { + "$ref": "980" + }, + "value": { + "$id": "1009", + "kind": "string", + "type": { + "$ref": "981" + }, + "value": "exampleRG" + } + }, + { + "$id": "1010", + "parameter": { + "$ref": "977" + }, + "value": { + "$id": "1011", + "kind": "string", + "type": { + "$ref": "978" + }, + "value": "6b052e15-03d3-4f17-b2e1-be7f07588291" + } + }, + { + "$id": "1012", + "parameter": { + "$ref": "988" + }, + "value": { + "$id": "1013", + "kind": "string", + "type": { + "$ref": "989" + }, + "value": "Microsoft-VirtualMachine" + } + } + ], + "responses": [ + { + "$id": "1014", + "response": { + "$ref": "995" + }, + "statusCode": 200 + }, + { + "$id": "1015", + "response": { + "$ref": "996" + }, + "statusCode": 204 + } + ] + } + ] + }, + { + "$id": "1016", + "name": "list", + "resourceName": "Capability", + "doc": "Get a list of Capability resources that extend a Target resource.", + "accessibility": "public", + "parameters": [ + { + "$id": "1017", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "1018", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "1019", + "type": { + "$id": "1020", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-01-01" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1021", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "1022", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "1023", + "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": "1024", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "1025", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1026", + "name": "parentProviderNamespace", + "nameInRequest": "parentProviderNamespace", + "doc": "The parent resource provider namespace.", + "type": { + "$id": "1027", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1028", + "name": "parentResourceType", + "nameInRequest": "parentResourceType", + "doc": "The parent resource type.", + "type": { + "$id": "1029", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1030", + "name": "parentResourceName", + "nameInRequest": "parentResourceName", + "doc": "The parent resource name.", + "type": { + "$id": "1031", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1032", + "name": "continuationToken", + "nameInRequest": "continuationToken", + "doc": "String that sets the continuation token.", + "type": { + "$id": "1033", + "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": "1034", + "name": "targetName", + "nameInRequest": "targetName", + "doc": "String that represents a Target resource name.", + "type": { + "$id": "1035", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "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 + } + ], + "responses": [ + { + "$id": "1039", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "185" + }, + "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": "1040", + "itemPropertySegments": [ + "value" + ], + "nextLink": { + "$id": "1041", + "responseSegments": [ + "nextLink" + ], + "responseLocation": "Body" + } + }, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.Chaos.Capabilities.list", + "decorators": [], + "examples": [ + { + "$id": "1042", + "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": "1043", + "parameter": { + "$ref": "1017" + }, + "value": { + "$id": "1044", + "kind": "string", + "type": { + "$ref": "1018" + }, + "value": "2025-01-01" + } + }, + { + "$id": "1045", + "parameter": { + "$ref": "1026" + }, + "value": { + "$id": "1046", + "kind": "string", + "type": { + "$ref": "1027" + }, + "value": "Microsoft.Compute" + } + }, + { + "$id": "1047", + "parameter": { + "$ref": "1030" + }, + "value": { + "$id": "1048", + "kind": "string", + "type": { + "$ref": "1031" + }, + "value": "exampleVM" + } + }, + { + "$id": "1049", + "parameter": { + "$ref": "1028" + }, + "value": { + "$id": "1050", + "kind": "string", + "type": { + "$ref": "1029" + }, + "value": "virtualMachines" + } + }, + { + "$id": "1051", + "parameter": { + "$ref": "1024" + }, + "value": { + "$id": "1052", + "kind": "string", + "type": { + "$ref": "1025" + }, + "value": "exampleRG" + } + }, + { + "$id": "1053", + "parameter": { + "$ref": "1021" + }, + "value": { + "$id": "1054", + "kind": "string", + "type": { + "$ref": "1022" + }, + "value": "6b052e15-03d3-4f17-b2e1-be7f07588291" + } + }, + { + "$id": "1055", + "parameter": { + "$ref": "1034" + }, + "value": { + "$id": "1056", + "kind": "string", + "type": { + "$ref": "1035" + }, + "value": "Microsoft-VirtualMachine" + } + } + ], + "responses": [ + { + "$id": "1057", + "response": { + "$ref": "1039" + }, + "statusCode": 200, + "bodyValue": { + "$id": "1058", + "kind": "model", + "type": { + "$ref": "185" + }, + "value": { + "$id": "1059", + "nextLink": { + "$id": "1060", + "kind": "string", + "type": { + "$ref": "191" + }, + "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": "1061", + "kind": "array", + "type": { + "$ref": "187" + }, + "value": [ + { + "$id": "1062", + "kind": "model", + "type": { + "$ref": "82" + }, + "value": { + "$id": "1063", + "name": { + "$id": "1064", + "kind": "string", + "type": { + "$ref": "91" + }, + "value": "Shutdown-1.0" + }, + "type": { + "$id": "1065", + "kind": "string", + "type": { + "$ref": "95" + }, + "value": "Microsoft.Chaos/targets/capabilities" + }, + "id": { + "$id": "1066", + "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": "1067", + "kind": "model", + "type": { + "$ref": "128" + }, + "value": { + "$id": "1068", + "description": { + "$id": "1069", + "kind": "string", + "type": { + "$ref": "138" + }, + "value": "Shutdown an Azure Virtual Machine for a defined period of time." + }, + "parametersSchema": { + "$id": "1070", + "kind": "string", + "type": { + "$ref": "142" + }, + "value": "https://schema.centralus.chaos-prod.azure.com/targets/Microsoft-VirtualMachine/capabilities/Shutdown-1.0.json" + }, + "publisher": { + "$id": "1071", + "kind": "string", + "type": { + "$ref": "130" + }, + "value": "Microsoft" + }, + "targetType": { + "$id": "1072", + "kind": "string", + "type": { + "$ref": "134" + }, + "value": "VirtualMachine" + }, + "urn": { + "$id": "1073", + "kind": "string", + "type": { + "$ref": "146" + }, + "value": "urn:csci:microsoft:virtualMachine:shutdown/1.0" + } + } + }, + "systemData": { + "$id": "1074", + "kind": "model", + "type": { + "$ref": "100" + }, + "value": { + "$id": "1075", + "createdAt": { + "$id": "1076", + "kind": "string", + "type": { + "$ref": "109" + }, + "value": "2020-05-14T05:08:38.4662189Z" + }, + "lastModifiedAt": { + "$id": "1077", + "kind": "string", + "type": { + "$ref": "121" + }, + "value": "2020-05-14T05:08:38.4662189Z" + } + } + } + } + } + ] + } + } + } + } + ] + } + ] + } + ], + "parameters": [ + { + "$id": "1078", + "name": "endpoint", + "nameInRequest": "endpoint", + "doc": "Service host", + "type": { + "$id": "1079", + "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": "1080", + "type": { + "$id": "1081", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "https://management.azure.com" + } + } + ], + "decorators": [ + { + "$id": "1082", + "name": "Azure.ResourceManager.@armResourceOperations", + "arguments": { + "$id": "1083" + } + } + ], + "crossLanguageDefinitionId": "Microsoft.Chaos.Capabilities", + "apiVersions": [ + "2024-11-01-preview", + "2025-01-01" + ], + "parent": { + "$ref": "820" + } + }, + { + "$id": "1084", + "kind": "client", + "name": "Operations", + "namespace": "Azure.ResourceManager.Chaos", + "operations": [ + { + "$id": "1085", + "name": "list", + "resourceName": "Operations", + "doc": "List the operations for the provider", + "accessibility": "public", + "parameters": [ + { + "$id": "1086", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "1087", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "1088", + "type": { + "$id": "1089", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-01-01" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1090", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "1091", + "kind": "constant", + "valueType": { + "$id": "1092", + "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": "1093", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "195" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "GET", + "uri": "{endpoint}", + "path": "/providers/Microsoft.Chaos/operations", + "bufferResponse": true, + "paging": { + "$id": "1094", + "itemPropertySegments": [ + "value" + ], + "nextLink": { + "$id": "1095", + "responseSegments": [ + "nextLink" + ], + "responseLocation": "Body" + } + }, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Azure.ResourceManager.Operations.list", + "decorators": [], + "examples": [ + { + "$id": "1096", + "kind": "http", + "name": "Lists all Chaos Studio operations.", + "description": "Lists all Chaos Studio operations.", + "filePath": "2025-01-01/Operations_List.json", + "parameters": [ + { + "$id": "1097", + "parameter": { + "$ref": "1086" + }, + "value": { + "$id": "1098", + "kind": "string", + "type": { + "$ref": "1087" + }, + "value": "2025-01-01" + } + } + ], + "responses": [ + { + "$id": "1099", + "response": { + "$ref": "1093" + }, + "statusCode": 200, + "bodyValue": { + "$id": "1100", + "kind": "model", + "type": { + "$ref": "195" + }, + "value": { + "$id": "1101", + "nextLink": { + "$id": "1102", + "kind": "string", + "type": { + "$ref": "236" + }, + "value": "https://management.azure.com/providers/Microsoft.Chaos/operations?continuationToken=myContinuationToken&api-version=2024-11-01-preview" + }, + "value": { + "$id": "1103", + "kind": "array", + "type": { + "$ref": "197" + }, + "value": [ + { + "$id": "1104", + "kind": "model", + "type": { + "$ref": "198" + }, + "value": { + "$id": "1105", + "name": { + "$id": "1106", + "kind": "string", + "type": { + "$ref": "200" + }, + "value": "Microsoft.Chaos/experiments/read" + }, + "display": { + "$id": "1107", + "kind": "model", + "type": { + "$ref": "208" + }, + "value": { + "$id": "1108", + "provider": { + "$id": "1109", + "kind": "string", + "type": { + "$ref": "210" + }, + "value": "Microsoft Chaos" + }, + "resource": { + "$id": "1110", + "kind": "string", + "type": { + "$ref": "214" + }, + "value": "Chaos Experiment" + }, + "operation": { + "$id": "1111", + "kind": "string", + "type": { + "$ref": "218" + }, + "value": "Gets all Chaos Experiments." + }, + "description": { + "$id": "1112", + "kind": "string", + "type": { + "$ref": "222" + }, + "value": "Gets all Chaos Experiments in a resource group." + } + } + }, + "isDataAction": { + "$id": "1113", + "kind": "boolean", + "type": { + "$ref": "204" + }, + "value": false + }, + "origin": { + "$id": "1114", + "kind": "string", + "type": { + "$ref": "12" + }, + "value": "user,system" + } + } + } + ] + } + } + } + } + ] + } + ] + } + ], + "parameters": [ + { + "$id": "1115", + "name": "endpoint", + "nameInRequest": "endpoint", + "doc": "Service host", + "type": { + "$id": "1116", + "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": "1117", + "type": { + "$id": "1118", + "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": "820" + } + }, + { + "$id": "1119", + "kind": "client", + "name": "Targets", + "namespace": "Azure.ResourceManager.Chaos", + "operations": [ + { + "$id": "1120", + "name": "get", + "resourceName": "Target", + "doc": "Get a Target resource that extends a tracked regional resource.", + "accessibility": "public", + "parameters": [ + { + "$id": "1121", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "1122", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "1123", + "type": { + "$id": "1124", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-01-01" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1125", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "1126", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "1127", + "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": "1128", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "1129", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1130", + "name": "parentProviderNamespace", + "nameInRequest": "parentProviderNamespace", + "doc": "The parent resource provider namespace.", + "type": { + "$id": "1131", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1132", + "name": "parentResourceType", + "nameInRequest": "parentResourceType", + "doc": "The parent resource type.", + "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": "parentResourceName", + "nameInRequest": "parentResourceName", + "doc": "The parent resource name.", + "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": "targetName", + "nameInRequest": "targetName", + "doc": "String that represents a Target resource name.", + "type": { + "$id": "1137", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1138", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "1139", + "kind": "constant", + "valueType": { + "$id": "1140", + "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": "1141", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "240" + }, + "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": "1142", + "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": "1143", + "parameter": { + "$ref": "1121" + }, + "value": { + "$id": "1144", + "kind": "string", + "type": { + "$ref": "1122" + }, + "value": "2025-01-01" + } + }, + { + "$id": "1145", + "parameter": { + "$ref": "1130" + }, + "value": { + "$id": "1146", + "kind": "string", + "type": { + "$ref": "1131" + }, + "value": "Microsoft.Compute" + } + }, + { + "$id": "1147", + "parameter": { + "$ref": "1134" + }, + "value": { + "$id": "1148", + "kind": "string", + "type": { + "$ref": "1135" + }, + "value": "exampleVM" + } + }, + { + "$id": "1149", + "parameter": { + "$ref": "1132" + }, + "value": { + "$id": "1150", + "kind": "string", + "type": { + "$ref": "1133" + }, + "value": "virtualMachines" + } + }, + { + "$id": "1151", + "parameter": { + "$ref": "1128" + }, + "value": { + "$id": "1152", + "kind": "string", + "type": { + "$ref": "1129" + }, + "value": "exampleRG" + } + }, + { + "$id": "1153", + "parameter": { + "$ref": "1125" + }, + "value": { + "$id": "1154", + "kind": "string", + "type": { + "$ref": "1126" + }, + "value": "6b052e15-03d3-4f17-b2e1-be7f07588291" + } + }, + { + "$id": "1155", + "parameter": { + "$ref": "1136" + }, + "value": { + "$id": "1156", + "kind": "string", + "type": { + "$ref": "1137" + }, + "value": "Microsoft-Agent" + } + } + ], + "responses": [ + { + "$id": "1157", + "response": { + "$ref": "1141" + }, + "statusCode": 200, + "bodyValue": { + "$id": "1158", + "kind": "model", + "type": { + "$ref": "240" + }, + "value": { + "$id": "1159", + "name": { + "$id": "1160", + "kind": "string", + "type": { + "$ref": "91" + }, + "value": "Microsoft-Agent" + }, + "type": { + "$id": "1161", + "kind": "string", + "type": { + "$ref": "95" + }, + "value": "Microsoft.Chaos/targets" + }, + "id": { + "$id": "1162", + "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": "1163", + "kind": "string", + "type": { + "$ref": "248" + }, + "value": "centraluseuap" + }, + "properties": { + "$id": "1164", + "kind": "dict", + "type": { + "$ref": "242" + }, + "value": { + "$id": "1165", + "agentProfileId": { + "$id": "1166", + "kind": "unknown", + "type": { + "$ref": "244" + }, + "value": "ac4e8251-fdc9-4277-8e87-dc57fe5794cf" + }, + "identities": { + "$id": "1167", + "kind": "unknown", + "type": { + "$ref": "244" + }, + "value": [ + { + "$id": "1168", + "type": "CertificateSubjectIssuer", + "subject": "CN=example.subject" + } + ] + } + } + }, + "systemData": { + "$id": "1169", + "kind": "model", + "type": { + "$ref": "100" + }, + "value": { + "$id": "1170", + "createdAt": { + "$id": "1171", + "kind": "string", + "type": { + "$ref": "109" + }, + "value": "2021-07-01T00:00:00.0Z" + }, + "lastModifiedAt": { + "$id": "1172", + "kind": "string", + "type": { + "$ref": "121" + }, + "value": "2021-07-01T00:00:00.0Z" + } + } + } + } + } + } + ] + } + ] + }, + { + "$id": "1173", + "name": "createOrUpdate", + "resourceName": "Target", + "doc": "Create or update a Target resource that extends a tracked regional resource.", + "accessibility": "public", + "parameters": [ + { + "$id": "1174", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "1175", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "1176", + "type": { + "$id": "1177", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-01-01" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1178", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "1179", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "1180", + "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": "1181", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "1182", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1183", + "name": "parentProviderNamespace", + "nameInRequest": "parentProviderNamespace", + "doc": "The parent resource provider namespace.", + "type": { + "$id": "1184", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1185", + "name": "parentResourceType", + "nameInRequest": "parentResourceType", + "doc": "The parent resource type.", + "type": { + "$id": "1186", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1187", + "name": "parentResourceName", + "nameInRequest": "parentResourceName", + "doc": "The parent resource name.", + "type": { + "$id": "1188", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1189", + "name": "targetName", + "nameInRequest": "targetName", + "doc": "String that represents a Target resource name.", + "type": { + "$id": "1190", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1191", + "name": "contentType", + "nameInRequest": "Content-Type", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$id": "1192", + "kind": "constant", + "valueType": { + "$id": "1193", + "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": "1194", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "1195", + "kind": "constant", + "valueType": { + "$id": "1196", + "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": "1197", + "name": "resource", + "nameInRequest": "resource", + "doc": "Target resource to be created or updated.", + "type": { + "$ref": "240" + }, + "location": "Body", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "1198", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "240" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + }, + { + "$id": "1199", + "statusCodes": [ + 201 + ], + "bodyType": { + "$ref": "240" + }, + "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": "1200", + "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": "1201", + "parameter": { + "$ref": "1174" + }, + "value": { + "$id": "1202", + "kind": "string", + "type": { + "$ref": "1175" + }, + "value": "2025-01-01" + } + }, + { + "$id": "1203", + "parameter": { + "$ref": "1183" + }, + "value": { + "$id": "1204", + "kind": "string", + "type": { + "$ref": "1184" + }, + "value": "Microsoft.Compute" + } + }, + { + "$id": "1205", + "parameter": { + "$ref": "1187" + }, + "value": { + "$id": "1206", + "kind": "string", + "type": { + "$ref": "1188" + }, + "value": "exampleVM" + } + }, + { + "$id": "1207", + "parameter": { + "$ref": "1185" + }, + "value": { + "$id": "1208", + "kind": "string", + "type": { + "$ref": "1186" + }, + "value": "virtualMachines" + } + }, + { + "$id": "1209", + "parameter": { + "$ref": "1181" + }, + "value": { + "$id": "1210", + "kind": "string", + "type": { + "$ref": "1182" + }, + "value": "exampleRG" + } + }, + { + "$id": "1211", + "parameter": { + "$ref": "1178" + }, + "value": { + "$id": "1212", + "kind": "string", + "type": { + "$ref": "1179" + }, + "value": "6b052e15-03d3-4f17-b2e1-be7f07588291" + } + }, + { + "$id": "1213", + "parameter": { + "$ref": "1197" + }, + "value": { + "$id": "1214", + "kind": "model", + "type": { + "$ref": "240" + }, + "value": { + "$id": "1215", + "properties": { + "$id": "1216", + "kind": "dict", + "type": { + "$ref": "242" + }, + "value": { + "$id": "1217" + } + } + } + } + }, + { + "$id": "1218", + "parameter": { + "$ref": "1189" + }, + "value": { + "$id": "1219", + "kind": "string", + "type": { + "$ref": "1190" + }, + "value": "Microsoft-VirtualMachine" + } + } + ], + "responses": [ + { + "$id": "1220", + "response": { + "$ref": "1198" + }, + "statusCode": 200, + "bodyValue": { + "$id": "1221", + "kind": "model", + "type": { + "$ref": "240" + }, + "value": { + "$id": "1222", + "name": { + "$id": "1223", + "kind": "string", + "type": { + "$ref": "91" + }, + "value": "Microsoft-VirtualMachine" + }, + "type": { + "$id": "1224", + "kind": "string", + "type": { + "$ref": "95" + }, + "value": "Microsoft.Chaos/targets" + }, + "id": { + "$id": "1225", + "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": "1226", + "kind": "dict", + "type": { + "$ref": "242" + }, + "value": { + "$id": "1227" + } + }, + "systemData": { + "$id": "1228", + "kind": "model", + "type": { + "$ref": "100" + }, + "value": { + "$id": "1229", + "createdAt": { + "$id": "1230", + "kind": "string", + "type": { + "$ref": "109" + }, + "value": "2021-07-01T00:00:00.0Z" + }, + "lastModifiedAt": { + "$id": "1231", + "kind": "string", + "type": { + "$ref": "121" + }, + "value": "2021-07-01T00:00:00.0Z" + } + } + } + } + } + }, + { + "$id": "1232", + "response": { + "$ref": "1199" + }, + "statusCode": 201, + "bodyValue": { + "$id": "1233", + "kind": "model", + "type": { + "$ref": "240" + }, + "value": { + "$id": "1234", + "name": { + "$id": "1235", + "kind": "string", + "type": { + "$ref": "91" + }, + "value": "Microsoft-VirtualMachine" + }, + "type": { + "$id": "1236", + "kind": "string", + "type": { + "$ref": "95" + }, + "value": "Microsoft.Chaos/targets" + }, + "id": { + "$id": "1237", + "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": "1238", + "kind": "dict", + "type": { + "$ref": "242" + }, + "value": { + "$id": "1239" + } + }, + "systemData": { + "$id": "1240", + "kind": "model", + "type": { + "$ref": "100" + }, + "value": { + "$id": "1241", + "createdAt": { + "$id": "1242", + "kind": "string", + "type": { + "$ref": "109" + }, + "value": "2021-07-01T00:00:00.0Z" + }, + "lastModifiedAt": { + "$id": "1243", + "kind": "string", + "type": { + "$ref": "121" + }, + "value": "2021-07-01T00:00:00.0Z" + } + } + } + } + } + } + ] + } + ] + }, + { + "$id": "1244", + "name": "delete", + "resourceName": "Target", + "doc": "Delete a Target resource that extends a tracked regional resource.", + "accessibility": "public", + "parameters": [ + { + "$id": "1245", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "1246", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "1247", + "type": { + "$id": "1248", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-01-01" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1249", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "1250", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "1251", + "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": "1252", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "1253", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1254", + "name": "parentProviderNamespace", + "nameInRequest": "parentProviderNamespace", + "doc": "The parent resource provider namespace.", + "type": { + "$id": "1255", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1256", + "name": "parentResourceType", + "nameInRequest": "parentResourceType", + "doc": "The parent resource type.", + "type": { + "$id": "1257", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1258", + "name": "parentResourceName", + "nameInRequest": "parentResourceName", + "doc": "The parent resource name.", + "type": { + "$id": "1259", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1260", + "name": "targetName", + "nameInRequest": "targetName", + "doc": "String that represents a Target resource name.", + "type": { + "$id": "1261", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1262", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "1263", + "kind": "constant", + "valueType": { + "$id": "1264", + "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": "1265", + "statusCodes": [ + 200 + ], + "headers": [], + "isErrorResponse": false + }, + { + "$id": "1266", + "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": "1267", + "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": "1268", + "parameter": { + "$ref": "1245" + }, + "value": { + "$id": "1269", + "kind": "string", + "type": { + "$ref": "1246" + }, + "value": "2025-01-01" + } + }, + { + "$id": "1270", + "parameter": { + "$ref": "1254" + }, + "value": { + "$id": "1271", + "kind": "string", + "type": { + "$ref": "1255" + }, + "value": "Microsoft.Compute" + } + }, + { + "$id": "1272", + "parameter": { + "$ref": "1258" + }, + "value": { + "$id": "1273", + "kind": "string", + "type": { + "$ref": "1259" + }, + "value": "exampleVM" + } + }, + { + "$id": "1274", + "parameter": { + "$ref": "1256" + }, + "value": { + "$id": "1275", + "kind": "string", + "type": { + "$ref": "1257" + }, + "value": "virtualMachines" + } + }, + { + "$id": "1276", + "parameter": { + "$ref": "1252" + }, + "value": { + "$id": "1277", + "kind": "string", + "type": { + "$ref": "1253" + }, + "value": "exampleRG" + } + }, + { + "$id": "1278", + "parameter": { + "$ref": "1249" + }, + "value": { + "$id": "1279", + "kind": "string", + "type": { + "$ref": "1250" + }, + "value": "6b052e15-03d3-4f17-b2e1-be7f07588291" + } + }, + { + "$id": "1280", + "parameter": { + "$ref": "1260" + }, + "value": { + "$id": "1281", + "kind": "string", + "type": { + "$ref": "1261" + }, + "value": "Microsoft-Agent" + } + } + ], + "responses": [ + { + "$id": "1282", + "response": { + "$ref": "1265" + }, + "statusCode": 200 + }, + { + "$id": "1283", + "response": { + "$ref": "1266" + }, + "statusCode": 204 + } + ] + } + ] + }, + { + "$id": "1284", + "name": "list", + "resourceName": "Target", + "doc": "Get a list of Target resources that extend a tracked regional resource.", + "accessibility": "public", + "parameters": [ + { + "$id": "1285", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "1286", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "1287", + "type": { + "$id": "1288", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-01-01" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1289", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "1290", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "1291", + "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": "1292", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "1293", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1294", + "name": "parentProviderNamespace", + "nameInRequest": "parentProviderNamespace", + "doc": "The parent resource provider namespace.", + "type": { + "$id": "1295", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1296", + "name": "parentResourceType", + "nameInRequest": "parentResourceType", + "doc": "The parent resource type.", + "type": { + "$id": "1297", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1298", + "name": "parentResourceName", + "nameInRequest": "parentResourceName", + "doc": "The parent resource name.", + "type": { + "$id": "1299", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1300", + "name": "continuationToken", + "nameInRequest": "continuationToken", + "doc": "String that sets the continuation token.", + "type": { + "$id": "1301", + "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": "1302", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "1303", + "kind": "constant", + "valueType": { + "$id": "1304", + "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": "1305", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "252" + }, + "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": "1306", + "itemPropertySegments": [ + "value" + ], + "nextLink": { + "$id": "1307", + "responseSegments": [ + "nextLink" + ], + "responseLocation": "Body" + } + }, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.Chaos.Targets.list", + "decorators": [], + "examples": [ + { + "$id": "1308", + "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": "1309", + "parameter": { + "$ref": "1285" + }, + "value": { + "$id": "1310", + "kind": "string", + "type": { + "$ref": "1286" + }, + "value": "2025-01-01" + } + }, + { + "$id": "1311", + "parameter": { + "$ref": "1294" + }, + "value": { + "$id": "1312", + "kind": "string", + "type": { + "$ref": "1295" + }, + "value": "Microsoft.Compute" + } + }, + { + "$id": "1313", + "parameter": { + "$ref": "1298" + }, + "value": { + "$id": "1314", + "kind": "string", + "type": { + "$ref": "1299" + }, + "value": "exampleVM" + } + }, + { + "$id": "1315", + "parameter": { + "$ref": "1296" + }, + "value": { + "$id": "1316", + "kind": "string", + "type": { + "$ref": "1297" + }, + "value": "virtualMachines" + } + }, + { + "$id": "1317", + "parameter": { + "$ref": "1292" + }, + "value": { + "$id": "1318", + "kind": "string", + "type": { + "$ref": "1293" + }, + "value": "exampleRG" + } + }, + { + "$id": "1319", + "parameter": { + "$ref": "1289" + }, + "value": { + "$id": "1320", + "kind": "string", + "type": { + "$ref": "1290" + }, + "value": "6b052e15-03d3-4f17-b2e1-be7f07588291" + } + } + ], + "responses": [ + { + "$id": "1321", + "response": { + "$ref": "1305" + }, + "statusCode": 200, + "bodyValue": { + "$id": "1322", + "kind": "model", + "type": { + "$ref": "252" + }, + "value": { + "$id": "1323", + "nextLink": { + "$id": "1324", + "kind": "string", + "type": { + "$ref": "258" + }, + "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": "1325", + "kind": "array", + "type": { + "$ref": "254" + }, + "value": [ + { + "$id": "1326", + "kind": "model", + "type": { + "$ref": "240" + }, + "value": { + "$id": "1327", + "name": { + "$id": "1328", + "kind": "string", + "type": { + "$ref": "91" + }, + "value": "Microsoft-Agent" + }, + "type": { + "$id": "1329", + "kind": "string", + "type": { + "$ref": "95" + }, + "value": "Microsoft.Chaos/targets" + }, + "id": { + "$id": "1330", + "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": "1331", + "kind": "string", + "type": { + "$ref": "248" + }, + "value": "centraluseuap" + }, + "properties": { + "$id": "1332", + "kind": "dict", + "type": { + "$ref": "242" + }, + "value": { + "$id": "1333", + "agentProfileId": { + "$id": "1334", + "kind": "unknown", + "type": { + "$ref": "244" + }, + "value": "ac4e8251-fdc9-4277-8e87-dc57fe5794cf" + }, + "identities": { + "$id": "1335", + "kind": "unknown", + "type": { + "$ref": "244" + }, + "value": [ + { + "$id": "1336", + "type": "CertificateSubjectIssuer", + "subject": "CN=example.subject" + } + ] + } + } + }, + "systemData": { + "$id": "1337", + "kind": "model", + "type": { + "$ref": "100" + }, + "value": { + "$id": "1338", + "createdAt": { + "$id": "1339", + "kind": "string", + "type": { + "$ref": "109" + }, + "value": "2021-07-01T00:00:00.0Z" + }, + "lastModifiedAt": { + "$id": "1340", + "kind": "string", + "type": { + "$ref": "121" + }, + "value": "2021-07-01T00:00:00.0Z" + } + } + } + } + } + ] + } + } + } + } + ] + } + ] + } + ], + "parameters": [ + { + "$id": "1341", + "name": "endpoint", + "nameInRequest": "endpoint", + "doc": "Service host", + "type": { + "$id": "1342", + "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": "1343", + "type": { + "$id": "1344", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "https://management.azure.com" + } + } + ], + "decorators": [ + { + "$id": "1345", + "name": "Azure.ResourceManager.@armResourceOperations", + "arguments": { + "$id": "1346" + } + } + ], + "crossLanguageDefinitionId": "Microsoft.Chaos.Targets", + "apiVersions": [ + "2024-11-01-preview", + "2025-01-01" + ], + "parent": { + "$ref": "820" + } + }, + { + "$id": "1347", + "kind": "client", + "name": "CapabilityTypes", + "namespace": "Azure.ResourceManager.Chaos", + "operations": [ + { + "$id": "1348", + "name": "get", + "resourceName": "CapabilityType", + "doc": "Get a Capability Type resource for given Target Type and location.", + "accessibility": "public", + "parameters": [ + { + "$id": "1349", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "1350", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "1351", + "type": { + "$id": "1352", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-01-01" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1353", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "1354", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "1355", + "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": "1356", + "name": "location", + "nameInRequest": "location", + "doc": "The name of the Azure region.", + "type": { + "$id": "1357", + "kind": "string", + "name": "azureLocation", + "crossLanguageDefinitionId": "Azure.Core.azureLocation", + "baseType": { + "$id": "1358", + "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": "1359", + "name": "targetTypeName", + "nameInRequest": "targetTypeName", + "doc": "String that represents a Target Type resource name.", + "type": { + "$id": "1360", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1361", + "name": "capabilityTypeName", + "nameInRequest": "capabilityTypeName", + "doc": "String that represents a Capability Type resource name.", + "type": { + "$id": "1362", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1363", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "1364", + "kind": "constant", + "valueType": { + "$id": "1365", + "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": "1366", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "262" + }, + "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": "1367", + "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": "1368", + "parameter": { + "$ref": "1349" + }, + "value": { + "$id": "1369", + "kind": "string", + "type": { + "$ref": "1350" + }, + "value": "2025-01-01" + } + }, + { + "$id": "1370", + "parameter": { + "$ref": "1361" + }, + "value": { + "$id": "1371", + "kind": "string", + "type": { + "$ref": "1362" + }, + "value": "Shutdown-1.0" + } + }, + { + "$id": "1372", + "parameter": { + "$ref": "1356" + }, + "value": { + "$id": "1373", + "kind": "string", + "type": { + "$ref": "1357" + }, + "value": "westus2" + } + }, + { + "$id": "1374", + "parameter": { + "$ref": "1353" + }, + "value": { + "$id": "1375", + "kind": "string", + "type": { + "$ref": "1354" + }, + "value": "6b052e15-03d3-4f17-b2e1-be7f07588291" + } + }, + { + "$id": "1376", + "parameter": { + "$ref": "1359" + }, + "value": { + "$id": "1377", + "kind": "string", + "type": { + "$ref": "1360" + }, + "value": "Microsoft-VirtualMachine" + } + } + ], + "responses": [ + { + "$id": "1378", + "response": { + "$ref": "1366" + }, + "statusCode": 200, + "bodyValue": { + "$id": "1379", + "kind": "model", + "type": { + "$ref": "262" + }, + "value": { + "$id": "1380", + "name": { + "$id": "1381", + "kind": "string", + "type": { + "$ref": "91" + }, + "value": "Shutdown-1.0" + }, + "type": { + "$id": "1382", + "kind": "string", + "type": { + "$ref": "95" + }, + "value": "Microsoft.Chaos/locations/targetTypes/capabilityTypes" + }, + "id": { + "$id": "1383", + "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": "1384", + "kind": "model", + "type": { + "$ref": "264" + }, + "value": { + "$id": "1385", + "description": { + "$id": "1386", + "kind": "string", + "type": { + "$ref": "278" + }, + "value": "Shutdown an Azure Virtual Machine for a defined period of time." + }, + "displayName": { + "$id": "1387", + "kind": "string", + "type": { + "$ref": "274" + }, + "value": "Shutdown VM" + }, + "kind": { + "$id": "1388", + "kind": "string", + "type": { + "$ref": "290" + }, + "value": "fault" + }, + "parametersSchema": { + "$id": "1389", + "kind": "string", + "type": { + "$ref": "282" + }, + "value": "https://schema.centralus.chaos-prod.azure.com/targets/Microsoft-VirtualMachine/capabilities/Shutdown-1.0.json" + }, + "publisher": { + "$id": "1390", + "kind": "string", + "type": { + "$ref": "266" + }, + "value": "Microsoft" + }, + "runtimeProperties": { + "$id": "1391", + "kind": "model", + "type": { + "$ref": "309" + }, + "value": { + "$id": "1392", + "kind": { + "$id": "1393", + "kind": "string", + "type": { + "$ref": "311" + }, + "value": "continuous" + } + } + }, + "targetType": { + "$id": "1394", + "kind": "string", + "type": { + "$ref": "270" + }, + "value": "VirtualMachine" + }, + "urn": { + "$id": "1395", + "kind": "string", + "type": { + "$ref": "286" + }, + "value": "urn:csci:microsoft:virtualMachine:shutdown/1.0" + }, + "azureRbacActions": { + "$id": "1396", + "kind": "array", + "type": { + "$ref": "294" + }, + "value": [ + { + "$id": "1397", + "kind": "string", + "type": { + "$ref": "295" + }, + "value": "Microsoft.Compute/virtualMachines/poweroff/action" + }, + { + "$id": "1398", + "kind": "string", + "type": { + "$ref": "295" + }, + "value": "Microsoft.Compute/virtualMachines/start/action" + }, + { + "$id": "1399", + "kind": "string", + "type": { + "$ref": "295" + }, + "value": "Microsoft.Compute/virtualMachines/instanceView/read" + }, + { + "$id": "1400", + "kind": "string", + "type": { + "$ref": "295" + }, + "value": "Microsoft.Compute/virtualMachines/read" + }, + { + "$id": "1401", + "kind": "string", + "type": { + "$ref": "295" + }, + "value": "Microsoft.Compute/locations/operations/read" + } + ] + }, + "requiredAzureRoleDefinitionIds": { + "$id": "1402", + "kind": "array", + "type": { + "$ref": "304" + }, + "value": [ + { + "$id": "1403", + "kind": "string", + "type": { + "$ref": "305" + }, + "value": "acdd72a7-3385-48ef-bd42-f606fba81ae0" + } + ] + } + } + } + } + } + } + ] + } + ] + }, + { + "$id": "1404", + "name": "list", + "resourceName": "CapabilityType", + "doc": "Get a list of Capability Type resources for given Target Type and location.", + "accessibility": "public", + "parameters": [ + { + "$id": "1405", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "1406", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "1407", + "type": { + "$id": "1408", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-01-01" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1409", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "1410", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "1411", + "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": "1412", + "name": "location", + "nameInRequest": "location", + "doc": "The name of the Azure region.", + "type": { + "$id": "1413", + "kind": "string", + "name": "azureLocation", + "crossLanguageDefinitionId": "Azure.Core.azureLocation", + "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": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1415", + "name": "targetTypeName", + "nameInRequest": "targetTypeName", + "doc": "String that represents a Target Type resource name.", + "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": "continuationToken", + "nameInRequest": "continuationToken", + "doc": "String that sets the continuation token.", + "type": { + "$id": "1418", + "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": "1419", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "1420", + "kind": "constant", + "valueType": { + "$id": "1421", + "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": "1422", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "318" + }, + "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": "1423", + "itemPropertySegments": [ + "value" + ], + "nextLink": { + "$id": "1424", + "responseSegments": [ + "nextLink" + ], + "responseLocation": "Body" + } + }, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.Chaos.CapabilityTypes.list", + "decorators": [], + "examples": [ + { + "$id": "1425", + "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": "1426", + "parameter": { + "$ref": "1405" + }, + "value": { + "$id": "1427", + "kind": "string", + "type": { + "$ref": "1406" + }, + "value": "2025-01-01" + } + }, + { + "$id": "1428", + "parameter": { + "$ref": "1412" + }, + "value": { + "$id": "1429", + "kind": "string", + "type": { + "$ref": "1413" + }, + "value": "westus2" + } + }, + { + "$id": "1430", + "parameter": { + "$ref": "1409" + }, + "value": { + "$id": "1431", + "kind": "string", + "type": { + "$ref": "1410" + }, + "value": "6b052e15-03d3-4f17-b2e1-be7f07588291" + } + }, + { + "$id": "1432", + "parameter": { + "$ref": "1415" + }, + "value": { + "$id": "1433", + "kind": "string", + "type": { + "$ref": "1416" + }, + "value": "Microsoft-VirtualMachine" + } + } + ], + "responses": [ + { + "$id": "1434", + "response": { + "$ref": "1422" + }, + "statusCode": 200, + "bodyValue": { + "$id": "1435", + "kind": "model", + "type": { + "$ref": "318" + }, + "value": { + "$id": "1436", + "nextLink": { + "$id": "1437", + "kind": "string", + "type": { + "$ref": "324" + }, + "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": "1438", + "kind": "array", + "type": { + "$ref": "320" + }, + "value": [ + { + "$id": "1439", + "kind": "model", + "type": { + "$ref": "262" + }, + "value": { + "$id": "1440", + "name": { + "$id": "1441", + "kind": "string", + "type": { + "$ref": "91" + }, + "value": "Shutdown-1.0" + }, + "type": { + "$id": "1442", + "kind": "string", + "type": { + "$ref": "95" + }, + "value": "Microsoft.Chaos/locations/targetTypes/capabilityTypes" + }, + "id": { + "$id": "1443", + "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": "1444", + "kind": "model", + "type": { + "$ref": "264" + }, + "value": { + "$id": "1445", + "description": { + "$id": "1446", + "kind": "string", + "type": { + "$ref": "278" + }, + "value": "Shutdown an Azure Virtual Machine for a defined period of time." + }, + "displayName": { + "$id": "1447", + "kind": "string", + "type": { + "$ref": "274" + }, + "value": "Shutdown VM" + }, + "kind": { + "$id": "1448", + "kind": "string", + "type": { + "$ref": "290" + }, + "value": "fault" + }, + "parametersSchema": { + "$id": "1449", + "kind": "string", + "type": { + "$ref": "282" + }, + "value": "https://schema.centralus.chaos-prod.azure.com/targets/Microsoft-VirtualMachine/capabilities/Shutdown-1.0.json" + }, + "publisher": { + "$id": "1450", + "kind": "string", + "type": { + "$ref": "266" + }, + "value": "Microsoft" + }, + "runtimeProperties": { + "$id": "1451", + "kind": "model", + "type": { + "$ref": "309" + }, + "value": { + "$id": "1452", + "kind": { + "$id": "1453", + "kind": "string", + "type": { + "$ref": "311" + }, + "value": "continuous" + } + } + }, + "targetType": { + "$id": "1454", + "kind": "string", + "type": { + "$ref": "270" + }, + "value": "VirtualMachine" + }, + "urn": { + "$id": "1455", + "kind": "string", + "type": { + "$ref": "286" + }, + "value": "urn:csci:microsoft:virtualMachine:shutdown/1.0" + }, + "azureRbacActions": { + "$id": "1456", + "kind": "array", + "type": { + "$ref": "294" + }, + "value": [ + { + "$id": "1457", + "kind": "string", + "type": { + "$ref": "295" + }, + "value": "Microsoft.Compute/virtualMachines/poweroff/action" + }, + { + "$id": "1458", + "kind": "string", + "type": { + "$ref": "295" + }, + "value": "Microsoft.Compute/virtualMachines/start/action" + }, + { + "$id": "1459", + "kind": "string", + "type": { + "$ref": "295" + }, + "value": "Microsoft.Compute/virtualMachines/instanceView/read" + }, + { + "$id": "1460", + "kind": "string", + "type": { + "$ref": "295" + }, + "value": "Microsoft.Compute/virtualMachines/read" + }, + { + "$id": "1461", + "kind": "string", + "type": { + "$ref": "295" + }, + "value": "Microsoft.Compute/locations/operations/read" + } + ] + }, + "requiredAzureRoleDefinitionIds": { + "$id": "1462", + "kind": "array", + "type": { + "$ref": "304" + }, + "value": [ + { + "$id": "1463", + "kind": "string", + "type": { + "$ref": "305" + }, + "value": "acdd72a7-3385-48ef-bd42-f606fba81ae0" + } + ] + } + } + } + } + } + ] + } + } + } + } + ] + } + ] + } + ], + "parameters": [ + { + "$id": "1464", + "name": "endpoint", + "nameInRequest": "endpoint", + "doc": "Service host", + "type": { + "$id": "1465", + "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": "1466", + "type": { + "$id": "1467", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "https://management.azure.com" + } + } + ], + "decorators": [ + { + "$id": "1468", + "name": "Azure.ResourceManager.@armResourceOperations", + "arguments": { + "$id": "1469" + } + } + ], + "crossLanguageDefinitionId": "Microsoft.Chaos.CapabilityTypes", + "apiVersions": [ + "2024-11-01-preview", + "2025-01-01" + ], + "parent": { + "$ref": "820" + } + }, + { + "$id": "1470", + "kind": "client", + "name": "Experiments", + "namespace": "Azure.ResourceManager.Chaos", + "operations": [ + { + "$id": "1471", + "name": "get", + "resourceName": "Experiment", + "doc": "Get a Experiment resource.", + "accessibility": "public", + "parameters": [ + { + "$id": "1472", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "1473", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "1474", + "type": { + "$id": "1475", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-01-01" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1476", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "1477", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "1478", + "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": "1479", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "1480", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1481", + "name": "experimentName", + "nameInRequest": "experimentName", + "doc": "String that represents a Experiment resource name.", + "type": { + "$id": "1482", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1483", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "1484", + "kind": "constant", + "valueType": { + "$id": "1485", + "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": "1486", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "328" + }, + "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": "1487", + "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": "1488", + "parameter": { + "$ref": "1472" + }, + "value": { + "$id": "1489", + "kind": "string", + "type": { + "$ref": "1473" + }, + "value": "2025-01-01" + } + }, + { + "$id": "1490", + "parameter": { + "$ref": "1481" + }, + "value": { + "$id": "1491", + "kind": "string", + "type": { + "$ref": "1482" + }, + "value": "exampleExperiment" + } + }, + { + "$id": "1492", + "parameter": { + "$ref": "1479" + }, + "value": { + "$id": "1493", + "kind": "string", + "type": { + "$ref": "1480" + }, + "value": "exampleRG" + } + }, + { + "$id": "1494", + "parameter": { + "$ref": "1476" + }, + "value": { + "$id": "1495", + "kind": "string", + "type": { + "$ref": "1477" + }, + "value": "6b052e15-03d3-4f17-b2e1-be7f07588291" + } + } + ], + "responses": [ + { + "$id": "1496", + "response": { + "$ref": "1486" + }, + "statusCode": 200, + "bodyValue": { + "$id": "1497", + "kind": "model", + "type": { + "$ref": "328" + }, + "value": { + "$id": "1498", + "name": { + "$id": "1499", + "kind": "string", + "type": { + "$ref": "91" + }, + "value": "exampleExperiment" + }, + "type": { + "$id": "1500", + "kind": "string", + "type": { + "$ref": "95" + }, + "value": "Microsoft.Chaos/experiments" + }, + "id": { + "$id": "1501", + "kind": "string", + "type": { + "$ref": "86" + }, + "value": "/subscriptions/6b052e15-03d3-4f17-b2e1-be7f07588291/resourceGroups/exampleRG/providers/Microsoft.Chaos/experiments/exampleExperiment" + }, + "identity": { + "$id": "1502", + "kind": "model", + "type": { + "$ref": "341" + }, + "value": { + "$id": "1503", + "type": { + "$id": "1504", + "kind": "string", + "type": { + "$ref": "24" + }, + "value": "SystemAssigned" + }, + "principalId": { + "$id": "1505", + "kind": "string", + "type": { + "$ref": "343" + }, + "value": "d04ab567-2c07-43ef-a7f4-4527626b7f56" + }, + "tenantId": { + "$id": "1506", + "kind": "string", + "type": { + "$ref": "348" + }, + "value": "8c3e2fb2-fe7a-4bf1-b779-d73990782fe6" + } + } + }, + "location": { + "$id": "1507", + "kind": "string", + "type": { + "$ref": "337" + }, + "value": "centraluseuap" + }, + "properties": { + "$id": "1508", + "kind": "model", + "type": { + "$ref": "375" + }, + "value": { + "$id": "1509", + "selectors": { + "$id": "1510", + "kind": "array", + "type": { + "$ref": "464" + }, + "value": [ + { + "$id": "1511", + "kind": "model", + "type": { + "$ref": "497" + }, + "value": { + "$id": "1512", + "type": { + "$id": "1513", + "kind": "string", + "type": { + "$ref": "512" + }, + "value": "List" + }, + "id": { + "$id": "1514", + "kind": "string", + "type": { + "$ref": "470" + }, + "value": "selector1" + }, + "targets": { + "$id": "1515", + "kind": "array", + "type": { + "$ref": "499" + }, + "value": [ + { + "$id": "1516", + "kind": "model", + "type": { + "$ref": "500" + }, + "value": { + "$id": "1517", + "type": { + "$id": "1518", + "kind": "string", + "type": { + "$ref": "66" + }, + "value": "ChaosTarget" + }, + "id": { + "$id": "1519", + "kind": "string", + "type": { + "$ref": "505" + }, + "value": "/subscriptions/6b052e15-03d3-4f17-b2e1-be7f07588291/resourceGroups/exampleRG/providers/Microsoft.Compute/virtualMachines/exampleVM/providers/Microsoft.Chaos/targets/Microsoft-VirtualMachine" + } + } + } + ] + } + } + } + ] + }, + "steps": { + "$id": "1520", + "kind": "array", + "type": { + "$ref": "380" + }, + "value": [ + { + "$id": "1521", + "kind": "model", + "type": { + "$ref": "381" + }, + "value": { + "$id": "1522", + "name": { + "$id": "1523", + "kind": "string", + "type": { + "$ref": "383" + }, + "value": "step1" + }, + "branches": { + "$id": "1524", + "kind": "array", + "type": { + "$ref": "387" + }, + "value": [ + { + "$id": "1525", + "kind": "model", + "type": { + "$ref": "388" + }, + "value": { + "$id": "1526", + "name": { + "$id": "1527", + "kind": "string", + "type": { + "$ref": "390" + }, + "value": "branch1" + }, + "actions": { + "$id": "1528", + "kind": "array", + "type": { + "$ref": "394" + }, + "value": [ + { + "$id": "1529", + "kind": "model", + "type": { + "$ref": "404" + }, + "value": { + "$id": "1530", + "name": { + "$id": "1531", + "kind": "string", + "type": { + "$ref": "400" + }, + "value": "urn:csci:provider:providername:Shutdown/1.0" + }, + "type": { + "$id": "1532", + "kind": "string", + "type": { + "$ref": "428" + }, + "value": "continuous" + }, + "duration": { + "$id": "1533", + "kind": "string", + "type": { + "$ref": "406" + }, + "value": "PT10M" + }, + "parameters": { + "$id": "1534", + "kind": "array", + "type": { + "$ref": "411" + }, + "value": [ + { + "$id": "1535", + "kind": "model", + "type": { + "$ref": "412" + }, + "value": { + "$id": "1536", + "key": { + "$id": "1537", + "kind": "string", + "type": { + "$ref": "414" + }, + "value": "abruptShutdown" + }, + "value": { + "$id": "1538", + "kind": "string", + "type": { + "$ref": "418" + }, + "value": "false" + } + } + } + ] + }, + "selectorId": { + "$id": "1539", + "kind": "string", + "type": { + "$ref": "424" + }, + "value": "selector1" + } + } + } + ] + } + } + } + ] + } + } + } + ] + } + } + }, + "systemData": { + "$id": "1540", + "kind": "model", + "type": { + "$ref": "100" + }, + "value": { + "$id": "1541", + "createdAt": { + "$id": "1542", + "kind": "string", + "type": { + "$ref": "109" + }, + "value": "2021-07-01T00:00:00.0Z" + }, + "createdBy": { + "$id": "1543", + "kind": "string", + "type": { + "$ref": "102" + }, + "value": "User" + }, + "createdByType": { + "$id": "1544", + "kind": "string", + "type": { + "$ref": "2" + }, + "value": "b3a41dba-4415-4d36-9ee8-e5eaa86db976" + }, + "lastModifiedAt": { + "$id": "1545", + "kind": "string", + "type": { + "$ref": "121" + }, + "value": "2021-07-01T00:00:00.0Z" + }, + "lastModifiedBy": { + "$id": "1546", + "kind": "string", + "type": { + "$ref": "114" + }, + "value": "User" + }, + "lastModifiedByType": { + "$id": "1547", + "kind": "string", + "type": { + "$ref": "2" + }, + "value": "b3a41dba-4415-4d36-9ee8-e5eaa86db976" + } + } + } + } + } + } + ] + } + ] + }, + { + "$id": "1548", + "name": "createOrUpdate", + "resourceName": "Experiment", + "doc": "Create or update a Experiment resource.", + "accessibility": "public", + "parameters": [ + { + "$id": "1549", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "1550", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "1551", + "type": { + "$id": "1552", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-01-01" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1553", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "1554", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "1555", + "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": "1556", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "1557", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1558", + "name": "experimentName", + "nameInRequest": "experimentName", + "doc": "String that represents a Experiment resource name.", + "type": { + "$id": "1559", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1560", + "name": "contentType", + "nameInRequest": "Content-Type", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$id": "1561", + "kind": "constant", + "valueType": { + "$id": "1562", + "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": "1563", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "1564", + "kind": "constant", + "valueType": { + "$id": "1565", + "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": "1566", + "name": "resource", + "nameInRequest": "resource", + "doc": "Experiment resource to be created or updated.", + "type": { + "$ref": "328" + }, + "location": "Body", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "1567", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "328" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + }, + { + "$id": "1568", + "statusCodes": [ + 201 + ], + "bodyType": { + "$ref": "328" + }, + "headers": [ + { + "$id": "1569", + "name": "azureAsyncOperation", + "nameInResponse": "Azure-AsyncOperation", + "doc": "A link to the status monitor", + "type": { + "$id": "1570", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + { + "$id": "1571", + "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": "1572", + "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": "1573", + "finalStateVia": 0, + "finalResponse": { + "$id": "1574", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "328" + } + } + }, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.Chaos.Experiments.createOrUpdate", + "decorators": [], + "examples": [ + { + "$id": "1575", + "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": "1576", + "parameter": { + "$ref": "1549" + }, + "value": { + "$id": "1577", + "kind": "string", + "type": { + "$ref": "1550" + }, + "value": "2025-01-01" + } + }, + { + "$id": "1578", + "parameter": { + "$ref": "1566" + }, + "value": { + "$id": "1579", + "kind": "model", + "type": { + "$ref": "328" + }, + "value": { + "$id": "1580", + "identity": { + "$id": "1581", + "kind": "model", + "type": { + "$ref": "341" + }, + "value": { + "$id": "1582", + "type": { + "$id": "1583", + "kind": "string", + "type": { + "$ref": "24" + }, + "value": "SystemAssigned" + } + } + }, + "tags": { + "$id": "1584", + "kind": "dict", + "type": { + "$ref": "331" + }, + "value": { + "$id": "1585", + "key7131": { + "$id": "1586", + "kind": "string", + "type": { + "$ref": "333" + }, + "value": "ryohwcoiccwsnewjigfmijz" + }, + "key2138": { + "$id": "1587", + "kind": "string", + "type": { + "$ref": "333" + }, + "value": "fjaeecgnvqd" + } + } + }, + "location": { + "$id": "1588", + "kind": "string", + "type": { + "$ref": "337" + }, + "value": "eastus2euap" + }, + "properties": { + "$id": "1589", + "kind": "model", + "type": { + "$ref": "375" + }, + "value": { + "$id": "1590", + "selectors": { + "$id": "1591", + "kind": "array", + "type": { + "$ref": "464" + }, + "value": [ + { + "$id": "1592", + "kind": "model", + "type": { + "$ref": "497" + }, + "value": { + "$id": "1593", + "type": { + "$id": "1594", + "kind": "string", + "type": { + "$ref": "512" + }, + "value": "List" + }, + "id": { + "$id": "1595", + "kind": "string", + "type": { + "$ref": "470" + }, + "value": "selector1" + }, + "targets": { + "$id": "1596", + "kind": "array", + "type": { + "$ref": "499" + }, + "value": [ + { + "$id": "1597", + "kind": "model", + "type": { + "$ref": "500" + }, + "value": { + "$id": "1598", + "type": { + "$id": "1599", + "kind": "string", + "type": { + "$ref": "66" + }, + "value": "ChaosTarget" + }, + "id": { + "$id": "1600", + "kind": "string", + "type": { + "$ref": "505" + }, + "value": "/subscriptions/6b052e15-03d3-4f17-b2e1-be7f07588291/resourceGroups/exampleRG/providers/Microsoft.Compute/virtualMachines/exampleVM/providers/Microsoft.Chaos/targets/Microsoft-VirtualMachine" + } + } + } + ] + } + } + } + ] + }, + "steps": { + "$id": "1601", + "kind": "array", + "type": { + "$ref": "380" + }, + "value": [ + { + "$id": "1602", + "kind": "model", + "type": { + "$ref": "381" + }, + "value": { + "$id": "1603", + "name": { + "$id": "1604", + "kind": "string", + "type": { + "$ref": "383" + }, + "value": "step1" + }, + "branches": { + "$id": "1605", + "kind": "array", + "type": { + "$ref": "387" + }, + "value": [ + { + "$id": "1606", + "kind": "model", + "type": { + "$ref": "388" + }, + "value": { + "$id": "1607", + "name": { + "$id": "1608", + "kind": "string", + "type": { + "$ref": "390" + }, + "value": "branch1" + }, + "actions": { + "$id": "1609", + "kind": "array", + "type": { + "$ref": "394" + }, + "value": [ + { + "$id": "1610", + "kind": "model", + "type": { + "$ref": "404" + }, + "value": { + "$id": "1611", + "name": { + "$id": "1612", + "kind": "string", + "type": { + "$ref": "400" + }, + "value": "urn:csci:microsoft:virtualMachine:shutdown/1.0" + }, + "type": { + "$id": "1613", + "kind": "string", + "type": { + "$ref": "428" + }, + "value": "continuous" + }, + "duration": { + "$id": "1614", + "kind": "string", + "type": { + "$ref": "406" + }, + "value": "PT10M" + }, + "parameters": { + "$id": "1615", + "kind": "array", + "type": { + "$ref": "411" + }, + "value": [ + { + "$id": "1616", + "kind": "model", + "type": { + "$ref": "412" + }, + "value": { + "$id": "1617", + "key": { + "$id": "1618", + "kind": "string", + "type": { + "$ref": "414" + }, + "value": "abruptShutdown" + }, + "value": { + "$id": "1619", + "kind": "string", + "type": { + "$ref": "418" + }, + "value": "false" + } + } + } + ] + }, + "selectorId": { + "$id": "1620", + "kind": "string", + "type": { + "$ref": "424" + }, + "value": "selector1" + } + } + } + ] + } + } + } + ] + } + } + } + ] + } + } + } + } + } + }, + { + "$id": "1621", + "parameter": { + "$ref": "1558" + }, + "value": { + "$id": "1622", + "kind": "string", + "type": { + "$ref": "1559" + }, + "value": "exampleExperiment" + } + }, + { + "$id": "1623", + "parameter": { + "$ref": "1556" + }, + "value": { + "$id": "1624", + "kind": "string", + "type": { + "$ref": "1557" + }, + "value": "exampleRG" + } + }, + { + "$id": "1625", + "parameter": { + "$ref": "1553" + }, + "value": { + "$id": "1626", + "kind": "string", + "type": { + "$ref": "1554" + }, + "value": "6b052e15-03d3-4f17-b2e1-be7f07588291" + } + } + ], + "responses": [ + { + "$id": "1627", + "response": { + "$ref": "1567" + }, + "statusCode": 200, + "bodyValue": { + "$id": "1628", + "kind": "model", + "type": { + "$ref": "328" + }, + "value": { + "$id": "1629", + "name": { + "$id": "1630", + "kind": "string", + "type": { + "$ref": "91" + }, + "value": "exampleExperiment" + }, + "type": { + "$id": "1631", + "kind": "string", + "type": { + "$ref": "95" + }, + "value": "Microsoft.Chaos/experiments" + }, + "id": { + "$id": "1632", + "kind": "string", + "type": { + "$ref": "86" + }, + "value": "/subscriptions/6b052e15-03d3-4f17-b2e1-be7f07588291/resourceGroups/exampleRG/providers/Microsoft.Chaos/experiments/exampleExperiment" + }, + "identity": { + "$id": "1633", + "kind": "model", + "type": { + "$ref": "341" + }, + "value": { + "$id": "1634", + "type": { + "$id": "1635", + "kind": "string", + "type": { + "$ref": "24" + }, + "value": "SystemAssigned" + }, + "principalId": { + "$id": "1636", + "kind": "string", + "type": { + "$ref": "343" + }, + "value": "d04ab567-2c07-43ef-a7f4-4527626b7f56" + }, + "tenantId": { + "$id": "1637", + "kind": "string", + "type": { + "$ref": "348" + }, + "value": "8c3e2fb2-fe7a-4bf1-b779-d73990782fe6" + } + } + }, + "tags": { + "$id": "1638", + "kind": "dict", + "type": { + "$ref": "331" + }, + "value": { + "$id": "1639", + "key7131": { + "$id": "1640", + "kind": "string", + "type": { + "$ref": "333" + }, + "value": "ryohwcoiccwsnewjigfmijz" + }, + "key2138": { + "$id": "1641", + "kind": "string", + "type": { + "$ref": "333" + }, + "value": "fjaeecgnvqd" + } + } + }, + "location": { + "$id": "1642", + "kind": "string", + "type": { + "$ref": "337" + }, + "value": "eastus2euap" + }, + "properties": { + "$id": "1643", + "kind": "model", + "type": { + "$ref": "375" + }, + "value": { + "$id": "1644", + "provisioningState": { + "$id": "1645", + "kind": "string", + "type": { + "$ref": "34" + }, + "value": "Updating" + }, + "selectors": { + "$id": "1646", + "kind": "array", + "type": { + "$ref": "464" + }, + "value": [ + { + "$id": "1647", + "kind": "model", + "type": { + "$ref": "497" + }, + "value": { + "$id": "1648", + "type": { + "$id": "1649", + "kind": "string", + "type": { + "$ref": "512" + }, + "value": "List" + }, + "id": { + "$id": "1650", + "kind": "string", + "type": { + "$ref": "470" + }, + "value": "selector1" + }, + "targets": { + "$id": "1651", + "kind": "array", + "type": { + "$ref": "499" + }, + "value": [ + { + "$id": "1652", + "kind": "model", + "type": { + "$ref": "500" + }, + "value": { + "$id": "1653", + "type": { + "$id": "1654", + "kind": "string", + "type": { + "$ref": "66" + }, + "value": "ChaosTarget" + }, + "id": { + "$id": "1655", + "kind": "string", + "type": { + "$ref": "505" + }, + "value": "/subscriptions/6b052e15-03d3-4f17-b2e1-be7f07588291/resourceGroups/exampleRG/providers/Microsoft.Compute/virtualMachines/exampleVM/providers/Microsoft.Chaos/targets/Microsoft-VirtualMachine" + } + } + } + ] + } + } + } + ] + }, + "steps": { + "$id": "1656", + "kind": "array", + "type": { + "$ref": "380" + }, + "value": [ + { + "$id": "1657", + "kind": "model", + "type": { + "$ref": "381" + }, + "value": { + "$id": "1658", + "name": { + "$id": "1659", + "kind": "string", + "type": { + "$ref": "383" + }, + "value": "step1" + }, + "branches": { + "$id": "1660", + "kind": "array", + "type": { + "$ref": "387" + }, + "value": [ + { + "$id": "1661", + "kind": "model", + "type": { + "$ref": "388" + }, + "value": { + "$id": "1662", + "name": { + "$id": "1663", + "kind": "string", + "type": { + "$ref": "390" + }, + "value": "branch1" + }, + "actions": { + "$id": "1664", + "kind": "array", + "type": { + "$ref": "394" + }, + "value": [ + { + "$id": "1665", + "kind": "model", + "type": { + "$ref": "404" + }, + "value": { + "$id": "1666", + "name": { + "$id": "1667", + "kind": "string", + "type": { + "$ref": "400" + }, + "value": "urn:csci:microsoft:virtualMachine:shutdown/1.0" + }, + "type": { + "$id": "1668", + "kind": "string", + "type": { + "$ref": "428" + }, + "value": "continuous" + }, + "duration": { + "$id": "1669", + "kind": "string", + "type": { + "$ref": "406" + }, + "value": "PT10M" + }, + "parameters": { + "$id": "1670", + "kind": "array", + "type": { + "$ref": "411" + }, + "value": [ + { + "$id": "1671", + "kind": "model", + "type": { + "$ref": "412" + }, + "value": { + "$id": "1672", + "key": { + "$id": "1673", + "kind": "string", + "type": { + "$ref": "414" + }, + "value": "abruptShutdown" + }, + "value": { + "$id": "1674", + "kind": "string", + "type": { + "$ref": "418" + }, + "value": "false" + } + } + } + ] + }, + "selectorId": { + "$id": "1675", + "kind": "string", + "type": { + "$ref": "424" + }, + "value": "selector1" + } + } + } + ] + } + } + } + ] + } + } + } + ] + } + } + }, + "systemData": { + "$id": "1676", + "kind": "model", + "type": { + "$ref": "100" + }, + "value": { + "$id": "1677", + "createdAt": { + "$id": "1678", + "kind": "string", + "type": { + "$ref": "109" + }, + "value": "2021-07-01T00:00:00.0Z" + }, + "createdBy": { + "$id": "1679", + "kind": "string", + "type": { + "$ref": "102" + }, + "value": "User" + }, + "createdByType": { + "$id": "1680", + "kind": "string", + "type": { + "$ref": "2" + }, + "value": "b3a41dba-4415-4d36-9ee8-e5eaa86db976" + }, + "lastModifiedAt": { + "$id": "1681", + "kind": "string", + "type": { + "$ref": "121" + }, + "value": "2021-07-01T00:00:00.0Z" + }, + "lastModifiedBy": { + "$id": "1682", + "kind": "string", + "type": { + "$ref": "114" + }, + "value": "User" + }, + "lastModifiedByType": { + "$id": "1683", + "kind": "string", + "type": { + "$ref": "2" + }, + "value": "b3a41dba-4415-4d36-9ee8-e5eaa86db976" + } + } + } + } + } + }, + { + "$id": "1684", + "response": { + "$ref": "1568" + }, + "statusCode": 201, + "bodyValue": { + "$id": "1685", + "kind": "model", + "type": { + "$ref": "328" + }, + "value": { + "$id": "1686", + "name": { + "$id": "1687", + "kind": "string", + "type": { + "$ref": "91" + }, + "value": "exampleExperiment" + }, + "type": { + "$id": "1688", + "kind": "string", + "type": { + "$ref": "95" + }, + "value": "Microsoft.Chaos/experiments" + }, + "id": { + "$id": "1689", + "kind": "string", + "type": { + "$ref": "86" + }, + "value": "/subscriptions/6b052e15-03d3-4f17-b2e1-be7f07588291/resourceGroups/exampleRG/providers/Microsoft.Chaos/experiments/exampleExperiment" + }, + "identity": { + "$id": "1690", + "kind": "model", + "type": { + "$ref": "341" + }, + "value": { + "$id": "1691", + "type": { + "$id": "1692", + "kind": "string", + "type": { + "$ref": "24" + }, + "value": "SystemAssigned" + }, + "principalId": { + "$id": "1693", + "kind": "string", + "type": { + "$ref": "343" + }, + "value": "d04ab567-2c07-43ef-a7f4-4527626b7f56" + }, + "tenantId": { + "$id": "1694", + "kind": "string", + "type": { + "$ref": "348" + }, + "value": "8c3e2fb2-fe7a-4bf1-b779-d73990782fe6" + } + } + }, + "tags": { + "$id": "1695", + "kind": "dict", + "type": { + "$ref": "331" + }, + "value": { + "$id": "1696", + "key7131": { + "$id": "1697", + "kind": "string", + "type": { + "$ref": "333" + }, + "value": "ryohwcoiccwsnewjigfmijz" + }, + "key2138": { + "$id": "1698", + "kind": "string", + "type": { + "$ref": "333" + }, + "value": "fjaeecgnvqd" + } + } + }, + "location": { + "$id": "1699", + "kind": "string", + "type": { + "$ref": "337" + }, + "value": "eastus2euap" + }, + "properties": { + "$id": "1700", + "kind": "model", + "type": { + "$ref": "375" + }, + "value": { + "$id": "1701", + "provisioningState": { + "$id": "1702", + "kind": "string", + "type": { + "$ref": "34" + }, + "value": "Creating" + }, + "selectors": { + "$id": "1703", + "kind": "array", + "type": { + "$ref": "464" + }, + "value": [ + { + "$id": "1704", + "kind": "model", + "type": { + "$ref": "497" + }, + "value": { + "$id": "1705", + "type": { + "$id": "1706", + "kind": "string", + "type": { + "$ref": "512" + }, + "value": "List" + }, + "id": { + "$id": "1707", + "kind": "string", + "type": { + "$ref": "470" + }, + "value": "selector1" + }, + "targets": { + "$id": "1708", + "kind": "array", + "type": { + "$ref": "499" + }, + "value": [ + { + "$id": "1709", + "kind": "model", + "type": { + "$ref": "500" + }, + "value": { + "$id": "1710", + "type": { + "$id": "1711", + "kind": "string", + "type": { + "$ref": "66" + }, + "value": "ChaosTarget" + }, + "id": { + "$id": "1712", + "kind": "string", + "type": { + "$ref": "505" + }, + "value": "/subscriptions/6b052e15-03d3-4f17-b2e1-be7f07588291/resourceGroups/exampleRG/providers/Microsoft.Compute/virtualMachines/exampleVM/providers/Microsoft.Chaos/targets/Microsoft-VirtualMachine" + } + } + } + ] + } + } + } + ] + }, + "steps": { + "$id": "1713", + "kind": "array", + "type": { + "$ref": "380" + }, + "value": [ + { + "$id": "1714", + "kind": "model", + "type": { + "$ref": "381" + }, + "value": { + "$id": "1715", + "name": { + "$id": "1716", + "kind": "string", + "type": { + "$ref": "383" + }, + "value": "step1" + }, + "branches": { + "$id": "1717", + "kind": "array", + "type": { + "$ref": "387" + }, + "value": [ + { + "$id": "1718", + "kind": "model", + "type": { + "$ref": "388" + }, + "value": { + "$id": "1719", + "name": { + "$id": "1720", + "kind": "string", + "type": { + "$ref": "390" + }, + "value": "branch1" + }, + "actions": { + "$id": "1721", + "kind": "array", + "type": { + "$ref": "394" + }, + "value": [ + { + "$id": "1722", + "kind": "model", + "type": { + "$ref": "404" + }, + "value": { + "$id": "1723", + "name": { + "$id": "1724", + "kind": "string", + "type": { + "$ref": "400" + }, + "value": "urn:csci:microsoft:virtualMachine:shutdown/1.0" + }, + "type": { + "$id": "1725", + "kind": "string", + "type": { + "$ref": "428" + }, + "value": "continuous" + }, + "duration": { + "$id": "1726", + "kind": "string", + "type": { + "$ref": "406" + }, + "value": "PT10M" + }, + "parameters": { + "$id": "1727", + "kind": "array", + "type": { + "$ref": "411" + }, + "value": [ + { + "$id": "1728", + "kind": "model", + "type": { + "$ref": "412" + }, + "value": { + "$id": "1729", + "key": { + "$id": "1730", + "kind": "string", + "type": { + "$ref": "414" + }, + "value": "abruptShutdown" + }, + "value": { + "$id": "1731", + "kind": "string", + "type": { + "$ref": "418" + }, + "value": "false" + } + } + } + ] + }, + "selectorId": { + "$id": "1732", + "kind": "string", + "type": { + "$ref": "424" + }, + "value": "selector1" + } + } + } + ] + } + } + } + ] + } + } + } + ] + } + } + }, + "systemData": { + "$id": "1733", + "kind": "model", + "type": { + "$ref": "100" + }, + "value": { + "$id": "1734", + "createdAt": { + "$id": "1735", + "kind": "string", + "type": { + "$ref": "109" + }, + "value": "2021-07-01T00:00:00.0Z" + }, + "createdBy": { + "$id": "1736", + "kind": "string", + "type": { + "$ref": "102" + }, + "value": "User" + }, + "createdByType": { + "$id": "1737", + "kind": "string", + "type": { + "$ref": "2" + }, + "value": "b3a41dba-4415-4d36-9ee8-e5eaa86db976" + }, + "lastModifiedAt": { + "$id": "1738", + "kind": "string", + "type": { + "$ref": "121" + }, + "value": "2021-07-01T00:00:00.0Z" + }, + "lastModifiedBy": { + "$id": "1739", + "kind": "string", + "type": { + "$ref": "114" + }, + "value": "User" + }, + "lastModifiedByType": { + "$id": "1740", + "kind": "string", + "type": { + "$ref": "2" + }, + "value": "b3a41dba-4415-4d36-9ee8-e5eaa86db976" + } + } + } + } + } + } + ] + } + ] + }, + { + "$id": "1741", + "name": "update", + "resourceName": "Experiment", + "doc": "The operation to update an experiment.", + "accessibility": "public", + "parameters": [ + { + "$id": "1742", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "1743", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "1744", + "type": { + "$id": "1745", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-01-01" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1746", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "1747", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "1748", + "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": "1749", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "1750", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1751", + "name": "experimentName", + "nameInRequest": "experimentName", + "doc": "String that represents a Experiment resource name.", + "type": { + "$id": "1752", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1753", + "name": "contentType", + "nameInRequest": "Content-Type", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$id": "1754", + "kind": "constant", + "valueType": { + "$id": "1755", + "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": "1756", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "1757", + "kind": "constant", + "valueType": { + "$id": "1758", + "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": "1759", + "name": "properties", + "nameInRequest": "properties", + "doc": "Parameters supplied to the Update experiment operation.", + "type": { + "$ref": "560" + }, + "location": "Body", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "1760", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "328" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + }, + { + "$id": "1761", + "statusCodes": [ + 202 + ], + "headers": [ + { + "$id": "1762", + "name": "location", + "nameInResponse": "Location", + "doc": "The Location header contains the URL where the status of the long running operation can be checked.", + "type": { + "$id": "1763", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + { + "$id": "1764", + "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": "1765", + "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": "1766", + "finalStateVia": 1, + "finalResponse": { + "$id": "1767", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "328" + } + } + }, + "generateProtocolMethod": true, + "generateConvenienceMethod": false, + "crossLanguageDefinitionId": "Microsoft.Chaos.Experiments.update", + "decorators": [], + "examples": [ + { + "$id": "1768", + "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": "1769", + "parameter": { + "$ref": "1742" + }, + "value": { + "$id": "1770", + "kind": "string", + "type": { + "$ref": "1743" + }, + "value": "2025-01-01" + } + }, + { + "$id": "1771", + "parameter": { + "$ref": "1759" + }, + "value": { + "$id": "1772", + "kind": "model", + "type": { + "$ref": "560" + }, + "value": { + "$id": "1773", + "identity": { + "$id": "1774", + "kind": "model", + "type": { + "$ref": "341" + }, + "value": { + "$id": "1775", + "type": { + "$id": "1776", + "kind": "string", + "type": { + "$ref": "24" + }, + "value": "UserAssigned" + }, + "userAssignedIdentities": { + "$id": "1777", + "kind": "dict", + "type": { + "$ref": "356" + }, + "value": { + "$id": "1778", + "/subscriptions/6b052e15-03d3-4f17-b2e1-be7f07588291/resourceGroups/exampleRG/providers/Microsoft.ManagedIdentity/userAssignedIdentity/exampleUMI": { + "$id": "1779", + "kind": "model", + "type": { + "$ref": "359" + }, + "value": { + "$id": "1780" + } + } + } + } + } + }, + "tags": { + "$id": "1781", + "kind": "dict", + "type": { + "$ref": "562" + }, + "value": { + "$id": "1782", + "key1": { + "$id": "1783", + "kind": "string", + "type": { + "$ref": "564" + }, + "value": "value1" + }, + "key2": { + "$id": "1784", + "kind": "string", + "type": { + "$ref": "564" + }, + "value": "value2" + } + } + } + } + } + }, + { + "$id": "1785", + "parameter": { + "$ref": "1751" + }, + "value": { + "$id": "1786", + "kind": "string", + "type": { + "$ref": "1752" + }, + "value": "exampleExperiment" + } + }, + { + "$id": "1787", + "parameter": { + "$ref": "1749" + }, + "value": { + "$id": "1788", + "kind": "string", + "type": { + "$ref": "1750" + }, + "value": "exampleRG" + } + }, + { + "$id": "1789", + "parameter": { + "$ref": "1746" + }, + "value": { + "$id": "1790", + "kind": "string", + "type": { + "$ref": "1747" + }, + "value": "6b052e15-03d3-4f17-b2e1-be7f07588291" + } + } + ], + "responses": [ + { + "$id": "1791", + "response": { + "$ref": "1760" + }, + "statusCode": 200, + "bodyValue": { + "$id": "1792", + "kind": "model", + "type": { + "$ref": "328" + }, + "value": { + "$id": "1793", + "name": { + "$id": "1794", + "kind": "string", + "type": { + "$ref": "91" + }, + "value": "exampleExperiment" + }, + "type": { + "$id": "1795", + "kind": "string", + "type": { + "$ref": "95" + }, + "value": "Microsoft.Chaos/experiments" + }, + "id": { + "$id": "1796", + "kind": "string", + "type": { + "$ref": "86" + }, + "value": "/subscriptions/6b052e15-03d3-4f17-b2e1-be7f07588291/resourceGroups/exampleRG/providers/Microsoft.Chaos/experiments/exampleExperiment" + }, + "identity": { + "$id": "1797", + "kind": "model", + "type": { + "$ref": "341" + }, + "value": { + "$id": "1798", + "type": { + "$id": "1799", + "kind": "string", + "type": { + "$ref": "24" + }, + "value": "UserAssigned" + }, + "principalId": { + "$id": "1800", + "kind": "string", + "type": { + "$ref": "343" + }, + "value": "d04ab567-2c07-43ef-a7f4-4527626b7f56" + }, + "tenantId": { + "$id": "1801", + "kind": "string", + "type": { + "$ref": "348" + }, + "value": "8c3e2fb2-fe7a-4bf1-b779-d73990782fe6" + }, + "userAssignedIdentities": { + "$id": "1802", + "kind": "dict", + "type": { + "$ref": "356" + }, + "value": { + "$id": "1803", + "/subscriptions/6b052e15-03d3-4f17-b2e1-be7f07588291/resourceGroups/exampleRG/providers/Microsoft.ManagedIdentity/userAssignedIdentity/exampleUMI": { + "$id": "1804", + "kind": "model", + "type": { + "$ref": "359" + }, + "value": { + "$id": "1805" + } + } + } + } + } + }, + "location": { + "$id": "1806", + "kind": "string", + "type": { + "$ref": "337" + }, + "value": "centraluseuap" + }, + "properties": { + "$id": "1807", + "kind": "model", + "type": { + "$ref": "375" + }, + "value": { + "$id": "1808", + "selectors": { + "$id": "1809", + "kind": "array", + "type": { + "$ref": "464" + }, + "value": [ + { + "$id": "1810", + "kind": "model", + "type": { + "$ref": "497" + }, + "value": { + "$id": "1811", + "type": { + "$id": "1812", + "kind": "string", + "type": { + "$ref": "512" + }, + "value": "List" + }, + "id": { + "$id": "1813", + "kind": "string", + "type": { + "$ref": "470" + }, + "value": "selector1" + }, + "targets": { + "$id": "1814", + "kind": "array", + "type": { + "$ref": "499" + }, + "value": [ + { + "$id": "1815", + "kind": "model", + "type": { + "$ref": "500" + }, + "value": { + "$id": "1816", + "type": { + "$id": "1817", + "kind": "string", + "type": { + "$ref": "66" + }, + "value": "ChaosTarget" + }, + "id": { + "$id": "1818", + "kind": "string", + "type": { + "$ref": "505" + }, + "value": "/subscriptions/6b052e15-03d3-4f17-b2e1-be7f07588291/resourceGroups/exampleRG/providers/Microsoft.Compute/virtualMachines/exampleVM/providers/Microsoft.Chaos/targets/Microsoft-VirtualMachine" + } + } + } + ] + } + } + } + ] + }, + "steps": { + "$id": "1819", + "kind": "array", + "type": { + "$ref": "380" + }, + "value": [ + { + "$id": "1820", + "kind": "model", + "type": { + "$ref": "381" + }, + "value": { + "$id": "1821", + "name": { + "$id": "1822", + "kind": "string", + "type": { + "$ref": "383" + }, + "value": "step1" + }, + "branches": { + "$id": "1823", + "kind": "array", + "type": { + "$ref": "387" + }, + "value": [ + { + "$id": "1824", + "kind": "model", + "type": { + "$ref": "388" + }, + "value": { + "$id": "1825", + "name": { + "$id": "1826", + "kind": "string", + "type": { + "$ref": "390" + }, + "value": "branch1" + }, + "actions": { + "$id": "1827", + "kind": "array", + "type": { + "$ref": "394" + }, + "value": [ + { + "$id": "1828", + "kind": "model", + "type": { + "$ref": "404" + }, + "value": { + "$id": "1829", + "name": { + "$id": "1830", + "kind": "string", + "type": { + "$ref": "400" + }, + "value": "urn:csci:provider:providername:Shutdown/1.0" + }, + "type": { + "$id": "1831", + "kind": "string", + "type": { + "$ref": "428" + }, + "value": "continuous" + }, + "duration": { + "$id": "1832", + "kind": "string", + "type": { + "$ref": "406" + }, + "value": "PT10M" + }, + "parameters": { + "$id": "1833", + "kind": "array", + "type": { + "$ref": "411" + }, + "value": [ + { + "$id": "1834", + "kind": "model", + "type": { + "$ref": "412" + }, + "value": { + "$id": "1835", + "key": { + "$id": "1836", + "kind": "string", + "type": { + "$ref": "414" + }, + "value": "abruptShutdown" + }, + "value": { + "$id": "1837", + "kind": "string", + "type": { + "$ref": "418" + }, + "value": "false" + } + } + } + ] + }, + "selectorId": { + "$id": "1838", + "kind": "string", + "type": { + "$ref": "424" + }, + "value": "selector1" + } + } + } + ] + } + } + } + ] + } + } + } + ] + } + } + }, + "systemData": { + "$id": "1839", + "kind": "model", + "type": { + "$ref": "100" + }, + "value": { + "$id": "1840", + "createdAt": { + "$id": "1841", + "kind": "string", + "type": { + "$ref": "109" + }, + "value": "2021-07-01T00:00:00.0Z" + }, + "createdBy": { + "$id": "1842", + "kind": "string", + "type": { + "$ref": "102" + }, + "value": "User" + }, + "createdByType": { + "$id": "1843", + "kind": "string", + "type": { + "$ref": "2" + }, + "value": "b3a41dba-4415-4d36-9ee8-e5eaa86db976" + }, + "lastModifiedAt": { + "$id": "1844", + "kind": "string", + "type": { + "$ref": "121" + }, + "value": "2021-07-01T00:00:00.0Z" + }, + "lastModifiedBy": { + "$id": "1845", + "kind": "string", + "type": { + "$ref": "114" + }, + "value": "User" + }, + "lastModifiedByType": { + "$id": "1846", + "kind": "string", + "type": { + "$ref": "2" + }, + "value": "b3a41dba-4415-4d36-9ee8-e5eaa86db976" + } + } + }, + "tags": { + "$id": "1847", + "kind": "dict", + "type": { + "$ref": "331" + }, + "value": { + "$id": "1848", + "key1": { + "$id": "1849", + "kind": "string", + "type": { + "$ref": "333" + }, + "value": "value1" + }, + "key2": { + "$id": "1850", + "kind": "string", + "type": { + "$ref": "333" + }, + "value": "value2" + } + } + } + } + } + }, + { + "$id": "1851", + "response": { + "$ref": "1761" + }, + "statusCode": 202 + } + ] + } + ] + }, + { + "$id": "1852", + "name": "delete", + "resourceName": "Experiment", + "doc": "Delete a Experiment resource.", + "accessibility": "public", + "parameters": [ + { + "$id": "1853", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "1854", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "1855", + "type": { + "$id": "1856", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-01-01" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1857", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "1858", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "1859", + "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": "1860", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "1861", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1862", + "name": "experimentName", + "nameInRequest": "experimentName", + "doc": "String that represents a Experiment resource name.", + "type": { + "$id": "1863", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1864", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "1865", + "kind": "constant", + "valueType": { + "$id": "1866", + "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": "1867", + "statusCodes": [ + 202 + ], + "headers": [ + { + "$id": "1868", + "name": "location", + "nameInResponse": "Location", + "doc": "The Location header contains the URL where the status of the long running operation can be checked.", + "type": { + "$id": "1869", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + { + "$id": "1870", + "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": "1871", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + } + } + ], + "isErrorResponse": false + }, + { + "$id": "1872", + "statusCodes": [ + 204 + ], + "headers": [], + "isErrorResponse": false + } + ], + "httpMethod": "DELETE", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Chaos/experiments/{experimentName}", + "bufferResponse": true, + "longRunning": { + "$id": "1873", + "finalStateVia": 1, + "finalResponse": { + "$id": "1874", + "statusCodes": [ + 204 + ] + } + }, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.Chaos.Experiments.delete", + "decorators": [], + "examples": [ + { + "$id": "1875", + "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": "1876", + "parameter": { + "$ref": "1853" + }, + "value": { + "$id": "1877", + "kind": "string", + "type": { + "$ref": "1854" + }, + "value": "2025-01-01" + } + }, + { + "$id": "1878", + "parameter": { + "$ref": "1862" + }, + "value": { + "$id": "1879", + "kind": "string", + "type": { + "$ref": "1863" + }, + "value": "exampleExperiment" + } + }, + { + "$id": "1880", + "parameter": { + "$ref": "1860" + }, + "value": { + "$id": "1881", + "kind": "string", + "type": { + "$ref": "1861" + }, + "value": "exampleRG" + } + }, + { + "$id": "1882", + "parameter": { + "$ref": "1857" + }, + "value": { + "$id": "1883", + "kind": "string", + "type": { + "$ref": "1858" + }, + "value": "6b052e15-03d3-4f17-b2e1-be7f07588291" + } + } + ], + "responses": [ + { + "$id": "1884", + "response": { + "$ref": "1867" + }, + "statusCode": 202 + }, + { + "$id": "1885", + "response": { + "$ref": "1872" + }, + "statusCode": 204 + } + ] + } + ] + }, + { + "$id": "1886", + "name": "list", + "resourceName": "Experiment", + "doc": "Get a list of Experiment resources in a resource group.", + "accessibility": "public", + "parameters": [ + { + "$id": "1887", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "1888", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "1889", + "type": { + "$id": "1890", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-01-01" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1891", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "1892", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "1893", + "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": "1894", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "1895", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1896", + "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": "1897", + "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": "1898", + "name": "continuationToken", + "nameInRequest": "continuationToken", + "doc": "String that sets the continuation token.", + "type": { + "$id": "1899", + "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": "1900", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "1901", + "kind": "constant", + "valueType": { + "$id": "1902", + "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": "1903", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "570" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "GET", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Chaos/experiments", + "bufferResponse": true, + "paging": { + "$id": "1904", + "itemPropertySegments": [ + "value" + ], + "nextLink": { + "$id": "1905", + "responseSegments": [ + "nextLink" + ], + "responseLocation": "Body" + } + }, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.Chaos.Experiments.list", + "decorators": [], + "examples": [ + { + "$id": "1906", + "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": "1907", + "parameter": { + "$ref": "1887" + }, + "value": { + "$id": "1908", + "kind": "string", + "type": { + "$ref": "1888" + }, + "value": "2025-01-01" + } + }, + { + "$id": "1909", + "parameter": { + "$ref": "1894" + }, + "value": { + "$id": "1910", + "kind": "string", + "type": { + "$ref": "1895" + }, + "value": "exampleRG" + } + }, + { + "$id": "1911", + "parameter": { + "$ref": "1891" + }, + "value": { + "$id": "1912", + "kind": "string", + "type": { + "$ref": "1892" + }, + "value": "6b052e15-03d3-4f17-b2e1-be7f07588291" + } + } + ], + "responses": [ + { + "$id": "1913", + "response": { + "$ref": "1903" + }, + "statusCode": 200, + "bodyValue": { + "$id": "1914", + "kind": "model", + "type": { + "$ref": "570" + }, + "value": { + "$id": "1915", + "nextLink": { + "$id": "1916", + "kind": "string", + "type": { + "$ref": "576" + }, + "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": "1917", + "kind": "array", + "type": { + "$ref": "572" + }, + "value": [ + { + "$id": "1918", + "kind": "model", + "type": { + "$ref": "328" + }, + "value": { + "$id": "1919", + "name": { + "$id": "1920", + "kind": "string", + "type": { + "$ref": "91" + }, + "value": "exampleExperiment" + }, + "type": { + "$id": "1921", + "kind": "string", + "type": { + "$ref": "95" + }, + "value": "Microsoft.Chaos/experiments" + }, + "id": { + "$id": "1922", + "kind": "string", + "type": { + "$ref": "86" + }, + "value": "/subscriptions/6b052e15-03d3-4f17-b2e1-be7f07588291/resourceGroups/exampleRG/providers/Microsoft.Chaos/experiments/exampleExperiment" + }, + "identity": { + "$id": "1923", + "kind": "model", + "type": { + "$ref": "341" + }, + "value": { + "$id": "1924", + "type": { + "$id": "1925", + "kind": "string", + "type": { + "$ref": "24" + }, + "value": "SystemAssigned" + }, + "principalId": { + "$id": "1926", + "kind": "string", + "type": { + "$ref": "343" + }, + "value": "d04ab567-2c07-43ef-a7f4-4527626b7f56" + }, + "tenantId": { + "$id": "1927", + "kind": "string", + "type": { + "$ref": "348" + }, + "value": "8c3e2fb2-fe7a-4bf1-b779-d73990782fe6" + } + } + }, + "location": { + "$id": "1928", + "kind": "string", + "type": { + "$ref": "337" + }, + "value": "centraluseuap" + }, + "properties": { + "$id": "1929", + "kind": "model", + "type": { + "$ref": "375" + }, + "value": { + "$id": "1930", + "selectors": { + "$id": "1931", + "kind": "array", + "type": { + "$ref": "464" + }, + "value": [ + { + "$id": "1932", + "kind": "model", + "type": { + "$ref": "497" + }, + "value": { + "$id": "1933", + "type": { + "$id": "1934", + "kind": "string", + "type": { + "$ref": "512" + }, + "value": "List" + }, + "id": { + "$id": "1935", + "kind": "string", + "type": { + "$ref": "470" + }, + "value": "selector1" + }, + "targets": { + "$id": "1936", + "kind": "array", + "type": { + "$ref": "499" + }, + "value": [ + { + "$id": "1937", + "kind": "model", + "type": { + "$ref": "500" + }, + "value": { + "$id": "1938", + "type": { + "$id": "1939", + "kind": "string", + "type": { + "$ref": "66" + }, + "value": "ChaosTarget" + }, + "id": { + "$id": "1940", + "kind": "string", + "type": { + "$ref": "505" + }, + "value": "/subscriptions/6b052e15-03d3-4f17-b2e1-be7f07588291/resourceGroups/exampleRG/providers/Microsoft.Compute/virtualMachines/exampleVM/providers/Microsoft.Chaos/targets/Microsoft-VirtualMachine" + } + } + } + ] + } + } + } + ] + }, + "steps": { + "$id": "1941", + "kind": "array", + "type": { + "$ref": "380" + }, + "value": [ + { + "$id": "1942", + "kind": "model", + "type": { + "$ref": "381" + }, + "value": { + "$id": "1943", + "name": { + "$id": "1944", + "kind": "string", + "type": { + "$ref": "383" + }, + "value": "step1" + }, + "branches": { + "$id": "1945", + "kind": "array", + "type": { + "$ref": "387" + }, + "value": [ + { + "$id": "1946", + "kind": "model", + "type": { + "$ref": "388" + }, + "value": { + "$id": "1947", + "name": { + "$id": "1948", + "kind": "string", + "type": { + "$ref": "390" + }, + "value": "branch1" + }, + "actions": { + "$id": "1949", + "kind": "array", + "type": { + "$ref": "394" + }, + "value": [ + { + "$id": "1950", + "kind": "model", + "type": { + "$ref": "404" + }, + "value": { + "$id": "1951", + "name": { + "$id": "1952", + "kind": "string", + "type": { + "$ref": "400" + }, + "value": "urn:csci:provider:providername:Shutdown/1.0" + }, + "type": { + "$id": "1953", + "kind": "string", + "type": { + "$ref": "428" + }, + "value": "continuous" + }, + "duration": { + "$id": "1954", + "kind": "string", + "type": { + "$ref": "406" + }, + "value": "PT10M" + }, + "parameters": { + "$id": "1955", + "kind": "array", + "type": { + "$ref": "411" + }, + "value": [ + { + "$id": "1956", + "kind": "model", + "type": { + "$ref": "412" + }, + "value": { + "$id": "1957", + "key": { + "$id": "1958", + "kind": "string", + "type": { + "$ref": "414" + }, + "value": "abruptShutdown" + }, + "value": { + "$id": "1959", + "kind": "string", + "type": { + "$ref": "418" + }, + "value": "false" + } + } + } + ] + }, + "selectorId": { + "$id": "1960", + "kind": "string", + "type": { + "$ref": "424" + }, + "value": "selector1" + } + } + } + ] + } + } + } + ] + } + } + } + ] + } + } + }, + "systemData": { + "$id": "1961", + "kind": "model", + "type": { + "$ref": "100" + }, + "value": { + "$id": "1962", + "createdAt": { + "$id": "1963", + "kind": "string", + "type": { + "$ref": "109" + }, + "value": "2021-07-01T00:00:00.0Z" + }, + "createdBy": { + "$id": "1964", + "kind": "string", + "type": { + "$ref": "102" + }, + "value": "User" + }, + "createdByType": { + "$id": "1965", + "kind": "string", + "type": { + "$ref": "2" + }, + "value": "b3a41dba-4415-4d36-9ee8-e5eaa86db976" + }, + "lastModifiedAt": { + "$id": "1966", + "kind": "string", + "type": { + "$ref": "121" + }, + "value": "2021-07-01T00:00:00.0Z" + }, + "lastModifiedBy": { + "$id": "1967", + "kind": "string", + "type": { + "$ref": "114" + }, + "value": "User" + }, + "lastModifiedByType": { + "$id": "1968", + "kind": "string", + "type": { + "$ref": "2" + }, + "value": "b3a41dba-4415-4d36-9ee8-e5eaa86db976" + } + } + } + } + } + ] + } + } + } + } + ] + } + ] + }, + { + "$id": "1969", + "name": "listAll", + "resourceName": "Experiment", + "doc": "Get a list of Experiment resources in a subscription.", + "accessibility": "public", + "parameters": [ + { + "$id": "1970", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "1971", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "1972", + "type": { + "$id": "1973", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-01-01" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1974", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "1975", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "1976", + "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": "1977", + "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": "1978", + "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": "1979", + "name": "continuationToken", + "nameInRequest": "continuationToken", + "doc": "String that sets the continuation token.", + "type": { + "$id": "1980", + "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": "1981", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "1982", + "kind": "constant", + "valueType": { + "$id": "1983", + "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": "1984", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "570" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "GET", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/providers/Microsoft.Chaos/experiments", + "bufferResponse": true, + "paging": { + "$id": "1985", + "itemPropertySegments": [ + "value" + ], + "nextLink": { + "$id": "1986", + "responseSegments": [ + "nextLink" + ], + "responseLocation": "Body" + } + }, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.Chaos.Experiments.listAll", + "decorators": [], + "examples": [ + { + "$id": "1987", + "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": "1988", + "parameter": { + "$ref": "1970" + }, + "value": { + "$id": "1989", + "kind": "string", + "type": { + "$ref": "1971" + }, + "value": "2025-01-01" + } + }, + { + "$id": "1990", + "parameter": { + "$ref": "1974" + }, + "value": { + "$id": "1991", + "kind": "string", + "type": { + "$ref": "1975" + }, + "value": "6b052e15-03d3-4f17-b2e1-be7f07588291" + } + } + ], + "responses": [ + { + "$id": "1992", + "response": { + "$ref": "1984" + }, + "statusCode": 200, + "bodyValue": { + "$id": "1993", + "kind": "model", + "type": { + "$ref": "570" + }, + "value": { + "$id": "1994", + "nextLink": { + "$id": "1995", + "kind": "string", + "type": { + "$ref": "576" + }, + "value": "https://management.azure.com/subscriptions/6b052e15-03d3-4f17-b2e1-be7f07588291/providers/Microsoft.Chaos/experiments?continuationToken=&api-version=2024-11-01-preview" + }, + "value": { + "$id": "1996", + "kind": "array", + "type": { + "$ref": "572" + }, + "value": [ + { + "$id": "1997", + "kind": "model", + "type": { + "$ref": "328" + }, + "value": { + "$id": "1998", + "name": { + "$id": "1999", + "kind": "string", + "type": { + "$ref": "91" + }, + "value": "exampleExperiment" + }, + "type": { + "$id": "2000", + "kind": "string", + "type": { + "$ref": "95" + }, + "value": "Microsoft.Chaos/experiments" + }, + "id": { + "$id": "2001", + "kind": "string", + "type": { + "$ref": "86" + }, + "value": "/subscriptions/6b052e15-03d3-4f17-b2e1-be7f07588291/resourceGroups/exampleRG/providers/Microsoft.Chaos/experiments/exampleExperiment" + }, + "identity": { + "$id": "2002", + "kind": "model", + "type": { + "$ref": "341" + }, + "value": { + "$id": "2003", + "type": { + "$id": "2004", + "kind": "string", + "type": { + "$ref": "24" + }, + "value": "SystemAssigned" + }, + "principalId": { + "$id": "2005", + "kind": "string", + "type": { + "$ref": "343" + }, + "value": "d04ab567-2c07-43ef-a7f4-4527626b7f56" + }, + "tenantId": { + "$id": "2006", + "kind": "string", + "type": { + "$ref": "348" + }, + "value": "8c3e2fb2-fe7a-4bf1-b779-d73990782fe6" + } + } + }, + "location": { + "$id": "2007", + "kind": "string", + "type": { + "$ref": "337" + }, + "value": "centraluseuap" + }, + "properties": { + "$id": "2008", + "kind": "model", + "type": { + "$ref": "375" + }, + "value": { + "$id": "2009", + "selectors": { + "$id": "2010", + "kind": "array", + "type": { + "$ref": "464" + }, + "value": [ + { + "$id": "2011", + "kind": "model", + "type": { + "$ref": "497" + }, + "value": { + "$id": "2012", + "type": { + "$id": "2013", + "kind": "string", + "type": { + "$ref": "512" + }, + "value": "List" + }, + "id": { + "$id": "2014", + "kind": "string", + "type": { + "$ref": "470" + }, + "value": "selector1" + }, + "targets": { + "$id": "2015", + "kind": "array", + "type": { + "$ref": "499" + }, + "value": [ + { + "$id": "2016", + "kind": "model", + "type": { + "$ref": "500" + }, + "value": { + "$id": "2017", + "type": { + "$id": "2018", + "kind": "string", + "type": { + "$ref": "66" + }, + "value": "ChaosTarget" + }, + "id": { + "$id": "2019", + "kind": "string", + "type": { + "$ref": "505" + }, + "value": "/subscriptions/6b052e15-03d3-4f17-b2e1-be7f07588291/resourceGroups/exampleRG/providers/Microsoft.Compute/virtualMachines/exampleVM/providers/Microsoft.Chaos/targets/Microsoft-VirtualMachine" + } + } + } + ] + } + } + } + ] + }, + "steps": { + "$id": "2020", + "kind": "array", + "type": { + "$ref": "380" + }, + "value": [ + { + "$id": "2021", + "kind": "model", + "type": { + "$ref": "381" + }, + "value": { + "$id": "2022", + "name": { + "$id": "2023", + "kind": "string", + "type": { + "$ref": "383" + }, + "value": "step1" + }, + "branches": { + "$id": "2024", + "kind": "array", + "type": { + "$ref": "387" + }, + "value": [ + { + "$id": "2025", + "kind": "model", + "type": { + "$ref": "388" + }, + "value": { + "$id": "2026", + "name": { + "$id": "2027", + "kind": "string", + "type": { + "$ref": "390" + }, + "value": "branch1" + }, + "actions": { + "$id": "2028", + "kind": "array", + "type": { + "$ref": "394" + }, + "value": [ + { + "$id": "2029", + "kind": "model", + "type": { + "$ref": "404" + }, + "value": { + "$id": "2030", + "name": { + "$id": "2031", + "kind": "string", + "type": { + "$ref": "400" + }, + "value": "urn:csci:provider:providername:Shutdown/1.0" + }, + "type": { + "$id": "2032", + "kind": "string", + "type": { + "$ref": "428" + }, + "value": "continuous" + }, + "duration": { + "$id": "2033", + "kind": "string", + "type": { + "$ref": "406" + }, + "value": "PT10M" + }, + "parameters": { + "$id": "2034", + "kind": "array", + "type": { + "$ref": "411" + }, + "value": [ + { + "$id": "2035", + "kind": "model", + "type": { + "$ref": "412" + }, + "value": { + "$id": "2036", + "key": { + "$id": "2037", + "kind": "string", + "type": { + "$ref": "414" + }, + "value": "abruptShutdown" + }, + "value": { + "$id": "2038", + "kind": "string", + "type": { + "$ref": "418" + }, + "value": "false" + } + } + } + ] + }, + "selectorId": { + "$id": "2039", + "kind": "string", + "type": { + "$ref": "424" + }, + "value": "selector1" + } + } + } + ] + } + } + } + ] + } + } + } + ] + } + } + }, + "systemData": { + "$id": "2040", + "kind": "model", + "type": { + "$ref": "100" + }, + "value": { + "$id": "2041", + "createdAt": { + "$id": "2042", + "kind": "string", + "type": { + "$ref": "109" + }, + "value": "2021-07-01T00:00:00.0Z" + }, + "createdBy": { + "$id": "2043", + "kind": "string", + "type": { + "$ref": "102" + }, + "value": "User" + }, + "createdByType": { + "$id": "2044", + "kind": "string", + "type": { + "$ref": "2" + }, + "value": "b3a41dba-4415-4d36-9ee8-e5eaa86db976" + }, + "lastModifiedAt": { + "$id": "2045", + "kind": "string", + "type": { + "$ref": "121" + }, + "value": "2021-07-01T00:00:00.0Z" + }, + "lastModifiedBy": { + "$id": "2046", + "kind": "string", + "type": { + "$ref": "114" + }, + "value": "User" + }, + "lastModifiedByType": { + "$id": "2047", + "kind": "string", + "type": { + "$ref": "2" + }, + "value": "b3a41dba-4415-4d36-9ee8-e5eaa86db976" + } + } + } + } + } + ] + } + } + } + } + ] + } + ] + }, + { + "$id": "2048", + "name": "cancel", + "resourceName": "Experiments", + "doc": "Cancel a running Experiment resource.", + "accessibility": "public", + "parameters": [ + { + "$id": "2049", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "2050", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "2051", + "type": { + "$id": "2052", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-01-01" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2053", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "2054", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "2055", + "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": "2056", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "2057", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2058", + "name": "experimentName", + "nameInRequest": "experimentName", + "doc": "String that represents a Experiment resource name.", + "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": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "2061", + "kind": "constant", + "valueType": { + "$id": "2062", + "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": "2063", + "statusCodes": [ + 202 + ], + "headers": [ + { + "$id": "2064", + "name": "location", + "nameInResponse": "Location", + "doc": "The Location header contains the URL where the status of the long running operation can be checked.", + "type": { + "$id": "2065", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + { + "$id": "2066", + "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": "2067", + "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": "2068", + "finalStateVia": 1, + "finalResponse": { + "$id": "2069", + "statusCodes": [ + 200 + ] + } + }, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.Chaos.Experiments.cancel", + "decorators": [], + "examples": [ + { + "$id": "2070", + "kind": "http", + "name": "Cancel a running Experiment.", + "description": "Cancel a running Experiment.", + "filePath": "2025-01-01/Experiments_Cancel.json", + "parameters": [ + { + "$id": "2071", + "parameter": { + "$ref": "2049" + }, + "value": { + "$id": "2072", + "kind": "string", + "type": { + "$ref": "2050" + }, + "value": "2025-01-01" + } + }, + { + "$id": "2073", + "parameter": { + "$ref": "2058" + }, + "value": { + "$id": "2074", + "kind": "string", + "type": { + "$ref": "2059" + }, + "value": "exampleExperiment" + } + }, + { + "$id": "2075", + "parameter": { + "$ref": "2056" + }, + "value": { + "$id": "2076", + "kind": "string", + "type": { + "$ref": "2057" + }, + "value": "exampleRG" + } + }, + { + "$id": "2077", + "parameter": { + "$ref": "2053" + }, + "value": { + "$id": "2078", + "kind": "string", + "type": { + "$ref": "2054" + }, + "value": "6b052e15-03d3-4f17-b2e1-be7f07588291" + } + } + ], + "responses": [ + { + "$id": "2079", + "response": { + "$ref": "2063" + }, + "statusCode": 202 + } + ] + } + ] + }, + { + "$id": "2080", + "name": "start", + "resourceName": "Experiments", + "doc": "Start a Experiment resource.", + "accessibility": "public", + "parameters": [ + { + "$id": "2081", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "2082", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "2083", + "type": { + "$id": "2084", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-01-01" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2085", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "2086", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "2087", + "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": "2088", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "2089", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2090", + "name": "experimentName", + "nameInRequest": "experimentName", + "doc": "String that represents a Experiment resource name.", + "type": { + "$id": "2091", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2092", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "2093", + "kind": "constant", + "valueType": { + "$id": "2094", + "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": "2095", + "statusCodes": [ + 202 + ], + "headers": [ + { + "$id": "2096", + "name": "location", + "nameInResponse": "Location", + "doc": "The Location header contains the URL where the status of the long running operation can be checked.", + "type": { + "$id": "2097", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + { + "$id": "2098", + "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": "2099", + "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": "2100", + "finalStateVia": 1, + "finalResponse": { + "$id": "2101", + "statusCodes": [ + 200 + ] + } + }, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.Chaos.Experiments.start", + "decorators": [], + "examples": [ + { + "$id": "2102", + "kind": "http", + "name": "Start a Experiment.", + "description": "Start a Experiment.", + "filePath": "2025-01-01/Experiments_Start.json", + "parameters": [ + { + "$id": "2103", + "parameter": { + "$ref": "2081" + }, + "value": { + "$id": "2104", + "kind": "string", + "type": { + "$ref": "2082" + }, + "value": "2025-01-01" + } + }, + { + "$id": "2105", + "parameter": { + "$ref": "2090" + }, + "value": { + "$id": "2106", + "kind": "string", + "type": { + "$ref": "2091" + }, + "value": "exampleExperiment" + } + }, + { + "$id": "2107", + "parameter": { + "$ref": "2088" + }, + "value": { + "$id": "2108", + "kind": "string", + "type": { + "$ref": "2089" + }, + "value": "exampleRG" + } + }, + { + "$id": "2109", + "parameter": { + "$ref": "2085" + }, + "value": { + "$id": "2110", + "kind": "string", + "type": { + "$ref": "2086" + }, + "value": "6b052e15-03d3-4f17-b2e1-be7f07588291" + } + } + ], + "responses": [ + { + "$id": "2111", + "response": { + "$ref": "2095" + }, + "statusCode": 202 + } + ] + } + ] + } + ], + "parameters": [ + { + "$id": "2112", + "name": "endpoint", + "nameInRequest": "endpoint", + "doc": "Service host", + "type": { + "$id": "2113", + "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": "2114", + "type": { + "$id": "2115", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "https://management.azure.com" + } + } + ], + "decorators": [ + { + "$id": "2116", + "name": "Azure.ResourceManager.@armResourceOperations", + "arguments": { + "$id": "2117" + } + } + ], + "crossLanguageDefinitionId": "Microsoft.Chaos.Experiments", + "apiVersions": [ + "2024-11-01-preview", + "2025-01-01" + ], + "parent": { + "$ref": "820" + } + }, + { + "$id": "2118", + "kind": "client", + "name": "ExperimentExecutions", + "namespace": "Azure.ResourceManager.Chaos", + "operations": [ + { + "$id": "2119", + "name": "getExecution", + "resourceName": "ExperimentExecution", + "doc": "Get an execution of an Experiment resource.", + "accessibility": "public", + "parameters": [ + { + "$id": "2120", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "2121", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "2122", + "type": { + "$id": "2123", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-01-01" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2124", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "2125", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "2126", + "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": "2127", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "2128", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2129", + "name": "experimentName", + "nameInRequest": "experimentName", + "doc": "String that represents a Experiment resource name.", + "type": { + "$id": "2130", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2131", + "name": "executionId", + "nameInRequest": "executionId", + "doc": "GUID that represents a Experiment execution detail.", + "type": { + "$id": "2132", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2133", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "2134", + "kind": "constant", + "valueType": { + "$id": "2135", + "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": "2136", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "580" + }, + "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": "2137", + "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": "2138", + "parameter": { + "$ref": "2120" + }, + "value": { + "$id": "2139", + "kind": "string", + "type": { + "$ref": "2121" + }, + "value": "2025-01-01" + } + }, + { + "$id": "2140", + "parameter": { + "$ref": "2131" + }, + "value": { + "$id": "2141", + "kind": "string", + "type": { + "$ref": "2132" + }, + "value": "f24500ad-744e-4a26-864b-b76199eac333" + } + }, + { + "$id": "2142", + "parameter": { + "$ref": "2129" + }, + "value": { + "$id": "2143", + "kind": "string", + "type": { + "$ref": "2130" + }, + "value": "exampleExperiment" + } + }, + { + "$id": "2144", + "parameter": { + "$ref": "2127" + }, + "value": { + "$id": "2145", + "kind": "string", + "type": { + "$ref": "2128" + }, + "value": "exampleRG" + } + }, + { + "$id": "2146", + "parameter": { + "$ref": "2124" + }, + "value": { + "$id": "2147", + "kind": "string", + "type": { + "$ref": "2125" + }, + "value": "6b052e15-03d3-4f17-b2e1-be7f07588291" + } + } + ], + "responses": [ + { + "$id": "2148", + "response": { + "$ref": "2136" + }, + "statusCode": 200, + "bodyValue": { + "$id": "2149", + "kind": "model", + "type": { + "$ref": "580" + }, + "value": { + "$id": "2150", + "name": { + "$id": "2151", + "kind": "string", + "type": { + "$ref": "91" + }, + "value": "f24500ad-744e-4a26-864b-b76199eac333" + }, + "type": { + "$id": "2152", + "kind": "string", + "type": { + "$ref": "95" + }, + "value": "Microsoft.Chaos/experiments/executions" + }, + "id": { + "$id": "2153", + "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": "2154", + "kind": "model", + "type": { + "$ref": "582" + }, + "value": { + "$id": "2155", + "startedAt": { + "$id": "2156", + "kind": "string", + "type": { + "$ref": "588" + }, + "value": "2020-12-14T21:52:52.2552574Z" + }, + "status": { + "$id": "2157", + "kind": "string", + "type": { + "$ref": "584" + }, + "value": "failed" + }, + "stoppedAt": { + "$id": "2158", + "kind": "string", + "type": { + "$ref": "593" + }, + "value": "2020-12-14T21:56:18.9281956Z" + } + } + } + } + } + } + ] + } + ] + }, + { + "$id": "2159", + "name": "listAllExecutions", + "resourceName": "ExperimentExecution", + "doc": "Get a list of executions of an Experiment resource.", + "accessibility": "public", + "parameters": [ + { + "$id": "2160", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "2161", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "2162", + "type": { + "$id": "2163", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-01-01" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2164", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "2165", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "2166", + "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": "2167", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "2168", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2169", + "name": "experimentName", + "nameInRequest": "experimentName", + "doc": "String that represents a Experiment resource name.", + "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": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "2172", + "kind": "constant", + "valueType": { + "$id": "2173", + "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": "2174", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "599" + }, + "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": "2175", + "itemPropertySegments": [ + "value" + ], + "nextLink": { + "$id": "2176", + "responseSegments": [ + "nextLink" + ], + "responseLocation": "Body" + } + }, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.Chaos.ExperimentExecutions.listAllExecutions", + "decorators": [], + "examples": [ + { + "$id": "2177", + "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": "2178", + "parameter": { + "$ref": "2160" + }, + "value": { + "$id": "2179", + "kind": "string", + "type": { + "$ref": "2161" + }, + "value": "2025-01-01" + } + }, + { + "$id": "2180", + "parameter": { + "$ref": "2169" + }, + "value": { + "$id": "2181", + "kind": "string", + "type": { + "$ref": "2170" + }, + "value": "exampleExperiment" + } + }, + { + "$id": "2182", + "parameter": { + "$ref": "2167" + }, + "value": { + "$id": "2183", + "kind": "string", + "type": { + "$ref": "2168" + }, + "value": "exampleRG" + } + }, + { + "$id": "2184", + "parameter": { + "$ref": "2164" + }, + "value": { + "$id": "2185", + "kind": "string", + "type": { + "$ref": "2165" + }, + "value": "6b052e15-03d3-4f17-b2e1-be7f07588291" + } + } + ], + "responses": [ + { + "$id": "2186", + "response": { + "$ref": "2174" + }, + "statusCode": 200, + "bodyValue": { + "$id": "2187", + "kind": "model", + "type": { + "$ref": "599" + }, + "value": { + "$id": "2188", + "nextLink": { + "$id": "2189", + "kind": "string", + "type": { + "$ref": "605" + }, + "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": "2190", + "kind": "array", + "type": { + "$ref": "601" + }, + "value": [ + { + "$id": "2191", + "kind": "model", + "type": { + "$ref": "580" + }, + "value": { + "$id": "2192", + "name": { + "$id": "2193", + "kind": "string", + "type": { + "$ref": "91" + }, + "value": "f24500ad-744e-4a26-864b-b76199eac333" + }, + "type": { + "$id": "2194", + "kind": "string", + "type": { + "$ref": "95" + }, + "value": "Microsoft.Chaos/experiments/executions" + }, + "id": { + "$id": "2195", + "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": "2196", + "kind": "model", + "type": { + "$ref": "582" + }, + "value": { + "$id": "2197", + "startedAt": { + "$id": "2198", + "kind": "string", + "type": { + "$ref": "588" + }, + "value": "2020-12-14T21:52:52.2552574Z" + }, + "status": { + "$id": "2199", + "kind": "string", + "type": { + "$ref": "584" + }, + "value": "failed" + }, + "stoppedAt": { + "$id": "2200", + "kind": "string", + "type": { + "$ref": "593" + }, + "value": "2020-12-14T21:56:18.9281956Z" + } + } + } + } + }, + { + "$id": "2201", + "kind": "model", + "type": { + "$ref": "580" + }, + "value": { + "$id": "2202", + "name": { + "$id": "2203", + "kind": "string", + "type": { + "$ref": "91" + }, + "value": "14d98367-52ef-4596-be4f-53fc81bbfc33" + }, + "type": { + "$id": "2204", + "kind": "string", + "type": { + "$ref": "95" + }, + "value": "Microsoft.Chaos/experiments/executions" + }, + "id": { + "$id": "2205", + "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": "2206", + "kind": "model", + "type": { + "$ref": "582" + }, + "value": { + "$id": "2207", + "startedAt": { + "$id": "2208", + "kind": "string", + "type": { + "$ref": "588" + }, + "value": "2020-12-14T21:52:52.2552574Z" + }, + "status": { + "$id": "2209", + "kind": "string", + "type": { + "$ref": "584" + }, + "value": "success" + }, + "stoppedAt": { + "$id": "2210", + "kind": "string", + "type": { + "$ref": "593" + }, + "value": "2020-12-14T21:56:18.9281956Z" + } + } + } + } + } + ] + } + } + } + } + ] + } + ] + }, + { + "$id": "2211", + "name": "ExecutionDetails", + "resourceName": "ExperimentExecutions", + "doc": "Execution details of an experiment resource.", + "accessibility": "public", + "parameters": [ + { + "$id": "2212", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "2213", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "2214", + "type": { + "$id": "2215", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-01-01" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2216", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "2217", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "2218", + "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": "2219", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "2220", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2221", + "name": "experimentName", + "nameInRequest": "experimentName", + "doc": "String that represents a Experiment resource name.", + "type": { + "$id": "2222", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2223", + "name": "executionId", + "nameInRequest": "executionId", + "doc": "GUID that represents a Experiment execution detail.", + "type": { + "$id": "2224", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2225", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "2226", + "kind": "constant", + "valueType": { + "$id": "2227", + "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": "2228", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "609" + }, + "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": "2229", + "kind": "http", + "name": "Get experiment execution details.", + "description": "Get experiment execution details.", + "filePath": "2025-01-01/Experiments_ExecutionDetails.json", + "parameters": [ + { + "$id": "2230", + "parameter": { + "$ref": "2212" + }, + "value": { + "$id": "2231", + "kind": "string", + "type": { + "$ref": "2213" + }, + "value": "2025-01-01" + } + }, + { + "$id": "2232", + "parameter": { + "$ref": "2223" + }, + "value": { + "$id": "2233", + "kind": "string", + "type": { + "$ref": "2224" + }, + "value": "f24500ad-744e-4a26-864b-b76199eac333" + } + }, + { + "$id": "2234", + "parameter": { + "$ref": "2221" + }, + "value": { + "$id": "2235", + "kind": "string", + "type": { + "$ref": "2222" + }, + "value": "exampleExperiment" + } + }, + { + "$id": "2236", + "parameter": { + "$ref": "2219" + }, + "value": { + "$id": "2237", + "kind": "string", + "type": { + "$ref": "2220" + }, + "value": "exampleRG" + } + }, + { + "$id": "2238", + "parameter": { + "$ref": "2216" + }, + "value": { + "$id": "2239", + "kind": "string", + "type": { + "$ref": "2217" + }, + "value": "6b052e15-03d3-4f17-b2e1-be7f07588291" + } + } + ], + "responses": [ + { + "$id": "2240", + "response": { + "$ref": "2228" + }, + "statusCode": 200, + "bodyValue": { + "$id": "2241", + "kind": "model", + "type": { + "$ref": "609" + }, + "value": { + "$id": "2242", + "name": { + "$id": "2243", + "kind": "string", + "type": { + "$ref": "619" + }, + "value": "f24500ad-744e-4a26-864b-b76199eac333" + }, + "type": { + "$id": "2244", + "kind": "string", + "type": { + "$ref": "611" + }, + "value": "Microsoft.Chaos/experiments/executions/getExecutionDetails" + }, + "id": { + "$id": "2245", + "kind": "string", + "type": { + "$ref": "615" + }, + "value": "/subscriptions/6b052e15-03d3-4f17-b2e1-be7f07588291/resourceGroups/exampleRG/providers/Microsoft.Chaos/experiments/exampleExperiment/executions/f24500ad-744e-4a26-864b-b76199eac333/getExecutionDetails" + }, + "properties": { + "$id": "2246", + "kind": "model", + "type": { + "$ref": "623" + }, + "value": { + "$id": "2247", + "failureReason": { + "$id": "2248", + "kind": "string", + "type": { + "$ref": "639" + }, + "value": "Dependency failure" + }, + "lastActionAt": { + "$id": "2249", + "kind": "string", + "type": { + "$ref": "643" + }, + "value": "2020-12-14T21:52:52.2552574Z" + }, + "runInformation": { + "$id": "2250", + "kind": "model", + "type": { + "$ref": "648" + }, + "value": { + "$id": "2251", + "steps": { + "$id": "2252", + "kind": "array", + "type": { + "$ref": "650" + }, + "value": [ + { + "$id": "2253", + "kind": "model", + "type": { + "$ref": "651" + }, + "value": { + "$id": "2254", + "branches": { + "$id": "2255", + "kind": "array", + "type": { + "$ref": "665" + }, + "value": [ + { + "$id": "2256", + "kind": "model", + "type": { + "$ref": "666" + }, + "value": { + "$id": "2257", + "actions": { + "$id": "2258", + "kind": "array", + "type": { + "$ref": "680" + }, + "value": [ + { + "$id": "2259", + "kind": "model", + "type": { + "$ref": "681" + }, + "value": { + "$id": "2260", + "actionId": { + "$id": "2261", + "kind": "string", + "type": { + "$ref": "687" + }, + "value": "59499d33-6751-4b6e-a1f6-58f4d56a040a" + }, + "actionName": { + "$id": "2262", + "kind": "string", + "type": { + "$ref": "683" + }, + "value": "urn:provider:agent-v2:Microsoft.Azure.Chaos.Fault.CPUPressureAllProcessors" + }, + "endTime": { + "$id": "2263", + "kind": "string", + "type": { + "$ref": "700" + }, + "value": "2020-12-14T13:56:13.6270153-08:00" + }, + "startTime": { + "$id": "2264", + "kind": "string", + "type": { + "$ref": "695" + }, + "value": "2020-12-14T13:56:13.6270153-08:00" + }, + "status": { + "$id": "2265", + "kind": "string", + "type": { + "$ref": "691" + }, + "value": "failed" + }, + "targets": { + "$id": "2266", + "kind": "array", + "type": { + "$ref": "705" + }, + "value": [ + { + "$id": "2267", + "kind": "model", + "type": { + "$ref": "706" + }, + "value": { + "$id": "2268", + "status": { + "$id": "2269", + "kind": "string", + "type": { + "$ref": "708" + }, + "value": "succeeded" + }, + "target": { + "$id": "2270", + "kind": "string", + "type": { + "$ref": "712" + }, + "value": "/subscriptions/6b052e15-03d3-4f17-b2e1-be7f07588291/resourceGroups/exampleRG/providers/Microsoft.Compute/virtualMachines/VM1" + }, + "targetCompletedTime": { + "$id": "2271", + "kind": "string", + "type": { + "$ref": "721" + }, + "value": "2021-04-02T17:30:55+00:00" + }, + "targetFailedTime": { + "$id": "2272", + "kind": "string", + "type": { + "$ref": "716" + }, + "value": "2021-04-02T16:30:55+00:00" + } + } + }, + { + "$id": "2273", + "kind": "model", + "type": { + "$ref": "706" + }, + "value": { + "$id": "2274", + "status": { + "$id": "2275", + "kind": "string", + "type": { + "$ref": "708" + }, + "value": "failed" + }, + "target": { + "$id": "2276", + "kind": "string", + "type": { + "$ref": "712" + }, + "value": "/subscriptions/6b052e15-03d3-4f17-b2e1-be7f07588291/resourceGroups/exampleRG/providers/Microsoft.Compute/virtualMachines/VM1" + }, + "targetCompletedTime": { + "$id": "2277", + "kind": "string", + "type": { + "$ref": "721" + }, + "value": "2021-04-02T17:30:55+00:00" + }, + "targetFailedTime": { + "$id": "2278", + "kind": "string", + "type": { + "$ref": "716" + }, + "value": "2021-04-02T16:30:55+00:00" + } + } + } + ] + } + } + } + ] + }, + "branchId": { + "$id": "2279", + "kind": "string", + "type": { + "$ref": "672" + }, + "value": "FirstBranch" + }, + "branchName": { + "$id": "2280", + "kind": "string", + "type": { + "$ref": "668" + }, + "value": "FirstBranch" + }, + "status": { + "$id": "2281", + "kind": "string", + "type": { + "$ref": "676" + }, + "value": "failed" + } + } + } + ] + }, + "status": { + "$id": "2282", + "kind": "string", + "type": { + "$ref": "661" + }, + "value": "failed" + }, + "stepId": { + "$id": "2283", + "kind": "string", + "type": { + "$ref": "657" + }, + "value": "FirstStep" + }, + "stepName": { + "$id": "2284", + "kind": "string", + "type": { + "$ref": "653" + }, + "value": "FirstStep" + } + } + } + ] + } + } + }, + "startedAt": { + "$id": "2285", + "kind": "string", + "type": { + "$ref": "629" + }, + "value": "2020-12-14T21:52:52.2552574Z" + }, + "status": { + "$id": "2286", + "kind": "string", + "type": { + "$ref": "625" + }, + "value": "failed" + }, + "stoppedAt": { + "$id": "2287", + "kind": "string", + "type": { + "$ref": "634" + }, + "value": "2020-12-14T21:56:18.9281956Z" + } + } + } + } + } + } + ] + } + ] + } + ], + "parameters": [ + { + "$id": "2288", + "name": "endpoint", + "nameInRequest": "endpoint", + "doc": "Service host", + "type": { + "$id": "2289", + "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": "2290", + "type": { + "$id": "2291", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "https://management.azure.com" + } + } + ], + "decorators": [ + { + "$id": "2292", + "name": "Azure.ResourceManager.@armResourceOperations", + "arguments": { + "$id": "2293" + } + } + ], + "crossLanguageDefinitionId": "Microsoft.Chaos.ExperimentExecutions", + "apiVersions": [ + "2024-11-01-preview", + "2025-01-01" + ], + "parent": { + "$ref": "820" + } + }, + { + "$id": "2294", + "kind": "client", + "name": "TargetTypes", + "namespace": "Azure.ResourceManager.Chaos", + "operations": [ + { + "$id": "2295", + "name": "get", + "resourceName": "TargetType", + "doc": "Get a Target Type resources for given location.", + "accessibility": "public", + "parameters": [ + { + "$id": "2296", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "2297", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "2298", + "type": { + "$id": "2299", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-01-01" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2300", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "2301", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "2302", + "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": "2303", + "name": "location", + "nameInRequest": "location", + "doc": "The name of the Azure region.", + "type": { + "$id": "2304", + "kind": "string", + "name": "azureLocation", + "crossLanguageDefinitionId": "Azure.Core.azureLocation", + "baseType": { + "$id": "2305", + "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": "2306", + "name": "targetTypeName", + "nameInRequest": "targetTypeName", + "doc": "String that represents a Target Type resource name.", + "type": { + "$id": "2307", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2308", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "2309", + "kind": "constant", + "valueType": { + "$id": "2310", + "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": "2311", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "749" + }, + "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": "2312", + "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": "2313", + "parameter": { + "$ref": "2296" + }, + "value": { + "$id": "2314", + "kind": "string", + "type": { + "$ref": "2297" + }, + "value": "2025-01-01" + } + }, + { + "$id": "2315", + "parameter": { + "$ref": "2303" + }, + "value": { + "$id": "2316", + "kind": "string", + "type": { + "$ref": "2304" + }, + "value": "westus2" + } + }, + { + "$id": "2317", + "parameter": { + "$ref": "2300" + }, + "value": { + "$id": "2318", + "kind": "string", + "type": { + "$ref": "2301" + }, + "value": "6b052e15-03d3-4f17-b2e1-be7f07588291" + } + }, + { + "$id": "2319", + "parameter": { + "$ref": "2306" + }, + "value": { + "$id": "2320", + "kind": "string", + "type": { + "$ref": "2307" + }, + "value": "Microsoft-Agent" + } + } + ], + "responses": [ + { + "$id": "2321", + "response": { + "$ref": "2311" + }, + "statusCode": 200, + "bodyValue": { + "$id": "2322", + "kind": "model", + "type": { + "$ref": "749" + }, + "value": { + "$id": "2323", + "name": { + "$id": "2324", + "kind": "string", + "type": { + "$ref": "91" + }, + "value": "Microsoft-Agent" + }, + "type": { + "$id": "2325", + "kind": "string", + "type": { + "$ref": "95" + }, + "value": "Microsoft.Chaos/locations/targetTypes" + }, + "id": { + "$id": "2326", + "kind": "string", + "type": { + "$ref": "86" + }, + "value": "/subscriptions/6b052e15-03d3-4f17-b2e1-be7f07588291/providers/Microsoft.Chaos/locations/westus2/targetTypes/Microsoft-Agent" + }, + "properties": { + "$id": "2327", + "kind": "model", + "type": { + "$ref": "751" + }, + "value": { + "$id": "2328", + "description": { + "$id": "2329", + "kind": "string", + "type": { + "$ref": "757" + }, + "value": "A target represents Chaos Agent." + }, + "displayName": { + "$id": "2330", + "kind": "string", + "type": { + "$ref": "753" + }, + "value": "Chaos Agent" + }, + "propertiesSchema": { + "$id": "2331", + "kind": "string", + "type": { + "$ref": "761" + }, + "value": "https://schema.centralus.chaos-prod.azure.com/targets/Microsoft-VirtualMachine.json" + }, + "resourceTypes": { + "$id": "2332", + "kind": "array", + "type": { + "$ref": "765" + }, + "value": [ + { + "$id": "2333", + "kind": "string", + "type": { + "$ref": "766" + }, + "value": "Microsoft.Compute/virtualMachines" + }, + { + "$id": "2334", + "kind": "string", + "type": { + "$ref": "766" + }, + "value": "Microsoft.Compute/virtualMachineScaleSets" + } + ] + } + } + } + } + } + } + ] + } + ] + }, + { + "$id": "2335", + "name": "list", + "resourceName": "TargetType", + "doc": "Get a list of Target Type resources for given location.", + "accessibility": "public", + "parameters": [ + { + "$id": "2336", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "2337", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "2338", + "type": { + "$id": "2339", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-01-01" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2340", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "2341", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "2342", + "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": "2343", + "name": "location", + "nameInRequest": "location", + "doc": "The name of the Azure region.", + "type": { + "$id": "2344", + "kind": "string", + "name": "azureLocation", + "crossLanguageDefinitionId": "Azure.Core.azureLocation", + "baseType": { + "$id": "2345", + "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": "2346", + "name": "continuationToken", + "nameInRequest": "continuationToken", + "doc": "String that sets the continuation token.", + "type": { + "$id": "2347", + "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": "2348", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "2349", + "kind": "constant", + "valueType": { + "$id": "2350", + "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": "2351", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "771" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "GET", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/providers/Microsoft.Chaos/locations/{location}/targetTypes", + "bufferResponse": true, + "paging": { + "$id": "2352", + "itemPropertySegments": [ + "value" + ], + "nextLink": { + "$id": "2353", + "responseSegments": [ + "nextLink" + ], + "responseLocation": "Body" + } + }, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.Chaos.TargetTypes.list", + "decorators": [], + "examples": [ + { + "$id": "2354", + "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": "2355", + "parameter": { + "$ref": "2336" + }, + "value": { + "$id": "2356", + "kind": "string", + "type": { + "$ref": "2337" + }, + "value": "2025-01-01" + } + }, + { + "$id": "2357", + "parameter": { + "$ref": "2343" + }, + "value": { + "$id": "2358", + "kind": "string", + "type": { + "$ref": "2344" + }, + "value": "westus2" + } + }, + { + "$id": "2359", + "parameter": { + "$ref": "2340" + }, + "value": { + "$id": "2360", + "kind": "string", + "type": { + "$ref": "2341" + }, + "value": "6b052e15-03d3-4f17-b2e1-be7f07588291" + } + } + ], + "responses": [ + { + "$id": "2361", + "response": { + "$ref": "2351" + }, + "statusCode": 200, + "bodyValue": { + "$id": "2362", + "kind": "model", + "type": { + "$ref": "771" + }, + "value": { + "$id": "2363", + "nextLink": { + "$id": "2364", + "kind": "string", + "type": { + "$ref": "777" + }, + "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": "2365", + "kind": "array", + "type": { + "$ref": "773" + }, + "value": [ + { + "$id": "2366", + "kind": "model", + "type": { + "$ref": "749" + }, + "value": { + "$id": "2367", + "name": { + "$id": "2368", + "kind": "string", + "type": { + "$ref": "91" + }, + "value": "Microsoft-Agent" + }, + "type": { + "$id": "2369", + "kind": "string", + "type": { + "$ref": "95" + }, + "value": "Microsoft.Chaos/locations/targetTypes" + }, + "id": { + "$id": "2370", + "kind": "string", + "type": { + "$ref": "86" + }, + "value": "/subscriptions/6b052e15-03d3-4f17-b2e1-be7f07588291/providers/Microsoft.Chaos/locations/westus2/targetTypes/Microsoft-Agent" + }, + "properties": { + "$id": "2371", + "kind": "model", + "type": { + "$ref": "751" + }, + "value": { + "$id": "2372", + "description": { + "$id": "2373", + "kind": "string", + "type": { + "$ref": "757" + }, + "value": "A target represents Chaos Agent." + }, + "displayName": { + "$id": "2374", + "kind": "string", + "type": { + "$ref": "753" + }, + "value": "Chaos Agent" + }, + "propertiesSchema": { + "$id": "2375", + "kind": "string", + "type": { + "$ref": "761" + }, + "value": "https://schema.centralus.chaos-prod.azure.com/targets/Microsoft-VirtualMachine.json" + }, + "resourceTypes": { + "$id": "2376", + "kind": "array", + "type": { + "$ref": "765" + }, + "value": [ + { + "$id": "2377", + "kind": "string", + "type": { + "$ref": "766" + }, + "value": "Microsoft.Compute/virtualMachines" + }, + { + "$id": "2378", + "kind": "string", + "type": { + "$ref": "766" + }, + "value": "Microsoft.Compute/virtualMachineScaleSets" + } + ] + } + } + } + } + } + ] + } + } + } + } + ] + } + ] + } + ], + "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": "Azure.ResourceManager.@armResourceOperations", + "arguments": { + "$id": "2384" + } + } + ], + "crossLanguageDefinitionId": "Microsoft.Chaos.TargetTypes", + "apiVersions": [ + "2024-11-01-preview", + "2025-01-01" + ], + "parent": { + "$ref": "820" + } + }, + { + "$id": "2385", + "kind": "client", + "name": "OperationStatuses", + "namespace": "Azure.ResourceManager.Chaos", + "doc": "Chaos Studio async operation status resource operations.", + "operations": [ + { + "$id": "2386", + "name": "get", + "resourceName": "OperationStatuses", + "doc": "Returns the current status of an async operation.", + "accessibility": "public", + "parameters": [ + { + "$id": "2387", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "2388", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "2389", + "type": { + "$id": "2390", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-01-01" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2391", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "2392", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "2393", + "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": "2394", + "name": "location", + "nameInRequest": "location", + "doc": "The location name.", + "type": { + "$id": "2395", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2396", + "name": "operationId", + "nameInRequest": "operationId", + "doc": "The ID of an ongoing async operation.", + "type": { + "$id": "2397", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2398", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "2399", + "kind": "constant", + "valueType": { + "$id": "2400", + "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": "2401", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "781" + }, + "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": "2402", + "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": "2403", + "parameter": { + "$ref": "2387" + }, + "value": { + "$id": "2404", + "kind": "string", + "type": { + "$ref": "2388" + }, + "value": "2025-01-01" + } + }, + { + "$id": "2405", + "parameter": { + "$ref": "2391" + }, + "value": { + "$id": "2406", + "kind": "string", + "type": { + "$ref": "2392" + }, + "value": "e25c0d12-0335-4fec-8ef8-3b4f9a10649e" + } + }, + { + "$id": "2407", + "parameter": { + "$ref": "2394" + }, + "value": { + "$id": "2408", + "kind": "string", + "type": { + "$ref": "2395" + }, + "value": "westus2" + } + }, + { + "$id": "2409", + "parameter": { + "$ref": "2396" + }, + "value": { + "$id": "2410", + "kind": "string", + "type": { + "$ref": "2397" + }, + "value": "4bdadd97-207c-4de8-9bba-08339ae099c7" + } + } + ], + "responses": [ + { + "$id": "2411", + "response": { + "$ref": "2401" + }, + "statusCode": 200, + "bodyValue": { + "$id": "2412", + "kind": "model", + "type": { + "$ref": "781" + }, + "value": { + "$id": "2413", + "id": { + "$id": "2414", + "kind": "string", + "type": { + "$ref": "783" + }, + "value": "/subscriptions/e25c0d12-0335-4fec-8ef8-3b4f9a10649e/providers/Microsoft.Chaos/locations/westus2/operationStatuses/4bdadd97-207c-4de8-9bba-08339ae099c7" + }, + "name": { + "$id": "2415", + "kind": "string", + "type": { + "$ref": "788" + }, + "value": "4bdadd97-207c-4de8-9bba-08339ae099c7" + }, + "startTime": { + "$id": "2416", + "kind": "string", + "type": { + "$ref": "800" + }, + "value": "2024-11-14T21:52:52.2552574Z" + }, + "status": { + "$id": "2417", + "kind": "string", + "type": { + "$ref": "792" + }, + "value": "Creating" + } + } + } + } + ] + } + ] + } + ], + "parameters": [ + { + "$id": "2418", + "name": "endpoint", + "nameInRequest": "endpoint", + "doc": "Service host", + "type": { + "$id": "2419", + "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": "2420", + "type": { + "$id": "2421", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "https://management.azure.com" + } + } + ], + "decorators": [ + { + "$id": "2422", + "name": "Azure.ResourceManager.@armResourceOperations", + "arguments": { + "$id": "2423" + } + } + ], + "crossLanguageDefinitionId": "Microsoft.Chaos.OperationStatuses", + "apiVersions": [ + "2024-11-01-preview", + "2025-01-01" + ], + "parent": { + "$ref": "820" + } + } + ] + } + ], + "auth": { + "$id": "2424", + "oAuth2": { + "$id": "2425", + "scopes": [ + "user_impersonation" + ] + } + } +} diff --git a/sdk/commonedgesitemanageroperations/Azure.ResourceManager.CommonEdgeSiteManagerOperations/Azure.ResourceManager.CommonEdgeSiteManagerOperations.sln b/sdk/commonedgesitemanageroperations/Azure.ResourceManager.CommonEdgeSiteManagerOperations/Azure.ResourceManager.CommonEdgeSiteManagerOperations.sln new file mode 100644 index 000000000000..3febeda1d79a --- /dev/null +++ b/sdk/commonedgesitemanageroperations/Azure.ResourceManager.CommonEdgeSiteManagerOperations/Azure.ResourceManager.CommonEdgeSiteManagerOperations.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.CommonEdgeSiteManagerOperations.Samples", "samples\Azure.ResourceManager.CommonEdgeSiteManagerOperations.Samples.csproj", "{7A2DFF15-5746-49F4-BD0F-C6C35337088A}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Azure.ResourceManager.CommonEdgeSiteManagerOperations", "src\Azure.ResourceManager.CommonEdgeSiteManagerOperations.csproj", "{28FF4005-4467-4E36-92E7-DEA27DEB1519}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Azure.ResourceManager.CommonEdgeSiteManagerOperations.Tests", "tests\Azure.ResourceManager.CommonEdgeSiteManagerOperations.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/commonedgesitemanageroperations/Azure.ResourceManager.CommonEdgeSiteManagerOperations/CHANGELOG.md b/sdk/commonedgesitemanageroperations/Azure.ResourceManager.CommonEdgeSiteManagerOperations/CHANGELOG.md new file mode 100644 index 000000000000..8b33f0fedccc --- /dev/null +++ b/sdk/commonedgesitemanageroperations/Azure.ResourceManager.CommonEdgeSiteManagerOperations/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/commonedgesitemanageroperations/Azure.ResourceManager.CommonEdgeSiteManagerOperations/Directory.Build.props b/sdk/commonedgesitemanageroperations/Azure.ResourceManager.CommonEdgeSiteManagerOperations/Directory.Build.props new file mode 100644 index 000000000000..63bd836ad44b --- /dev/null +++ b/sdk/commonedgesitemanageroperations/Azure.ResourceManager.CommonEdgeSiteManagerOperations/Directory.Build.props @@ -0,0 +1,6 @@ + + + + diff --git a/sdk/commonedgesitemanageroperations/Azure.ResourceManager.CommonEdgeSiteManagerOperations/README.md b/sdk/commonedgesitemanageroperations/Azure.ResourceManager.CommonEdgeSiteManagerOperations/README.md new file mode 100644 index 000000000000..400d3289e91b --- /dev/null +++ b/sdk/commonedgesitemanageroperations/Azure.ResourceManager.CommonEdgeSiteManagerOperations/README.md @@ -0,0 +1,80 @@ +# Microsoft Azure CommonEdgeSiteManagerOperations 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 CommonEdgeSiteManagerOperations management library for .NET with [NuGet](https://www.nuget.org/): + +```dotnetcli +dotnet add package Azure.ResourceManager.CommonEdgeSiteManagerOperations --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/commonedgesitemanageroperations/Azure.ResourceManager.CommonEdgeSiteManagerOperations/api/Azure.ResourceManager.CommonEdgeSiteManagerOperations.net8.0.cs b/sdk/commonedgesitemanageroperations/Azure.ResourceManager.CommonEdgeSiteManagerOperations/api/Azure.ResourceManager.CommonEdgeSiteManagerOperations.net8.0.cs new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/sdk/commonedgesitemanageroperations/Azure.ResourceManager.CommonEdgeSiteManagerOperations/api/Azure.ResourceManager.CommonEdgeSiteManagerOperations.netstandard2.0.cs b/sdk/commonedgesitemanageroperations/Azure.ResourceManager.CommonEdgeSiteManagerOperations/api/Azure.ResourceManager.CommonEdgeSiteManagerOperations.netstandard2.0.cs new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/sdk/commonedgesitemanageroperations/Azure.ResourceManager.CommonEdgeSiteManagerOperations/assets.json b/sdk/commonedgesitemanageroperations/Azure.ResourceManager.CommonEdgeSiteManagerOperations/assets.json new file mode 100644 index 000000000000..72dd3de501b8 --- /dev/null +++ b/sdk/commonedgesitemanageroperations/Azure.ResourceManager.CommonEdgeSiteManagerOperations/assets.json @@ -0,0 +1,7 @@ + +{ + "AssetsRepo": "Azure/azure-sdk-assets", + "AssetsRepoPrefixPath": "net", + "TagPrefix": "net/commonedgesitemanageroperations/Azure.ResourceManager.CommonEdgeSiteManagerOperations", + "Tag": "" +} diff --git a/sdk/commonedgesitemanageroperations/Azure.ResourceManager.CommonEdgeSiteManagerOperations/samples/Azure.ResourceManager.CommonEdgeSiteManagerOperations.Samples.csproj b/sdk/commonedgesitemanageroperations/Azure.ResourceManager.CommonEdgeSiteManagerOperations/samples/Azure.ResourceManager.CommonEdgeSiteManagerOperations.Samples.csproj new file mode 100644 index 000000000000..3bd0d2c2c204 --- /dev/null +++ b/sdk/commonedgesitemanageroperations/Azure.ResourceManager.CommonEdgeSiteManagerOperations/samples/Azure.ResourceManager.CommonEdgeSiteManagerOperations.Samples.csproj @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/sdk/commonedgesitemanageroperations/Azure.ResourceManager.CommonEdgeSiteManagerOperations/src/Azure.ResourceManager.CommonEdgeSiteManagerOperations.csproj b/sdk/commonedgesitemanageroperations/Azure.ResourceManager.CommonEdgeSiteManagerOperations/src/Azure.ResourceManager.CommonEdgeSiteManagerOperations.csproj new file mode 100644 index 000000000000..734b7f9162de --- /dev/null +++ b/sdk/commonedgesitemanageroperations/Azure.ResourceManager.CommonEdgeSiteManagerOperations/src/Azure.ResourceManager.CommonEdgeSiteManagerOperations.csproj @@ -0,0 +1,8 @@ + + + Azure Resource Manager client SDK for Azure resource provider CommonEdgeSiteManagerOperations. + 1.0.0-beta.1 + azure;management;arm;resource manager;commonedgesitemanageroperations + Azure.ResourceManager.CommonEdgeSiteManagerOperations + + diff --git a/sdk/commonedgesitemanageroperations/Azure.ResourceManager.CommonEdgeSiteManagerOperations/src/Generated/ProviderConstants.cs b/sdk/commonedgesitemanageroperations/Azure.ResourceManager.CommonEdgeSiteManagerOperations/src/Generated/ProviderConstants.cs new file mode 100644 index 000000000000..adf411bd9ea6 --- /dev/null +++ b/sdk/commonedgesitemanageroperations/Azure.ResourceManager.CommonEdgeSiteManagerOperations/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.CommonEdgeSiteManagerOperations +{ + internal static class ProviderConstants + { + public static string DefaultProviderNamespace { get; } = ClientDiagnostics.GetResourceProviderNamespace(typeof(ProviderConstants).Assembly); + } +} diff --git a/sdk/commonedgesitemanageroperations/Azure.ResourceManager.CommonEdgeSiteManagerOperations/src/Properties/AssemblyInfo.cs b/sdk/commonedgesitemanageroperations/Azure.ResourceManager.CommonEdgeSiteManagerOperations/src/Properties/AssemblyInfo.cs new file mode 100644 index 000000000000..7e11c0643466 --- /dev/null +++ b/sdk/commonedgesitemanageroperations/Azure.ResourceManager.CommonEdgeSiteManagerOperations/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.CommonEdgeSiteManagerOperations.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("CommonEdgeSiteManagerOperations")] diff --git a/sdk/commonedgesitemanageroperations/Azure.ResourceManager.CommonEdgeSiteManagerOperations/tests/Azure.ResourceManager.CommonEdgeSiteManagerOperations.Tests.csproj b/sdk/commonedgesitemanageroperations/Azure.ResourceManager.CommonEdgeSiteManagerOperations/tests/Azure.ResourceManager.CommonEdgeSiteManagerOperations.Tests.csproj new file mode 100644 index 000000000000..1efc30b94c13 --- /dev/null +++ b/sdk/commonedgesitemanageroperations/Azure.ResourceManager.CommonEdgeSiteManagerOperations/tests/Azure.ResourceManager.CommonEdgeSiteManagerOperations.Tests.csproj @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/sdk/commonedgesitemanageroperations/Azure.ResourceManager.CommonEdgeSiteManagerOperations/tests/CommonEdgeSiteManagerOperationsManagementTestBase.cs b/sdk/commonedgesitemanageroperations/Azure.ResourceManager.CommonEdgeSiteManagerOperations/tests/CommonEdgeSiteManagerOperationsManagementTestBase.cs new file mode 100644 index 000000000000..2990bf3079ac --- /dev/null +++ b/sdk/commonedgesitemanageroperations/Azure.ResourceManager.CommonEdgeSiteManagerOperations/tests/CommonEdgeSiteManagerOperationsManagementTestBase.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.CommonEdgeSiteManagerOperations.Tests +{ + public class CommonEdgeSiteManagerOperationsManagementTestBase : ManagementRecordedTestBase + { + protected ArmClient Client { get; private set; } + protected SubscriptionResource DefaultSubscription { get; private set; } + + protected CommonEdgeSiteManagerOperationsManagementTestBase(bool isAsync, RecordedTestMode mode) + : base(isAsync, mode) + { + } + + protected CommonEdgeSiteManagerOperationsManagementTestBase(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/commonedgesitemanageroperations/Azure.ResourceManager.CommonEdgeSiteManagerOperations/tests/CommonEdgeSiteManagerOperationsManagementTestEnvironment.cs b/sdk/commonedgesitemanageroperations/Azure.ResourceManager.CommonEdgeSiteManagerOperations/tests/CommonEdgeSiteManagerOperationsManagementTestEnvironment.cs new file mode 100644 index 000000000000..be1d6c3c9e66 --- /dev/null +++ b/sdk/commonedgesitemanageroperations/Azure.ResourceManager.CommonEdgeSiteManagerOperations/tests/CommonEdgeSiteManagerOperationsManagementTestEnvironment.cs @@ -0,0 +1,11 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using Azure.Core.TestFramework; + +namespace Azure.ResourceManager.CommonEdgeSiteManagerOperations.Tests +{ + public class CommonEdgeSiteManagerOperationsManagementTestEnvironment : TestEnvironment + { + } +} diff --git a/sdk/commonedgesitemanageroperations/Azure.ResourceManager.CommonEdgeSiteManagerOperations/tsp-location.yaml b/sdk/commonedgesitemanageroperations/Azure.ResourceManager.CommonEdgeSiteManagerOperations/tsp-location.yaml new file mode 100644 index 000000000000..11d9232228ee --- /dev/null +++ b/sdk/commonedgesitemanageroperations/Azure.ResourceManager.CommonEdgeSiteManagerOperations/tsp-location.yaml @@ -0,0 +1,4 @@ +directory: specification/edge/Microsoft.Edge.Management +commit: 6e702986ee542ebd38d0ab2e2f2c00ab48a50b45 +repo: Azure/azure-rest-api-specs +additionalDirectories: diff --git a/sdk/commonedgesitemanageroperations/ci.mgmt.yml b/sdk/commonedgesitemanageroperations/ci.mgmt.yml new file mode 100644 index 000000000000..da6ca6240b7a --- /dev/null +++ b/sdk/commonedgesitemanageroperations/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/commonedgesitemanageroperations /ci.mgmt.yml + - sdk/commonedgesitemanageroperations /Azure.ResourceManager.CommonEdgeSiteManagerOperations / + + +extends: + template: /eng/pipelines/templates/stages/archetype-sdk-client.yml + parameters: + ServiceDirectory: commonedgesitemanageroperations + ArtifactName: packages + LimitForPullRequest: true + Artifacts: + - name: Azure.ResourceManager.CommonEdgeSiteManagerOperations + safeName: AzureResourceManagerCommonEdgeSiteManagerOperations 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..1c7dec5c5074 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: 6e702986ee542ebd38d0ab2e2f2c00ab48a50b45 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..3222bd6f0a57 --- /dev/null +++ b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/tspCodeModel.json @@ -0,0 +1,37490 @@ +{ + "$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": "property", + "name": "zones", + "serializedName": "zones", + "doc": "Zones in which the Compute Fleet is available", + "type": { + "$id": "1487", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "1488", + "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": "1489", + "json": { + "$id": "1490", + "name": "zones" + } + } + }, + { + "$id": "1491", + "kind": "property", + "name": "identity", + "serializedName": "identity", + "doc": "The managed service identities assigned to this resource.", + "type": { + "$id": "1492", + "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": "1493", + "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": "1494", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "1495", + "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": "1496", + "json": { + "$id": "1497", + "name": "principalId" + } + } + }, + { + "$id": "1498", + "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": "1499", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "1500", + "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": "1501", + "json": { + "$id": "1502", + "name": "tenantId" + } + } + }, + { + "$id": "1503", + "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": "1504", + "json": { + "$id": "1505", + "name": "type" + } + } + }, + { + "$id": "1506", + "kind": "property", + "name": "userAssignedIdentities", + "serializedName": "userAssignedIdentities", + "doc": "The identities assigned to this resource by the user.", + "type": { + "$id": "1507", + "kind": "dict", + "keyType": { + "$id": "1508", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "valueType": { + "$id": "1509", + "kind": "nullable", + "type": { + "$id": "1510", + "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": "1511", + "kind": "property", + "name": "clientId", + "serializedName": "clientId", + "doc": "The client ID of the assigned identity.", + "type": { + "$id": "1512", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "1513", + "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": "1514", + "json": { + "$id": "1515", + "name": "clientId" + } + } + }, + { + "$id": "1516", + "kind": "property", + "name": "principalId", + "serializedName": "principalId", + "doc": "The principal ID of the assigned identity.", + "type": { + "$id": "1517", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "1518", + "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": "1519", + "json": { + "$id": "1520", + "name": "principalId" + } + } + } + ] + }, + "namespace": "Azure.ResourceManager.ComputeFleet" + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ManagedServiceIdentity.userAssignedIdentities", + "serializationOptions": { + "$id": "1521", + "json": { + "$id": "1522", + "name": "userAssignedIdentities" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.Fleet.identity", + "serializationOptions": { + "$id": "1523", + "json": { + "$id": "1524", + "name": "identity" + } + } + }, + { + "$id": "1525", + "kind": "property", + "name": "plan", + "serializedName": "plan", + "doc": "Details of the resource plan.", + "type": { + "$id": "1526", + "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": "1527", + "kind": "property", + "name": "name", + "serializedName": "name", + "doc": "A user defined name of the 3rd Party Artifact that is being procured.", + "type": { + "$id": "1528", + "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": "1529", + "json": { + "$id": "1530", + "name": "name" + } + } + }, + { + "$id": "1531", + "kind": "property", + "name": "publisher", + "serializedName": "publisher", + "doc": "The publisher of the 3rd Party Artifact that is being bought. E.g. NewRelic", + "type": { + "$id": "1532", + "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": "1533", + "json": { + "$id": "1534", + "name": "publisher" + } + } + }, + { + "$id": "1535", + "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": "1536", + "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": "1537", + "json": { + "$id": "1538", + "name": "product" + } + } + }, + { + "$id": "1539", + "kind": "property", + "name": "promotionCode", + "serializedName": "promotionCode", + "doc": "A publisher provided promotion code as provisioned in Data Market for the said product/artifact.", + "type": { + "$id": "1540", + "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": "1541", + "json": { + "$id": "1542", + "name": "promotionCode" + } + } + }, + { + "$id": "1543", + "kind": "property", + "name": "version", + "serializedName": "version", + "doc": "The version of the desired product/artifact.", + "type": { + "$id": "1544", + "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": "1545", + "json": { + "$id": "1546", + "name": "version" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.Fleet.plan", + "serializationOptions": { + "$id": "1547", + "json": { + "$id": "1548", + "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": "1492" + }, + { + "$ref": "1510" + }, + { + "$ref": "1526" + }, + { + "$ref": "430" + }, + { + "$ref": "431" + }, + { + "$ref": "447" + }, + { + "$id": "1549", + "kind": "model", + "name": "FleetUpdate", + "namespace": "Azure.ResourceManager.ComputeFleet", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.FleetUpdate", + "usage": "Input,Json", + "doc": "Fleet Update Model", + "decorators": [], + "properties": [ + { + "$id": "1550", + "kind": "property", + "name": "tags", + "serializedName": "tags", + "doc": "Resource tags.", + "type": { + "$id": "1551", + "kind": "dict", + "keyType": { + "$id": "1552", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "valueType": { + "$id": "1553", + "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": "1554", + "json": { + "$id": "1555", + "name": "tags" + } + } + }, + { + "$id": "1556", + "kind": "property", + "name": "identity", + "serializedName": "identity", + "doc": "Updatable managed service identity", + "type": { + "$id": "1557", + "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": "1558", + "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": "1559", + "json": { + "$id": "1560", + "name": "type" + } + } + }, + { + "$id": "1561", + "kind": "property", + "name": "userAssignedIdentities", + "serializedName": "userAssignedIdentities", + "doc": "The identities assigned to this resource by the user.", + "type": { + "$id": "1562", + "kind": "dict", + "keyType": { + "$id": "1563", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "valueType": { + "$ref": "1509" + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.ManagedServiceIdentityUpdate.userAssignedIdentities", + "serializationOptions": { + "$id": "1564", + "json": { + "$id": "1565", + "name": "userAssignedIdentities" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.FleetUpdate.identity", + "serializationOptions": { + "$id": "1566", + "json": { + "$id": "1567", + "name": "identity" + } + } + }, + { + "$id": "1568", + "kind": "property", + "name": "plan", + "serializedName": "plan", + "doc": "Updatable resource plan", + "type": { + "$id": "1569", + "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": "1570", + "kind": "property", + "name": "name", + "serializedName": "name", + "doc": "A user defined name of the 3rd Party Artifact that is being procured.", + "type": { + "$id": "1571", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.ResourcePlanUpdate.name", + "serializationOptions": { + "$id": "1572", + "json": { + "$id": "1573", + "name": "name" + } + } + }, + { + "$id": "1574", + "kind": "property", + "name": "publisher", + "serializedName": "publisher", + "doc": "The publisher of the 3rd Party Artifact that is being bought. E.g. NewRelic", + "type": { + "$id": "1575", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.ResourcePlanUpdate.publisher", + "serializationOptions": { + "$id": "1576", + "json": { + "$id": "1577", + "name": "publisher" + } + } + }, + { + "$id": "1578", + "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": "1579", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.ResourcePlanUpdate.product", + "serializationOptions": { + "$id": "1580", + "json": { + "$id": "1581", + "name": "product" + } + } + }, + { + "$id": "1582", + "kind": "property", + "name": "promotionCode", + "serializedName": "promotionCode", + "doc": "A publisher provided promotion code as provisioned in Data Market for the said product/artifact.", + "type": { + "$id": "1583", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.ResourcePlanUpdate.promotionCode", + "serializationOptions": { + "$id": "1584", + "json": { + "$id": "1585", + "name": "promotionCode" + } + } + }, + { + "$id": "1586", + "kind": "property", + "name": "version", + "serializedName": "version", + "doc": "The version of the desired product/artifact.", + "type": { + "$id": "1587", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.ResourcePlanUpdate.version", + "serializationOptions": { + "$id": "1588", + "json": { + "$id": "1589", + "name": "version" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.FleetUpdate.plan", + "serializationOptions": { + "$id": "1590", + "json": { + "$id": "1591", + "name": "plan" + } + } + }, + { + "$id": "1592", + "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": "1593", + "json": { + "$id": "1594", + "name": "properties" + } + } + } + ] + }, + { + "$ref": "1557" + }, + { + "$ref": "1569" + }, + { + "$id": "1595", + "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": "1596", + "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": "1597", + "json": { + "$id": "1598", + "name": "status" + } + } + }, + { + "$id": "1599", + "kind": "property", + "name": "name", + "serializedName": "name", + "doc": "The name of the operationStatus resource", + "type": { + "$id": "1600", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.ArmOperationStatus.name", + "serializationOptions": { + "$id": "1601", + "json": { + "$id": "1602", + "name": "name" + } + } + }, + { + "$id": "1603", + "kind": "property", + "name": "startTime", + "serializedName": "startTime", + "doc": "Operation start time", + "type": { + "$id": "1604", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "rfc3339", + "wireType": { + "$id": "1605", + "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": "1606", + "json": { + "$id": "1607", + "name": "startTime" + } + } + }, + { + "$id": "1608", + "kind": "property", + "name": "endTime", + "serializedName": "endTime", + "doc": "Operation complete time", + "type": { + "$id": "1609", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "rfc3339", + "wireType": { + "$id": "1610", + "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": "1611", + "json": { + "$id": "1612", + "name": "endTime" + } + } + }, + { + "$id": "1613", + "kind": "property", + "name": "percentComplete", + "serializedName": "percentComplete", + "doc": "The progress made toward completing the operation", + "type": { + "$id": "1614", + "kind": "float64", + "name": "float64", + "crossLanguageDefinitionId": "TypeSpec.float64", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.ArmOperationStatus.percentComplete", + "serializationOptions": { + "$id": "1615", + "json": { + "$id": "1616", + "name": "percentComplete" + } + } + }, + { + "$id": "1617", + "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": "1618", + "json": { + "$id": "1619", + "name": "error" + } + } + } + ] + }, + { + "$id": "1620", + "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": "1621", + "kind": "property", + "name": "value", + "serializedName": "value", + "doc": "The Fleet items on this page", + "type": { + "$id": "1622", + "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": "1623", + "json": { + "$id": "1624", + "name": "value" + } + } + }, + { + "$id": "1625", + "kind": "property", + "name": "nextLink", + "serializedName": "nextLink", + "doc": "The link to the next page of items", + "type": { + "$id": "1626", + "kind": "url", + "name": "ResourceLocation", + "crossLanguageDefinitionId": "TypeSpec.Rest.ResourceLocation", + "baseType": { + "$id": "1627", + "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": "1628", + "json": { + "$id": "1629", + "name": "nextLink" + } + } + } + ] + }, + { + "$id": "1630", + "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": "1631", + "kind": "property", + "name": "value", + "serializedName": "value", + "doc": "The VirtualMachineScaleSet items on this page", + "type": { + "$id": "1632", + "kind": "array", + "name": "ArrayVirtualMachineScaleSet", + "valueType": { + "$id": "1633", + "kind": "model", + "name": "ComputeFleetVmss", + "namespace": "Azure.ResourceManager.ComputeFleet", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSet", + "usage": "Output,Json", + "doc": "An AzureFleet's virtualMachineScaleSet", + "decorators": [], + "properties": [ + { + "$id": "1634", + "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": "1635", + "kind": "string", + "name": "armResourceIdentifier", + "crossLanguageDefinitionId": "Azure.Core.armResourceIdentifier", + "baseType": { + "$id": "1636", + "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": "1637", + "json": { + "$id": "1638", + "name": "id" + } + } + }, + { + "$id": "1639", + "kind": "property", + "name": "type", + "serializedName": "type", + "doc": "Type of the virtualMachineScaleSet", + "type": { + "$id": "1640", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSet.type", + "serializationOptions": { + "$id": "1641", + "json": { + "$id": "1642", + "name": "type" + } + } + }, + { + "$id": "1643", + "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": "1644", + "json": { + "$id": "1645", + "name": "operationStatus" + } + } + }, + { + "$id": "1646", + "kind": "property", + "name": "error", + "serializedName": "error", + "doc": "Error Information when `operationStatus` is `Failed`", + "type": { + "$id": "1647", + "kind": "model", + "name": "ComputeFleetApiError", + "namespace": "Azure.ResourceManager.ComputeFleet", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.ApiError", + "usage": "Output,Json", + "doc": "ApiError for Fleet", + "decorators": [], + "properties": [ + { + "$id": "1648", + "kind": "property", + "name": "code", + "serializedName": "code", + "doc": "The error code.", + "type": { + "$id": "1649", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.ApiError.code", + "serializationOptions": { + "$id": "1650", + "json": { + "$id": "1651", + "name": "code" + } + } + }, + { + "$id": "1652", + "kind": "property", + "name": "target", + "serializedName": "target", + "doc": "The target of the particular error.", + "type": { + "$id": "1653", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.ApiError.target", + "serializationOptions": { + "$id": "1654", + "json": { + "$id": "1655", + "name": "target" + } + } + }, + { + "$id": "1656", + "kind": "property", + "name": "message", + "serializedName": "message", + "doc": "The error message.", + "type": { + "$id": "1657", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.ApiError.message", + "serializationOptions": { + "$id": "1658", + "json": { + "$id": "1659", + "name": "message" + } + } + }, + { + "$id": "1660", + "kind": "property", + "name": "details", + "serializedName": "details", + "doc": "The API error details", + "type": { + "$id": "1661", + "kind": "array", + "name": "ArrayApiErrorBase", + "valueType": { + "$id": "1662", + "kind": "model", + "name": "ComputeFleetApiErrorInfo", + "namespace": "Azure.ResourceManager.ComputeFleet", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.ApiErrorBase", + "usage": "Output,Json", + "doc": "API error base.", + "decorators": [], + "properties": [ + { + "$id": "1663", + "kind": "property", + "name": "code", + "serializedName": "code", + "doc": "The error code.", + "type": { + "$id": "1664", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.ApiErrorBase.code", + "serializationOptions": { + "$id": "1665", + "json": { + "$id": "1666", + "name": "code" + } + } + }, + { + "$id": "1667", + "kind": "property", + "name": "target", + "serializedName": "target", + "doc": "The target of the particular error.", + "type": { + "$id": "1668", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.ApiErrorBase.target", + "serializationOptions": { + "$id": "1669", + "json": { + "$id": "1670", + "name": "target" + } + } + }, + { + "$id": "1671", + "kind": "property", + "name": "message", + "serializedName": "message", + "doc": "The error message.", + "type": { + "$id": "1672", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.ApiErrorBase.message", + "serializationOptions": { + "$id": "1673", + "json": { + "$id": "1674", + "name": "message" + } + } + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.ApiError.details", + "serializationOptions": { + "$id": "1675", + "json": { + "$id": "1676", + "name": "details" + } + } + }, + { + "$id": "1677", + "kind": "property", + "name": "innererror", + "serializedName": "innererror", + "doc": "The API inner error", + "type": { + "$id": "1678", + "kind": "model", + "name": "ComputeFleetInnerError", + "namespace": "Azure.ResourceManager.ComputeFleet", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.InnerError", + "usage": "Output,Json", + "doc": "Inner error details.", + "decorators": [], + "properties": [ + { + "$id": "1679", + "kind": "property", + "name": "exceptionType", + "serializedName": "exceptionType", + "doc": "The exception type.", + "type": { + "$id": "1680", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.InnerError.exceptionType", + "serializationOptions": { + "$id": "1681", + "json": { + "$id": "1682", + "name": "exceptionType" + } + } + }, + { + "$id": "1683", + "kind": "property", + "name": "errorDetail", + "serializedName": "errorDetail", + "doc": "The internal error message or exception dump.", + "type": { + "$id": "1684", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.InnerError.errorDetail", + "serializationOptions": { + "$id": "1685", + "json": { + "$id": "1686", + "name": "errorDetail" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.ApiError.innererror", + "serializationOptions": { + "$id": "1687", + "json": { + "$id": "1688", + "name": "innererror" + } + } + } + ] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSet.error", + "serializationOptions": { + "$id": "1689", + "json": { + "$id": "1690", + "name": "error" + } + } + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetListResult.value", + "serializationOptions": { + "$id": "1691", + "json": { + "$id": "1692", + "name": "value" + } + } + }, + { + "$id": "1693", + "kind": "property", + "name": "nextLink", + "serializedName": "nextLink", + "doc": "The link to the next page of items", + "type": { + "$id": "1694", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetListResult.nextLink", + "serializationOptions": { + "$id": "1695", + "json": { + "$id": "1696", + "name": "nextLink" + } + } + } + ] + }, + { + "$ref": "1633" + }, + { + "$ref": "1647" + }, + { + "$ref": "1662" + }, + { + "$ref": "1678" + } + ], + "clients": [ + { + "$id": "1697", + "kind": "client", + "name": "AzureFleetClient", + "namespace": "Azure.ResourceManager.ComputeFleet", + "operations": [], + "parameters": [ + { + "$id": "1698", + "name": "endpoint", + "nameInRequest": "endpoint", + "doc": "Service host", + "type": { + "$id": "1699", + "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": "1700", + "type": { + "$id": "1701", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "https://management.azure.com" + } + } + ], + "decorators": [ + { + "$id": "1702", + "name": "TypeSpec.@service", + "arguments": { + "$id": "1703", + "options": { + "$id": "1704", + "title": "Microsoft.AzureFleet" + } + } + } + ], + "crossLanguageDefinitionId": "Microsoft.AzureFleet", + "apiVersions": [ + "2023-11-01-preview", + "2024-05-01-preview", + "2024-11-01" + ], + "children": [ + { + "$id": "1705", + "kind": "client", + "name": "Operations", + "namespace": "Azure.ResourceManager.ComputeFleet", + "operations": [ + { + "$id": "1706", + "name": "list", + "resourceName": "Operations", + "doc": "List the operations for the provider", + "accessibility": "internal", + "parameters": [ + { + "$id": "1707", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "1708", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "1709", + "type": { + "$id": "1710", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2024-11-01" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1711", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "1712", + "kind": "constant", + "valueType": { + "$id": "1713", + "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": "1714", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "350" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "GET", + "uri": "{endpoint}", + "path": "/providers/Microsoft.AzureFleet/operations", + "bufferResponse": true, + "paging": { + "$id": "1715", + "itemPropertySegments": [ + "value" + ], + "nextLink": { + "$id": "1716", + "responseSegments": [ + "nextLink" + ], + "responseLocation": "Body" + } + }, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Azure.ResourceManager.Operations.list", + "decorators": [], + "examples": [ + { + "$id": "1717", + "kind": "http", + "name": "Operations_List", + "description": "Operations_List", + "filePath": "2024-11-01/Operations_List.json", + "parameters": [ + { + "$id": "1718", + "parameter": { + "$ref": "1707" + }, + "value": { + "$id": "1719", + "kind": "string", + "type": { + "$ref": "1708" + }, + "value": "2024-11-01" + } + } + ], + "responses": [ + { + "$id": "1720", + "response": { + "$ref": "1714" + }, + "statusCode": 200, + "bodyValue": { + "$id": "1721", + "kind": "model", + "type": { + "$ref": "350" + }, + "value": { + "$id": "1722", + "value": { + "$id": "1723", + "kind": "array", + "type": { + "$ref": "352" + }, + "value": [ + { + "$id": "1724", + "kind": "model", + "type": { + "$ref": "353" + }, + "value": { + "$id": "1725", + "origin": { + "$id": "1726", + "kind": "string", + "type": { + "$ref": "2" + }, + "value": "user,system" + }, + "name": { + "$id": "1727", + "kind": "string", + "type": { + "$ref": "355" + }, + "value": "Microsoft.AzureFleet/fleets/read" + }, + "isDataAction": { + "$id": "1728", + "kind": "boolean", + "type": { + "$ref": "359" + }, + "value": false + }, + "display": { + "$id": "1729", + "kind": "model", + "type": { + "$ref": "363" + }, + "value": { + "$id": "1730", + "provider": { + "$id": "1731", + "kind": "string", + "type": { + "$ref": "365" + }, + "value": "Microsoft Azure Fleet" + }, + "resource": { + "$id": "1732", + "kind": "string", + "type": { + "$ref": "369" + }, + "value": "Fleets" + }, + "operation": { + "$id": "1733", + "kind": "string", + "type": { + "$ref": "373" + }, + "value": "Get Azure Fleet" + }, + "description": { + "$id": "1734", + "kind": "string", + "type": { + "$ref": "377" + }, + "value": "Get properties of Azure Fleet resource" + } + } + } + } + }, + { + "$id": "1735", + "kind": "model", + "type": { + "$ref": "353" + }, + "value": { + "$id": "1736", + "origin": { + "$id": "1737", + "kind": "string", + "type": { + "$ref": "2" + }, + "value": "user,system" + }, + "name": { + "$id": "1738", + "kind": "string", + "type": { + "$ref": "355" + }, + "value": "Microsoft.AzureFleet/fleets/write" + }, + "isDataAction": { + "$id": "1739", + "kind": "boolean", + "type": { + "$ref": "359" + }, + "value": false + }, + "display": { + "$id": "1740", + "kind": "model", + "type": { + "$ref": "363" + }, + "value": { + "$id": "1741", + "provider": { + "$id": "1742", + "kind": "string", + "type": { + "$ref": "365" + }, + "value": "Microsoft Azure Fleet" + }, + "resource": { + "$id": "1743", + "kind": "string", + "type": { + "$ref": "369" + }, + "value": "Fleets" + }, + "operation": { + "$id": "1744", + "kind": "string", + "type": { + "$ref": "373" + }, + "value": "Create or Update Azure Fleet" + }, + "description": { + "$id": "1745", + "kind": "string", + "type": { + "$ref": "377" + }, + "value": "Creates a new Azure Fleet resource or updates an existing one" + } + } + } + } + }, + { + "$id": "1746", + "kind": "model", + "type": { + "$ref": "353" + }, + "value": { + "$id": "1747", + "origin": { + "$id": "1748", + "kind": "string", + "type": { + "$ref": "2" + }, + "value": "user,system" + }, + "name": { + "$id": "1749", + "kind": "string", + "type": { + "$ref": "355" + }, + "value": "Microsoft.AzureFleet/fleets/delete" + }, + "isDataAction": { + "$id": "1750", + "kind": "boolean", + "type": { + "$ref": "359" + }, + "value": false + }, + "display": { + "$id": "1751", + "kind": "model", + "type": { + "$ref": "363" + }, + "value": { + "$id": "1752", + "provider": { + "$id": "1753", + "kind": "string", + "type": { + "$ref": "365" + }, + "value": "Microsoft Azure Fleet" + }, + "resource": { + "$id": "1754", + "kind": "string", + "type": { + "$ref": "369" + }, + "value": "Fleets" + }, + "operation": { + "$id": "1755", + "kind": "string", + "type": { + "$ref": "373" + }, + "value": "Delete Virtual Machine and Virtual Machine scale sets in a Azure Fleet resource" + }, + "description": { + "$id": "1756", + "kind": "string", + "type": { + "$ref": "377" + }, + "value": "Deletes all compute resources of Azure Fleet resource" + } + } + } + } + }, + { + "$id": "1757", + "kind": "model", + "type": { + "$ref": "353" + }, + "value": { + "$id": "1758", + "origin": { + "$id": "1759", + "kind": "string", + "type": { + "$ref": "2" + }, + "value": "user,system" + }, + "name": { + "$id": "1760", + "kind": "string", + "type": { + "$ref": "355" + }, + "value": "Microsoft.AzureFleet/register/action" + }, + "isDataAction": { + "$id": "1761", + "kind": "boolean", + "type": { + "$ref": "359" + }, + "value": false + }, + "display": { + "$id": "1762", + "kind": "model", + "type": { + "$ref": "363" + }, + "value": { + "$id": "1763", + "provider": { + "$id": "1764", + "kind": "string", + "type": { + "$ref": "365" + }, + "value": "Microsoft Azure Fleet" + }, + "resource": { + "$id": "1765", + "kind": "string", + "type": { + "$ref": "369" + }, + "value": "Subscription" + }, + "operation": { + "$id": "1766", + "kind": "string", + "type": { + "$ref": "373" + }, + "value": "Register subscription for Microsoft.AzureFleet" + }, + "description": { + "$id": "1767", + "kind": "string", + "type": { + "$ref": "377" + }, + "value": "Registers Subscription with Microsoft.AzureFleet resource provider" + } + } + } + } + }, + { + "$id": "1768", + "kind": "model", + "type": { + "$ref": "353" + }, + "value": { + "$id": "1769", + "origin": { + "$id": "1770", + "kind": "string", + "type": { + "$ref": "2" + }, + "value": "user,system" + }, + "name": { + "$id": "1771", + "kind": "string", + "type": { + "$ref": "355" + }, + "value": "Microsoft.AzureFleet/unregister/action" + }, + "isDataAction": { + "$id": "1772", + "kind": "boolean", + "type": { + "$ref": "359" + }, + "value": false + }, + "display": { + "$id": "1773", + "kind": "model", + "type": { + "$ref": "363" + }, + "value": { + "$id": "1774", + "provider": { + "$id": "1775", + "kind": "string", + "type": { + "$ref": "365" + }, + "value": "Microsoft Azure Fleet" + }, + "resource": { + "$id": "1776", + "kind": "string", + "type": { + "$ref": "369" + }, + "value": "Subscription" + }, + "operation": { + "$id": "1777", + "kind": "string", + "type": { + "$ref": "373" + }, + "value": "Unregister Subscription for Microsoft.AzureFleet" + }, + "description": { + "$id": "1778", + "kind": "string", + "type": { + "$ref": "377" + }, + "value": "Unregisters Subscription with Microsoft.AzureFleet resource provider" + } + } + } + } + } + ] + } + } + } + } + ] + } + ] + } + ], + "parameters": [ + { + "$id": "1779", + "name": "endpoint", + "nameInRequest": "endpoint", + "doc": "Service host", + "type": { + "$id": "1780", + "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": "1781", + "type": { + "$id": "1782", + "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": "1697" + } + }, + { + "$id": "1783", + "kind": "client", + "name": "Fleets", + "namespace": "Azure.ResourceManager.ComputeFleet", + "operations": [ + { + "$id": "1784", + "name": "get", + "resourceName": "Fleet", + "doc": "Get a Fleet", + "accessibility": "public", + "parameters": [ + { + "$id": "1785", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "1786", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "1787", + "type": { + "$id": "1788", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2024-11-01" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1789", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "1790", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "1791", + "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": "1792", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "1793", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1794", + "name": "fleetName", + "nameInRequest": "fleetName", + "doc": "The name of the Compute Fleet", + "type": { + "$id": "1795", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1796", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "1797", + "kind": "constant", + "valueType": { + "$id": "1798", + "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": "1799", + "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": "1800", + "kind": "http", + "name": "Fleets_Get", + "description": "Fleets_Get", + "filePath": "2024-11-01/Fleets_Get.json", + "parameters": [ + { + "$id": "1801", + "parameter": { + "$ref": "1785" + }, + "value": { + "$id": "1802", + "kind": "string", + "type": { + "$ref": "1786" + }, + "value": "2024-11-01" + } + }, + { + "$id": "1803", + "parameter": { + "$ref": "1789" + }, + "value": { + "$id": "1804", + "kind": "string", + "type": { + "$ref": "1790" + }, + "value": "1DC2F28C-A625-4B0E-9748-9885A3C9E9EB" + } + }, + { + "$id": "1805", + "parameter": { + "$ref": "1792" + }, + "value": { + "$id": "1806", + "kind": "string", + "type": { + "$ref": "1793" + }, + "value": "rgazurefleet" + } + }, + { + "$id": "1807", + "parameter": { + "$ref": "1794" + }, + "value": { + "$id": "1808", + "kind": "string", + "type": { + "$ref": "1795" + }, + "value": "testFleet" + } + } + ], + "responses": [ + { + "$id": "1809", + "response": { + "$ref": "1799" + }, + "statusCode": 200, + "bodyValue": { + "$id": "1810", + "kind": "model", + "type": { + "$ref": "429" + }, + "value": { + "$id": "1811", + "properties": { + "$id": "1812", + "kind": "model", + "type": { + "$ref": "485" + }, + "value": { + "$id": "1813", + "provisioningState": { + "$id": "1814", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Creating" + }, + "spotPriorityProfile": { + "$id": "1815", + "kind": "model", + "type": { + "$ref": "490" + }, + "value": { + "$id": "1816", + "capacity": { + "$id": "1817", + "kind": "number", + "type": { + "$ref": "492" + }, + "value": 20 + }, + "minCapacity": { + "$id": "1818", + "kind": "number", + "type": { + "$ref": "496" + }, + "value": 10 + }, + "maxPricePerVM": { + "$id": "1819", + "kind": "number", + "type": { + "$ref": "500" + }, + "value": 0.00865 + }, + "evictionPolicy": { + "$id": "1820", + "kind": "string", + "type": { + "$ref": "30" + }, + "value": "Delete" + }, + "allocationStrategy": { + "$id": "1821", + "kind": "string", + "type": { + "$ref": "36" + }, + "value": "PriceCapacityOptimized" + }, + "maintain": { + "$id": "1822", + "kind": "boolean", + "type": { + "$ref": "510" + }, + "value": true + } + } + }, + "regularPriorityProfile": { + "$id": "1823", + "kind": "model", + "type": { + "$ref": "516" + }, + "value": { + "$id": "1824", + "capacity": { + "$id": "1825", + "kind": "number", + "type": { + "$ref": "518" + }, + "value": 20 + }, + "minCapacity": { + "$id": "1826", + "kind": "number", + "type": { + "$ref": "522" + }, + "value": 10 + }, + "allocationStrategy": { + "$id": "1827", + "kind": "string", + "type": { + "$ref": "44" + }, + "value": "LowestPrice" + } + } + }, + "vmSizesProfile": { + "$id": "1828", + "kind": "array", + "type": { + "$ref": "531" + }, + "value": [ + { + "$id": "1829", + "kind": "model", + "type": { + "$ref": "532" + }, + "value": { + "$id": "1830", + "name": { + "$id": "1831", + "kind": "string", + "type": { + "$ref": "534" + }, + "value": "Standard_d1_v2" + }, + "rank": { + "$id": "1832", + "kind": "number", + "type": { + "$ref": "538" + }, + "value": 19225 + } + } + } + ] + }, + "computeProfile": { + "$id": "1833", + "kind": "model", + "type": { + "$ref": "1449" + }, + "value": { + "$id": "1834", + "baseVirtualMachineProfile": { + "$id": "1835", + "kind": "model", + "type": { + "$ref": "644" + }, + "value": { + "$id": "1836", + "osProfile": { + "$id": "1837", + "kind": "model", + "type": { + "$ref": "646" + }, + "value": { + "$id": "1838", + "computerNamePrefix": { + "$id": "1839", + "kind": "string", + "type": { + "$ref": "648" + }, + "value": "o" + }, + "adminUsername": { + "$id": "1840", + "kind": "string", + "type": { + "$ref": "652" + }, + "value": "nrgzqciiaaxjrqldbmjbqkyhntp" + }, + "windowsConfiguration": { + "$id": "1841", + "kind": "model", + "type": { + "$ref": "664" + }, + "value": { + "$id": "1842", + "provisionVMAgent": { + "$id": "1843", + "kind": "boolean", + "type": { + "$ref": "666" + }, + "value": true + }, + "enableAutomaticUpdates": { + "$id": "1844", + "kind": "boolean", + "type": { + "$ref": "670" + }, + "value": true + }, + "timeZone": { + "$id": "1845", + "kind": "string", + "type": { + "$ref": "674" + }, + "value": "hlyjiqcfksgrpjrct" + }, + "additionalUnattendContent": { + "$id": "1846", + "kind": "array", + "type": { + "$ref": "678" + }, + "value": [ + { + "$id": "1847", + "kind": "model", + "type": { + "$ref": "679" + }, + "value": { + "$id": "1848", + "passName": { + "$id": "1849", + "kind": "string", + "type": { + "$ref": "681" + }, + "value": "OobeSystem" + }, + "componentName": { + "$id": "1850", + "kind": "string", + "type": { + "$ref": "685" + }, + "value": "Microsoft-Windows-Shell-Setup" + }, + "settingName": { + "$id": "1851", + "kind": "string", + "type": { + "$ref": "116" + }, + "value": "AutoLogon" + } + } + } + ] + }, + "patchSettings": { + "$id": "1852", + "kind": "model", + "type": { + "$ref": "698" + }, + "value": { + "$id": "1853", + "patchMode": { + "$id": "1854", + "kind": "string", + "type": { + "$ref": "122" + }, + "value": "Manual" + }, + "enableHotpatching": { + "$id": "1855", + "kind": "boolean", + "type": { + "$ref": "703" + }, + "value": true + }, + "assessmentMode": { + "$id": "1856", + "kind": "string", + "type": { + "$ref": "130" + }, + "value": "ImageDefault" + }, + "automaticByPlatformSettings": { + "$id": "1857", + "kind": "model", + "type": { + "$ref": "710" + }, + "value": { + "$id": "1858", + "rebootSetting": { + "$id": "1859", + "kind": "string", + "type": { + "$ref": "136" + }, + "value": "Unknown" + }, + "bypassPlatformSafetyChecksOnUserSchedule": { + "$id": "1860", + "kind": "boolean", + "type": { + "$ref": "715" + }, + "value": true + } + } + } + } + }, + "winRM": { + "$id": "1861", + "kind": "model", + "type": { + "$ref": "723" + }, + "value": { + "$id": "1862", + "listeners": { + "$id": "1863", + "kind": "array", + "type": { + "$ref": "725" + }, + "value": [ + { + "$id": "1864", + "kind": "model", + "type": { + "$ref": "726" + }, + "value": { + "$id": "1865", + "protocol": { + "$id": "1866", + "kind": "string", + "type": { + "$ref": "146" + }, + "value": "Http" + }, + "certificateUrl": { + "$id": "1867", + "kind": "string", + "type": { + "$ref": "731" + }, + "value": "https://myVaultName.vault.azure.net/secrets/myCertName" + } + } + } + ] + } + } + }, + "enableVMAgentPlatformUpdates": { + "$id": "1868", + "kind": "boolean", + "type": { + "$ref": "739" + }, + "value": true + } + } + }, + "linuxConfiguration": { + "$id": "1869", + "kind": "model", + "type": { + "$ref": "745" + }, + "value": { + "$id": "1870", + "disablePasswordAuthentication": { + "$id": "1871", + "kind": "boolean", + "type": { + "$ref": "747" + }, + "value": true + }, + "ssh": { + "$id": "1872", + "kind": "model", + "type": { + "$ref": "751" + }, + "value": { + "$id": "1873", + "publicKeys": { + "$id": "1874", + "kind": "array", + "type": { + "$ref": "753" + }, + "value": [ + { + "$id": "1875", + "kind": "model", + "type": { + "$ref": "754" + }, + "value": { + "$id": "1876", + "path": { + "$id": "1877", + "kind": "string", + "type": { + "$ref": "756" + }, + "value": "kmqz" + }, + "keyData": { + "$id": "1878", + "kind": "string", + "type": { + "$ref": "760" + }, + "value": "kivgsubusvpprwqaqpjcmhsv" + } + } + } + ] + } + } + }, + "provisionVMAgent": { + "$id": "1879", + "kind": "boolean", + "type": { + "$ref": "768" + }, + "value": true + }, + "patchSettings": { + "$id": "1880", + "kind": "model", + "type": { + "$ref": "772" + }, + "value": { + "$id": "1881", + "patchMode": { + "$id": "1882", + "kind": "string", + "type": { + "$ref": "152" + }, + "value": "ImageDefault" + }, + "assessmentMode": { + "$id": "1883", + "kind": "string", + "type": { + "$ref": "158" + }, + "value": "ImageDefault" + }, + "automaticByPlatformSettings": { + "$id": "1884", + "kind": "model", + "type": { + "$ref": "780" + }, + "value": { + "$id": "1885", + "rebootSetting": { + "$id": "1886", + "kind": "string", + "type": { + "$ref": "164" + }, + "value": "Unknown" + }, + "bypassPlatformSafetyChecksOnUserSchedule": { + "$id": "1887", + "kind": "boolean", + "type": { + "$ref": "785" + }, + "value": true + } + } + } + } + }, + "enableVMAgentPlatformUpdates": { + "$id": "1888", + "kind": "boolean", + "type": { + "$ref": "793" + }, + "value": true + } + } + }, + "secrets": { + "$id": "1889", + "kind": "array", + "type": { + "$ref": "799" + }, + "value": [ + { + "$id": "1890", + "kind": "model", + "type": { + "$ref": "800" + }, + "value": { + "$id": "1891", + "sourceVault": { + "$id": "1892", + "kind": "model", + "type": { + "$ref": "802" + }, + "value": { + "$id": "1893", + "id": { + "$id": "1894", + "kind": "string", + "type": { + "$ref": "804" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}" + } + } + }, + "vaultCertificates": { + "$id": "1895", + "kind": "array", + "type": { + "$ref": "811" + }, + "value": [ + { + "$id": "1896", + "kind": "model", + "type": { + "$ref": "812" + }, + "value": { + "$id": "1897", + "certificateUrl": { + "$id": "1898", + "kind": "string", + "type": { + "$ref": "814" + }, + "value": "https://myVaultName.vault.azure.net/secrets/myCertName" + }, + "certificateStore": { + "$id": "1899", + "kind": "string", + "type": { + "$ref": "818" + }, + "value": "nlxrwavpzhueffxsshlun" + } + } + } + ] + } + } + } + ] + }, + "allowExtensionOperations": { + "$id": "1900", + "kind": "boolean", + "type": { + "$ref": "826" + }, + "value": true + }, + "requireGuestProvisionSignal": { + "$id": "1901", + "kind": "boolean", + "type": { + "$ref": "830" + }, + "value": true + } + } + }, + "storageProfile": { + "$id": "1902", + "kind": "model", + "type": { + "$ref": "836" + }, + "value": { + "$id": "1903", + "imageReference": { + "$id": "1904", + "kind": "model", + "type": { + "$ref": "838" + }, + "value": { + "$id": "1905", + "publisher": { + "$id": "1906", + "kind": "string", + "type": { + "$ref": "845" + }, + "value": "mqxgwbiyjzmxavhbkd" + }, + "offer": { + "$id": "1907", + "kind": "string", + "type": { + "$ref": "849" + }, + "value": "isxgumkarlkomp" + }, + "sku": { + "$id": "1908", + "kind": "string", + "type": { + "$ref": "853" + }, + "value": "eojmppqcrnpmxirtp" + }, + "version": { + "$id": "1909", + "kind": "string", + "type": { + "$ref": "857" + }, + "value": "wvpcqefgtmqdgltiuz" + }, + "exactVersion": { + "$id": "1910", + "kind": "string", + "type": { + "$ref": "861" + }, + "value": "zjbntmiskjexlr" + }, + "sharedGalleryImageId": { + "$id": "1911", + "kind": "string", + "type": { + "$ref": "865" + }, + "value": "kmkgihoxwlawuuhcinfirktdwkmx" + }, + "communityGalleryImageId": { + "$id": "1912", + "kind": "string", + "type": { + "$ref": "869" + }, + "value": "vlqe" + }, + "id": { + "$id": "1913", + "kind": "string", + "type": { + "$ref": "840" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images/{imageName}/versions/{versionName}" + } + } + }, + "osDisk": { + "$id": "1914", + "kind": "model", + "type": { + "$ref": "875" + }, + "value": { + "$id": "1915", + "name": { + "$id": "1916", + "kind": "string", + "type": { + "$ref": "877" + }, + "value": "wfttw" + }, + "caching": { + "$id": "1917", + "kind": "string", + "type": { + "$ref": "174" + }, + "value": "None" + }, + "writeAcceleratorEnabled": { + "$id": "1918", + "kind": "boolean", + "type": { + "$ref": "884" + }, + "value": true + }, + "createOption": { + "$id": "1919", + "kind": "string", + "type": { + "$ref": "182" + }, + "value": "FromImage" + }, + "diffDiskSettings": { + "$id": "1920", + "kind": "model", + "type": { + "$ref": "891" + }, + "value": { + "$id": "1921", + "option": { + "$id": "1922", + "kind": "string", + "type": { + "$ref": "194" + }, + "value": "Local" + }, + "placement": { + "$id": "1923", + "kind": "string", + "type": { + "$ref": "198" + }, + "value": "CacheDisk" + } + } + }, + "diskSizeGB": { + "$id": "1924", + "kind": "number", + "type": { + "$ref": "901" + }, + "value": 14 + }, + "osType": { + "$id": "1925", + "kind": "string", + "type": { + "$ref": "206" + }, + "value": "Windows" + }, + "image": { + "$id": "1926", + "kind": "model", + "type": { + "$ref": "908" + }, + "value": { + "$id": "1927", + "uri": { + "$id": "1928", + "kind": "string", + "type": { + "$ref": "910" + }, + "value": "https://myStorageAccountName.blob.core.windows.net/myContainerName/myVhdName.vhd" + } + } + }, + "vhdContainers": { + "$id": "1929", + "kind": "array", + "type": { + "$ref": "916" + }, + "value": [ + { + "$id": "1930", + "kind": "string", + "type": { + "$ref": "917" + }, + "value": "tkzcwddtinkfpnfklatw" + } + ] + }, + "managedDisk": { + "$id": "1931", + "kind": "model", + "type": { + "$ref": "921" + }, + "value": { + "$id": "1932", + "storageAccountType": { + "$id": "1933", + "kind": "string", + "type": { + "$ref": "212" + }, + "value": "Standard_LRS" + }, + "diskEncryptionSet": { + "$id": "1934", + "kind": "model", + "type": { + "$ref": "926" + }, + "value": { + "$id": "1935", + "id": { + "$id": "1936", + "kind": "string", + "type": { + "$ref": "928" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}" + } + } + }, + "securityProfile": { + "$id": "1937", + "kind": "model", + "type": { + "$ref": "935" + }, + "value": { + "$id": "1938", + "securityEncryptionType": { + "$id": "1939", + "kind": "string", + "type": { + "$ref": "228" + }, + "value": "VMGuestStateOnly" + }, + "diskEncryptionSet": { + "$id": "1940", + "kind": "model", + "type": { + "$ref": "926" + }, + "value": { + "$id": "1941", + "id": { + "$id": "1942", + "kind": "string", + "type": { + "$ref": "928" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}" + } + } + } + } + } + } + }, + "deleteOption": { + "$id": "1943", + "kind": "string", + "type": { + "$ref": "236" + }, + "value": "Delete" + } + } + }, + "dataDisks": { + "$id": "1944", + "kind": "array", + "type": { + "$ref": "952" + }, + "value": [ + { + "$id": "1945", + "kind": "model", + "type": { + "$ref": "953" + }, + "value": { + "$id": "1946", + "name": { + "$id": "1947", + "kind": "string", + "type": { + "$ref": "955" + }, + "value": "eogiykmdmeikswxmigjws" + }, + "lun": { + "$id": "1948", + "kind": "number", + "type": { + "$ref": "959" + }, + "value": 14 + }, + "caching": { + "$id": "1949", + "kind": "string", + "type": { + "$ref": "174" + }, + "value": "None" + }, + "writeAcceleratorEnabled": { + "$id": "1950", + "kind": "boolean", + "type": { + "$ref": "966" + }, + "value": true + }, + "createOption": { + "$id": "1951", + "kind": "string", + "type": { + "$ref": "182" + }, + "value": "FromImage" + }, + "diskSizeGB": { + "$id": "1952", + "kind": "number", + "type": { + "$ref": "973" + }, + "value": 6 + }, + "managedDisk": { + "$id": "1953", + "kind": "model", + "type": { + "$ref": "921" + }, + "value": { + "$id": "1954", + "storageAccountType": { + "$id": "1955", + "kind": "string", + "type": { + "$ref": "212" + }, + "value": "Standard_LRS" + }, + "diskEncryptionSet": { + "$id": "1956", + "kind": "model", + "type": { + "$ref": "926" + }, + "value": { + "$id": "1957", + "id": { + "$id": "1958", + "kind": "string", + "type": { + "$ref": "928" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}" + } + } + }, + "securityProfile": { + "$id": "1959", + "kind": "model", + "type": { + "$ref": "935" + }, + "value": { + "$id": "1960", + "securityEncryptionType": { + "$id": "1961", + "kind": "string", + "type": { + "$ref": "228" + }, + "value": "VMGuestStateOnly" + }, + "diskEncryptionSet": { + "$id": "1962", + "kind": "model", + "type": { + "$ref": "926" + }, + "value": { + "$id": "1963", + "id": { + "$id": "1964", + "kind": "string", + "type": { + "$ref": "928" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}" + } + } + } + } + } + } + }, + "diskIOPSReadWrite": { + "$id": "1965", + "kind": "number", + "type": { + "$ref": "980" + }, + "value": 27 + }, + "diskMBpsReadWrite": { + "$id": "1966", + "kind": "number", + "type": { + "$ref": "984" + }, + "value": 2 + }, + "deleteOption": { + "$id": "1967", + "kind": "string", + "type": { + "$ref": "236" + }, + "value": "Delete" + } + } + } + ] + }, + "diskControllerType": { + "$id": "1968", + "kind": "string", + "type": { + "$ref": "242" + }, + "value": "uzb" + } + } + }, + "networkProfile": { + "$id": "1969", + "kind": "model", + "type": { + "$ref": "998" + }, + "value": { + "$id": "1970", + "healthProbe": { + "$id": "1971", + "kind": "model", + "type": { + "$ref": "1000" + }, + "value": { + "$id": "1972", + "id": { + "$id": "1973", + "kind": "string", + "type": { + "$ref": "1002" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/probes/{probeName}" + } + } + }, + "networkInterfaceConfigurations": { + "$id": "1974", + "kind": "array", + "type": { + "$ref": "1009" + }, + "value": [ + { + "$id": "1975", + "kind": "model", + "type": { + "$ref": "1010" + }, + "value": { + "$id": "1976", + "name": { + "$id": "1977", + "kind": "string", + "type": { + "$ref": "1012" + }, + "value": "i" + }, + "properties": { + "$id": "1978", + "kind": "model", + "type": { + "$ref": "1016" + }, + "value": { + "$id": "1979", + "primary": { + "$id": "1980", + "kind": "boolean", + "type": { + "$ref": "1018" + }, + "value": true + }, + "enableAcceleratedNetworking": { + "$id": "1981", + "kind": "boolean", + "type": { + "$ref": "1022" + }, + "value": true + }, + "disableTcpStateTracking": { + "$id": "1982", + "kind": "boolean", + "type": { + "$ref": "1026" + }, + "value": true + }, + "enableFpga": { + "$id": "1983", + "kind": "boolean", + "type": { + "$ref": "1030" + }, + "value": true + }, + "networkSecurityGroup": { + "$id": "1984", + "kind": "model", + "type": { + "$ref": "802" + }, + "value": { + "$id": "1985", + "id": { + "$id": "1986", + "kind": "string", + "type": { + "$ref": "804" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/{networkSecurityGroupName}" + } + } + }, + "dnsSettings": { + "$id": "1987", + "kind": "model", + "type": { + "$ref": "1037" + }, + "value": { + "$id": "1988", + "dnsServers": { + "$id": "1989", + "kind": "array", + "type": { + "$ref": "1039" + }, + "value": [ + { + "$id": "1990", + "kind": "string", + "type": { + "$ref": "1040" + }, + "value": "nxmmfolhclsesu" + } + ] + } + } + }, + "ipConfigurations": { + "$id": "1991", + "kind": "array", + "type": { + "$ref": "1046" + }, + "value": [ + { + "$id": "1992", + "kind": "model", + "type": { + "$ref": "1047" + }, + "value": { + "$id": "1993", + "name": { + "$id": "1994", + "kind": "string", + "type": { + "$ref": "1049" + }, + "value": "oezqhkidfhyywlfzwuotilrpbqnjg" + }, + "properties": { + "$id": "1995", + "kind": "model", + "type": { + "$ref": "1053" + }, + "value": { + "$id": "1996", + "subnet": { + "$id": "1997", + "kind": "model", + "type": { + "$ref": "1000" + }, + "value": { + "$id": "1998", + "id": { + "$id": "1999", + "kind": "string", + "type": { + "$ref": "1002" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}" + } + } + }, + "primary": { + "$id": "2000", + "kind": "boolean", + "type": { + "$ref": "1058" + }, + "value": true + }, + "publicIPAddressConfiguration": { + "$id": "2001", + "kind": "model", + "type": { + "$ref": "1062" + }, + "value": { + "$id": "2002", + "name": { + "$id": "2003", + "kind": "string", + "type": { + "$ref": "1064" + }, + "value": "fvpqf" + }, + "properties": { + "$id": "2004", + "kind": "model", + "type": { + "$ref": "1068" + }, + "value": { + "$id": "2005", + "idleTimeoutInMinutes": { + "$id": "2006", + "kind": "number", + "type": { + "$ref": "1070" + }, + "value": 9 + }, + "dnsSettings": { + "$id": "2007", + "kind": "model", + "type": { + "$ref": "1074" + }, + "value": { + "$id": "2008", + "domainNameLabel": { + "$id": "2009", + "kind": "string", + "type": { + "$ref": "1076" + }, + "value": "ukrddzvmorpmfsczjwtbvp" + }, + "domainNameLabelScope": { + "$id": "2010", + "kind": "string", + "type": { + "$ref": "248" + }, + "value": "TenantReuse" + } + } + }, + "ipTags": { + "$id": "2011", + "kind": "array", + "type": { + "$ref": "1085" + }, + "value": [ + { + "$id": "2012", + "kind": "model", + "type": { + "$ref": "1086" + }, + "value": { + "$id": "2013", + "ipTagType": { + "$id": "2014", + "kind": "string", + "type": { + "$ref": "1088" + }, + "value": "sddgsoemnzgqizale" + }, + "tag": { + "$id": "2015", + "kind": "string", + "type": { + "$ref": "1092" + }, + "value": "wufmhrjsakbiaetyara" + } + } + } + ] + }, + "publicIPPrefix": { + "$id": "2016", + "kind": "model", + "type": { + "$ref": "802" + }, + "value": { + "$id": "2017", + "id": { + "$id": "2018", + "kind": "string", + "type": { + "$ref": "804" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes/{publicIPPrefixName}" + } + } + }, + "publicIPAddressVersion": { + "$id": "2019", + "kind": "string", + "type": { + "$ref": "258" + }, + "value": "IPv4" + }, + "deleteOption": { + "$id": "2020", + "kind": "string", + "type": { + "$ref": "264" + }, + "value": "Delete" + } + } + }, + "sku": { + "$id": "2021", + "kind": "model", + "type": { + "$ref": "1109" + }, + "value": { + "$id": "2022", + "name": { + "$id": "2023", + "kind": "string", + "type": { + "$ref": "270" + }, + "value": "Basic" + }, + "tier": { + "$id": "2024", + "kind": "string", + "type": { + "$ref": "276" + }, + "value": "Regional" + } + } + } + } + }, + "privateIPAddressVersion": { + "$id": "2025", + "kind": "string", + "type": { + "$ref": "258" + }, + "value": "IPv4" + }, + "applicationGatewayBackendAddressPools": { + "$id": "2026", + "kind": "array", + "type": { + "$ref": "1124" + }, + "value": [ + { + "$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/applicationGateways/{applicationGatewayName}/backendAddressPools/{backendAddressPoolName}" + } + } + } + ] + }, + "applicationSecurityGroups": { + "$id": "2030", + "kind": "array", + "type": { + "$ref": "1128" + }, + "value": [ + { + "$id": "2031", + "kind": "model", + "type": { + "$ref": "802" + }, + "value": { + "$id": "2032", + "id": { + "$id": "2033", + "kind": "string", + "type": { + "$ref": "804" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationSecurityGroups/{applicationSecurityGroupName}" + } + } + } + ] + }, + "loadBalancerBackendAddressPools": { + "$id": "2034", + "kind": "array", + "type": { + "$ref": "1132" + }, + "value": [ + { + "$id": "2035", + "kind": "model", + "type": { + "$ref": "802" + }, + "value": { + "$id": "2036", + "id": { + "$id": "2037", + "kind": "string", + "type": { + "$ref": "804" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/backendAddressPools/{backendAddressPoolName}" + } + } + } + ] + }, + "loadBalancerInboundNatPools": { + "$id": "2038", + "kind": "array", + "type": { + "$ref": "1136" + }, + "value": [ + { + "$id": "2039", + "kind": "model", + "type": { + "$ref": "802" + }, + "value": { + "$id": "2040", + "id": { + "$id": "2041", + "kind": "string", + "type": { + "$ref": "804" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/inboundNatPools/{inboundNatPoolName}" + } + } + } + ] + } + } + } + } + } + ] + }, + "enableIPForwarding": { + "$id": "2042", + "kind": "boolean", + "type": { + "$ref": "1144" + }, + "value": true + }, + "deleteOption": { + "$id": "2043", + "kind": "string", + "type": { + "$ref": "264" + }, + "value": "Delete" + }, + "auxiliaryMode": { + "$id": "2044", + "kind": "string", + "type": { + "$ref": "282" + }, + "value": "None" + }, + "auxiliarySku": { + "$id": "2045", + "kind": "string", + "type": { + "$ref": "290" + }, + "value": "None" + } + } + } + } + } + ] + }, + "networkApiVersion": { + "$id": "2046", + "kind": "string", + "type": { + "$ref": "302" + }, + "value": "2020-11-01" + } + } + }, + "securityProfile": { + "$id": "2047", + "kind": "model", + "type": { + "$ref": "1166" + }, + "value": { + "$id": "2048", + "uefiSettings": { + "$id": "2049", + "kind": "model", + "type": { + "$ref": "1168" + }, + "value": { + "$id": "2050", + "secureBootEnabled": { + "$id": "2051", + "kind": "boolean", + "type": { + "$ref": "1170" + }, + "value": true + }, + "vTpmEnabled": { + "$id": "2052", + "kind": "boolean", + "type": { + "$ref": "1174" + }, + "value": true + } + } + }, + "encryptionAtHost": { + "$id": "2053", + "kind": "boolean", + "type": { + "$ref": "1180" + }, + "value": true + }, + "securityType": { + "$id": "2054", + "kind": "string", + "type": { + "$ref": "306" + }, + "value": "TrustedLaunch" + }, + "encryptionIdentity": { + "$id": "2055", + "kind": "model", + "type": { + "$ref": "1187" + }, + "value": { + "$id": "2056", + "userAssignedIdentityResourceId": { + "$id": "2057", + "kind": "string", + "type": { + "$ref": "1189" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{userAssignedIdentityName}" + } + } + }, + "proxyAgentSettings": { + "$id": "2058", + "kind": "model", + "type": { + "$ref": "1196" + }, + "value": { + "$id": "2059", + "enabled": { + "$id": "2060", + "kind": "boolean", + "type": { + "$ref": "1198" + }, + "value": true + }, + "mode": { + "$id": "2061", + "kind": "string", + "type": { + "$ref": "312" + }, + "value": "Audit" + }, + "keyIncarnationId": { + "$id": "2062", + "kind": "number", + "type": { + "$ref": "1205" + }, + "value": 20 + } + } + } + } + }, + "diagnosticsProfile": { + "$id": "2063", + "kind": "model", + "type": { + "$ref": "1213" + }, + "value": { + "$id": "2064", + "bootDiagnostics": { + "$id": "2065", + "kind": "model", + "type": { + "$ref": "1215" + }, + "value": { + "$id": "2066", + "enabled": { + "$id": "2067", + "kind": "boolean", + "type": { + "$ref": "1217" + }, + "value": true + }, + "storageUri": { + "$id": "2068", + "kind": "string", + "type": { + "$ref": "1221" + }, + "value": "http://myStorageAccountName.blob.core.windows.net" + } + } + } + } + }, + "extensionProfile": { + "$id": "2069", + "kind": "model", + "type": { + "$ref": "1229" + }, + "value": { + "$id": "2070", + "extensions": { + "$id": "2071", + "kind": "array", + "type": { + "$ref": "1231" + }, + "value": [ + { + "$id": "2072", + "kind": "model", + "type": { + "$ref": "1232" + }, + "value": { + "$id": "2073", + "name": { + "$id": "2074", + "kind": "string", + "type": { + "$ref": "1239" + }, + "value": "bndxuxx" + }, + "type": { + "$id": "2075", + "kind": "string", + "type": { + "$ref": "1243" + }, + "value": "cmeam" + }, + "properties": { + "$id": "2076", + "kind": "model", + "type": { + "$ref": "1247" + }, + "value": { + "$id": "2077", + "forceUpdateTag": { + "$id": "2078", + "kind": "string", + "type": { + "$ref": "1249" + }, + "value": "yhgxw" + }, + "publisher": { + "$id": "2079", + "kind": "string", + "type": { + "$ref": "1253" + }, + "value": "kpxtirxjfprhs" + }, + "type": { + "$id": "2080", + "kind": "string", + "type": { + "$ref": "1257" + }, + "value": "pgjilctjjwaa" + }, + "typeHandlerVersion": { + "$id": "2081", + "kind": "string", + "type": { + "$ref": "1261" + }, + "value": "zevivcoilxmbwlrihhhibq" + }, + "autoUpgradeMinorVersion": { + "$id": "2082", + "kind": "boolean", + "type": { + "$ref": "1265" + }, + "value": true + }, + "enableAutomaticUpgrade": { + "$id": "2083", + "kind": "boolean", + "type": { + "$ref": "1269" + }, + "value": true + }, + "settings": { + "$id": "2084", + "kind": "dict", + "type": { + "$ref": "1273" + }, + "value": { + "$id": "2085" + } + }, + "provisioningState": { + "$id": "2086", + "kind": "string", + "type": { + "$ref": "1285" + }, + "value": "Succeeded" + }, + "provisionAfterExtensions": { + "$id": "2087", + "kind": "array", + "type": { + "$ref": "1289" + }, + "value": [ + { + "$id": "2088", + "kind": "string", + "type": { + "$ref": "1290" + }, + "value": "nftzosroolbcwmpupujzqwqe" + } + ] + }, + "suppressFailures": { + "$id": "2089", + "kind": "boolean", + "type": { + "$ref": "1294" + }, + "value": true + }, + "protectedSettingsFromKeyVault": { + "$id": "2090", + "kind": "model", + "type": { + "$ref": "1298" + }, + "value": { + "$id": "2091", + "secretUrl": { + "$id": "2092", + "kind": "string", + "type": { + "$ref": "1300" + }, + "value": "https://myVaultName.vault.azure.net/secrets/secret/mySecretName" + }, + "sourceVault": { + "$id": "2093", + "kind": "model", + "type": { + "$ref": "802" + }, + "value": { + "$id": "2094", + "id": { + "$id": "2095", + "kind": "string", + "type": { + "$ref": "804" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}" + } + } + } + } + } + } + }, + "id": { + "$id": "2096", + "kind": "string", + "type": { + "$ref": "1234" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/extensions/{extensionName}" + } + } + } + ] + }, + "extensionsTimeBudget": { + "$id": "2097", + "kind": "string", + "type": { + "$ref": "1313" + }, + "value": "mbhjahtdygwgyszdwjtvlvtgchdwil" + } + } + }, + "licenseType": { + "$id": "2098", + "kind": "string", + "type": { + "$ref": "1319" + }, + "value": "v" + }, + "scheduledEventsProfile": { + "$id": "2099", + "kind": "model", + "type": { + "$ref": "1323" + }, + "value": { + "$id": "2100", + "terminateNotificationProfile": { + "$id": "2101", + "kind": "model", + "type": { + "$ref": "1325" + }, + "value": { + "$id": "2102", + "notBeforeTimeout": { + "$id": "2103", + "kind": "string", + "type": { + "$ref": "1327" + }, + "value": "iljppmmw" + }, + "enable": { + "$id": "2104", + "kind": "boolean", + "type": { + "$ref": "1331" + }, + "value": true + } + } + }, + "osImageNotificationProfile": { + "$id": "2105", + "kind": "model", + "type": { + "$ref": "1337" + }, + "value": { + "$id": "2106", + "notBeforeTimeout": { + "$id": "2107", + "kind": "string", + "type": { + "$ref": "1339" + }, + "value": "olbpadmevekyczfokodtfprxti" + }, + "enable": { + "$id": "2108", + "kind": "boolean", + "type": { + "$ref": "1343" + }, + "value": true + } + } + } + } + }, + "userData": { + "$id": "2109", + "kind": "string", + "type": { + "$ref": "1351" + }, + "value": "s" + }, + "capacityReservation": { + "$id": "2110", + "kind": "model", + "type": { + "$ref": "1355" + }, + "value": { + "$id": "2111", + "capacityReservationGroup": { + "$id": "2112", + "kind": "model", + "type": { + "$ref": "802" + }, + "value": { + "$id": "2113", + "id": { + "$id": "2114", + "kind": "string", + "type": { + "$ref": "804" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/capacityReservationGroups/{capacityReservationGroupName}" + } + } + } + } + }, + "applicationProfile": { + "$id": "2115", + "kind": "model", + "type": { + "$ref": "1362" + }, + "value": { + "$id": "2116", + "galleryApplications": { + "$id": "2117", + "kind": "array", + "type": { + "$ref": "1364" + }, + "value": [ + { + "$id": "2118", + "kind": "model", + "type": { + "$ref": "1365" + }, + "value": { + "$id": "2119", + "tags": { + "$id": "2120", + "kind": "string", + "type": { + "$ref": "1367" + }, + "value": "eyrqjbib" + }, + "order": { + "$id": "2121", + "kind": "number", + "type": { + "$ref": "1371" + }, + "value": 5 + }, + "packageReferenceId": { + "$id": "2122", + "kind": "string", + "type": { + "$ref": "1375" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/applications/{applicationName}/versions/{versionName}" + }, + "treatFailureAsDeploymentFailure": { + "$id": "2123", + "kind": "boolean", + "type": { + "$ref": "1384" + }, + "value": true + }, + "enableAutomaticUpgrade": { + "$id": "2124", + "kind": "boolean", + "type": { + "$ref": "1388" + }, + "value": true + } + } + } + ] + } + } + }, + "hardwareProfile": { + "$id": "2125", + "kind": "model", + "type": { + "$ref": "1396" + }, + "value": { + "$id": "2126", + "vmSizeProperties": { + "$id": "2127", + "kind": "model", + "type": { + "$ref": "1398" + }, + "value": { + "$id": "2128", + "vCPUsAvailable": { + "$id": "2129", + "kind": "number", + "type": { + "$ref": "1400" + }, + "value": 16 + }, + "vCPUsPerCore": { + "$id": "2130", + "kind": "number", + "type": { + "$ref": "1404" + }, + "value": 23 + } + } + } + } + }, + "serviceArtifactReference": { + "$id": "2131", + "kind": "model", + "type": { + "$ref": "1412" + }, + "value": { + "$id": "2132", + "id": { + "$id": "2133", + "kind": "string", + "type": { + "$ref": "1414" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/serviceArtifacts/{serviceArtifactsName}/vmArtifactsProfiles/{vmArtifactsProfileName}" + } + } + }, + "securityPostureReference": { + "$id": "2134", + "kind": "model", + "type": { + "$ref": "1421" + }, + "value": { + "$id": "2135", + "id": { + "$id": "2136", + "kind": "string", + "type": { + "$ref": "1423" + }, + "value": "mubredelfbshboaxrsxiajihahaa" + }, + "excludeExtensions": { + "$id": "2137", + "kind": "array", + "type": { + "$ref": "1427" + }, + "value": [ + { + "$id": "2138", + "kind": "string", + "type": { + "$ref": "1428" + }, + "value": "{securityPostureVMExtensionName}" + } + ] + }, + "isOverridable": { + "$id": "2139", + "kind": "boolean", + "type": { + "$ref": "1432" + }, + "value": true + } + } + }, + "timeCreated": { + "$id": "2140", + "kind": "string", + "type": { + "$ref": "1438" + }, + "value": "2024-04-29T21:51:44.043Z" + } + } + }, + "computeApiVersion": { + "$id": "2141", + "kind": "string", + "type": { + "$ref": "1454" + }, + "value": "2023-07-01" + }, + "platformFaultDomainCount": { + "$id": "2142", + "kind": "number", + "type": { + "$ref": "1458" + }, + "value": 1 + } + } + }, + "timeCreated": { + "$id": "2143", + "kind": "string", + "type": { + "$ref": "1476" + }, + "value": "2024-07-10T00:16:34.8590555+00:00" + }, + "uniqueId": { + "$id": "2144", + "kind": "string", + "type": { + "$ref": "1481" + }, + "value": "a2f7fabd-bbc2-4a20-afe1-49fdb3885a28" + } + } + }, + "zones": { + "$id": "2145", + "kind": "array", + "type": { + "$ref": "1487" + }, + "value": [ + { + "$id": "2146", + "kind": "string", + "type": { + "$ref": "1488" + }, + "value": "zone1" + }, + { + "$id": "2147", + "kind": "string", + "type": { + "$ref": "1488" + }, + "value": "zone2" + } + ] + }, + "identity": { + "$id": "2148", + "kind": "model", + "type": { + "$ref": "1492" + }, + "value": { + "$id": "2149", + "principalId": { + "$id": "2150", + "kind": "string", + "type": { + "$ref": "1494" + }, + "value": "4d508e5b-374b-4382-9a1c-01fb8b6cb37c" + }, + "tenantId": { + "$id": "2151", + "kind": "string", + "type": { + "$ref": "1499" + }, + "value": "5d508e5b-374b-4382-9a1c-01fb8b6cb37c" + }, + "type": { + "$id": "2152", + "kind": "string", + "type": { + "$ref": "318" + }, + "value": "UserAssigned" + }, + "userAssignedIdentities": { + "$id": "2153", + "kind": "dict", + "type": { + "$ref": "1507" + }, + "value": { + "$id": "2154", + "key9851": { + "$id": "2155", + "kind": "model", + "type": { + "$ref": "1510" + }, + "value": { + "$id": "2156", + "principalId": { + "$id": "2157", + "kind": "string", + "type": { + "$ref": "1517" + }, + "value": "6d508e5b-374b-4382-9a1c-01fb8b6cb37c" + }, + "clientId": { + "$id": "2158", + "kind": "string", + "type": { + "$ref": "1512" + }, + "value": "7d508e5b-374b-4382-9a1c-01fb8b6cb37c" + } + } + } + } + } + } + }, + "tags": { + "$id": "2159", + "kind": "dict", + "type": { + "$ref": "475" + }, + "value": { + "$id": "2160", + "key3518": { + "$id": "2161", + "kind": "string", + "type": { + "$ref": "477" + }, + "value": "luvrnuvsgdpbuofdskkcoqhfh" + } + } + }, + "plan": { + "$id": "2162", + "kind": "model", + "type": { + "$ref": "1526" + }, + "value": { + "$id": "2163", + "name": { + "$id": "2164", + "kind": "string", + "type": { + "$ref": "1528" + }, + "value": "jwgrcrnrtfoxn" + }, + "publisher": { + "$id": "2165", + "kind": "string", + "type": { + "$ref": "1532" + }, + "value": "iozjbiqqckqm" + }, + "product": { + "$id": "2166", + "kind": "string", + "type": { + "$ref": "1536" + }, + "value": "cgopbyvdyqikahwyxfpzwaqk" + }, + "promotionCode": { + "$id": "2167", + "kind": "string", + "type": { + "$ref": "1540" + }, + "value": "naglezezplcaruqogtxnuizslqnnbr" + }, + "version": { + "$id": "2168", + "kind": "string", + "type": { + "$ref": "1544" + }, + "value": "wa" + } + } + }, + "location": { + "$id": "2169", + "kind": "string", + "type": { + "$ref": "481" + }, + "value": "westus" + }, + "id": { + "$id": "2170", + "kind": "string", + "type": { + "$ref": "433" + }, + "value": "/subscriptions/7B0CD4DB-3381-4013-9B31-FB6E6FD0FF1C/resourceGroups/rgazurefleet/providers/Microsoft.AzureFleet/fleets/testFleet" + }, + "name": { + "$id": "2171", + "kind": "string", + "type": { + "$ref": "438" + }, + "value": "testFleet" + }, + "type": { + "$id": "2172", + "kind": "string", + "type": { + "$ref": "442" + }, + "value": "Microsoft.AzureFleet/fleets" + }, + "systemData": { + "$id": "2173", + "kind": "model", + "type": { + "$ref": "447" + }, + "value": { + "$id": "2174", + "createdBy": { + "$id": "2175", + "kind": "string", + "type": { + "$ref": "449" + }, + "value": "rowegentrpoajsv" + }, + "createdByType": { + "$id": "2176", + "kind": "string", + "type": { + "$ref": "328" + }, + "value": "User" + }, + "createdAt": { + "$id": "2177", + "kind": "string", + "type": { + "$ref": "456" + }, + "value": "2024-04-29T21:51:44.043Z" + }, + "lastModifiedBy": { + "$id": "2178", + "kind": "string", + "type": { + "$ref": "461" + }, + "value": "edwuayhhaoepxzisfaqjhmrxjq" + }, + "lastModifiedByType": { + "$id": "2179", + "kind": "string", + "type": { + "$ref": "328" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "2180", + "kind": "string", + "type": { + "$ref": "468" + }, + "value": "2024-04-29T21:51:44.043Z" + } + } + } + } + } + } + ] + } + ] + }, + { + "$id": "2181", + "name": "createOrUpdate", + "resourceName": "Fleet", + "doc": "Create a Fleet", + "accessibility": "public", + "parameters": [ + { + "$id": "2182", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "2183", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "2184", + "type": { + "$id": "2185", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2024-11-01" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2186", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "2187", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "2188", + "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": "2189", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "2190", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2191", + "name": "fleetName", + "nameInRequest": "fleetName", + "doc": "The name of the Compute Fleet", + "type": { + "$id": "2192", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2193", + "name": "contentType", + "nameInRequest": "Content-Type", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$id": "2194", + "kind": "constant", + "valueType": { + "$id": "2195", + "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": "2196", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "2197", + "kind": "constant", + "valueType": { + "$id": "2198", + "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": "2199", + "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": "2200", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "429" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + }, + { + "$id": "2201", + "statusCodes": [ + 201 + ], + "bodyType": { + "$ref": "429" + }, + "headers": [ + { + "$id": "2202", + "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": "2203", + "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": "2204", + "finalStateVia": 0, + "finalResponse": { + "$id": "2205", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "429" + } + } + }, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.AzureFleet.Fleets.createOrUpdate", + "decorators": [ + { + "$id": "2206", + "name": "Azure.Core.@useFinalStateVia", + "arguments": { + "$id": "2207", + "finalState": "azure-async-operation" + } + } + ], + "examples": [ + { + "$id": "2208", + "kind": "http", + "name": "Fleets_CreateOrUpdate", + "description": "Fleets_CreateOrUpdate", + "filePath": "2024-11-01/Fleets_CreateOrUpdate.json", + "parameters": [ + { + "$id": "2209", + "parameter": { + "$ref": "2182" + }, + "value": { + "$id": "2210", + "kind": "string", + "type": { + "$ref": "2183" + }, + "value": "2024-11-01" + } + }, + { + "$id": "2211", + "parameter": { + "$ref": "2186" + }, + "value": { + "$id": "2212", + "kind": "string", + "type": { + "$ref": "2187" + }, + "value": "1DC2F28C-A625-4B0E-9748-9885A3C9E9EB" + } + }, + { + "$id": "2213", + "parameter": { + "$ref": "2189" + }, + "value": { + "$id": "2214", + "kind": "string", + "type": { + "$ref": "2190" + }, + "value": "rgazurefleet" + } + }, + { + "$id": "2215", + "parameter": { + "$ref": "2191" + }, + "value": { + "$id": "2216", + "kind": "string", + "type": { + "$ref": "2192" + }, + "value": "testFleet" + } + }, + { + "$id": "2217", + "parameter": { + "$ref": "2199" + }, + "value": { + "$id": "2218", + "kind": "model", + "type": { + "$ref": "429" + }, + "value": { + "$id": "2219", + "properties": { + "$id": "2220", + "kind": "model", + "type": { + "$ref": "485" + }, + "value": { + "$id": "2221", + "spotPriorityProfile": { + "$id": "2222", + "kind": "model", + "type": { + "$ref": "490" + }, + "value": { + "$id": "2223", + "capacity": { + "$id": "2224", + "kind": "number", + "type": { + "$ref": "492" + }, + "value": 20 + }, + "minCapacity": { + "$id": "2225", + "kind": "number", + "type": { + "$ref": "496" + }, + "value": 10 + }, + "maxPricePerVM": { + "$id": "2226", + "kind": "number", + "type": { + "$ref": "500" + }, + "value": 0.00865 + }, + "evictionPolicy": { + "$id": "2227", + "kind": "string", + "type": { + "$ref": "30" + }, + "value": "Delete" + }, + "allocationStrategy": { + "$id": "2228", + "kind": "string", + "type": { + "$ref": "36" + }, + "value": "PriceCapacityOptimized" + }, + "maintain": { + "$id": "2229", + "kind": "boolean", + "type": { + "$ref": "510" + }, + "value": true + } + } + }, + "regularPriorityProfile": { + "$id": "2230", + "kind": "model", + "type": { + "$ref": "516" + }, + "value": { + "$id": "2231", + "capacity": { + "$id": "2232", + "kind": "number", + "type": { + "$ref": "518" + }, + "value": 20 + }, + "minCapacity": { + "$id": "2233", + "kind": "number", + "type": { + "$ref": "522" + }, + "value": 10 + }, + "allocationStrategy": { + "$id": "2234", + "kind": "string", + "type": { + "$ref": "44" + }, + "value": "LowestPrice" + } + } + }, + "vmSizesProfile": { + "$id": "2235", + "kind": "array", + "type": { + "$ref": "531" + }, + "value": [ + { + "$id": "2236", + "kind": "model", + "type": { + "$ref": "532" + }, + "value": { + "$id": "2237", + "name": { + "$id": "2238", + "kind": "string", + "type": { + "$ref": "534" + }, + "value": "Standard_d1_v2" + }, + "rank": { + "$id": "2239", + "kind": "number", + "type": { + "$ref": "538" + }, + "value": 19225 + } + } + } + ] + }, + "computeProfile": { + "$id": "2240", + "kind": "model", + "type": { + "$ref": "1449" + }, + "value": { + "$id": "2241", + "baseVirtualMachineProfile": { + "$id": "2242", + "kind": "model", + "type": { + "$ref": "644" + }, + "value": { + "$id": "2243", + "osProfile": { + "$id": "2244", + "kind": "model", + "type": { + "$ref": "646" + }, + "value": { + "$id": "2245", + "computerNamePrefix": { + "$id": "2246", + "kind": "string", + "type": { + "$ref": "648" + }, + "value": "o" + }, + "adminUsername": { + "$id": "2247", + "kind": "string", + "type": { + "$ref": "652" + }, + "value": "nrgzqciiaaxjrqldbmjbqkyhntp" + }, + "adminPassword": { + "$id": "2248", + "kind": "string", + "type": { + "$ref": "656" + }, + "value": "adfbrdxpv" + }, + "customData": { + "$id": "2249", + "kind": "string", + "type": { + "$ref": "660" + }, + "value": "xjjib" + }, + "windowsConfiguration": { + "$id": "2250", + "kind": "model", + "type": { + "$ref": "664" + }, + "value": { + "$id": "2251", + "provisionVMAgent": { + "$id": "2252", + "kind": "boolean", + "type": { + "$ref": "666" + }, + "value": true + }, + "enableAutomaticUpdates": { + "$id": "2253", + "kind": "boolean", + "type": { + "$ref": "670" + }, + "value": true + }, + "timeZone": { + "$id": "2254", + "kind": "string", + "type": { + "$ref": "674" + }, + "value": "hlyjiqcfksgrpjrct" + }, + "additionalUnattendContent": { + "$id": "2255", + "kind": "array", + "type": { + "$ref": "678" + }, + "value": [ + { + "$id": "2256", + "kind": "model", + "type": { + "$ref": "679" + }, + "value": { + "$id": "2257", + "passName": { + "$id": "2258", + "kind": "string", + "type": { + "$ref": "681" + }, + "value": "OobeSystem" + }, + "componentName": { + "$id": "2259", + "kind": "string", + "type": { + "$ref": "685" + }, + "value": "Microsoft-Windows-Shell-Setup" + }, + "settingName": { + "$id": "2260", + "kind": "string", + "type": { + "$ref": "116" + }, + "value": "AutoLogon" + }, + "content": { + "$id": "2261", + "kind": "string", + "type": { + "$ref": "692" + }, + "value": "bubmqbxjkj" + } + } + } + ] + }, + "patchSettings": { + "$id": "2262", + "kind": "model", + "type": { + "$ref": "698" + }, + "value": { + "$id": "2263", + "patchMode": { + "$id": "2264", + "kind": "string", + "type": { + "$ref": "122" + }, + "value": "Manual" + }, + "enableHotpatching": { + "$id": "2265", + "kind": "boolean", + "type": { + "$ref": "703" + }, + "value": true + }, + "assessmentMode": { + "$id": "2266", + "kind": "string", + "type": { + "$ref": "130" + }, + "value": "ImageDefault" + }, + "automaticByPlatformSettings": { + "$id": "2267", + "kind": "model", + "type": { + "$ref": "710" + }, + "value": { + "$id": "2268", + "rebootSetting": { + "$id": "2269", + "kind": "string", + "type": { + "$ref": "136" + }, + "value": "Unknown" + }, + "bypassPlatformSafetyChecksOnUserSchedule": { + "$id": "2270", + "kind": "boolean", + "type": { + "$ref": "715" + }, + "value": true + } + } + } + } + }, + "winRM": { + "$id": "2271", + "kind": "model", + "type": { + "$ref": "723" + }, + "value": { + "$id": "2272", + "listeners": { + "$id": "2273", + "kind": "array", + "type": { + "$ref": "725" + }, + "value": [ + { + "$id": "2274", + "kind": "model", + "type": { + "$ref": "726" + }, + "value": { + "$id": "2275", + "protocol": { + "$id": "2276", + "kind": "string", + "type": { + "$ref": "146" + }, + "value": "Https" + }, + "certificateUrl": { + "$id": "2277", + "kind": "string", + "type": { + "$ref": "731" + }, + "value": "https://myVaultName.vault.azure.net/secrets/myCertName" + } + } + } + ] + } + } + }, + "enableVMAgentPlatformUpdates": { + "$id": "2278", + "kind": "boolean", + "type": { + "$ref": "739" + }, + "value": true + } + } + }, + "linuxConfiguration": { + "$id": "2279", + "kind": "model", + "type": { + "$ref": "745" + }, + "value": { + "$id": "2280", + "disablePasswordAuthentication": { + "$id": "2281", + "kind": "boolean", + "type": { + "$ref": "747" + }, + "value": true + }, + "ssh": { + "$id": "2282", + "kind": "model", + "type": { + "$ref": "751" + }, + "value": { + "$id": "2283", + "publicKeys": { + "$id": "2284", + "kind": "array", + "type": { + "$ref": "753" + }, + "value": [ + { + "$id": "2285", + "kind": "model", + "type": { + "$ref": "754" + }, + "value": { + "$id": "2286", + "path": { + "$id": "2287", + "kind": "string", + "type": { + "$ref": "756" + }, + "value": "kmqz" + }, + "keyData": { + "$id": "2288", + "kind": "string", + "type": { + "$ref": "760" + }, + "value": "kivgsubusvpprwqaqpjcmhsv" + } + } + } + ] + } + } + }, + "provisionVMAgent": { + "$id": "2289", + "kind": "boolean", + "type": { + "$ref": "768" + }, + "value": true + }, + "patchSettings": { + "$id": "2290", + "kind": "model", + "type": { + "$ref": "772" + }, + "value": { + "$id": "2291", + "patchMode": { + "$id": "2292", + "kind": "string", + "type": { + "$ref": "152" + }, + "value": "ImageDefault" + }, + "assessmentMode": { + "$id": "2293", + "kind": "string", + "type": { + "$ref": "158" + }, + "value": "ImageDefault" + }, + "automaticByPlatformSettings": { + "$id": "2294", + "kind": "model", + "type": { + "$ref": "780" + }, + "value": { + "$id": "2295", + "rebootSetting": { + "$id": "2296", + "kind": "string", + "type": { + "$ref": "164" + }, + "value": "Unknown" + }, + "bypassPlatformSafetyChecksOnUserSchedule": { + "$id": "2297", + "kind": "boolean", + "type": { + "$ref": "785" + }, + "value": true + } + } + } + } + }, + "enableVMAgentPlatformUpdates": { + "$id": "2298", + "kind": "boolean", + "type": { + "$ref": "793" + }, + "value": true + } + } + }, + "secrets": { + "$id": "2299", + "kind": "array", + "type": { + "$ref": "799" + }, + "value": [ + { + "$id": "2300", + "kind": "model", + "type": { + "$ref": "800" + }, + "value": { + "$id": "2301", + "sourceVault": { + "$id": "2302", + "kind": "model", + "type": { + "$ref": "802" + }, + "value": { + "$id": "2303", + "id": { + "$id": "2304", + "kind": "string", + "type": { + "$ref": "804" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}" + } + } + }, + "vaultCertificates": { + "$id": "2305", + "kind": "array", + "type": { + "$ref": "811" + }, + "value": [ + { + "$id": "2306", + "kind": "model", + "type": { + "$ref": "812" + }, + "value": { + "$id": "2307", + "certificateUrl": { + "$id": "2308", + "kind": "string", + "type": { + "$ref": "814" + }, + "value": "https://myVaultName.vault.azure.net/secrets/myCertName" + }, + "certificateStore": { + "$id": "2309", + "kind": "string", + "type": { + "$ref": "818" + }, + "value": "nlxrwavpzhueffxsshlun" + } + } + } + ] + } + } + } + ] + }, + "allowExtensionOperations": { + "$id": "2310", + "kind": "boolean", + "type": { + "$ref": "826" + }, + "value": true + }, + "requireGuestProvisionSignal": { + "$id": "2311", + "kind": "boolean", + "type": { + "$ref": "830" + }, + "value": true + } + } + }, + "storageProfile": { + "$id": "2312", + "kind": "model", + "type": { + "$ref": "836" + }, + "value": { + "$id": "2313", + "imageReference": { + "$id": "2314", + "kind": "model", + "type": { + "$ref": "838" + }, + "value": { + "$id": "2315", + "publisher": { + "$id": "2316", + "kind": "string", + "type": { + "$ref": "845" + }, + "value": "mqxgwbiyjzmxavhbkd" + }, + "offer": { + "$id": "2317", + "kind": "string", + "type": { + "$ref": "849" + }, + "value": "isxgumkarlkomp" + }, + "sku": { + "$id": "2318", + "kind": "string", + "type": { + "$ref": "853" + }, + "value": "eojmppqcrnpmxirtp" + }, + "version": { + "$id": "2319", + "kind": "string", + "type": { + "$ref": "857" + }, + "value": "wvpcqefgtmqdgltiuz" + }, + "sharedGalleryImageId": { + "$id": "2320", + "kind": "string", + "type": { + "$ref": "865" + }, + "value": "kmkgihoxwlawuuhcinfirktdwkmx" + }, + "communityGalleryImageId": { + "$id": "2321", + "kind": "string", + "type": { + "$ref": "869" + }, + "value": "vlqe" + }, + "id": { + "$id": "2322", + "kind": "string", + "type": { + "$ref": "840" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images/{imageName}/versions/{versionName}" + } + } + }, + "osDisk": { + "$id": "2323", + "kind": "model", + "type": { + "$ref": "875" + }, + "value": { + "$id": "2324", + "name": { + "$id": "2325", + "kind": "string", + "type": { + "$ref": "877" + }, + "value": "wfttw" + }, + "caching": { + "$id": "2326", + "kind": "string", + "type": { + "$ref": "174" + }, + "value": "None" + }, + "writeAcceleratorEnabled": { + "$id": "2327", + "kind": "boolean", + "type": { + "$ref": "884" + }, + "value": true + }, + "createOption": { + "$id": "2328", + "kind": "string", + "type": { + "$ref": "182" + }, + "value": "FromImage" + }, + "diffDiskSettings": { + "$id": "2329", + "kind": "model", + "type": { + "$ref": "891" + }, + "value": { + "$id": "2330", + "option": { + "$id": "2331", + "kind": "string", + "type": { + "$ref": "194" + }, + "value": "Local" + }, + "placement": { + "$id": "2332", + "kind": "string", + "type": { + "$ref": "198" + }, + "value": "CacheDisk" + } + } + }, + "diskSizeGB": { + "$id": "2333", + "kind": "number", + "type": { + "$ref": "901" + }, + "value": 14 + }, + "osType": { + "$id": "2334", + "kind": "string", + "type": { + "$ref": "206" + }, + "value": "Windows" + }, + "image": { + "$id": "2335", + "kind": "model", + "type": { + "$ref": "908" + }, + "value": { + "$id": "2336", + "uri": { + "$id": "2337", + "kind": "string", + "type": { + "$ref": "910" + }, + "value": "https://myStorageAccountName.blob.core.windows.net/myContainerName/myVhdName.vhd" + } + } + }, + "vhdContainers": { + "$id": "2338", + "kind": "array", + "type": { + "$ref": "916" + }, + "value": [ + { + "$id": "2339", + "kind": "string", + "type": { + "$ref": "917" + }, + "value": "tkzcwddtinkfpnfklatw" + } + ] + }, + "managedDisk": { + "$id": "2340", + "kind": "model", + "type": { + "$ref": "921" + }, + "value": { + "$id": "2341", + "storageAccountType": { + "$id": "2342", + "kind": "string", + "type": { + "$ref": "212" + }, + "value": "Standard_LRS" + }, + "diskEncryptionSet": { + "$id": "2343", + "kind": "model", + "type": { + "$ref": "926" + }, + "value": { + "$id": "2344", + "id": { + "$id": "2345", + "kind": "string", + "type": { + "$ref": "928" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}" + } + } + }, + "securityProfile": { + "$id": "2346", + "kind": "model", + "type": { + "$ref": "935" + }, + "value": { + "$id": "2347", + "securityEncryptionType": { + "$id": "2348", + "kind": "string", + "type": { + "$ref": "228" + }, + "value": "VMGuestStateOnly" + }, + "diskEncryptionSet": { + "$id": "2349", + "kind": "model", + "type": { + "$ref": "926" + }, + "value": { + "$id": "2350", + "id": { + "$id": "2351", + "kind": "string", + "type": { + "$ref": "928" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}" + } + } + } + } + } + } + }, + "deleteOption": { + "$id": "2352", + "kind": "string", + "type": { + "$ref": "236" + }, + "value": "Delete" + } + } + }, + "dataDisks": { + "$id": "2353", + "kind": "array", + "type": { + "$ref": "952" + }, + "value": [ + { + "$id": "2354", + "kind": "model", + "type": { + "$ref": "953" + }, + "value": { + "$id": "2355", + "name": { + "$id": "2356", + "kind": "string", + "type": { + "$ref": "955" + }, + "value": "eogiykmdmeikswxmigjws" + }, + "lun": { + "$id": "2357", + "kind": "number", + "type": { + "$ref": "959" + }, + "value": 14 + }, + "caching": { + "$id": "2358", + "kind": "string", + "type": { + "$ref": "174" + }, + "value": "None" + }, + "writeAcceleratorEnabled": { + "$id": "2359", + "kind": "boolean", + "type": { + "$ref": "966" + }, + "value": true + }, + "createOption": { + "$id": "2360", + "kind": "string", + "type": { + "$ref": "182" + }, + "value": "FromImage" + }, + "diskSizeGB": { + "$id": "2361", + "kind": "number", + "type": { + "$ref": "973" + }, + "value": 6 + }, + "managedDisk": { + "$id": "2362", + "kind": "model", + "type": { + "$ref": "921" + }, + "value": { + "$id": "2363", + "storageAccountType": { + "$id": "2364", + "kind": "string", + "type": { + "$ref": "212" + }, + "value": "Standard_LRS" + }, + "diskEncryptionSet": { + "$id": "2365", + "kind": "model", + "type": { + "$ref": "926" + }, + "value": { + "$id": "2366", + "id": { + "$id": "2367", + "kind": "string", + "type": { + "$ref": "928" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}" + } + } + }, + "securityProfile": { + "$id": "2368", + "kind": "model", + "type": { + "$ref": "935" + }, + "value": { + "$id": "2369", + "securityEncryptionType": { + "$id": "2370", + "kind": "string", + "type": { + "$ref": "228" + }, + "value": "VMGuestStateOnly" + }, + "diskEncryptionSet": { + "$id": "2371", + "kind": "model", + "type": { + "$ref": "926" + }, + "value": { + "$id": "2372", + "id": { + "$id": "2373", + "kind": "string", + "type": { + "$ref": "928" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}" + } + } + } + } + } + } + }, + "diskIOPSReadWrite": { + "$id": "2374", + "kind": "number", + "type": { + "$ref": "980" + }, + "value": 27 + }, + "diskMBpsReadWrite": { + "$id": "2375", + "kind": "number", + "type": { + "$ref": "984" + }, + "value": 2 + }, + "deleteOption": { + "$id": "2376", + "kind": "string", + "type": { + "$ref": "236" + }, + "value": "Delete" + } + } + } + ] + }, + "diskControllerType": { + "$id": "2377", + "kind": "string", + "type": { + "$ref": "242" + }, + "value": "uzb" + } + } + }, + "networkProfile": { + "$id": "2378", + "kind": "model", + "type": { + "$ref": "998" + }, + "value": { + "$id": "2379", + "healthProbe": { + "$id": "2380", + "kind": "model", + "type": { + "$ref": "1000" + }, + "value": { + "$id": "2381", + "id": { + "$id": "2382", + "kind": "string", + "type": { + "$ref": "1002" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/probes/{probeName}" + } + } + }, + "networkInterfaceConfigurations": { + "$id": "2383", + "kind": "array", + "type": { + "$ref": "1009" + }, + "value": [ + { + "$id": "2384", + "kind": "model", + "type": { + "$ref": "1010" + }, + "value": { + "$id": "2385", + "name": { + "$id": "2386", + "kind": "string", + "type": { + "$ref": "1012" + }, + "value": "i" + }, + "properties": { + "$id": "2387", + "kind": "model", + "type": { + "$ref": "1016" + }, + "value": { + "$id": "2388", + "primary": { + "$id": "2389", + "kind": "boolean", + "type": { + "$ref": "1018" + }, + "value": true + }, + "enableAcceleratedNetworking": { + "$id": "2390", + "kind": "boolean", + "type": { + "$ref": "1022" + }, + "value": true + }, + "disableTcpStateTracking": { + "$id": "2391", + "kind": "boolean", + "type": { + "$ref": "1026" + }, + "value": true + }, + "enableFpga": { + "$id": "2392", + "kind": "boolean", + "type": { + "$ref": "1030" + }, + "value": true + }, + "networkSecurityGroup": { + "$id": "2393", + "kind": "model", + "type": { + "$ref": "802" + }, + "value": { + "$id": "2394", + "id": { + "$id": "2395", + "kind": "string", + "type": { + "$ref": "804" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/{networkSecurityGroupName}" + } + } + }, + "dnsSettings": { + "$id": "2396", + "kind": "model", + "type": { + "$ref": "1037" + }, + "value": { + "$id": "2397", + "dnsServers": { + "$id": "2398", + "kind": "array", + "type": { + "$ref": "1039" + }, + "value": [ + { + "$id": "2399", + "kind": "string", + "type": { + "$ref": "1040" + }, + "value": "nxmmfolhclsesu" + } + ] + } + } + }, + "ipConfigurations": { + "$id": "2400", + "kind": "array", + "type": { + "$ref": "1046" + }, + "value": [ + { + "$id": "2401", + "kind": "model", + "type": { + "$ref": "1047" + }, + "value": { + "$id": "2402", + "name": { + "$id": "2403", + "kind": "string", + "type": { + "$ref": "1049" + }, + "value": "oezqhkidfhyywlfzwuotilrpbqnjg" + }, + "properties": { + "$id": "2404", + "kind": "model", + "type": { + "$ref": "1053" + }, + "value": { + "$id": "2405", + "subnet": { + "$id": "2406", + "kind": "model", + "type": { + "$ref": "1000" + }, + "value": { + "$id": "2407", + "id": { + "$id": "2408", + "kind": "string", + "type": { + "$ref": "1002" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}" + } + } + }, + "primary": { + "$id": "2409", + "kind": "boolean", + "type": { + "$ref": "1058" + }, + "value": true + }, + "publicIPAddressConfiguration": { + "$id": "2410", + "kind": "model", + "type": { + "$ref": "1062" + }, + "value": { + "$id": "2411", + "name": { + "$id": "2412", + "kind": "string", + "type": { + "$ref": "1064" + }, + "value": "fvpqf" + }, + "properties": { + "$id": "2413", + "kind": "model", + "type": { + "$ref": "1068" + }, + "value": { + "$id": "2414", + "idleTimeoutInMinutes": { + "$id": "2415", + "kind": "number", + "type": { + "$ref": "1070" + }, + "value": 9 + }, + "dnsSettings": { + "$id": "2416", + "kind": "model", + "type": { + "$ref": "1074" + }, + "value": { + "$id": "2417", + "domainNameLabel": { + "$id": "2418", + "kind": "string", + "type": { + "$ref": "1076" + }, + "value": "ukrddzvmorpmfsczjwtbvp" + }, + "domainNameLabelScope": { + "$id": "2419", + "kind": "string", + "type": { + "$ref": "248" + }, + "value": "TenantReuse" + } + } + }, + "ipTags": { + "$id": "2420", + "kind": "array", + "type": { + "$ref": "1085" + }, + "value": [ + { + "$id": "2421", + "kind": "model", + "type": { + "$ref": "1086" + }, + "value": { + "$id": "2422", + "ipTagType": { + "$id": "2423", + "kind": "string", + "type": { + "$ref": "1088" + }, + "value": "sddgsoemnzgqizale" + }, + "tag": { + "$id": "2424", + "kind": "string", + "type": { + "$ref": "1092" + }, + "value": "wufmhrjsakbiaetyara" + } + } + } + ] + }, + "publicIPPrefix": { + "$id": "2425", + "kind": "model", + "type": { + "$ref": "802" + }, + "value": { + "$id": "2426", + "id": { + "$id": "2427", + "kind": "string", + "type": { + "$ref": "804" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes/{publicIPPrefixName}" + } + } + }, + "publicIPAddressVersion": { + "$id": "2428", + "kind": "string", + "type": { + "$ref": "258" + }, + "value": "IPv4" + }, + "deleteOption": { + "$id": "2429", + "kind": "string", + "type": { + "$ref": "264" + }, + "value": "Delete" + } + } + }, + "sku": { + "$id": "2430", + "kind": "model", + "type": { + "$ref": "1109" + }, + "value": { + "$id": "2431", + "name": { + "$id": "2432", + "kind": "string", + "type": { + "$ref": "270" + }, + "value": "Basic" + }, + "tier": { + "$id": "2433", + "kind": "string", + "type": { + "$ref": "276" + }, + "value": "Regional" + } + } + } + } + }, + "privateIPAddressVersion": { + "$id": "2434", + "kind": "string", + "type": { + "$ref": "258" + }, + "value": "IPv4" + }, + "applicationGatewayBackendAddressPools": { + "$id": "2435", + "kind": "array", + "type": { + "$ref": "1124" + }, + "value": [ + { + "$id": "2436", + "kind": "model", + "type": { + "$ref": "802" + }, + "value": { + "$id": "2437", + "id": { + "$id": "2438", + "kind": "string", + "type": { + "$ref": "804" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}/backendAddressPools/{backendAddressPoolName}" + } + } + } + ] + }, + "applicationSecurityGroups": { + "$id": "2439", + "kind": "array", + "type": { + "$ref": "1128" + }, + "value": [ + { + "$id": "2440", + "kind": "model", + "type": { + "$ref": "802" + }, + "value": { + "$id": "2441", + "id": { + "$id": "2442", + "kind": "string", + "type": { + "$ref": "804" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationSecurityGroups/{applicationSecurityGroupName}" + } + } + } + ] + }, + "loadBalancerBackendAddressPools": { + "$id": "2443", + "kind": "array", + "type": { + "$ref": "1132" + }, + "value": [ + { + "$id": "2444", + "kind": "model", + "type": { + "$ref": "802" + }, + "value": { + "$id": "2445", + "id": { + "$id": "2446", + "kind": "string", + "type": { + "$ref": "804" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/backendAddressPools/{backendAddressPoolName}" + } + } + } + ] + }, + "loadBalancerInboundNatPools": { + "$id": "2447", + "kind": "array", + "type": { + "$ref": "1136" + }, + "value": [ + { + "$id": "2448", + "kind": "model", + "type": { + "$ref": "802" + }, + "value": { + "$id": "2449", + "id": { + "$id": "2450", + "kind": "string", + "type": { + "$ref": "804" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/inboundNatPools/{inboundNatPoolName}" + } + } + } + ] + } + } + } + } + } + ] + }, + "enableIPForwarding": { + "$id": "2451", + "kind": "boolean", + "type": { + "$ref": "1144" + }, + "value": true + }, + "deleteOption": { + "$id": "2452", + "kind": "string", + "type": { + "$ref": "264" + }, + "value": "Delete" + }, + "auxiliaryMode": { + "$id": "2453", + "kind": "string", + "type": { + "$ref": "282" + }, + "value": "None" + }, + "auxiliarySku": { + "$id": "2454", + "kind": "string", + "type": { + "$ref": "290" + }, + "value": "None" + } + } + } + } + } + ] + }, + "networkApiVersion": { + "$id": "2455", + "kind": "string", + "type": { + "$ref": "302" + }, + "value": "2020-11-01" + } + } + }, + "securityProfile": { + "$id": "2456", + "kind": "model", + "type": { + "$ref": "1166" + }, + "value": { + "$id": "2457", + "uefiSettings": { + "$id": "2458", + "kind": "model", + "type": { + "$ref": "1168" + }, + "value": { + "$id": "2459", + "secureBootEnabled": { + "$id": "2460", + "kind": "boolean", + "type": { + "$ref": "1170" + }, + "value": true + }, + "vTpmEnabled": { + "$id": "2461", + "kind": "boolean", + "type": { + "$ref": "1174" + }, + "value": true + } + } + }, + "encryptionAtHost": { + "$id": "2462", + "kind": "boolean", + "type": { + "$ref": "1180" + }, + "value": true + }, + "securityType": { + "$id": "2463", + "kind": "string", + "type": { + "$ref": "306" + }, + "value": "TrustedLaunch" + }, + "encryptionIdentity": { + "$id": "2464", + "kind": "model", + "type": { + "$ref": "1187" + }, + "value": { + "$id": "2465", + "userAssignedIdentityResourceId": { + "$id": "2466", + "kind": "string", + "type": { + "$ref": "1189" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{userAssignedIdentityName}" + } + } + }, + "proxyAgentSettings": { + "$id": "2467", + "kind": "model", + "type": { + "$ref": "1196" + }, + "value": { + "$id": "2468", + "enabled": { + "$id": "2469", + "kind": "boolean", + "type": { + "$ref": "1198" + }, + "value": true + }, + "mode": { + "$id": "2470", + "kind": "string", + "type": { + "$ref": "312" + }, + "value": "Audit" + }, + "keyIncarnationId": { + "$id": "2471", + "kind": "number", + "type": { + "$ref": "1205" + }, + "value": 20 + } + } + } + } + }, + "diagnosticsProfile": { + "$id": "2472", + "kind": "model", + "type": { + "$ref": "1213" + }, + "value": { + "$id": "2473", + "bootDiagnostics": { + "$id": "2474", + "kind": "model", + "type": { + "$ref": "1215" + }, + "value": { + "$id": "2475", + "enabled": { + "$id": "2476", + "kind": "boolean", + "type": { + "$ref": "1217" + }, + "value": true + }, + "storageUri": { + "$id": "2477", + "kind": "string", + "type": { + "$ref": "1221" + }, + "value": "http://myStorageAccountName.blob.core.windows.net" + } + } + } + } + }, + "extensionProfile": { + "$id": "2478", + "kind": "model", + "type": { + "$ref": "1229" + }, + "value": { + "$id": "2479", + "extensions": { + "$id": "2480", + "kind": "array", + "type": { + "$ref": "1231" + }, + "value": [ + { + "$id": "2481", + "kind": "model", + "type": { + "$ref": "1232" + }, + "value": { + "$id": "2482", + "name": { + "$id": "2483", + "kind": "string", + "type": { + "$ref": "1239" + }, + "value": "bndxuxx" + }, + "properties": { + "$id": "2484", + "kind": "model", + "type": { + "$ref": "1247" + }, + "value": { + "$id": "2485", + "forceUpdateTag": { + "$id": "2486", + "kind": "string", + "type": { + "$ref": "1249" + }, + "value": "yhgxw" + }, + "publisher": { + "$id": "2487", + "kind": "string", + "type": { + "$ref": "1253" + }, + "value": "kpxtirxjfprhs" + }, + "type": { + "$id": "2488", + "kind": "string", + "type": { + "$ref": "1257" + }, + "value": "pgjilctjjwaa" + }, + "typeHandlerVersion": { + "$id": "2489", + "kind": "string", + "type": { + "$ref": "1261" + }, + "value": "zevivcoilxmbwlrihhhibq" + }, + "autoUpgradeMinorVersion": { + "$id": "2490", + "kind": "boolean", + "type": { + "$ref": "1265" + }, + "value": true + }, + "enableAutomaticUpgrade": { + "$id": "2491", + "kind": "boolean", + "type": { + "$ref": "1269" + }, + "value": true + }, + "settings": { + "$id": "2492", + "kind": "dict", + "type": { + "$ref": "1273" + }, + "value": { + "$id": "2493" + } + }, + "protectedSettings": { + "$id": "2494", + "kind": "dict", + "type": { + "$ref": "1279" + }, + "value": { + "$id": "2495" + } + }, + "provisionAfterExtensions": { + "$id": "2496", + "kind": "array", + "type": { + "$ref": "1289" + }, + "value": [ + { + "$id": "2497", + "kind": "string", + "type": { + "$ref": "1290" + }, + "value": "nftzosroolbcwmpupujzqwqe" + } + ] + }, + "suppressFailures": { + "$id": "2498", + "kind": "boolean", + "type": { + "$ref": "1294" + }, + "value": true + }, + "protectedSettingsFromKeyVault": { + "$id": "2499", + "kind": "model", + "type": { + "$ref": "1298" + }, + "value": { + "$id": "2500", + "secretUrl": { + "$id": "2501", + "kind": "string", + "type": { + "$ref": "1300" + }, + "value": "https://myvaultName.vault.azure.net/secrets/secret/mySecretName" + }, + "sourceVault": { + "$id": "2502", + "kind": "model", + "type": { + "$ref": "802" + }, + "value": { + "$id": "2503", + "id": { + "$id": "2504", + "kind": "string", + "type": { + "$ref": "804" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}" + } + } + } + } + } + } + } + } + } + ] + }, + "extensionsTimeBudget": { + "$id": "2505", + "kind": "string", + "type": { + "$ref": "1313" + }, + "value": "mbhjahtdygwgyszdwjtvlvtgchdwil" + } + } + }, + "licenseType": { + "$id": "2506", + "kind": "string", + "type": { + "$ref": "1319" + }, + "value": "v" + }, + "scheduledEventsProfile": { + "$id": "2507", + "kind": "model", + "type": { + "$ref": "1323" + }, + "value": { + "$id": "2508", + "terminateNotificationProfile": { + "$id": "2509", + "kind": "model", + "type": { + "$ref": "1325" + }, + "value": { + "$id": "2510", + "notBeforeTimeout": { + "$id": "2511", + "kind": "string", + "type": { + "$ref": "1327" + }, + "value": "iljppmmw" + }, + "enable": { + "$id": "2512", + "kind": "boolean", + "type": { + "$ref": "1331" + }, + "value": true + } + } + }, + "osImageNotificationProfile": { + "$id": "2513", + "kind": "model", + "type": { + "$ref": "1337" + }, + "value": { + "$id": "2514", + "notBeforeTimeout": { + "$id": "2515", + "kind": "string", + "type": { + "$ref": "1339" + }, + "value": "olbpadmevekyczfokodtfprxti" + }, + "enable": { + "$id": "2516", + "kind": "boolean", + "type": { + "$ref": "1343" + }, + "value": true + } + } + } + } + }, + "userData": { + "$id": "2517", + "kind": "string", + "type": { + "$ref": "1351" + }, + "value": "s" + }, + "capacityReservation": { + "$id": "2518", + "kind": "model", + "type": { + "$ref": "1355" + }, + "value": { + "$id": "2519", + "capacityReservationGroup": { + "$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.Compute/capacityReservationGroups/{capacityReservationGroupName}" + } + } + } + } + }, + "applicationProfile": { + "$id": "2523", + "kind": "model", + "type": { + "$ref": "1362" + }, + "value": { + "$id": "2524", + "galleryApplications": { + "$id": "2525", + "kind": "array", + "type": { + "$ref": "1364" + }, + "value": [ + { + "$id": "2526", + "kind": "model", + "type": { + "$ref": "1365" + }, + "value": { + "$id": "2527", + "tags": { + "$id": "2528", + "kind": "string", + "type": { + "$ref": "1367" + }, + "value": "eyrqjbib" + }, + "order": { + "$id": "2529", + "kind": "number", + "type": { + "$ref": "1371" + }, + "value": 5 + }, + "packageReferenceId": { + "$id": "2530", + "kind": "string", + "type": { + "$ref": "1375" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/applications/{applicationName}/versions/{versionName}" + }, + "configurationReference": { + "$id": "2531", + "kind": "string", + "type": { + "$ref": "1380" + }, + "value": "ulztmiavpojpbpbddgnuuiimxcpau" + }, + "treatFailureAsDeploymentFailure": { + "$id": "2532", + "kind": "boolean", + "type": { + "$ref": "1384" + }, + "value": true + }, + "enableAutomaticUpgrade": { + "$id": "2533", + "kind": "boolean", + "type": { + "$ref": "1388" + }, + "value": true + } + } + } + ] + } + } + }, + "hardwareProfile": { + "$id": "2534", + "kind": "model", + "type": { + "$ref": "1396" + }, + "value": { + "$id": "2535", + "vmSizeProperties": { + "$id": "2536", + "kind": "model", + "type": { + "$ref": "1398" + }, + "value": { + "$id": "2537", + "vCPUsAvailable": { + "$id": "2538", + "kind": "number", + "type": { + "$ref": "1400" + }, + "value": 16 + }, + "vCPUsPerCore": { + "$id": "2539", + "kind": "number", + "type": { + "$ref": "1404" + }, + "value": 23 + } + } + } + } + }, + "serviceArtifactReference": { + "$id": "2540", + "kind": "model", + "type": { + "$ref": "1412" + }, + "value": { + "$id": "2541", + "id": { + "$id": "2542", + "kind": "string", + "type": { + "$ref": "1414" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/serviceArtifacts/{serviceArtifactsName}/vmArtifactsProfiles/{vmArtifactsProfileName}" + } + } + }, + "securityPostureReference": { + "$id": "2543", + "kind": "model", + "type": { + "$ref": "1421" + }, + "value": { + "$id": "2544", + "id": { + "$id": "2545", + "kind": "string", + "type": { + "$ref": "1423" + }, + "value": "/CommunityGalleries/{communityGalleryName}/securityPostures/{securityPostureName}/versions/{major.minor.patch}|{major.*}|latest" + }, + "excludeExtensions": { + "$id": "2546", + "kind": "array", + "type": { + "$ref": "1427" + }, + "value": [ + { + "$id": "2547", + "kind": "string", + "type": { + "$ref": "1428" + }, + "value": "{securityPostureVMExtensionName}" + } + ] + }, + "isOverridable": { + "$id": "2548", + "kind": "boolean", + "type": { + "$ref": "1432" + }, + "value": true + } + } + } + } + }, + "computeApiVersion": { + "$id": "2549", + "kind": "string", + "type": { + "$ref": "1454" + }, + "value": "2023-07-01" + }, + "platformFaultDomainCount": { + "$id": "2550", + "kind": "number", + "type": { + "$ref": "1458" + }, + "value": 1 + } + } + } + } + }, + "zones": { + "$id": "2551", + "kind": "array", + "type": { + "$ref": "1487" + }, + "value": [ + { + "$id": "2552", + "kind": "string", + "type": { + "$ref": "1488" + }, + "value": "zone1" + }, + { + "$id": "2553", + "kind": "string", + "type": { + "$ref": "1488" + }, + "value": "zone2" + } + ] + }, + "identity": { + "$id": "2554", + "kind": "model", + "type": { + "$ref": "1492" + }, + "value": { + "$id": "2555", + "type": { + "$id": "2556", + "kind": "string", + "type": { + "$ref": "318" + }, + "value": "UserAssigned" + }, + "userAssignedIdentities": { + "$id": "2557", + "kind": "dict", + "type": { + "$ref": "1507" + }, + "value": { + "$id": "2558", + "key9851": { + "$id": "2559", + "kind": "model", + "type": { + "$ref": "1510" + }, + "value": { + "$id": "2560" + } + } + } + } + } + }, + "tags": { + "$id": "2561", + "kind": "dict", + "type": { + "$ref": "475" + }, + "value": { + "$id": "2562", + "key3518": { + "$id": "2563", + "kind": "string", + "type": { + "$ref": "477" + }, + "value": "luvrnuvsgdpbuofdskkcoqhfh" + } + } + }, + "location": { + "$id": "2564", + "kind": "string", + "type": { + "$ref": "481" + }, + "value": "westus" + }, + "plan": { + "$id": "2565", + "kind": "model", + "type": { + "$ref": "1526" + }, + "value": { + "$id": "2566", + "name": { + "$id": "2567", + "kind": "string", + "type": { + "$ref": "1528" + }, + "value": "jwgrcrnrtfoxn" + }, + "publisher": { + "$id": "2568", + "kind": "string", + "type": { + "$ref": "1532" + }, + "value": "iozjbiqqckqm" + }, + "product": { + "$id": "2569", + "kind": "string", + "type": { + "$ref": "1536" + }, + "value": "cgopbyvdyqikahwyxfpzwaqk" + }, + "promotionCode": { + "$id": "2570", + "kind": "string", + "type": { + "$ref": "1540" + }, + "value": "naglezezplcaruqogtxnuizslqnnbr" + }, + "version": { + "$id": "2571", + "kind": "string", + "type": { + "$ref": "1544" + }, + "value": "wa" + } + } + } + } + } + } + ], + "responses": [ + { + "$id": "2572", + "response": { + "$ref": "2200" + }, + "statusCode": 200, + "bodyValue": { + "$id": "2573", + "kind": "model", + "type": { + "$ref": "429" + }, + "value": { + "$id": "2574", + "properties": { + "$id": "2575", + "kind": "model", + "type": { + "$ref": "485" + }, + "value": { + "$id": "2576", + "provisioningState": { + "$id": "2577", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Succeeded" + }, + "spotPriorityProfile": { + "$id": "2578", + "kind": "model", + "type": { + "$ref": "490" + }, + "value": { + "$id": "2579", + "capacity": { + "$id": "2580", + "kind": "number", + "type": { + "$ref": "492" + }, + "value": 10 + }, + "minCapacity": { + "$id": "2581", + "kind": "number", + "type": { + "$ref": "496" + }, + "value": 20 + }, + "maxPricePerVM": { + "$id": "2582", + "kind": "number", + "type": { + "$ref": "500" + }, + "value": 0.00865 + }, + "evictionPolicy": { + "$id": "2583", + "kind": "string", + "type": { + "$ref": "30" + }, + "value": "Delete" + }, + "allocationStrategy": { + "$id": "2584", + "kind": "string", + "type": { + "$ref": "36" + }, + "value": "PriceCapacityOptimized" + }, + "maintain": { + "$id": "2585", + "kind": "boolean", + "type": { + "$ref": "510" + }, + "value": true + } + } + }, + "regularPriorityProfile": { + "$id": "2586", + "kind": "model", + "type": { + "$ref": "516" + }, + "value": { + "$id": "2587", + "capacity": { + "$id": "2588", + "kind": "number", + "type": { + "$ref": "518" + }, + "value": 10 + }, + "minCapacity": { + "$id": "2589", + "kind": "number", + "type": { + "$ref": "522" + }, + "value": 10 + }, + "allocationStrategy": { + "$id": "2590", + "kind": "string", + "type": { + "$ref": "44" + }, + "value": "LowestPrice" + } + } + }, + "vmSizesProfile": { + "$id": "2591", + "kind": "array", + "type": { + "$ref": "531" + }, + "value": [ + { + "$id": "2592", + "kind": "model", + "type": { + "$ref": "532" + }, + "value": { + "$id": "2593", + "name": { + "$id": "2594", + "kind": "string", + "type": { + "$ref": "534" + }, + "value": "Standard_d1_v2" + }, + "rank": { + "$id": "2595", + "kind": "number", + "type": { + "$ref": "538" + }, + "value": 19225 + } + } + } + ] + }, + "computeProfile": { + "$id": "2596", + "kind": "model", + "type": { + "$ref": "1449" + }, + "value": { + "$id": "2597", + "baseVirtualMachineProfile": { + "$id": "2598", + "kind": "model", + "type": { + "$ref": "644" + }, + "value": { + "$id": "2599", + "osProfile": { + "$id": "2600", + "kind": "model", + "type": { + "$ref": "646" + }, + "value": { + "$id": "2601", + "computerNamePrefix": { + "$id": "2602", + "kind": "string", + "type": { + "$ref": "648" + }, + "value": "o" + }, + "adminUsername": { + "$id": "2603", + "kind": "string", + "type": { + "$ref": "652" + }, + "value": "nrgzqciiaaxjrqldbmjbqkyhntp" + }, + "windowsConfiguration": { + "$id": "2604", + "kind": "model", + "type": { + "$ref": "664" + }, + "value": { + "$id": "2605", + "provisionVMAgent": { + "$id": "2606", + "kind": "boolean", + "type": { + "$ref": "666" + }, + "value": true + }, + "enableAutomaticUpdates": { + "$id": "2607", + "kind": "boolean", + "type": { + "$ref": "670" + }, + "value": true + }, + "timeZone": { + "$id": "2608", + "kind": "string", + "type": { + "$ref": "674" + }, + "value": "hlyjiqcfksgrpjrct" + }, + "additionalUnattendContent": { + "$id": "2609", + "kind": "array", + "type": { + "$ref": "678" + }, + "value": [ + { + "$id": "2610", + "kind": "model", + "type": { + "$ref": "679" + }, + "value": { + "$id": "2611", + "passName": { + "$id": "2612", + "kind": "string", + "type": { + "$ref": "681" + }, + "value": "OobeSystem" + }, + "componentName": { + "$id": "2613", + "kind": "string", + "type": { + "$ref": "685" + }, + "value": "Microsoft-Windows-Shell-Setup" + }, + "settingName": { + "$id": "2614", + "kind": "string", + "type": { + "$ref": "116" + }, + "value": "AutoLogon" + } + } + } + ] + }, + "patchSettings": { + "$id": "2615", + "kind": "model", + "type": { + "$ref": "698" + }, + "value": { + "$id": "2616", + "patchMode": { + "$id": "2617", + "kind": "string", + "type": { + "$ref": "122" + }, + "value": "Manual" + }, + "enableHotpatching": { + "$id": "2618", + "kind": "boolean", + "type": { + "$ref": "703" + }, + "value": true + }, + "assessmentMode": { + "$id": "2619", + "kind": "string", + "type": { + "$ref": "130" + }, + "value": "ImageDefault" + }, + "automaticByPlatformSettings": { + "$id": "2620", + "kind": "model", + "type": { + "$ref": "710" + }, + "value": { + "$id": "2621", + "rebootSetting": { + "$id": "2622", + "kind": "string", + "type": { + "$ref": "136" + }, + "value": "Unknown" + }, + "bypassPlatformSafetyChecksOnUserSchedule": { + "$id": "2623", + "kind": "boolean", + "type": { + "$ref": "715" + }, + "value": true + } + } + } + } + }, + "winRM": { + "$id": "2624", + "kind": "model", + "type": { + "$ref": "723" + }, + "value": { + "$id": "2625", + "listeners": { + "$id": "2626", + "kind": "array", + "type": { + "$ref": "725" + }, + "value": [ + { + "$id": "2627", + "kind": "model", + "type": { + "$ref": "726" + }, + "value": { + "$id": "2628", + "protocol": { + "$id": "2629", + "kind": "string", + "type": { + "$ref": "146" + }, + "value": "Https" + }, + "certificateUrl": { + "$id": "2630", + "kind": "string", + "type": { + "$ref": "731" + }, + "value": "https://myVaultName.vault.azure.net/secrets/myCertName" + } + } + } + ] + } + } + }, + "enableVMAgentPlatformUpdates": { + "$id": "2631", + "kind": "boolean", + "type": { + "$ref": "739" + }, + "value": true + } + } + }, + "linuxConfiguration": { + "$id": "2632", + "kind": "model", + "type": { + "$ref": "745" + }, + "value": { + "$id": "2633", + "disablePasswordAuthentication": { + "$id": "2634", + "kind": "boolean", + "type": { + "$ref": "747" + }, + "value": true + }, + "ssh": { + "$id": "2635", + "kind": "model", + "type": { + "$ref": "751" + }, + "value": { + "$id": "2636", + "publicKeys": { + "$id": "2637", + "kind": "array", + "type": { + "$ref": "753" + }, + "value": [ + { + "$id": "2638", + "kind": "model", + "type": { + "$ref": "754" + }, + "value": { + "$id": "2639", + "path": { + "$id": "2640", + "kind": "string", + "type": { + "$ref": "756" + }, + "value": "kmqz" + }, + "keyData": { + "$id": "2641", + "kind": "string", + "type": { + "$ref": "760" + }, + "value": "kivgsubusvpprwqaqpjcmhsv" + } + } + } + ] + } + } + }, + "provisionVMAgent": { + "$id": "2642", + "kind": "boolean", + "type": { + "$ref": "768" + }, + "value": true + }, + "patchSettings": { + "$id": "2643", + "kind": "model", + "type": { + "$ref": "772" + }, + "value": { + "$id": "2644", + "patchMode": { + "$id": "2645", + "kind": "string", + "type": { + "$ref": "152" + }, + "value": "ImageDefault" + }, + "assessmentMode": { + "$id": "2646", + "kind": "string", + "type": { + "$ref": "158" + }, + "value": "ImageDefault" + }, + "automaticByPlatformSettings": { + "$id": "2647", + "kind": "model", + "type": { + "$ref": "780" + }, + "value": { + "$id": "2648", + "rebootSetting": { + "$id": "2649", + "kind": "string", + "type": { + "$ref": "164" + }, + "value": "Unknown" + }, + "bypassPlatformSafetyChecksOnUserSchedule": { + "$id": "2650", + "kind": "boolean", + "type": { + "$ref": "785" + }, + "value": true + } + } + } + } + }, + "enableVMAgentPlatformUpdates": { + "$id": "2651", + "kind": "boolean", + "type": { + "$ref": "793" + }, + "value": true + } + } + }, + "secrets": { + "$id": "2652", + "kind": "array", + "type": { + "$ref": "799" + }, + "value": [ + { + "$id": "2653", + "kind": "model", + "type": { + "$ref": "800" + }, + "value": { + "$id": "2654", + "sourceVault": { + "$id": "2655", + "kind": "model", + "type": { + "$ref": "802" + }, + "value": { + "$id": "2656", + "id": { + "$id": "2657", + "kind": "string", + "type": { + "$ref": "804" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}" + } + } + }, + "vaultCertificates": { + "$id": "2658", + "kind": "array", + "type": { + "$ref": "811" + }, + "value": [ + { + "$id": "2659", + "kind": "model", + "type": { + "$ref": "812" + }, + "value": { + "$id": "2660", + "certificateUrl": { + "$id": "2661", + "kind": "string", + "type": { + "$ref": "814" + }, + "value": "https://myVaultName.vault.azure.net/secrets/myCertName" + }, + "certificateStore": { + "$id": "2662", + "kind": "string", + "type": { + "$ref": "818" + }, + "value": "nlxrwavpzhueffxsshlun" + } + } + } + ] + } + } + } + ] + }, + "allowExtensionOperations": { + "$id": "2663", + "kind": "boolean", + "type": { + "$ref": "826" + }, + "value": true + }, + "requireGuestProvisionSignal": { + "$id": "2664", + "kind": "boolean", + "type": { + "$ref": "830" + }, + "value": true + } + } + }, + "storageProfile": { + "$id": "2665", + "kind": "model", + "type": { + "$ref": "836" + }, + "value": { + "$id": "2666", + "imageReference": { + "$id": "2667", + "kind": "model", + "type": { + "$ref": "838" + }, + "value": { + "$id": "2668", + "publisher": { + "$id": "2669", + "kind": "string", + "type": { + "$ref": "845" + }, + "value": "mqxgwbiyjzmxavhbkd" + }, + "offer": { + "$id": "2670", + "kind": "string", + "type": { + "$ref": "849" + }, + "value": "isxgumkarlkomp" + }, + "sku": { + "$id": "2671", + "kind": "string", + "type": { + "$ref": "853" + }, + "value": "eojmppqcrnpmxirtp" + }, + "version": { + "$id": "2672", + "kind": "string", + "type": { + "$ref": "857" + }, + "value": "wvpcqefgtmqdgltiuz" + }, + "exactVersion": { + "$id": "2673", + "kind": "string", + "type": { + "$ref": "861" + }, + "value": "zjbntmiskjexlr" + }, + "sharedGalleryImageId": { + "$id": "2674", + "kind": "string", + "type": { + "$ref": "865" + }, + "value": "kmkgihoxwlawuuhcinfirktdwkmx" + }, + "communityGalleryImageId": { + "$id": "2675", + "kind": "string", + "type": { + "$ref": "869" + }, + "value": "vlqe" + }, + "id": { + "$id": "2676", + "kind": "string", + "type": { + "$ref": "840" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images/{imageName}/versions/{versionName}" + } + } + }, + "osDisk": { + "$id": "2677", + "kind": "model", + "type": { + "$ref": "875" + }, + "value": { + "$id": "2678", + "name": { + "$id": "2679", + "kind": "string", + "type": { + "$ref": "877" + }, + "value": "wfttw" + }, + "caching": { + "$id": "2680", + "kind": "string", + "type": { + "$ref": "174" + }, + "value": "None" + }, + "writeAcceleratorEnabled": { + "$id": "2681", + "kind": "boolean", + "type": { + "$ref": "884" + }, + "value": true + }, + "createOption": { + "$id": "2682", + "kind": "string", + "type": { + "$ref": "182" + }, + "value": "FromImage" + }, + "diffDiskSettings": { + "$id": "2683", + "kind": "model", + "type": { + "$ref": "891" + }, + "value": { + "$id": "2684", + "option": { + "$id": "2685", + "kind": "string", + "type": { + "$ref": "194" + }, + "value": "Local" + }, + "placement": { + "$id": "2686", + "kind": "string", + "type": { + "$ref": "198" + }, + "value": "CacheDisk" + } + } + }, + "diskSizeGB": { + "$id": "2687", + "kind": "number", + "type": { + "$ref": "901" + }, + "value": 14 + }, + "osType": { + "$id": "2688", + "kind": "string", + "type": { + "$ref": "206" + }, + "value": "Windows" + }, + "image": { + "$id": "2689", + "kind": "model", + "type": { + "$ref": "908" + }, + "value": { + "$id": "2690", + "uri": { + "$id": "2691", + "kind": "string", + "type": { + "$ref": "910" + }, + "value": "https://myStorageAccountName.blob.core.windows.net/myContainerName/myVhdName.vhd" + } + } + }, + "vhdContainers": { + "$id": "2692", + "kind": "array", + "type": { + "$ref": "916" + }, + "value": [ + { + "$id": "2693", + "kind": "string", + "type": { + "$ref": "917" + }, + "value": "tkzcwddtinkfpnfklatw" + } + ] + }, + "managedDisk": { + "$id": "2694", + "kind": "model", + "type": { + "$ref": "921" + }, + "value": { + "$id": "2695", + "storageAccountType": { + "$id": "2696", + "kind": "string", + "type": { + "$ref": "212" + }, + "value": "Standard_LRS" + }, + "diskEncryptionSet": { + "$id": "2697", + "kind": "model", + "type": { + "$ref": "926" + }, + "value": { + "$id": "2698", + "id": { + "$id": "2699", + "kind": "string", + "type": { + "$ref": "928" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}" + } + } + }, + "securityProfile": { + "$id": "2700", + "kind": "model", + "type": { + "$ref": "935" + }, + "value": { + "$id": "2701", + "securityEncryptionType": { + "$id": "2702", + "kind": "string", + "type": { + "$ref": "228" + }, + "value": "VMGuestStateOnly" + }, + "diskEncryptionSet": { + "$id": "2703", + "kind": "model", + "type": { + "$ref": "926" + }, + "value": { + "$id": "2704", + "id": { + "$id": "2705", + "kind": "string", + "type": { + "$ref": "928" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}" + } + } + } + } + } + } + }, + "deleteOption": { + "$id": "2706", + "kind": "string", + "type": { + "$ref": "236" + }, + "value": "Delete" + } + } + }, + "dataDisks": { + "$id": "2707", + "kind": "array", + "type": { + "$ref": "952" + }, + "value": [ + { + "$id": "2708", + "kind": "model", + "type": { + "$ref": "953" + }, + "value": { + "$id": "2709", + "name": { + "$id": "2710", + "kind": "string", + "type": { + "$ref": "955" + }, + "value": "eogiykmdmeikswxmigjws" + }, + "lun": { + "$id": "2711", + "kind": "number", + "type": { + "$ref": "959" + }, + "value": 14 + }, + "caching": { + "$id": "2712", + "kind": "string", + "type": { + "$ref": "174" + }, + "value": "None" + }, + "writeAcceleratorEnabled": { + "$id": "2713", + "kind": "boolean", + "type": { + "$ref": "966" + }, + "value": true + }, + "createOption": { + "$id": "2714", + "kind": "string", + "type": { + "$ref": "182" + }, + "value": "FromImage" + }, + "diskSizeGB": { + "$id": "2715", + "kind": "number", + "type": { + "$ref": "973" + }, + "value": 6 + }, + "managedDisk": { + "$id": "2716", + "kind": "model", + "type": { + "$ref": "921" + }, + "value": { + "$id": "2717", + "storageAccountType": { + "$id": "2718", + "kind": "string", + "type": { + "$ref": "212" + }, + "value": "Standard_LRS" + }, + "diskEncryptionSet": { + "$id": "2719", + "kind": "model", + "type": { + "$ref": "926" + }, + "value": { + "$id": "2720", + "id": { + "$id": "2721", + "kind": "string", + "type": { + "$ref": "928" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}" + } + } + }, + "securityProfile": { + "$id": "2722", + "kind": "model", + "type": { + "$ref": "935" + }, + "value": { + "$id": "2723", + "securityEncryptionType": { + "$id": "2724", + "kind": "string", + "type": { + "$ref": "228" + }, + "value": "VMGuestStateOnly" + }, + "diskEncryptionSet": { + "$id": "2725", + "kind": "model", + "type": { + "$ref": "926" + }, + "value": { + "$id": "2726", + "id": { + "$id": "2727", + "kind": "string", + "type": { + "$ref": "928" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}" + } + } + } + } + } + } + }, + "diskIOPSReadWrite": { + "$id": "2728", + "kind": "number", + "type": { + "$ref": "980" + }, + "value": 27 + }, + "diskMBpsReadWrite": { + "$id": "2729", + "kind": "number", + "type": { + "$ref": "984" + }, + "value": 2 + }, + "deleteOption": { + "$id": "2730", + "kind": "string", + "type": { + "$ref": "236" + }, + "value": "Delete" + } + } + } + ] + }, + "diskControllerType": { + "$id": "2731", + "kind": "string", + "type": { + "$ref": "242" + }, + "value": "uzb" + } + } + }, + "networkProfile": { + "$id": "2732", + "kind": "model", + "type": { + "$ref": "998" + }, + "value": { + "$id": "2733", + "healthProbe": { + "$id": "2734", + "kind": "model", + "type": { + "$ref": "1000" + }, + "value": { + "$id": "2735", + "id": { + "$id": "2736", + "kind": "string", + "type": { + "$ref": "1002" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/probes/{probeName}" + } + } + }, + "networkInterfaceConfigurations": { + "$id": "2737", + "kind": "array", + "type": { + "$ref": "1009" + }, + "value": [ + { + "$id": "2738", + "kind": "model", + "type": { + "$ref": "1010" + }, + "value": { + "$id": "2739", + "name": { + "$id": "2740", + "kind": "string", + "type": { + "$ref": "1012" + }, + "value": "i" + }, + "properties": { + "$id": "2741", + "kind": "model", + "type": { + "$ref": "1016" + }, + "value": { + "$id": "2742", + "primary": { + "$id": "2743", + "kind": "boolean", + "type": { + "$ref": "1018" + }, + "value": true + }, + "enableAcceleratedNetworking": { + "$id": "2744", + "kind": "boolean", + "type": { + "$ref": "1022" + }, + "value": true + }, + "disableTcpStateTracking": { + "$id": "2745", + "kind": "boolean", + "type": { + "$ref": "1026" + }, + "value": true + }, + "enableFpga": { + "$id": "2746", + "kind": "boolean", + "type": { + "$ref": "1030" + }, + "value": true + }, + "networkSecurityGroup": { + "$id": "2747", + "kind": "model", + "type": { + "$ref": "802" + }, + "value": { + "$id": "2748", + "id": { + "$id": "2749", + "kind": "string", + "type": { + "$ref": "804" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/{networkSecurityGroupName}" + } + } + }, + "dnsSettings": { + "$id": "2750", + "kind": "model", + "type": { + "$ref": "1037" + }, + "value": { + "$id": "2751", + "dnsServers": { + "$id": "2752", + "kind": "array", + "type": { + "$ref": "1039" + }, + "value": [ + { + "$id": "2753", + "kind": "string", + "type": { + "$ref": "1040" + }, + "value": "nxmmfolhclsesu" + } + ] + } + } + }, + "ipConfigurations": { + "$id": "2754", + "kind": "array", + "type": { + "$ref": "1046" + }, + "value": [ + { + "$id": "2755", + "kind": "model", + "type": { + "$ref": "1047" + }, + "value": { + "$id": "2756", + "name": { + "$id": "2757", + "kind": "string", + "type": { + "$ref": "1049" + }, + "value": "oezqhkidfhyywlfzwuotilrpbqnjg" + }, + "properties": { + "$id": "2758", + "kind": "model", + "type": { + "$ref": "1053" + }, + "value": { + "$id": "2759", + "subnet": { + "$id": "2760", + "kind": "model", + "type": { + "$ref": "1000" + }, + "value": { + "$id": "2761", + "id": { + "$id": "2762", + "kind": "string", + "type": { + "$ref": "1002" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}" + } + } + }, + "primary": { + "$id": "2763", + "kind": "boolean", + "type": { + "$ref": "1058" + }, + "value": true + }, + "publicIPAddressConfiguration": { + "$id": "2764", + "kind": "model", + "type": { + "$ref": "1062" + }, + "value": { + "$id": "2765", + "name": { + "$id": "2766", + "kind": "string", + "type": { + "$ref": "1064" + }, + "value": "fvpqf" + }, + "properties": { + "$id": "2767", + "kind": "model", + "type": { + "$ref": "1068" + }, + "value": { + "$id": "2768", + "idleTimeoutInMinutes": { + "$id": "2769", + "kind": "number", + "type": { + "$ref": "1070" + }, + "value": 9 + }, + "dnsSettings": { + "$id": "2770", + "kind": "model", + "type": { + "$ref": "1074" + }, + "value": { + "$id": "2771", + "domainNameLabel": { + "$id": "2772", + "kind": "string", + "type": { + "$ref": "1076" + }, + "value": "ukrddzvmorpmfsczjwtbvp" + }, + "domainNameLabelScope": { + "$id": "2773", + "kind": "string", + "type": { + "$ref": "248" + }, + "value": "TenantReuse" + } + } + }, + "ipTags": { + "$id": "2774", + "kind": "array", + "type": { + "$ref": "1085" + }, + "value": [ + { + "$id": "2775", + "kind": "model", + "type": { + "$ref": "1086" + }, + "value": { + "$id": "2776", + "ipTagType": { + "$id": "2777", + "kind": "string", + "type": { + "$ref": "1088" + }, + "value": "sddgsoemnzgqizale" + }, + "tag": { + "$id": "2778", + "kind": "string", + "type": { + "$ref": "1092" + }, + "value": "wufmhrjsakbiaetyara" + } + } + } + ] + }, + "publicIPPrefix": { + "$id": "2779", + "kind": "model", + "type": { + "$ref": "802" + }, + "value": { + "$id": "2780", + "id": { + "$id": "2781", + "kind": "string", + "type": { + "$ref": "804" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes/{publicIPPrefixName}" + } + } + }, + "publicIPAddressVersion": { + "$id": "2782", + "kind": "string", + "type": { + "$ref": "258" + }, + "value": "IPv4" + }, + "deleteOption": { + "$id": "2783", + "kind": "string", + "type": { + "$ref": "264" + }, + "value": "Delete" + } + } + }, + "sku": { + "$id": "2784", + "kind": "model", + "type": { + "$ref": "1109" + }, + "value": { + "$id": "2785", + "name": { + "$id": "2786", + "kind": "string", + "type": { + "$ref": "270" + }, + "value": "Basic" + }, + "tier": { + "$id": "2787", + "kind": "string", + "type": { + "$ref": "276" + }, + "value": "Regional" + } + } + } + } + }, + "privateIPAddressVersion": { + "$id": "2788", + "kind": "string", + "type": { + "$ref": "258" + }, + "value": "IPv4" + }, + "applicationGatewayBackendAddressPools": { + "$id": "2789", + "kind": "array", + "type": { + "$ref": "1124" + }, + "value": [ + { + "$id": "2790", + "kind": "model", + "type": { + "$ref": "802" + }, + "value": { + "$id": "2791", + "id": { + "$id": "2792", + "kind": "string", + "type": { + "$ref": "804" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}/backendAddressPools/{backendAddressPoolName}" + } + } + } + ] + }, + "applicationSecurityGroups": { + "$id": "2793", + "kind": "array", + "type": { + "$ref": "1128" + }, + "value": [ + { + "$id": "2794", + "kind": "model", + "type": { + "$ref": "802" + }, + "value": { + "$id": "2795", + "id": { + "$id": "2796", + "kind": "string", + "type": { + "$ref": "804" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationSecurityGroups/{applicationSecurityGroupName}" + } + } + } + ] + }, + "loadBalancerBackendAddressPools": { + "$id": "2797", + "kind": "array", + "type": { + "$ref": "1132" + }, + "value": [ + { + "$id": "2798", + "kind": "model", + "type": { + "$ref": "802" + }, + "value": { + "$id": "2799", + "id": { + "$id": "2800", + "kind": "string", + "type": { + "$ref": "804" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/backendAddressPools/{backendAddressPoolName}" + } + } + } + ] + }, + "loadBalancerInboundNatPools": { + "$id": "2801", + "kind": "array", + "type": { + "$ref": "1136" + }, + "value": [ + { + "$id": "2802", + "kind": "model", + "type": { + "$ref": "802" + }, + "value": { + "$id": "2803", + "id": { + "$id": "2804", + "kind": "string", + "type": { + "$ref": "804" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/inboundNatPools/{inboundNatPoolName}" + } + } + } + ] + } + } + } + } + } + ] + }, + "enableIPForwarding": { + "$id": "2805", + "kind": "boolean", + "type": { + "$ref": "1144" + }, + "value": true + }, + "deleteOption": { + "$id": "2806", + "kind": "string", + "type": { + "$ref": "264" + }, + "value": "Delete" + }, + "auxiliaryMode": { + "$id": "2807", + "kind": "string", + "type": { + "$ref": "282" + }, + "value": "None" + }, + "auxiliarySku": { + "$id": "2808", + "kind": "string", + "type": { + "$ref": "290" + }, + "value": "None" + } + } + } + } + } + ] + }, + "networkApiVersion": { + "$id": "2809", + "kind": "string", + "type": { + "$ref": "302" + }, + "value": "2020-11-01" + } + } + }, + "securityProfile": { + "$id": "2810", + "kind": "model", + "type": { + "$ref": "1166" + }, + "value": { + "$id": "2811", + "uefiSettings": { + "$id": "2812", + "kind": "model", + "type": { + "$ref": "1168" + }, + "value": { + "$id": "2813", + "secureBootEnabled": { + "$id": "2814", + "kind": "boolean", + "type": { + "$ref": "1170" + }, + "value": true + }, + "vTpmEnabled": { + "$id": "2815", + "kind": "boolean", + "type": { + "$ref": "1174" + }, + "value": true + } + } + }, + "encryptionAtHost": { + "$id": "2816", + "kind": "boolean", + "type": { + "$ref": "1180" + }, + "value": true + }, + "securityType": { + "$id": "2817", + "kind": "string", + "type": { + "$ref": "306" + }, + "value": "TrustedLaunch" + }, + "encryptionIdentity": { + "$id": "2818", + "kind": "model", + "type": { + "$ref": "1187" + }, + "value": { + "$id": "2819", + "userAssignedIdentityResourceId": { + "$id": "2820", + "kind": "string", + "type": { + "$ref": "1189" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{userAssignedIdentityName}" + } + } + }, + "proxyAgentSettings": { + "$id": "2821", + "kind": "model", + "type": { + "$ref": "1196" + }, + "value": { + "$id": "2822", + "enabled": { + "$id": "2823", + "kind": "boolean", + "type": { + "$ref": "1198" + }, + "value": true + }, + "mode": { + "$id": "2824", + "kind": "string", + "type": { + "$ref": "312" + }, + "value": "Audit" + }, + "keyIncarnationId": { + "$id": "2825", + "kind": "number", + "type": { + "$ref": "1205" + }, + "value": 20 + } + } + } + } + }, + "diagnosticsProfile": { + "$id": "2826", + "kind": "model", + "type": { + "$ref": "1213" + }, + "value": { + "$id": "2827", + "bootDiagnostics": { + "$id": "2828", + "kind": "model", + "type": { + "$ref": "1215" + }, + "value": { + "$id": "2829", + "enabled": { + "$id": "2830", + "kind": "boolean", + "type": { + "$ref": "1217" + }, + "value": true + }, + "storageUri": { + "$id": "2831", + "kind": "string", + "type": { + "$ref": "1221" + }, + "value": "http://myStorageAccountName.blob.core.windows.net" + } + } + } + } + }, + "extensionProfile": { + "$id": "2832", + "kind": "model", + "type": { + "$ref": "1229" + }, + "value": { + "$id": "2833", + "extensions": { + "$id": "2834", + "kind": "array", + "type": { + "$ref": "1231" + }, + "value": [ + { + "$id": "2835", + "kind": "model", + "type": { + "$ref": "1232" + }, + "value": { + "$id": "2836", + "name": { + "$id": "2837", + "kind": "string", + "type": { + "$ref": "1239" + }, + "value": "bndxuxx" + }, + "type": { + "$id": "2838", + "kind": "string", + "type": { + "$ref": "1243" + }, + "value": "cmeam" + }, + "properties": { + "$id": "2839", + "kind": "model", + "type": { + "$ref": "1247" + }, + "value": { + "$id": "2840", + "forceUpdateTag": { + "$id": "2841", + "kind": "string", + "type": { + "$ref": "1249" + }, + "value": "yhgxw" + }, + "publisher": { + "$id": "2842", + "kind": "string", + "type": { + "$ref": "1253" + }, + "value": "kpxtirxjfprhs" + }, + "type": { + "$id": "2843", + "kind": "string", + "type": { + "$ref": "1257" + }, + "value": "pgjilctjjwaa" + }, + "typeHandlerVersion": { + "$id": "2844", + "kind": "string", + "type": { + "$ref": "1261" + }, + "value": "zevivcoilxmbwlrihhhibq" + }, + "autoUpgradeMinorVersion": { + "$id": "2845", + "kind": "boolean", + "type": { + "$ref": "1265" + }, + "value": true + }, + "enableAutomaticUpgrade": { + "$id": "2846", + "kind": "boolean", + "type": { + "$ref": "1269" + }, + "value": true + }, + "settings": { + "$id": "2847", + "kind": "dict", + "type": { + "$ref": "1273" + }, + "value": { + "$id": "2848" + } + }, + "provisioningState": { + "$id": "2849", + "kind": "string", + "type": { + "$ref": "1285" + }, + "value": "Succeeded" + }, + "provisionAfterExtensions": { + "$id": "2850", + "kind": "array", + "type": { + "$ref": "1289" + }, + "value": [ + { + "$id": "2851", + "kind": "string", + "type": { + "$ref": "1290" + }, + "value": "nftzosroolbcwmpupujzqwqe" + } + ] + }, + "suppressFailures": { + "$id": "2852", + "kind": "boolean", + "type": { + "$ref": "1294" + }, + "value": true + }, + "protectedSettingsFromKeyVault": { + "$id": "2853", + "kind": "model", + "type": { + "$ref": "1298" + }, + "value": { + "$id": "2854", + "secretUrl": { + "$id": "2855", + "kind": "string", + "type": { + "$ref": "1300" + }, + "value": "https://myVaultName.vault.azure.net/secrets/secret/mySecretName" + }, + "sourceVault": { + "$id": "2856", + "kind": "model", + "type": { + "$ref": "802" + }, + "value": { + "$id": "2857", + "id": { + "$id": "2858", + "kind": "string", + "type": { + "$ref": "804" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}" + } + } + } + } + } + } + }, + "id": { + "$id": "2859", + "kind": "string", + "type": { + "$ref": "1234" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/extensions/{extensionName}" + } + } + } + ] + }, + "extensionsTimeBudget": { + "$id": "2860", + "kind": "string", + "type": { + "$ref": "1313" + }, + "value": "mbhjahtdygwgyszdwjtvlvtgchdwil" + } + } + }, + "licenseType": { + "$id": "2861", + "kind": "string", + "type": { + "$ref": "1319" + }, + "value": "v" + }, + "scheduledEventsProfile": { + "$id": "2862", + "kind": "model", + "type": { + "$ref": "1323" + }, + "value": { + "$id": "2863", + "terminateNotificationProfile": { + "$id": "2864", + "kind": "model", + "type": { + "$ref": "1325" + }, + "value": { + "$id": "2865", + "notBeforeTimeout": { + "$id": "2866", + "kind": "string", + "type": { + "$ref": "1327" + }, + "value": "iljppmmw" + }, + "enable": { + "$id": "2867", + "kind": "boolean", + "type": { + "$ref": "1331" + }, + "value": true + } + } + }, + "osImageNotificationProfile": { + "$id": "2868", + "kind": "model", + "type": { + "$ref": "1337" + }, + "value": { + "$id": "2869", + "notBeforeTimeout": { + "$id": "2870", + "kind": "string", + "type": { + "$ref": "1339" + }, + "value": "olbpadmevekyczfokodtfprxti" + }, + "enable": { + "$id": "2871", + "kind": "boolean", + "type": { + "$ref": "1343" + }, + "value": true + } + } + } + } + }, + "userData": { + "$id": "2872", + "kind": "string", + "type": { + "$ref": "1351" + }, + "value": "s" + }, + "capacityReservation": { + "$id": "2873", + "kind": "model", + "type": { + "$ref": "1355" + }, + "value": { + "$id": "2874", + "capacityReservationGroup": { + "$id": "2875", + "kind": "model", + "type": { + "$ref": "802" + }, + "value": { + "$id": "2876", + "id": { + "$id": "2877", + "kind": "string", + "type": { + "$ref": "804" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/capacityReservationGroups/{capacityReservationGroupName}" + } + } + } + } + }, + "applicationProfile": { + "$id": "2878", + "kind": "model", + "type": { + "$ref": "1362" + }, + "value": { + "$id": "2879", + "galleryApplications": { + "$id": "2880", + "kind": "array", + "type": { + "$ref": "1364" + }, + "value": [ + { + "$id": "2881", + "kind": "model", + "type": { + "$ref": "1365" + }, + "value": { + "$id": "2882", + "tags": { + "$id": "2883", + "kind": "string", + "type": { + "$ref": "1367" + }, + "value": "eyrqjbib" + }, + "order": { + "$id": "2884", + "kind": "number", + "type": { + "$ref": "1371" + }, + "value": 5 + }, + "packageReferenceId": { + "$id": "2885", + "kind": "string", + "type": { + "$ref": "1375" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/applications/{applicationName}/versions/{versionName}" + }, + "treatFailureAsDeploymentFailure": { + "$id": "2886", + "kind": "boolean", + "type": { + "$ref": "1384" + }, + "value": true + }, + "enableAutomaticUpgrade": { + "$id": "2887", + "kind": "boolean", + "type": { + "$ref": "1388" + }, + "value": true + } + } + } + ] + } + } + }, + "hardwareProfile": { + "$id": "2888", + "kind": "model", + "type": { + "$ref": "1396" + }, + "value": { + "$id": "2889", + "vmSizeProperties": { + "$id": "2890", + "kind": "model", + "type": { + "$ref": "1398" + }, + "value": { + "$id": "2891", + "vCPUsAvailable": { + "$id": "2892", + "kind": "number", + "type": { + "$ref": "1400" + }, + "value": 16 + }, + "vCPUsPerCore": { + "$id": "2893", + "kind": "number", + "type": { + "$ref": "1404" + }, + "value": 23 + } + } + } + } + }, + "serviceArtifactReference": { + "$id": "2894", + "kind": "model", + "type": { + "$ref": "1412" + }, + "value": { + "$id": "2895", + "id": { + "$id": "2896", + "kind": "string", + "type": { + "$ref": "1414" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/serviceArtifacts/{serviceArtifactsName}/vmArtifactsProfiles/{vmArtifactsProfileName}" + } + } + }, + "securityPostureReference": { + "$id": "2897", + "kind": "model", + "type": { + "$ref": "1421" + }, + "value": { + "$id": "2898", + "id": { + "$id": "2899", + "kind": "string", + "type": { + "$ref": "1423" + }, + "value": "/CommunityGalleries/{communityGalleryName}/securityPostures/{securityPostureName}/versions/{major.minor.patch}|{major.*}|latest" + }, + "excludeExtensions": { + "$id": "2900", + "kind": "array", + "type": { + "$ref": "1427" + }, + "value": [ + { + "$id": "2901", + "kind": "string", + "type": { + "$ref": "1428" + }, + "value": "{securityPostureVMExtensionName}" + } + ] + }, + "isOverridable": { + "$id": "2902", + "kind": "boolean", + "type": { + "$ref": "1432" + }, + "value": true + } + } + }, + "timeCreated": { + "$id": "2903", + "kind": "string", + "type": { + "$ref": "1438" + }, + "value": "2024-04-29T21:51:44.043Z" + } + } + }, + "computeApiVersion": { + "$id": "2904", + "kind": "string", + "type": { + "$ref": "1454" + }, + "value": "2023-07-01" + }, + "platformFaultDomainCount": { + "$id": "2905", + "kind": "number", + "type": { + "$ref": "1458" + }, + "value": 1 + } + } + }, + "timeCreated": { + "$id": "2906", + "kind": "string", + "type": { + "$ref": "1476" + }, + "value": "2024-07-10T00:16:34.8590555+00:00" + }, + "uniqueId": { + "$id": "2907", + "kind": "string", + "type": { + "$ref": "1481" + }, + "value": "a2f7fabd-bbc2-4a20-afe1-49fdb3885a28" + } + } + }, + "zones": { + "$id": "2908", + "kind": "array", + "type": { + "$ref": "1487" + }, + "value": [ + { + "$id": "2909", + "kind": "string", + "type": { + "$ref": "1488" + }, + "value": "zone1" + }, + { + "$id": "2910", + "kind": "string", + "type": { + "$ref": "1488" + }, + "value": "zone2" + } + ] + }, + "identity": { + "$id": "2911", + "kind": "model", + "type": { + "$ref": "1492" + }, + "value": { + "$id": "2912", + "principalId": { + "$id": "2913", + "kind": "string", + "type": { + "$ref": "1494" + }, + "value": "4d508e5b-374b-4382-9a1c-01fb8b6cb37c" + }, + "tenantId": { + "$id": "2914", + "kind": "string", + "type": { + "$ref": "1499" + }, + "value": "5d508e5b-374b-4382-9a1c-01fb8b6cb37c" + }, + "type": { + "$id": "2915", + "kind": "string", + "type": { + "$ref": "318" + }, + "value": "UserAssigned" + }, + "userAssignedIdentities": { + "$id": "2916", + "kind": "dict", + "type": { + "$ref": "1507" + }, + "value": { + "$id": "2917", + "key9851": { + "$id": "2918", + "kind": "model", + "type": { + "$ref": "1510" + }, + "value": { + "$id": "2919", + "principalId": { + "$id": "2920", + "kind": "string", + "type": { + "$ref": "1517" + }, + "value": "6d508e5b-374b-4382-9a1c-01fb8b6cb37c" + }, + "clientId": { + "$id": "2921", + "kind": "string", + "type": { + "$ref": "1512" + }, + "value": "7d508e5b-374b-4382-9a1c-01fb8b6cb37c" + } + } + } + } + } + } + }, + "plan": { + "$id": "2922", + "kind": "model", + "type": { + "$ref": "1526" + }, + "value": { + "$id": "2923", + "name": { + "$id": "2924", + "kind": "string", + "type": { + "$ref": "1528" + }, + "value": "jwgrcrnrtfoxn" + }, + "publisher": { + "$id": "2925", + "kind": "string", + "type": { + "$ref": "1532" + }, + "value": "iozjbiqqckqm" + }, + "product": { + "$id": "2926", + "kind": "string", + "type": { + "$ref": "1536" + }, + "value": "cgopbyvdyqikahwyxfpzwaqk" + }, + "promotionCode": { + "$id": "2927", + "kind": "string", + "type": { + "$ref": "1540" + }, + "value": "naglezezplcaruqogtxnuizslqnnbr" + }, + "version": { + "$id": "2928", + "kind": "string", + "type": { + "$ref": "1544" + }, + "value": "wa" + } + } + }, + "tags": { + "$id": "2929", + "kind": "dict", + "type": { + "$ref": "475" + }, + "value": { + "$id": "2930", + "key3518": { + "$id": "2931", + "kind": "string", + "type": { + "$ref": "477" + }, + "value": "luvrnuvsgdpbuofdskkcoqhfh" + } + } + }, + "location": { + "$id": "2932", + "kind": "string", + "type": { + "$ref": "481" + }, + "value": "westus" + }, + "id": { + "$id": "2933", + "kind": "string", + "type": { + "$ref": "433" + }, + "value": "/subscriptions/7B0CD4DB-3381-4013-9B31-FB6E6FD0FF1C/resourceGroups/rgazurefleet/providers/Microsoft.AzureFleet/fleets/testFleet" + }, + "name": { + "$id": "2934", + "kind": "string", + "type": { + "$ref": "438" + }, + "value": "testFleet" + }, + "type": { + "$id": "2935", + "kind": "string", + "type": { + "$ref": "442" + }, + "value": "Microsoft.AzureFleet/fleets" + }, + "systemData": { + "$id": "2936", + "kind": "model", + "type": { + "$ref": "447" + }, + "value": { + "$id": "2937", + "createdBy": { + "$id": "2938", + "kind": "string", + "type": { + "$ref": "449" + }, + "value": "rowegentrpoajsv" + }, + "createdByType": { + "$id": "2939", + "kind": "string", + "type": { + "$ref": "328" + }, + "value": "User" + }, + "createdAt": { + "$id": "2940", + "kind": "string", + "type": { + "$ref": "456" + }, + "value": "2024-04-29T21:51:44.043Z" + }, + "lastModifiedBy": { + "$id": "2941", + "kind": "string", + "type": { + "$ref": "461" + }, + "value": "edwuayhhaoepxzisfaqjhmrxjq" + }, + "lastModifiedByType": { + "$id": "2942", + "kind": "string", + "type": { + "$ref": "328" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "2943", + "kind": "string", + "type": { + "$ref": "468" + }, + "value": "2024-04-29T21:51:44.043Z" + } + } + } + } + } + }, + { + "$id": "2944", + "response": { + "$ref": "2201" + }, + "statusCode": 201, + "bodyValue": { + "$id": "2945", + "kind": "model", + "type": { + "$ref": "429" + }, + "value": { + "$id": "2946", + "properties": { + "$id": "2947", + "kind": "model", + "type": { + "$ref": "485" + }, + "value": { + "$id": "2948", + "provisioningState": { + "$id": "2949", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Creating" + }, + "spotPriorityProfile": { + "$id": "2950", + "kind": "model", + "type": { + "$ref": "490" + }, + "value": { + "$id": "2951", + "capacity": { + "$id": "2952", + "kind": "number", + "type": { + "$ref": "492" + }, + "value": 0 + }, + "minCapacity": { + "$id": "2953", + "kind": "number", + "type": { + "$ref": "496" + }, + "value": 0 + }, + "maxPricePerVM": { + "$id": "2954", + "kind": "number", + "type": { + "$ref": "500" + }, + "value": 0.00865 + }, + "evictionPolicy": { + "$id": "2955", + "kind": "string", + "type": { + "$ref": "30" + }, + "value": "Delete" + }, + "allocationStrategy": { + "$id": "2956", + "kind": "string", + "type": { + "$ref": "36" + }, + "value": "PriceCapacityOptimized" + }, + "maintain": { + "$id": "2957", + "kind": "boolean", + "type": { + "$ref": "510" + }, + "value": true + } + } + }, + "regularPriorityProfile": { + "$id": "2958", + "kind": "model", + "type": { + "$ref": "516" + }, + "value": { + "$id": "2959", + "capacity": { + "$id": "2960", + "kind": "number", + "type": { + "$ref": "518" + }, + "value": 20 + }, + "minCapacity": { + "$id": "2961", + "kind": "number", + "type": { + "$ref": "522" + }, + "value": 10 + }, + "allocationStrategy": { + "$id": "2962", + "kind": "string", + "type": { + "$ref": "44" + }, + "value": "LowestPrice" + } + } + }, + "vmSizesProfile": { + "$id": "2963", + "kind": "array", + "type": { + "$ref": "531" + }, + "value": [ + { + "$id": "2964", + "kind": "model", + "type": { + "$ref": "532" + }, + "value": { + "$id": "2965", + "name": { + "$id": "2966", + "kind": "string", + "type": { + "$ref": "534" + }, + "value": "Standard_d1_v2" + }, + "rank": { + "$id": "2967", + "kind": "number", + "type": { + "$ref": "538" + }, + "value": 19225 + } + } + } + ] + }, + "computeProfile": { + "$id": "2968", + "kind": "model", + "type": { + "$ref": "1449" + }, + "value": { + "$id": "2969", + "baseVirtualMachineProfile": { + "$id": "2970", + "kind": "model", + "type": { + "$ref": "644" + }, + "value": { + "$id": "2971", + "osProfile": { + "$id": "2972", + "kind": "model", + "type": { + "$ref": "646" + }, + "value": { + "$id": "2973", + "computerNamePrefix": { + "$id": "2974", + "kind": "string", + "type": { + "$ref": "648" + }, + "value": "o" + }, + "adminUsername": { + "$id": "2975", + "kind": "string", + "type": { + "$ref": "652" + }, + "value": "nrgzqciiaaxjrqldbmjbqkyhntp" + }, + "windowsConfiguration": { + "$id": "2976", + "kind": "model", + "type": { + "$ref": "664" + }, + "value": { + "$id": "2977", + "provisionVMAgent": { + "$id": "2978", + "kind": "boolean", + "type": { + "$ref": "666" + }, + "value": true + }, + "enableAutomaticUpdates": { + "$id": "2979", + "kind": "boolean", + "type": { + "$ref": "670" + }, + "value": true + }, + "timeZone": { + "$id": "2980", + "kind": "string", + "type": { + "$ref": "674" + }, + "value": "hlyjiqcfksgrpjrct" + }, + "additionalUnattendContent": { + "$id": "2981", + "kind": "array", + "type": { + "$ref": "678" + }, + "value": [ + { + "$id": "2982", + "kind": "model", + "type": { + "$ref": "679" + }, + "value": { + "$id": "2983", + "passName": { + "$id": "2984", + "kind": "string", + "type": { + "$ref": "681" + }, + "value": "OobeSystem" + }, + "componentName": { + "$id": "2985", + "kind": "string", + "type": { + "$ref": "685" + }, + "value": "Microsoft-Windows-Shell-Setup" + }, + "settingName": { + "$id": "2986", + "kind": "string", + "type": { + "$ref": "116" + }, + "value": "AutoLogon" + } + } + } + ] + }, + "patchSettings": { + "$id": "2987", + "kind": "model", + "type": { + "$ref": "698" + }, + "value": { + "$id": "2988", + "patchMode": { + "$id": "2989", + "kind": "string", + "type": { + "$ref": "122" + }, + "value": "Manual" + }, + "enableHotpatching": { + "$id": "2990", + "kind": "boolean", + "type": { + "$ref": "703" + }, + "value": true + }, + "assessmentMode": { + "$id": "2991", + "kind": "string", + "type": { + "$ref": "130" + }, + "value": "ImageDefault" + }, + "automaticByPlatformSettings": { + "$id": "2992", + "kind": "model", + "type": { + "$ref": "710" + }, + "value": { + "$id": "2993", + "rebootSetting": { + "$id": "2994", + "kind": "string", + "type": { + "$ref": "136" + }, + "value": "Unknown" + }, + "bypassPlatformSafetyChecksOnUserSchedule": { + "$id": "2995", + "kind": "boolean", + "type": { + "$ref": "715" + }, + "value": true + } + } + } + } + }, + "winRM": { + "$id": "2996", + "kind": "model", + "type": { + "$ref": "723" + }, + "value": { + "$id": "2997", + "listeners": { + "$id": "2998", + "kind": "array", + "type": { + "$ref": "725" + }, + "value": [ + { + "$id": "2999", + "kind": "model", + "type": { + "$ref": "726" + }, + "value": { + "$id": "3000", + "protocol": { + "$id": "3001", + "kind": "string", + "type": { + "$ref": "146" + }, + "value": "Https" + }, + "certificateUrl": { + "$id": "3002", + "kind": "string", + "type": { + "$ref": "731" + }, + "value": "https://myVaultName.vault.azure.net/secrets/myCertName" + } + } + } + ] + } + } + }, + "enableVMAgentPlatformUpdates": { + "$id": "3003", + "kind": "boolean", + "type": { + "$ref": "739" + }, + "value": true + } + } + }, + "linuxConfiguration": { + "$id": "3004", + "kind": "model", + "type": { + "$ref": "745" + }, + "value": { + "$id": "3005", + "disablePasswordAuthentication": { + "$id": "3006", + "kind": "boolean", + "type": { + "$ref": "747" + }, + "value": true + }, + "ssh": { + "$id": "3007", + "kind": "model", + "type": { + "$ref": "751" + }, + "value": { + "$id": "3008", + "publicKeys": { + "$id": "3009", + "kind": "array", + "type": { + "$ref": "753" + }, + "value": [ + { + "$id": "3010", + "kind": "model", + "type": { + "$ref": "754" + }, + "value": { + "$id": "3011", + "path": { + "$id": "3012", + "kind": "string", + "type": { + "$ref": "756" + }, + "value": "kmqz" + }, + "keyData": { + "$id": "3013", + "kind": "string", + "type": { + "$ref": "760" + }, + "value": "kivgsubusvpprwqaqpjcmhsv" + } + } + } + ] + } + } + }, + "provisionVMAgent": { + "$id": "3014", + "kind": "boolean", + "type": { + "$ref": "768" + }, + "value": true + }, + "patchSettings": { + "$id": "3015", + "kind": "model", + "type": { + "$ref": "772" + }, + "value": { + "$id": "3016", + "patchMode": { + "$id": "3017", + "kind": "string", + "type": { + "$ref": "152" + }, + "value": "ImageDefault" + }, + "assessmentMode": { + "$id": "3018", + "kind": "string", + "type": { + "$ref": "158" + }, + "value": "ImageDefault" + }, + "automaticByPlatformSettings": { + "$id": "3019", + "kind": "model", + "type": { + "$ref": "780" + }, + "value": { + "$id": "3020", + "rebootSetting": { + "$id": "3021", + "kind": "string", + "type": { + "$ref": "164" + }, + "value": "Unknown" + }, + "bypassPlatformSafetyChecksOnUserSchedule": { + "$id": "3022", + "kind": "boolean", + "type": { + "$ref": "785" + }, + "value": true + } + } + } + } + }, + "enableVMAgentPlatformUpdates": { + "$id": "3023", + "kind": "boolean", + "type": { + "$ref": "793" + }, + "value": true + } + } + }, + "secrets": { + "$id": "3024", + "kind": "array", + "type": { + "$ref": "799" + }, + "value": [ + { + "$id": "3025", + "kind": "model", + "type": { + "$ref": "800" + }, + "value": { + "$id": "3026", + "sourceVault": { + "$id": "3027", + "kind": "model", + "type": { + "$ref": "802" + }, + "value": { + "$id": "3028", + "id": { + "$id": "3029", + "kind": "string", + "type": { + "$ref": "804" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}" + } + } + }, + "vaultCertificates": { + "$id": "3030", + "kind": "array", + "type": { + "$ref": "811" + }, + "value": [ + { + "$id": "3031", + "kind": "model", + "type": { + "$ref": "812" + }, + "value": { + "$id": "3032", + "certificateUrl": { + "$id": "3033", + "kind": "string", + "type": { + "$ref": "814" + }, + "value": "https://myVaultName.vault.azure.net/secrets/myCertName" + }, + "certificateStore": { + "$id": "3034", + "kind": "string", + "type": { + "$ref": "818" + }, + "value": "nlxrwavpzhueffxsshlun" + } + } + } + ] + } + } + } + ] + }, + "allowExtensionOperations": { + "$id": "3035", + "kind": "boolean", + "type": { + "$ref": "826" + }, + "value": true + }, + "requireGuestProvisionSignal": { + "$id": "3036", + "kind": "boolean", + "type": { + "$ref": "830" + }, + "value": true + } + } + }, + "storageProfile": { + "$id": "3037", + "kind": "model", + "type": { + "$ref": "836" + }, + "value": { + "$id": "3038", + "imageReference": { + "$id": "3039", + "kind": "model", + "type": { + "$ref": "838" + }, + "value": { + "$id": "3040", + "publisher": { + "$id": "3041", + "kind": "string", + "type": { + "$ref": "845" + }, + "value": "mqxgwbiyjzmxavhbkd" + }, + "offer": { + "$id": "3042", + "kind": "string", + "type": { + "$ref": "849" + }, + "value": "isxgumkarlkomp" + }, + "sku": { + "$id": "3043", + "kind": "string", + "type": { + "$ref": "853" + }, + "value": "eojmppqcrnpmxirtp" + }, + "version": { + "$id": "3044", + "kind": "string", + "type": { + "$ref": "857" + }, + "value": "wvpcqefgtmqdgltiuz" + }, + "exactVersion": { + "$id": "3045", + "kind": "string", + "type": { + "$ref": "861" + }, + "value": "zjbntmiskjexlr" + }, + "sharedGalleryImageId": { + "$id": "3046", + "kind": "string", + "type": { + "$ref": "865" + }, + "value": "kmkgihoxwlawuuhcinfirktdwkmx" + }, + "communityGalleryImageId": { + "$id": "3047", + "kind": "string", + "type": { + "$ref": "869" + }, + "value": "vlqe" + }, + "id": { + "$id": "3048", + "kind": "string", + "type": { + "$ref": "840" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images/{imageName}/versions/{versionName}" + } + } + }, + "osDisk": { + "$id": "3049", + "kind": "model", + "type": { + "$ref": "875" + }, + "value": { + "$id": "3050", + "name": { + "$id": "3051", + "kind": "string", + "type": { + "$ref": "877" + }, + "value": "wfttw" + }, + "caching": { + "$id": "3052", + "kind": "string", + "type": { + "$ref": "174" + }, + "value": "None" + }, + "writeAcceleratorEnabled": { + "$id": "3053", + "kind": "boolean", + "type": { + "$ref": "884" + }, + "value": true + }, + "createOption": { + "$id": "3054", + "kind": "string", + "type": { + "$ref": "182" + }, + "value": "FromImage" + }, + "diffDiskSettings": { + "$id": "3055", + "kind": "model", + "type": { + "$ref": "891" + }, + "value": { + "$id": "3056", + "option": { + "$id": "3057", + "kind": "string", + "type": { + "$ref": "194" + }, + "value": "Local" + }, + "placement": { + "$id": "3058", + "kind": "string", + "type": { + "$ref": "198" + }, + "value": "CacheDisk" + } + } + }, + "diskSizeGB": { + "$id": "3059", + "kind": "number", + "type": { + "$ref": "901" + }, + "value": 14 + }, + "osType": { + "$id": "3060", + "kind": "string", + "type": { + "$ref": "206" + }, + "value": "Windows" + }, + "image": { + "$id": "3061", + "kind": "model", + "type": { + "$ref": "908" + }, + "value": { + "$id": "3062", + "uri": { + "$id": "3063", + "kind": "string", + "type": { + "$ref": "910" + }, + "value": "https://myStorageAccountName.blob.core.windows.net/myContainerName/myVhdName.vhd" + } + } + }, + "vhdContainers": { + "$id": "3064", + "kind": "array", + "type": { + "$ref": "916" + }, + "value": [ + { + "$id": "3065", + "kind": "string", + "type": { + "$ref": "917" + }, + "value": "tkzcwddtinkfpnfklatw" + } + ] + }, + "managedDisk": { + "$id": "3066", + "kind": "model", + "type": { + "$ref": "921" + }, + "value": { + "$id": "3067", + "storageAccountType": { + "$id": "3068", + "kind": "string", + "type": { + "$ref": "212" + }, + "value": "Standard_LRS" + }, + "diskEncryptionSet": { + "$id": "3069", + "kind": "model", + "type": { + "$ref": "926" + }, + "value": { + "$id": "3070", + "id": { + "$id": "3071", + "kind": "string", + "type": { + "$ref": "928" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}" + } + } + }, + "securityProfile": { + "$id": "3072", + "kind": "model", + "type": { + "$ref": "935" + }, + "value": { + "$id": "3073", + "securityEncryptionType": { + "$id": "3074", + "kind": "string", + "type": { + "$ref": "228" + }, + "value": "VMGuestStateOnly" + }, + "diskEncryptionSet": { + "$id": "3075", + "kind": "model", + "type": { + "$ref": "926" + }, + "value": { + "$id": "3076", + "id": { + "$id": "3077", + "kind": "string", + "type": { + "$ref": "928" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}" + } + } + } + } + } + } + }, + "deleteOption": { + "$id": "3078", + "kind": "string", + "type": { + "$ref": "236" + }, + "value": "Delete" + } + } + }, + "dataDisks": { + "$id": "3079", + "kind": "array", + "type": { + "$ref": "952" + }, + "value": [ + { + "$id": "3080", + "kind": "model", + "type": { + "$ref": "953" + }, + "value": { + "$id": "3081", + "name": { + "$id": "3082", + "kind": "string", + "type": { + "$ref": "955" + }, + "value": "eogiykmdmeikswxmigjws" + }, + "lun": { + "$id": "3083", + "kind": "number", + "type": { + "$ref": "959" + }, + "value": 14 + }, + "caching": { + "$id": "3084", + "kind": "string", + "type": { + "$ref": "174" + }, + "value": "None" + }, + "writeAcceleratorEnabled": { + "$id": "3085", + "kind": "boolean", + "type": { + "$ref": "966" + }, + "value": true + }, + "createOption": { + "$id": "3086", + "kind": "string", + "type": { + "$ref": "182" + }, + "value": "FromImage" + }, + "diskSizeGB": { + "$id": "3087", + "kind": "number", + "type": { + "$ref": "973" + }, + "value": 6 + }, + "managedDisk": { + "$id": "3088", + "kind": "model", + "type": { + "$ref": "921" + }, + "value": { + "$id": "3089", + "storageAccountType": { + "$id": "3090", + "kind": "string", + "type": { + "$ref": "212" + }, + "value": "Standard_LRS" + }, + "diskEncryptionSet": { + "$id": "3091", + "kind": "model", + "type": { + "$ref": "926" + }, + "value": { + "$id": "3092", + "id": { + "$id": "3093", + "kind": "string", + "type": { + "$ref": "928" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}" + } + } + }, + "securityProfile": { + "$id": "3094", + "kind": "model", + "type": { + "$ref": "935" + }, + "value": { + "$id": "3095", + "securityEncryptionType": { + "$id": "3096", + "kind": "string", + "type": { + "$ref": "228" + }, + "value": "VMGuestStateOnly" + }, + "diskEncryptionSet": { + "$id": "3097", + "kind": "model", + "type": { + "$ref": "926" + }, + "value": { + "$id": "3098", + "id": { + "$id": "3099", + "kind": "string", + "type": { + "$ref": "928" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}" + } + } + } + } + } + } + }, + "diskIOPSReadWrite": { + "$id": "3100", + "kind": "number", + "type": { + "$ref": "980" + }, + "value": 27 + }, + "diskMBpsReadWrite": { + "$id": "3101", + "kind": "number", + "type": { + "$ref": "984" + }, + "value": 2 + }, + "deleteOption": { + "$id": "3102", + "kind": "string", + "type": { + "$ref": "236" + }, + "value": "Delete" + } + } + } + ] + }, + "diskControllerType": { + "$id": "3103", + "kind": "string", + "type": { + "$ref": "242" + }, + "value": "uzb" + } + } + }, + "networkProfile": { + "$id": "3104", + "kind": "model", + "type": { + "$ref": "998" + }, + "value": { + "$id": "3105", + "healthProbe": { + "$id": "3106", + "kind": "model", + "type": { + "$ref": "1000" + }, + "value": { + "$id": "3107", + "id": { + "$id": "3108", + "kind": "string", + "type": { + "$ref": "1002" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/probes/{probeName}" + } + } + }, + "networkInterfaceConfigurations": { + "$id": "3109", + "kind": "array", + "type": { + "$ref": "1009" + }, + "value": [ + { + "$id": "3110", + "kind": "model", + "type": { + "$ref": "1010" + }, + "value": { + "$id": "3111", + "name": { + "$id": "3112", + "kind": "string", + "type": { + "$ref": "1012" + }, + "value": "i" + }, + "properties": { + "$id": "3113", + "kind": "model", + "type": { + "$ref": "1016" + }, + "value": { + "$id": "3114", + "primary": { + "$id": "3115", + "kind": "boolean", + "type": { + "$ref": "1018" + }, + "value": true + }, + "enableAcceleratedNetworking": { + "$id": "3116", + "kind": "boolean", + "type": { + "$ref": "1022" + }, + "value": true + }, + "disableTcpStateTracking": { + "$id": "3117", + "kind": "boolean", + "type": { + "$ref": "1026" + }, + "value": true + }, + "enableFpga": { + "$id": "3118", + "kind": "boolean", + "type": { + "$ref": "1030" + }, + "value": true + }, + "networkSecurityGroup": { + "$id": "3119", + "kind": "model", + "type": { + "$ref": "802" + }, + "value": { + "$id": "3120", + "id": { + "$id": "3121", + "kind": "string", + "type": { + "$ref": "804" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/{networkSecurityGroupName}" + } + } + }, + "dnsSettings": { + "$id": "3122", + "kind": "model", + "type": { + "$ref": "1037" + }, + "value": { + "$id": "3123", + "dnsServers": { + "$id": "3124", + "kind": "array", + "type": { + "$ref": "1039" + }, + "value": [ + { + "$id": "3125", + "kind": "string", + "type": { + "$ref": "1040" + }, + "value": "nxmmfolhclsesu" + } + ] + } + } + }, + "ipConfigurations": { + "$id": "3126", + "kind": "array", + "type": { + "$ref": "1046" + }, + "value": [ + { + "$id": "3127", + "kind": "model", + "type": { + "$ref": "1047" + }, + "value": { + "$id": "3128", + "name": { + "$id": "3129", + "kind": "string", + "type": { + "$ref": "1049" + }, + "value": "oezqhkidfhyywlfzwuotilrpbqnjg" + }, + "properties": { + "$id": "3130", + "kind": "model", + "type": { + "$ref": "1053" + }, + "value": { + "$id": "3131", + "subnet": { + "$id": "3132", + "kind": "model", + "type": { + "$ref": "1000" + }, + "value": { + "$id": "3133", + "id": { + "$id": "3134", + "kind": "string", + "type": { + "$ref": "1002" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}" + } + } + }, + "primary": { + "$id": "3135", + "kind": "boolean", + "type": { + "$ref": "1058" + }, + "value": true + }, + "publicIPAddressConfiguration": { + "$id": "3136", + "kind": "model", + "type": { + "$ref": "1062" + }, + "value": { + "$id": "3137", + "name": { + "$id": "3138", + "kind": "string", + "type": { + "$ref": "1064" + }, + "value": "fvpqf" + }, + "properties": { + "$id": "3139", + "kind": "model", + "type": { + "$ref": "1068" + }, + "value": { + "$id": "3140", + "idleTimeoutInMinutes": { + "$id": "3141", + "kind": "number", + "type": { + "$ref": "1070" + }, + "value": 9 + }, + "dnsSettings": { + "$id": "3142", + "kind": "model", + "type": { + "$ref": "1074" + }, + "value": { + "$id": "3143", + "domainNameLabel": { + "$id": "3144", + "kind": "string", + "type": { + "$ref": "1076" + }, + "value": "ukrddzvmorpmfsczjwtbvp" + }, + "domainNameLabelScope": { + "$id": "3145", + "kind": "string", + "type": { + "$ref": "248" + }, + "value": "TenantReuse" + } + } + }, + "ipTags": { + "$id": "3146", + "kind": "array", + "type": { + "$ref": "1085" + }, + "value": [ + { + "$id": "3147", + "kind": "model", + "type": { + "$ref": "1086" + }, + "value": { + "$id": "3148", + "ipTagType": { + "$id": "3149", + "kind": "string", + "type": { + "$ref": "1088" + }, + "value": "sddgsoemnzgqizale" + }, + "tag": { + "$id": "3150", + "kind": "string", + "type": { + "$ref": "1092" + }, + "value": "wufmhrjsakbiaetyara" + } + } + } + ] + }, + "publicIPPrefix": { + "$id": "3151", + "kind": "model", + "type": { + "$ref": "802" + }, + "value": { + "$id": "3152", + "id": { + "$id": "3153", + "kind": "string", + "type": { + "$ref": "804" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes/{publicIPPrefixName}" + } + } + }, + "publicIPAddressVersion": { + "$id": "3154", + "kind": "string", + "type": { + "$ref": "258" + }, + "value": "IPv4" + }, + "deleteOption": { + "$id": "3155", + "kind": "string", + "type": { + "$ref": "264" + }, + "value": "Delete" + } + } + }, + "sku": { + "$id": "3156", + "kind": "model", + "type": { + "$ref": "1109" + }, + "value": { + "$id": "3157", + "name": { + "$id": "3158", + "kind": "string", + "type": { + "$ref": "270" + }, + "value": "Basic" + }, + "tier": { + "$id": "3159", + "kind": "string", + "type": { + "$ref": "276" + }, + "value": "Regional" + } + } + } + } + }, + "privateIPAddressVersion": { + "$id": "3160", + "kind": "string", + "type": { + "$ref": "258" + }, + "value": "IPv4" + }, + "applicationGatewayBackendAddressPools": { + "$id": "3161", + "kind": "array", + "type": { + "$ref": "1124" + }, + "value": [ + { + "$id": "3162", + "kind": "model", + "type": { + "$ref": "802" + }, + "value": { + "$id": "3163", + "id": { + "$id": "3164", + "kind": "string", + "type": { + "$ref": "804" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}/backendAddressPools/{backendAddressPoolName}" + } + } + } + ] + }, + "applicationSecurityGroups": { + "$id": "3165", + "kind": "array", + "type": { + "$ref": "1128" + }, + "value": [ + { + "$id": "3166", + "kind": "model", + "type": { + "$ref": "802" + }, + "value": { + "$id": "3167", + "id": { + "$id": "3168", + "kind": "string", + "type": { + "$ref": "804" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationSecurityGroups/{applicationSecurityGroupName}" + } + } + } + ] + }, + "loadBalancerBackendAddressPools": { + "$id": "3169", + "kind": "array", + "type": { + "$ref": "1132" + }, + "value": [ + { + "$id": "3170", + "kind": "model", + "type": { + "$ref": "802" + }, + "value": { + "$id": "3171", + "id": { + "$id": "3172", + "kind": "string", + "type": { + "$ref": "804" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/backendAddressPools/{backendAddressPoolName}" + } + } + } + ] + }, + "loadBalancerInboundNatPools": { + "$id": "3173", + "kind": "array", + "type": { + "$ref": "1136" + }, + "value": [ + { + "$id": "3174", + "kind": "model", + "type": { + "$ref": "802" + }, + "value": { + "$id": "3175", + "id": { + "$id": "3176", + "kind": "string", + "type": { + "$ref": "804" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/inboundNatPools/{inboundNatPoolName}" + } + } + } + ] + } + } + } + } + } + ] + }, + "enableIPForwarding": { + "$id": "3177", + "kind": "boolean", + "type": { + "$ref": "1144" + }, + "value": true + }, + "deleteOption": { + "$id": "3178", + "kind": "string", + "type": { + "$ref": "264" + }, + "value": "Delete" + }, + "auxiliaryMode": { + "$id": "3179", + "kind": "string", + "type": { + "$ref": "282" + }, + "value": "None" + }, + "auxiliarySku": { + "$id": "3180", + "kind": "string", + "type": { + "$ref": "290" + }, + "value": "None" + } + } + } + } + } + ] + }, + "networkApiVersion": { + "$id": "3181", + "kind": "string", + "type": { + "$ref": "302" + }, + "value": "2020-11-01" + } + } + }, + "securityProfile": { + "$id": "3182", + "kind": "model", + "type": { + "$ref": "1166" + }, + "value": { + "$id": "3183", + "uefiSettings": { + "$id": "3184", + "kind": "model", + "type": { + "$ref": "1168" + }, + "value": { + "$id": "3185", + "secureBootEnabled": { + "$id": "3186", + "kind": "boolean", + "type": { + "$ref": "1170" + }, + "value": true + }, + "vTpmEnabled": { + "$id": "3187", + "kind": "boolean", + "type": { + "$ref": "1174" + }, + "value": true + } + } + }, + "encryptionAtHost": { + "$id": "3188", + "kind": "boolean", + "type": { + "$ref": "1180" + }, + "value": true + }, + "securityType": { + "$id": "3189", + "kind": "string", + "type": { + "$ref": "306" + }, + "value": "TrustedLaunch" + }, + "encryptionIdentity": { + "$id": "3190", + "kind": "model", + "type": { + "$ref": "1187" + }, + "value": { + "$id": "3191", + "userAssignedIdentityResourceId": { + "$id": "3192", + "kind": "string", + "type": { + "$ref": "1189" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{userAssignedIdentityName}" + } + } + }, + "proxyAgentSettings": { + "$id": "3193", + "kind": "model", + "type": { + "$ref": "1196" + }, + "value": { + "$id": "3194", + "enabled": { + "$id": "3195", + "kind": "boolean", + "type": { + "$ref": "1198" + }, + "value": true + }, + "mode": { + "$id": "3196", + "kind": "string", + "type": { + "$ref": "312" + }, + "value": "Audit" + }, + "keyIncarnationId": { + "$id": "3197", + "kind": "number", + "type": { + "$ref": "1205" + }, + "value": 20 + } + } + } + } + }, + "diagnosticsProfile": { + "$id": "3198", + "kind": "model", + "type": { + "$ref": "1213" + }, + "value": { + "$id": "3199", + "bootDiagnostics": { + "$id": "3200", + "kind": "model", + "type": { + "$ref": "1215" + }, + "value": { + "$id": "3201", + "enabled": { + "$id": "3202", + "kind": "boolean", + "type": { + "$ref": "1217" + }, + "value": true + }, + "storageUri": { + "$id": "3203", + "kind": "string", + "type": { + "$ref": "1221" + }, + "value": "http://myStorageAccountName.blob.core.windows.net" + } + } + } + } + }, + "extensionProfile": { + "$id": "3204", + "kind": "model", + "type": { + "$ref": "1229" + }, + "value": { + "$id": "3205", + "extensions": { + "$id": "3206", + "kind": "array", + "type": { + "$ref": "1231" + }, + "value": [ + { + "$id": "3207", + "kind": "model", + "type": { + "$ref": "1232" + }, + "value": { + "$id": "3208", + "name": { + "$id": "3209", + "kind": "string", + "type": { + "$ref": "1239" + }, + "value": "bndxuxx" + }, + "type": { + "$id": "3210", + "kind": "string", + "type": { + "$ref": "1243" + }, + "value": "cmeam" + }, + "properties": { + "$id": "3211", + "kind": "model", + "type": { + "$ref": "1247" + }, + "value": { + "$id": "3212", + "forceUpdateTag": { + "$id": "3213", + "kind": "string", + "type": { + "$ref": "1249" + }, + "value": "yhgxw" + }, + "publisher": { + "$id": "3214", + "kind": "string", + "type": { + "$ref": "1253" + }, + "value": "kpxtirxjfprhs" + }, + "type": { + "$id": "3215", + "kind": "string", + "type": { + "$ref": "1257" + }, + "value": "pgjilctjjwaa" + }, + "typeHandlerVersion": { + "$id": "3216", + "kind": "string", + "type": { + "$ref": "1261" + }, + "value": "zevivcoilxmbwlrihhhibq" + }, + "autoUpgradeMinorVersion": { + "$id": "3217", + "kind": "boolean", + "type": { + "$ref": "1265" + }, + "value": true + }, + "enableAutomaticUpgrade": { + "$id": "3218", + "kind": "boolean", + "type": { + "$ref": "1269" + }, + "value": true + }, + "settings": { + "$id": "3219", + "kind": "dict", + "type": { + "$ref": "1273" + }, + "value": { + "$id": "3220" + } + }, + "provisioningState": { + "$id": "3221", + "kind": "string", + "type": { + "$ref": "1285" + }, + "value": "Succeeded" + }, + "provisionAfterExtensions": { + "$id": "3222", + "kind": "array", + "type": { + "$ref": "1289" + }, + "value": [ + { + "$id": "3223", + "kind": "string", + "type": { + "$ref": "1290" + }, + "value": "nftzosroolbcwmpupujzqwqe" + } + ] + }, + "suppressFailures": { + "$id": "3224", + "kind": "boolean", + "type": { + "$ref": "1294" + }, + "value": true + }, + "protectedSettingsFromKeyVault": { + "$id": "3225", + "kind": "model", + "type": { + "$ref": "1298" + }, + "value": { + "$id": "3226", + "secretUrl": { + "$id": "3227", + "kind": "string", + "type": { + "$ref": "1300" + }, + "value": "https://myVaultName.vault.azure.net/secrets/secret/mySecretName" + }, + "sourceVault": { + "$id": "3228", + "kind": "model", + "type": { + "$ref": "802" + }, + "value": { + "$id": "3229", + "id": { + "$id": "3230", + "kind": "string", + "type": { + "$ref": "804" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}" + } + } + } + } + } + } + }, + "id": { + "$id": "3231", + "kind": "string", + "type": { + "$ref": "1234" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/extensions/{extensionName}" + } + } + } + ] + }, + "extensionsTimeBudget": { + "$id": "3232", + "kind": "string", + "type": { + "$ref": "1313" + }, + "value": "mbhjahtdygwgyszdwjtvlvtgchdwil" + } + } + }, + "licenseType": { + "$id": "3233", + "kind": "string", + "type": { + "$ref": "1319" + }, + "value": "v" + }, + "scheduledEventsProfile": { + "$id": "3234", + "kind": "model", + "type": { + "$ref": "1323" + }, + "value": { + "$id": "3235", + "terminateNotificationProfile": { + "$id": "3236", + "kind": "model", + "type": { + "$ref": "1325" + }, + "value": { + "$id": "3237", + "notBeforeTimeout": { + "$id": "3238", + "kind": "string", + "type": { + "$ref": "1327" + }, + "value": "iljppmmw" + }, + "enable": { + "$id": "3239", + "kind": "boolean", + "type": { + "$ref": "1331" + }, + "value": true + } + } + }, + "osImageNotificationProfile": { + "$id": "3240", + "kind": "model", + "type": { + "$ref": "1337" + }, + "value": { + "$id": "3241", + "notBeforeTimeout": { + "$id": "3242", + "kind": "string", + "type": { + "$ref": "1339" + }, + "value": "olbpadmevekyczfokodtfprxti" + }, + "enable": { + "$id": "3243", + "kind": "boolean", + "type": { + "$ref": "1343" + }, + "value": true + } + } + } + } + }, + "userData": { + "$id": "3244", + "kind": "string", + "type": { + "$ref": "1351" + }, + "value": "s" + }, + "capacityReservation": { + "$id": "3245", + "kind": "model", + "type": { + "$ref": "1355" + }, + "value": { + "$id": "3246", + "capacityReservationGroup": { + "$id": "3247", + "kind": "model", + "type": { + "$ref": "802" + }, + "value": { + "$id": "3248", + "id": { + "$id": "3249", + "kind": "string", + "type": { + "$ref": "804" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/capacityReservationGroups/{capacityReservationGroupName}" + } + } + } + } + }, + "applicationProfile": { + "$id": "3250", + "kind": "model", + "type": { + "$ref": "1362" + }, + "value": { + "$id": "3251", + "galleryApplications": { + "$id": "3252", + "kind": "array", + "type": { + "$ref": "1364" + }, + "value": [ + { + "$id": "3253", + "kind": "model", + "type": { + "$ref": "1365" + }, + "value": { + "$id": "3254", + "tags": { + "$id": "3255", + "kind": "string", + "type": { + "$ref": "1367" + }, + "value": "eyrqjbib" + }, + "order": { + "$id": "3256", + "kind": "number", + "type": { + "$ref": "1371" + }, + "value": 5 + }, + "packageReferenceId": { + "$id": "3257", + "kind": "string", + "type": { + "$ref": "1375" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/applications/{applicationName}/versions/{versionName}" + }, + "treatFailureAsDeploymentFailure": { + "$id": "3258", + "kind": "boolean", + "type": { + "$ref": "1384" + }, + "value": true + }, + "enableAutomaticUpgrade": { + "$id": "3259", + "kind": "boolean", + "type": { + "$ref": "1388" + }, + "value": true + } + } + } + ] + } + } + }, + "hardwareProfile": { + "$id": "3260", + "kind": "model", + "type": { + "$ref": "1396" + }, + "value": { + "$id": "3261", + "vmSizeProperties": { + "$id": "3262", + "kind": "model", + "type": { + "$ref": "1398" + }, + "value": { + "$id": "3263", + "vCPUsAvailable": { + "$id": "3264", + "kind": "number", + "type": { + "$ref": "1400" + }, + "value": 16 + }, + "vCPUsPerCore": { + "$id": "3265", + "kind": "number", + "type": { + "$ref": "1404" + }, + "value": 23 + } + } + } + } + }, + "serviceArtifactReference": { + "$id": "3266", + "kind": "model", + "type": { + "$ref": "1412" + }, + "value": { + "$id": "3267", + "id": { + "$id": "3268", + "kind": "string", + "type": { + "$ref": "1414" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/serviceArtifacts/{serviceArtifactsName}/vmArtifactsProfiles/{vmArtifactsProfileName}" + } + } + }, + "securityPostureReference": { + "$id": "3269", + "kind": "model", + "type": { + "$ref": "1421" + }, + "value": { + "$id": "3270", + "id": { + "$id": "3271", + "kind": "string", + "type": { + "$ref": "1423" + }, + "value": "/CommunityGalleries/{communityGalleryName}/securityPostures/{securityPostureName}/versions/{major.minor.patch}|{major.*}|latest" + }, + "excludeExtensions": { + "$id": "3272", + "kind": "array", + "type": { + "$ref": "1427" + }, + "value": [ + { + "$id": "3273", + "kind": "string", + "type": { + "$ref": "1428" + }, + "value": "{securityPostureVMExtensionName}" + } + ] + }, + "isOverridable": { + "$id": "3274", + "kind": "boolean", + "type": { + "$ref": "1432" + }, + "value": true + } + } + }, + "timeCreated": { + "$id": "3275", + "kind": "string", + "type": { + "$ref": "1438" + }, + "value": "2024-04-29T21:51:44.043Z" + } + } + }, + "computeApiVersion": { + "$id": "3276", + "kind": "string", + "type": { + "$ref": "1454" + }, + "value": "2023-07-01" + }, + "platformFaultDomainCount": { + "$id": "3277", + "kind": "number", + "type": { + "$ref": "1458" + }, + "value": 1 + } + } + }, + "timeCreated": { + "$id": "3278", + "kind": "string", + "type": { + "$ref": "1476" + }, + "value": "2024-07-10T00:16:34.8590555+00:00" + }, + "uniqueId": { + "$id": "3279", + "kind": "string", + "type": { + "$ref": "1481" + }, + "value": "a2f7fabd-bbc2-4a20-afe1-49fdb3885a28" + } + } + }, + "zones": { + "$id": "3280", + "kind": "array", + "type": { + "$ref": "1487" + }, + "value": [ + { + "$id": "3281", + "kind": "string", + "type": { + "$ref": "1488" + }, + "value": "zone1" + }, + { + "$id": "3282", + "kind": "string", + "type": { + "$ref": "1488" + }, + "value": "zone2" + } + ] + }, + "identity": { + "$id": "3283", + "kind": "model", + "type": { + "$ref": "1492" + }, + "value": { + "$id": "3284", + "principalId": { + "$id": "3285", + "kind": "string", + "type": { + "$ref": "1494" + }, + "value": "4d508e5b-374b-4382-9a1c-01fb8b6cb37c" + }, + "tenantId": { + "$id": "3286", + "kind": "string", + "type": { + "$ref": "1499" + }, + "value": "5d508e5b-374b-4382-9a1c-01fb8b6cb37c" + }, + "type": { + "$id": "3287", + "kind": "string", + "type": { + "$ref": "318" + }, + "value": "UserAssigned" + }, + "userAssignedIdentities": { + "$id": "3288", + "kind": "dict", + "type": { + "$ref": "1507" + }, + "value": { + "$id": "3289", + "key9851": { + "$id": "3290", + "kind": "model", + "type": { + "$ref": "1510" + }, + "value": { + "$id": "3291", + "principalId": { + "$id": "3292", + "kind": "string", + "type": { + "$ref": "1517" + }, + "value": "6d508e5b-374b-4382-9a1c-01fb8b6cb37c" + }, + "clientId": { + "$id": "3293", + "kind": "string", + "type": { + "$ref": "1512" + }, + "value": "7d508e5b-374b-4382-9a1c-01fb8b6cb37c" + } + } + } + } + } + } + }, + "tags": { + "$id": "3294", + "kind": "dict", + "type": { + "$ref": "475" + }, + "value": { + "$id": "3295", + "key3518": { + "$id": "3296", + "kind": "string", + "type": { + "$ref": "477" + }, + "value": "luvrnuvsgdpbuofdskkcoqhfh" + } + } + }, + "plan": { + "$id": "3297", + "kind": "model", + "type": { + "$ref": "1526" + }, + "value": { + "$id": "3298", + "name": { + "$id": "3299", + "kind": "string", + "type": { + "$ref": "1528" + }, + "value": "jwgrcrnrtfoxn" + }, + "publisher": { + "$id": "3300", + "kind": "string", + "type": { + "$ref": "1532" + }, + "value": "iozjbiqqckqm" + }, + "product": { + "$id": "3301", + "kind": "string", + "type": { + "$ref": "1536" + }, + "value": "cgopbyvdyqikahwyxfpzwaqk" + }, + "promotionCode": { + "$id": "3302", + "kind": "string", + "type": { + "$ref": "1540" + }, + "value": "naglezezplcaruqogtxnuizslqnnbr" + }, + "version": { + "$id": "3303", + "kind": "string", + "type": { + "$ref": "1544" + }, + "value": "wa" + } + } + }, + "location": { + "$id": "3304", + "kind": "string", + "type": { + "$ref": "481" + }, + "value": "westus" + }, + "id": { + "$id": "3305", + "kind": "string", + "type": { + "$ref": "433" + }, + "value": "/subscriptions/7B0CD4DB-3381-4013-9B31-FB6E6FD0FF1C/resourceGroups/rgazurefleet/providers/Microsoft.AzureFleet/fleets/testFleet" + }, + "name": { + "$id": "3306", + "kind": "string", + "type": { + "$ref": "438" + }, + "value": "testFleet" + }, + "type": { + "$id": "3307", + "kind": "string", + "type": { + "$ref": "442" + }, + "value": "Microsoft.AzureFleet/fleets" + }, + "systemData": { + "$id": "3308", + "kind": "model", + "type": { + "$ref": "447" + }, + "value": { + "$id": "3309", + "createdBy": { + "$id": "3310", + "kind": "string", + "type": { + "$ref": "449" + }, + "value": "rowegentrpoajsv" + }, + "createdByType": { + "$id": "3311", + "kind": "string", + "type": { + "$ref": "328" + }, + "value": "User" + }, + "createdAt": { + "$id": "3312", + "kind": "string", + "type": { + "$ref": "456" + }, + "value": "2024-04-29T21:51:44.043Z" + }, + "lastModifiedBy": { + "$id": "3313", + "kind": "string", + "type": { + "$ref": "461" + }, + "value": "edwuayhhaoepxzisfaqjhmrxjq" + }, + "lastModifiedByType": { + "$id": "3314", + "kind": "string", + "type": { + "$ref": "328" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "3315", + "kind": "string", + "type": { + "$ref": "468" + }, + "value": "2024-04-29T21:51:44.043Z" + } + } + } + } + } + } + ] + }, + { + "$id": "3316", + "kind": "http", + "name": "Fleets_CreateOrUpdate_MinimumSet", + "description": "Fleets_CreateOrUpdate_MinimumSet", + "filePath": "2024-11-01/Fleets_CreateOrUpdate_MinimumSet.json", + "parameters": [ + { + "$id": "3317", + "parameter": { + "$ref": "2182" + }, + "value": { + "$id": "3318", + "kind": "string", + "type": { + "$ref": "2183" + }, + "value": "2024-11-01" + } + }, + { + "$id": "3319", + "parameter": { + "$ref": "2186" + }, + "value": { + "$id": "3320", + "kind": "string", + "type": { + "$ref": "2187" + }, + "value": "1DC2F28C-A625-4B0E-9748-9885A3C9E9EB" + } + }, + { + "$id": "3321", + "parameter": { + "$ref": "2189" + }, + "value": { + "$id": "3322", + "kind": "string", + "type": { + "$ref": "2190" + }, + "value": "rgazurefleet" + } + }, + { + "$id": "3323", + "parameter": { + "$ref": "2191" + }, + "value": { + "$id": "3324", + "kind": "string", + "type": { + "$ref": "2192" + }, + "value": "testFleet" + } + }, + { + "$id": "3325", + "parameter": { + "$ref": "2199" + }, + "value": { + "$id": "3326", + "kind": "model", + "type": { + "$ref": "429" + }, + "value": { + "$id": "3327", + "properties": { + "$id": "3328", + "kind": "model", + "type": { + "$ref": "485" + }, + "value": { + "$id": "3329", + "spotPriorityProfile": { + "$id": "3330", + "kind": "model", + "type": { + "$ref": "490" + }, + "value": { + "$id": "3331", + "capacity": { + "$id": "3332", + "kind": "number", + "type": { + "$ref": "492" + }, + "value": 2 + }, + "minCapacity": { + "$id": "3333", + "kind": "number", + "type": { + "$ref": "496" + }, + "value": 1 + }, + "evictionPolicy": { + "$id": "3334", + "kind": "string", + "type": { + "$ref": "30" + }, + "value": "Delete" + }, + "allocationStrategy": { + "$id": "3335", + "kind": "string", + "type": { + "$ref": "36" + }, + "value": "PriceCapacityOptimized" + }, + "maintain": { + "$id": "3336", + "kind": "boolean", + "type": { + "$ref": "510" + }, + "value": true + } + } + }, + "regularPriorityProfile": { + "$id": "3337", + "kind": "model", + "type": { + "$ref": "516" + }, + "value": { + "$id": "3338", + "capacity": { + "$id": "3339", + "kind": "number", + "type": { + "$ref": "518" + }, + "value": 2 + }, + "minCapacity": { + "$id": "3340", + "kind": "number", + "type": { + "$ref": "522" + }, + "value": 1 + }, + "allocationStrategy": { + "$id": "3341", + "kind": "string", + "type": { + "$ref": "44" + }, + "value": "LowestPrice" + } + } + }, + "vmSizesProfile": { + "$id": "3342", + "kind": "array", + "type": { + "$ref": "531" + }, + "value": [ + { + "$id": "3343", + "kind": "model", + "type": { + "$ref": "532" + }, + "value": { + "$id": "3344", + "name": { + "$id": "3345", + "kind": "string", + "type": { + "$ref": "534" + }, + "value": "Standard_D2s_v3" + } + } + }, + { + "$id": "3346", + "kind": "model", + "type": { + "$ref": "532" + }, + "value": { + "$id": "3347", + "name": { + "$id": "3348", + "kind": "string", + "type": { + "$ref": "534" + }, + "value": "Standard_D4s_v3" + } + } + }, + { + "$id": "3349", + "kind": "model", + "type": { + "$ref": "532" + }, + "value": { + "$id": "3350", + "name": { + "$id": "3351", + "kind": "string", + "type": { + "$ref": "534" + }, + "value": "Standard_E2s_v3" + } + } + } + ] + }, + "computeProfile": { + "$id": "3352", + "kind": "model", + "type": { + "$ref": "1449" + }, + "value": { + "$id": "3353", + "baseVirtualMachineProfile": { + "$id": "3354", + "kind": "model", + "type": { + "$ref": "644" + }, + "value": { + "$id": "3355", + "storageProfile": { + "$id": "3356", + "kind": "model", + "type": { + "$ref": "836" + }, + "value": { + "$id": "3357", + "imageReference": { + "$id": "3358", + "kind": "model", + "type": { + "$ref": "838" + }, + "value": { + "$id": "3359", + "publisher": { + "$id": "3360", + "kind": "string", + "type": { + "$ref": "845" + }, + "value": "canonical" + }, + "offer": { + "$id": "3361", + "kind": "string", + "type": { + "$ref": "849" + }, + "value": "0001-com-ubuntu-server-focal" + }, + "sku": { + "$id": "3362", + "kind": "string", + "type": { + "$ref": "853" + }, + "value": "20_04-lts-gen2" + }, + "version": { + "$id": "3363", + "kind": "string", + "type": { + "$ref": "857" + }, + "value": "latest" + } + } + }, + "osDisk": { + "$id": "3364", + "kind": "model", + "type": { + "$ref": "875" + }, + "value": { + "$id": "3365", + "caching": { + "$id": "3366", + "kind": "string", + "type": { + "$ref": "174" + }, + "value": "ReadWrite" + }, + "createOption": { + "$id": "3367", + "kind": "string", + "type": { + "$ref": "182" + }, + "value": "FromImage" + }, + "osType": { + "$id": "3368", + "kind": "string", + "type": { + "$ref": "206" + }, + "value": "Linux" + }, + "managedDisk": { + "$id": "3369", + "kind": "model", + "type": { + "$ref": "921" + }, + "value": { + "$id": "3370", + "storageAccountType": { + "$id": "3371", + "kind": "string", + "type": { + "$ref": "212" + }, + "value": "Standard_LRS" + } + } + } + } + } + } + }, + "osProfile": { + "$id": "3372", + "kind": "model", + "type": { + "$ref": "646" + }, + "value": { + "$id": "3373", + "computerNamePrefix": { + "$id": "3374", + "kind": "string", + "type": { + "$ref": "648" + }, + "value": "prefix" + }, + "adminUsername": { + "$id": "3375", + "kind": "string", + "type": { + "$ref": "652" + }, + "value": "azureuser" + }, + "adminPassword": { + "$id": "3376", + "kind": "string", + "type": { + "$ref": "656" + }, + "value": "TestPassword$0" + }, + "linuxConfiguration": { + "$id": "3377", + "kind": "model", + "type": { + "$ref": "745" + }, + "value": { + "$id": "3378", + "disablePasswordAuthentication": { + "$id": "3379", + "kind": "boolean", + "type": { + "$ref": "747" + }, + "value": false + } + } + } + } + }, + "networkProfile": { + "$id": "3380", + "kind": "model", + "type": { + "$ref": "998" + }, + "value": { + "$id": "3381", + "networkInterfaceConfigurations": { + "$id": "3382", + "kind": "array", + "type": { + "$ref": "1009" + }, + "value": [ + { + "$id": "3383", + "kind": "model", + "type": { + "$ref": "1010" + }, + "value": { + "$id": "3384", + "name": { + "$id": "3385", + "kind": "string", + "type": { + "$ref": "1012" + }, + "value": "vmNameTest" + }, + "properties": { + "$id": "3386", + "kind": "model", + "type": { + "$ref": "1016" + }, + "value": { + "$id": "3387", + "primary": { + "$id": "3388", + "kind": "boolean", + "type": { + "$ref": "1018" + }, + "value": true + }, + "enableAcceleratedNetworking": { + "$id": "3389", + "kind": "boolean", + "type": { + "$ref": "1022" + }, + "value": false + }, + "ipConfigurations": { + "$id": "3390", + "kind": "array", + "type": { + "$ref": "1046" + }, + "value": [ + { + "$id": "3391", + "kind": "model", + "type": { + "$ref": "1047" + }, + "value": { + "$id": "3392", + "name": { + "$id": "3393", + "kind": "string", + "type": { + "$ref": "1049" + }, + "value": "vmNameTest" + }, + "properties": { + "$id": "3394", + "kind": "model", + "type": { + "$ref": "1053" + }, + "value": { + "$id": "3395", + "subnet": { + "$id": "3396", + "kind": "model", + "type": { + "$ref": "1000" + }, + "value": { + "$id": "3397", + "id": { + "$id": "3398", + "kind": "string", + "type": { + "$ref": "1002" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}" + } + } + }, + "primary": { + "$id": "3399", + "kind": "boolean", + "type": { + "$ref": "1058" + }, + "value": true + }, + "loadBalancerBackendAddressPools": { + "$id": "3400", + "kind": "array", + "type": { + "$ref": "1132" + }, + "value": [ + { + "$id": "3401", + "kind": "model", + "type": { + "$ref": "802" + }, + "value": { + "$id": "3402", + "id": { + "$id": "3403", + "kind": "string", + "type": { + "$ref": "804" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/backendAddressPools/{backendAddressPoolName}" + } + } + } + ] + } + } + } + } + } + ] + }, + "enableIPForwarding": { + "$id": "3404", + "kind": "boolean", + "type": { + "$ref": "1144" + }, + "value": true + } + } + } + } + } + ] + }, + "networkApiVersion": { + "$id": "3405", + "kind": "string", + "type": { + "$ref": "302" + }, + "value": "2022-07-01" + } + } + } + } + }, + "computeApiVersion": { + "$id": "3406", + "kind": "string", + "type": { + "$ref": "1454" + }, + "value": "2023-09-01" + }, + "platformFaultDomainCount": { + "$id": "3407", + "kind": "number", + "type": { + "$ref": "1458" + }, + "value": 1 + } + } + } + } + }, + "tags": { + "$id": "3408", + "kind": "dict", + "type": { + "$ref": "475" + }, + "value": { + "$id": "3409", + "key": { + "$id": "3410", + "kind": "string", + "type": { + "$ref": "477" + }, + "value": "fleets-test" + } + } + }, + "location": { + "$id": "3411", + "kind": "string", + "type": { + "$ref": "481" + }, + "value": "eastus2euap" + } + } + } + } + ], + "responses": [ + { + "$id": "3412", + "response": { + "$ref": "2200" + }, + "statusCode": 200, + "bodyValue": { + "$id": "3413", + "kind": "model", + "type": { + "$ref": "429" + }, + "value": { + "$id": "3414", + "properties": { + "$id": "3415", + "kind": "model", + "type": { + "$ref": "485" + }, + "value": { + "$id": "3416", + "provisioningState": { + "$id": "3417", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Succeeded" + }, + "spotPriorityProfile": { + "$id": "3418", + "kind": "model", + "type": { + "$ref": "490" + }, + "value": { + "$id": "3419", + "capacity": { + "$id": "3420", + "kind": "number", + "type": { + "$ref": "492" + }, + "value": 2 + }, + "minCapacity": { + "$id": "3421", + "kind": "number", + "type": { + "$ref": "496" + }, + "value": 1 + }, + "evictionPolicy": { + "$id": "3422", + "kind": "string", + "type": { + "$ref": "30" + }, + "value": "Delete" + }, + "allocationStrategy": { + "$id": "3423", + "kind": "string", + "type": { + "$ref": "36" + }, + "value": "PriceCapacityOptimized" + }, + "maintain": { + "$id": "3424", + "kind": "boolean", + "type": { + "$ref": "510" + }, + "value": true + } + } + }, + "regularPriorityProfile": { + "$id": "3425", + "kind": "model", + "type": { + "$ref": "516" + }, + "value": { + "$id": "3426", + "capacity": { + "$id": "3427", + "kind": "number", + "type": { + "$ref": "518" + }, + "value": 2 + }, + "minCapacity": { + "$id": "3428", + "kind": "number", + "type": { + "$ref": "522" + }, + "value": 1 + }, + "allocationStrategy": { + "$id": "3429", + "kind": "string", + "type": { + "$ref": "44" + }, + "value": "LowestPrice" + } + } + }, + "vmSizesProfile": { + "$id": "3430", + "kind": "array", + "type": { + "$ref": "531" + }, + "value": [ + { + "$id": "3431", + "kind": "model", + "type": { + "$ref": "532" + }, + "value": { + "$id": "3432", + "name": { + "$id": "3433", + "kind": "string", + "type": { + "$ref": "534" + }, + "value": "Standard_D2s_v3" + } + } + }, + { + "$id": "3434", + "kind": "model", + "type": { + "$ref": "532" + }, + "value": { + "$id": "3435", + "name": { + "$id": "3436", + "kind": "string", + "type": { + "$ref": "534" + }, + "value": "Standard_D4s_v3" + } + } + }, + { + "$id": "3437", + "kind": "model", + "type": { + "$ref": "532" + }, + "value": { + "$id": "3438", + "name": { + "$id": "3439", + "kind": "string", + "type": { + "$ref": "534" + }, + "value": "Standard_E2s_v3" + } + } + } + ] + }, + "computeProfile": { + "$id": "3440", + "kind": "model", + "type": { + "$ref": "1449" + }, + "value": { + "$id": "3441", + "baseVirtualMachineProfile": { + "$id": "3442", + "kind": "model", + "type": { + "$ref": "644" + }, + "value": { + "$id": "3443", + "storageProfile": { + "$id": "3444", + "kind": "model", + "type": { + "$ref": "836" + }, + "value": { + "$id": "3445", + "imageReference": { + "$id": "3446", + "kind": "model", + "type": { + "$ref": "838" + }, + "value": { + "$id": "3447", + "publisher": { + "$id": "3448", + "kind": "string", + "type": { + "$ref": "845" + }, + "value": "canonical" + }, + "offer": { + "$id": "3449", + "kind": "string", + "type": { + "$ref": "849" + }, + "value": "0001-com-ubuntu-server-focal" + }, + "sku": { + "$id": "3450", + "kind": "string", + "type": { + "$ref": "853" + }, + "value": "20_04-lts-gen2" + }, + "version": { + "$id": "3451", + "kind": "string", + "type": { + "$ref": "857" + }, + "value": "latest" + } + } + }, + "osDisk": { + "$id": "3452", + "kind": "model", + "type": { + "$ref": "875" + }, + "value": { + "$id": "3453", + "caching": { + "$id": "3454", + "kind": "string", + "type": { + "$ref": "174" + }, + "value": "ReadWrite" + }, + "createOption": { + "$id": "3455", + "kind": "string", + "type": { + "$ref": "182" + }, + "value": "FromImage" + }, + "osType": { + "$id": "3456", + "kind": "string", + "type": { + "$ref": "206" + }, + "value": "Linux" + }, + "managedDisk": { + "$id": "3457", + "kind": "model", + "type": { + "$ref": "921" + }, + "value": { + "$id": "3458", + "storageAccountType": { + "$id": "3459", + "kind": "string", + "type": { + "$ref": "212" + }, + "value": "Standard_LRS" + } + } + } + } + } + } + }, + "osProfile": { + "$id": "3460", + "kind": "model", + "type": { + "$ref": "646" + }, + "value": { + "$id": "3461", + "computerNamePrefix": { + "$id": "3462", + "kind": "string", + "type": { + "$ref": "648" + }, + "value": "prefix" + }, + "adminUsername": { + "$id": "3463", + "kind": "string", + "type": { + "$ref": "652" + }, + "value": "azureuser" + }, + "linuxConfiguration": { + "$id": "3464", + "kind": "model", + "type": { + "$ref": "745" + }, + "value": { + "$id": "3465", + "disablePasswordAuthentication": { + "$id": "3466", + "kind": "boolean", + "type": { + "$ref": "747" + }, + "value": false + } + } + } + } + }, + "networkProfile": { + "$id": "3467", + "kind": "model", + "type": { + "$ref": "998" + }, + "value": { + "$id": "3468", + "networkInterfaceConfigurations": { + "$id": "3469", + "kind": "array", + "type": { + "$ref": "1009" + }, + "value": [ + { + "$id": "3470", + "kind": "model", + "type": { + "$ref": "1010" + }, + "value": { + "$id": "3471", + "name": { + "$id": "3472", + "kind": "string", + "type": { + "$ref": "1012" + }, + "value": "vmNameTest" + }, + "properties": { + "$id": "3473", + "kind": "model", + "type": { + "$ref": "1016" + }, + "value": { + "$id": "3474", + "primary": { + "$id": "3475", + "kind": "boolean", + "type": { + "$ref": "1018" + }, + "value": true + }, + "enableAcceleratedNetworking": { + "$id": "3476", + "kind": "boolean", + "type": { + "$ref": "1022" + }, + "value": false + }, + "ipConfigurations": { + "$id": "3477", + "kind": "array", + "type": { + "$ref": "1046" + }, + "value": [ + { + "$id": "3478", + "kind": "model", + "type": { + "$ref": "1047" + }, + "value": { + "$id": "3479", + "name": { + "$id": "3480", + "kind": "string", + "type": { + "$ref": "1049" + }, + "value": "vmNameTest" + }, + "properties": { + "$id": "3481", + "kind": "model", + "type": { + "$ref": "1053" + }, + "value": { + "$id": "3482", + "subnet": { + "$id": "3483", + "kind": "model", + "type": { + "$ref": "1000" + }, + "value": { + "$id": "3484", + "id": { + "$id": "3485", + "kind": "string", + "type": { + "$ref": "1002" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}" + } + } + }, + "primary": { + "$id": "3486", + "kind": "boolean", + "type": { + "$ref": "1058" + }, + "value": true + }, + "loadBalancerBackendAddressPools": { + "$id": "3487", + "kind": "array", + "type": { + "$ref": "1132" + }, + "value": [ + { + "$id": "3488", + "kind": "model", + "type": { + "$ref": "802" + }, + "value": { + "$id": "3489", + "id": { + "$id": "3490", + "kind": "string", + "type": { + "$ref": "804" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/backendAddressPools/{backendAddressPoolName}" + } + } + } + ] + } + } + } + } + } + ] + }, + "enableIPForwarding": { + "$id": "3491", + "kind": "boolean", + "type": { + "$ref": "1144" + }, + "value": true + } + } + } + } + } + ] + }, + "networkApiVersion": { + "$id": "3492", + "kind": "string", + "type": { + "$ref": "302" + }, + "value": "2022-07-01" + } + } + } + } + }, + "computeApiVersion": { + "$id": "3493", + "kind": "string", + "type": { + "$ref": "1454" + }, + "value": "2023-09-01" + }, + "platformFaultDomainCount": { + "$id": "3494", + "kind": "number", + "type": { + "$ref": "1458" + }, + "value": 1 + } + } + }, + "timeCreated": { + "$id": "3495", + "kind": "string", + "type": { + "$ref": "1476" + }, + "value": "2024-07-10T00:16:34.8590555+00:00" + }, + "uniqueId": { + "$id": "3496", + "kind": "string", + "type": { + "$ref": "1481" + }, + "value": "a2f7fabd-bbc2-4a20-afe1-49fdb3885a28" + } + } + }, + "tags": { + "$id": "3497", + "kind": "dict", + "type": { + "$ref": "475" + }, + "value": { + "$id": "3498", + "key": { + "$id": "3499", + "kind": "string", + "type": { + "$ref": "477" + }, + "value": "fleets-test" + } + } + }, + "location": { + "$id": "3500", + "kind": "string", + "type": { + "$ref": "481" + }, + "value": "eastus2euap" + }, + "id": { + "$id": "3501", + "kind": "string", + "type": { + "$ref": "433" + }, + "value": "/subscriptions/7B0CD4DB-3381-4013-9B31-FB6E6FD0FF1C/resourceGroups/rgazurefleet/providers/Microsoft.AzureFleet/fleets/testFleet" + }, + "name": { + "$id": "3502", + "kind": "string", + "type": { + "$ref": "438" + }, + "value": "testFleet" + }, + "type": { + "$id": "3503", + "kind": "string", + "type": { + "$ref": "442" + }, + "value": "Microsoft.AzureFleet/fleets" + } + } + } + }, + { + "$id": "3504", + "response": { + "$ref": "2201" + }, + "statusCode": 201, + "bodyValue": { + "$id": "3505", + "kind": "model", + "type": { + "$ref": "429" + }, + "value": { + "$id": "3506", + "properties": { + "$id": "3507", + "kind": "model", + "type": { + "$ref": "485" + }, + "value": { + "$id": "3508", + "provisioningState": { + "$id": "3509", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Creating" + }, + "spotPriorityProfile": { + "$id": "3510", + "kind": "model", + "type": { + "$ref": "490" + }, + "value": { + "$id": "3511", + "capacity": { + "$id": "3512", + "kind": "number", + "type": { + "$ref": "492" + }, + "value": 2 + }, + "minCapacity": { + "$id": "3513", + "kind": "number", + "type": { + "$ref": "496" + }, + "value": 1 + }, + "evictionPolicy": { + "$id": "3514", + "kind": "string", + "type": { + "$ref": "30" + }, + "value": "Delete" + }, + "allocationStrategy": { + "$id": "3515", + "kind": "string", + "type": { + "$ref": "36" + }, + "value": "PriceCapacityOptimized" + }, + "maintain": { + "$id": "3516", + "kind": "boolean", + "type": { + "$ref": "510" + }, + "value": true + } + } + }, + "regularPriorityProfile": { + "$id": "3517", + "kind": "model", + "type": { + "$ref": "516" + }, + "value": { + "$id": "3518", + "capacity": { + "$id": "3519", + "kind": "number", + "type": { + "$ref": "518" + }, + "value": 2 + }, + "minCapacity": { + "$id": "3520", + "kind": "number", + "type": { + "$ref": "522" + }, + "value": 1 + }, + "allocationStrategy": { + "$id": "3521", + "kind": "string", + "type": { + "$ref": "44" + }, + "value": "LowestPrice" + } + } + }, + "vmSizesProfile": { + "$id": "3522", + "kind": "array", + "type": { + "$ref": "531" + }, + "value": [ + { + "$id": "3523", + "kind": "model", + "type": { + "$ref": "532" + }, + "value": { + "$id": "3524", + "name": { + "$id": "3525", + "kind": "string", + "type": { + "$ref": "534" + }, + "value": "Standard_D2s_v3" + } + } + }, + { + "$id": "3526", + "kind": "model", + "type": { + "$ref": "532" + }, + "value": { + "$id": "3527", + "name": { + "$id": "3528", + "kind": "string", + "type": { + "$ref": "534" + }, + "value": "Standard_D4s_v3" + } + } + }, + { + "$id": "3529", + "kind": "model", + "type": { + "$ref": "532" + }, + "value": { + "$id": "3530", + "name": { + "$id": "3531", + "kind": "string", + "type": { + "$ref": "534" + }, + "value": "Standard_E2s_v3" + } + } + } + ] + }, + "computeProfile": { + "$id": "3532", + "kind": "model", + "type": { + "$ref": "1449" + }, + "value": { + "$id": "3533", + "baseVirtualMachineProfile": { + "$id": "3534", + "kind": "model", + "type": { + "$ref": "644" + }, + "value": { + "$id": "3535", + "storageProfile": { + "$id": "3536", + "kind": "model", + "type": { + "$ref": "836" + }, + "value": { + "$id": "3537", + "imageReference": { + "$id": "3538", + "kind": "model", + "type": { + "$ref": "838" + }, + "value": { + "$id": "3539", + "publisher": { + "$id": "3540", + "kind": "string", + "type": { + "$ref": "845" + }, + "value": "canonical" + }, + "offer": { + "$id": "3541", + "kind": "string", + "type": { + "$ref": "849" + }, + "value": "0001-com-ubuntu-server-focal" + }, + "sku": { + "$id": "3542", + "kind": "string", + "type": { + "$ref": "853" + }, + "value": "20_04-lts-gen2" + }, + "version": { + "$id": "3543", + "kind": "string", + "type": { + "$ref": "857" + }, + "value": "latest" + } + } + }, + "osDisk": { + "$id": "3544", + "kind": "model", + "type": { + "$ref": "875" + }, + "value": { + "$id": "3545", + "caching": { + "$id": "3546", + "kind": "string", + "type": { + "$ref": "174" + }, + "value": "ReadWrite" + }, + "createOption": { + "$id": "3547", + "kind": "string", + "type": { + "$ref": "182" + }, + "value": "FromImage" + }, + "osType": { + "$id": "3548", + "kind": "string", + "type": { + "$ref": "206" + }, + "value": "Linux" + }, + "managedDisk": { + "$id": "3549", + "kind": "model", + "type": { + "$ref": "921" + }, + "value": { + "$id": "3550", + "storageAccountType": { + "$id": "3551", + "kind": "string", + "type": { + "$ref": "212" + }, + "value": "Standard_LRS" + } + } + } + } + } + } + }, + "osProfile": { + "$id": "3552", + "kind": "model", + "type": { + "$ref": "646" + }, + "value": { + "$id": "3553", + "computerNamePrefix": { + "$id": "3554", + "kind": "string", + "type": { + "$ref": "648" + }, + "value": "prefix" + }, + "adminUsername": { + "$id": "3555", + "kind": "string", + "type": { + "$ref": "652" + }, + "value": "azureuser" + }, + "linuxConfiguration": { + "$id": "3556", + "kind": "model", + "type": { + "$ref": "745" + }, + "value": { + "$id": "3557", + "disablePasswordAuthentication": { + "$id": "3558", + "kind": "boolean", + "type": { + "$ref": "747" + }, + "value": false + } + } + } + } + }, + "networkProfile": { + "$id": "3559", + "kind": "model", + "type": { + "$ref": "998" + }, + "value": { + "$id": "3560", + "networkInterfaceConfigurations": { + "$id": "3561", + "kind": "array", + "type": { + "$ref": "1009" + }, + "value": [ + { + "$id": "3562", + "kind": "model", + "type": { + "$ref": "1010" + }, + "value": { + "$id": "3563", + "name": { + "$id": "3564", + "kind": "string", + "type": { + "$ref": "1012" + }, + "value": "vmNameTest" + }, + "properties": { + "$id": "3565", + "kind": "model", + "type": { + "$ref": "1016" + }, + "value": { + "$id": "3566", + "primary": { + "$id": "3567", + "kind": "boolean", + "type": { + "$ref": "1018" + }, + "value": true + }, + "enableAcceleratedNetworking": { + "$id": "3568", + "kind": "boolean", + "type": { + "$ref": "1022" + }, + "value": false + }, + "ipConfigurations": { + "$id": "3569", + "kind": "array", + "type": { + "$ref": "1046" + }, + "value": [ + { + "$id": "3570", + "kind": "model", + "type": { + "$ref": "1047" + }, + "value": { + "$id": "3571", + "name": { + "$id": "3572", + "kind": "string", + "type": { + "$ref": "1049" + }, + "value": "vmNameTest" + }, + "properties": { + "$id": "3573", + "kind": "model", + "type": { + "$ref": "1053" + }, + "value": { + "$id": "3574", + "subnet": { + "$id": "3575", + "kind": "model", + "type": { + "$ref": "1000" + }, + "value": { + "$id": "3576", + "id": { + "$id": "3577", + "kind": "string", + "type": { + "$ref": "1002" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}" + } + } + }, + "primary": { + "$id": "3578", + "kind": "boolean", + "type": { + "$ref": "1058" + }, + "value": true + }, + "loadBalancerBackendAddressPools": { + "$id": "3579", + "kind": "array", + "type": { + "$ref": "1132" + }, + "value": [ + { + "$id": "3580", + "kind": "model", + "type": { + "$ref": "802" + }, + "value": { + "$id": "3581", + "id": { + "$id": "3582", + "kind": "string", + "type": { + "$ref": "804" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/backendAddressPools/{backendAddressPoolName}" + } + } + } + ] + } + } + } + } + } + ] + }, + "enableIPForwarding": { + "$id": "3583", + "kind": "boolean", + "type": { + "$ref": "1144" + }, + "value": true + } + } + } + } + } + ] + }, + "networkApiVersion": { + "$id": "3584", + "kind": "string", + "type": { + "$ref": "302" + }, + "value": "2022-07-01" + } + } + } + } + }, + "computeApiVersion": { + "$id": "3585", + "kind": "string", + "type": { + "$ref": "1454" + }, + "value": "2023-09-01" + }, + "platformFaultDomainCount": { + "$id": "3586", + "kind": "number", + "type": { + "$ref": "1458" + }, + "value": 1 + } + } + }, + "timeCreated": { + "$id": "3587", + "kind": "string", + "type": { + "$ref": "1476" + }, + "value": "2024-07-10T00:16:34.8590555+00:00" + }, + "uniqueId": { + "$id": "3588", + "kind": "string", + "type": { + "$ref": "1481" + }, + "value": "a2f7fabd-bbc2-4a20-afe1-49fdb3885a28" + } + } + }, + "tags": { + "$id": "3589", + "kind": "dict", + "type": { + "$ref": "475" + }, + "value": { + "$id": "3590", + "key": { + "$id": "3591", + "kind": "string", + "type": { + "$ref": "477" + }, + "value": "fleets-test" + } + } + }, + "location": { + "$id": "3592", + "kind": "string", + "type": { + "$ref": "481" + }, + "value": "eastus2euap" + }, + "id": { + "$id": "3593", + "kind": "string", + "type": { + "$ref": "433" + }, + "value": "/subscriptions/7B0CD4DB-3381-4013-9B31-FB6E6FD0FF1C/resourceGroups/rgazurefleet/providers/Microsoft.AzureFleet/fleets/testFleet" + }, + "name": { + "$id": "3594", + "kind": "string", + "type": { + "$ref": "438" + }, + "value": "testFleet" + }, + "type": { + "$id": "3595", + "kind": "string", + "type": { + "$ref": "442" + }, + "value": "Microsoft.AzureFleet/fleets" + } + } + } + } + ] + } + ] + }, + { + "$id": "3596", + "name": "update", + "resourceName": "Fleet", + "doc": "Update a Fleet", + "accessibility": "public", + "parameters": [ + { + "$id": "3597", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "3598", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "3599", + "type": { + "$id": "3600", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2024-11-01" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3601", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "3602", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "3603", + "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": "3604", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "3605", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3606", + "name": "fleetName", + "nameInRequest": "fleetName", + "doc": "The name of the Compute Fleet", + "type": { + "$id": "3607", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3608", + "name": "contentType", + "nameInRequest": "Content-Type", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$id": "3609", + "kind": "constant", + "valueType": { + "$id": "3610", + "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": "3611", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "3612", + "kind": "constant", + "valueType": { + "$id": "3613", + "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": "3614", + "name": "properties", + "nameInRequest": "properties", + "doc": "The resource properties to be updated.", + "type": { + "$ref": "1549" + }, + "location": "Body", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "3615", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "429" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + }, + { + "$id": "3616", + "statusCodes": [ + 202 + ], + "headers": [ + { + "$id": "3617", + "name": "location", + "nameInResponse": "Location", + "doc": "The Location header contains the URL where the status of the long running operation can be checked.", + "type": { + "$id": "3618", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + { + "$id": "3619", + "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": "3620", + "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": "3621", + "finalStateVia": 1, + "finalResponse": { + "$id": "3622", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "429" + } + } + }, + "generateProtocolMethod": true, + "generateConvenienceMethod": false, + "crossLanguageDefinitionId": "Microsoft.AzureFleet.Fleets.update", + "decorators": [], + "examples": [ + { + "$id": "3623", + "kind": "http", + "name": "Fleets_Update", + "description": "Fleets_Update", + "filePath": "2024-11-01/Fleets_Update.json", + "parameters": [ + { + "$id": "3624", + "parameter": { + "$ref": "3597" + }, + "value": { + "$id": "3625", + "kind": "string", + "type": { + "$ref": "3598" + }, + "value": "2024-11-01" + } + }, + { + "$id": "3626", + "parameter": { + "$ref": "3601" + }, + "value": { + "$id": "3627", + "kind": "string", + "type": { + "$ref": "3602" + }, + "value": "1DC2F28C-A625-4B0E-9748-9885A3C9E9EB" + } + }, + { + "$id": "3628", + "parameter": { + "$ref": "3604" + }, + "value": { + "$id": "3629", + "kind": "string", + "type": { + "$ref": "3605" + }, + "value": "rgazurefleet" + } + }, + { + "$id": "3630", + "parameter": { + "$ref": "3606" + }, + "value": { + "$id": "3631", + "kind": "string", + "type": { + "$ref": "3607" + }, + "value": "testFleet" + } + }, + { + "$id": "3632", + "parameter": { + "$ref": "3614" + }, + "value": { + "$id": "3633", + "kind": "model", + "type": { + "$ref": "1549" + }, + "value": { + "$id": "3634", + "identity": { + "$id": "3635", + "kind": "model", + "type": { + "$ref": "1557" + }, + "value": { + "$id": "3636", + "type": { + "$id": "3637", + "kind": "string", + "type": { + "$ref": "318" + }, + "value": "UserAssigned" + }, + "userAssignedIdentities": { + "$id": "3638", + "kind": "dict", + "type": { + "$ref": "1562" + }, + "value": { + "$id": "3639" + } + } + } + }, + "tags": { + "$id": "3640", + "kind": "dict", + "type": { + "$ref": "1551" + }, + "value": { + "$id": "3641" + } + }, + "properties": { + "$id": "3642", + "kind": "model", + "type": { + "$ref": "485" + }, + "value": { + "$id": "3643", + "spotPriorityProfile": { + "$id": "3644", + "kind": "model", + "type": { + "$ref": "490" + }, + "value": { + "$id": "3645", + "capacity": { + "$id": "3646", + "kind": "number", + "type": { + "$ref": "492" + }, + "value": 20 + }, + "minCapacity": { + "$id": "3647", + "kind": "number", + "type": { + "$ref": "496" + }, + "value": 10 + }, + "maxPricePerVM": { + "$id": "3648", + "kind": "number", + "type": { + "$ref": "500" + }, + "value": 0.00865 + }, + "evictionPolicy": { + "$id": "3649", + "kind": "string", + "type": { + "$ref": "30" + }, + "value": "Delete" + }, + "allocationStrategy": { + "$id": "3650", + "kind": "string", + "type": { + "$ref": "36" + }, + "value": "PriceCapacityOptimized" + }, + "maintain": { + "$id": "3651", + "kind": "boolean", + "type": { + "$ref": "510" + }, + "value": true + } + } + }, + "regularPriorityProfile": { + "$id": "3652", + "kind": "model", + "type": { + "$ref": "516" + }, + "value": { + "$id": "3653", + "capacity": { + "$id": "3654", + "kind": "number", + "type": { + "$ref": "518" + }, + "value": 20 + }, + "minCapacity": { + "$id": "3655", + "kind": "number", + "type": { + "$ref": "522" + }, + "value": 10 + }, + "allocationStrategy": { + "$id": "3656", + "kind": "string", + "type": { + "$ref": "44" + }, + "value": "LowestPrice" + } + } + }, + "vmSizesProfile": { + "$id": "3657", + "kind": "array", + "type": { + "$ref": "531" + }, + "value": [ + { + "$id": "3658", + "kind": "model", + "type": { + "$ref": "532" + }, + "value": { + "$id": "3659", + "name": { + "$id": "3660", + "kind": "string", + "type": { + "$ref": "534" + }, + "value": "Standard_d1_v2" + }, + "rank": { + "$id": "3661", + "kind": "number", + "type": { + "$ref": "538" + }, + "value": 19225 + } + } + } + ] + }, + "computeProfile": { + "$id": "3662", + "kind": "model", + "type": { + "$ref": "1449" + }, + "value": { + "$id": "3663", + "baseVirtualMachineProfile": { + "$id": "3664", + "kind": "model", + "type": { + "$ref": "644" + }, + "value": { + "$id": "3665", + "osProfile": { + "$id": "3666", + "kind": "model", + "type": { + "$ref": "646" + }, + "value": { + "$id": "3667", + "computerNamePrefix": { + "$id": "3668", + "kind": "string", + "type": { + "$ref": "648" + }, + "value": "o" + }, + "adminUsername": { + "$id": "3669", + "kind": "string", + "type": { + "$ref": "652" + }, + "value": "nrgzqciiaaxjrqldbmjbqkyhntp" + }, + "adminPassword": { + "$id": "3670", + "kind": "string", + "type": { + "$ref": "656" + }, + "value": "adfbrdxpv" + }, + "customData": { + "$id": "3671", + "kind": "string", + "type": { + "$ref": "660" + }, + "value": "xjjib" + }, + "windowsConfiguration": { + "$id": "3672", + "kind": "model", + "type": { + "$ref": "664" + }, + "value": { + "$id": "3673", + "provisionVMAgent": { + "$id": "3674", + "kind": "boolean", + "type": { + "$ref": "666" + }, + "value": true + }, + "enableAutomaticUpdates": { + "$id": "3675", + "kind": "boolean", + "type": { + "$ref": "670" + }, + "value": true + }, + "timeZone": { + "$id": "3676", + "kind": "string", + "type": { + "$ref": "674" + }, + "value": "hlyjiqcfksgrpjrct" + }, + "additionalUnattendContent": { + "$id": "3677", + "kind": "array", + "type": { + "$ref": "678" + }, + "value": [ + { + "$id": "3678", + "kind": "model", + "type": { + "$ref": "679" + }, + "value": { + "$id": "3679", + "passName": { + "$id": "3680", + "kind": "string", + "type": { + "$ref": "681" + }, + "value": "OobeSystem" + }, + "componentName": { + "$id": "3681", + "kind": "string", + "type": { + "$ref": "685" + }, + "value": "Microsoft-Windows-Shell-Setup" + }, + "settingName": { + "$id": "3682", + "kind": "string", + "type": { + "$ref": "116" + }, + "value": "AutoLogon" + }, + "content": { + "$id": "3683", + "kind": "string", + "type": { + "$ref": "692" + }, + "value": "bubmqbxjkj" + } + } + } + ] + }, + "patchSettings": { + "$id": "3684", + "kind": "model", + "type": { + "$ref": "698" + }, + "value": { + "$id": "3685", + "patchMode": { + "$id": "3686", + "kind": "string", + "type": { + "$ref": "122" + }, + "value": "Manual" + }, + "enableHotpatching": { + "$id": "3687", + "kind": "boolean", + "type": { + "$ref": "703" + }, + "value": true + }, + "assessmentMode": { + "$id": "3688", + "kind": "string", + "type": { + "$ref": "130" + }, + "value": "ImageDefault" + }, + "automaticByPlatformSettings": { + "$id": "3689", + "kind": "model", + "type": { + "$ref": "710" + }, + "value": { + "$id": "3690", + "rebootSetting": { + "$id": "3691", + "kind": "string", + "type": { + "$ref": "136" + }, + "value": "Unknown" + }, + "bypassPlatformSafetyChecksOnUserSchedule": { + "$id": "3692", + "kind": "boolean", + "type": { + "$ref": "715" + }, + "value": true + } + } + } + } + }, + "winRM": { + "$id": "3693", + "kind": "model", + "type": { + "$ref": "723" + }, + "value": { + "$id": "3694", + "listeners": { + "$id": "3695", + "kind": "array", + "type": { + "$ref": "725" + }, + "value": [ + { + "$id": "3696", + "kind": "model", + "type": { + "$ref": "726" + }, + "value": { + "$id": "3697", + "protocol": { + "$id": "3698", + "kind": "string", + "type": { + "$ref": "146" + }, + "value": "Http" + }, + "certificateUrl": { + "$id": "3699", + "kind": "string", + "type": { + "$ref": "731" + }, + "value": "https://myVaultName.vault.azure.net/secrets/myCertName" + } + } + } + ] + } + } + }, + "enableVMAgentPlatformUpdates": { + "$id": "3700", + "kind": "boolean", + "type": { + "$ref": "739" + }, + "value": true + } + } + }, + "linuxConfiguration": { + "$id": "3701", + "kind": "model", + "type": { + "$ref": "745" + }, + "value": { + "$id": "3702", + "disablePasswordAuthentication": { + "$id": "3703", + "kind": "boolean", + "type": { + "$ref": "747" + }, + "value": true + }, + "ssh": { + "$id": "3704", + "kind": "model", + "type": { + "$ref": "751" + }, + "value": { + "$id": "3705", + "publicKeys": { + "$id": "3706", + "kind": "array", + "type": { + "$ref": "753" + }, + "value": [ + { + "$id": "3707", + "kind": "model", + "type": { + "$ref": "754" + }, + "value": { + "$id": "3708", + "path": { + "$id": "3709", + "kind": "string", + "type": { + "$ref": "756" + }, + "value": "kmqz" + }, + "keyData": { + "$id": "3710", + "kind": "string", + "type": { + "$ref": "760" + }, + "value": "kivgsubusvpprwqaqpjcmhsv" + } + } + } + ] + } + } + }, + "provisionVMAgent": { + "$id": "3711", + "kind": "boolean", + "type": { + "$ref": "768" + }, + "value": true + }, + "patchSettings": { + "$id": "3712", + "kind": "model", + "type": { + "$ref": "772" + }, + "value": { + "$id": "3713", + "patchMode": { + "$id": "3714", + "kind": "string", + "type": { + "$ref": "152" + }, + "value": "ImageDefault" + }, + "assessmentMode": { + "$id": "3715", + "kind": "string", + "type": { + "$ref": "158" + }, + "value": "ImageDefault" + }, + "automaticByPlatformSettings": { + "$id": "3716", + "kind": "model", + "type": { + "$ref": "780" + }, + "value": { + "$id": "3717", + "rebootSetting": { + "$id": "3718", + "kind": "string", + "type": { + "$ref": "164" + }, + "value": "Unknown" + }, + "bypassPlatformSafetyChecksOnUserSchedule": { + "$id": "3719", + "kind": "boolean", + "type": { + "$ref": "785" + }, + "value": true + } + } + } + } + }, + "enableVMAgentPlatformUpdates": { + "$id": "3720", + "kind": "boolean", + "type": { + "$ref": "793" + }, + "value": true + } + } + }, + "secrets": { + "$id": "3721", + "kind": "array", + "type": { + "$ref": "799" + }, + "value": [ + { + "$id": "3722", + "kind": "model", + "type": { + "$ref": "800" + }, + "value": { + "$id": "3723", + "sourceVault": { + "$id": "3724", + "kind": "model", + "type": { + "$ref": "802" + }, + "value": { + "$id": "3725", + "id": { + "$id": "3726", + "kind": "string", + "type": { + "$ref": "804" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}" + } + } + }, + "vaultCertificates": { + "$id": "3727", + "kind": "array", + "type": { + "$ref": "811" + }, + "value": [ + { + "$id": "3728", + "kind": "model", + "type": { + "$ref": "812" + }, + "value": { + "$id": "3729", + "certificateUrl": { + "$id": "3730", + "kind": "string", + "type": { + "$ref": "814" + }, + "value": "https://myVaultName.vault.azure.net/secrets/myCertName" + }, + "certificateStore": { + "$id": "3731", + "kind": "string", + "type": { + "$ref": "818" + }, + "value": "nlxrwavpzhueffxsshlun" + } + } + } + ] + } + } + } + ] + }, + "allowExtensionOperations": { + "$id": "3732", + "kind": "boolean", + "type": { + "$ref": "826" + }, + "value": true + }, + "requireGuestProvisionSignal": { + "$id": "3733", + "kind": "boolean", + "type": { + "$ref": "830" + }, + "value": true + } + } + }, + "storageProfile": { + "$id": "3734", + "kind": "model", + "type": { + "$ref": "836" + }, + "value": { + "$id": "3735", + "imageReference": { + "$id": "3736", + "kind": "model", + "type": { + "$ref": "838" + }, + "value": { + "$id": "3737", + "publisher": { + "$id": "3738", + "kind": "string", + "type": { + "$ref": "845" + }, + "value": "mqxgwbiyjzmxavhbkd" + }, + "offer": { + "$id": "3739", + "kind": "string", + "type": { + "$ref": "849" + }, + "value": "isxgumkarlkomp" + }, + "sku": { + "$id": "3740", + "kind": "string", + "type": { + "$ref": "853" + }, + "value": "eojmppqcrnpmxirtp" + }, + "version": { + "$id": "3741", + "kind": "string", + "type": { + "$ref": "857" + }, + "value": "wvpcqefgtmqdgltiuz" + }, + "sharedGalleryImageId": { + "$id": "3742", + "kind": "string", + "type": { + "$ref": "865" + }, + "value": "kmkgihoxwlawuuhcinfirktdwkmx" + }, + "communityGalleryImageId": { + "$id": "3743", + "kind": "string", + "type": { + "$ref": "869" + }, + "value": "vlqe" + }, + "id": { + "$id": "3744", + "kind": "string", + "type": { + "$ref": "840" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images/{imageName}/versions/{versionName}" + } + } + }, + "osDisk": { + "$id": "3745", + "kind": "model", + "type": { + "$ref": "875" + }, + "value": { + "$id": "3746", + "name": { + "$id": "3747", + "kind": "string", + "type": { + "$ref": "877" + }, + "value": "wfttw" + }, + "caching": { + "$id": "3748", + "kind": "string", + "type": { + "$ref": "174" + }, + "value": "None" + }, + "writeAcceleratorEnabled": { + "$id": "3749", + "kind": "boolean", + "type": { + "$ref": "884" + }, + "value": true + }, + "createOption": { + "$id": "3750", + "kind": "string", + "type": { + "$ref": "182" + }, + "value": "FromImage" + }, + "diffDiskSettings": { + "$id": "3751", + "kind": "model", + "type": { + "$ref": "891" + }, + "value": { + "$id": "3752", + "option": { + "$id": "3753", + "kind": "string", + "type": { + "$ref": "194" + }, + "value": "Local" + }, + "placement": { + "$id": "3754", + "kind": "string", + "type": { + "$ref": "198" + }, + "value": "CacheDisk" + } + } + }, + "diskSizeGB": { + "$id": "3755", + "kind": "number", + "type": { + "$ref": "901" + }, + "value": 14 + }, + "osType": { + "$id": "3756", + "kind": "string", + "type": { + "$ref": "206" + }, + "value": "Windows" + }, + "image": { + "$id": "3757", + "kind": "model", + "type": { + "$ref": "908" + }, + "value": { + "$id": "3758", + "uri": { + "$id": "3759", + "kind": "string", + "type": { + "$ref": "910" + }, + "value": "https://myStorageAccountName.blob.core.windows.net/myContainerName/myVhdName.vhd" + } + } + }, + "vhdContainers": { + "$id": "3760", + "kind": "array", + "type": { + "$ref": "916" + }, + "value": [ + { + "$id": "3761", + "kind": "string", + "type": { + "$ref": "917" + }, + "value": "tkzcwddtinkfpnfklatw" + } + ] + }, + "managedDisk": { + "$id": "3762", + "kind": "model", + "type": { + "$ref": "921" + }, + "value": { + "$id": "3763", + "storageAccountType": { + "$id": "3764", + "kind": "string", + "type": { + "$ref": "212" + }, + "value": "Standard_LRS" + }, + "diskEncryptionSet": { + "$id": "3765", + "kind": "model", + "type": { + "$ref": "926" + }, + "value": { + "$id": "3766", + "id": { + "$id": "3767", + "kind": "string", + "type": { + "$ref": "928" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}" + } + } + }, + "securityProfile": { + "$id": "3768", + "kind": "model", + "type": { + "$ref": "935" + }, + "value": { + "$id": "3769", + "securityEncryptionType": { + "$id": "3770", + "kind": "string", + "type": { + "$ref": "228" + }, + "value": "VMGuestStateOnly" + }, + "diskEncryptionSet": { + "$id": "3771", + "kind": "model", + "type": { + "$ref": "926" + }, + "value": { + "$id": "3772", + "id": { + "$id": "3773", + "kind": "string", + "type": { + "$ref": "928" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}" + } + } + } + } + } + } + }, + "deleteOption": { + "$id": "3774", + "kind": "string", + "type": { + "$ref": "236" + }, + "value": "Delete" + } + } + }, + "dataDisks": { + "$id": "3775", + "kind": "array", + "type": { + "$ref": "952" + }, + "value": [ + { + "$id": "3776", + "kind": "model", + "type": { + "$ref": "953" + }, + "value": { + "$id": "3777", + "name": { + "$id": "3778", + "kind": "string", + "type": { + "$ref": "955" + }, + "value": "eogiykmdmeikswxmigjws" + }, + "lun": { + "$id": "3779", + "kind": "number", + "type": { + "$ref": "959" + }, + "value": 14 + }, + "caching": { + "$id": "3780", + "kind": "string", + "type": { + "$ref": "174" + }, + "value": "None" + }, + "writeAcceleratorEnabled": { + "$id": "3781", + "kind": "boolean", + "type": { + "$ref": "966" + }, + "value": true + }, + "createOption": { + "$id": "3782", + "kind": "string", + "type": { + "$ref": "182" + }, + "value": "FromImage" + }, + "diskSizeGB": { + "$id": "3783", + "kind": "number", + "type": { + "$ref": "973" + }, + "value": 6 + }, + "managedDisk": { + "$id": "3784", + "kind": "model", + "type": { + "$ref": "921" + }, + "value": { + "$id": "3785", + "storageAccountType": { + "$id": "3786", + "kind": "string", + "type": { + "$ref": "212" + }, + "value": "Standard_LRS" + }, + "diskEncryptionSet": { + "$id": "3787", + "kind": "model", + "type": { + "$ref": "926" + }, + "value": { + "$id": "3788", + "id": { + "$id": "3789", + "kind": "string", + "type": { + "$ref": "928" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}" + } + } + }, + "securityProfile": { + "$id": "3790", + "kind": "model", + "type": { + "$ref": "935" + }, + "value": { + "$id": "3791", + "securityEncryptionType": { + "$id": "3792", + "kind": "string", + "type": { + "$ref": "228" + }, + "value": "VMGuestStateOnly" + }, + "diskEncryptionSet": { + "$id": "3793", + "kind": "model", + "type": { + "$ref": "926" + }, + "value": { + "$id": "3794", + "id": { + "$id": "3795", + "kind": "string", + "type": { + "$ref": "928" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}" + } + } + } + } + } + } + }, + "diskIOPSReadWrite": { + "$id": "3796", + "kind": "number", + "type": { + "$ref": "980" + }, + "value": 27 + }, + "diskMBpsReadWrite": { + "$id": "3797", + "kind": "number", + "type": { + "$ref": "984" + }, + "value": 2 + }, + "deleteOption": { + "$id": "3798", + "kind": "string", + "type": { + "$ref": "236" + }, + "value": "Delete" + } + } + } + ] + }, + "diskControllerType": { + "$id": "3799", + "kind": "string", + "type": { + "$ref": "242" + }, + "value": "uzb" + } + } + }, + "networkProfile": { + "$id": "3800", + "kind": "model", + "type": { + "$ref": "998" + }, + "value": { + "$id": "3801", + "healthProbe": { + "$id": "3802", + "kind": "model", + "type": { + "$ref": "1000" + }, + "value": { + "$id": "3803", + "id": { + "$id": "3804", + "kind": "string", + "type": { + "$ref": "1002" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/probes/{probeName}" + } + } + }, + "networkInterfaceConfigurations": { + "$id": "3805", + "kind": "array", + "type": { + "$ref": "1009" + }, + "value": [ + { + "$id": "3806", + "kind": "model", + "type": { + "$ref": "1010" + }, + "value": { + "$id": "3807", + "name": { + "$id": "3808", + "kind": "string", + "type": { + "$ref": "1012" + }, + "value": "i" + }, + "properties": { + "$id": "3809", + "kind": "model", + "type": { + "$ref": "1016" + }, + "value": { + "$id": "3810", + "primary": { + "$id": "3811", + "kind": "boolean", + "type": { + "$ref": "1018" + }, + "value": true + }, + "enableAcceleratedNetworking": { + "$id": "3812", + "kind": "boolean", + "type": { + "$ref": "1022" + }, + "value": true + }, + "disableTcpStateTracking": { + "$id": "3813", + "kind": "boolean", + "type": { + "$ref": "1026" + }, + "value": true + }, + "enableFpga": { + "$id": "3814", + "kind": "boolean", + "type": { + "$ref": "1030" + }, + "value": true + }, + "networkSecurityGroup": { + "$id": "3815", + "kind": "model", + "type": { + "$ref": "802" + }, + "value": { + "$id": "3816", + "id": { + "$id": "3817", + "kind": "string", + "type": { + "$ref": "804" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/{networkSecurityGroupName}" + } + } + }, + "dnsSettings": { + "$id": "3818", + "kind": "model", + "type": { + "$ref": "1037" + }, + "value": { + "$id": "3819", + "dnsServers": { + "$id": "3820", + "kind": "array", + "type": { + "$ref": "1039" + }, + "value": [ + { + "$id": "3821", + "kind": "string", + "type": { + "$ref": "1040" + }, + "value": "nxmmfolhclsesu" + } + ] + } + } + }, + "ipConfigurations": { + "$id": "3822", + "kind": "array", + "type": { + "$ref": "1046" + }, + "value": [ + { + "$id": "3823", + "kind": "model", + "type": { + "$ref": "1047" + }, + "value": { + "$id": "3824", + "name": { + "$id": "3825", + "kind": "string", + "type": { + "$ref": "1049" + }, + "value": "oezqhkidfhyywlfzwuotilrpbqnjg" + }, + "properties": { + "$id": "3826", + "kind": "model", + "type": { + "$ref": "1053" + }, + "value": { + "$id": "3827", + "subnet": { + "$id": "3828", + "kind": "model", + "type": { + "$ref": "1000" + }, + "value": { + "$id": "3829", + "id": { + "$id": "3830", + "kind": "string", + "type": { + "$ref": "1002" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}" + } + } + }, + "primary": { + "$id": "3831", + "kind": "boolean", + "type": { + "$ref": "1058" + }, + "value": true + }, + "publicIPAddressConfiguration": { + "$id": "3832", + "kind": "model", + "type": { + "$ref": "1062" + }, + "value": { + "$id": "3833", + "name": { + "$id": "3834", + "kind": "string", + "type": { + "$ref": "1064" + }, + "value": "fvpqf" + }, + "properties": { + "$id": "3835", + "kind": "model", + "type": { + "$ref": "1068" + }, + "value": { + "$id": "3836", + "idleTimeoutInMinutes": { + "$id": "3837", + "kind": "number", + "type": { + "$ref": "1070" + }, + "value": 9 + }, + "dnsSettings": { + "$id": "3838", + "kind": "model", + "type": { + "$ref": "1074" + }, + "value": { + "$id": "3839", + "domainNameLabel": { + "$id": "3840", + "kind": "string", + "type": { + "$ref": "1076" + }, + "value": "ukrddzvmorpmfsczjwtbvp" + }, + "domainNameLabelScope": { + "$id": "3841", + "kind": "string", + "type": { + "$ref": "248" + }, + "value": "TenantReuse" + } + } + }, + "ipTags": { + "$id": "3842", + "kind": "array", + "type": { + "$ref": "1085" + }, + "value": [ + { + "$id": "3843", + "kind": "model", + "type": { + "$ref": "1086" + }, + "value": { + "$id": "3844", + "ipTagType": { + "$id": "3845", + "kind": "string", + "type": { + "$ref": "1088" + }, + "value": "sddgsoemnzgqizale" + }, + "tag": { + "$id": "3846", + "kind": "string", + "type": { + "$ref": "1092" + }, + "value": "wufmhrjsakbiaetyara" + } + } + } + ] + }, + "publicIPPrefix": { + "$id": "3847", + "kind": "model", + "type": { + "$ref": "802" + }, + "value": { + "$id": "3848", + "id": { + "$id": "3849", + "kind": "string", + "type": { + "$ref": "804" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes/{publicIPPrefixName}" + } + } + }, + "publicIPAddressVersion": { + "$id": "3850", + "kind": "string", + "type": { + "$ref": "258" + }, + "value": "IPv4" + }, + "deleteOption": { + "$id": "3851", + "kind": "string", + "type": { + "$ref": "264" + }, + "value": "Delete" + } + } + }, + "sku": { + "$id": "3852", + "kind": "model", + "type": { + "$ref": "1109" + }, + "value": { + "$id": "3853", + "name": { + "$id": "3854", + "kind": "string", + "type": { + "$ref": "270" + }, + "value": "Basic" + }, + "tier": { + "$id": "3855", + "kind": "string", + "type": { + "$ref": "276" + }, + "value": "Regional" + } + } + } + } + }, + "privateIPAddressVersion": { + "$id": "3856", + "kind": "string", + "type": { + "$ref": "258" + }, + "value": "IPv4" + }, + "applicationGatewayBackendAddressPools": { + "$id": "3857", + "kind": "array", + "type": { + "$ref": "1124" + }, + "value": [ + { + "$id": "3858", + "kind": "model", + "type": { + "$ref": "802" + }, + "value": { + "$id": "3859", + "id": { + "$id": "3860", + "kind": "string", + "type": { + "$ref": "804" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}/backendAddressPools/{backendAddressPoolName}" + } + } + } + ] + }, + "applicationSecurityGroups": { + "$id": "3861", + "kind": "array", + "type": { + "$ref": "1128" + }, + "value": [ + { + "$id": "3862", + "kind": "model", + "type": { + "$ref": "802" + }, + "value": { + "$id": "3863", + "id": { + "$id": "3864", + "kind": "string", + "type": { + "$ref": "804" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationSecurityGroups/{applicationSecurityGroupName}" + } + } + } + ] + }, + "loadBalancerBackendAddressPools": { + "$id": "3865", + "kind": "array", + "type": { + "$ref": "1132" + }, + "value": [ + { + "$id": "3866", + "kind": "model", + "type": { + "$ref": "802" + }, + "value": { + "$id": "3867", + "id": { + "$id": "3868", + "kind": "string", + "type": { + "$ref": "804" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/backendAddressPools/{backendAddressPoolName}" + } + } + } + ] + }, + "loadBalancerInboundNatPools": { + "$id": "3869", + "kind": "array", + "type": { + "$ref": "1136" + }, + "value": [ + { + "$id": "3870", + "kind": "model", + "type": { + "$ref": "802" + }, + "value": { + "$id": "3871", + "id": { + "$id": "3872", + "kind": "string", + "type": { + "$ref": "804" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/inboundNatPools/{inboundNatPoolName}" + } + } + } + ] + } + } + } + } + } + ] + }, + "enableIPForwarding": { + "$id": "3873", + "kind": "boolean", + "type": { + "$ref": "1144" + }, + "value": true + }, + "deleteOption": { + "$id": "3874", + "kind": "string", + "type": { + "$ref": "264" + }, + "value": "Delete" + }, + "auxiliaryMode": { + "$id": "3875", + "kind": "string", + "type": { + "$ref": "282" + }, + "value": "None" + }, + "auxiliarySku": { + "$id": "3876", + "kind": "string", + "type": { + "$ref": "290" + }, + "value": "None" + } + } + } + } + } + ] + }, + "networkApiVersion": { + "$id": "3877", + "kind": "string", + "type": { + "$ref": "302" + }, + "value": "2020-11-01" + } + } + }, + "securityProfile": { + "$id": "3878", + "kind": "model", + "type": { + "$ref": "1166" + }, + "value": { + "$id": "3879", + "uefiSettings": { + "$id": "3880", + "kind": "model", + "type": { + "$ref": "1168" + }, + "value": { + "$id": "3881", + "secureBootEnabled": { + "$id": "3882", + "kind": "boolean", + "type": { + "$ref": "1170" + }, + "value": true + }, + "vTpmEnabled": { + "$id": "3883", + "kind": "boolean", + "type": { + "$ref": "1174" + }, + "value": true + } + } + }, + "encryptionAtHost": { + "$id": "3884", + "kind": "boolean", + "type": { + "$ref": "1180" + }, + "value": true + }, + "securityType": { + "$id": "3885", + "kind": "string", + "type": { + "$ref": "306" + }, + "value": "TrustedLaunch" + }, + "encryptionIdentity": { + "$id": "3886", + "kind": "model", + "type": { + "$ref": "1187" + }, + "value": { + "$id": "3887", + "userAssignedIdentityResourceId": { + "$id": "3888", + "kind": "string", + "type": { + "$ref": "1189" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{userAssignedIdentityName}" + } + } + }, + "proxyAgentSettings": { + "$id": "3889", + "kind": "model", + "type": { + "$ref": "1196" + }, + "value": { + "$id": "3890", + "enabled": { + "$id": "3891", + "kind": "boolean", + "type": { + "$ref": "1198" + }, + "value": true + }, + "mode": { + "$id": "3892", + "kind": "string", + "type": { + "$ref": "312" + }, + "value": "Audit" + }, + "keyIncarnationId": { + "$id": "3893", + "kind": "number", + "type": { + "$ref": "1205" + }, + "value": 20 + } + } + } + } + }, + "diagnosticsProfile": { + "$id": "3894", + "kind": "model", + "type": { + "$ref": "1213" + }, + "value": { + "$id": "3895", + "bootDiagnostics": { + "$id": "3896", + "kind": "model", + "type": { + "$ref": "1215" + }, + "value": { + "$id": "3897", + "enabled": { + "$id": "3898", + "kind": "boolean", + "type": { + "$ref": "1217" + }, + "value": true + }, + "storageUri": { + "$id": "3899", + "kind": "string", + "type": { + "$ref": "1221" + }, + "value": "http://myStorageAccountName.blob.core.windows.net" + } + } + } + } + }, + "extensionProfile": { + "$id": "3900", + "kind": "model", + "type": { + "$ref": "1229" + }, + "value": { + "$id": "3901", + "extensions": { + "$id": "3902", + "kind": "array", + "type": { + "$ref": "1231" + }, + "value": [ + { + "$id": "3903", + "kind": "model", + "type": { + "$ref": "1232" + }, + "value": { + "$id": "3904", + "name": { + "$id": "3905", + "kind": "string", + "type": { + "$ref": "1239" + }, + "value": "bndxuxx" + }, + "properties": { + "$id": "3906", + "kind": "model", + "type": { + "$ref": "1247" + }, + "value": { + "$id": "3907", + "forceUpdateTag": { + "$id": "3908", + "kind": "string", + "type": { + "$ref": "1249" + }, + "value": "yhgxw" + }, + "publisher": { + "$id": "3909", + "kind": "string", + "type": { + "$ref": "1253" + }, + "value": "kpxtirxjfprhs" + }, + "type": { + "$id": "3910", + "kind": "string", + "type": { + "$ref": "1257" + }, + "value": "pgjilctjjwaa" + }, + "typeHandlerVersion": { + "$id": "3911", + "kind": "string", + "type": { + "$ref": "1261" + }, + "value": "zevivcoilxmbwlrihhhibq" + }, + "autoUpgradeMinorVersion": { + "$id": "3912", + "kind": "boolean", + "type": { + "$ref": "1265" + }, + "value": true + }, + "enableAutomaticUpgrade": { + "$id": "3913", + "kind": "boolean", + "type": { + "$ref": "1269" + }, + "value": true + }, + "settings": { + "$id": "3914", + "kind": "dict", + "type": { + "$ref": "1273" + }, + "value": { + "$id": "3915" + } + }, + "protectedSettings": { + "$id": "3916", + "kind": "dict", + "type": { + "$ref": "1279" + }, + "value": { + "$id": "3917" + } + }, + "provisionAfterExtensions": { + "$id": "3918", + "kind": "array", + "type": { + "$ref": "1289" + }, + "value": [ + { + "$id": "3919", + "kind": "string", + "type": { + "$ref": "1290" + }, + "value": "nftzosroolbcwmpupujzqwqe" + } + ] + }, + "suppressFailures": { + "$id": "3920", + "kind": "boolean", + "type": { + "$ref": "1294" + }, + "value": true + }, + "protectedSettingsFromKeyVault": { + "$id": "3921", + "kind": "model", + "type": { + "$ref": "1298" + }, + "value": { + "$id": "3922", + "secretUrl": { + "$id": "3923", + "kind": "string", + "type": { + "$ref": "1300" + }, + "value": "https://myVaultName.vault.azure.net/secrets/secret/mySecretName" + }, + "sourceVault": { + "$id": "3924", + "kind": "model", + "type": { + "$ref": "802" + }, + "value": { + "$id": "3925", + "id": { + "$id": "3926", + "kind": "string", + "type": { + "$ref": "804" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}" + } + } + } + } + } + } + } + } + } + ] + }, + "extensionsTimeBudget": { + "$id": "3927", + "kind": "string", + "type": { + "$ref": "1313" + }, + "value": "mbhjahtdygwgyszdwjtvlvtgchdwil" + } + } + }, + "licenseType": { + "$id": "3928", + "kind": "string", + "type": { + "$ref": "1319" + }, + "value": "v" + }, + "scheduledEventsProfile": { + "$id": "3929", + "kind": "model", + "type": { + "$ref": "1323" + }, + "value": { + "$id": "3930", + "terminateNotificationProfile": { + "$id": "3931", + "kind": "model", + "type": { + "$ref": "1325" + }, + "value": { + "$id": "3932", + "notBeforeTimeout": { + "$id": "3933", + "kind": "string", + "type": { + "$ref": "1327" + }, + "value": "iljppmmw" + }, + "enable": { + "$id": "3934", + "kind": "boolean", + "type": { + "$ref": "1331" + }, + "value": true + } + } + }, + "osImageNotificationProfile": { + "$id": "3935", + "kind": "model", + "type": { + "$ref": "1337" + }, + "value": { + "$id": "3936", + "notBeforeTimeout": { + "$id": "3937", + "kind": "string", + "type": { + "$ref": "1339" + }, + "value": "olbpadmevekyczfokodtfprxti" + }, + "enable": { + "$id": "3938", + "kind": "boolean", + "type": { + "$ref": "1343" + }, + "value": true + } + } + } + } + }, + "userData": { + "$id": "3939", + "kind": "string", + "type": { + "$ref": "1351" + }, + "value": "s" + }, + "capacityReservation": { + "$id": "3940", + "kind": "model", + "type": { + "$ref": "1355" + }, + "value": { + "$id": "3941", + "capacityReservationGroup": { + "$id": "3942", + "kind": "model", + "type": { + "$ref": "802" + }, + "value": { + "$id": "3943", + "id": { + "$id": "3944", + "kind": "string", + "type": { + "$ref": "804" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/capacityReservationGroups/{capacityReservationGroupName}" + } + } + } + } + }, + "applicationProfile": { + "$id": "3945", + "kind": "model", + "type": { + "$ref": "1362" + }, + "value": { + "$id": "3946", + "galleryApplications": { + "$id": "3947", + "kind": "array", + "type": { + "$ref": "1364" + }, + "value": [ + { + "$id": "3948", + "kind": "model", + "type": { + "$ref": "1365" + }, + "value": { + "$id": "3949", + "tags": { + "$id": "3950", + "kind": "string", + "type": { + "$ref": "1367" + }, + "value": "eyrqjbib" + }, + "order": { + "$id": "3951", + "kind": "number", + "type": { + "$ref": "1371" + }, + "value": 5 + }, + "packageReferenceId": { + "$id": "3952", + "kind": "string", + "type": { + "$ref": "1375" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/applications/{applicationName}/versions/{versionName}" + }, + "configurationReference": { + "$id": "3953", + "kind": "string", + "type": { + "$ref": "1380" + }, + "value": "ulztmiavpojpbpbddgnuuiimxcpau" + }, + "treatFailureAsDeploymentFailure": { + "$id": "3954", + "kind": "boolean", + "type": { + "$ref": "1384" + }, + "value": true + }, + "enableAutomaticUpgrade": { + "$id": "3955", + "kind": "boolean", + "type": { + "$ref": "1388" + }, + "value": true + } + } + } + ] + } + } + }, + "hardwareProfile": { + "$id": "3956", + "kind": "model", + "type": { + "$ref": "1396" + }, + "value": { + "$id": "3957", + "vmSizeProperties": { + "$id": "3958", + "kind": "model", + "type": { + "$ref": "1398" + }, + "value": { + "$id": "3959", + "vCPUsAvailable": { + "$id": "3960", + "kind": "number", + "type": { + "$ref": "1400" + }, + "value": 16 + }, + "vCPUsPerCore": { + "$id": "3961", + "kind": "number", + "type": { + "$ref": "1404" + }, + "value": 23 + } + } + } + } + }, + "serviceArtifactReference": { + "$id": "3962", + "kind": "model", + "type": { + "$ref": "1412" + }, + "value": { + "$id": "3963", + "id": { + "$id": "3964", + "kind": "string", + "type": { + "$ref": "1414" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/serviceArtifacts/{serviceArtifactsName}/vmArtifactsProfiles/{vmArtifactsProfileName}" + } + } + }, + "securityPostureReference": { + "$id": "3965", + "kind": "model", + "type": { + "$ref": "1421" + }, + "value": { + "$id": "3966", + "id": { + "$id": "3967", + "kind": "string", + "type": { + "$ref": "1423" + }, + "value": "/CommunityGalleries/{communityGalleryName}/securityPostures/{securityPostureName}/versions/{major.minor.patch}|{major.*}|latest" + }, + "excludeExtensions": { + "$id": "3968", + "kind": "array", + "type": { + "$ref": "1427" + }, + "value": [ + { + "$id": "3969", + "kind": "string", + "type": { + "$ref": "1428" + }, + "value": "{securityPostureVMExtensionName}" + } + ] + }, + "isOverridable": { + "$id": "3970", + "kind": "boolean", + "type": { + "$ref": "1432" + }, + "value": true + } + } + } + } + }, + "computeApiVersion": { + "$id": "3971", + "kind": "string", + "type": { + "$ref": "1454" + }, + "value": "2023-07-01" + }, + "platformFaultDomainCount": { + "$id": "3972", + "kind": "number", + "type": { + "$ref": "1458" + }, + "value": 1 + } + } + } + } + }, + "plan": { + "$id": "3973", + "kind": "model", + "type": { + "$ref": "1569" + }, + "value": { + "$id": "3974", + "name": { + "$id": "3975", + "kind": "string", + "type": { + "$ref": "1571" + }, + "value": "jwgrcrnrtfoxn" + }, + "publisher": { + "$id": "3976", + "kind": "string", + "type": { + "$ref": "1575" + }, + "value": "iozjbiqqckqm" + }, + "product": { + "$id": "3977", + "kind": "string", + "type": { + "$ref": "1579" + }, + "value": "cgopbyvdyqikahwyxfpzwaqk" + }, + "promotionCode": { + "$id": "3978", + "kind": "string", + "type": { + "$ref": "1583" + }, + "value": "naglezezplcaruqogtxnuizslqnnbr" + }, + "version": { + "$id": "3979", + "kind": "string", + "type": { + "$ref": "1587" + }, + "value": "wa" + } + } + } + } + } + } + ], + "responses": [ + { + "$id": "3980", + "response": { + "$ref": "3615" + }, + "statusCode": 200, + "bodyValue": { + "$id": "3981", + "kind": "model", + "type": { + "$ref": "429" + }, + "value": { + "$id": "3982", + "properties": { + "$id": "3983", + "kind": "model", + "type": { + "$ref": "485" + }, + "value": { + "$id": "3984", + "spotPriorityProfile": { + "$id": "3985", + "kind": "model", + "type": { + "$ref": "490" + }, + "value": { + "$id": "3986", + "capacity": { + "$id": "3987", + "kind": "number", + "type": { + "$ref": "492" + }, + "value": 20 + }, + "minCapacity": { + "$id": "3988", + "kind": "number", + "type": { + "$ref": "496" + }, + "value": 10 + }, + "maxPricePerVM": { + "$id": "3989", + "kind": "number", + "type": { + "$ref": "500" + }, + "value": 0.00865 + }, + "evictionPolicy": { + "$id": "3990", + "kind": "string", + "type": { + "$ref": "30" + }, + "value": "Delete" + }, + "allocationStrategy": { + "$id": "3991", + "kind": "string", + "type": { + "$ref": "36" + }, + "value": "PriceCapacityOptimized" + }, + "maintain": { + "$id": "3992", + "kind": "boolean", + "type": { + "$ref": "510" + }, + "value": true + } + } + }, + "regularPriorityProfile": { + "$id": "3993", + "kind": "model", + "type": { + "$ref": "516" + }, + "value": { + "$id": "3994", + "capacity": { + "$id": "3995", + "kind": "number", + "type": { + "$ref": "518" + }, + "value": 20 + }, + "minCapacity": { + "$id": "3996", + "kind": "number", + "type": { + "$ref": "522" + }, + "value": 10 + }, + "allocationStrategy": { + "$id": "3997", + "kind": "string", + "type": { + "$ref": "44" + }, + "value": "LowestPrice" + } + } + }, + "vmSizesProfile": { + "$id": "3998", + "kind": "array", + "type": { + "$ref": "531" + }, + "value": [ + { + "$id": "3999", + "kind": "model", + "type": { + "$ref": "532" + }, + "value": { + "$id": "4000", + "name": { + "$id": "4001", + "kind": "string", + "type": { + "$ref": "534" + }, + "value": "Standard_d1_v2" + }, + "rank": { + "$id": "4002", + "kind": "number", + "type": { + "$ref": "538" + }, + "value": 19225 + } + } + } + ] + }, + "computeProfile": { + "$id": "4003", + "kind": "model", + "type": { + "$ref": "1449" + }, + "value": { + "$id": "4004", + "baseVirtualMachineProfile": { + "$id": "4005", + "kind": "model", + "type": { + "$ref": "644" + }, + "value": { + "$id": "4006", + "osProfile": { + "$id": "4007", + "kind": "model", + "type": { + "$ref": "646" + }, + "value": { + "$id": "4008", + "computerNamePrefix": { + "$id": "4009", + "kind": "string", + "type": { + "$ref": "648" + }, + "value": "o" + }, + "adminUsername": { + "$id": "4010", + "kind": "string", + "type": { + "$ref": "652" + }, + "value": "nrgzqciiaaxjrqldbmjbqkyhntp" + }, + "windowsConfiguration": { + "$id": "4011", + "kind": "model", + "type": { + "$ref": "664" + }, + "value": { + "$id": "4012", + "provisionVMAgent": { + "$id": "4013", + "kind": "boolean", + "type": { + "$ref": "666" + }, + "value": true + }, + "enableAutomaticUpdates": { + "$id": "4014", + "kind": "boolean", + "type": { + "$ref": "670" + }, + "value": true + }, + "timeZone": { + "$id": "4015", + "kind": "string", + "type": { + "$ref": "674" + }, + "value": "hlyjiqcfksgrpjrct" + }, + "additionalUnattendContent": { + "$id": "4016", + "kind": "array", + "type": { + "$ref": "678" + }, + "value": [ + { + "$id": "4017", + "kind": "model", + "type": { + "$ref": "679" + }, + "value": { + "$id": "4018", + "passName": { + "$id": "4019", + "kind": "string", + "type": { + "$ref": "681" + }, + "value": "OobeSystem" + }, + "componentName": { + "$id": "4020", + "kind": "string", + "type": { + "$ref": "685" + }, + "value": "Microsoft-Windows-Shell-Setup" + }, + "settingName": { + "$id": "4021", + "kind": "string", + "type": { + "$ref": "116" + }, + "value": "AutoLogon" + } + } + } + ] + }, + "patchSettings": { + "$id": "4022", + "kind": "model", + "type": { + "$ref": "698" + }, + "value": { + "$id": "4023", + "patchMode": { + "$id": "4024", + "kind": "string", + "type": { + "$ref": "122" + }, + "value": "Manual" + }, + "enableHotpatching": { + "$id": "4025", + "kind": "boolean", + "type": { + "$ref": "703" + }, + "value": true + }, + "assessmentMode": { + "$id": "4026", + "kind": "string", + "type": { + "$ref": "130" + }, + "value": "ImageDefault" + }, + "automaticByPlatformSettings": { + "$id": "4027", + "kind": "model", + "type": { + "$ref": "710" + }, + "value": { + "$id": "4028", + "rebootSetting": { + "$id": "4029", + "kind": "string", + "type": { + "$ref": "136" + }, + "value": "Unknown" + }, + "bypassPlatformSafetyChecksOnUserSchedule": { + "$id": "4030", + "kind": "boolean", + "type": { + "$ref": "715" + }, + "value": true + } + } + } + } + }, + "winRM": { + "$id": "4031", + "kind": "model", + "type": { + "$ref": "723" + }, + "value": { + "$id": "4032", + "listeners": { + "$id": "4033", + "kind": "array", + "type": { + "$ref": "725" + }, + "value": [ + { + "$id": "4034", + "kind": "model", + "type": { + "$ref": "726" + }, + "value": { + "$id": "4035", + "protocol": { + "$id": "4036", + "kind": "string", + "type": { + "$ref": "146" + }, + "value": "Http" + }, + "certificateUrl": { + "$id": "4037", + "kind": "string", + "type": { + "$ref": "731" + }, + "value": "https://myVaultName.vault.azure.net/secrets/myCertName" + } + } + } + ] + } + } + }, + "enableVMAgentPlatformUpdates": { + "$id": "4038", + "kind": "boolean", + "type": { + "$ref": "739" + }, + "value": true + } + } + }, + "linuxConfiguration": { + "$id": "4039", + "kind": "model", + "type": { + "$ref": "745" + }, + "value": { + "$id": "4040", + "disablePasswordAuthentication": { + "$id": "4041", + "kind": "boolean", + "type": { + "$ref": "747" + }, + "value": true + }, + "ssh": { + "$id": "4042", + "kind": "model", + "type": { + "$ref": "751" + }, + "value": { + "$id": "4043", + "publicKeys": { + "$id": "4044", + "kind": "array", + "type": { + "$ref": "753" + }, + "value": [ + { + "$id": "4045", + "kind": "model", + "type": { + "$ref": "754" + }, + "value": { + "$id": "4046", + "path": { + "$id": "4047", + "kind": "string", + "type": { + "$ref": "756" + }, + "value": "kmqz" + }, + "keyData": { + "$id": "4048", + "kind": "string", + "type": { + "$ref": "760" + }, + "value": "kivgsubusvpprwqaqpjcmhsv" + } + } + } + ] + } + } + }, + "provisionVMAgent": { + "$id": "4049", + "kind": "boolean", + "type": { + "$ref": "768" + }, + "value": true + }, + "patchSettings": { + "$id": "4050", + "kind": "model", + "type": { + "$ref": "772" + }, + "value": { + "$id": "4051", + "patchMode": { + "$id": "4052", + "kind": "string", + "type": { + "$ref": "152" + }, + "value": "ImageDefault" + }, + "assessmentMode": { + "$id": "4053", + "kind": "string", + "type": { + "$ref": "158" + }, + "value": "ImageDefault" + }, + "automaticByPlatformSettings": { + "$id": "4054", + "kind": "model", + "type": { + "$ref": "780" + }, + "value": { + "$id": "4055", + "rebootSetting": { + "$id": "4056", + "kind": "string", + "type": { + "$ref": "164" + }, + "value": "Unknown" + }, + "bypassPlatformSafetyChecksOnUserSchedule": { + "$id": "4057", + "kind": "boolean", + "type": { + "$ref": "785" + }, + "value": true + } + } + } + } + }, + "enableVMAgentPlatformUpdates": { + "$id": "4058", + "kind": "boolean", + "type": { + "$ref": "793" + }, + "value": true + } + } + }, + "secrets": { + "$id": "4059", + "kind": "array", + "type": { + "$ref": "799" + }, + "value": [ + { + "$id": "4060", + "kind": "model", + "type": { + "$ref": "800" + }, + "value": { + "$id": "4061", + "sourceVault": { + "$id": "4062", + "kind": "model", + "type": { + "$ref": "802" + }, + "value": { + "$id": "4063", + "id": { + "$id": "4064", + "kind": "string", + "type": { + "$ref": "804" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}" + } + } + }, + "vaultCertificates": { + "$id": "4065", + "kind": "array", + "type": { + "$ref": "811" + }, + "value": [ + { + "$id": "4066", + "kind": "model", + "type": { + "$ref": "812" + }, + "value": { + "$id": "4067", + "certificateUrl": { + "$id": "4068", + "kind": "string", + "type": { + "$ref": "814" + }, + "value": "https://myVaultName.vault.azure.net/secrets/myCertName" + }, + "certificateStore": { + "$id": "4069", + "kind": "string", + "type": { + "$ref": "818" + }, + "value": "nlxrwavpzhueffxsshlun" + } + } + } + ] + } + } + } + ] + }, + "allowExtensionOperations": { + "$id": "4070", + "kind": "boolean", + "type": { + "$ref": "826" + }, + "value": true + }, + "requireGuestProvisionSignal": { + "$id": "4071", + "kind": "boolean", + "type": { + "$ref": "830" + }, + "value": true + } + } + }, + "storageProfile": { + "$id": "4072", + "kind": "model", + "type": { + "$ref": "836" + }, + "value": { + "$id": "4073", + "imageReference": { + "$id": "4074", + "kind": "model", + "type": { + "$ref": "838" + }, + "value": { + "$id": "4075", + "publisher": { + "$id": "4076", + "kind": "string", + "type": { + "$ref": "845" + }, + "value": "mqxgwbiyjzmxavhbkd" + }, + "offer": { + "$id": "4077", + "kind": "string", + "type": { + "$ref": "849" + }, + "value": "isxgumkarlkomp" + }, + "sku": { + "$id": "4078", + "kind": "string", + "type": { + "$ref": "853" + }, + "value": "eojmppqcrnpmxirtp" + }, + "version": { + "$id": "4079", + "kind": "string", + "type": { + "$ref": "857" + }, + "value": "wvpcqefgtmqdgltiuz" + }, + "sharedGalleryImageId": { + "$id": "4080", + "kind": "string", + "type": { + "$ref": "865" + }, + "value": "kmkgihoxwlawuuhcinfirktdwkmx" + }, + "communityGalleryImageId": { + "$id": "4081", + "kind": "string", + "type": { + "$ref": "869" + }, + "value": "vlqe" + }, + "id": { + "$id": "4082", + "kind": "string", + "type": { + "$ref": "840" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images/{imageName}/versions/{versionName}" + }, + "exactVersion": { + "$id": "4083", + "kind": "string", + "type": { + "$ref": "861" + }, + "value": "zjbntmiskjexlr" + } + } + }, + "osDisk": { + "$id": "4084", + "kind": "model", + "type": { + "$ref": "875" + }, + "value": { + "$id": "4085", + "name": { + "$id": "4086", + "kind": "string", + "type": { + "$ref": "877" + }, + "value": "wfttw" + }, + "caching": { + "$id": "4087", + "kind": "string", + "type": { + "$ref": "174" + }, + "value": "None" + }, + "writeAcceleratorEnabled": { + "$id": "4088", + "kind": "boolean", + "type": { + "$ref": "884" + }, + "value": true + }, + "createOption": { + "$id": "4089", + "kind": "string", + "type": { + "$ref": "182" + }, + "value": "FromImage" + }, + "diffDiskSettings": { + "$id": "4090", + "kind": "model", + "type": { + "$ref": "891" + }, + "value": { + "$id": "4091", + "option": { + "$id": "4092", + "kind": "string", + "type": { + "$ref": "194" + }, + "value": "Local" + }, + "placement": { + "$id": "4093", + "kind": "string", + "type": { + "$ref": "198" + }, + "value": "CacheDisk" + } + } + }, + "diskSizeGB": { + "$id": "4094", + "kind": "number", + "type": { + "$ref": "901" + }, + "value": 14 + }, + "osType": { + "$id": "4095", + "kind": "string", + "type": { + "$ref": "206" + }, + "value": "Windows" + }, + "image": { + "$id": "4096", + "kind": "model", + "type": { + "$ref": "908" + }, + "value": { + "$id": "4097", + "uri": { + "$id": "4098", + "kind": "string", + "type": { + "$ref": "910" + }, + "value": "https://myStorageAccountName.blob.core.windows.net/myContainerName/myVhdName.vhd" + } + } + }, + "vhdContainers": { + "$id": "4099", + "kind": "array", + "type": { + "$ref": "916" + }, + "value": [ + { + "$id": "4100", + "kind": "string", + "type": { + "$ref": "917" + }, + "value": "tkzcwddtinkfpnfklatw" + } + ] + }, + "managedDisk": { + "$id": "4101", + "kind": "model", + "type": { + "$ref": "921" + }, + "value": { + "$id": "4102", + "storageAccountType": { + "$id": "4103", + "kind": "string", + "type": { + "$ref": "212" + }, + "value": "Standard_LRS" + }, + "diskEncryptionSet": { + "$id": "4104", + "kind": "model", + "type": { + "$ref": "926" + }, + "value": { + "$id": "4105", + "id": { + "$id": "4106", + "kind": "string", + "type": { + "$ref": "928" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}" + } + } + }, + "securityProfile": { + "$id": "4107", + "kind": "model", + "type": { + "$ref": "935" + }, + "value": { + "$id": "4108", + "securityEncryptionType": { + "$id": "4109", + "kind": "string", + "type": { + "$ref": "228" + }, + "value": "VMGuestStateOnly" + }, + "diskEncryptionSet": { + "$id": "4110", + "kind": "model", + "type": { + "$ref": "926" + }, + "value": { + "$id": "4111", + "id": { + "$id": "4112", + "kind": "string", + "type": { + "$ref": "928" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}" + } + } + } + } + } + } + }, + "deleteOption": { + "$id": "4113", + "kind": "string", + "type": { + "$ref": "236" + }, + "value": "Delete" + } + } + }, + "dataDisks": { + "$id": "4114", + "kind": "array", + "type": { + "$ref": "952" + }, + "value": [ + { + "$id": "4115", + "kind": "model", + "type": { + "$ref": "953" + }, + "value": { + "$id": "4116", + "name": { + "$id": "4117", + "kind": "string", + "type": { + "$ref": "955" + }, + "value": "eogiykmdmeikswxmigjws" + }, + "lun": { + "$id": "4118", + "kind": "number", + "type": { + "$ref": "959" + }, + "value": 14 + }, + "caching": { + "$id": "4119", + "kind": "string", + "type": { + "$ref": "174" + }, + "value": "None" + }, + "writeAcceleratorEnabled": { + "$id": "4120", + "kind": "boolean", + "type": { + "$ref": "966" + }, + "value": true + }, + "createOption": { + "$id": "4121", + "kind": "string", + "type": { + "$ref": "182" + }, + "value": "FromImage" + }, + "diskSizeGB": { + "$id": "4122", + "kind": "number", + "type": { + "$ref": "973" + }, + "value": 6 + }, + "managedDisk": { + "$id": "4123", + "kind": "model", + "type": { + "$ref": "921" + }, + "value": { + "$id": "4124", + "storageAccountType": { + "$id": "4125", + "kind": "string", + "type": { + "$ref": "212" + }, + "value": "Standard_LRS" + }, + "diskEncryptionSet": { + "$id": "4126", + "kind": "model", + "type": { + "$ref": "926" + }, + "value": { + "$id": "4127", + "id": { + "$id": "4128", + "kind": "string", + "type": { + "$ref": "928" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}" + } + } + }, + "securityProfile": { + "$id": "4129", + "kind": "model", + "type": { + "$ref": "935" + }, + "value": { + "$id": "4130", + "securityEncryptionType": { + "$id": "4131", + "kind": "string", + "type": { + "$ref": "228" + }, + "value": "VMGuestStateOnly" + }, + "diskEncryptionSet": { + "$id": "4132", + "kind": "model", + "type": { + "$ref": "926" + }, + "value": { + "$id": "4133", + "id": { + "$id": "4134", + "kind": "string", + "type": { + "$ref": "928" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}" + } + } + } + } + } + } + }, + "diskIOPSReadWrite": { + "$id": "4135", + "kind": "number", + "type": { + "$ref": "980" + }, + "value": 27 + }, + "diskMBpsReadWrite": { + "$id": "4136", + "kind": "number", + "type": { + "$ref": "984" + }, + "value": 2 + }, + "deleteOption": { + "$id": "4137", + "kind": "string", + "type": { + "$ref": "236" + }, + "value": "Delete" + } + } + } + ] + }, + "diskControllerType": { + "$id": "4138", + "kind": "string", + "type": { + "$ref": "242" + }, + "value": "uzb" + } + } + }, + "networkProfile": { + "$id": "4139", + "kind": "model", + "type": { + "$ref": "998" + }, + "value": { + "$id": "4140", + "healthProbe": { + "$id": "4141", + "kind": "model", + "type": { + "$ref": "1000" + }, + "value": { + "$id": "4142", + "id": { + "$id": "4143", + "kind": "string", + "type": { + "$ref": "1002" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/probes/{probeName}" + } + } + }, + "networkInterfaceConfigurations": { + "$id": "4144", + "kind": "array", + "type": { + "$ref": "1009" + }, + "value": [ + { + "$id": "4145", + "kind": "model", + "type": { + "$ref": "1010" + }, + "value": { + "$id": "4146", + "name": { + "$id": "4147", + "kind": "string", + "type": { + "$ref": "1012" + }, + "value": "i" + }, + "properties": { + "$id": "4148", + "kind": "model", + "type": { + "$ref": "1016" + }, + "value": { + "$id": "4149", + "primary": { + "$id": "4150", + "kind": "boolean", + "type": { + "$ref": "1018" + }, + "value": true + }, + "enableAcceleratedNetworking": { + "$id": "4151", + "kind": "boolean", + "type": { + "$ref": "1022" + }, + "value": true + }, + "disableTcpStateTracking": { + "$id": "4152", + "kind": "boolean", + "type": { + "$ref": "1026" + }, + "value": true + }, + "enableFpga": { + "$id": "4153", + "kind": "boolean", + "type": { + "$ref": "1030" + }, + "value": true + }, + "networkSecurityGroup": { + "$id": "4154", + "kind": "model", + "type": { + "$ref": "802" + }, + "value": { + "$id": "4155", + "id": { + "$id": "4156", + "kind": "string", + "type": { + "$ref": "804" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/{networkSecurityGroupName}" + } + } + }, + "dnsSettings": { + "$id": "4157", + "kind": "model", + "type": { + "$ref": "1037" + }, + "value": { + "$id": "4158", + "dnsServers": { + "$id": "4159", + "kind": "array", + "type": { + "$ref": "1039" + }, + "value": [ + { + "$id": "4160", + "kind": "string", + "type": { + "$ref": "1040" + }, + "value": "nxmmfolhclsesu" + } + ] + } + } + }, + "ipConfigurations": { + "$id": "4161", + "kind": "array", + "type": { + "$ref": "1046" + }, + "value": [ + { + "$id": "4162", + "kind": "model", + "type": { + "$ref": "1047" + }, + "value": { + "$id": "4163", + "name": { + "$id": "4164", + "kind": "string", + "type": { + "$ref": "1049" + }, + "value": "oezqhkidfhyywlfzwuotilrpbqnjg" + }, + "properties": { + "$id": "4165", + "kind": "model", + "type": { + "$ref": "1053" + }, + "value": { + "$id": "4166", + "subnet": { + "$id": "4167", + "kind": "model", + "type": { + "$ref": "1000" + }, + "value": { + "$id": "4168", + "id": { + "$id": "4169", + "kind": "string", + "type": { + "$ref": "1002" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}" + } + } + }, + "primary": { + "$id": "4170", + "kind": "boolean", + "type": { + "$ref": "1058" + }, + "value": true + }, + "publicIPAddressConfiguration": { + "$id": "4171", + "kind": "model", + "type": { + "$ref": "1062" + }, + "value": { + "$id": "4172", + "name": { + "$id": "4173", + "kind": "string", + "type": { + "$ref": "1064" + }, + "value": "fvpqf" + }, + "properties": { + "$id": "4174", + "kind": "model", + "type": { + "$ref": "1068" + }, + "value": { + "$id": "4175", + "idleTimeoutInMinutes": { + "$id": "4176", + "kind": "number", + "type": { + "$ref": "1070" + }, + "value": 9 + }, + "dnsSettings": { + "$id": "4177", + "kind": "model", + "type": { + "$ref": "1074" + }, + "value": { + "$id": "4178", + "domainNameLabel": { + "$id": "4179", + "kind": "string", + "type": { + "$ref": "1076" + }, + "value": "ukrddzvmorpmfsczjwtbvp" + }, + "domainNameLabelScope": { + "$id": "4180", + "kind": "string", + "type": { + "$ref": "248" + }, + "value": "TenantReuse" + } + } + }, + "ipTags": { + "$id": "4181", + "kind": "array", + "type": { + "$ref": "1085" + }, + "value": [ + { + "$id": "4182", + "kind": "model", + "type": { + "$ref": "1086" + }, + "value": { + "$id": "4183", + "ipTagType": { + "$id": "4184", + "kind": "string", + "type": { + "$ref": "1088" + }, + "value": "sddgsoemnzgqizale" + }, + "tag": { + "$id": "4185", + "kind": "string", + "type": { + "$ref": "1092" + }, + "value": "wufmhrjsakbiaetyara" + } + } + } + ] + }, + "publicIPPrefix": { + "$id": "4186", + "kind": "model", + "type": { + "$ref": "802" + }, + "value": { + "$id": "4187", + "id": { + "$id": "4188", + "kind": "string", + "type": { + "$ref": "804" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes/{publicIPPrefixName}" + } + } + }, + "publicIPAddressVersion": { + "$id": "4189", + "kind": "string", + "type": { + "$ref": "258" + }, + "value": "IPv4" + }, + "deleteOption": { + "$id": "4190", + "kind": "string", + "type": { + "$ref": "264" + }, + "value": "Delete" + } + } + }, + "sku": { + "$id": "4191", + "kind": "model", + "type": { + "$ref": "1109" + }, + "value": { + "$id": "4192", + "name": { + "$id": "4193", + "kind": "string", + "type": { + "$ref": "270" + }, + "value": "Basic" + }, + "tier": { + "$id": "4194", + "kind": "string", + "type": { + "$ref": "276" + }, + "value": "Regional" + } + } + } + } + }, + "privateIPAddressVersion": { + "$id": "4195", + "kind": "string", + "type": { + "$ref": "258" + }, + "value": "IPv4" + }, + "applicationGatewayBackendAddressPools": { + "$id": "4196", + "kind": "array", + "type": { + "$ref": "1124" + }, + "value": [ + { + "$id": "4197", + "kind": "model", + "type": { + "$ref": "802" + }, + "value": { + "$id": "4198", + "id": { + "$id": "4199", + "kind": "string", + "type": { + "$ref": "804" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}/backendAddressPools/{backendAddressPoolName}" + } + } + } + ] + }, + "applicationSecurityGroups": { + "$id": "4200", + "kind": "array", + "type": { + "$ref": "1128" + }, + "value": [ + { + "$id": "4201", + "kind": "model", + "type": { + "$ref": "802" + }, + "value": { + "$id": "4202", + "id": { + "$id": "4203", + "kind": "string", + "type": { + "$ref": "804" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationSecurityGroups/{applicationSecurityGroupName}" + } + } + } + ] + }, + "loadBalancerBackendAddressPools": { + "$id": "4204", + "kind": "array", + "type": { + "$ref": "1132" + }, + "value": [ + { + "$id": "4205", + "kind": "model", + "type": { + "$ref": "802" + }, + "value": { + "$id": "4206", + "id": { + "$id": "4207", + "kind": "string", + "type": { + "$ref": "804" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/backendAddressPools/{backendAddressPoolName}" + } + } + } + ] + }, + "loadBalancerInboundNatPools": { + "$id": "4208", + "kind": "array", + "type": { + "$ref": "1136" + }, + "value": [ + { + "$id": "4209", + "kind": "model", + "type": { + "$ref": "802" + }, + "value": { + "$id": "4210", + "id": { + "$id": "4211", + "kind": "string", + "type": { + "$ref": "804" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/inboundNatPools/{inboundNatPoolName}" + } + } + } + ] + } + } + } + } + } + ] + }, + "enableIPForwarding": { + "$id": "4212", + "kind": "boolean", + "type": { + "$ref": "1144" + }, + "value": true + }, + "deleteOption": { + "$id": "4213", + "kind": "string", + "type": { + "$ref": "264" + }, + "value": "Delete" + }, + "auxiliaryMode": { + "$id": "4214", + "kind": "string", + "type": { + "$ref": "282" + }, + "value": "None" + }, + "auxiliarySku": { + "$id": "4215", + "kind": "string", + "type": { + "$ref": "290" + }, + "value": "None" + } + } + } + } + } + ] + }, + "networkApiVersion": { + "$id": "4216", + "kind": "string", + "type": { + "$ref": "302" + }, + "value": "2020-11-01" + } + } + }, + "securityProfile": { + "$id": "4217", + "kind": "model", + "type": { + "$ref": "1166" + }, + "value": { + "$id": "4218", + "uefiSettings": { + "$id": "4219", + "kind": "model", + "type": { + "$ref": "1168" + }, + "value": { + "$id": "4220", + "secureBootEnabled": { + "$id": "4221", + "kind": "boolean", + "type": { + "$ref": "1170" + }, + "value": true + }, + "vTpmEnabled": { + "$id": "4222", + "kind": "boolean", + "type": { + "$ref": "1174" + }, + "value": true + } + } + }, + "encryptionAtHost": { + "$id": "4223", + "kind": "boolean", + "type": { + "$ref": "1180" + }, + "value": true + }, + "securityType": { + "$id": "4224", + "kind": "string", + "type": { + "$ref": "306" + }, + "value": "TrustedLaunch" + }, + "encryptionIdentity": { + "$id": "4225", + "kind": "model", + "type": { + "$ref": "1187" + }, + "value": { + "$id": "4226", + "userAssignedIdentityResourceId": { + "$id": "4227", + "kind": "string", + "type": { + "$ref": "1189" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{userAssignedIdentityName}" + } + } + }, + "proxyAgentSettings": { + "$id": "4228", + "kind": "model", + "type": { + "$ref": "1196" + }, + "value": { + "$id": "4229", + "enabled": { + "$id": "4230", + "kind": "boolean", + "type": { + "$ref": "1198" + }, + "value": true + }, + "mode": { + "$id": "4231", + "kind": "string", + "type": { + "$ref": "312" + }, + "value": "Audit" + }, + "keyIncarnationId": { + "$id": "4232", + "kind": "number", + "type": { + "$ref": "1205" + }, + "value": 20 + } + } + } + } + }, + "diagnosticsProfile": { + "$id": "4233", + "kind": "model", + "type": { + "$ref": "1213" + }, + "value": { + "$id": "4234", + "bootDiagnostics": { + "$id": "4235", + "kind": "model", + "type": { + "$ref": "1215" + }, + "value": { + "$id": "4236", + "enabled": { + "$id": "4237", + "kind": "boolean", + "type": { + "$ref": "1217" + }, + "value": true + }, + "storageUri": { + "$id": "4238", + "kind": "string", + "type": { + "$ref": "1221" + }, + "value": "http://myStorageAccountName.blob.core.windows.net" + } + } + } + } + }, + "extensionProfile": { + "$id": "4239", + "kind": "model", + "type": { + "$ref": "1229" + }, + "value": { + "$id": "4240", + "extensions": { + "$id": "4241", + "kind": "array", + "type": { + "$ref": "1231" + }, + "value": [ + { + "$id": "4242", + "kind": "model", + "type": { + "$ref": "1232" + }, + "value": { + "$id": "4243", + "name": { + "$id": "4244", + "kind": "string", + "type": { + "$ref": "1239" + }, + "value": "bndxuxx" + }, + "properties": { + "$id": "4245", + "kind": "model", + "type": { + "$ref": "1247" + }, + "value": { + "$id": "4246", + "forceUpdateTag": { + "$id": "4247", + "kind": "string", + "type": { + "$ref": "1249" + }, + "value": "yhgxw" + }, + "publisher": { + "$id": "4248", + "kind": "string", + "type": { + "$ref": "1253" + }, + "value": "kpxtirxjfprhs" + }, + "type": { + "$id": "4249", + "kind": "string", + "type": { + "$ref": "1257" + }, + "value": "pgjilctjjwaa" + }, + "typeHandlerVersion": { + "$id": "4250", + "kind": "string", + "type": { + "$ref": "1261" + }, + "value": "zevivcoilxmbwlrihhhibq" + }, + "autoUpgradeMinorVersion": { + "$id": "4251", + "kind": "boolean", + "type": { + "$ref": "1265" + }, + "value": true + }, + "enableAutomaticUpgrade": { + "$id": "4252", + "kind": "boolean", + "type": { + "$ref": "1269" + }, + "value": true + }, + "provisionAfterExtensions": { + "$id": "4253", + "kind": "array", + "type": { + "$ref": "1289" + }, + "value": [ + { + "$id": "4254", + "kind": "string", + "type": { + "$ref": "1290" + }, + "value": "nftzosroolbcwmpupujzqwqe" + } + ] + }, + "suppressFailures": { + "$id": "4255", + "kind": "boolean", + "type": { + "$ref": "1294" + }, + "value": true + }, + "protectedSettingsFromKeyVault": { + "$id": "4256", + "kind": "model", + "type": { + "$ref": "1298" + }, + "value": { + "$id": "4257", + "secretUrl": { + "$id": "4258", + "kind": "string", + "type": { + "$ref": "1300" + }, + "value": "https://myVaultName.vault.azure.net/secrets/secret/mySecretName" + }, + "sourceVault": { + "$id": "4259", + "kind": "model", + "type": { + "$ref": "802" + }, + "value": { + "$id": "4260", + "id": { + "$id": "4261", + "kind": "string", + "type": { + "$ref": "804" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}" + } + } + } + } + }, + "settings": { + "$id": "4262", + "kind": "dict", + "type": { + "$ref": "1273" + }, + "value": { + "$id": "4263" + } + }, + "provisioningState": { + "$id": "4264", + "kind": "string", + "type": { + "$ref": "1285" + }, + "value": "Succeeded" + } + } + }, + "type": { + "$id": "4265", + "kind": "string", + "type": { + "$ref": "1243" + }, + "value": "cmeam" + }, + "id": { + "$id": "4266", + "kind": "string", + "type": { + "$ref": "1234" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/extensions/{extensionName}" + } + } + } + ] + }, + "extensionsTimeBudget": { + "$id": "4267", + "kind": "string", + "type": { + "$ref": "1313" + }, + "value": "mbhjahtdygwgyszdwjtvlvtgchdwil" + } + } + }, + "licenseType": { + "$id": "4268", + "kind": "string", + "type": { + "$ref": "1319" + }, + "value": "v" + }, + "scheduledEventsProfile": { + "$id": "4269", + "kind": "model", + "type": { + "$ref": "1323" + }, + "value": { + "$id": "4270", + "terminateNotificationProfile": { + "$id": "4271", + "kind": "model", + "type": { + "$ref": "1325" + }, + "value": { + "$id": "4272", + "notBeforeTimeout": { + "$id": "4273", + "kind": "string", + "type": { + "$ref": "1327" + }, + "value": "iljppmmw" + }, + "enable": { + "$id": "4274", + "kind": "boolean", + "type": { + "$ref": "1331" + }, + "value": true + } + } + }, + "osImageNotificationProfile": { + "$id": "4275", + "kind": "model", + "type": { + "$ref": "1337" + }, + "value": { + "$id": "4276", + "notBeforeTimeout": { + "$id": "4277", + "kind": "string", + "type": { + "$ref": "1339" + }, + "value": "olbpadmevekyczfokodtfprxti" + }, + "enable": { + "$id": "4278", + "kind": "boolean", + "type": { + "$ref": "1343" + }, + "value": true + } + } + } + } + }, + "userData": { + "$id": "4279", + "kind": "string", + "type": { + "$ref": "1351" + }, + "value": "s" + }, + "capacityReservation": { + "$id": "4280", + "kind": "model", + "type": { + "$ref": "1355" + }, + "value": { + "$id": "4281", + "capacityReservationGroup": { + "$id": "4282", + "kind": "model", + "type": { + "$ref": "802" + }, + "value": { + "$id": "4283", + "id": { + "$id": "4284", + "kind": "string", + "type": { + "$ref": "804" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/capacityReservationGroups/{capacityReservationGroupName}" + } + } + } + } + }, + "applicationProfile": { + "$id": "4285", + "kind": "model", + "type": { + "$ref": "1362" + }, + "value": { + "$id": "4286", + "galleryApplications": { + "$id": "4287", + "kind": "array", + "type": { + "$ref": "1364" + }, + "value": [ + { + "$id": "4288", + "kind": "model", + "type": { + "$ref": "1365" + }, + "value": { + "$id": "4289", + "tags": { + "$id": "4290", + "kind": "string", + "type": { + "$ref": "1367" + }, + "value": "eyrqjbib" + }, + "order": { + "$id": "4291", + "kind": "number", + "type": { + "$ref": "1371" + }, + "value": 5 + }, + "packageReferenceId": { + "$id": "4292", + "kind": "string", + "type": { + "$ref": "1375" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/applications/{applicationName}/versions/{versionName}" + }, + "treatFailureAsDeploymentFailure": { + "$id": "4293", + "kind": "boolean", + "type": { + "$ref": "1384" + }, + "value": true + }, + "enableAutomaticUpgrade": { + "$id": "4294", + "kind": "boolean", + "type": { + "$ref": "1388" + }, + "value": true + } + } + } + ] + } + } + }, + "hardwareProfile": { + "$id": "4295", + "kind": "model", + "type": { + "$ref": "1396" + }, + "value": { + "$id": "4296", + "vmSizeProperties": { + "$id": "4297", + "kind": "model", + "type": { + "$ref": "1398" + }, + "value": { + "$id": "4298", + "vCPUsAvailable": { + "$id": "4299", + "kind": "number", + "type": { + "$ref": "1400" + }, + "value": 16 + }, + "vCPUsPerCore": { + "$id": "4300", + "kind": "number", + "type": { + "$ref": "1404" + }, + "value": 23 + } + } + } + } + }, + "serviceArtifactReference": { + "$id": "4301", + "kind": "model", + "type": { + "$ref": "1412" + }, + "value": { + "$id": "4302", + "id": { + "$id": "4303", + "kind": "string", + "type": { + "$ref": "1414" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/serviceArtifacts/{serviceArtifactsName}/vmArtifactsProfiles/{vmArtifactsProfileName}" + } + } + }, + "securityPostureReference": { + "$id": "4304", + "kind": "model", + "type": { + "$ref": "1421" + }, + "value": { + "$id": "4305", + "id": { + "$id": "4306", + "kind": "string", + "type": { + "$ref": "1423" + }, + "value": "/CommunityGalleries/{communityGalleryName}/securityPostures/{securityPostureName}/versions/{major.minor.patch}|{major.*}|latest" + }, + "excludeExtensions": { + "$id": "4307", + "kind": "array", + "type": { + "$ref": "1427" + }, + "value": [ + { + "$id": "4308", + "kind": "string", + "type": { + "$ref": "1428" + }, + "value": "{securityPostureVMExtensionName}" + } + ] + }, + "isOverridable": { + "$id": "4309", + "kind": "boolean", + "type": { + "$ref": "1432" + }, + "value": true + } + } + }, + "timeCreated": { + "$id": "4310", + "kind": "string", + "type": { + "$ref": "1438" + }, + "value": "2024-04-29T21:51:44.043Z" + } + } + }, + "computeApiVersion": { + "$id": "4311", + "kind": "string", + "type": { + "$ref": "1454" + }, + "value": "2023-07-01" + }, + "platformFaultDomainCount": { + "$id": "4312", + "kind": "number", + "type": { + "$ref": "1458" + }, + "value": 1 + } + } + }, + "provisioningState": { + "$id": "4313", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Creating" + }, + "timeCreated": { + "$id": "4314", + "kind": "string", + "type": { + "$ref": "1476" + }, + "value": "2024-07-10T00:16:34.8590555+00:00" + }, + "uniqueId": { + "$id": "4315", + "kind": "string", + "type": { + "$ref": "1481" + }, + "value": "a2f7fabd-bbc2-4a20-afe1-49fdb3885a28" + } + } + }, + "zones": { + "$id": "4316", + "kind": "array", + "type": { + "$ref": "1487" + }, + "value": [ + { + "$id": "4317", + "kind": "string", + "type": { + "$ref": "1488" + }, + "value": "zone1" + }, + { + "$id": "4318", + "kind": "string", + "type": { + "$ref": "1488" + }, + "value": "zone2" + } + ] + }, + "identity": { + "$id": "4319", + "kind": "model", + "type": { + "$ref": "1492" + }, + "value": { + "$id": "4320", + "type": { + "$id": "4321", + "kind": "string", + "type": { + "$ref": "318" + }, + "value": "UserAssigned" + }, + "userAssignedIdentities": { + "$id": "4322", + "kind": "dict", + "type": { + "$ref": "1507" + }, + "value": { + "$id": "4323" + } + }, + "principalId": { + "$id": "4324", + "kind": "string", + "type": { + "$ref": "1494" + }, + "value": "4d508e5b-374b-4382-9a1c-01fb8b6cb37c" + }, + "tenantId": { + "$id": "4325", + "kind": "string", + "type": { + "$ref": "1499" + }, + "value": "5d508e5b-374b-4382-9a1c-01fb8b6cb37c" + } + } + }, + "tags": { + "$id": "4326", + "kind": "dict", + "type": { + "$ref": "475" + }, + "value": { + "$id": "4327" + } + }, + "location": { + "$id": "4328", + "kind": "string", + "type": { + "$ref": "481" + }, + "value": "westus" + }, + "plan": { + "$id": "4329", + "kind": "model", + "type": { + "$ref": "1526" + }, + "value": { + "$id": "4330", + "name": { + "$id": "4331", + "kind": "string", + "type": { + "$ref": "1528" + }, + "value": "uapfngmdekvpgjhomthtpxjfdmmll" + }, + "publisher": { + "$id": "4332", + "kind": "string", + "type": { + "$ref": "1532" + }, + "value": "aqhles" + }, + "product": { + "$id": "4333", + "kind": "string", + "type": { + "$ref": "1536" + }, + "value": "bfzbkdnbexmedxdc" + }, + "promotionCode": { + "$id": "4334", + "kind": "string", + "type": { + "$ref": "1540" + }, + "value": "gspehogwfjxirz" + }, + "version": { + "$id": "4335", + "kind": "string", + "type": { + "$ref": "1544" + }, + "value": "yza" + } + } + }, + "id": { + "$id": "4336", + "kind": "string", + "type": { + "$ref": "433" + }, + "value": "/subscriptions/7B0CD4DB-3381-4013-9B31-FB6E6FD0FF1C/resourceGroups/rgazurefleet/providers/Microsoft.AzureFleet/fleets/testFleet" + }, + "name": { + "$id": "4337", + "kind": "string", + "type": { + "$ref": "438" + }, + "value": "testFleet" + }, + "type": { + "$id": "4338", + "kind": "string", + "type": { + "$ref": "442" + }, + "value": "Microsoft.AzureFleet/fleets" + }, + "systemData": { + "$id": "4339", + "kind": "model", + "type": { + "$ref": "447" + }, + "value": { + "$id": "4340", + "createdBy": { + "$id": "4341", + "kind": "string", + "type": { + "$ref": "449" + }, + "value": "rowegentrpoajsv" + }, + "createdByType": { + "$id": "4342", + "kind": "string", + "type": { + "$ref": "328" + }, + "value": "User" + }, + "createdAt": { + "$id": "4343", + "kind": "string", + "type": { + "$ref": "456" + }, + "value": "2024-04-29T21:51:44.043Z" + }, + "lastModifiedBy": { + "$id": "4344", + "kind": "string", + "type": { + "$ref": "461" + }, + "value": "edwuayhhaoepxzisfaqjhmrxjq" + }, + "lastModifiedByType": { + "$id": "4345", + "kind": "string", + "type": { + "$ref": "328" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "4346", + "kind": "string", + "type": { + "$ref": "468" + }, + "value": "2024-04-29T21:51:44.043Z" + } + } + } + } + } + }, + { + "$id": "4347", + "response": { + "$ref": "3616" + }, + "statusCode": 202 + } + ] + } + ] + }, + { + "$id": "4348", + "name": "delete", + "resourceName": "Fleet", + "doc": "Delete a Fleet", + "accessibility": "public", + "parameters": [ + { + "$id": "4349", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "4350", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "4351", + "type": { + "$id": "4352", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2024-11-01" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4353", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "4354", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "4355", + "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": "4356", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "4357", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4358", + "name": "fleetName", + "nameInRequest": "fleetName", + "doc": "The name of the Compute Fleet", + "type": { + "$id": "4359", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4360", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "4361", + "kind": "constant", + "valueType": { + "$id": "4362", + "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": "4363", + "statusCodes": [ + 202 + ], + "headers": [ + { + "$id": "4364", + "name": "location", + "nameInResponse": "Location", + "doc": "The Location header contains the URL where the status of the long running operation can be checked.", + "type": { + "$id": "4365", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + { + "$id": "4366", + "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": "4367", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + } + } + ], + "isErrorResponse": false + }, + { + "$id": "4368", + "statusCodes": [ + 204 + ], + "headers": [], + "isErrorResponse": false + } + ], + "httpMethod": "DELETE", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureFleet/fleets/{fleetName}", + "bufferResponse": true, + "longRunning": { + "$id": "4369", + "finalStateVia": 1, + "finalResponse": { + "$id": "4370", + "statusCodes": [ + 204 + ] + } + }, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.AzureFleet.Fleets.delete", + "decorators": [], + "examples": [ + { + "$id": "4371", + "kind": "http", + "name": "Fleets_Delete", + "description": "Fleets_Delete", + "filePath": "2024-11-01/Fleets_Delete.json", + "parameters": [ + { + "$id": "4372", + "parameter": { + "$ref": "4349" + }, + "value": { + "$id": "4373", + "kind": "string", + "type": { + "$ref": "4350" + }, + "value": "2024-11-01" + } + }, + { + "$id": "4374", + "parameter": { + "$ref": "4353" + }, + "value": { + "$id": "4375", + "kind": "string", + "type": { + "$ref": "4354" + }, + "value": "1DC2F28C-A625-4B0E-9748-9885A3C9E9EB" + } + }, + { + "$id": "4376", + "parameter": { + "$ref": "4356" + }, + "value": { + "$id": "4377", + "kind": "string", + "type": { + "$ref": "4357" + }, + "value": "rgazurefleet" + } + }, + { + "$id": "4378", + "parameter": { + "$ref": "4358" + }, + "value": { + "$id": "4379", + "kind": "string", + "type": { + "$ref": "4359" + }, + "value": "testFleet" + } + } + ], + "responses": [ + { + "$id": "4380", + "response": { + "$ref": "4363" + }, + "statusCode": 202 + }, + { + "$id": "4381", + "response": { + "$ref": "4368" + }, + "statusCode": 204 + } + ] + } + ] + }, + { + "$id": "4382", + "name": "listByResourceGroup", + "resourceName": "Fleet", + "doc": "List Fleet resources by resource group", + "accessibility": "public", + "parameters": [ + { + "$id": "4383", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "4384", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "4385", + "type": { + "$id": "4386", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2024-11-01" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4387", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "4388", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "4389", + "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": "4390", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "4391", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4392", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "4393", + "kind": "constant", + "valueType": { + "$id": "4394", + "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": "4395", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "1620" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "GET", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureFleet/fleets", + "bufferResponse": true, + "paging": { + "$id": "4396", + "itemPropertySegments": [ + "value" + ], + "nextLink": { + "$id": "4397", + "responseSegments": [ + "nextLink" + ], + "responseLocation": "Body" + } + }, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.AzureFleet.Fleets.listByResourceGroup", + "decorators": [], + "examples": [ + { + "$id": "4398", + "kind": "http", + "name": "Fleets_ListByResourceGroup", + "description": "Fleets_ListByResourceGroup", + "filePath": "2024-11-01/Fleets_ListByResourceGroup.json", + "parameters": [ + { + "$id": "4399", + "parameter": { + "$ref": "4383" + }, + "value": { + "$id": "4400", + "kind": "string", + "type": { + "$ref": "4384" + }, + "value": "2024-11-01" + } + }, + { + "$id": "4401", + "parameter": { + "$ref": "4387" + }, + "value": { + "$id": "4402", + "kind": "string", + "type": { + "$ref": "4388" + }, + "value": "1DC2F28C-A625-4B0E-9748-9885A3C9E9EB" + } + }, + { + "$id": "4403", + "parameter": { + "$ref": "4390" + }, + "value": { + "$id": "4404", + "kind": "string", + "type": { + "$ref": "4391" + }, + "value": "rgazurefleet" + } + } + ], + "responses": [ + { + "$id": "4405", + "response": { + "$ref": "4395" + }, + "statusCode": 200, + "bodyValue": { + "$id": "4406", + "kind": "model", + "type": { + "$ref": "1620" + }, + "value": { + "$id": "4407", + "value": { + "$id": "4408", + "kind": "array", + "type": { + "$ref": "1622" + }, + "value": [ + { + "$id": "4409", + "kind": "model", + "type": { + "$ref": "429" + }, + "value": { + "$id": "4410", + "properties": { + "$id": "4411", + "kind": "model", + "type": { + "$ref": "485" + }, + "value": { + "$id": "4412", + "provisioningState": { + "$id": "4413", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Creating" + }, + "spotPriorityProfile": { + "$id": "4414", + "kind": "model", + "type": { + "$ref": "490" + }, + "value": { + "$id": "4415", + "capacity": { + "$id": "4416", + "kind": "number", + "type": { + "$ref": "492" + }, + "value": 20 + }, + "minCapacity": { + "$id": "4417", + "kind": "number", + "type": { + "$ref": "496" + }, + "value": 10 + }, + "maxPricePerVM": { + "$id": "4418", + "kind": "number", + "type": { + "$ref": "500" + }, + "value": 0.00865 + }, + "evictionPolicy": { + "$id": "4419", + "kind": "string", + "type": { + "$ref": "30" + }, + "value": "Delete" + }, + "allocationStrategy": { + "$id": "4420", + "kind": "string", + "type": { + "$ref": "36" + }, + "value": "PriceCapacityOptimized" + }, + "maintain": { + "$id": "4421", + "kind": "boolean", + "type": { + "$ref": "510" + }, + "value": true + } + } + }, + "regularPriorityProfile": { + "$id": "4422", + "kind": "model", + "type": { + "$ref": "516" + }, + "value": { + "$id": "4423", + "capacity": { + "$id": "4424", + "kind": "number", + "type": { + "$ref": "518" + }, + "value": 20 + }, + "minCapacity": { + "$id": "4425", + "kind": "number", + "type": { + "$ref": "522" + }, + "value": 10 + }, + "allocationStrategy": { + "$id": "4426", + "kind": "string", + "type": { + "$ref": "44" + }, + "value": "LowestPrice" + } + } + }, + "vmSizesProfile": { + "$id": "4427", + "kind": "array", + "type": { + "$ref": "531" + }, + "value": [ + { + "$id": "4428", + "kind": "model", + "type": { + "$ref": "532" + }, + "value": { + "$id": "4429", + "name": { + "$id": "4430", + "kind": "string", + "type": { + "$ref": "534" + }, + "value": "Standard_d1_v2" + }, + "rank": { + "$id": "4431", + "kind": "number", + "type": { + "$ref": "538" + }, + "value": 19225 + } + } + } + ] + }, + "computeProfile": { + "$id": "4432", + "kind": "model", + "type": { + "$ref": "1449" + }, + "value": { + "$id": "4433", + "baseVirtualMachineProfile": { + "$id": "4434", + "kind": "model", + "type": { + "$ref": "644" + }, + "value": { + "$id": "4435", + "osProfile": { + "$id": "4436", + "kind": "model", + "type": { + "$ref": "646" + }, + "value": { + "$id": "4437", + "computerNamePrefix": { + "$id": "4438", + "kind": "string", + "type": { + "$ref": "648" + }, + "value": "o" + }, + "adminUsername": { + "$id": "4439", + "kind": "string", + "type": { + "$ref": "652" + }, + "value": "nrgzqciiaaxjrqldbmjbqkyhntp" + }, + "windowsConfiguration": { + "$id": "4440", + "kind": "model", + "type": { + "$ref": "664" + }, + "value": { + "$id": "4441", + "provisionVMAgent": { + "$id": "4442", + "kind": "boolean", + "type": { + "$ref": "666" + }, + "value": true + }, + "enableAutomaticUpdates": { + "$id": "4443", + "kind": "boolean", + "type": { + "$ref": "670" + }, + "value": true + }, + "timeZone": { + "$id": "4444", + "kind": "string", + "type": { + "$ref": "674" + }, + "value": "hlyjiqcfksgrpjrct" + }, + "additionalUnattendContent": { + "$id": "4445", + "kind": "array", + "type": { + "$ref": "678" + }, + "value": [ + { + "$id": "4446", + "kind": "model", + "type": { + "$ref": "679" + }, + "value": { + "$id": "4447", + "passName": { + "$id": "4448", + "kind": "string", + "type": { + "$ref": "681" + }, + "value": "OobeSystem" + }, + "componentName": { + "$id": "4449", + "kind": "string", + "type": { + "$ref": "685" + }, + "value": "Microsoft-Windows-Shell-Setup" + }, + "settingName": { + "$id": "4450", + "kind": "string", + "type": { + "$ref": "116" + }, + "value": "AutoLogon" + } + } + } + ] + }, + "patchSettings": { + "$id": "4451", + "kind": "model", + "type": { + "$ref": "698" + }, + "value": { + "$id": "4452", + "patchMode": { + "$id": "4453", + "kind": "string", + "type": { + "$ref": "122" + }, + "value": "Manual" + }, + "enableHotpatching": { + "$id": "4454", + "kind": "boolean", + "type": { + "$ref": "703" + }, + "value": true + }, + "assessmentMode": { + "$id": "4455", + "kind": "string", + "type": { + "$ref": "130" + }, + "value": "ImageDefault" + }, + "automaticByPlatformSettings": { + "$id": "4456", + "kind": "model", + "type": { + "$ref": "710" + }, + "value": { + "$id": "4457", + "rebootSetting": { + "$id": "4458", + "kind": "string", + "type": { + "$ref": "136" + }, + "value": "Unknown" + }, + "bypassPlatformSafetyChecksOnUserSchedule": { + "$id": "4459", + "kind": "boolean", + "type": { + "$ref": "715" + }, + "value": true + } + } + } + } + }, + "winRM": { + "$id": "4460", + "kind": "model", + "type": { + "$ref": "723" + }, + "value": { + "$id": "4461", + "listeners": { + "$id": "4462", + "kind": "array", + "type": { + "$ref": "725" + }, + "value": [ + { + "$id": "4463", + "kind": "model", + "type": { + "$ref": "726" + }, + "value": { + "$id": "4464", + "protocol": { + "$id": "4465", + "kind": "string", + "type": { + "$ref": "146" + }, + "value": "Http" + }, + "certificateUrl": { + "$id": "4466", + "kind": "string", + "type": { + "$ref": "731" + }, + "value": "https://myVaultName.vault.azure.net/secrets/myCertName" + } + } + } + ] + } + } + }, + "enableVMAgentPlatformUpdates": { + "$id": "4467", + "kind": "boolean", + "type": { + "$ref": "739" + }, + "value": true + } + } + }, + "linuxConfiguration": { + "$id": "4468", + "kind": "model", + "type": { + "$ref": "745" + }, + "value": { + "$id": "4469", + "disablePasswordAuthentication": { + "$id": "4470", + "kind": "boolean", + "type": { + "$ref": "747" + }, + "value": true + }, + "ssh": { + "$id": "4471", + "kind": "model", + "type": { + "$ref": "751" + }, + "value": { + "$id": "4472", + "publicKeys": { + "$id": "4473", + "kind": "array", + "type": { + "$ref": "753" + }, + "value": [ + { + "$id": "4474", + "kind": "model", + "type": { + "$ref": "754" + }, + "value": { + "$id": "4475", + "path": { + "$id": "4476", + "kind": "string", + "type": { + "$ref": "756" + }, + "value": "kmqz" + }, + "keyData": { + "$id": "4477", + "kind": "string", + "type": { + "$ref": "760" + }, + "value": "kivgsubusvpprwqaqpjcmhsv" + } + } + } + ] + } + } + }, + "provisionVMAgent": { + "$id": "4478", + "kind": "boolean", + "type": { + "$ref": "768" + }, + "value": true + }, + "patchSettings": { + "$id": "4479", + "kind": "model", + "type": { + "$ref": "772" + }, + "value": { + "$id": "4480", + "patchMode": { + "$id": "4481", + "kind": "string", + "type": { + "$ref": "152" + }, + "value": "ImageDefault" + }, + "assessmentMode": { + "$id": "4482", + "kind": "string", + "type": { + "$ref": "158" + }, + "value": "ImageDefault" + }, + "automaticByPlatformSettings": { + "$id": "4483", + "kind": "model", + "type": { + "$ref": "780" + }, + "value": { + "$id": "4484", + "rebootSetting": { + "$id": "4485", + "kind": "string", + "type": { + "$ref": "164" + }, + "value": "Unknown" + }, + "bypassPlatformSafetyChecksOnUserSchedule": { + "$id": "4486", + "kind": "boolean", + "type": { + "$ref": "785" + }, + "value": true + } + } + } + } + }, + "enableVMAgentPlatformUpdates": { + "$id": "4487", + "kind": "boolean", + "type": { + "$ref": "793" + }, + "value": true + } + } + }, + "secrets": { + "$id": "4488", + "kind": "array", + "type": { + "$ref": "799" + }, + "value": [ + { + "$id": "4489", + "kind": "model", + "type": { + "$ref": "800" + }, + "value": { + "$id": "4490", + "sourceVault": { + "$id": "4491", + "kind": "model", + "type": { + "$ref": "802" + }, + "value": { + "$id": "4492", + "id": { + "$id": "4493", + "kind": "string", + "type": { + "$ref": "804" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}" + } + } + }, + "vaultCertificates": { + "$id": "4494", + "kind": "array", + "type": { + "$ref": "811" + }, + "value": [ + { + "$id": "4495", + "kind": "model", + "type": { + "$ref": "812" + }, + "value": { + "$id": "4496", + "certificateUrl": { + "$id": "4497", + "kind": "string", + "type": { + "$ref": "814" + }, + "value": "https://myVaultName.vault.azure.net/secrets/myCertName" + }, + "certificateStore": { + "$id": "4498", + "kind": "string", + "type": { + "$ref": "818" + }, + "value": "nlxrwavpzhueffxsshlun" + } + } + } + ] + } + } + } + ] + }, + "allowExtensionOperations": { + "$id": "4499", + "kind": "boolean", + "type": { + "$ref": "826" + }, + "value": true + }, + "requireGuestProvisionSignal": { + "$id": "4500", + "kind": "boolean", + "type": { + "$ref": "830" + }, + "value": true + } + } + }, + "storageProfile": { + "$id": "4501", + "kind": "model", + "type": { + "$ref": "836" + }, + "value": { + "$id": "4502", + "imageReference": { + "$id": "4503", + "kind": "model", + "type": { + "$ref": "838" + }, + "value": { + "$id": "4504", + "publisher": { + "$id": "4505", + "kind": "string", + "type": { + "$ref": "845" + }, + "value": "mqxgwbiyjzmxavhbkd" + }, + "offer": { + "$id": "4506", + "kind": "string", + "type": { + "$ref": "849" + }, + "value": "isxgumkarlkomp" + }, + "sku": { + "$id": "4507", + "kind": "string", + "type": { + "$ref": "853" + }, + "value": "eojmppqcrnpmxirtp" + }, + "version": { + "$id": "4508", + "kind": "string", + "type": { + "$ref": "857" + }, + "value": "wvpcqefgtmqdgltiuz" + }, + "exactVersion": { + "$id": "4509", + "kind": "string", + "type": { + "$ref": "861" + }, + "value": "zjbntmiskjexlr" + }, + "sharedGalleryImageId": { + "$id": "4510", + "kind": "string", + "type": { + "$ref": "865" + }, + "value": "kmkgihoxwlawuuhcinfirktdwkmx" + }, + "communityGalleryImageId": { + "$id": "4511", + "kind": "string", + "type": { + "$ref": "869" + }, + "value": "vlqe" + }, + "id": { + "$id": "4512", + "kind": "string", + "type": { + "$ref": "840" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images/{imageName}/versions/{versionName}" + } + } + }, + "osDisk": { + "$id": "4513", + "kind": "model", + "type": { + "$ref": "875" + }, + "value": { + "$id": "4514", + "name": { + "$id": "4515", + "kind": "string", + "type": { + "$ref": "877" + }, + "value": "wfttw" + }, + "caching": { + "$id": "4516", + "kind": "string", + "type": { + "$ref": "174" + }, + "value": "None" + }, + "writeAcceleratorEnabled": { + "$id": "4517", + "kind": "boolean", + "type": { + "$ref": "884" + }, + "value": true + }, + "createOption": { + "$id": "4518", + "kind": "string", + "type": { + "$ref": "182" + }, + "value": "FromImage" + }, + "diffDiskSettings": { + "$id": "4519", + "kind": "model", + "type": { + "$ref": "891" + }, + "value": { + "$id": "4520", + "option": { + "$id": "4521", + "kind": "string", + "type": { + "$ref": "194" + }, + "value": "Local" + }, + "placement": { + "$id": "4522", + "kind": "string", + "type": { + "$ref": "198" + }, + "value": "CacheDisk" + } + } + }, + "diskSizeGB": { + "$id": "4523", + "kind": "number", + "type": { + "$ref": "901" + }, + "value": 14 + }, + "osType": { + "$id": "4524", + "kind": "string", + "type": { + "$ref": "206" + }, + "value": "Windows" + }, + "image": { + "$id": "4525", + "kind": "model", + "type": { + "$ref": "908" + }, + "value": { + "$id": "4526", + "uri": { + "$id": "4527", + "kind": "string", + "type": { + "$ref": "910" + }, + "value": "https://myStorageAccountName.blob.core.windows.net/myContainerName/myVhdName.vhd" + } + } + }, + "vhdContainers": { + "$id": "4528", + "kind": "array", + "type": { + "$ref": "916" + }, + "value": [ + { + "$id": "4529", + "kind": "string", + "type": { + "$ref": "917" + }, + "value": "tkzcwddtinkfpnfklatw" + } + ] + }, + "managedDisk": { + "$id": "4530", + "kind": "model", + "type": { + "$ref": "921" + }, + "value": { + "$id": "4531", + "storageAccountType": { + "$id": "4532", + "kind": "string", + "type": { + "$ref": "212" + }, + "value": "Standard_LRS" + }, + "diskEncryptionSet": { + "$id": "4533", + "kind": "model", + "type": { + "$ref": "926" + }, + "value": { + "$id": "4534", + "id": { + "$id": "4535", + "kind": "string", + "type": { + "$ref": "928" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}" + } + } + }, + "securityProfile": { + "$id": "4536", + "kind": "model", + "type": { + "$ref": "935" + }, + "value": { + "$id": "4537", + "securityEncryptionType": { + "$id": "4538", + "kind": "string", + "type": { + "$ref": "228" + }, + "value": "VMGuestStateOnly" + }, + "diskEncryptionSet": { + "$id": "4539", + "kind": "model", + "type": { + "$ref": "926" + }, + "value": { + "$id": "4540", + "id": { + "$id": "4541", + "kind": "string", + "type": { + "$ref": "928" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}" + } + } + } + } + } + } + }, + "deleteOption": { + "$id": "4542", + "kind": "string", + "type": { + "$ref": "236" + }, + "value": "Delete" + } + } + }, + "dataDisks": { + "$id": "4543", + "kind": "array", + "type": { + "$ref": "952" + }, + "value": [ + { + "$id": "4544", + "kind": "model", + "type": { + "$ref": "953" + }, + "value": { + "$id": "4545", + "name": { + "$id": "4546", + "kind": "string", + "type": { + "$ref": "955" + }, + "value": "eogiykmdmeikswxmigjws" + }, + "lun": { + "$id": "4547", + "kind": "number", + "type": { + "$ref": "959" + }, + "value": 14 + }, + "caching": { + "$id": "4548", + "kind": "string", + "type": { + "$ref": "174" + }, + "value": "None" + }, + "writeAcceleratorEnabled": { + "$id": "4549", + "kind": "boolean", + "type": { + "$ref": "966" + }, + "value": true + }, + "createOption": { + "$id": "4550", + "kind": "string", + "type": { + "$ref": "182" + }, + "value": "FromImage" + }, + "diskSizeGB": { + "$id": "4551", + "kind": "number", + "type": { + "$ref": "973" + }, + "value": 6 + }, + "managedDisk": { + "$id": "4552", + "kind": "model", + "type": { + "$ref": "921" + }, + "value": { + "$id": "4553", + "storageAccountType": { + "$id": "4554", + "kind": "string", + "type": { + "$ref": "212" + }, + "value": "Standard_LRS" + }, + "diskEncryptionSet": { + "$id": "4555", + "kind": "model", + "type": { + "$ref": "926" + }, + "value": { + "$id": "4556", + "id": { + "$id": "4557", + "kind": "string", + "type": { + "$ref": "928" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}" + } + } + }, + "securityProfile": { + "$id": "4558", + "kind": "model", + "type": { + "$ref": "935" + }, + "value": { + "$id": "4559", + "securityEncryptionType": { + "$id": "4560", + "kind": "string", + "type": { + "$ref": "228" + }, + "value": "VMGuestStateOnly" + }, + "diskEncryptionSet": { + "$id": "4561", + "kind": "model", + "type": { + "$ref": "926" + }, + "value": { + "$id": "4562", + "id": { + "$id": "4563", + "kind": "string", + "type": { + "$ref": "928" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}" + } + } + } + } + } + } + }, + "diskIOPSReadWrite": { + "$id": "4564", + "kind": "number", + "type": { + "$ref": "980" + }, + "value": 27 + }, + "diskMBpsReadWrite": { + "$id": "4565", + "kind": "number", + "type": { + "$ref": "984" + }, + "value": 2 + }, + "deleteOption": { + "$id": "4566", + "kind": "string", + "type": { + "$ref": "236" + }, + "value": "Delete" + } + } + } + ] + }, + "diskControllerType": { + "$id": "4567", + "kind": "string", + "type": { + "$ref": "242" + }, + "value": "uzb" + } + } + }, + "networkProfile": { + "$id": "4568", + "kind": "model", + "type": { + "$ref": "998" + }, + "value": { + "$id": "4569", + "healthProbe": { + "$id": "4570", + "kind": "model", + "type": { + "$ref": "1000" + }, + "value": { + "$id": "4571", + "id": { + "$id": "4572", + "kind": "string", + "type": { + "$ref": "1002" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/probes/{probeName}" + } + } + }, + "networkInterfaceConfigurations": { + "$id": "4573", + "kind": "array", + "type": { + "$ref": "1009" + }, + "value": [ + { + "$id": "4574", + "kind": "model", + "type": { + "$ref": "1010" + }, + "value": { + "$id": "4575", + "name": { + "$id": "4576", + "kind": "string", + "type": { + "$ref": "1012" + }, + "value": "i" + }, + "properties": { + "$id": "4577", + "kind": "model", + "type": { + "$ref": "1016" + }, + "value": { + "$id": "4578", + "primary": { + "$id": "4579", + "kind": "boolean", + "type": { + "$ref": "1018" + }, + "value": true + }, + "enableAcceleratedNetworking": { + "$id": "4580", + "kind": "boolean", + "type": { + "$ref": "1022" + }, + "value": true + }, + "disableTcpStateTracking": { + "$id": "4581", + "kind": "boolean", + "type": { + "$ref": "1026" + }, + "value": true + }, + "enableFpga": { + "$id": "4582", + "kind": "boolean", + "type": { + "$ref": "1030" + }, + "value": true + }, + "networkSecurityGroup": { + "$id": "4583", + "kind": "model", + "type": { + "$ref": "802" + }, + "value": { + "$id": "4584", + "id": { + "$id": "4585", + "kind": "string", + "type": { + "$ref": "804" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/{networkSecurityGroupName}" + } + } + }, + "dnsSettings": { + "$id": "4586", + "kind": "model", + "type": { + "$ref": "1037" + }, + "value": { + "$id": "4587", + "dnsServers": { + "$id": "4588", + "kind": "array", + "type": { + "$ref": "1039" + }, + "value": [ + { + "$id": "4589", + "kind": "string", + "type": { + "$ref": "1040" + }, + "value": "nxmmfolhclsesu" + } + ] + } + } + }, + "ipConfigurations": { + "$id": "4590", + "kind": "array", + "type": { + "$ref": "1046" + }, + "value": [ + { + "$id": "4591", + "kind": "model", + "type": { + "$ref": "1047" + }, + "value": { + "$id": "4592", + "name": { + "$id": "4593", + "kind": "string", + "type": { + "$ref": "1049" + }, + "value": "oezqhkidfhyywlfzwuotilrpbqnjg" + }, + "properties": { + "$id": "4594", + "kind": "model", + "type": { + "$ref": "1053" + }, + "value": { + "$id": "4595", + "subnet": { + "$id": "4596", + "kind": "model", + "type": { + "$ref": "1000" + }, + "value": { + "$id": "4597", + "id": { + "$id": "4598", + "kind": "string", + "type": { + "$ref": "1002" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}" + } + } + }, + "primary": { + "$id": "4599", + "kind": "boolean", + "type": { + "$ref": "1058" + }, + "value": true + }, + "publicIPAddressConfiguration": { + "$id": "4600", + "kind": "model", + "type": { + "$ref": "1062" + }, + "value": { + "$id": "4601", + "name": { + "$id": "4602", + "kind": "string", + "type": { + "$ref": "1064" + }, + "value": "fvpqf" + }, + "properties": { + "$id": "4603", + "kind": "model", + "type": { + "$ref": "1068" + }, + "value": { + "$id": "4604", + "idleTimeoutInMinutes": { + "$id": "4605", + "kind": "number", + "type": { + "$ref": "1070" + }, + "value": 9 + }, + "dnsSettings": { + "$id": "4606", + "kind": "model", + "type": { + "$ref": "1074" + }, + "value": { + "$id": "4607", + "domainNameLabel": { + "$id": "4608", + "kind": "string", + "type": { + "$ref": "1076" + }, + "value": "ukrddzvmorpmfsczjwtbvp" + }, + "domainNameLabelScope": { + "$id": "4609", + "kind": "string", + "type": { + "$ref": "248" + }, + "value": "TenantReuse" + } + } + }, + "ipTags": { + "$id": "4610", + "kind": "array", + "type": { + "$ref": "1085" + }, + "value": [ + { + "$id": "4611", + "kind": "model", + "type": { + "$ref": "1086" + }, + "value": { + "$id": "4612", + "ipTagType": { + "$id": "4613", + "kind": "string", + "type": { + "$ref": "1088" + }, + "value": "sddgsoemnzgqizale" + }, + "tag": { + "$id": "4614", + "kind": "string", + "type": { + "$ref": "1092" + }, + "value": "wufmhrjsakbiaetyara" + } + } + } + ] + }, + "publicIPPrefix": { + "$id": "4615", + "kind": "model", + "type": { + "$ref": "802" + }, + "value": { + "$id": "4616", + "id": { + "$id": "4617", + "kind": "string", + "type": { + "$ref": "804" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes/{publicIPPrefixName}" + } + } + }, + "publicIPAddressVersion": { + "$id": "4618", + "kind": "string", + "type": { + "$ref": "258" + }, + "value": "IPv4" + }, + "deleteOption": { + "$id": "4619", + "kind": "string", + "type": { + "$ref": "264" + }, + "value": "Delete" + } + } + }, + "sku": { + "$id": "4620", + "kind": "model", + "type": { + "$ref": "1109" + }, + "value": { + "$id": "4621", + "name": { + "$id": "4622", + "kind": "string", + "type": { + "$ref": "270" + }, + "value": "Basic" + }, + "tier": { + "$id": "4623", + "kind": "string", + "type": { + "$ref": "276" + }, + "value": "Regional" + } + } + } + } + }, + "privateIPAddressVersion": { + "$id": "4624", + "kind": "string", + "type": { + "$ref": "258" + }, + "value": "IPv4" + }, + "applicationGatewayBackendAddressPools": { + "$id": "4625", + "kind": "array", + "type": { + "$ref": "1124" + }, + "value": [ + { + "$id": "4626", + "kind": "model", + "type": { + "$ref": "802" + }, + "value": { + "$id": "4627", + "id": { + "$id": "4628", + "kind": "string", + "type": { + "$ref": "804" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}/backendAddressPools/{backendAddressPoolName}" + } + } + } + ] + }, + "applicationSecurityGroups": { + "$id": "4629", + "kind": "array", + "type": { + "$ref": "1128" + }, + "value": [ + { + "$id": "4630", + "kind": "model", + "type": { + "$ref": "802" + }, + "value": { + "$id": "4631", + "id": { + "$id": "4632", + "kind": "string", + "type": { + "$ref": "804" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationSecurityGroups/{applicationSecurityGroupName}" + } + } + } + ] + }, + "loadBalancerBackendAddressPools": { + "$id": "4633", + "kind": "array", + "type": { + "$ref": "1132" + }, + "value": [ + { + "$id": "4634", + "kind": "model", + "type": { + "$ref": "802" + }, + "value": { + "$id": "4635", + "id": { + "$id": "4636", + "kind": "string", + "type": { + "$ref": "804" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/backendAddressPools/{backendAddressPoolName}" + } + } + } + ] + }, + "loadBalancerInboundNatPools": { + "$id": "4637", + "kind": "array", + "type": { + "$ref": "1136" + }, + "value": [ + { + "$id": "4638", + "kind": "model", + "type": { + "$ref": "802" + }, + "value": { + "$id": "4639", + "id": { + "$id": "4640", + "kind": "string", + "type": { + "$ref": "804" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/inboundNatPools/{inboundNatPoolName}" + } + } + } + ] + } + } + } + } + } + ] + }, + "enableIPForwarding": { + "$id": "4641", + "kind": "boolean", + "type": { + "$ref": "1144" + }, + "value": true + }, + "deleteOption": { + "$id": "4642", + "kind": "string", + "type": { + "$ref": "264" + }, + "value": "Delete" + }, + "auxiliaryMode": { + "$id": "4643", + "kind": "string", + "type": { + "$ref": "282" + }, + "value": "None" + }, + "auxiliarySku": { + "$id": "4644", + "kind": "string", + "type": { + "$ref": "290" + }, + "value": "None" + } + } + } + } + } + ] + }, + "networkApiVersion": { + "$id": "4645", + "kind": "string", + "type": { + "$ref": "302" + }, + "value": "2020-11-01" + } + } + }, + "securityProfile": { + "$id": "4646", + "kind": "model", + "type": { + "$ref": "1166" + }, + "value": { + "$id": "4647", + "uefiSettings": { + "$id": "4648", + "kind": "model", + "type": { + "$ref": "1168" + }, + "value": { + "$id": "4649", + "secureBootEnabled": { + "$id": "4650", + "kind": "boolean", + "type": { + "$ref": "1170" + }, + "value": true + }, + "vTpmEnabled": { + "$id": "4651", + "kind": "boolean", + "type": { + "$ref": "1174" + }, + "value": true + } + } + }, + "encryptionAtHost": { + "$id": "4652", + "kind": "boolean", + "type": { + "$ref": "1180" + }, + "value": true + }, + "securityType": { + "$id": "4653", + "kind": "string", + "type": { + "$ref": "306" + }, + "value": "TrustedLaunch" + }, + "encryptionIdentity": { + "$id": "4654", + "kind": "model", + "type": { + "$ref": "1187" + }, + "value": { + "$id": "4655", + "userAssignedIdentityResourceId": { + "$id": "4656", + "kind": "string", + "type": { + "$ref": "1189" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{userAssignedIdentityName}" + } + } + }, + "proxyAgentSettings": { + "$id": "4657", + "kind": "model", + "type": { + "$ref": "1196" + }, + "value": { + "$id": "4658", + "enabled": { + "$id": "4659", + "kind": "boolean", + "type": { + "$ref": "1198" + }, + "value": true + }, + "mode": { + "$id": "4660", + "kind": "string", + "type": { + "$ref": "312" + }, + "value": "Audit" + }, + "keyIncarnationId": { + "$id": "4661", + "kind": "number", + "type": { + "$ref": "1205" + }, + "value": 20 + } + } + } + } + }, + "diagnosticsProfile": { + "$id": "4662", + "kind": "model", + "type": { + "$ref": "1213" + }, + "value": { + "$id": "4663", + "bootDiagnostics": { + "$id": "4664", + "kind": "model", + "type": { + "$ref": "1215" + }, + "value": { + "$id": "4665", + "enabled": { + "$id": "4666", + "kind": "boolean", + "type": { + "$ref": "1217" + }, + "value": true + }, + "storageUri": { + "$id": "4667", + "kind": "string", + "type": { + "$ref": "1221" + }, + "value": "http://myStorageAccountName.blob.core.windows.net" + } + } + } + } + }, + "extensionProfile": { + "$id": "4668", + "kind": "model", + "type": { + "$ref": "1229" + }, + "value": { + "$id": "4669", + "extensions": { + "$id": "4670", + "kind": "array", + "type": { + "$ref": "1231" + }, + "value": [ + { + "$id": "4671", + "kind": "model", + "type": { + "$ref": "1232" + }, + "value": { + "$id": "4672", + "name": { + "$id": "4673", + "kind": "string", + "type": { + "$ref": "1239" + }, + "value": "bndxuxx" + }, + "type": { + "$id": "4674", + "kind": "string", + "type": { + "$ref": "1243" + }, + "value": "cmeam" + }, + "properties": { + "$id": "4675", + "kind": "model", + "type": { + "$ref": "1247" + }, + "value": { + "$id": "4676", + "forceUpdateTag": { + "$id": "4677", + "kind": "string", + "type": { + "$ref": "1249" + }, + "value": "yhgxw" + }, + "publisher": { + "$id": "4678", + "kind": "string", + "type": { + "$ref": "1253" + }, + "value": "kpxtirxjfprhs" + }, + "type": { + "$id": "4679", + "kind": "string", + "type": { + "$ref": "1257" + }, + "value": "pgjilctjjwaa" + }, + "typeHandlerVersion": { + "$id": "4680", + "kind": "string", + "type": { + "$ref": "1261" + }, + "value": "zevivcoilxmbwlrihhhibq" + }, + "autoUpgradeMinorVersion": { + "$id": "4681", + "kind": "boolean", + "type": { + "$ref": "1265" + }, + "value": true + }, + "enableAutomaticUpgrade": { + "$id": "4682", + "kind": "boolean", + "type": { + "$ref": "1269" + }, + "value": true + }, + "settings": { + "$id": "4683", + "kind": "dict", + "type": { + "$ref": "1273" + }, + "value": { + "$id": "4684" + } + }, + "provisioningState": { + "$id": "4685", + "kind": "string", + "type": { + "$ref": "1285" + }, + "value": "Succeeded" + }, + "provisionAfterExtensions": { + "$id": "4686", + "kind": "array", + "type": { + "$ref": "1289" + }, + "value": [ + { + "$id": "4687", + "kind": "string", + "type": { + "$ref": "1290" + }, + "value": "nftzosroolbcwmpupujzqwqe" + } + ] + }, + "suppressFailures": { + "$id": "4688", + "kind": "boolean", + "type": { + "$ref": "1294" + }, + "value": true + }, + "protectedSettingsFromKeyVault": { + "$id": "4689", + "kind": "model", + "type": { + "$ref": "1298" + }, + "value": { + "$id": "4690", + "secretUrl": { + "$id": "4691", + "kind": "string", + "type": { + "$ref": "1300" + }, + "value": "https://myVaultName.vault.azure.net/secrets/secret/mySecretName" + }, + "sourceVault": { + "$id": "4692", + "kind": "model", + "type": { + "$ref": "802" + }, + "value": { + "$id": "4693", + "id": { + "$id": "4694", + "kind": "string", + "type": { + "$ref": "804" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}" + } + } + } + } + } + } + }, + "id": { + "$id": "4695", + "kind": "string", + "type": { + "$ref": "1234" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/extensions/{extensionName}" + } + } + } + ] + }, + "extensionsTimeBudget": { + "$id": "4696", + "kind": "string", + "type": { + "$ref": "1313" + }, + "value": "mbhjahtdygwgyszdwjtvlvtgchdwil" + } + } + }, + "licenseType": { + "$id": "4697", + "kind": "string", + "type": { + "$ref": "1319" + }, + "value": "v" + }, + "scheduledEventsProfile": { + "$id": "4698", + "kind": "model", + "type": { + "$ref": "1323" + }, + "value": { + "$id": "4699", + "terminateNotificationProfile": { + "$id": "4700", + "kind": "model", + "type": { + "$ref": "1325" + }, + "value": { + "$id": "4701", + "notBeforeTimeout": { + "$id": "4702", + "kind": "string", + "type": { + "$ref": "1327" + }, + "value": "iljppmmw" + }, + "enable": { + "$id": "4703", + "kind": "boolean", + "type": { + "$ref": "1331" + }, + "value": true + } + } + }, + "osImageNotificationProfile": { + "$id": "4704", + "kind": "model", + "type": { + "$ref": "1337" + }, + "value": { + "$id": "4705", + "notBeforeTimeout": { + "$id": "4706", + "kind": "string", + "type": { + "$ref": "1339" + }, + "value": "olbpadmevekyczfokodtfprxti" + }, + "enable": { + "$id": "4707", + "kind": "boolean", + "type": { + "$ref": "1343" + }, + "value": true + } + } + } + } + }, + "userData": { + "$id": "4708", + "kind": "string", + "type": { + "$ref": "1351" + }, + "value": "s" + }, + "capacityReservation": { + "$id": "4709", + "kind": "model", + "type": { + "$ref": "1355" + }, + "value": { + "$id": "4710", + "capacityReservationGroup": { + "$id": "4711", + "kind": "model", + "type": { + "$ref": "802" + }, + "value": { + "$id": "4712", + "id": { + "$id": "4713", + "kind": "string", + "type": { + "$ref": "804" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/capacityReservationGroups/{capacityReservationGroupName}" + } + } + } + } + }, + "applicationProfile": { + "$id": "4714", + "kind": "model", + "type": { + "$ref": "1362" + }, + "value": { + "$id": "4715", + "galleryApplications": { + "$id": "4716", + "kind": "array", + "type": { + "$ref": "1364" + }, + "value": [ + { + "$id": "4717", + "kind": "model", + "type": { + "$ref": "1365" + }, + "value": { + "$id": "4718", + "tags": { + "$id": "4719", + "kind": "string", + "type": { + "$ref": "1367" + }, + "value": "eyrqjbib" + }, + "order": { + "$id": "4720", + "kind": "number", + "type": { + "$ref": "1371" + }, + "value": 5 + }, + "packageReferenceId": { + "$id": "4721", + "kind": "string", + "type": { + "$ref": "1375" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/applications/{applicationName}/versions/{versionName}" + }, + "treatFailureAsDeploymentFailure": { + "$id": "4722", + "kind": "boolean", + "type": { + "$ref": "1384" + }, + "value": true + }, + "enableAutomaticUpgrade": { + "$id": "4723", + "kind": "boolean", + "type": { + "$ref": "1388" + }, + "value": true + } + } + } + ] + } + } + }, + "hardwareProfile": { + "$id": "4724", + "kind": "model", + "type": { + "$ref": "1396" + }, + "value": { + "$id": "4725", + "vmSizeProperties": { + "$id": "4726", + "kind": "model", + "type": { + "$ref": "1398" + }, + "value": { + "$id": "4727", + "vCPUsAvailable": { + "$id": "4728", + "kind": "number", + "type": { + "$ref": "1400" + }, + "value": 16 + }, + "vCPUsPerCore": { + "$id": "4729", + "kind": "number", + "type": { + "$ref": "1404" + }, + "value": 23 + } + } + } + } + }, + "serviceArtifactReference": { + "$id": "4730", + "kind": "model", + "type": { + "$ref": "1412" + }, + "value": { + "$id": "4731", + "id": { + "$id": "4732", + "kind": "string", + "type": { + "$ref": "1414" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/serviceArtifacts/{serviceArtifactsName}/vmArtifactsProfiles/{vmArtifactsProfileName}" + } + } + }, + "securityPostureReference": { + "$id": "4733", + "kind": "model", + "type": { + "$ref": "1421" + }, + "value": { + "$id": "4734", + "id": { + "$id": "4735", + "kind": "string", + "type": { + "$ref": "1423" + }, + "value": "mubredelfbshboaxrsxiajihahaa" + }, + "excludeExtensions": { + "$id": "4736", + "kind": "array", + "type": { + "$ref": "1427" + }, + "value": [ + { + "$id": "4737", + "kind": "string", + "type": { + "$ref": "1428" + }, + "value": "{securityPostureVMExtensionName}" + } + ] + }, + "isOverridable": { + "$id": "4738", + "kind": "boolean", + "type": { + "$ref": "1432" + }, + "value": true + } + } + }, + "timeCreated": { + "$id": "4739", + "kind": "string", + "type": { + "$ref": "1438" + }, + "value": "2024-04-29T21:51:44.043Z" + } + } + }, + "computeApiVersion": { + "$id": "4740", + "kind": "string", + "type": { + "$ref": "1454" + }, + "value": "2023-07-01" + }, + "platformFaultDomainCount": { + "$id": "4741", + "kind": "number", + "type": { + "$ref": "1458" + }, + "value": 1 + } + } + }, + "timeCreated": { + "$id": "4742", + "kind": "string", + "type": { + "$ref": "1476" + }, + "value": "2024-07-10T00:16:34.8590555+00:00" + }, + "uniqueId": { + "$id": "4743", + "kind": "string", + "type": { + "$ref": "1481" + }, + "value": "a2f7fabd-bbc2-4a20-afe1-49fdb3885a28" + } + } + }, + "zones": { + "$id": "4744", + "kind": "array", + "type": { + "$ref": "1487" + }, + "value": [ + { + "$id": "4745", + "kind": "string", + "type": { + "$ref": "1488" + }, + "value": "zone1" + }, + { + "$id": "4746", + "kind": "string", + "type": { + "$ref": "1488" + }, + "value": "zone2" + } + ] + }, + "identity": { + "$id": "4747", + "kind": "model", + "type": { + "$ref": "1492" + }, + "value": { + "$id": "4748", + "principalId": { + "$id": "4749", + "kind": "string", + "type": { + "$ref": "1494" + }, + "value": "4d508e5b-374b-4382-9a1c-01fb8b6cb37c" + }, + "tenantId": { + "$id": "4750", + "kind": "string", + "type": { + "$ref": "1499" + }, + "value": "5d508e5b-374b-4382-9a1c-01fb8b6cb37c" + }, + "type": { + "$id": "4751", + "kind": "string", + "type": { + "$ref": "318" + }, + "value": "UserAssigned" + }, + "userAssignedIdentities": { + "$id": "4752", + "kind": "dict", + "type": { + "$ref": "1507" + }, + "value": { + "$id": "4753", + "key9851": { + "$id": "4754", + "kind": "model", + "type": { + "$ref": "1510" + }, + "value": { + "$id": "4755", + "principalId": { + "$id": "4756", + "kind": "string", + "type": { + "$ref": "1517" + }, + "value": "6d508e5b-374b-4382-9a1c-01fb8b6cb37c" + }, + "clientId": { + "$id": "4757", + "kind": "string", + "type": { + "$ref": "1512" + }, + "value": "7d508e5b-374b-4382-9a1c-01fb8b6cb37c" + } + } + } + } + } + } + }, + "plan": { + "$id": "4758", + "kind": "model", + "type": { + "$ref": "1526" + }, + "value": { + "$id": "4759", + "name": { + "$id": "4760", + "kind": "string", + "type": { + "$ref": "1528" + }, + "value": "jwgrcrnrtfoxn" + }, + "publisher": { + "$id": "4761", + "kind": "string", + "type": { + "$ref": "1532" + }, + "value": "iozjbiqqckqm" + }, + "product": { + "$id": "4762", + "kind": "string", + "type": { + "$ref": "1536" + }, + "value": "cgopbyvdyqikahwyxfpzwaqk" + }, + "promotionCode": { + "$id": "4763", + "kind": "string", + "type": { + "$ref": "1540" + }, + "value": "naglezezplcaruqogtxnuizslqnnbr" + }, + "version": { + "$id": "4764", + "kind": "string", + "type": { + "$ref": "1544" + }, + "value": "wa" + } + } + }, + "tags": { + "$id": "4765", + "kind": "dict", + "type": { + "$ref": "475" + }, + "value": { + "$id": "4766", + "key3518": { + "$id": "4767", + "kind": "string", + "type": { + "$ref": "477" + }, + "value": "luvrnuvsgdpbuofdskkcoqhfh" + } + } + }, + "location": { + "$id": "4768", + "kind": "string", + "type": { + "$ref": "481" + }, + "value": "westus" + }, + "id": { + "$id": "4769", + "kind": "string", + "type": { + "$ref": "433" + }, + "value": "/subscriptions/7B0CD4DB-3381-4013-9B31-FB6E6FD0FF1C/resourceGroups/rgazurefleet/providers/Microsoft.AzureFleet/fleets/testFleet" + }, + "name": { + "$id": "4770", + "kind": "string", + "type": { + "$ref": "438" + }, + "value": "testFleet" + }, + "type": { + "$id": "4771", + "kind": "string", + "type": { + "$ref": "442" + }, + "value": "Microsoft.AzureFleet/fleets" + }, + "systemData": { + "$id": "4772", + "kind": "model", + "type": { + "$ref": "447" + }, + "value": { + "$id": "4773", + "createdBy": { + "$id": "4774", + "kind": "string", + "type": { + "$ref": "449" + }, + "value": "rowegentrpoajsv" + }, + "createdByType": { + "$id": "4775", + "kind": "string", + "type": { + "$ref": "328" + }, + "value": "User" + }, + "createdAt": { + "$id": "4776", + "kind": "string", + "type": { + "$ref": "456" + }, + "value": "2024-04-29T21:51:44.043Z" + }, + "lastModifiedBy": { + "$id": "4777", + "kind": "string", + "type": { + "$ref": "461" + }, + "value": "edwuayhhaoepxzisfaqjhmrxjq" + }, + "lastModifiedByType": { + "$id": "4778", + "kind": "string", + "type": { + "$ref": "328" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "4779", + "kind": "string", + "type": { + "$ref": "468" + }, + "value": "2024-04-29T21:51:44.043Z" + } + } + } + } + } + ] + }, + "nextLink": { + "$id": "4780", + "kind": "string", + "type": { + "$ref": "1626" + }, + "value": "https://microsoft.com/a" + } + } + } + } + ] + } + ] + }, + { + "$id": "4781", + "name": "listBySubscription", + "resourceName": "Fleet", + "doc": "List Fleet resources by subscription ID", + "accessibility": "public", + "parameters": [ + { + "$id": "4782", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "4783", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "4784", + "type": { + "$id": "4785", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2024-11-01" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4786", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "4787", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "4788", + "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": "4789", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "4790", + "kind": "constant", + "valueType": { + "$id": "4791", + "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": "4792", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "1620" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "GET", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/providers/Microsoft.AzureFleet/fleets", + "bufferResponse": true, + "paging": { + "$id": "4793", + "itemPropertySegments": [ + "value" + ], + "nextLink": { + "$id": "4794", + "responseSegments": [ + "nextLink" + ], + "responseLocation": "Body" + } + }, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.AzureFleet.Fleets.listBySubscription", + "decorators": [], + "examples": [ + { + "$id": "4795", + "kind": "http", + "name": "Fleets_ListBySubscription", + "description": "Fleets_ListBySubscription", + "filePath": "2024-11-01/Fleets_ListBySubscription.json", + "parameters": [ + { + "$id": "4796", + "parameter": { + "$ref": "4782" + }, + "value": { + "$id": "4797", + "kind": "string", + "type": { + "$ref": "4783" + }, + "value": "2024-11-01" + } + }, + { + "$id": "4798", + "parameter": { + "$ref": "4786" + }, + "value": { + "$id": "4799", + "kind": "string", + "type": { + "$ref": "4787" + }, + "value": "1DC2F28C-A625-4B0E-9748-9885A3C9E9EB" + } + } + ], + "responses": [ + { + "$id": "4800", + "response": { + "$ref": "4792" + }, + "statusCode": 200, + "bodyValue": { + "$id": "4801", + "kind": "model", + "type": { + "$ref": "1620" + }, + "value": { + "$id": "4802", + "value": { + "$id": "4803", + "kind": "array", + "type": { + "$ref": "1622" + }, + "value": [ + { + "$id": "4804", + "kind": "model", + "type": { + "$ref": "429" + }, + "value": { + "$id": "4805", + "properties": { + "$id": "4806", + "kind": "model", + "type": { + "$ref": "485" + }, + "value": { + "$id": "4807", + "provisioningState": { + "$id": "4808", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Creating" + }, + "spotPriorityProfile": { + "$id": "4809", + "kind": "model", + "type": { + "$ref": "490" + }, + "value": { + "$id": "4810", + "capacity": { + "$id": "4811", + "kind": "number", + "type": { + "$ref": "492" + }, + "value": 20 + }, + "minCapacity": { + "$id": "4812", + "kind": "number", + "type": { + "$ref": "496" + }, + "value": 10 + }, + "maxPricePerVM": { + "$id": "4813", + "kind": "number", + "type": { + "$ref": "500" + }, + "value": 0.00865 + }, + "evictionPolicy": { + "$id": "4814", + "kind": "string", + "type": { + "$ref": "30" + }, + "value": "Delete" + }, + "allocationStrategy": { + "$id": "4815", + "kind": "string", + "type": { + "$ref": "36" + }, + "value": "PriceCapacityOptimized" + }, + "maintain": { + "$id": "4816", + "kind": "boolean", + "type": { + "$ref": "510" + }, + "value": true + } + } + }, + "regularPriorityProfile": { + "$id": "4817", + "kind": "model", + "type": { + "$ref": "516" + }, + "value": { + "$id": "4818", + "capacity": { + "$id": "4819", + "kind": "number", + "type": { + "$ref": "518" + }, + "value": 20 + }, + "minCapacity": { + "$id": "4820", + "kind": "number", + "type": { + "$ref": "522" + }, + "value": 10 + }, + "allocationStrategy": { + "$id": "4821", + "kind": "string", + "type": { + "$ref": "44" + }, + "value": "LowestPrice" + } + } + }, + "vmSizesProfile": { + "$id": "4822", + "kind": "array", + "type": { + "$ref": "531" + }, + "value": [ + { + "$id": "4823", + "kind": "model", + "type": { + "$ref": "532" + }, + "value": { + "$id": "4824", + "name": { + "$id": "4825", + "kind": "string", + "type": { + "$ref": "534" + }, + "value": "Standard_d1_v2" + }, + "rank": { + "$id": "4826", + "kind": "number", + "type": { + "$ref": "538" + }, + "value": 19225 + } + } + } + ] + }, + "computeProfile": { + "$id": "4827", + "kind": "model", + "type": { + "$ref": "1449" + }, + "value": { + "$id": "4828", + "baseVirtualMachineProfile": { + "$id": "4829", + "kind": "model", + "type": { + "$ref": "644" + }, + "value": { + "$id": "4830", + "osProfile": { + "$id": "4831", + "kind": "model", + "type": { + "$ref": "646" + }, + "value": { + "$id": "4832", + "computerNamePrefix": { + "$id": "4833", + "kind": "string", + "type": { + "$ref": "648" + }, + "value": "o" + }, + "adminUsername": { + "$id": "4834", + "kind": "string", + "type": { + "$ref": "652" + }, + "value": "nrgzqciiaaxjrqldbmjbqkyhntp" + }, + "windowsConfiguration": { + "$id": "4835", + "kind": "model", + "type": { + "$ref": "664" + }, + "value": { + "$id": "4836", + "provisionVMAgent": { + "$id": "4837", + "kind": "boolean", + "type": { + "$ref": "666" + }, + "value": true + }, + "enableAutomaticUpdates": { + "$id": "4838", + "kind": "boolean", + "type": { + "$ref": "670" + }, + "value": true + }, + "timeZone": { + "$id": "4839", + "kind": "string", + "type": { + "$ref": "674" + }, + "value": "hlyjiqcfksgrpjrct" + }, + "additionalUnattendContent": { + "$id": "4840", + "kind": "array", + "type": { + "$ref": "678" + }, + "value": [ + { + "$id": "4841", + "kind": "model", + "type": { + "$ref": "679" + }, + "value": { + "$id": "4842", + "passName": { + "$id": "4843", + "kind": "string", + "type": { + "$ref": "681" + }, + "value": "OobeSystem" + }, + "componentName": { + "$id": "4844", + "kind": "string", + "type": { + "$ref": "685" + }, + "value": "Microsoft-Windows-Shell-Setup" + }, + "settingName": { + "$id": "4845", + "kind": "string", + "type": { + "$ref": "116" + }, + "value": "AutoLogon" + } + } + } + ] + }, + "patchSettings": { + "$id": "4846", + "kind": "model", + "type": { + "$ref": "698" + }, + "value": { + "$id": "4847", + "patchMode": { + "$id": "4848", + "kind": "string", + "type": { + "$ref": "122" + }, + "value": "Manual" + }, + "enableHotpatching": { + "$id": "4849", + "kind": "boolean", + "type": { + "$ref": "703" + }, + "value": true + }, + "assessmentMode": { + "$id": "4850", + "kind": "string", + "type": { + "$ref": "130" + }, + "value": "ImageDefault" + }, + "automaticByPlatformSettings": { + "$id": "4851", + "kind": "model", + "type": { + "$ref": "710" + }, + "value": { + "$id": "4852", + "rebootSetting": { + "$id": "4853", + "kind": "string", + "type": { + "$ref": "136" + }, + "value": "Unknown" + }, + "bypassPlatformSafetyChecksOnUserSchedule": { + "$id": "4854", + "kind": "boolean", + "type": { + "$ref": "715" + }, + "value": true + } + } + } + } + }, + "winRM": { + "$id": "4855", + "kind": "model", + "type": { + "$ref": "723" + }, + "value": { + "$id": "4856", + "listeners": { + "$id": "4857", + "kind": "array", + "type": { + "$ref": "725" + }, + "value": [ + { + "$id": "4858", + "kind": "model", + "type": { + "$ref": "726" + }, + "value": { + "$id": "4859", + "protocol": { + "$id": "4860", + "kind": "string", + "type": { + "$ref": "146" + }, + "value": "Http" + }, + "certificateUrl": { + "$id": "4861", + "kind": "string", + "type": { + "$ref": "731" + }, + "value": "https://myVaultName.vault.azure.net/secrets/myCertName" + } + } + } + ] + } + } + }, + "enableVMAgentPlatformUpdates": { + "$id": "4862", + "kind": "boolean", + "type": { + "$ref": "739" + }, + "value": true + } + } + }, + "linuxConfiguration": { + "$id": "4863", + "kind": "model", + "type": { + "$ref": "745" + }, + "value": { + "$id": "4864", + "disablePasswordAuthentication": { + "$id": "4865", + "kind": "boolean", + "type": { + "$ref": "747" + }, + "value": true + }, + "ssh": { + "$id": "4866", + "kind": "model", + "type": { + "$ref": "751" + }, + "value": { + "$id": "4867", + "publicKeys": { + "$id": "4868", + "kind": "array", + "type": { + "$ref": "753" + }, + "value": [ + { + "$id": "4869", + "kind": "model", + "type": { + "$ref": "754" + }, + "value": { + "$id": "4870", + "path": { + "$id": "4871", + "kind": "string", + "type": { + "$ref": "756" + }, + "value": "kmqz" + }, + "keyData": { + "$id": "4872", + "kind": "string", + "type": { + "$ref": "760" + }, + "value": "kivgsubusvpprwqaqpjcmhsv" + } + } + } + ] + } + } + }, + "provisionVMAgent": { + "$id": "4873", + "kind": "boolean", + "type": { + "$ref": "768" + }, + "value": true + }, + "patchSettings": { + "$id": "4874", + "kind": "model", + "type": { + "$ref": "772" + }, + "value": { + "$id": "4875", + "patchMode": { + "$id": "4876", + "kind": "string", + "type": { + "$ref": "152" + }, + "value": "ImageDefault" + }, + "assessmentMode": { + "$id": "4877", + "kind": "string", + "type": { + "$ref": "158" + }, + "value": "ImageDefault" + }, + "automaticByPlatformSettings": { + "$id": "4878", + "kind": "model", + "type": { + "$ref": "780" + }, + "value": { + "$id": "4879", + "rebootSetting": { + "$id": "4880", + "kind": "string", + "type": { + "$ref": "164" + }, + "value": "Unknown" + }, + "bypassPlatformSafetyChecksOnUserSchedule": { + "$id": "4881", + "kind": "boolean", + "type": { + "$ref": "785" + }, + "value": true + } + } + } + } + }, + "enableVMAgentPlatformUpdates": { + "$id": "4882", + "kind": "boolean", + "type": { + "$ref": "793" + }, + "value": true + } + } + }, + "secrets": { + "$id": "4883", + "kind": "array", + "type": { + "$ref": "799" + }, + "value": [ + { + "$id": "4884", + "kind": "model", + "type": { + "$ref": "800" + }, + "value": { + "$id": "4885", + "sourceVault": { + "$id": "4886", + "kind": "model", + "type": { + "$ref": "802" + }, + "value": { + "$id": "4887", + "id": { + "$id": "4888", + "kind": "string", + "type": { + "$ref": "804" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}" + } + } + }, + "vaultCertificates": { + "$id": "4889", + "kind": "array", + "type": { + "$ref": "811" + }, + "value": [ + { + "$id": "4890", + "kind": "model", + "type": { + "$ref": "812" + }, + "value": { + "$id": "4891", + "certificateUrl": { + "$id": "4892", + "kind": "string", + "type": { + "$ref": "814" + }, + "value": "https://myVaultName.vault.azure.net/secrets/myCertName" + }, + "certificateStore": { + "$id": "4893", + "kind": "string", + "type": { + "$ref": "818" + }, + "value": "nlxrwavpzhueffxsshlun" + } + } + } + ] + } + } + } + ] + }, + "allowExtensionOperations": { + "$id": "4894", + "kind": "boolean", + "type": { + "$ref": "826" + }, + "value": true + }, + "requireGuestProvisionSignal": { + "$id": "4895", + "kind": "boolean", + "type": { + "$ref": "830" + }, + "value": true + } + } + }, + "storageProfile": { + "$id": "4896", + "kind": "model", + "type": { + "$ref": "836" + }, + "value": { + "$id": "4897", + "imageReference": { + "$id": "4898", + "kind": "model", + "type": { + "$ref": "838" + }, + "value": { + "$id": "4899", + "publisher": { + "$id": "4900", + "kind": "string", + "type": { + "$ref": "845" + }, + "value": "mqxgwbiyjzmxavhbkd" + }, + "offer": { + "$id": "4901", + "kind": "string", + "type": { + "$ref": "849" + }, + "value": "isxgumkarlkomp" + }, + "sku": { + "$id": "4902", + "kind": "string", + "type": { + "$ref": "853" + }, + "value": "eojmppqcrnpmxirtp" + }, + "version": { + "$id": "4903", + "kind": "string", + "type": { + "$ref": "857" + }, + "value": "wvpcqefgtmqdgltiuz" + }, + "exactVersion": { + "$id": "4904", + "kind": "string", + "type": { + "$ref": "861" + }, + "value": "zjbntmiskjexlr" + }, + "sharedGalleryImageId": { + "$id": "4905", + "kind": "string", + "type": { + "$ref": "865" + }, + "value": "kmkgihoxwlawuuhcinfirktdwkmx" + }, + "communityGalleryImageId": { + "$id": "4906", + "kind": "string", + "type": { + "$ref": "869" + }, + "value": "vlqe" + }, + "id": { + "$id": "4907", + "kind": "string", + "type": { + "$ref": "840" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images/{imageName}/versions/{versionName}" + } + } + }, + "osDisk": { + "$id": "4908", + "kind": "model", + "type": { + "$ref": "875" + }, + "value": { + "$id": "4909", + "name": { + "$id": "4910", + "kind": "string", + "type": { + "$ref": "877" + }, + "value": "wfttw" + }, + "caching": { + "$id": "4911", + "kind": "string", + "type": { + "$ref": "174" + }, + "value": "None" + }, + "writeAcceleratorEnabled": { + "$id": "4912", + "kind": "boolean", + "type": { + "$ref": "884" + }, + "value": true + }, + "createOption": { + "$id": "4913", + "kind": "string", + "type": { + "$ref": "182" + }, + "value": "FromImage" + }, + "diffDiskSettings": { + "$id": "4914", + "kind": "model", + "type": { + "$ref": "891" + }, + "value": { + "$id": "4915", + "option": { + "$id": "4916", + "kind": "string", + "type": { + "$ref": "194" + }, + "value": "Local" + }, + "placement": { + "$id": "4917", + "kind": "string", + "type": { + "$ref": "198" + }, + "value": "CacheDisk" + } + } + }, + "diskSizeGB": { + "$id": "4918", + "kind": "number", + "type": { + "$ref": "901" + }, + "value": 14 + }, + "osType": { + "$id": "4919", + "kind": "string", + "type": { + "$ref": "206" + }, + "value": "Windows" + }, + "image": { + "$id": "4920", + "kind": "model", + "type": { + "$ref": "908" + }, + "value": { + "$id": "4921", + "uri": { + "$id": "4922", + "kind": "string", + "type": { + "$ref": "910" + }, + "value": "https://myStorageAccountName.blob.core.windows.net/myContainerName/myVhdName.vhd" + } + } + }, + "vhdContainers": { + "$id": "4923", + "kind": "array", + "type": { + "$ref": "916" + }, + "value": [ + { + "$id": "4924", + "kind": "string", + "type": { + "$ref": "917" + }, + "value": "tkzcwddtinkfpnfklatw" + } + ] + }, + "managedDisk": { + "$id": "4925", + "kind": "model", + "type": { + "$ref": "921" + }, + "value": { + "$id": "4926", + "storageAccountType": { + "$id": "4927", + "kind": "string", + "type": { + "$ref": "212" + }, + "value": "Standard_LRS" + }, + "diskEncryptionSet": { + "$id": "4928", + "kind": "model", + "type": { + "$ref": "926" + }, + "value": { + "$id": "4929", + "id": { + "$id": "4930", + "kind": "string", + "type": { + "$ref": "928" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}" + } + } + }, + "securityProfile": { + "$id": "4931", + "kind": "model", + "type": { + "$ref": "935" + }, + "value": { + "$id": "4932", + "securityEncryptionType": { + "$id": "4933", + "kind": "string", + "type": { + "$ref": "228" + }, + "value": "VMGuestStateOnly" + }, + "diskEncryptionSet": { + "$id": "4934", + "kind": "model", + "type": { + "$ref": "926" + }, + "value": { + "$id": "4935", + "id": { + "$id": "4936", + "kind": "string", + "type": { + "$ref": "928" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}" + } + } + } + } + } + } + }, + "deleteOption": { + "$id": "4937", + "kind": "string", + "type": { + "$ref": "236" + }, + "value": "Delete" + } + } + }, + "dataDisks": { + "$id": "4938", + "kind": "array", + "type": { + "$ref": "952" + }, + "value": [ + { + "$id": "4939", + "kind": "model", + "type": { + "$ref": "953" + }, + "value": { + "$id": "4940", + "name": { + "$id": "4941", + "kind": "string", + "type": { + "$ref": "955" + }, + "value": "eogiykmdmeikswxmigjws" + }, + "lun": { + "$id": "4942", + "kind": "number", + "type": { + "$ref": "959" + }, + "value": 14 + }, + "caching": { + "$id": "4943", + "kind": "string", + "type": { + "$ref": "174" + }, + "value": "None" + }, + "writeAcceleratorEnabled": { + "$id": "4944", + "kind": "boolean", + "type": { + "$ref": "966" + }, + "value": true + }, + "createOption": { + "$id": "4945", + "kind": "string", + "type": { + "$ref": "182" + }, + "value": "FromImage" + }, + "diskSizeGB": { + "$id": "4946", + "kind": "number", + "type": { + "$ref": "973" + }, + "value": 6 + }, + "managedDisk": { + "$id": "4947", + "kind": "model", + "type": { + "$ref": "921" + }, + "value": { + "$id": "4948", + "storageAccountType": { + "$id": "4949", + "kind": "string", + "type": { + "$ref": "212" + }, + "value": "Standard_LRS" + }, + "diskEncryptionSet": { + "$id": "4950", + "kind": "model", + "type": { + "$ref": "926" + }, + "value": { + "$id": "4951", + "id": { + "$id": "4952", + "kind": "string", + "type": { + "$ref": "928" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}" + } + } + }, + "securityProfile": { + "$id": "4953", + "kind": "model", + "type": { + "$ref": "935" + }, + "value": { + "$id": "4954", + "securityEncryptionType": { + "$id": "4955", + "kind": "string", + "type": { + "$ref": "228" + }, + "value": "VMGuestStateOnly" + }, + "diskEncryptionSet": { + "$id": "4956", + "kind": "model", + "type": { + "$ref": "926" + }, + "value": { + "$id": "4957", + "id": { + "$id": "4958", + "kind": "string", + "type": { + "$ref": "928" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}" + } + } + } + } + } + } + }, + "diskIOPSReadWrite": { + "$id": "4959", + "kind": "number", + "type": { + "$ref": "980" + }, + "value": 27 + }, + "diskMBpsReadWrite": { + "$id": "4960", + "kind": "number", + "type": { + "$ref": "984" + }, + "value": 2 + }, + "deleteOption": { + "$id": "4961", + "kind": "string", + "type": { + "$ref": "236" + }, + "value": "Delete" + } + } + } + ] + }, + "diskControllerType": { + "$id": "4962", + "kind": "string", + "type": { + "$ref": "242" + }, + "value": "uzb" + } + } + }, + "networkProfile": { + "$id": "4963", + "kind": "model", + "type": { + "$ref": "998" + }, + "value": { + "$id": "4964", + "healthProbe": { + "$id": "4965", + "kind": "model", + "type": { + "$ref": "1000" + }, + "value": { + "$id": "4966", + "id": { + "$id": "4967", + "kind": "string", + "type": { + "$ref": "1002" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/probes/{probeName}" + } + } + }, + "networkInterfaceConfigurations": { + "$id": "4968", + "kind": "array", + "type": { + "$ref": "1009" + }, + "value": [ + { + "$id": "4969", + "kind": "model", + "type": { + "$ref": "1010" + }, + "value": { + "$id": "4970", + "name": { + "$id": "4971", + "kind": "string", + "type": { + "$ref": "1012" + }, + "value": "i" + }, + "properties": { + "$id": "4972", + "kind": "model", + "type": { + "$ref": "1016" + }, + "value": { + "$id": "4973", + "primary": { + "$id": "4974", + "kind": "boolean", + "type": { + "$ref": "1018" + }, + "value": true + }, + "enableAcceleratedNetworking": { + "$id": "4975", + "kind": "boolean", + "type": { + "$ref": "1022" + }, + "value": true + }, + "disableTcpStateTracking": { + "$id": "4976", + "kind": "boolean", + "type": { + "$ref": "1026" + }, + "value": true + }, + "enableFpga": { + "$id": "4977", + "kind": "boolean", + "type": { + "$ref": "1030" + }, + "value": true + }, + "networkSecurityGroup": { + "$id": "4978", + "kind": "model", + "type": { + "$ref": "802" + }, + "value": { + "$id": "4979", + "id": { + "$id": "4980", + "kind": "string", + "type": { + "$ref": "804" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/{networkSecurityGroupName}" + } + } + }, + "dnsSettings": { + "$id": "4981", + "kind": "model", + "type": { + "$ref": "1037" + }, + "value": { + "$id": "4982", + "dnsServers": { + "$id": "4983", + "kind": "array", + "type": { + "$ref": "1039" + }, + "value": [ + { + "$id": "4984", + "kind": "string", + "type": { + "$ref": "1040" + }, + "value": "nxmmfolhclsesu" + } + ] + } + } + }, + "ipConfigurations": { + "$id": "4985", + "kind": "array", + "type": { + "$ref": "1046" + }, + "value": [ + { + "$id": "4986", + "kind": "model", + "type": { + "$ref": "1047" + }, + "value": { + "$id": "4987", + "name": { + "$id": "4988", + "kind": "string", + "type": { + "$ref": "1049" + }, + "value": "oezqhkidfhyywlfzwuotilrpbqnjg" + }, + "properties": { + "$id": "4989", + "kind": "model", + "type": { + "$ref": "1053" + }, + "value": { + "$id": "4990", + "subnet": { + "$id": "4991", + "kind": "model", + "type": { + "$ref": "1000" + }, + "value": { + "$id": "4992", + "id": { + "$id": "4993", + "kind": "string", + "type": { + "$ref": "1002" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}" + } + } + }, + "primary": { + "$id": "4994", + "kind": "boolean", + "type": { + "$ref": "1058" + }, + "value": true + }, + "publicIPAddressConfiguration": { + "$id": "4995", + "kind": "model", + "type": { + "$ref": "1062" + }, + "value": { + "$id": "4996", + "name": { + "$id": "4997", + "kind": "string", + "type": { + "$ref": "1064" + }, + "value": "fvpqf" + }, + "properties": { + "$id": "4998", + "kind": "model", + "type": { + "$ref": "1068" + }, + "value": { + "$id": "4999", + "idleTimeoutInMinutes": { + "$id": "5000", + "kind": "number", + "type": { + "$ref": "1070" + }, + "value": 9 + }, + "dnsSettings": { + "$id": "5001", + "kind": "model", + "type": { + "$ref": "1074" + }, + "value": { + "$id": "5002", + "domainNameLabel": { + "$id": "5003", + "kind": "string", + "type": { + "$ref": "1076" + }, + "value": "ukrddzvmorpmfsczjwtbvp" + }, + "domainNameLabelScope": { + "$id": "5004", + "kind": "string", + "type": { + "$ref": "248" + }, + "value": "TenantReuse" + } + } + }, + "ipTags": { + "$id": "5005", + "kind": "array", + "type": { + "$ref": "1085" + }, + "value": [ + { + "$id": "5006", + "kind": "model", + "type": { + "$ref": "1086" + }, + "value": { + "$id": "5007", + "ipTagType": { + "$id": "5008", + "kind": "string", + "type": { + "$ref": "1088" + }, + "value": "sddgsoemnzgqizale" + }, + "tag": { + "$id": "5009", + "kind": "string", + "type": { + "$ref": "1092" + }, + "value": "wufmhrjsakbiaetyara" + } + } + } + ] + }, + "publicIPPrefix": { + "$id": "5010", + "kind": "model", + "type": { + "$ref": "802" + }, + "value": { + "$id": "5011", + "id": { + "$id": "5012", + "kind": "string", + "type": { + "$ref": "804" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes/{publicIPPrefixName}" + } + } + }, + "publicIPAddressVersion": { + "$id": "5013", + "kind": "string", + "type": { + "$ref": "258" + }, + "value": "IPv4" + }, + "deleteOption": { + "$id": "5014", + "kind": "string", + "type": { + "$ref": "264" + }, + "value": "Delete" + } + } + }, + "sku": { + "$id": "5015", + "kind": "model", + "type": { + "$ref": "1109" + }, + "value": { + "$id": "5016", + "name": { + "$id": "5017", + "kind": "string", + "type": { + "$ref": "270" + }, + "value": "Basic" + }, + "tier": { + "$id": "5018", + "kind": "string", + "type": { + "$ref": "276" + }, + "value": "Regional" + } + } + } + } + }, + "privateIPAddressVersion": { + "$id": "5019", + "kind": "string", + "type": { + "$ref": "258" + }, + "value": "IPv4" + }, + "applicationGatewayBackendAddressPools": { + "$id": "5020", + "kind": "array", + "type": { + "$ref": "1124" + }, + "value": [ + { + "$id": "5021", + "kind": "model", + "type": { + "$ref": "802" + }, + "value": { + "$id": "5022", + "id": { + "$id": "5023", + "kind": "string", + "type": { + "$ref": "804" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}/backendAddressPools/{backendAddressPoolName}" + } + } + } + ] + }, + "applicationSecurityGroups": { + "$id": "5024", + "kind": "array", + "type": { + "$ref": "1128" + }, + "value": [ + { + "$id": "5025", + "kind": "model", + "type": { + "$ref": "802" + }, + "value": { + "$id": "5026", + "id": { + "$id": "5027", + "kind": "string", + "type": { + "$ref": "804" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationSecurityGroups/{applicationSecurityGroupName}" + } + } + } + ] + }, + "loadBalancerBackendAddressPools": { + "$id": "5028", + "kind": "array", + "type": { + "$ref": "1132" + }, + "value": [ + { + "$id": "5029", + "kind": "model", + "type": { + "$ref": "802" + }, + "value": { + "$id": "5030", + "id": { + "$id": "5031", + "kind": "string", + "type": { + "$ref": "804" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/backendAddressPools/{backendAddressPoolName}" + } + } + } + ] + }, + "loadBalancerInboundNatPools": { + "$id": "5032", + "kind": "array", + "type": { + "$ref": "1136" + }, + "value": [ + { + "$id": "5033", + "kind": "model", + "type": { + "$ref": "802" + }, + "value": { + "$id": "5034", + "id": { + "$id": "5035", + "kind": "string", + "type": { + "$ref": "804" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/inboundNatPools/{inboundNatPoolName}" + } + } + } + ] + } + } + } + } + } + ] + }, + "enableIPForwarding": { + "$id": "5036", + "kind": "boolean", + "type": { + "$ref": "1144" + }, + "value": true + }, + "deleteOption": { + "$id": "5037", + "kind": "string", + "type": { + "$ref": "264" + }, + "value": "Delete" + }, + "auxiliaryMode": { + "$id": "5038", + "kind": "string", + "type": { + "$ref": "282" + }, + "value": "None" + }, + "auxiliarySku": { + "$id": "5039", + "kind": "string", + "type": { + "$ref": "290" + }, + "value": "None" + } + } + } + } + } + ] + }, + "networkApiVersion": { + "$id": "5040", + "kind": "string", + "type": { + "$ref": "302" + }, + "value": "2020-11-01" + } + } + }, + "securityProfile": { + "$id": "5041", + "kind": "model", + "type": { + "$ref": "1166" + }, + "value": { + "$id": "5042", + "uefiSettings": { + "$id": "5043", + "kind": "model", + "type": { + "$ref": "1168" + }, + "value": { + "$id": "5044", + "secureBootEnabled": { + "$id": "5045", + "kind": "boolean", + "type": { + "$ref": "1170" + }, + "value": true + }, + "vTpmEnabled": { + "$id": "5046", + "kind": "boolean", + "type": { + "$ref": "1174" + }, + "value": true + } + } + }, + "encryptionAtHost": { + "$id": "5047", + "kind": "boolean", + "type": { + "$ref": "1180" + }, + "value": true + }, + "securityType": { + "$id": "5048", + "kind": "string", + "type": { + "$ref": "306" + }, + "value": "TrustedLaunch" + }, + "encryptionIdentity": { + "$id": "5049", + "kind": "model", + "type": { + "$ref": "1187" + }, + "value": { + "$id": "5050", + "userAssignedIdentityResourceId": { + "$id": "5051", + "kind": "string", + "type": { + "$ref": "1189" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{userAssignedIdentityName}" + } + } + }, + "proxyAgentSettings": { + "$id": "5052", + "kind": "model", + "type": { + "$ref": "1196" + }, + "value": { + "$id": "5053", + "enabled": { + "$id": "5054", + "kind": "boolean", + "type": { + "$ref": "1198" + }, + "value": true + }, + "mode": { + "$id": "5055", + "kind": "string", + "type": { + "$ref": "312" + }, + "value": "Audit" + }, + "keyIncarnationId": { + "$id": "5056", + "kind": "number", + "type": { + "$ref": "1205" + }, + "value": 20 + } + } + } + } + }, + "diagnosticsProfile": { + "$id": "5057", + "kind": "model", + "type": { + "$ref": "1213" + }, + "value": { + "$id": "5058", + "bootDiagnostics": { + "$id": "5059", + "kind": "model", + "type": { + "$ref": "1215" + }, + "value": { + "$id": "5060", + "enabled": { + "$id": "5061", + "kind": "boolean", + "type": { + "$ref": "1217" + }, + "value": true + }, + "storageUri": { + "$id": "5062", + "kind": "string", + "type": { + "$ref": "1221" + }, + "value": "http://myStorageAccountName.blob.core.windows.net" + } + } + } + } + }, + "extensionProfile": { + "$id": "5063", + "kind": "model", + "type": { + "$ref": "1229" + }, + "value": { + "$id": "5064", + "extensions": { + "$id": "5065", + "kind": "array", + "type": { + "$ref": "1231" + }, + "value": [ + { + "$id": "5066", + "kind": "model", + "type": { + "$ref": "1232" + }, + "value": { + "$id": "5067", + "name": { + "$id": "5068", + "kind": "string", + "type": { + "$ref": "1239" + }, + "value": "bndxuxx" + }, + "type": { + "$id": "5069", + "kind": "string", + "type": { + "$ref": "1243" + }, + "value": "cmeam" + }, + "properties": { + "$id": "5070", + "kind": "model", + "type": { + "$ref": "1247" + }, + "value": { + "$id": "5071", + "forceUpdateTag": { + "$id": "5072", + "kind": "string", + "type": { + "$ref": "1249" + }, + "value": "yhgxw" + }, + "publisher": { + "$id": "5073", + "kind": "string", + "type": { + "$ref": "1253" + }, + "value": "kpxtirxjfprhs" + }, + "type": { + "$id": "5074", + "kind": "string", + "type": { + "$ref": "1257" + }, + "value": "pgjilctjjwaa" + }, + "typeHandlerVersion": { + "$id": "5075", + "kind": "string", + "type": { + "$ref": "1261" + }, + "value": "zevivcoilxmbwlrihhhibq" + }, + "autoUpgradeMinorVersion": { + "$id": "5076", + "kind": "boolean", + "type": { + "$ref": "1265" + }, + "value": true + }, + "enableAutomaticUpgrade": { + "$id": "5077", + "kind": "boolean", + "type": { + "$ref": "1269" + }, + "value": true + }, + "settings": { + "$id": "5078", + "kind": "dict", + "type": { + "$ref": "1273" + }, + "value": { + "$id": "5079" + } + }, + "provisioningState": { + "$id": "5080", + "kind": "string", + "type": { + "$ref": "1285" + }, + "value": "Succeeded" + }, + "provisionAfterExtensions": { + "$id": "5081", + "kind": "array", + "type": { + "$ref": "1289" + }, + "value": [ + { + "$id": "5082", + "kind": "string", + "type": { + "$ref": "1290" + }, + "value": "nftzosroolbcwmpupujzqwqe" + } + ] + }, + "suppressFailures": { + "$id": "5083", + "kind": "boolean", + "type": { + "$ref": "1294" + }, + "value": true + }, + "protectedSettingsFromKeyVault": { + "$id": "5084", + "kind": "model", + "type": { + "$ref": "1298" + }, + "value": { + "$id": "5085", + "secretUrl": { + "$id": "5086", + "kind": "string", + "type": { + "$ref": "1300" + }, + "value": "https://myVaultName.vault.azure.net/secrets/secret/mySecretName" + }, + "sourceVault": { + "$id": "5087", + "kind": "model", + "type": { + "$ref": "802" + }, + "value": { + "$id": "5088", + "id": { + "$id": "5089", + "kind": "string", + "type": { + "$ref": "804" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}" + } + } + } + } + } + } + }, + "id": { + "$id": "5090", + "kind": "string", + "type": { + "$ref": "1234" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/extensions/{extensionName}" + } + } + } + ] + }, + "extensionsTimeBudget": { + "$id": "5091", + "kind": "string", + "type": { + "$ref": "1313" + }, + "value": "mbhjahtdygwgyszdwjtvlvtgchdwil" + } + } + }, + "licenseType": { + "$id": "5092", + "kind": "string", + "type": { + "$ref": "1319" + }, + "value": "v" + }, + "scheduledEventsProfile": { + "$id": "5093", + "kind": "model", + "type": { + "$ref": "1323" + }, + "value": { + "$id": "5094", + "terminateNotificationProfile": { + "$id": "5095", + "kind": "model", + "type": { + "$ref": "1325" + }, + "value": { + "$id": "5096", + "notBeforeTimeout": { + "$id": "5097", + "kind": "string", + "type": { + "$ref": "1327" + }, + "value": "iljppmmw" + }, + "enable": { + "$id": "5098", + "kind": "boolean", + "type": { + "$ref": "1331" + }, + "value": true + } + } + }, + "osImageNotificationProfile": { + "$id": "5099", + "kind": "model", + "type": { + "$ref": "1337" + }, + "value": { + "$id": "5100", + "notBeforeTimeout": { + "$id": "5101", + "kind": "string", + "type": { + "$ref": "1339" + }, + "value": "olbpadmevekyczfokodtfprxti" + }, + "enable": { + "$id": "5102", + "kind": "boolean", + "type": { + "$ref": "1343" + }, + "value": true + } + } + } + } + }, + "userData": { + "$id": "5103", + "kind": "string", + "type": { + "$ref": "1351" + }, + "value": "s" + }, + "capacityReservation": { + "$id": "5104", + "kind": "model", + "type": { + "$ref": "1355" + }, + "value": { + "$id": "5105", + "capacityReservationGroup": { + "$id": "5106", + "kind": "model", + "type": { + "$ref": "802" + }, + "value": { + "$id": "5107", + "id": { + "$id": "5108", + "kind": "string", + "type": { + "$ref": "804" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/capacityReservationGroups/{capacityReservationGroupName}" + } + } + } + } + }, + "applicationProfile": { + "$id": "5109", + "kind": "model", + "type": { + "$ref": "1362" + }, + "value": { + "$id": "5110", + "galleryApplications": { + "$id": "5111", + "kind": "array", + "type": { + "$ref": "1364" + }, + "value": [ + { + "$id": "5112", + "kind": "model", + "type": { + "$ref": "1365" + }, + "value": { + "$id": "5113", + "tags": { + "$id": "5114", + "kind": "string", + "type": { + "$ref": "1367" + }, + "value": "eyrqjbib" + }, + "order": { + "$id": "5115", + "kind": "number", + "type": { + "$ref": "1371" + }, + "value": 5 + }, + "packageReferenceId": { + "$id": "5116", + "kind": "string", + "type": { + "$ref": "1375" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/applications/{applicationName}/versions/{versionName}" + }, + "treatFailureAsDeploymentFailure": { + "$id": "5117", + "kind": "boolean", + "type": { + "$ref": "1384" + }, + "value": true + }, + "enableAutomaticUpgrade": { + "$id": "5118", + "kind": "boolean", + "type": { + "$ref": "1388" + }, + "value": true + } + } + } + ] + } + } + }, + "hardwareProfile": { + "$id": "5119", + "kind": "model", + "type": { + "$ref": "1396" + }, + "value": { + "$id": "5120", + "vmSizeProperties": { + "$id": "5121", + "kind": "model", + "type": { + "$ref": "1398" + }, + "value": { + "$id": "5122", + "vCPUsAvailable": { + "$id": "5123", + "kind": "number", + "type": { + "$ref": "1400" + }, + "value": 16 + }, + "vCPUsPerCore": { + "$id": "5124", + "kind": "number", + "type": { + "$ref": "1404" + }, + "value": 23 + } + } + } + } + }, + "serviceArtifactReference": { + "$id": "5125", + "kind": "model", + "type": { + "$ref": "1412" + }, + "value": { + "$id": "5126", + "id": { + "$id": "5127", + "kind": "string", + "type": { + "$ref": "1414" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/serviceArtifacts/{serviceArtifactsName}/vmArtifactsProfiles/{vmArtifactsProfileName}" + } + } + }, + "securityPostureReference": { + "$id": "5128", + "kind": "model", + "type": { + "$ref": "1421" + }, + "value": { + "$id": "5129", + "id": { + "$id": "5130", + "kind": "string", + "type": { + "$ref": "1423" + }, + "value": "mubredelfbshboaxrsxiajihahaa" + }, + "excludeExtensions": { + "$id": "5131", + "kind": "array", + "type": { + "$ref": "1427" + }, + "value": [ + { + "$id": "5132", + "kind": "string", + "type": { + "$ref": "1428" + }, + "value": "{securityPostureVMExtensionName}" + } + ] + }, + "isOverridable": { + "$id": "5133", + "kind": "boolean", + "type": { + "$ref": "1432" + }, + "value": true + } + } + }, + "timeCreated": { + "$id": "5134", + "kind": "string", + "type": { + "$ref": "1438" + }, + "value": "2024-04-29T21:51:44.043Z" + } + } + }, + "computeApiVersion": { + "$id": "5135", + "kind": "string", + "type": { + "$ref": "1454" + }, + "value": "2023-07-01" + }, + "platformFaultDomainCount": { + "$id": "5136", + "kind": "number", + "type": { + "$ref": "1458" + }, + "value": 1 + } + } + }, + "timeCreated": { + "$id": "5137", + "kind": "string", + "type": { + "$ref": "1476" + }, + "value": "2024-07-10T00:16:34.8590555+00:00" + }, + "uniqueId": { + "$id": "5138", + "kind": "string", + "type": { + "$ref": "1481" + }, + "value": "a2f7fabd-bbc2-4a20-afe1-49fdb3885a28" + } + } + }, + "zones": { + "$id": "5139", + "kind": "array", + "type": { + "$ref": "1487" + }, + "value": [ + { + "$id": "5140", + "kind": "string", + "type": { + "$ref": "1488" + }, + "value": "zone1" + }, + { + "$id": "5141", + "kind": "string", + "type": { + "$ref": "1488" + }, + "value": "zone2" + } + ] + }, + "identity": { + "$id": "5142", + "kind": "model", + "type": { + "$ref": "1492" + }, + "value": { + "$id": "5143", + "principalId": { + "$id": "5144", + "kind": "string", + "type": { + "$ref": "1494" + }, + "value": "4d508e5b-374b-4382-9a1c-01fb8b6cb37c" + }, + "tenantId": { + "$id": "5145", + "kind": "string", + "type": { + "$ref": "1499" + }, + "value": "5d508e5b-374b-4382-9a1c-01fb8b6cb37c" + }, + "type": { + "$id": "5146", + "kind": "string", + "type": { + "$ref": "318" + }, + "value": "UserAssigned" + }, + "userAssignedIdentities": { + "$id": "5147", + "kind": "dict", + "type": { + "$ref": "1507" + }, + "value": { + "$id": "5148", + "key9851": { + "$id": "5149", + "kind": "model", + "type": { + "$ref": "1510" + }, + "value": { + "$id": "5150", + "principalId": { + "$id": "5151", + "kind": "string", + "type": { + "$ref": "1517" + }, + "value": "6d508e5b-374b-4382-9a1c-01fb8b6cb37c" + }, + "clientId": { + "$id": "5152", + "kind": "string", + "type": { + "$ref": "1512" + }, + "value": "7d508e5b-374b-4382-9a1c-01fb8b6cb37c" + } + } + } + } + } + } + }, + "plan": { + "$id": "5153", + "kind": "model", + "type": { + "$ref": "1526" + }, + "value": { + "$id": "5154", + "name": { + "$id": "5155", + "kind": "string", + "type": { + "$ref": "1528" + }, + "value": "jwgrcrnrtfoxn" + }, + "publisher": { + "$id": "5156", + "kind": "string", + "type": { + "$ref": "1532" + }, + "value": "iozjbiqqckqm" + }, + "product": { + "$id": "5157", + "kind": "string", + "type": { + "$ref": "1536" + }, + "value": "cgopbyvdyqikahwyxfpzwaqk" + }, + "promotionCode": { + "$id": "5158", + "kind": "string", + "type": { + "$ref": "1540" + }, + "value": "naglezezplcaruqogtxnuizslqnnbr" + }, + "version": { + "$id": "5159", + "kind": "string", + "type": { + "$ref": "1544" + }, + "value": "wa" + } + } + }, + "tags": { + "$id": "5160", + "kind": "dict", + "type": { + "$ref": "475" + }, + "value": { + "$id": "5161", + "key3518": { + "$id": "5162", + "kind": "string", + "type": { + "$ref": "477" + }, + "value": "luvrnuvsgdpbuofdskkcoqhfh" + } + } + }, + "location": { + "$id": "5163", + "kind": "string", + "type": { + "$ref": "481" + }, + "value": "westus" + }, + "id": { + "$id": "5164", + "kind": "string", + "type": { + "$ref": "433" + }, + "value": "/subscriptions/7B0CD4DB-3381-4013-9B31-FB6E6FD0FF1C/resourceGroups/rgazurefleet/providers/Microsoft.AzureFleet/fleets/testFleet" + }, + "name": { + "$id": "5165", + "kind": "string", + "type": { + "$ref": "438" + }, + "value": "testFleet" + }, + "type": { + "$id": "5166", + "kind": "string", + "type": { + "$ref": "442" + }, + "value": "Microsoft.AzureFleet/fleets" + }, + "systemData": { + "$id": "5167", + "kind": "model", + "type": { + "$ref": "447" + }, + "value": { + "$id": "5168", + "createdBy": { + "$id": "5169", + "kind": "string", + "type": { + "$ref": "449" + }, + "value": "rowegentrpoajsv" + }, + "createdByType": { + "$id": "5170", + "kind": "string", + "type": { + "$ref": "328" + }, + "value": "User" + }, + "createdAt": { + "$id": "5171", + "kind": "string", + "type": { + "$ref": "456" + }, + "value": "2024-04-29T21:51:44.043Z" + }, + "lastModifiedBy": { + "$id": "5172", + "kind": "string", + "type": { + "$ref": "461" + }, + "value": "edwuayhhaoepxzisfaqjhmrxjq" + }, + "lastModifiedByType": { + "$id": "5173", + "kind": "string", + "type": { + "$ref": "328" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "5174", + "kind": "string", + "type": { + "$ref": "468" + }, + "value": "2024-04-29T21:51:44.043Z" + } + } + } + } + } + ] + }, + "nextLink": { + "$id": "5175", + "kind": "string", + "type": { + "$ref": "1626" + }, + "value": "https://microsoft.com/a" + } + } + } + } + ] + } + ] + }, + { + "$id": "5176", + "name": "listVirtualMachineScaleSets", + "resourceName": "VirtualMachineScaleSet", + "doc": "List VirtualMachineScaleSet resources by Fleet", + "accessibility": "public", + "parameters": [ + { + "$id": "5177", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "5178", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "5179", + "type": { + "$id": "5180", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2024-11-01" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5181", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "5182", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "5183", + "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": "5184", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "5185", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5186", + "name": "name", + "nameInRequest": "name", + "doc": "The name of the Fleet", + "type": { + "$id": "5187", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5188", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "5189", + "kind": "constant", + "valueType": { + "$id": "5190", + "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": "5191", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "1630" + }, + "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": "5192", + "itemPropertySegments": [ + "value" + ], + "nextLink": { + "$id": "5193", + "responseSegments": [ + "nextLink" + ], + "responseLocation": "Body" + } + }, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.AzureFleet.Fleets.listVirtualMachineScaleSets", + "decorators": [], + "examples": [ + { + "$id": "5194", + "kind": "http", + "name": "Fleets_ListVirtualMachineScaleSets", + "description": "Fleets_ListVirtualMachineScaleSets", + "filePath": "2024-11-01/Fleets_ListVirtualMachineScaleSets.json", + "parameters": [ + { + "$id": "5195", + "parameter": { + "$ref": "5177" + }, + "value": { + "$id": "5196", + "kind": "string", + "type": { + "$ref": "5178" + }, + "value": "2024-11-01" + } + }, + { + "$id": "5197", + "parameter": { + "$ref": "5181" + }, + "value": { + "$id": "5198", + "kind": "string", + "type": { + "$ref": "5182" + }, + "value": "1DC2F28C-A625-4B0E-9748-9885A3C9E9EB" + } + }, + { + "$id": "5199", + "parameter": { + "$ref": "5184" + }, + "value": { + "$id": "5200", + "kind": "string", + "type": { + "$ref": "5185" + }, + "value": "rgazurefleet" + } + }, + { + "$id": "5201", + "parameter": { + "$ref": "5186" + }, + "value": { + "$id": "5202", + "kind": "string", + "type": { + "$ref": "5187" + }, + "value": "myFleet" + } + } + ], + "responses": [ + { + "$id": "5203", + "response": { + "$ref": "5191" + }, + "statusCode": 200, + "bodyValue": { + "$id": "5204", + "kind": "model", + "type": { + "$ref": "1630" + }, + "value": { + "$id": "5205", + "value": { + "$id": "5206", + "kind": "array", + "type": { + "$ref": "1632" + }, + "value": [ + { + "$id": "5207", + "kind": "model", + "type": { + "$ref": "1633" + }, + "value": { + "$id": "5208", + "id": { + "$id": "5209", + "kind": "string", + "type": { + "$ref": "1635" + }, + "value": "/subscriptions/7B0CD4DB-3381-4013-9B31-FB6E6FD0FF1C/resourceGroups/rgazurefleet/providers/Microsoft.AzureFleet/fleets/myFleet/virtualMachineScaleSets/myVmss" + }, + "type": { + "$id": "5210", + "kind": "string", + "type": { + "$ref": "1640" + }, + "value": "Microsoft.AzureFleet/fleets/virtualMachineScaleSets" + }, + "operationStatus": { + "$id": "5211", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Creating" + }, + "error": { + "$id": "5212", + "kind": "model", + "type": { + "$ref": "1647" + }, + "value": { + "$id": "5213", + "details": { + "$id": "5214", + "kind": "array", + "type": { + "$ref": "1661" + }, + "value": [ + { + "$id": "5215", + "kind": "model", + "type": { + "$ref": "1662" + }, + "value": { + "$id": "5216", + "code": { + "$id": "5217", + "kind": "string", + "type": { + "$ref": "1664" + }, + "value": "gzhtOverconstrainedAllocationRequestyosk" + }, + "target": { + "$id": "5218", + "kind": "string", + "type": { + "$ref": "1668" + }, + "value": "qfthabhrmndhfizfnrwpgxvnokpy" + }, + "message": { + "$id": "5219", + "kind": "string", + "type": { + "$ref": "1672" + }, + "value": "Allocation Failed" + } + } + } + ] + }, + "innererror": { + "$id": "5220", + "kind": "model", + "type": { + "$ref": "1678" + }, + "value": { + "$id": "5221", + "exceptionType": { + "$id": "5222", + "kind": "string", + "type": { + "$ref": "1680" + }, + "value": "sfaomfpoaptnbxchrfskm" + }, + "errorDetail": { + "$id": "5223", + "kind": "string", + "type": { + "$ref": "1684" + }, + "value": "ihjwbwykq" + } + } + }, + "code": { + "$id": "5224", + "kind": "string", + "type": { + "$ref": "1649" + }, + "value": "OverconstrainedAllocationRequest" + }, + "target": { + "$id": "5225", + "kind": "string", + "type": { + "$ref": "1653" + }, + "value": "nhaj" + }, + "message": { + "$id": "5226", + "kind": "string", + "type": { + "$ref": "1657" + }, + "value": "Allocation Failed" + } + } + } + } + } + ] + } + } + } + } + ] + } + ] + } + ], + "parameters": [ + { + "$id": "5227", + "name": "endpoint", + "nameInRequest": "endpoint", + "doc": "Service host", + "type": { + "$id": "5228", + "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": "5229", + "type": { + "$id": "5230", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "https://management.azure.com" + } + } + ], + "decorators": [ + { + "$id": "5231", + "name": "Azure.ResourceManager.@armResourceOperations", + "arguments": { + "$id": "5232" + } + } + ], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.Fleets", + "apiVersions": [ + "2023-11-01-preview", + "2024-05-01-preview", + "2024-11-01" + ], + "parent": { + "$ref": "1697" + } + } + ] + } + ], + "auth": { + "$id": "5233", + "oAuth2": { + "$id": "5234", + "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..b4c91675a841 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: 6e702986ee542ebd38d0ab2e2f2c00ab48a50b45 +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..5daab0f7f8b2 --- /dev/null +++ b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/tspCodeModel.json @@ -0,0 +1,9042 @@ +{ + "$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.", + "operations": [], + "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", + "operations": [ + { + "$id": "499", + "name": "list", + "resourceName": "Operations", + "doc": "List the operations for the provider", + "accessibility": "public", + "parameters": [ + { + "$id": "500", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "501", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "502", + "type": { + "$id": "503", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2024-10-01" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "504", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "505", + "kind": "constant", + "valueType": { + "$id": "506", + "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": "507", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "64" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "GET", + "uri": "{endpoint}", + "path": "/providers/Microsoft.ComputeSchedule/operations", + "bufferResponse": true, + "paging": { + "$id": "508", + "itemPropertySegments": [ + "value" + ], + "nextLink": { + "$id": "509", + "responseSegments": [ + "nextLink" + ], + "responseLocation": "Body" + } + }, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Azure.ResourceManager.Operations.list", + "decorators": [], + "examples": [ + { + "$id": "510", + "kind": "http", + "name": "Operations_List", + "description": "Operations_List", + "filePath": "2024-10-01/Operations_List.json", + "parameters": [ + { + "$id": "511", + "parameter": { + "$ref": "500" + }, + "value": { + "$id": "512", + "kind": "string", + "type": { + "$ref": "501" + }, + "value": "2024-10-01" + } + } + ], + "responses": [ + { + "$id": "513", + "response": { + "$ref": "507" + }, + "statusCode": 200, + "bodyValue": { + "$id": "514", + "kind": "model", + "type": { + "$ref": "64" + }, + "value": { + "$id": "515", + "value": { + "$id": "516", + "kind": "array", + "type": { + "$ref": "66" + }, + "value": [ + { + "$id": "517", + "kind": "model", + "type": { + "$ref": "67" + }, + "value": { + "$id": "518", + "name": { + "$id": "519", + "kind": "string", + "type": { + "$ref": "69" + }, + "value": "mtiwosbky" + }, + "isDataAction": { + "$id": "520", + "kind": "boolean", + "type": { + "$ref": "73" + }, + "value": true + }, + "display": { + "$id": "521", + "kind": "model", + "type": { + "$ref": "77" + }, + "value": { + "$id": "522", + "provider": { + "$id": "523", + "kind": "string", + "type": { + "$ref": "79" + }, + "value": "vtlhmqtfhlyllnplzpdpq" + }, + "resource": { + "$id": "524", + "kind": "string", + "type": { + "$ref": "83" + }, + "value": "epj" + }, + "operation": { + "$id": "525", + "kind": "string", + "type": { + "$ref": "87" + }, + "value": "tuneyqwanedwnnbztrmq" + }, + "description": { + "$id": "526", + "kind": "string", + "type": { + "$ref": "91" + }, + "value": "moyje" + } + } + }, + "origin": { + "$id": "527", + "kind": "string", + "type": { + "$ref": "2" + }, + "value": "user" + }, + "actionType": { + "$id": "528", + "kind": "string", + "type": { + "$ref": "10" + }, + "value": "Internal" + } + } + } + ] + }, + "nextLink": { + "$id": "529", + "kind": "string", + "type": { + "$ref": "105" + }, + "value": "https://microsoft.com/a" + } + } + } + } + ] + } + ] + } + ], + "parameters": [ + { + "$id": "530", + "name": "endpoint", + "nameInRequest": "endpoint", + "doc": "Service host", + "type": { + "$id": "531", + "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": "532", + "type": { + "$id": "533", + "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": "534", + "kind": "client", + "name": "ScheduledActions", + "namespace": "Azure.ResourceManager.ComputeSchedule", + "operations": [ + { + "$id": "535", + "name": "SubmitVirtualMachineDeallocate", + "resourceName": "ScheduledActions", + "doc": "VirtualMachinesSubmitDeallocate: Schedule deallocate operation for a batch of virtual machines at datetime in future.", + "accessibility": "public", + "parameters": [ + { + "$id": "536", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "537", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "538", + "type": { + "$id": "539", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2024-10-01" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "540", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "541", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "542", + "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": "543", + "name": "locationparameter", + "nameInRequest": "locationparameter", + "doc": "The location name.", + "type": { + "$id": "544", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "545", + "name": "contentType", + "nameInRequest": "Content-Type", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$id": "546", + "kind": "constant", + "valueType": { + "$id": "547", + "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": "548", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "549", + "kind": "constant", + "valueType": { + "$id": "550", + "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": "551", + "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": "552", + "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": "553", + "kind": "http", + "name": "ScheduledActions_VirtualMachinesSubmitDeallocate", + "description": "ScheduledActions_VirtualMachinesSubmitDeallocate", + "filePath": "2024-10-01/ScheduledActions_VirtualMachinesSubmitDeallocate.json", + "parameters": [ + { + "$id": "554", + "parameter": { + "$ref": "536" + }, + "value": { + "$id": "555", + "kind": "string", + "type": { + "$ref": "537" + }, + "value": "2024-10-01" + } + }, + { + "$id": "556", + "parameter": { + "$ref": "540" + }, + "value": { + "$id": "557", + "kind": "string", + "type": { + "$ref": "541" + }, + "value": "D8E30CC0-2763-4FCC-84A8-3C5659281032" + } + }, + { + "$id": "558", + "parameter": { + "$ref": "543" + }, + "value": { + "$id": "559", + "kind": "string", + "type": { + "$ref": "544" + }, + "value": "eastus2euap" + } + }, + { + "$id": "560", + "parameter": { + "$ref": "551" + }, + "value": { + "$id": "561", + "kind": "model", + "type": { + "$ref": "143" + }, + "value": { + "$id": "562", + "schedule": { + "$id": "563", + "kind": "model", + "type": { + "$ref": "145" + }, + "value": { + "$id": "564", + "deadline": { + "$id": "565", + "kind": "string", + "type": { + "$ref": "147" + }, + "value": "2024-11-01T17:52:54.215Z" + }, + "timezone": { + "$id": "566", + "kind": "string", + "type": { + "$ref": "157" + }, + "value": "UTC" + }, + "deadlineType": { + "$id": "567", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "InitiateAt" + } + } + }, + "executionParameters": { + "$id": "568", + "kind": "model", + "type": { + "$ref": "170" + }, + "value": { + "$id": "569", + "retryPolicy": { + "$id": "570", + "kind": "model", + "type": { + "$ref": "175" + }, + "value": { + "$id": "571", + "retryCount": { + "$id": "572", + "kind": "number", + "type": { + "$ref": "177" + }, + "value": 4 + }, + "retryWindowInMinutes": { + "$id": "573", + "kind": "number", + "type": { + "$ref": "181" + }, + "value": 27 + } + } + } + } + }, + "resources": { + "$id": "574", + "kind": "model", + "type": { + "$ref": "189" + }, + "value": { + "$id": "575", + "ids": { + "$id": "576", + "kind": "array", + "type": { + "$ref": "191" + }, + "value": [ + { + "$id": "577", + "kind": "string", + "type": { + "$ref": "192" + }, + "value": "/subscriptions/YourSubscriptionId/resourceGroups/YourResourceGroupName/providers/Microsoft.Compute/virtualMachines/testResource3" + } + ] + } + } + }, + "correlationid": { + "$id": "578", + "kind": "string", + "type": { + "$ref": "199" + }, + "value": "23480d2f-1dca-4610-afb4-dd25eec1f34r" + } + } + } + } + ], + "responses": [ + { + "$id": "579", + "response": { + "$ref": "552" + }, + "statusCode": 200, + "bodyValue": { + "$id": "580", + "kind": "model", + "type": { + "$ref": "202" + }, + "value": { + "$id": "581", + "type": { + "$id": "582", + "kind": "string", + "type": { + "$ref": "208" + }, + "value": "virtualMachine" + }, + "location": { + "$id": "583", + "kind": "string", + "type": { + "$ref": "212" + }, + "value": "eastus2euap" + }, + "results": { + "$id": "584", + "kind": "array", + "type": { + "$ref": "217" + }, + "value": [ + { + "$id": "585", + "kind": "model", + "type": { + "$ref": "218" + }, + "value": { + "$id": "586", + "resourceId": { + "$id": "587", + "kind": "string", + "type": { + "$ref": "220" + }, + "value": "/subscriptions/YourSubscriptionId/resourceGroups/YourResourceGroupName/providers/Microsoft.Compute/virtualMachines/testResource3" + }, + "errorCode": { + "$id": "588", + "kind": "string", + "type": { + "$ref": "225" + }, + "value": "null" + }, + "errorDetails": { + "$id": "589", + "kind": "string", + "type": { + "$ref": "229" + }, + "value": "null" + }, + "operation": { + "$id": "590", + "kind": "model", + "type": { + "$ref": "233" + }, + "value": { + "$id": "591", + "operationId": { + "$id": "592", + "kind": "string", + "type": { + "$ref": "235" + }, + "value": "23480d2f-1dca-4610-afb4-dd25eec1f34r" + }, + "resourceId": { + "$id": "593", + "kind": "string", + "type": { + "$ref": "239" + }, + "value": "/subscriptions/YourSubscriptionId/resourceGroups/YourResourceGroupName/providers/Microsoft.Compute/virtualMachines/testResource3" + }, + "opType": { + "$id": "594", + "kind": "string", + "type": { + "$ref": "30" + }, + "value": "Deallocate" + }, + "subscriptionId": { + "$id": "595", + "kind": "string", + "type": { + "$ref": "247" + }, + "value": "D8E30CC0-2763-4FCC-84A8-3C5659281032" + }, + "deadline": { + "$id": "596", + "kind": "string", + "type": { + "$ref": "251" + }, + "value": "2024-11-01T17:52:53.667Z" + }, + "deadlineType": { + "$id": "597", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "InitiateAt" + }, + "state": { + "$id": "598", + "kind": "string", + "type": { + "$ref": "40" + }, + "value": "Succeeded" + }, + "timezone": { + "$id": "599", + "kind": "string", + "type": { + "$ref": "262" + }, + "value": "UTC" + }, + "resourceOperationError": { + "$id": "600", + "kind": "model", + "type": { + "$ref": "270" + }, + "value": { + "$id": "601", + "errorCode": { + "$id": "602", + "kind": "string", + "type": { + "$ref": "272" + }, + "value": "null" + }, + "errorDetails": { + "$id": "603", + "kind": "string", + "type": { + "$ref": "276" + }, + "value": "null" + } + } + }, + "completedAt": { + "$id": "604", + "kind": "string", + "type": { + "$ref": "282" + }, + "value": "2024-11-01T17:52:53.668Z" + }, + "retryPolicy": { + "$id": "605", + "kind": "model", + "type": { + "$ref": "175" + }, + "value": { + "$id": "606", + "retryCount": { + "$id": "607", + "kind": "number", + "type": { + "$ref": "177" + }, + "value": 4 + }, + "retryWindowInMinutes": { + "$id": "608", + "kind": "number", + "type": { + "$ref": "181" + }, + "value": 27 + } + } + }, + "timeZone": { + "$id": "609", + "kind": "string", + "type": { + "$ref": "266" + }, + "value": "UTC" + } + } + } + } + } + ] + }, + "description": { + "$id": "610", + "kind": "string", + "type": { + "$ref": "204" + }, + "value": "Deallocate Resource Request" + } + } + } + } + ] + } + ] + }, + { + "$id": "611", + "name": "SubmitVirtualMachineHibernate", + "resourceName": "ScheduledActions", + "doc": "VirtualMachinesSubmitHibernate: Schedule hibernate operation for a batch of virtual machines at datetime in future.", + "accessibility": "public", + "parameters": [ + { + "$id": "612", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "613", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "614", + "type": { + "$id": "615", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2024-10-01" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "616", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "617", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "618", + "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": "619", + "name": "locationparameter", + "nameInRequest": "locationparameter", + "doc": "The location name.", + "type": { + "$id": "620", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "621", + "name": "contentType", + "nameInRequest": "Content-Type", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$id": "622", + "kind": "constant", + "valueType": { + "$id": "623", + "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": "624", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "625", + "kind": "constant", + "valueType": { + "$id": "626", + "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": "627", + "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": "628", + "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": "629", + "kind": "http", + "name": "ScheduledActions_VirtualMachinesSubmitHibernate", + "description": "ScheduledActions_VirtualMachinesSubmitHibernate", + "filePath": "2024-10-01/ScheduledActions_VirtualMachinesSubmitHibernate.json", + "parameters": [ + { + "$id": "630", + "parameter": { + "$ref": "612" + }, + "value": { + "$id": "631", + "kind": "string", + "type": { + "$ref": "613" + }, + "value": "2024-10-01" + } + }, + { + "$id": "632", + "parameter": { + "$ref": "616" + }, + "value": { + "$id": "633", + "kind": "string", + "type": { + "$ref": "617" + }, + "value": "D8E30CC0-2763-4FCC-84A8-3C5659281032" + } + }, + { + "$id": "634", + "parameter": { + "$ref": "619" + }, + "value": { + "$id": "635", + "kind": "string", + "type": { + "$ref": "620" + }, + "value": "eastus2euap" + } + }, + { + "$id": "636", + "parameter": { + "$ref": "627" + }, + "value": { + "$id": "637", + "kind": "model", + "type": { + "$ref": "293" + }, + "value": { + "$id": "638", + "schedule": { + "$id": "639", + "kind": "model", + "type": { + "$ref": "145" + }, + "value": { + "$id": "640", + "deadline": { + "$id": "641", + "kind": "string", + "type": { + "$ref": "147" + }, + "value": "2024-11-01T17:52:54.215Z" + }, + "timezone": { + "$id": "642", + "kind": "string", + "type": { + "$ref": "157" + }, + "value": "UTC" + }, + "deadlineType": { + "$id": "643", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "InitiateAt" + } + } + }, + "executionParameters": { + "$id": "644", + "kind": "model", + "type": { + "$ref": "170" + }, + "value": { + "$id": "645", + "retryPolicy": { + "$id": "646", + "kind": "model", + "type": { + "$ref": "175" + }, + "value": { + "$id": "647", + "retryCount": { + "$id": "648", + "kind": "number", + "type": { + "$ref": "177" + }, + "value": 2 + }, + "retryWindowInMinutes": { + "$id": "649", + "kind": "number", + "type": { + "$ref": "181" + }, + "value": 27 + } + } + } + } + }, + "resources": { + "$id": "650", + "kind": "model", + "type": { + "$ref": "189" + }, + "value": { + "$id": "651", + "ids": { + "$id": "652", + "kind": "array", + "type": { + "$ref": "191" + }, + "value": [ + { + "$id": "653", + "kind": "string", + "type": { + "$ref": "192" + }, + "value": "/subscriptions/YourSubscriptionId/resourceGroups/YourResourceGroupName/providers/Microsoft.Compute/virtualMachines/testResource3" + } + ] + } + } + }, + "correlationid": { + "$id": "654", + "kind": "string", + "type": { + "$ref": "304" + }, + "value": "23480d2f-1dca-4610-afb4-dd25eec1f34r" + } + } + } + } + ], + "responses": [ + { + "$id": "655", + "response": { + "$ref": "628" + }, + "statusCode": 200, + "bodyValue": { + "$id": "656", + "kind": "model", + "type": { + "$ref": "307" + }, + "value": { + "$id": "657", + "type": { + "$id": "658", + "kind": "string", + "type": { + "$ref": "313" + }, + "value": "virtualMachine" + }, + "location": { + "$id": "659", + "kind": "string", + "type": { + "$ref": "317" + }, + "value": "eastus2euap" + }, + "results": { + "$id": "660", + "kind": "array", + "type": { + "$ref": "322" + }, + "value": [ + { + "$id": "661", + "kind": "model", + "type": { + "$ref": "218" + }, + "value": { + "$id": "662", + "resourceId": { + "$id": "663", + "kind": "string", + "type": { + "$ref": "220" + }, + "value": "/subscriptions/YourSubscriptionId/resourceGroups/YourResourceGroupName/providers/Microsoft.Compute/virtualMachines/testResource3" + }, + "errorCode": { + "$id": "664", + "kind": "string", + "type": { + "$ref": "225" + }, + "value": "null" + }, + "errorDetails": { + "$id": "665", + "kind": "string", + "type": { + "$ref": "229" + }, + "value": "null" + }, + "operation": { + "$id": "666", + "kind": "model", + "type": { + "$ref": "233" + }, + "value": { + "$id": "667", + "operationId": { + "$id": "668", + "kind": "string", + "type": { + "$ref": "235" + }, + "value": "23480d2f-1dca-4610-afb4-dd25eec1f34r" + }, + "resourceId": { + "$id": "669", + "kind": "string", + "type": { + "$ref": "239" + }, + "value": "/subscriptions/YourSubscriptionId/resourceGroups/YourResourceGroupName/providers/Microsoft.Compute/virtualMachines/testResource3" + }, + "opType": { + "$id": "670", + "kind": "string", + "type": { + "$ref": "30" + }, + "value": "Hibernate" + }, + "subscriptionId": { + "$id": "671", + "kind": "string", + "type": { + "$ref": "247" + }, + "value": "D8E30CC0-2763-4FCC-84A8-3C5659281032" + }, + "deadline": { + "$id": "672", + "kind": "string", + "type": { + "$ref": "251" + }, + "value": "2024-11-01T17:52:53.667Z" + }, + "deadlineType": { + "$id": "673", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "InitiateAt" + }, + "state": { + "$id": "674", + "kind": "string", + "type": { + "$ref": "40" + }, + "value": "Succeeded" + }, + "timezone": { + "$id": "675", + "kind": "string", + "type": { + "$ref": "262" + }, + "value": "UTC" + }, + "resourceOperationError": { + "$id": "676", + "kind": "model", + "type": { + "$ref": "270" + }, + "value": { + "$id": "677", + "errorCode": { + "$id": "678", + "kind": "string", + "type": { + "$ref": "272" + }, + "value": "null" + }, + "errorDetails": { + "$id": "679", + "kind": "string", + "type": { + "$ref": "276" + }, + "value": "null" + } + } + }, + "completedAt": { + "$id": "680", + "kind": "string", + "type": { + "$ref": "282" + }, + "value": "2024-11-01T17:52:53.668Z" + }, + "retryPolicy": { + "$id": "681", + "kind": "model", + "type": { + "$ref": "175" + }, + "value": { + "$id": "682", + "retryCount": { + "$id": "683", + "kind": "number", + "type": { + "$ref": "177" + }, + "value": 2 + }, + "retryWindowInMinutes": { + "$id": "684", + "kind": "number", + "type": { + "$ref": "181" + }, + "value": 27 + } + } + }, + "timeZone": { + "$id": "685", + "kind": "string", + "type": { + "$ref": "266" + }, + "value": "UTC" + } + } + } + } + } + ] + }, + "description": { + "$id": "686", + "kind": "string", + "type": { + "$ref": "309" + }, + "value": "Hibernate Resource Request" + } + } + } + } + ] + } + ] + }, + { + "$id": "687", + "name": "SubmitVirtualMachineStart", + "resourceName": "ScheduledActions", + "doc": "VirtualMachinesSubmitStart: Schedule start operation for a batch of virtual machines at datetime in future.", + "accessibility": "public", + "parameters": [ + { + "$id": "688", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "689", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "690", + "type": { + "$id": "691", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2024-10-01" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "692", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "693", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "694", + "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": "695", + "name": "locationparameter", + "nameInRequest": "locationparameter", + "doc": "The location name.", + "type": { + "$id": "696", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "697", + "name": "contentType", + "nameInRequest": "Content-Type", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$id": "698", + "kind": "constant", + "valueType": { + "$id": "699", + "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": "700", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "701", + "kind": "constant", + "valueType": { + "$id": "702", + "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": "703", + "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": "704", + "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": "705", + "kind": "http", + "name": "ScheduledActions_VirtualMachinesSubmitStart", + "description": "ScheduledActions_VirtualMachinesSubmitStart", + "filePath": "2024-10-01/ScheduledActions_VirtualMachinesSubmitStart.json", + "parameters": [ + { + "$id": "706", + "parameter": { + "$ref": "688" + }, + "value": { + "$id": "707", + "kind": "string", + "type": { + "$ref": "689" + }, + "value": "2024-10-01" + } + }, + { + "$id": "708", + "parameter": { + "$ref": "692" + }, + "value": { + "$id": "709", + "kind": "string", + "type": { + "$ref": "693" + }, + "value": "D8E30CC0-2763-4FCC-84A8-3C5659281032" + } + }, + { + "$id": "710", + "parameter": { + "$ref": "695" + }, + "value": { + "$id": "711", + "kind": "string", + "type": { + "$ref": "696" + }, + "value": "eastus2euap" + } + }, + { + "$id": "712", + "parameter": { + "$ref": "703" + }, + "value": { + "$id": "713", + "kind": "model", + "type": { + "$ref": "325" + }, + "value": { + "$id": "714", + "schedule": { + "$id": "715", + "kind": "model", + "type": { + "$ref": "145" + }, + "value": { + "$id": "716", + "deadline": { + "$id": "717", + "kind": "string", + "type": { + "$ref": "147" + }, + "value": "2024-11-01T17:52:54.215Z" + }, + "timezone": { + "$id": "718", + "kind": "string", + "type": { + "$ref": "157" + }, + "value": "UTC" + }, + "deadlineType": { + "$id": "719", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "InitiateAt" + } + } + }, + "executionParameters": { + "$id": "720", + "kind": "model", + "type": { + "$ref": "170" + }, + "value": { + "$id": "721", + "retryPolicy": { + "$id": "722", + "kind": "model", + "type": { + "$ref": "175" + }, + "value": { + "$id": "723", + "retryCount": { + "$id": "724", + "kind": "number", + "type": { + "$ref": "177" + }, + "value": 5 + }, + "retryWindowInMinutes": { + "$id": "725", + "kind": "number", + "type": { + "$ref": "181" + }, + "value": 27 + } + } + } + } + }, + "resources": { + "$id": "726", + "kind": "model", + "type": { + "$ref": "189" + }, + "value": { + "$id": "727", + "ids": { + "$id": "728", + "kind": "array", + "type": { + "$ref": "191" + }, + "value": [ + { + "$id": "729", + "kind": "string", + "type": { + "$ref": "192" + }, + "value": "/subscriptions/YourSubscriptionId/resourceGroups/YourResourceGroupName/providers/Microsoft.Compute/virtualMachines/testResource3" + } + ] + } + } + }, + "correlationid": { + "$id": "730", + "kind": "string", + "type": { + "$ref": "336" + }, + "value": "23480d2f-1dca-4610-afb4-dd25eec1f34r" + } + } + } + } + ], + "responses": [ + { + "$id": "731", + "response": { + "$ref": "704" + }, + "statusCode": 200, + "bodyValue": { + "$id": "732", + "kind": "model", + "type": { + "$ref": "339" + }, + "value": { + "$id": "733", + "type": { + "$id": "734", + "kind": "string", + "type": { + "$ref": "345" + }, + "value": "virtualMachine" + }, + "location": { + "$id": "735", + "kind": "string", + "type": { + "$ref": "349" + }, + "value": "eastus2euap" + }, + "results": { + "$id": "736", + "kind": "array", + "type": { + "$ref": "354" + }, + "value": [ + { + "$id": "737", + "kind": "model", + "type": { + "$ref": "218" + }, + "value": { + "$id": "738", + "resourceId": { + "$id": "739", + "kind": "string", + "type": { + "$ref": "220" + }, + "value": "/subscriptions/YourSubscriptionId/resourceGroups/YourResourceGroupName/providers/Microsoft.Compute/virtualMachines/testResource3" + }, + "errorCode": { + "$id": "740", + "kind": "string", + "type": { + "$ref": "225" + }, + "value": "null" + }, + "errorDetails": { + "$id": "741", + "kind": "string", + "type": { + "$ref": "229" + }, + "value": "null" + }, + "operation": { + "$id": "742", + "kind": "model", + "type": { + "$ref": "233" + }, + "value": { + "$id": "743", + "operationId": { + "$id": "744", + "kind": "string", + "type": { + "$ref": "235" + }, + "value": "23480d2f-1dca-4610-afb4-dd25eec1f34r" + }, + "resourceId": { + "$id": "745", + "kind": "string", + "type": { + "$ref": "239" + }, + "value": "/subscriptions/YourSubscriptionId/resourceGroups/YourResourceGroupName/providers/Microsoft.Compute/virtualMachines/testResource3" + }, + "opType": { + "$id": "746", + "kind": "string", + "type": { + "$ref": "30" + }, + "value": "Start" + }, + "subscriptionId": { + "$id": "747", + "kind": "string", + "type": { + "$ref": "247" + }, + "value": "D8E30CC0-2763-4FCC-84A8-3C5659281032" + }, + "deadline": { + "$id": "748", + "kind": "string", + "type": { + "$ref": "251" + }, + "value": "2024-11-01T17:52:53.667Z" + }, + "deadlineType": { + "$id": "749", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "InitiateAt" + }, + "state": { + "$id": "750", + "kind": "string", + "type": { + "$ref": "40" + }, + "value": "Succeeded" + }, + "timezone": { + "$id": "751", + "kind": "string", + "type": { + "$ref": "262" + }, + "value": "UTC" + }, + "resourceOperationError": { + "$id": "752", + "kind": "model", + "type": { + "$ref": "270" + }, + "value": { + "$id": "753", + "errorCode": { + "$id": "754", + "kind": "string", + "type": { + "$ref": "272" + }, + "value": "null" + }, + "errorDetails": { + "$id": "755", + "kind": "string", + "type": { + "$ref": "276" + }, + "value": "null" + } + } + }, + "completedAt": { + "$id": "756", + "kind": "string", + "type": { + "$ref": "282" + }, + "value": "2024-11-01T17:52:53.668Z" + }, + "retryPolicy": { + "$id": "757", + "kind": "model", + "type": { + "$ref": "175" + }, + "value": { + "$id": "758", + "retryCount": { + "$id": "759", + "kind": "number", + "type": { + "$ref": "177" + }, + "value": 5 + }, + "retryWindowInMinutes": { + "$id": "760", + "kind": "number", + "type": { + "$ref": "181" + }, + "value": 27 + } + } + }, + "timeZone": { + "$id": "761", + "kind": "string", + "type": { + "$ref": "266" + }, + "value": "UTC" + } + } + } + } + } + ] + }, + "description": { + "$id": "762", + "kind": "string", + "type": { + "$ref": "341" + }, + "value": "Start Resource Request" + } + } + } + } + ] + } + ] + }, + { + "$id": "763", + "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": "764", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "765", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "766", + "type": { + "$id": "767", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2024-10-01" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "768", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "769", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "770", + "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": "771", + "name": "locationparameter", + "nameInRequest": "locationparameter", + "doc": "The location name.", + "type": { + "$id": "772", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "773", + "name": "contentType", + "nameInRequest": "Content-Type", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$id": "774", + "kind": "constant", + "valueType": { + "$id": "775", + "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": "776", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "777", + "kind": "constant", + "valueType": { + "$id": "778", + "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": "779", + "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": "780", + "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": "781", + "kind": "http", + "name": "ScheduledActions_VirtualMachinesExecuteDeallocate", + "description": "ScheduledActions_VirtualMachinesExecuteDeallocate", + "filePath": "2024-10-01/ScheduledActions_VirtualMachinesExecuteDeallocate.json", + "parameters": [ + { + "$id": "782", + "parameter": { + "$ref": "764" + }, + "value": { + "$id": "783", + "kind": "string", + "type": { + "$ref": "765" + }, + "value": "2024-10-01" + } + }, + { + "$id": "784", + "parameter": { + "$ref": "768" + }, + "value": { + "$id": "785", + "kind": "string", + "type": { + "$ref": "769" + }, + "value": "D8E30CC0-2763-4FCC-84A8-3C5659281032" + } + }, + { + "$id": "786", + "parameter": { + "$ref": "771" + }, + "value": { + "$id": "787", + "kind": "string", + "type": { + "$ref": "772" + }, + "value": "eastus2euap" + } + }, + { + "$id": "788", + "parameter": { + "$ref": "779" + }, + "value": { + "$id": "789", + "kind": "model", + "type": { + "$ref": "357" + }, + "value": { + "$id": "790", + "executionParameters": { + "$id": "791", + "kind": "model", + "type": { + "$ref": "170" + }, + "value": { + "$id": "792", + "retryPolicy": { + "$id": "793", + "kind": "model", + "type": { + "$ref": "175" + }, + "value": { + "$id": "794", + "retryCount": { + "$id": "795", + "kind": "number", + "type": { + "$ref": "177" + }, + "value": 4 + }, + "retryWindowInMinutes": { + "$id": "796", + "kind": "number", + "type": { + "$ref": "181" + }, + "value": 27 + } + } + } + } + }, + "resources": { + "$id": "797", + "kind": "model", + "type": { + "$ref": "189" + }, + "value": { + "$id": "798", + "ids": { + "$id": "799", + "kind": "array", + "type": { + "$ref": "191" + }, + "value": [ + { + "$id": "800", + "kind": "string", + "type": { + "$ref": "192" + }, + "value": "/subscriptions/YourSubscriptionId/resourceGroups/YourResourceGroupName/providers/Microsoft.Compute/virtualMachines/testResource3" + } + ] + } + } + }, + "correlationid": { + "$id": "801", + "kind": "string", + "type": { + "$ref": "365" + }, + "value": "23480d2f-1dca-4610-afb4-dd25eec1f34r" + } + } + } + } + ], + "responses": [ + { + "$id": "802", + "response": { + "$ref": "780" + }, + "statusCode": 200, + "bodyValue": { + "$id": "803", + "kind": "model", + "type": { + "$ref": "202" + }, + "value": { + "$id": "804", + "type": { + "$id": "805", + "kind": "string", + "type": { + "$ref": "208" + }, + "value": "VirtualMachine" + }, + "location": { + "$id": "806", + "kind": "string", + "type": { + "$ref": "212" + }, + "value": "eastus2euap" + }, + "results": { + "$id": "807", + "kind": "array", + "type": { + "$ref": "217" + }, + "value": [ + { + "$id": "808", + "kind": "model", + "type": { + "$ref": "218" + }, + "value": { + "$id": "809", + "resourceId": { + "$id": "810", + "kind": "string", + "type": { + "$ref": "220" + }, + "value": "/subscriptions/YourSubscriptionId/resourceGroups/YourResourceGroupName/providers/Microsoft.Compute/virtualMachines/testResource3" + }, + "errorCode": { + "$id": "811", + "kind": "string", + "type": { + "$ref": "225" + }, + "value": "null" + }, + "errorDetails": { + "$id": "812", + "kind": "string", + "type": { + "$ref": "229" + }, + "value": "null" + }, + "operation": { + "$id": "813", + "kind": "model", + "type": { + "$ref": "233" + }, + "value": { + "$id": "814", + "operationId": { + "$id": "815", + "kind": "string", + "type": { + "$ref": "235" + }, + "value": "23480d2f-1dca-4610-afb4-dd25eec1f34r" + }, + "resourceId": { + "$id": "816", + "kind": "string", + "type": { + "$ref": "239" + }, + "value": "/subscriptions/YourSubscriptionId/resourceGroups/YourResourceGroupName/providers/Microsoft.Compute/virtualMachines/testResource3" + }, + "opType": { + "$id": "817", + "kind": "string", + "type": { + "$ref": "30" + }, + "value": "Deallocate" + }, + "subscriptionId": { + "$id": "818", + "kind": "string", + "type": { + "$ref": "247" + }, + "value": "D8E30CC0-2763-4FCC-84A8-3C5659281032" + }, + "deadline": { + "$id": "819", + "kind": "string", + "type": { + "$ref": "251" + }, + "value": "2024-11-01T17:52:53.667Z" + }, + "deadlineType": { + "$id": "820", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "InitiateAt" + }, + "state": { + "$id": "821", + "kind": "string", + "type": { + "$ref": "40" + }, + "value": "Succeeded" + }, + "timezone": { + "$id": "822", + "kind": "string", + "type": { + "$ref": "262" + }, + "value": "UTC" + }, + "resourceOperationError": { + "$id": "823", + "kind": "model", + "type": { + "$ref": "270" + }, + "value": { + "$id": "824", + "errorCode": { + "$id": "825", + "kind": "string", + "type": { + "$ref": "272" + }, + "value": "null" + }, + "errorDetails": { + "$id": "826", + "kind": "string", + "type": { + "$ref": "276" + }, + "value": "null" + } + } + }, + "completedAt": { + "$id": "827", + "kind": "string", + "type": { + "$ref": "282" + }, + "value": "2024-11-01T17:52:53.668Z" + }, + "retryPolicy": { + "$id": "828", + "kind": "model", + "type": { + "$ref": "175" + }, + "value": { + "$id": "829", + "retryCount": { + "$id": "830", + "kind": "number", + "type": { + "$ref": "177" + }, + "value": 4 + }, + "retryWindowInMinutes": { + "$id": "831", + "kind": "number", + "type": { + "$ref": "181" + }, + "value": 27 + } + } + }, + "timeZone": { + "$id": "832", + "kind": "string", + "type": { + "$ref": "266" + }, + "value": "UTC" + } + } + } + } + } + ] + }, + "description": { + "$id": "833", + "kind": "string", + "type": { + "$ref": "204" + }, + "value": "Deallocate Resource Request" + } + } + } + } + ] + } + ] + }, + { + "$id": "834", + "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": "835", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "836", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "837", + "type": { + "$id": "838", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2024-10-01" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "839", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "840", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "841", + "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": "842", + "name": "locationparameter", + "nameInRequest": "locationparameter", + "doc": "The location name.", + "type": { + "$id": "843", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "844", + "name": "contentType", + "nameInRequest": "Content-Type", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$id": "845", + "kind": "constant", + "valueType": { + "$id": "846", + "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": "847", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "848", + "kind": "constant", + "valueType": { + "$id": "849", + "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": "850", + "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": "851", + "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": "852", + "kind": "http", + "name": "ScheduledActions_VirtualMachinesExecuteHibernate", + "description": "ScheduledActions_VirtualMachinesExecuteHibernate", + "filePath": "2024-10-01/ScheduledActions_VirtualMachinesExecuteHibernate.json", + "parameters": [ + { + "$id": "853", + "parameter": { + "$ref": "835" + }, + "value": { + "$id": "854", + "kind": "string", + "type": { + "$ref": "836" + }, + "value": "2024-10-01" + } + }, + { + "$id": "855", + "parameter": { + "$ref": "839" + }, + "value": { + "$id": "856", + "kind": "string", + "type": { + "$ref": "840" + }, + "value": "D8E30CC0-2763-4FCC-84A8-3C5659281032" + } + }, + { + "$id": "857", + "parameter": { + "$ref": "842" + }, + "value": { + "$id": "858", + "kind": "string", + "type": { + "$ref": "843" + }, + "value": "eastus2euap" + } + }, + { + "$id": "859", + "parameter": { + "$ref": "850" + }, + "value": { + "$id": "860", + "kind": "model", + "type": { + "$ref": "368" + }, + "value": { + "$id": "861", + "executionParameters": { + "$id": "862", + "kind": "model", + "type": { + "$ref": "170" + }, + "value": { + "$id": "863", + "retryPolicy": { + "$id": "864", + "kind": "model", + "type": { + "$ref": "175" + }, + "value": { + "$id": "865", + "retryCount": { + "$id": "866", + "kind": "number", + "type": { + "$ref": "177" + }, + "value": 5 + }, + "retryWindowInMinutes": { + "$id": "867", + "kind": "number", + "type": { + "$ref": "181" + }, + "value": 27 + } + } + } + } + }, + "resources": { + "$id": "868", + "kind": "model", + "type": { + "$ref": "189" + }, + "value": { + "$id": "869", + "ids": { + "$id": "870", + "kind": "array", + "type": { + "$ref": "191" + }, + "value": [ + { + "$id": "871", + "kind": "string", + "type": { + "$ref": "192" + }, + "value": "/subscriptions/YourSubscriptionId/resourceGroups/YourResourceGroupName/providers/Microsoft.Compute/virtualMachines/testResource3" + } + ] + } + } + }, + "correlationid": { + "$id": "872", + "kind": "string", + "type": { + "$ref": "376" + }, + "value": "23480d2f-1dca-4610-afb4-dd25eec1f34r" + } + } + } + } + ], + "responses": [ + { + "$id": "873", + "response": { + "$ref": "851" + }, + "statusCode": 200, + "bodyValue": { + "$id": "874", + "kind": "model", + "type": { + "$ref": "307" + }, + "value": { + "$id": "875", + "type": { + "$id": "876", + "kind": "string", + "type": { + "$ref": "313" + }, + "value": "VirtualMachine" + }, + "location": { + "$id": "877", + "kind": "string", + "type": { + "$ref": "317" + }, + "value": "eastus2euap" + }, + "results": { + "$id": "878", + "kind": "array", + "type": { + "$ref": "322" + }, + "value": [ + { + "$id": "879", + "kind": "model", + "type": { + "$ref": "218" + }, + "value": { + "$id": "880", + "resourceId": { + "$id": "881", + "kind": "string", + "type": { + "$ref": "220" + }, + "value": "/subscriptions/YourSubscriptionId/resourceGroups/YourResourceGroupName/providers/Microsoft.Compute/virtualMachines/testResource3" + }, + "errorCode": { + "$id": "882", + "kind": "string", + "type": { + "$ref": "225" + }, + "value": "null" + }, + "errorDetails": { + "$id": "883", + "kind": "string", + "type": { + "$ref": "229" + }, + "value": "null" + }, + "operation": { + "$id": "884", + "kind": "model", + "type": { + "$ref": "233" + }, + "value": { + "$id": "885", + "operationId": { + "$id": "886", + "kind": "string", + "type": { + "$ref": "235" + }, + "value": "23480d2f-1dca-4610-afb4-dd25eec1f34r" + }, + "resourceId": { + "$id": "887", + "kind": "string", + "type": { + "$ref": "239" + }, + "value": "/subscriptions/YourSubscriptionId/resourceGroups/YourResourceGroupName/providers/Microsoft.Compute/virtualMachines/testResource3" + }, + "opType": { + "$id": "888", + "kind": "string", + "type": { + "$ref": "30" + }, + "value": "Hibernate" + }, + "subscriptionId": { + "$id": "889", + "kind": "string", + "type": { + "$ref": "247" + }, + "value": "D8E30CC0-2763-4FCC-84A8-3C5659281032" + }, + "deadline": { + "$id": "890", + "kind": "string", + "type": { + "$ref": "251" + }, + "value": "2024-11-01T17:52:53.667Z" + }, + "deadlineType": { + "$id": "891", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "InitiateAt" + }, + "state": { + "$id": "892", + "kind": "string", + "type": { + "$ref": "40" + }, + "value": "Succeeded" + }, + "timezone": { + "$id": "893", + "kind": "string", + "type": { + "$ref": "262" + }, + "value": "UTC" + }, + "resourceOperationError": { + "$id": "894", + "kind": "model", + "type": { + "$ref": "270" + }, + "value": { + "$id": "895", + "errorCode": { + "$id": "896", + "kind": "string", + "type": { + "$ref": "272" + }, + "value": "null" + }, + "errorDetails": { + "$id": "897", + "kind": "string", + "type": { + "$ref": "276" + }, + "value": "null" + } + } + }, + "completedAt": { + "$id": "898", + "kind": "string", + "type": { + "$ref": "282" + }, + "value": "2024-11-01T17:52:53.668Z" + }, + "retryPolicy": { + "$id": "899", + "kind": "model", + "type": { + "$ref": "175" + }, + "value": { + "$id": "900", + "retryCount": { + "$id": "901", + "kind": "number", + "type": { + "$ref": "177" + }, + "value": 5 + }, + "retryWindowInMinutes": { + "$id": "902", + "kind": "number", + "type": { + "$ref": "181" + }, + "value": 27 + } + } + }, + "timeZone": { + "$id": "903", + "kind": "string", + "type": { + "$ref": "266" + }, + "value": "UTC" + } + } + } + } + } + ] + }, + "description": { + "$id": "904", + "kind": "string", + "type": { + "$ref": "309" + }, + "value": "Hibernate Resource Request" + } + } + } + } + ] + } + ] + }, + { + "$id": "905", + "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": "906", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "907", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "908", + "type": { + "$id": "909", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2024-10-01" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "910", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "911", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "912", + "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": "913", + "name": "locationparameter", + "nameInRequest": "locationparameter", + "doc": "The location name.", + "type": { + "$id": "914", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "915", + "name": "contentType", + "nameInRequest": "Content-Type", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$id": "916", + "kind": "constant", + "valueType": { + "$id": "917", + "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": "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 + }, + { + "$id": "921", + "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": "922", + "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": "923", + "kind": "http", + "name": "ScheduledActions_VirtualMachinesExecuteStart", + "description": "ScheduledActions_VirtualMachinesExecuteStart", + "filePath": "2024-10-01/ScheduledActions_VirtualMachinesExecuteStart.json", + "parameters": [ + { + "$id": "924", + "parameter": { + "$ref": "906" + }, + "value": { + "$id": "925", + "kind": "string", + "type": { + "$ref": "907" + }, + "value": "2024-10-01" + } + }, + { + "$id": "926", + "parameter": { + "$ref": "910" + }, + "value": { + "$id": "927", + "kind": "string", + "type": { + "$ref": "911" + }, + "value": "D8E30CC0-2763-4FCC-84A8-3C5659281032" + } + }, + { + "$id": "928", + "parameter": { + "$ref": "913" + }, + "value": { + "$id": "929", + "kind": "string", + "type": { + "$ref": "914" + }, + "value": "eastus2euap" + } + }, + { + "$id": "930", + "parameter": { + "$ref": "921" + }, + "value": { + "$id": "931", + "kind": "model", + "type": { + "$ref": "379" + }, + "value": { + "$id": "932", + "executionParameters": { + "$id": "933", + "kind": "model", + "type": { + "$ref": "170" + }, + "value": { + "$id": "934", + "retryPolicy": { + "$id": "935", + "kind": "model", + "type": { + "$ref": "175" + }, + "value": { + "$id": "936", + "retryCount": { + "$id": "937", + "kind": "number", + "type": { + "$ref": "177" + }, + "value": 2 + }, + "retryWindowInMinutes": { + "$id": "938", + "kind": "number", + "type": { + "$ref": "181" + }, + "value": 27 + } + } + } + } + }, + "resources": { + "$id": "939", + "kind": "model", + "type": { + "$ref": "189" + }, + "value": { + "$id": "940", + "ids": { + "$id": "941", + "kind": "array", + "type": { + "$ref": "191" + }, + "value": [ + { + "$id": "942", + "kind": "string", + "type": { + "$ref": "192" + }, + "value": "/subscriptions/YourSubscriptionId/resourceGroups/YourResourceGroupName/providers/Microsoft.Compute/virtualMachines/testResource3" + } + ] + } + } + }, + "correlationid": { + "$id": "943", + "kind": "string", + "type": { + "$ref": "387" + }, + "value": "23480d2f-1dca-4610-afb4-dd25eec1f34r" + } + } + } + } + ], + "responses": [ + { + "$id": "944", + "response": { + "$ref": "922" + }, + "statusCode": 200, + "bodyValue": { + "$id": "945", + "kind": "model", + "type": { + "$ref": "339" + }, + "value": { + "$id": "946", + "type": { + "$id": "947", + "kind": "string", + "type": { + "$ref": "345" + }, + "value": "virtualMachine" + }, + "location": { + "$id": "948", + "kind": "string", + "type": { + "$ref": "349" + }, + "value": "eastus2euap" + }, + "results": { + "$id": "949", + "kind": "array", + "type": { + "$ref": "354" + }, + "value": [ + { + "$id": "950", + "kind": "model", + "type": { + "$ref": "218" + }, + "value": { + "$id": "951", + "resourceId": { + "$id": "952", + "kind": "string", + "type": { + "$ref": "220" + }, + "value": "/subscriptions/YourSubscriptionId/resourceGroups/YourResourceGroupName/providers/Microsoft.Compute/virtualMachines/testResource3" + }, + "errorCode": { + "$id": "953", + "kind": "string", + "type": { + "$ref": "225" + }, + "value": "null" + }, + "errorDetails": { + "$id": "954", + "kind": "string", + "type": { + "$ref": "229" + }, + "value": "null" + }, + "operation": { + "$id": "955", + "kind": "model", + "type": { + "$ref": "233" + }, + "value": { + "$id": "956", + "operationId": { + "$id": "957", + "kind": "string", + "type": { + "$ref": "235" + }, + "value": "23480d2f-1dca-4610-afb4-dd25eec1f34r" + }, + "resourceId": { + "$id": "958", + "kind": "string", + "type": { + "$ref": "239" + }, + "value": "/subscriptions/YourSubscriptionId/resourceGroups/YourResourceGroupName/providers/Microsoft.Compute/virtualMachines/testResource3" + }, + "opType": { + "$id": "959", + "kind": "string", + "type": { + "$ref": "30" + }, + "value": "Start" + }, + "subscriptionId": { + "$id": "960", + "kind": "string", + "type": { + "$ref": "247" + }, + "value": "D8E30CC0-2763-4FCC-84A8-3C5659281032" + }, + "deadline": { + "$id": "961", + "kind": "string", + "type": { + "$ref": "251" + }, + "value": "2024-11-01T17:52:53.667Z" + }, + "deadlineType": { + "$id": "962", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "InitiateAt" + }, + "state": { + "$id": "963", + "kind": "string", + "type": { + "$ref": "40" + }, + "value": "Succeeded" + }, + "timezone": { + "$id": "964", + "kind": "string", + "type": { + "$ref": "262" + }, + "value": "UTC" + }, + "resourceOperationError": { + "$id": "965", + "kind": "model", + "type": { + "$ref": "270" + }, + "value": { + "$id": "966", + "errorCode": { + "$id": "967", + "kind": "string", + "type": { + "$ref": "272" + }, + "value": "null" + }, + "errorDetails": { + "$id": "968", + "kind": "string", + "type": { + "$ref": "276" + }, + "value": "null" + } + } + }, + "completedAt": { + "$id": "969", + "kind": "string", + "type": { + "$ref": "282" + }, + "value": "2024-11-01T17:52:53.668Z" + }, + "retryPolicy": { + "$id": "970", + "kind": "model", + "type": { + "$ref": "175" + }, + "value": { + "$id": "971", + "retryCount": { + "$id": "972", + "kind": "number", + "type": { + "$ref": "177" + }, + "value": 2 + }, + "retryWindowInMinutes": { + "$id": "973", + "kind": "number", + "type": { + "$ref": "181" + }, + "value": 27 + } + } + }, + "timeZone": { + "$id": "974", + "kind": "string", + "type": { + "$ref": "266" + }, + "value": "UTC" + } + } + } + } + } + ] + }, + "description": { + "$id": "975", + "kind": "string", + "type": { + "$ref": "341" + }, + "value": "Start Resource Request" + } + } + } + } + ] + } + ] + }, + { + "$id": "976", + "name": "GetVirtualMachineOperationStatus", + "resourceName": "ScheduledActions", + "doc": "VirtualMachinesGetOperationStatus: Polling endpoint to read status of operations performed on virtual machines", + "accessibility": "public", + "parameters": [ + { + "$id": "977", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "978", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "979", + "type": { + "$id": "980", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2024-10-01" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "981", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "982", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "983", + "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": "984", + "name": "locationparameter", + "nameInRequest": "locationparameter", + "doc": "The location name.", + "type": { + "$id": "985", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "986", + "name": "contentType", + "nameInRequest": "Content-Type", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$id": "987", + "kind": "constant", + "valueType": { + "$id": "988", + "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": "989", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "990", + "kind": "constant", + "valueType": { + "$id": "991", + "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": "992", + "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": "993", + "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": "994", + "kind": "http", + "name": "ScheduledActions_VirtualMachinesGetOperationStatus", + "description": "ScheduledActions_VirtualMachinesGetOperationStatus", + "filePath": "2024-10-01/ScheduledActions_VirtualMachinesGetOperationStatus.json", + "parameters": [ + { + "$id": "995", + "parameter": { + "$ref": "977" + }, + "value": { + "$id": "996", + "kind": "string", + "type": { + "$ref": "978" + }, + "value": "2024-10-01" + } + }, + { + "$id": "997", + "parameter": { + "$ref": "981" + }, + "value": { + "$id": "998", + "kind": "string", + "type": { + "$ref": "982" + }, + "value": "D8E30CC0-2763-4FCC-84A8-3C5659281032" + } + }, + { + "$id": "999", + "parameter": { + "$ref": "984" + }, + "value": { + "$id": "1000", + "kind": "string", + "type": { + "$ref": "985" + }, + "value": "eastus2euap" + } + }, + { + "$id": "1001", + "parameter": { + "$ref": "992" + }, + "value": { + "$id": "1002", + "kind": "model", + "type": { + "$ref": "390" + }, + "value": { + "$id": "1003", + "operationIds": { + "$id": "1004", + "kind": "array", + "type": { + "$ref": "392" + }, + "value": [ + { + "$id": "1005", + "kind": "string", + "type": { + "$ref": "393" + }, + "value": "23480d2f-1dca-4610-afb4-dd25eec1f34r" + } + ] + }, + "correlationid": { + "$id": "1006", + "kind": "string", + "type": { + "$ref": "397" + }, + "value": "35780d2f-1dca-4610-afb4-dd25eec1f34r" + } + } + } + } + ], + "responses": [ + { + "$id": "1007", + "response": { + "$ref": "993" + }, + "statusCode": 200, + "bodyValue": { + "$id": "1008", + "kind": "model", + "type": { + "$ref": "400" + }, + "value": { + "$id": "1009", + "results": { + "$id": "1010", + "kind": "array", + "type": { + "$ref": "402" + }, + "value": [ + { + "$id": "1011", + "kind": "model", + "type": { + "$ref": "218" + }, + "value": { + "$id": "1012", + "resourceId": { + "$id": "1013", + "kind": "string", + "type": { + "$ref": "220" + }, + "value": "/subscriptions/YourSubscriptionId/resourceGroups/YourResourceGroupName/providers/Microsoft.Compute/virtualMachines/testResource3" + }, + "errorCode": { + "$id": "1014", + "kind": "string", + "type": { + "$ref": "225" + }, + "value": "null" + }, + "errorDetails": { + "$id": "1015", + "kind": "string", + "type": { + "$ref": "229" + }, + "value": "null" + }, + "operation": { + "$id": "1016", + "kind": "model", + "type": { + "$ref": "233" + }, + "value": { + "$id": "1017", + "operationId": { + "$id": "1018", + "kind": "string", + "type": { + "$ref": "235" + }, + "value": "23480d2f-1dca-4610-afb4-dd25eec1f34r" + }, + "resourceId": { + "$id": "1019", + "kind": "string", + "type": { + "$ref": "239" + }, + "value": "/subscriptions/YourSubscriptionId/resourceGroups/YourResourceGroupName/providers/Microsoft.Compute/virtualMachines/testResource3" + }, + "opType": { + "$id": "1020", + "kind": "string", + "type": { + "$ref": "30" + }, + "value": "Deallocate" + }, + "subscriptionId": { + "$id": "1021", + "kind": "string", + "type": { + "$ref": "247" + }, + "value": "D8E30CC0-2763-4FCC-84A8-3C5659281032" + }, + "deadline": { + "$id": "1022", + "kind": "string", + "type": { + "$ref": "251" + }, + "value": "2024-11-01T17:52:53.667Z" + }, + "deadlineType": { + "$id": "1023", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "InitiateAt" + }, + "state": { + "$id": "1024", + "kind": "string", + "type": { + "$ref": "40" + }, + "value": "Succeeded" + }, + "timezone": { + "$id": "1025", + "kind": "string", + "type": { + "$ref": "262" + }, + "value": "UTC" + }, + "resourceOperationError": { + "$id": "1026", + "kind": "model", + "type": { + "$ref": "270" + }, + "value": { + "$id": "1027", + "errorCode": { + "$id": "1028", + "kind": "string", + "type": { + "$ref": "272" + }, + "value": "null" + }, + "errorDetails": { + "$id": "1029", + "kind": "string", + "type": { + "$ref": "276" + }, + "value": "null" + } + } + }, + "completedAt": { + "$id": "1030", + "kind": "string", + "type": { + "$ref": "282" + }, + "value": "2024-11-01T17:52:53.668Z" + }, + "retryPolicy": { + "$id": "1031", + "kind": "model", + "type": { + "$ref": "175" + }, + "value": { + "$id": "1032", + "retryCount": { + "$id": "1033", + "kind": "number", + "type": { + "$ref": "177" + }, + "value": 4 + }, + "retryWindowInMinutes": { + "$id": "1034", + "kind": "number", + "type": { + "$ref": "181" + }, + "value": 27 + } + } + }, + "timeZone": { + "$id": "1035", + "kind": "string", + "type": { + "$ref": "266" + }, + "value": "UTC" + } + } + } + } + } + ] + } + } + } + } + ] + } + ] + }, + { + "$id": "1036", + "name": "CancelVirtualMachineOperations", + "resourceName": "ScheduledActions", + "doc": "VirtualMachinesCancelOperations: Cancel a previously submitted (start/deallocate/hibernate) request", + "accessibility": "public", + "parameters": [ + { + "$id": "1037", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "1038", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "1039", + "type": { + "$id": "1040", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2024-10-01" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1041", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "1042", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "1043", + "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": "1044", + "name": "locationparameter", + "nameInRequest": "locationparameter", + "doc": "The location name.", + "type": { + "$id": "1045", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1046", + "name": "contentType", + "nameInRequest": "Content-Type", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$id": "1047", + "kind": "constant", + "valueType": { + "$id": "1048", + "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": "1049", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "1050", + "kind": "constant", + "valueType": { + "$id": "1051", + "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": "1052", + "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": "1053", + "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": "1054", + "kind": "http", + "name": "ScheduledActions_VirtualMachinesCancelOperations", + "description": "ScheduledActions_VirtualMachinesCancelOperations", + "filePath": "2024-10-01/ScheduledActions_VirtualMachinesCancelOperations.json", + "parameters": [ + { + "$id": "1055", + "parameter": { + "$ref": "1037" + }, + "value": { + "$id": "1056", + "kind": "string", + "type": { + "$ref": "1038" + }, + "value": "2024-10-01" + } + }, + { + "$id": "1057", + "parameter": { + "$ref": "1041" + }, + "value": { + "$id": "1058", + "kind": "string", + "type": { + "$ref": "1042" + }, + "value": "D8E30CC0-2763-4FCC-84A8-3C5659281032" + } + }, + { + "$id": "1059", + "parameter": { + "$ref": "1044" + }, + "value": { + "$id": "1060", + "kind": "string", + "type": { + "$ref": "1045" + }, + "value": "eastus2euap" + } + }, + { + "$id": "1061", + "parameter": { + "$ref": "1052" + }, + "value": { + "$id": "1062", + "kind": "model", + "type": { + "$ref": "405" + }, + "value": { + "$id": "1063", + "operationIds": { + "$id": "1064", + "kind": "array", + "type": { + "$ref": "407" + }, + "value": [ + { + "$id": "1065", + "kind": "string", + "type": { + "$ref": "408" + }, + "value": "23480d2f-1dca-4610-afb4-dd25eec1f34r" + } + ] + }, + "correlationid": { + "$id": "1066", + "kind": "string", + "type": { + "$ref": "412" + }, + "value": "23480d2f-1dca-4610-afb4-gg25eec1f34r" + } + } + } + } + ], + "responses": [ + { + "$id": "1067", + "response": { + "$ref": "1053" + }, + "statusCode": 200, + "bodyValue": { + "$id": "1068", + "kind": "model", + "type": { + "$ref": "415" + }, + "value": { + "$id": "1069", + "results": { + "$id": "1070", + "kind": "array", + "type": { + "$ref": "417" + }, + "value": [ + { + "$id": "1071", + "kind": "model", + "type": { + "$ref": "218" + }, + "value": { + "$id": "1072", + "resourceId": { + "$id": "1073", + "kind": "string", + "type": { + "$ref": "220" + }, + "value": "/subscriptions/YourSubscriptionId/resourceGroups/YourResourceGroupName/providers/Microsoft.Compute/virtualMachines/testResource3" + }, + "errorCode": { + "$id": "1074", + "kind": "string", + "type": { + "$ref": "225" + }, + "value": "null" + }, + "errorDetails": { + "$id": "1075", + "kind": "string", + "type": { + "$ref": "229" + }, + "value": "null" + }, + "operation": { + "$id": "1076", + "kind": "model", + "type": { + "$ref": "233" + }, + "value": { + "$id": "1077", + "operationId": { + "$id": "1078", + "kind": "string", + "type": { + "$ref": "235" + }, + "value": "23480d2f-1dca-4610-afb4-dd25eec1f34r" + }, + "resourceId": { + "$id": "1079", + "kind": "string", + "type": { + "$ref": "239" + }, + "value": "/subscriptions/YourSubscriptionId/resourceGroups/YourResourceGroupName/providers/Microsoft.Compute/virtualMachines/testResource3" + }, + "opType": { + "$id": "1080", + "kind": "string", + "type": { + "$ref": "30" + }, + "value": "Deallocate" + }, + "subscriptionId": { + "$id": "1081", + "kind": "string", + "type": { + "$ref": "247" + }, + "value": "D8E30CC0-2763-4FCC-84A8-3C5659281032" + }, + "deadline": { + "$id": "1082", + "kind": "string", + "type": { + "$ref": "251" + }, + "value": "2024-11-01T17:52:53.667Z" + }, + "deadlineType": { + "$id": "1083", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "InitiateAt" + }, + "state": { + "$id": "1084", + "kind": "string", + "type": { + "$ref": "40" + }, + "value": "Cancelled" + }, + "timezone": { + "$id": "1085", + "kind": "string", + "type": { + "$ref": "262" + }, + "value": "UTC" + }, + "resourceOperationError": { + "$id": "1086", + "kind": "model", + "type": { + "$ref": "270" + }, + "value": { + "$id": "1087", + "errorCode": { + "$id": "1088", + "kind": "string", + "type": { + "$ref": "272" + }, + "value": "null" + }, + "errorDetails": { + "$id": "1089", + "kind": "string", + "type": { + "$ref": "276" + }, + "value": "null" + } + } + }, + "completedAt": { + "$id": "1090", + "kind": "string", + "type": { + "$ref": "282" + }, + "value": "2024-11-01T17:52:53.668Z" + }, + "retryPolicy": { + "$id": "1091", + "kind": "model", + "type": { + "$ref": "175" + }, + "value": { + "$id": "1092", + "retryCount": { + "$id": "1093", + "kind": "number", + "type": { + "$ref": "177" + }, + "value": 4 + }, + "retryWindowInMinutes": { + "$id": "1094", + "kind": "number", + "type": { + "$ref": "181" + }, + "value": 27 + } + } + }, + "timeZone": { + "$id": "1095", + "kind": "string", + "type": { + "$ref": "266" + }, + "value": "UTC" + } + } + } + } + } + ] + } + } + } + } + ] + } + ] + }, + { + "$id": "1096", + "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": "1097", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "1098", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "1099", + "type": { + "$id": "1100", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2024-10-01" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1101", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "1102", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "1103", + "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": "1104", + "name": "locationparameter", + "nameInRequest": "locationparameter", + "doc": "The location name.", + "type": { + "$id": "1105", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1106", + "name": "contentType", + "nameInRequest": "Content-Type", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$id": "1107", + "kind": "constant", + "valueType": { + "$id": "1108", + "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": "1109", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "1110", + "kind": "constant", + "valueType": { + "$id": "1111", + "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": "1112", + "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": "1113", + "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": "1114", + "kind": "http", + "name": "ScheduledActions_VirtualMachinesGetOperationErrors", + "description": "ScheduledActions_VirtualMachinesGetOperationErrors", + "filePath": "2024-10-01/ScheduledActions_VirtualMachinesGetOperationErrors.json", + "parameters": [ + { + "$id": "1115", + "parameter": { + "$ref": "1097" + }, + "value": { + "$id": "1116", + "kind": "string", + "type": { + "$ref": "1098" + }, + "value": "2024-10-01" + } + }, + { + "$id": "1117", + "parameter": { + "$ref": "1101" + }, + "value": { + "$id": "1118", + "kind": "string", + "type": { + "$ref": "1102" + }, + "value": "D8E30CC0-2763-4FCC-84A8-3C5659281032" + } + }, + { + "$id": "1119", + "parameter": { + "$ref": "1104" + }, + "value": { + "$id": "1120", + "kind": "string", + "type": { + "$ref": "1105" + }, + "value": "eastus2euap" + } + }, + { + "$id": "1121", + "parameter": { + "$ref": "1112" + }, + "value": { + "$id": "1122", + "kind": "model", + "type": { + "$ref": "420" + }, + "value": { + "$id": "1123", + "operationIds": { + "$id": "1124", + "kind": "array", + "type": { + "$ref": "422" + }, + "value": [ + { + "$id": "1125", + "kind": "string", + "type": { + "$ref": "423" + }, + "value": "23480d2f-1dca-4610-afb4-dd25eec1f34r" + } + ] + } + } + } + } + ], + "responses": [ + { + "$id": "1126", + "response": { + "$ref": "1113" + }, + "statusCode": 200, + "bodyValue": { + "$id": "1127", + "kind": "model", + "type": { + "$ref": "426" + }, + "value": { + "$id": "1128", + "results": { + "$id": "1129", + "kind": "array", + "type": { + "$ref": "428" + }, + "value": [ + { + "$id": "1130", + "kind": "model", + "type": { + "$ref": "429" + }, + "value": { + "$id": "1131", + "operationId": { + "$id": "1132", + "kind": "string", + "type": { + "$ref": "431" + }, + "value": "23480d2f-1dca-4610-afb4-dd25eec1f34r" + }, + "creationTime": { + "$id": "1133", + "kind": "string", + "type": { + "$ref": "435" + }, + "value": "2024-11-01T17:52:53.999Z" + }, + "activationTime": { + "$id": "1134", + "kind": "string", + "type": { + "$ref": "440" + }, + "value": "2024-11-01T17:52:53.999Z" + }, + "completedAt": { + "$id": "1135", + "kind": "string", + "type": { + "$ref": "445" + }, + "value": "2024-11-01T17:52:53.999Z" + }, + "operationErrors": { + "$id": "1136", + "kind": "array", + "type": { + "$ref": "450" + }, + "value": [ + { + "$id": "1137", + "kind": "model", + "type": { + "$ref": "451" + }, + "value": { + "$id": "1138", + "errorCode": { + "$id": "1139", + "kind": "string", + "type": { + "$ref": "453" + }, + "value": "null" + }, + "errorDetails": { + "$id": "1140", + "kind": "string", + "type": { + "$ref": "457" + }, + "value": "null" + }, + "timestamp": { + "$id": "1141", + "kind": "string", + "type": { + "$ref": "461" + }, + "value": "2024-11-01T17:52:53.999Z" + }, + "azureOperationName": { + "$id": "1142", + "kind": "string", + "type": { + "$ref": "471" + }, + "value": "23480d2f-1dca-4610-afb4-dd25eec1f34r" + }, + "timeStamp": { + "$id": "1143", + "kind": "string", + "type": { + "$ref": "466" + }, + "value": "2024-11-27T16:55:03.357Z" + }, + "crpOperationId": { + "$id": "1144", + "kind": "string", + "type": { + "$ref": "475" + }, + "value": "23480d2f-1dca-4610-afb4-dd25eec1f34r" + } + } + } + ] + }, + "requestErrorCode": { + "$id": "1145", + "kind": "string", + "type": { + "$ref": "481" + }, + "value": "null" + }, + "requestErrorDetails": { + "$id": "1146", + "kind": "string", + "type": { + "$ref": "485" + }, + "value": "null" + } + } + } + ] + } + } + } + } + ] + } + ] + } + ], + "parameters": [ + { + "$id": "1147", + "name": "endpoint", + "nameInRequest": "endpoint", + "doc": "Service host", + "type": { + "$id": "1148", + "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": "1149", + "type": { + "$id": "1150", + "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": "1151", + "oAuth2": { + "$id": "1152", + "scopes": [ + "user_impersonation" + ] + } + } +} diff --git a/sdk/confidentialledger/Azure.Security.CodeTransparency/tsp-location.yaml b/sdk/confidentialledger/Azure.Security.CodeTransparency/tsp-location.yaml index e015a1e38304..e5861a756108 100644 --- a/sdk/confidentialledger/Azure.Security.CodeTransparency/tsp-location.yaml +++ b/sdk/confidentialledger/Azure.Security.CodeTransparency/tsp-location.yaml @@ -1,3 +1,4 @@ -commit: 72a8e363d667f0681fc3c63f3b6422d1063a2f19 -repo: Azure/azure-rest-api-specs directory: specification/confidentialledger/Microsoft.CodeTransparency +commit: 6e702986ee542ebd38d0ab2e2f2c00ab48a50b45 +repo: Azure/azure-rest-api-specs +additionalDirectories: diff --git a/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/tsp-location.yaml b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/tsp-location.yaml index f28c0988f7e4..c2043afca8ae 100644 --- a/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/tsp-location.yaml +++ b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/tsp-location.yaml @@ -1,3 +1,4 @@ -directory: specification\kubernetesruntime\KubernetesRuntime.Management -commit: 462574dbd02088c209bb1da3eef0d93f699e8de2 -repo: Azure/azure-rest-api-specs \ No newline at end of file +directory: specification/kubernetesruntime/KubernetesRuntime.Management +commit: 6e702986ee542ebd38d0ab2e2f2c00ab48a50b45 +repo: Azure/azure-rest-api-specs +additionalDirectories: diff --git a/sdk/contoso/Azure.ResourceManager.Contoso/Azure.ResourceManager.Contoso.sln b/sdk/contoso/Azure.ResourceManager.Contoso/Azure.ResourceManager.Contoso.sln new file mode 100644 index 000000000000..cb820959e5b2 --- /dev/null +++ b/sdk/contoso/Azure.ResourceManager.Contoso/Azure.ResourceManager.Contoso.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.Contoso.Samples", "samples\Azure.ResourceManager.Contoso.Samples.csproj", "{7A2DFF15-5746-49F4-BD0F-C6C35337088A}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Azure.ResourceManager.Contoso", "src\Azure.ResourceManager.Contoso.csproj", "{28FF4005-4467-4E36-92E7-DEA27DEB1519}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Azure.ResourceManager.Contoso.Tests", "tests\Azure.ResourceManager.Contoso.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/contoso/Azure.ResourceManager.Contoso/CHANGELOG.md b/sdk/contoso/Azure.ResourceManager.Contoso/CHANGELOG.md new file mode 100644 index 000000000000..8b33f0fedccc --- /dev/null +++ b/sdk/contoso/Azure.ResourceManager.Contoso/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/contoso/Azure.ResourceManager.Contoso/Directory.Build.props b/sdk/contoso/Azure.ResourceManager.Contoso/Directory.Build.props new file mode 100644 index 000000000000..63bd836ad44b --- /dev/null +++ b/sdk/contoso/Azure.ResourceManager.Contoso/Directory.Build.props @@ -0,0 +1,6 @@ + + + + diff --git a/sdk/contoso/Azure.ResourceManager.Contoso/README.md b/sdk/contoso/Azure.ResourceManager.Contoso/README.md new file mode 100644 index 000000000000..78ea67f6bbf0 --- /dev/null +++ b/sdk/contoso/Azure.ResourceManager.Contoso/README.md @@ -0,0 +1,80 @@ +# Microsoft Azure Contoso 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 Contoso management library for .NET with [NuGet](https://www.nuget.org/): + +```dotnetcli +dotnet add package Azure.ResourceManager.Contoso --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/contoso/Azure.ResourceManager.Contoso/api/Azure.ResourceManager.Contoso.net8.0.cs b/sdk/contoso/Azure.ResourceManager.Contoso/api/Azure.ResourceManager.Contoso.net8.0.cs new file mode 100644 index 000000000000..e066d059b9ab --- /dev/null +++ b/sdk/contoso/Azure.ResourceManager.Contoso/api/Azure.ResourceManager.Contoso.net8.0.cs @@ -0,0 +1,131 @@ +namespace Azure.ResourceManager.Contoso +{ + public static partial class ContosoExtensions + { + public static Azure.Response GetEmployee(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string employeeName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static System.Threading.Tasks.Task> GetEmployeeAsync(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string employeeName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.ResourceManager.Contoso.EmployeeResource GetEmployeeResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.Contoso.EmployeeCollection GetEmployees(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource) { throw null; } + public static Azure.Pageable GetEmployees(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.AsyncPageable GetEmployeesAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class EmployeeCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected EmployeeCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string employeeName, Azure.ResourceManager.Contoso.EmployeeData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string employeeName, Azure.ResourceManager.Contoso.EmployeeData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string employeeName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string employeeName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string employeeName, 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 employeeName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string employeeName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string employeeName, 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 EmployeeData : Azure.ResourceManager.Models.TrackedResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public EmployeeData(Azure.Core.AzureLocation location) { } + public Azure.ResourceManager.Contoso.Models.EmployeeProperties Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Contoso.EmployeeData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Contoso.EmployeeData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class EmployeeResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected EmployeeResource() { } + public virtual Azure.ResourceManager.Contoso.EmployeeData 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 employeeName) { 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 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.Contoso.EmployeeData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Contoso.EmployeeData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + public virtual Azure.Response Update(Azure.ResourceManager.Contoso.EmployeeData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.ResourceManager.Contoso.EmployeeData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } +} +namespace Azure.ResourceManager.Contoso.Mocking +{ + public partial class MockableContosoArmClient : Azure.ResourceManager.ArmResource + { + protected MockableContosoArmClient() { } + public virtual Azure.ResourceManager.Contoso.EmployeeResource GetEmployeeResource(Azure.Core.ResourceIdentifier id) { throw null; } + } + public partial class MockableContosoResourceGroupResource : Azure.ResourceManager.ArmResource + { + protected MockableContosoResourceGroupResource() { } + public virtual Azure.Response GetEmployee(string employeeName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetEmployeeAsync(string employeeName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.Contoso.EmployeeCollection GetEmployees() { throw null; } + } + public partial class MockableContosoSubscriptionResource : Azure.ResourceManager.ArmResource + { + protected MockableContosoSubscriptionResource() { } + public virtual Azure.Pageable GetEmployees(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetEmployeesAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } +} +namespace Azure.ResourceManager.Contoso.Models +{ + public static partial class ArmContosoModelFactory + { + public static Azure.ResourceManager.Contoso.EmployeeData EmployeeData(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.Contoso.Models.EmployeeProperties properties = null) { throw null; } + public static Azure.ResourceManager.Contoso.Models.EmployeeProperties EmployeeProperties(int? age = default(int?), string city = null, byte[] profile = null, Azure.ResourceManager.Contoso.Models.ProvisioningState? provisioningState = default(Azure.ResourceManager.Contoso.Models.ProvisioningState?)) { throw null; } + } + public partial class EmployeeProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public EmployeeProperties() { } + public int? Age { get { throw null; } set { } } + public string City { get { throw null; } set { } } + public byte[] Profile { get { throw null; } set { } } + public Azure.ResourceManager.Contoso.Models.ProvisioningState? ProvisioningState { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Contoso.Models.EmployeeProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Contoso.Models.EmployeeProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.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 ProvisioningState : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ProvisioningState(string value) { throw null; } + public static Azure.ResourceManager.Contoso.Models.ProvisioningState Accepted { get { throw null; } } + public static Azure.ResourceManager.Contoso.Models.ProvisioningState Canceled { get { throw null; } } + public static Azure.ResourceManager.Contoso.Models.ProvisioningState Deleting { get { throw null; } } + public static Azure.ResourceManager.Contoso.Models.ProvisioningState Failed { get { throw null; } } + public static Azure.ResourceManager.Contoso.Models.ProvisioningState Provisioning { get { throw null; } } + public static Azure.ResourceManager.Contoso.Models.ProvisioningState Succeeded { get { throw null; } } + public static Azure.ResourceManager.Contoso.Models.ProvisioningState Updating { get { throw null; } } + public bool Equals(Azure.ResourceManager.Contoso.Models.ProvisioningState 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.Contoso.Models.ProvisioningState left, Azure.ResourceManager.Contoso.Models.ProvisioningState right) { throw null; } + public static implicit operator Azure.ResourceManager.Contoso.Models.ProvisioningState (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.Contoso.Models.ProvisioningState left, Azure.ResourceManager.Contoso.Models.ProvisioningState right) { throw null; } + public override string ToString() { throw null; } + } +} diff --git a/sdk/contoso/Azure.ResourceManager.Contoso/api/Azure.ResourceManager.Contoso.netstandard2.0.cs b/sdk/contoso/Azure.ResourceManager.Contoso/api/Azure.ResourceManager.Contoso.netstandard2.0.cs new file mode 100644 index 000000000000..e066d059b9ab --- /dev/null +++ b/sdk/contoso/Azure.ResourceManager.Contoso/api/Azure.ResourceManager.Contoso.netstandard2.0.cs @@ -0,0 +1,131 @@ +namespace Azure.ResourceManager.Contoso +{ + public static partial class ContosoExtensions + { + public static Azure.Response GetEmployee(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string employeeName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static System.Threading.Tasks.Task> GetEmployeeAsync(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string employeeName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.ResourceManager.Contoso.EmployeeResource GetEmployeeResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.Contoso.EmployeeCollection GetEmployees(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource) { throw null; } + public static Azure.Pageable GetEmployees(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.AsyncPageable GetEmployeesAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class EmployeeCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected EmployeeCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string employeeName, Azure.ResourceManager.Contoso.EmployeeData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string employeeName, Azure.ResourceManager.Contoso.EmployeeData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string employeeName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string employeeName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string employeeName, 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 employeeName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string employeeName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string employeeName, 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 EmployeeData : Azure.ResourceManager.Models.TrackedResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public EmployeeData(Azure.Core.AzureLocation location) { } + public Azure.ResourceManager.Contoso.Models.EmployeeProperties Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Contoso.EmployeeData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Contoso.EmployeeData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class EmployeeResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected EmployeeResource() { } + public virtual Azure.ResourceManager.Contoso.EmployeeData 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 employeeName) { 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 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.Contoso.EmployeeData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Contoso.EmployeeData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + public virtual Azure.Response Update(Azure.ResourceManager.Contoso.EmployeeData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.ResourceManager.Contoso.EmployeeData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } +} +namespace Azure.ResourceManager.Contoso.Mocking +{ + public partial class MockableContosoArmClient : Azure.ResourceManager.ArmResource + { + protected MockableContosoArmClient() { } + public virtual Azure.ResourceManager.Contoso.EmployeeResource GetEmployeeResource(Azure.Core.ResourceIdentifier id) { throw null; } + } + public partial class MockableContosoResourceGroupResource : Azure.ResourceManager.ArmResource + { + protected MockableContosoResourceGroupResource() { } + public virtual Azure.Response GetEmployee(string employeeName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetEmployeeAsync(string employeeName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.Contoso.EmployeeCollection GetEmployees() { throw null; } + } + public partial class MockableContosoSubscriptionResource : Azure.ResourceManager.ArmResource + { + protected MockableContosoSubscriptionResource() { } + public virtual Azure.Pageable GetEmployees(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetEmployeesAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } +} +namespace Azure.ResourceManager.Contoso.Models +{ + public static partial class ArmContosoModelFactory + { + public static Azure.ResourceManager.Contoso.EmployeeData EmployeeData(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.Contoso.Models.EmployeeProperties properties = null) { throw null; } + public static Azure.ResourceManager.Contoso.Models.EmployeeProperties EmployeeProperties(int? age = default(int?), string city = null, byte[] profile = null, Azure.ResourceManager.Contoso.Models.ProvisioningState? provisioningState = default(Azure.ResourceManager.Contoso.Models.ProvisioningState?)) { throw null; } + } + public partial class EmployeeProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public EmployeeProperties() { } + public int? Age { get { throw null; } set { } } + public string City { get { throw null; } set { } } + public byte[] Profile { get { throw null; } set { } } + public Azure.ResourceManager.Contoso.Models.ProvisioningState? ProvisioningState { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Contoso.Models.EmployeeProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Contoso.Models.EmployeeProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.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 ProvisioningState : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ProvisioningState(string value) { throw null; } + public static Azure.ResourceManager.Contoso.Models.ProvisioningState Accepted { get { throw null; } } + public static Azure.ResourceManager.Contoso.Models.ProvisioningState Canceled { get { throw null; } } + public static Azure.ResourceManager.Contoso.Models.ProvisioningState Deleting { get { throw null; } } + public static Azure.ResourceManager.Contoso.Models.ProvisioningState Failed { get { throw null; } } + public static Azure.ResourceManager.Contoso.Models.ProvisioningState Provisioning { get { throw null; } } + public static Azure.ResourceManager.Contoso.Models.ProvisioningState Succeeded { get { throw null; } } + public static Azure.ResourceManager.Contoso.Models.ProvisioningState Updating { get { throw null; } } + public bool Equals(Azure.ResourceManager.Contoso.Models.ProvisioningState 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.Contoso.Models.ProvisioningState left, Azure.ResourceManager.Contoso.Models.ProvisioningState right) { throw null; } + public static implicit operator Azure.ResourceManager.Contoso.Models.ProvisioningState (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.Contoso.Models.ProvisioningState left, Azure.ResourceManager.Contoso.Models.ProvisioningState right) { throw null; } + public override string ToString() { throw null; } + } +} diff --git a/sdk/contoso/Azure.ResourceManager.Contoso/assets.json b/sdk/contoso/Azure.ResourceManager.Contoso/assets.json new file mode 100644 index 000000000000..ed7bbd7af63d --- /dev/null +++ b/sdk/contoso/Azure.ResourceManager.Contoso/assets.json @@ -0,0 +1,7 @@ + +{ + "AssetsRepo": "Azure/azure-sdk-assets", + "AssetsRepoPrefixPath": "net", + "TagPrefix": "net/contoso/Azure.ResourceManager.Contoso", + "Tag": "" +} diff --git a/sdk/contoso/Azure.ResourceManager.Contoso/samples/Azure.ResourceManager.Contoso.Samples.csproj b/sdk/contoso/Azure.ResourceManager.Contoso/samples/Azure.ResourceManager.Contoso.Samples.csproj new file mode 100644 index 000000000000..e1423e416b0f --- /dev/null +++ b/sdk/contoso/Azure.ResourceManager.Contoso/samples/Azure.ResourceManager.Contoso.Samples.csproj @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/sdk/contoso/Azure.ResourceManager.Contoso/samples/Generated/Samples/Sample_EmployeeCollection.cs b/sdk/contoso/Azure.ResourceManager.Contoso/samples/Generated/Samples/Sample_EmployeeCollection.cs new file mode 100644 index 000000000000..5d6930e24057 --- /dev/null +++ b/sdk/contoso/Azure.ResourceManager.Contoso/samples/Generated/Samples/Sample_EmployeeCollection.cs @@ -0,0 +1,206 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.Contoso.Models; +using Azure.ResourceManager.Resources; +using NUnit.Framework; + +namespace Azure.ResourceManager.Contoso.Samples +{ + public partial class Sample_EmployeeCollection + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_EmployeesCreateOrUpdate() + { + // Generated from example definition: 2021-11-01/Employees_CreateOrUpdate.json + // this example is just showing the usage of "Employee_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 = "11809CA1-E126-4017-945E-AA795CD5C5A9"; + string resourceGroupName = "rgopenapi"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this EmployeeResource + EmployeeCollection collection = resourceGroupResource.GetEmployees(); + + // invoke the operation + string employeeName = "9KF-f-8b"; + EmployeeData data = new EmployeeData(new AzureLocation("itajgxyqozseoygnl")) + { + Properties = new EmployeeProperties + { + Age = 30, + City = "gydhnntudughbmxlkyzrskcdkotrxn", + Profile = Encoding.UTF8.GetBytes("ms"), + }, + Tags = +{ +["key2913"] = "urperxmkkhhkp" +}, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, employeeName, data); + EmployeeResource 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 + EmployeeData 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_EmployeesGet() + { + // Generated from example definition: 2021-11-01/Employees_Get.json + // this example is just showing the usage of "Employee_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 = "11809CA1-E126-4017-945E-AA795CD5C5A9"; + string resourceGroupName = "rgopenapi"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this EmployeeResource + EmployeeCollection collection = resourceGroupResource.GetEmployees(); + + // invoke the operation + string employeeName = "le-8MU--J3W6q8D386p3-iT3"; + EmployeeResource result = await collection.GetAsync(employeeName); + + // 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 + EmployeeData 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_EmployeesListByResourceGroup() + { + // Generated from example definition: 2021-11-01/Employees_ListByResourceGroup.json + // this example is just showing the usage of "Employee_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 = "11809CA1-E126-4017-945E-AA795CD5C5A9"; + string resourceGroupName = "rgopenapi"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this EmployeeResource + EmployeeCollection collection = resourceGroupResource.GetEmployees(); + + // invoke the operation and iterate over the result + await foreach (EmployeeResource 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 + EmployeeData 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_EmployeesGet() + { + // Generated from example definition: 2021-11-01/Employees_Get.json + // this example is just showing the usage of "Employee_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 = "11809CA1-E126-4017-945E-AA795CD5C5A9"; + string resourceGroupName = "rgopenapi"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this EmployeeResource + EmployeeCollection collection = resourceGroupResource.GetEmployees(); + + // invoke the operation + string employeeName = "le-8MU--J3W6q8D386p3-iT3"; + bool result = await collection.ExistsAsync(employeeName); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetIfExists_EmployeesGet() + { + // Generated from example definition: 2021-11-01/Employees_Get.json + // this example is just showing the usage of "Employee_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 = "11809CA1-E126-4017-945E-AA795CD5C5A9"; + string resourceGroupName = "rgopenapi"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this EmployeeResource + EmployeeCollection collection = resourceGroupResource.GetEmployees(); + + // invoke the operation + string employeeName = "le-8MU--J3W6q8D386p3-iT3"; + NullableResponse response = await collection.GetIfExistsAsync(employeeName); + EmployeeResource 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 + EmployeeData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + } +} diff --git a/sdk/contoso/Azure.ResourceManager.Contoso/samples/Generated/Samples/Sample_EmployeeResource.cs b/sdk/contoso/Azure.ResourceManager.Contoso/samples/Generated/Samples/Sample_EmployeeResource.cs new file mode 100644 index 000000000000..da147009f1d0 --- /dev/null +++ b/sdk/contoso/Azure.ResourceManager.Contoso/samples/Generated/Samples/Sample_EmployeeResource.cs @@ -0,0 +1,119 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.Contoso.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.Contoso.Samples +{ + public partial class Sample_EmployeeResource + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_EmployeesGet() + { + // Generated from example definition: 2021-11-01/Employees_Get.json + // this example is just showing the usage of "Employee_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 EmployeeResource created on azure + // for more information of creating EmployeeResource, please refer to the document of EmployeeResource + string subscriptionId = "11809CA1-E126-4017-945E-AA795CD5C5A9"; + string resourceGroupName = "rgopenapi"; + string employeeName = "le-8MU--J3W6q8D386p3-iT3"; + ResourceIdentifier employeeResourceId = EmployeeResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, employeeName); + EmployeeResource employee = client.GetEmployeeResource(employeeResourceId); + + // invoke the operation + EmployeeResource result = await employee.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 + EmployeeData 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_EmployeesDelete() + { + // Generated from example definition: 2021-11-01/Employees_Delete.json + // this example is just showing the usage of "Employee_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 EmployeeResource created on azure + // for more information of creating EmployeeResource, please refer to the document of EmployeeResource + string subscriptionId = "11809CA1-E126-4017-945E-AA795CD5C5A9"; + string resourceGroupName = "rgopenapi"; + string employeeName = "5vX--BxSu3ux48rI4O9OQ569"; + ResourceIdentifier employeeResourceId = EmployeeResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, employeeName); + EmployeeResource employee = client.GetEmployeeResource(employeeResourceId); + + // invoke the operation + await employee.DeleteAsync(WaitUntil.Completed); + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Update_EmployeesUpdate() + { + // Generated from example definition: 2021-11-01/Employees_Update.json + // this example is just showing the usage of "Employee_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 EmployeeResource created on azure + // for more information of creating EmployeeResource, please refer to the document of EmployeeResource + string subscriptionId = "11809CA1-E126-4017-945E-AA795CD5C5A9"; + string resourceGroupName = "rgopenapi"; + string employeeName = "-XhyNJ--"; + ResourceIdentifier employeeResourceId = EmployeeResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, employeeName); + EmployeeResource employee = client.GetEmployeeResource(employeeResourceId); + + // invoke the operation + EmployeeData data = new EmployeeData(default) + { + Properties = new EmployeeProperties + { + Age = 24, + City = "uyfg", + Profile = Encoding.UTF8.GetBytes("oapgijcswfkruiuuzbwco"), + }, + Tags = +{ +["key7952"] = "no" +}, + }; + EmployeeResource result = await employee.UpdateAsync(data); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + EmployeeData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/contoso/Azure.ResourceManager.Contoso/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs b/sdk/contoso/Azure.ResourceManager.Contoso/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs new file mode 100644 index 000000000000..62db2b6f5e75 --- /dev/null +++ b/sdk/contoso/Azure.ResourceManager.Contoso/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.Contoso.Samples +{ + public partial class Sample_SubscriptionResourceExtensions + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetEmployees_EmployeesListBySubscription() + { + // Generated from example definition: 2021-11-01/Employees_ListBySubscription.json + // this example is just showing the usage of "Employee_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 = "11809CA1-E126-4017-945E-AA795CD5C5A9"; + ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); + SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); + + // invoke the operation and iterate over the result + await foreach (EmployeeResource item in subscriptionResource.GetEmployeesAsync()) + { + // 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 + EmployeeData 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/contoso/Azure.ResourceManager.Contoso/src/Azure.ResourceManager.Contoso.csproj b/sdk/contoso/Azure.ResourceManager.Contoso/src/Azure.ResourceManager.Contoso.csproj new file mode 100644 index 000000000000..2755628805d0 --- /dev/null +++ b/sdk/contoso/Azure.ResourceManager.Contoso/src/Azure.ResourceManager.Contoso.csproj @@ -0,0 +1,8 @@ + + + Azure Resource Manager client SDK for Azure resource provider Contoso. + 1.0.0-beta.1 + azure;management;arm;resource manager;contoso + Azure.ResourceManager.Contoso + + diff --git a/sdk/contoso/Azure.ResourceManager.Contoso/src/Generated/ArmContosoModelFactory.cs b/sdk/contoso/Azure.ResourceManager.Contoso/src/Generated/ArmContosoModelFactory.cs new file mode 100644 index 000000000000..836b121b3967 --- /dev/null +++ b/sdk/contoso/Azure.ResourceManager.Contoso/src/Generated/ArmContosoModelFactory.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; +using System.Linq; +using Azure.Core; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.Contoso.Models +{ + /// Model factory for models. + public static partial class ArmContosoModelFactory + { + /// 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 EmployeeData EmployeeData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, EmployeeProperties properties = null) + { + tags ??= new Dictionary(); + + return new EmployeeData( + id, + name, + resourceType, + systemData, + tags, + location, + properties, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Age of employee. + /// City of employee. + /// Profile of employee. + /// The status of the last operation. + /// A new instance for mocking. + public static EmployeeProperties EmployeeProperties(int? age = null, string city = null, byte[] profile = null, ProvisioningState? provisioningState = null) + { + return new EmployeeProperties(age, city, profile, provisioningState, serializedAdditionalRawData: null); + } + } +} diff --git a/sdk/contoso/Azure.ResourceManager.Contoso/src/Generated/EmployeeCollection.cs b/sdk/contoso/Azure.ResourceManager.Contoso/src/Generated/EmployeeCollection.cs new file mode 100644 index 000000000000..6fead5174202 --- /dev/null +++ b/sdk/contoso/Azure.ResourceManager.Contoso/src/Generated/EmployeeCollection.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.Contoso +{ + /// + /// 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 GetEmployees method from an instance of . + /// + public partial class EmployeeCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _employeeClientDiagnostics; + private readonly EmployeesRestOperations _employeeRestClient; + + /// Initializes a new instance of the class for mocking. + protected EmployeeCollection() + { + } + + /// 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 EmployeeCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _employeeClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.Contoso", EmployeeResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(EmployeeResource.ResourceType, out string employeeApiVersion); + _employeeRestClient = new EmployeesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, employeeApiVersion); +#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 Employee + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Contoso/employees/{employeeName} + /// + /// + /// Operation Id + /// Employee_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2021-11-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 Employee. + /// 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 employeeName, EmployeeData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(employeeName, nameof(employeeName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _employeeClientDiagnostics.CreateScope("EmployeeCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _employeeRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, employeeName, data, cancellationToken).ConfigureAwait(false); + var operation = new ContosoArmOperation(new EmployeeOperationSource(Client), _employeeClientDiagnostics, Pipeline, _employeeRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, employeeName, 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 Employee + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Contoso/employees/{employeeName} + /// + /// + /// Operation Id + /// Employee_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2021-11-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 Employee. + /// 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 employeeName, EmployeeData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(employeeName, nameof(employeeName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _employeeClientDiagnostics.CreateScope("EmployeeCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _employeeRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, employeeName, data, cancellationToken); + var operation = new ContosoArmOperation(new EmployeeOperationSource(Client), _employeeClientDiagnostics, Pipeline, _employeeRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, employeeName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a Employee + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Contoso/employees/{employeeName} + /// + /// + /// Operation Id + /// Employee_Get + /// + /// + /// Default Api Version + /// 2021-11-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Employee. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string employeeName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(employeeName, nameof(employeeName)); + + using var scope = _employeeClientDiagnostics.CreateScope("EmployeeCollection.Get"); + scope.Start(); + try + { + var response = await _employeeRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, employeeName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new EmployeeResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a Employee + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Contoso/employees/{employeeName} + /// + /// + /// Operation Id + /// Employee_Get + /// + /// + /// Default Api Version + /// 2021-11-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Employee. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string employeeName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(employeeName, nameof(employeeName)); + + using var scope = _employeeClientDiagnostics.CreateScope("EmployeeCollection.Get"); + scope.Start(); + try + { + var response = _employeeRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, employeeName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new EmployeeResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// List Employee resources by resource group + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Contoso/employees + /// + /// + /// Operation Id + /// Employee_ListByResourceGroup + /// + /// + /// Default Api Version + /// 2021-11-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) => _employeeRestClient.CreateListByResourceGroupRequest(Id.SubscriptionId, Id.ResourceGroupName); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _employeeRestClient.CreateListByResourceGroupNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new EmployeeResource(Client, EmployeeData.DeserializeEmployeeData(e)), _employeeClientDiagnostics, Pipeline, "EmployeeCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// List Employee resources by resource group + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Contoso/employees + /// + /// + /// Operation Id + /// Employee_ListByResourceGroup + /// + /// + /// Default Api Version + /// 2021-11-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) => _employeeRestClient.CreateListByResourceGroupRequest(Id.SubscriptionId, Id.ResourceGroupName); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _employeeRestClient.CreateListByResourceGroupNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new EmployeeResource(Client, EmployeeData.DeserializeEmployeeData(e)), _employeeClientDiagnostics, Pipeline, "EmployeeCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Contoso/employees/{employeeName} + /// + /// + /// Operation Id + /// Employee_Get + /// + /// + /// Default Api Version + /// 2021-11-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Employee. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string employeeName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(employeeName, nameof(employeeName)); + + using var scope = _employeeClientDiagnostics.CreateScope("EmployeeCollection.Exists"); + scope.Start(); + try + { + var response = await _employeeRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, employeeName, 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.Contoso/employees/{employeeName} + /// + /// + /// Operation Id + /// Employee_Get + /// + /// + /// Default Api Version + /// 2021-11-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Employee. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string employeeName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(employeeName, nameof(employeeName)); + + using var scope = _employeeClientDiagnostics.CreateScope("EmployeeCollection.Exists"); + scope.Start(); + try + { + var response = _employeeRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, employeeName, 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.Contoso/employees/{employeeName} + /// + /// + /// Operation Id + /// Employee_Get + /// + /// + /// Default Api Version + /// 2021-11-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Employee. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetIfExistsAsync(string employeeName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(employeeName, nameof(employeeName)); + + using var scope = _employeeClientDiagnostics.CreateScope("EmployeeCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _employeeRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, employeeName, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new EmployeeResource(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.Contoso/employees/{employeeName} + /// + /// + /// Operation Id + /// Employee_Get + /// + /// + /// Default Api Version + /// 2021-11-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Employee. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string employeeName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(employeeName, nameof(employeeName)); + + using var scope = _employeeClientDiagnostics.CreateScope("EmployeeCollection.GetIfExists"); + scope.Start(); + try + { + var response = _employeeRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, employeeName, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new EmployeeResource(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/contoso/Azure.ResourceManager.Contoso/src/Generated/EmployeeData.Serialization.cs b/sdk/contoso/Azure.ResourceManager.Contoso/src/Generated/EmployeeData.Serialization.cs new file mode 100644 index 000000000000..6f63d6c28ea4 --- /dev/null +++ b/sdk/contoso/Azure.ResourceManager.Contoso/src/Generated/EmployeeData.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.Contoso.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.Contoso +{ + public partial class EmployeeData : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.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(EmployeeData)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties, options); + } + } + + EmployeeData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(EmployeeData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeEmployeeData(document.RootElement, options); + } + + internal static EmployeeData DeserializeEmployeeData(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + EmployeeProperties 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 = EmployeeProperties.DeserializeEmployeeProperties(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 EmployeeData( + 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(EmployeeData)} does not support writing '{options.Format}' format."); + } + } + + EmployeeData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeEmployeeData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(EmployeeData)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/contoso/Azure.ResourceManager.Contoso/src/Generated/EmployeeData.cs b/sdk/contoso/Azure.ResourceManager.Contoso/src/Generated/EmployeeData.cs new file mode 100644 index 000000000000..081bdf1fe2c7 --- /dev/null +++ b/sdk/contoso/Azure.ResourceManager.Contoso/src/Generated/EmployeeData.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.Contoso.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.Contoso +{ + /// + /// A class representing the Employee data model. + /// Employee resource + /// + public partial class EmployeeData : 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 EmployeeData(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 EmployeeData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, EmployeeProperties properties, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) + { + Properties = properties; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal EmployeeData() + { + } + + /// The resource-specific properties for this resource. + public EmployeeProperties Properties { get; set; } + } +} diff --git a/sdk/contoso/Azure.ResourceManager.Contoso/src/Generated/EmployeeResource.Serialization.cs b/sdk/contoso/Azure.ResourceManager.Contoso/src/Generated/EmployeeResource.Serialization.cs new file mode 100644 index 000000000000..9ba6d75f170e --- /dev/null +++ b/sdk/contoso/Azure.ResourceManager.Contoso/src/Generated/EmployeeResource.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.Contoso +{ + public partial class EmployeeResource : IJsonModel + { + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + EmployeeData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options); + + EmployeeData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + } +} diff --git a/sdk/contoso/Azure.ResourceManager.Contoso/src/Generated/EmployeeResource.cs b/sdk/contoso/Azure.ResourceManager.Contoso/src/Generated/EmployeeResource.cs new file mode 100644 index 000000000000..d09c19428c4c --- /dev/null +++ b/sdk/contoso/Azure.ResourceManager.Contoso/src/Generated/EmployeeResource.cs @@ -0,0 +1,698 @@ +// 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; + +namespace Azure.ResourceManager.Contoso +{ + /// + /// A Class representing an Employee 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 GetEmployeeResource method. + /// Otherwise you can get one from its parent resource using the GetEmployee method. + /// + public partial class EmployeeResource : ArmResource + { + /// Generate the resource identifier of a instance. + /// The subscriptionId. + /// The resourceGroupName. + /// The employeeName. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string employeeName) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Contoso/employees/{employeeName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _employeeClientDiagnostics; + private readonly EmployeesRestOperations _employeeRestClient; + private readonly EmployeeData _data; + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.Contoso/employees"; + + /// Initializes a new instance of the class for mocking. + protected EmployeeResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal EmployeeResource(ArmClient client, EmployeeData 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 EmployeeResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _employeeClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.Contoso", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string employeeApiVersion); + _employeeRestClient = new EmployeesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, employeeApiVersion); +#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 EmployeeData 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 Employee + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Contoso/employees/{employeeName} + /// + /// + /// Operation Id + /// Employee_Get + /// + /// + /// Default Api Version + /// 2021-11-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _employeeClientDiagnostics.CreateScope("EmployeeResource.Get"); + scope.Start(); + try + { + var response = await _employeeRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new EmployeeResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a Employee + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Contoso/employees/{employeeName} + /// + /// + /// Operation Id + /// Employee_Get + /// + /// + /// Default Api Version + /// 2021-11-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _employeeClientDiagnostics.CreateScope("EmployeeResource.Get"); + scope.Start(); + try + { + var response = _employeeRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new EmployeeResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete a Employee + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Contoso/employees/{employeeName} + /// + /// + /// Operation Id + /// Employee_Delete + /// + /// + /// Default Api Version + /// 2021-11-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 = _employeeClientDiagnostics.CreateScope("EmployeeResource.Delete"); + scope.Start(); + try + { + var response = await _employeeRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new ContosoArmOperation(_employeeClientDiagnostics, Pipeline, _employeeRestClient.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 Employee + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Contoso/employees/{employeeName} + /// + /// + /// Operation Id + /// Employee_Delete + /// + /// + /// Default Api Version + /// 2021-11-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 = _employeeClientDiagnostics.CreateScope("EmployeeResource.Delete"); + scope.Start(); + try + { + var response = _employeeRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + var operation = new ContosoArmOperation(_employeeClientDiagnostics, Pipeline, _employeeRestClient.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 Employee + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Contoso/employees/{employeeName} + /// + /// + /// Operation Id + /// Employee_Update + /// + /// + /// Default Api Version + /// 2021-11-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The resource properties to be updated. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(EmployeeData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _employeeClientDiagnostics.CreateScope("EmployeeResource.Update"); + scope.Start(); + try + { + var response = await _employeeRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, data, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new EmployeeResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Update a Employee + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Contoso/employees/{employeeName} + /// + /// + /// Operation Id + /// Employee_Update + /// + /// + /// Default Api Version + /// 2021-11-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The resource properties to be updated. + /// The cancellation token to use. + /// is null. + public virtual Response Update(EmployeeData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _employeeClientDiagnostics.CreateScope("EmployeeResource.Update"); + scope.Start(); + try + { + var response = _employeeRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, data, cancellationToken); + return Response.FromValue(new EmployeeResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Add a tag to the current resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Contoso/employees/{employeeName} + /// + /// + /// Operation Id + /// Employee_Get + /// + /// + /// Default Api Version + /// 2021-11-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 = _employeeClientDiagnostics.CreateScope("EmployeeResource.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 _employeeRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new EmployeeResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new EmployeeData(current.Location); + 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.Contoso/employees/{employeeName} + /// + /// + /// Operation Id + /// Employee_Get + /// + /// + /// Default Api Version + /// 2021-11-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 = _employeeClientDiagnostics.CreateScope("EmployeeResource.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 = _employeeRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + return Response.FromValue(new EmployeeResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new EmployeeData(current.Location); + 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.Contoso/employees/{employeeName} + /// + /// + /// Operation Id + /// Employee_Get + /// + /// + /// Default Api Version + /// 2021-11-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 = _employeeClientDiagnostics.CreateScope("EmployeeResource.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 _employeeRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new EmployeeResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new EmployeeData(current.Location); + 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.Contoso/employees/{employeeName} + /// + /// + /// Operation Id + /// Employee_Get + /// + /// + /// Default Api Version + /// 2021-11-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 = _employeeClientDiagnostics.CreateScope("EmployeeResource.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 = _employeeRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + return Response.FromValue(new EmployeeResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new EmployeeData(current.Location); + 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.Contoso/employees/{employeeName} + /// + /// + /// Operation Id + /// Employee_Get + /// + /// + /// Default Api Version + /// 2021-11-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 = _employeeClientDiagnostics.CreateScope("EmployeeResource.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 _employeeRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new EmployeeResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new EmployeeData(current.Location); + 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.Contoso/employees/{employeeName} + /// + /// + /// Operation Id + /// Employee_Get + /// + /// + /// Default Api Version + /// 2021-11-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 = _employeeClientDiagnostics.CreateScope("EmployeeResource.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 = _employeeRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + return Response.FromValue(new EmployeeResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new EmployeeData(current.Location); + 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/contoso/Azure.ResourceManager.Contoso/src/Generated/Extensions/ContosoExtensions.cs b/sdk/contoso/Azure.ResourceManager.Contoso/src/Generated/Extensions/ContosoExtensions.cs new file mode 100644 index 000000000000..3e8c2e0d8d70 --- /dev/null +++ b/sdk/contoso/Azure.ResourceManager.Contoso/src/Generated/Extensions/ContosoExtensions.cs @@ -0,0 +1,219 @@ +// 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.Contoso.Mocking; +using Azure.ResourceManager.Resources; + +namespace Azure.ResourceManager.Contoso +{ + /// A class to add extension methods to Azure.ResourceManager.Contoso. + public static partial class ContosoExtensions + { + private static MockableContosoArmClient GetMockableContosoArmClient(ArmClient client) + { + return client.GetCachedClient(client0 => new MockableContosoArmClient(client0)); + } + + private static MockableContosoResourceGroupResource GetMockableContosoResourceGroupResource(ArmResource resource) + { + return resource.GetCachedClient(client => new MockableContosoResourceGroupResource(client, resource.Id)); + } + + private static MockableContosoSubscriptionResource GetMockableContosoSubscriptionResource(ArmResource resource) + { + return resource.GetCachedClient(client => new MockableContosoSubscriptionResource(client, resource.Id)); + } + + /// + /// Gets an object representing an along with the instance operations that can be performed on it but with no data. + /// You can use to create an from its components. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// is null. + /// Returns a object. + public static EmployeeResource GetEmployeeResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableContosoArmClient(client).GetEmployeeResource(id); + } + + /// + /// Gets a collection of EmployeeResources 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 EmployeeResources and their operations over a EmployeeResource. + public static EmployeeCollection GetEmployees(this ResourceGroupResource resourceGroupResource) + { + Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); + + return GetMockableContosoResourceGroupResource(resourceGroupResource).GetEmployees(); + } + + /// + /// Get a Employee + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Contoso/employees/{employeeName} + /// + /// + /// Operation Id + /// Employee_Get + /// + /// + /// Default Api Version + /// 2021-11-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The name of the Employee. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public static async Task> GetEmployeeAsync(this ResourceGroupResource resourceGroupResource, string employeeName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); + + return await GetMockableContosoResourceGroupResource(resourceGroupResource).GetEmployeeAsync(employeeName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get a Employee + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Contoso/employees/{employeeName} + /// + /// + /// Operation Id + /// Employee_Get + /// + /// + /// Default Api Version + /// 2021-11-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The name of the Employee. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public static Response GetEmployee(this ResourceGroupResource resourceGroupResource, string employeeName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); + + return GetMockableContosoResourceGroupResource(resourceGroupResource).GetEmployee(employeeName, cancellationToken); + } + + /// + /// List Employee resources by subscription ID + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Contoso/employees + /// + /// + /// Operation Id + /// Employee_ListBySubscription + /// + /// + /// Default Api Version + /// 2021-11-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 GetEmployeesAsync(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); + + return GetMockableContosoSubscriptionResource(subscriptionResource).GetEmployeesAsync(cancellationToken); + } + + /// + /// List Employee resources by subscription ID + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Contoso/employees + /// + /// + /// Operation Id + /// Employee_ListBySubscription + /// + /// + /// Default Api Version + /// 2021-11-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 GetEmployees(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); + + return GetMockableContosoSubscriptionResource(subscriptionResource).GetEmployees(cancellationToken); + } + } +} diff --git a/sdk/contoso/Azure.ResourceManager.Contoso/src/Generated/Extensions/MockableContosoArmClient.cs b/sdk/contoso/Azure.ResourceManager.Contoso/src/Generated/Extensions/MockableContosoArmClient.cs new file mode 100644 index 000000000000..9dd8be4758d4 --- /dev/null +++ b/sdk/contoso/Azure.ResourceManager.Contoso/src/Generated/Extensions/MockableContosoArmClient.cs @@ -0,0 +1,49 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using Azure.Core; + +namespace Azure.ResourceManager.Contoso.Mocking +{ + /// A class to add extension methods to ArmClient. + public partial class MockableContosoArmClient : ArmResource + { + /// Initializes a new instance of the class for mocking. + protected MockableContosoArmClient() + { + } + + /// 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 MockableContosoArmClient(ArmClient client, ResourceIdentifier id) : base(client, id) + { + } + + internal MockableContosoArmClient(ArmClient client) : this(client, ResourceIdentifier.Root) + { + } + + private string GetApiVersionOrNull(ResourceType resourceType) + { + TryGetApiVersion(resourceType, out string apiVersion); + return apiVersion; + } + + /// + /// Gets an object representing an along with the instance operations that can be performed on it but with no data. + /// You can use to create an from its components. + /// + /// The resource ID of the resource to get. + /// Returns a object. + public virtual EmployeeResource GetEmployeeResource(ResourceIdentifier id) + { + EmployeeResource.ValidateResourceId(id); + return new EmployeeResource(Client, id); + } + } +} diff --git a/sdk/contoso/Azure.ResourceManager.Contoso/src/Generated/Extensions/MockableContosoResourceGroupResource.cs b/sdk/contoso/Azure.ResourceManager.Contoso/src/Generated/Extensions/MockableContosoResourceGroupResource.cs new file mode 100644 index 000000000000..a4c47d382ed8 --- /dev/null +++ b/sdk/contoso/Azure.ResourceManager.Contoso/src/Generated/Extensions/MockableContosoResourceGroupResource.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.Contoso.Mocking +{ + /// A class to add extension methods to ResourceGroupResource. + public partial class MockableContosoResourceGroupResource : ArmResource + { + /// Initializes a new instance of the class for mocking. + protected MockableContosoResourceGroupResource() + { + } + + /// 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 MockableContosoResourceGroupResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + } + + private string GetApiVersionOrNull(ResourceType resourceType) + { + TryGetApiVersion(resourceType, out string apiVersion); + return apiVersion; + } + + /// Gets a collection of EmployeeResources in the ResourceGroupResource. + /// An object representing collection of EmployeeResources and their operations over a EmployeeResource. + public virtual EmployeeCollection GetEmployees() + { + return GetCachedClient(client => new EmployeeCollection(client, Id)); + } + + /// + /// Get a Employee + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Contoso/employees/{employeeName} + /// + /// + /// Operation Id + /// Employee_Get + /// + /// + /// Default Api Version + /// 2021-11-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Employee. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetEmployeeAsync(string employeeName, CancellationToken cancellationToken = default) + { + return await GetEmployees().GetAsync(employeeName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get a Employee + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Contoso/employees/{employeeName} + /// + /// + /// Operation Id + /// Employee_Get + /// + /// + /// Default Api Version + /// 2021-11-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Employee. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetEmployee(string employeeName, CancellationToken cancellationToken = default) + { + return GetEmployees().Get(employeeName, cancellationToken); + } + } +} diff --git a/sdk/contoso/Azure.ResourceManager.Contoso/src/Generated/Extensions/MockableContosoSubscriptionResource.cs b/sdk/contoso/Azure.ResourceManager.Contoso/src/Generated/Extensions/MockableContosoSubscriptionResource.cs new file mode 100644 index 000000000000..6a116f9716a3 --- /dev/null +++ b/sdk/contoso/Azure.ResourceManager.Contoso/src/Generated/Extensions/MockableContosoSubscriptionResource.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.Contoso.Mocking +{ + /// A class to add extension methods to SubscriptionResource. + public partial class MockableContosoSubscriptionResource : ArmResource + { + private ClientDiagnostics _employeeClientDiagnostics; + private EmployeesRestOperations _employeeRestClient; + + /// Initializes a new instance of the class for mocking. + protected MockableContosoSubscriptionResource() + { + } + + /// 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 MockableContosoSubscriptionResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + } + + private ClientDiagnostics EmployeeClientDiagnostics => _employeeClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.Contoso", EmployeeResource.ResourceType.Namespace, Diagnostics); + private EmployeesRestOperations EmployeeRestClient => _employeeRestClient ??= new EmployeesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, GetApiVersionOrNull(EmployeeResource.ResourceType)); + + private string GetApiVersionOrNull(ResourceType resourceType) + { + TryGetApiVersion(resourceType, out string apiVersion); + return apiVersion; + } + + /// + /// List Employee resources by subscription ID + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Contoso/employees + /// + /// + /// Operation Id + /// Employee_ListBySubscription + /// + /// + /// Default Api Version + /// 2021-11-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetEmployeesAsync(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => EmployeeRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => EmployeeRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new EmployeeResource(Client, EmployeeData.DeserializeEmployeeData(e)), EmployeeClientDiagnostics, Pipeline, "MockableContosoSubscriptionResource.GetEmployees", "value", "nextLink", cancellationToken); + } + + /// + /// List Employee resources by subscription ID + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Contoso/employees + /// + /// + /// Operation Id + /// Employee_ListBySubscription + /// + /// + /// Default Api Version + /// 2021-11-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetEmployees(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => EmployeeRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => EmployeeRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new EmployeeResource(Client, EmployeeData.DeserializeEmployeeData(e)), EmployeeClientDiagnostics, Pipeline, "MockableContosoSubscriptionResource.GetEmployees", "value", "nextLink", cancellationToken); + } + } +} diff --git a/sdk/contoso/Azure.ResourceManager.Contoso/src/Generated/Internal/Argument.cs b/sdk/contoso/Azure.ResourceManager.Contoso/src/Generated/Internal/Argument.cs new file mode 100644 index 000000000000..b146fadb7828 --- /dev/null +++ b/sdk/contoso/Azure.ResourceManager.Contoso/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.Contoso +{ + 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/contoso/Azure.ResourceManager.Contoso/src/Generated/Internal/ChangeTrackingDictionary.cs b/sdk/contoso/Azure.ResourceManager.Contoso/src/Generated/Internal/ChangeTrackingDictionary.cs new file mode 100644 index 000000000000..c2b481265f05 --- /dev/null +++ b/sdk/contoso/Azure.ResourceManager.Contoso/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.Contoso +{ + 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/contoso/Azure.ResourceManager.Contoso/src/Generated/Internal/ChangeTrackingList.cs b/sdk/contoso/Azure.ResourceManager.Contoso/src/Generated/Internal/ChangeTrackingList.cs new file mode 100644 index 000000000000..28e10b878f86 --- /dev/null +++ b/sdk/contoso/Azure.ResourceManager.Contoso/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.Contoso +{ + 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/contoso/Azure.ResourceManager.Contoso/src/Generated/Internal/ModelSerializationExtensions.cs b/sdk/contoso/Azure.ResourceManager.Contoso/src/Generated/Internal/ModelSerializationExtensions.cs new file mode 100644 index 000000000000..5b13d8c23e13 --- /dev/null +++ b/sdk/contoso/Azure.ResourceManager.Contoso/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.Contoso +{ + 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/contoso/Azure.ResourceManager.Contoso/src/Generated/Internal/Optional.cs b/sdk/contoso/Azure.ResourceManager.Contoso/src/Generated/Internal/Optional.cs new file mode 100644 index 000000000000..3d6bd293a801 --- /dev/null +++ b/sdk/contoso/Azure.ResourceManager.Contoso/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.Contoso +{ + 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/contoso/Azure.ResourceManager.Contoso/src/Generated/Internal/Utf8JsonRequestContent.cs b/sdk/contoso/Azure.ResourceManager.Contoso/src/Generated/Internal/Utf8JsonRequestContent.cs new file mode 100644 index 000000000000..50d04f500cd4 --- /dev/null +++ b/sdk/contoso/Azure.ResourceManager.Contoso/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.Contoso +{ + 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/contoso/Azure.ResourceManager.Contoso/src/Generated/LongRunningOperation/ContosoArmOperation.cs b/sdk/contoso/Azure.ResourceManager.Contoso/src/Generated/LongRunningOperation/ContosoArmOperation.cs new file mode 100644 index 000000000000..2badd30f1f7b --- /dev/null +++ b/sdk/contoso/Azure.ResourceManager.Contoso/src/Generated/LongRunningOperation/ContosoArmOperation.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.Contoso +{ +#pragma warning disable SA1649 // File name should match first type name + internal class ContosoArmOperation : 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 ContosoArmOperation for mocking. + protected ContosoArmOperation() + { + } + + internal ContosoArmOperation(Response response, RehydrationToken? rehydrationToken = null) + { + _operation = OperationInternal.Succeeded(response); + _completeRehydrationToken = rehydrationToken; + _operationId = GetOperationId(rehydrationToken); + } + + internal ContosoArmOperation(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, "ContosoArmOperation", 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/contoso/Azure.ResourceManager.Contoso/src/Generated/LongRunningOperation/ContosoArmOperationOfT.cs b/sdk/contoso/Azure.ResourceManager.Contoso/src/Generated/LongRunningOperation/ContosoArmOperationOfT.cs new file mode 100644 index 000000000000..4b59643530b2 --- /dev/null +++ b/sdk/contoso/Azure.ResourceManager.Contoso/src/Generated/LongRunningOperation/ContosoArmOperationOfT.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.Contoso +{ +#pragma warning disable SA1649 // File name should match first type name + internal class ContosoArmOperation : 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 ContosoArmOperation for mocking. + protected ContosoArmOperation() + { + } + + internal ContosoArmOperation(Response response, RehydrationToken? rehydrationToken = null) + { + _operation = OperationInternal.Succeeded(response.GetRawResponse(), response.Value); + _completeRehydrationToken = rehydrationToken; + _operationId = GetOperationId(rehydrationToken); + } + + internal ContosoArmOperation(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, "ContosoArmOperation", 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/contoso/Azure.ResourceManager.Contoso/src/Generated/LongRunningOperation/EmployeeOperationSource.cs b/sdk/contoso/Azure.ResourceManager.Contoso/src/Generated/LongRunningOperation/EmployeeOperationSource.cs new file mode 100644 index 000000000000..40897fe08bcb --- /dev/null +++ b/sdk/contoso/Azure.ResourceManager.Contoso/src/Generated/LongRunningOperation/EmployeeOperationSource.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.Contoso +{ + internal class EmployeeOperationSource : IOperationSource + { + private readonly ArmClient _client; + + internal EmployeeOperationSource(ArmClient client) + { + _client = client; + } + + EmployeeResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + var data = ModelReaderWriter.Read(response.Content); + return new EmployeeResource(_client, data); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + var data = ModelReaderWriter.Read(response.Content); + return await Task.FromResult(new EmployeeResource(_client, data)).ConfigureAwait(false); + } + } +} diff --git a/sdk/contoso/Azure.ResourceManager.Contoso/src/Generated/Models/EmployeeListResult.Serialization.cs b/sdk/contoso/Azure.ResourceManager.Contoso/src/Generated/Models/EmployeeListResult.Serialization.cs new file mode 100644 index 000000000000..5a1ac3f3643f --- /dev/null +++ b/sdk/contoso/Azure.ResourceManager.Contoso/src/Generated/Models/EmployeeListResult.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.Contoso.Models +{ + internal partial class EmployeeListResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(EmployeeListResult)} 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 + } + } + } + + EmployeeListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(EmployeeListResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeEmployeeListResult(document.RootElement, options); + } + + internal static EmployeeListResult DeserializeEmployeeListResult(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(EmployeeData.DeserializeEmployeeData(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 EmployeeListResult(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(EmployeeListResult)} does not support writing '{options.Format}' format."); + } + } + + EmployeeListResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeEmployeeListResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(EmployeeListResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/contoso/Azure.ResourceManager.Contoso/src/Generated/Models/EmployeeListResult.cs b/sdk/contoso/Azure.ResourceManager.Contoso/src/Generated/Models/EmployeeListResult.cs new file mode 100644 index 000000000000..f40f6693d057 --- /dev/null +++ b/sdk/contoso/Azure.ResourceManager.Contoso/src/Generated/Models/EmployeeListResult.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.Contoso.Models +{ + /// The response of a Employee list operation. + internal partial class EmployeeListResult + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// 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 Employee items on this page. + /// is null. + internal EmployeeListResult(IEnumerable value) + { + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); + } + + /// Initializes a new instance of . + /// The Employee items on this page. + /// The link to the next page of items. + /// Keeps track of any properties unknown to the library. + internal EmployeeListResult(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) + { + Value = value; + NextLink = nextLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal EmployeeListResult() + { + } + + /// The Employee items on this page. + public IReadOnlyList Value { get; } + /// The link to the next page of items. + public Uri NextLink { get; } + } +} diff --git a/sdk/contoso/Azure.ResourceManager.Contoso/src/Generated/Models/EmployeeProperties.Serialization.cs b/sdk/contoso/Azure.ResourceManager.Contoso/src/Generated/Models/EmployeeProperties.Serialization.cs new file mode 100644 index 000000000000..5c469fe54d30 --- /dev/null +++ b/sdk/contoso/Azure.ResourceManager.Contoso/src/Generated/Models/EmployeeProperties.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.Contoso.Models +{ + public partial class EmployeeProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(EmployeeProperties)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(Age)) + { + writer.WritePropertyName("age"u8); + writer.WriteNumberValue(Age.Value); + } + if (Optional.IsDefined(City)) + { + writer.WritePropertyName("city"u8); + writer.WriteStringValue(City); + } + if (Optional.IsDefined(Profile)) + { + writer.WritePropertyName("profile"u8); + writer.WriteBase64StringValue(Profile, "U"); + } + 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 + } + } + } + + EmployeeProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(EmployeeProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeEmployeeProperties(document.RootElement, options); + } + + internal static EmployeeProperties DeserializeEmployeeProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + int? age = default; + string city = default; + byte[] profile = default; + ProvisioningState? provisioningState = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("age"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + age = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("city"u8)) + { + city = property.Value.GetString(); + continue; + } + if (property.NameEquals("profile"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + profile = property.Value.GetBytesFromBase64("U"); + continue; + } + if (property.NameEquals("provisioningState"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + provisioningState = new ProvisioningState(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new EmployeeProperties(age, city, profile, 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(EmployeeProperties)} does not support writing '{options.Format}' format."); + } + } + + EmployeeProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeEmployeeProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(EmployeeProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/contoso/Azure.ResourceManager.Contoso/src/Generated/Models/EmployeeProperties.cs b/sdk/contoso/Azure.ResourceManager.Contoso/src/Generated/Models/EmployeeProperties.cs new file mode 100644 index 000000000000..f17e5ee5c7df --- /dev/null +++ b/sdk/contoso/Azure.ResourceManager.Contoso/src/Generated/Models/EmployeeProperties.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.Contoso.Models +{ + /// Employee properties. + public partial class EmployeeProperties + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// 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 EmployeeProperties() + { + } + + /// Initializes a new instance of . + /// Age of employee. + /// City of employee. + /// Profile of employee. + /// The status of the last operation. + /// Keeps track of any properties unknown to the library. + internal EmployeeProperties(int? age, string city, byte[] profile, ProvisioningState? provisioningState, IDictionary serializedAdditionalRawData) + { + Age = age; + City = city; + Profile = profile; + ProvisioningState = provisioningState; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Age of employee. + public int? Age { get; set; } + /// City of employee. + public string City { get; set; } + /// Profile of employee. + public byte[] Profile { get; set; } + /// The status of the last operation. + public ProvisioningState? ProvisioningState { get; } + } +} diff --git a/sdk/contoso/Azure.ResourceManager.Contoso/src/Generated/Models/ProvisioningState.cs b/sdk/contoso/Azure.ResourceManager.Contoso/src/Generated/Models/ProvisioningState.cs new file mode 100644 index 000000000000..3b650fd30ca1 --- /dev/null +++ b/sdk/contoso/Azure.ResourceManager.Contoso/src/Generated/Models/ProvisioningState.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.Contoso.Models +{ + /// The resource provisioning state. + public readonly partial struct ProvisioningState : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public ProvisioningState(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 UpdatingValue = "Updating"; + private const string DeletingValue = "Deleting"; + private const string AcceptedValue = "Accepted"; + + /// Resource has been created. + public static ProvisioningState Succeeded { get; } = new ProvisioningState(SucceededValue); + /// Resource creation failed. + public static ProvisioningState Failed { get; } = new ProvisioningState(FailedValue); + /// Resource creation was canceled. + public static ProvisioningState Canceled { get; } = new ProvisioningState(CanceledValue); + /// The resource is being provisioned. + public static ProvisioningState Provisioning { get; } = new ProvisioningState(ProvisioningValue); + /// The resource is updating. + public static ProvisioningState Updating { get; } = new ProvisioningState(UpdatingValue); + /// The resource is being deleted. + public static ProvisioningState Deleting { get; } = new ProvisioningState(DeletingValue); + /// The resource create request has been accepted. + public static ProvisioningState Accepted { get; } = new ProvisioningState(AcceptedValue); + /// Determines if two values are the same. + public static bool operator ==(ProvisioningState left, ProvisioningState right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(ProvisioningState left, ProvisioningState right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator ProvisioningState(string value) => new ProvisioningState(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is ProvisioningState other && Equals(other); + /// + public bool Equals(ProvisioningState 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/contoso/Azure.ResourceManager.Contoso/src/Generated/ProviderConstants.cs b/sdk/contoso/Azure.ResourceManager.Contoso/src/Generated/ProviderConstants.cs new file mode 100644 index 000000000000..58224a637312 --- /dev/null +++ b/sdk/contoso/Azure.ResourceManager.Contoso/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.Contoso +{ + internal static class ProviderConstants + { + public static string DefaultProviderNamespace { get; } = ClientDiagnostics.GetResourceProviderNamespace(typeof(ProviderConstants).Assembly); + } +} diff --git a/sdk/contoso/Azure.ResourceManager.Contoso/src/Generated/RestOperations/EmployeesRestOperations.cs b/sdk/contoso/Azure.ResourceManager.Contoso/src/Generated/RestOperations/EmployeesRestOperations.cs new file mode 100644 index 000000000000..b13e791dc40f --- /dev/null +++ b/sdk/contoso/Azure.ResourceManager.Contoso/src/Generated/RestOperations/EmployeesRestOperations.cs @@ -0,0 +1,731 @@ +// 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.Contoso.Models; + +namespace Azure.ResourceManager.Contoso +{ + internal partial class EmployeesRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of EmployeesRestOperations. + /// 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 EmployeesRestOperations(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 ?? "2021-11-01"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string employeeName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Contoso/employees/", false); + uri.AppendPath(employeeName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string employeeName) + { + 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.Contoso/employees/", false); + uri.AppendPath(employeeName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get a Employee. + /// 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 Employee. + /// 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 employeeName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(employeeName, nameof(employeeName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, employeeName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + EmployeeData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = EmployeeData.DeserializeEmployeeData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((EmployeeData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get a Employee. + /// 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 Employee. + /// 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 employeeName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(employeeName, nameof(employeeName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, employeeName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + EmployeeData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = EmployeeData.DeserializeEmployeeData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((EmployeeData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, string resourceGroupName, string employeeName, EmployeeData 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.Contoso/employees/", false); + uri.AppendPath(employeeName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string employeeName, EmployeeData 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.Contoso/employees/", false); + uri.AppendPath(employeeName, 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 Employee. + /// 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 Employee. + /// 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 employeeName, EmployeeData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(employeeName, nameof(employeeName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, employeeName, 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 Employee. + /// 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 Employee. + /// 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 employeeName, EmployeeData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(employeeName, nameof(employeeName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, employeeName, 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 employeeName, EmployeeData 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.Contoso/employees/", false); + uri.AppendPath(employeeName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string employeeName, EmployeeData 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.Contoso/employees/", false); + uri.AppendPath(employeeName, 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 Employee. + /// 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 Employee. + /// 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 employeeName, EmployeeData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(employeeName, nameof(employeeName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, employeeName, data); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + EmployeeData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = EmployeeData.DeserializeEmployeeData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Update a Employee. + /// 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 Employee. + /// 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 employeeName, EmployeeData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(employeeName, nameof(employeeName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, employeeName, data); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + EmployeeData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = EmployeeData.DeserializeEmployeeData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string employeeName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Contoso/employees/", false); + uri.AppendPath(employeeName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string employeeName) + { + 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.Contoso/employees/", false); + uri.AppendPath(employeeName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Delete a Employee. + /// 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 Employee. + /// 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 employeeName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(employeeName, nameof(employeeName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, employeeName); + 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 Employee. + /// 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 Employee. + /// 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 employeeName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(employeeName, nameof(employeeName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, employeeName); + _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.Contoso/employees", 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.Contoso/employees", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List Employee 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: + { + EmployeeListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = EmployeeListResult.DeserializeEmployeeListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List Employee 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: + { + EmployeeListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = EmployeeListResult.DeserializeEmployeeListResult(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.Contoso/employees", 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.Contoso/employees", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List Employee 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: + { + EmployeeListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = EmployeeListResult.DeserializeEmployeeListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List Employee 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: + { + EmployeeListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = EmployeeListResult.DeserializeEmployeeListResult(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 Employee 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: + { + EmployeeListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = EmployeeListResult.DeserializeEmployeeListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List Employee 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: + { + EmployeeListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = EmployeeListResult.DeserializeEmployeeListResult(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 Employee 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: + { + EmployeeListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = EmployeeListResult.DeserializeEmployeeListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List Employee 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: + { + EmployeeListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = EmployeeListResult.DeserializeEmployeeListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/contoso/Azure.ResourceManager.Contoso/src/Properties/AssemblyInfo.cs b/sdk/contoso/Azure.ResourceManager.Contoso/src/Properties/AssemblyInfo.cs new file mode 100644 index 000000000000..113b6ed3d98f --- /dev/null +++ b/sdk/contoso/Azure.ResourceManager.Contoso/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.Contoso.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("Contoso")] diff --git a/sdk/contoso/Azure.ResourceManager.Contoso/tests/Azure.ResourceManager.Contoso.Tests.csproj b/sdk/contoso/Azure.ResourceManager.Contoso/tests/Azure.ResourceManager.Contoso.Tests.csproj new file mode 100644 index 000000000000..4b906ef77fda --- /dev/null +++ b/sdk/contoso/Azure.ResourceManager.Contoso/tests/Azure.ResourceManager.Contoso.Tests.csproj @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/sdk/contoso/Azure.ResourceManager.Contoso/tests/ContosoManagementTestBase.cs b/sdk/contoso/Azure.ResourceManager.Contoso/tests/ContosoManagementTestBase.cs new file mode 100644 index 000000000000..77599a7902fe --- /dev/null +++ b/sdk/contoso/Azure.ResourceManager.Contoso/tests/ContosoManagementTestBase.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.Contoso.Tests +{ + public class ContosoManagementTestBase : ManagementRecordedTestBase + { + protected ArmClient Client { get; private set; } + protected SubscriptionResource DefaultSubscription { get; private set; } + + protected ContosoManagementTestBase(bool isAsync, RecordedTestMode mode) + : base(isAsync, mode) + { + } + + protected ContosoManagementTestBase(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/contoso/Azure.ResourceManager.Contoso/tests/ContosoManagementTestEnvironment.cs b/sdk/contoso/Azure.ResourceManager.Contoso/tests/ContosoManagementTestEnvironment.cs new file mode 100644 index 000000000000..b1c4c91e35b3 --- /dev/null +++ b/sdk/contoso/Azure.ResourceManager.Contoso/tests/ContosoManagementTestEnvironment.cs @@ -0,0 +1,11 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using Azure.Core.TestFramework; + +namespace Azure.ResourceManager.Contoso.Tests +{ + public class ContosoManagementTestEnvironment : TestEnvironment + { + } +} diff --git a/sdk/contoso/Azure.ResourceManager.Contoso/tsp-location.yaml b/sdk/contoso/Azure.ResourceManager.Contoso/tsp-location.yaml new file mode 100644 index 000000000000..2f6610edead8 --- /dev/null +++ b/sdk/contoso/Azure.ResourceManager.Contoso/tsp-location.yaml @@ -0,0 +1,4 @@ +directory: specification/contosowidgetmanager/Contoso.Management +commit: 6e702986ee542ebd38d0ab2e2f2c00ab48a50b45 +repo: Azure/azure-rest-api-specs +additionalDirectories: diff --git a/sdk/contoso/ci.mgmt.yml b/sdk/contoso/ci.mgmt.yml new file mode 100644 index 000000000000..3485a663b46d --- /dev/null +++ b/sdk/contoso/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/contoso /ci.mgmt.yml + - sdk/contoso /Azure.ResourceManager.Contoso / + + +extends: + template: /eng/pipelines/templates/stages/archetype-sdk-client.yml + parameters: + ServiceDirectory: contoso + ArtifactName: packages + LimitForPullRequest: true + Artifacts: + - name: Azure.ResourceManager.Contoso + safeName: AzureResourceManagerContoso 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..49d2f93fbf79 --- /dev/null +++ b/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/tsp-location.yaml @@ -0,0 +1,4 @@ +directory: specification/databasefleetmanager/DatabaseFleetManager.Management +commit: 6e702986ee542ebd38d0ab2e2f2c00ab48a50b45 +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/databasewatcher/Azure.ResourceManager.DatabaseWatcher/tsp-location.yaml b/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/tsp-location.yaml index 878b7289e3ae..bbd01ad1e41f 100644 --- a/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/tsp-location.yaml +++ b/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/tsp-location.yaml @@ -1,3 +1,4 @@ directory: specification/databasewatcher/DatabaseWatcher.Management -commit: b0a48bcbffead733affe03944ef09f5e8d12f8c8 +commit: 6e702986ee542ebd38d0ab2e2f2c00ab48a50b45 repo: Azure/azure-rest-api-specs +additionalDirectories: diff --git a/sdk/deviceregistry/Azure.ResourceManager.DeviceRegistry/Configuration.json b/sdk/deviceregistry/Azure.ResourceManager.DeviceRegistry/Configuration.json new file mode 100644 index 000000000000..9f6a21c28492 --- /dev/null +++ b/sdk/deviceregistry/Azure.ResourceManager.DeviceRegistry/Configuration.json @@ -0,0 +1,12 @@ +{ + "output-folder": ".", + "namespace": "Azure.ResourceManager.DeviceRegistry", + "library-name": "Azure.ResourceManager.DeviceRegistry", + "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/deviceregistry/Azure.ResourceManager.DeviceRegistry/tsp-location.yaml b/sdk/deviceregistry/Azure.ResourceManager.DeviceRegistry/tsp-location.yaml index 0ed8a47dc49a..f9fa2951306b 100644 --- a/sdk/deviceregistry/Azure.ResourceManager.DeviceRegistry/tsp-location.yaml +++ b/sdk/deviceregistry/Azure.ResourceManager.DeviceRegistry/tsp-location.yaml @@ -1,3 +1,4 @@ -directory: specification\deviceregistry\DeviceRegistry.Management -commit: 462574dbd02088c209bb1da3eef0d93f699e8de2 +directory: specification/deviceregistry/DeviceRegistry.Management +commit: 6e702986ee542ebd38d0ab2e2f2c00ab48a50b45 repo: Azure/azure-rest-api-specs +additionalDirectories: diff --git a/sdk/deviceregistry/Azure.ResourceManager.DeviceRegistry/tspCodeModel.json b/sdk/deviceregistry/Azure.ResourceManager.DeviceRegistry/tspCodeModel.json new file mode 100644 index 000000000000..b578be27ca4d --- /dev/null +++ b/sdk/deviceregistry/Azure.ResourceManager.DeviceRegistry/tspCodeModel.json @@ -0,0 +1,24712 @@ +{ + "$id": "1", + "name": "Microsoft.DeviceRegistry", + "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.DeviceRegistry", + "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.DeviceRegistry", + "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": "DeviceRegistryTopicRetainType", + "crossLanguageDefinitionId": "Microsoft.DeviceRegistry.TopicRetainType", + "valueType": { + "$id": "15", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "16", + "kind": "enumvalue", + "name": "Keep", + "value": "Keep", + "valueType": { + "$id": "17", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "14" + }, + "doc": "Retain the messages.", + "decorators": [] + }, + { + "$id": "18", + "kind": "enumvalue", + "name": "Never", + "value": "Never", + "valueType": { + "$id": "19", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "14" + }, + "doc": "Never retain messages.", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.DeviceRegistry", + "doc": "Topic retain types.", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "20", + "kind": "enum", + "name": "DataPointObservabilityMode", + "crossLanguageDefinitionId": "Microsoft.DeviceRegistry.DataPointObservabilityMode", + "valueType": { + "$id": "21", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "22", + "kind": "enumvalue", + "name": "None", + "value": "None", + "valueType": { + "$id": "23", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "20" + }, + "doc": "No mapping to OpenTelemetry.", + "decorators": [] + }, + { + "$id": "24", + "kind": "enumvalue", + "name": "Counter", + "value": "Counter", + "valueType": { + "$id": "25", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "20" + }, + "doc": "Map as counter to OpenTelemetry.", + "decorators": [] + }, + { + "$id": "26", + "kind": "enumvalue", + "name": "Gauge", + "value": "Gauge", + "valueType": { + "$id": "27", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "20" + }, + "doc": "Map as gauge to OpenTelemetry.", + "decorators": [] + }, + { + "$id": "28", + "kind": "enumvalue", + "name": "Histogram", + "value": "Histogram", + "valueType": { + "$id": "29", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "20" + }, + "doc": "Map as histogram to OpenTelemetry.", + "decorators": [] + }, + { + "$id": "30", + "kind": "enumvalue", + "name": "Log", + "value": "Log", + "valueType": { + "$id": "31", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "20" + }, + "doc": "Map as log to OpenTelemetry.", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.DeviceRegistry", + "doc": "Defines the data point observability mode.", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "32", + "kind": "enum", + "name": "EventObservabilityMode", + "crossLanguageDefinitionId": "Microsoft.DeviceRegistry.EventObservabilityMode", + "valueType": { + "$id": "33", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "34", + "kind": "enumvalue", + "name": "None", + "value": "None", + "valueType": { + "$id": "35", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "32" + }, + "doc": "No mapping to OpenTelemetry.", + "decorators": [] + }, + { + "$id": "36", + "kind": "enumvalue", + "name": "Log", + "value": "Log", + "valueType": { + "$id": "37", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "32" + }, + "doc": "Map as log to OpenTelemetry.", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.DeviceRegistry", + "doc": "Defines the event observability mode.", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "38", + "kind": "enum", + "name": "DeviceRegistryProvisioningState", + "crossLanguageDefinitionId": "Microsoft.DeviceRegistry.ProvisioningState", + "valueType": { + "$id": "39", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "40", + "kind": "enumvalue", + "name": "Succeeded", + "value": "Succeeded", + "valueType": { + "$id": "41", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "38" + }, + "doc": "Resource has been created.", + "decorators": [] + }, + { + "$id": "42", + "kind": "enumvalue", + "name": "Failed", + "value": "Failed", + "valueType": { + "$id": "43", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "38" + }, + "doc": "Resource creation failed.", + "decorators": [] + }, + { + "$id": "44", + "kind": "enumvalue", + "name": "Canceled", + "value": "Canceled", + "valueType": { + "$id": "45", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "38" + }, + "doc": "Resource creation was canceled.", + "decorators": [] + }, + { + "$id": "46", + "kind": "enumvalue", + "name": "Accepted", + "value": "Accepted", + "valueType": { + "$id": "47", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "38" + }, + "doc": "Resource has been accepted by the server.", + "decorators": [] + }, + { + "$id": "48", + "kind": "enumvalue", + "name": "Deleting", + "value": "Deleting", + "valueType": { + "$id": "49", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "38" + }, + "doc": "Resource is deleting.", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.DeviceRegistry", + "doc": "The provisioning status of the resource.", + "isFixed": false, + "isFlags": false, + "usage": "Output,Json,LroInitial,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "50", + "kind": "enum", + "name": "createdByType", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.createdByType", + "valueType": { + "$id": "51", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "52", + "kind": "enumvalue", + "name": "User", + "value": "User", + "valueType": { + "$id": "53", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "50" + }, + "doc": "The entity was created by a user.", + "decorators": [] + }, + { + "$id": "54", + "kind": "enumvalue", + "name": "Application", + "value": "Application", + "valueType": { + "$id": "55", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "50" + }, + "doc": "The entity was created by an application.", + "decorators": [] + }, + { + "$id": "56", + "kind": "enumvalue", + "name": "ManagedIdentity", + "value": "ManagedIdentity", + "valueType": { + "$id": "57", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "50" + }, + "doc": "The entity was created by a managed identity.", + "decorators": [] + }, + { + "$id": "58", + "kind": "enumvalue", + "name": "Key", + "value": "Key", + "valueType": { + "$id": "59", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "50" + }, + "doc": "The entity was created by a key.", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.DeviceRegistry", + "doc": "The kind of entity that created the resource.", + "isFixed": false, + "isFlags": false, + "usage": "Output,Json,LroInitial,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "60", + "kind": "enum", + "name": "ResourceProvisioningState", + "crossLanguageDefinitionId": "Azure.ResourceManager.ResourceProvisioningState", + "valueType": { + "$id": "61", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "62", + "kind": "enumvalue", + "name": "Succeeded", + "value": "Succeeded", + "valueType": { + "$id": "63", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "60" + }, + "doc": "Resource has been created.", + "decorators": [] + }, + { + "$id": "64", + "kind": "enumvalue", + "name": "Failed", + "value": "Failed", + "valueType": { + "$id": "65", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "60" + }, + "doc": "Resource creation failed.", + "decorators": [] + }, + { + "$id": "66", + "kind": "enumvalue", + "name": "Canceled", + "value": "Canceled", + "valueType": { + "$id": "67", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "60" + }, + "doc": "Resource creation was canceled.", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.DeviceRegistry", + "doc": "The provisioning state of a resource type.", + "isFixed": false, + "isFlags": false, + "usage": "LroPolling", + "decorators": [] + }, + { + "$id": "68", + "kind": "enum", + "name": "AuthenticationMethod", + "crossLanguageDefinitionId": "Microsoft.DeviceRegistry.AuthenticationMethod", + "valueType": { + "$id": "69", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "70", + "kind": "enumvalue", + "name": "Anonymous", + "value": "Anonymous", + "valueType": { + "$id": "71", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "68" + }, + "doc": "The user authentication method is anonymous.", + "decorators": [] + }, + { + "$id": "72", + "kind": "enumvalue", + "name": "Certificate", + "value": "Certificate", + "valueType": { + "$id": "73", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "68" + }, + "doc": "The user authentication method is an x509 certificate.", + "decorators": [] + }, + { + "$id": "74", + "kind": "enumvalue", + "name": "UsernamePassword", + "value": "UsernamePassword", + "valueType": { + "$id": "75", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "68" + }, + "doc": "The user authentication method is a username and password.", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.DeviceRegistry", + "doc": "The method to authenticate the user of the client at the server.", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "76", + "kind": "enum", + "name": "Versions", + "crossLanguageDefinitionId": "Microsoft.DeviceRegistry.Versions", + "valueType": { + "$id": "77", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "78", + "kind": "enumvalue", + "name": "v2024_11_01", + "value": "2024-11-01", + "valueType": { + "$id": "79", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "76" + }, + "doc": "Microsoft.DeviceRegistry Resource Provider management API version 2024-11-01.", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.DeviceRegistry", + "doc": "Microsoft.DeviceRegistry Resource Provider supported API versions.", + "isFixed": true, + "isFlags": false, + "usage": "ApiVersionEnum", + "decorators": [] + } + ], + "models": [ + { + "$id": "80", + "kind": "model", + "name": "OperationListResult", + "namespace": "Azure.ResourceManager.DeviceRegistry", + "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": "81", + "kind": "property", + "name": "value", + "serializedName": "value", + "doc": "The Operation items on this page", + "type": { + "$id": "82", + "kind": "array", + "name": "ArrayOperation", + "valueType": { + "$id": "83", + "kind": "model", + "name": "Operation", + "namespace": "Azure.ResourceManager.DeviceRegistry", + "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": "84", + "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": "85", + "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": "86", + "json": { + "$id": "87", + "name": "name" + } + } + }, + { + "$id": "88", + "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": "89", + "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": "90", + "json": { + "$id": "91", + "name": "isDataAction" + } + } + }, + { + "$id": "92", + "kind": "property", + "name": "display", + "serializedName": "display", + "doc": "Localized display information for this particular operation.", + "type": { + "$id": "93", + "kind": "model", + "name": "OperationDisplay", + "namespace": "Azure.ResourceManager.DeviceRegistry", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.OperationDisplay", + "usage": "Output,Json", + "doc": "Localized display information for and operation.", + "decorators": [], + "properties": [ + { + "$id": "94", + "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": "95", + "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": "96", + "json": { + "$id": "97", + "name": "provider" + } + } + }, + { + "$id": "98", + "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": "99", + "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": "100", + "json": { + "$id": "101", + "name": "resource" + } + } + }, + { + "$id": "102", + "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": "103", + "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": "104", + "json": { + "$id": "105", + "name": "operation" + } + } + }, + { + "$id": "106", + "kind": "property", + "name": "description", + "serializedName": "description", + "doc": "The short, localized friendly description of the operation; suitable for tool tips and detailed views.", + "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.description", + "serializationOptions": { + "$id": "108", + "json": { + "$id": "109", + "name": "description" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.Operation.display", + "serializationOptions": { + "$id": "110", + "json": { + "$id": "111", + "name": "display" + } + } + }, + { + "$id": "112", + "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": "113", + "json": { + "$id": "114", + "name": "origin" + } + } + }, + { + "$id": "115", + "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": "116", + "json": { + "$id": "117", + "name": "actionType" + } + } + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.OperationListResult.value", + "serializationOptions": { + "$id": "118", + "json": { + "$id": "119", + "name": "value" + } + } + }, + { + "$id": "120", + "kind": "property", + "name": "nextLink", + "serializedName": "nextLink", + "doc": "The link to the next page of items", + "type": { + "$id": "121", + "kind": "url", + "name": "ResourceLocation", + "crossLanguageDefinitionId": "TypeSpec.Rest.ResourceLocation", + "baseType": { + "$id": "122", + "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": "123", + "json": { + "$id": "124", + "name": "nextLink" + } + } + } + ] + }, + { + "$ref": "83" + }, + { + "$ref": "93" + }, + { + "$id": "125", + "kind": "model", + "name": "ErrorResponse", + "namespace": "Azure.ResourceManager.DeviceRegistry", + "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": "126", + "kind": "property", + "name": "error", + "serializedName": "error", + "doc": "The error object.", + "type": { + "$id": "127", + "kind": "model", + "name": "ErrorDetail", + "namespace": "Azure.ResourceManager.DeviceRegistry", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorDetail", + "usage": "Json,Exception,LroPolling", + "doc": "The error detail.", + "decorators": [], + "properties": [ + { + "$id": "128", + "kind": "property", + "name": "code", + "serializedName": "code", + "doc": "The error code.", + "type": { + "$id": "129", + "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": "130", + "json": { + "$id": "131", + "name": "code" + } + } + }, + { + "$id": "132", + "kind": "property", + "name": "message", + "serializedName": "message", + "doc": "The error message.", + "type": { + "$id": "133", + "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": "134", + "json": { + "$id": "135", + "name": "message" + } + } + }, + { + "$id": "136", + "kind": "property", + "name": "target", + "serializedName": "target", + "doc": "The error target.", + "type": { + "$id": "137", + "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": "138", + "json": { + "$id": "139", + "name": "target" + } + } + }, + { + "$id": "140", + "kind": "property", + "name": "details", + "serializedName": "details", + "doc": "The error details.", + "type": { + "$id": "141", + "kind": "array", + "name": "ArrayErrorDetail", + "valueType": { + "$ref": "127" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorDetail.details", + "serializationOptions": { + "$id": "142", + "json": { + "$id": "143", + "name": "details" + } + } + }, + { + "$id": "144", + "kind": "property", + "name": "additionalInfo", + "serializedName": "additionalInfo", + "doc": "The error additional info.", + "type": { + "$id": "145", + "kind": "array", + "name": "ArrayErrorAdditionalInfo", + "valueType": { + "$id": "146", + "kind": "model", + "name": "ErrorAdditionalInfo", + "namespace": "Azure.ResourceManager.DeviceRegistry", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorAdditionalInfo", + "usage": "Json,Exception,LroPolling", + "doc": "The resource management error additional info.", + "decorators": [], + "properties": [ + { + "$id": "147", + "kind": "property", + "name": "type", + "serializedName": "type", + "doc": "The additional info type.", + "type": { + "$id": "148", + "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": "149", + "json": { + "$id": "150", + "name": "type" + } + } + }, + { + "$id": "151", + "kind": "property", + "name": "info", + "serializedName": "info", + "doc": "The additional info.", + "type": { + "$id": "152", + "kind": "model", + "name": "ErrorAdditionalInfoInfo", + "namespace": "Azure.ResourceManager.DeviceRegistry", + "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": "153", + "json": { + "$id": "154", + "name": "info" + } + } + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorDetail.additionalInfo", + "serializationOptions": { + "$id": "155", + "json": { + "$id": "156", + "name": "additionalInfo" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorResponse.error", + "serializationOptions": { + "$id": "157", + "json": { + "$id": "158", + "name": "error" + } + } + } + ] + }, + { + "$ref": "127" + }, + { + "$ref": "146" + }, + { + "$ref": "152" + }, + { + "$id": "159", + "kind": "model", + "name": "DeviceRegistryAsset", + "namespace": "Azure.ResourceManager.DeviceRegistry", + "crossLanguageDefinitionId": "Microsoft.DeviceRegistry.Asset", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Asset definition.", + "decorators": [], + "baseModel": { + "$id": "160", + "kind": "model", + "name": "TrackedResource", + "namespace": "Azure.ResourceManager.DeviceRegistry", + "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": "161", + "kind": "model", + "name": "Resource", + "namespace": "Azure.ResourceManager.DeviceRegistry", + "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": "162", + "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": "163", + "kind": "string", + "name": "armResourceIdentifier", + "crossLanguageDefinitionId": "Azure.Core.armResourceIdentifier", + "baseType": { + "$id": "164", + "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": "165", + "json": { + "$id": "166", + "name": "id" + } + } + }, + { + "$id": "167", + "kind": "property", + "name": "name", + "serializedName": "name", + "doc": "The name of the resource", + "type": { + "$id": "168", + "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": "169", + "json": { + "$id": "170", + "name": "name" + } + } + }, + { + "$id": "171", + "kind": "property", + "name": "type", + "serializedName": "type", + "doc": "The type of the resource. E.g. \"Microsoft.Compute/virtualMachines\" or \"Microsoft.Storage/storageAccounts\"", + "type": { + "$id": "172", + "kind": "string", + "name": "armResourceType", + "crossLanguageDefinitionId": "Azure.Core.armResourceType", + "baseType": { + "$id": "173", + "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": "174", + "json": { + "$id": "175", + "name": "type" + } + } + }, + { + "$id": "176", + "kind": "property", + "name": "systemData", + "serializedName": "systemData", + "doc": "Azure Resource Manager metadata containing createdBy and modifiedBy information.", + "type": { + "$id": "177", + "kind": "model", + "name": "SystemData", + "namespace": "Azure.ResourceManager.DeviceRegistry", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.SystemData", + "usage": "Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Metadata pertaining to creation and last modification of the resource.", + "decorators": [], + "properties": [ + { + "$id": "178", + "kind": "property", + "name": "createdBy", + "serializedName": "createdBy", + "doc": "The identity that created the resource.", + "type": { + "$id": "179", + "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": "180", + "json": { + "$id": "181", + "name": "createdBy" + } + } + }, + { + "$id": "182", + "kind": "property", + "name": "createdByType", + "serializedName": "createdByType", + "doc": "The type of identity that created the resource.", + "type": { + "$ref": "50" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.SystemData.createdByType", + "serializationOptions": { + "$id": "183", + "json": { + "$id": "184", + "name": "createdByType" + } + } + }, + { + "$id": "185", + "kind": "property", + "name": "createdAt", + "serializedName": "createdAt", + "doc": "The timestamp of resource creation (UTC).", + "type": { + "$id": "186", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "rfc3339", + "wireType": { + "$id": "187", + "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": "188", + "json": { + "$id": "189", + "name": "createdAt" + } + } + }, + { + "$id": "190", + "kind": "property", + "name": "lastModifiedBy", + "serializedName": "lastModifiedBy", + "doc": "The identity that last modified 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.lastModifiedBy", + "serializationOptions": { + "$id": "192", + "json": { + "$id": "193", + "name": "lastModifiedBy" + } + } + }, + { + "$id": "194", + "kind": "property", + "name": "lastModifiedByType", + "serializedName": "lastModifiedByType", + "doc": "The type of identity that last modified the resource.", + "type": { + "$ref": "50" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.SystemData.lastModifiedByType", + "serializationOptions": { + "$id": "195", + "json": { + "$id": "196", + "name": "lastModifiedByType" + } + } + }, + { + "$id": "197", + "kind": "property", + "name": "lastModifiedAt", + "serializedName": "lastModifiedAt", + "doc": "The timestamp of resource last modification (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.lastModifiedAt", + "serializationOptions": { + "$id": "200", + "json": { + "$id": "201", + "name": "lastModifiedAt" + } + } + } + ] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.Resource.systemData", + "serializationOptions": { + "$id": "202", + "json": { + "$id": "203", + "name": "systemData" + } + } + } + ] + }, + "properties": [ + { + "$id": "204", + "kind": "property", + "name": "tags", + "serializedName": "tags", + "doc": "Resource tags.", + "type": { + "$id": "205", + "kind": "dict", + "keyType": { + "$id": "206", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "valueType": { + "$id": "207", + "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": "208", + "json": { + "$id": "209", + "name": "tags" + } + } + }, + { + "$id": "210", + "kind": "property", + "name": "location", + "serializedName": "location", + "doc": "The geo-location where the resource lives", + "type": { + "$id": "211", + "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": "212", + "json": { + "$id": "213", + "name": "location" + } + } + } + ] + }, + "properties": [ + { + "$id": "214", + "kind": "property", + "name": "properties", + "serializedName": "properties", + "doc": "The resource-specific properties for this resource.", + "type": { + "$id": "215", + "kind": "model", + "name": "AssetProperties", + "namespace": "Azure.ResourceManager.DeviceRegistry", + "crossLanguageDefinitionId": "Microsoft.DeviceRegistry.AssetProperties", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Defines the asset properties.", + "decorators": [], + "properties": [ + { + "$id": "216", + "kind": "property", + "name": "uuid", + "serializedName": "uuid", + "doc": "Globally unique, immutable, non-reusable id.", + "type": { + "$id": "217", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.DeviceRegistry.AssetProperties.uuid", + "serializationOptions": { + "$id": "218", + "json": { + "$id": "219", + "name": "uuid" + } + } + }, + { + "$id": "220", + "kind": "property", + "name": "IsEnabled", + "serializedName": "enabled", + "doc": "Enabled/Disabled status of the asset.", + "type": { + "$id": "221", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.DeviceRegistry.AssetProperties.enabled", + "serializationOptions": { + "$id": "222", + "json": { + "$id": "223", + "name": "enabled" + } + } + }, + { + "$id": "224", + "kind": "property", + "name": "externalAssetId", + "serializedName": "externalAssetId", + "doc": "Asset id provided by the customer.", + "type": { + "$id": "225", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.DeviceRegistry.AssetProperties.externalAssetId", + "serializationOptions": { + "$id": "226", + "json": { + "$id": "227", + "name": "externalAssetId" + } + } + }, + { + "$id": "228", + "kind": "property", + "name": "displayName", + "serializedName": "displayName", + "doc": "Human-readable display name.", + "type": { + "$id": "229", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.DeviceRegistry.AssetProperties.displayName", + "serializationOptions": { + "$id": "230", + "json": { + "$id": "231", + "name": "displayName" + } + } + }, + { + "$id": "232", + "kind": "property", + "name": "description", + "serializedName": "description", + "doc": "Human-readable description of the asset.", + "type": { + "$id": "233", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.DeviceRegistry.AssetProperties.description", + "serializationOptions": { + "$id": "234", + "json": { + "$id": "235", + "name": "description" + } + } + }, + { + "$id": "236", + "kind": "property", + "name": "assetEndpointProfileRef", + "serializedName": "assetEndpointProfileRef", + "doc": "A reference to the asset endpoint profile (connection information) used by brokers to connect to an endpoint that provides data points for this asset. Must provide asset endpoint profile name.", + "type": { + "$id": "237", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.DeviceRegistry.AssetProperties.assetEndpointProfileRef", + "serializationOptions": { + "$id": "238", + "json": { + "$id": "239", + "name": "assetEndpointProfileRef" + } + } + }, + { + "$id": "240", + "kind": "property", + "name": "version", + "serializedName": "version", + "doc": "An integer that is incremented each time the resource is modified.", + "type": { + "$id": "241", + "kind": "int64", + "name": "int64", + "crossLanguageDefinitionId": "TypeSpec.int64", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.DeviceRegistry.AssetProperties.version", + "serializationOptions": { + "$id": "242", + "json": { + "$id": "243", + "name": "version" + } + } + }, + { + "$id": "244", + "kind": "property", + "name": "manufacturer", + "serializedName": "manufacturer", + "doc": "Asset manufacturer name.", + "type": { + "$id": "245", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.DeviceRegistry.AssetProperties.manufacturer", + "serializationOptions": { + "$id": "246", + "json": { + "$id": "247", + "name": "manufacturer" + } + } + }, + { + "$id": "248", + "kind": "property", + "name": "manufacturerUri", + "serializedName": "manufacturerUri", + "doc": "Asset manufacturer URI.", + "type": { + "$id": "249", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.DeviceRegistry.AssetProperties.manufacturerUri", + "serializationOptions": { + "$id": "250", + "json": { + "$id": "251", + "name": "manufacturerUri" + } + } + }, + { + "$id": "252", + "kind": "property", + "name": "model", + "serializedName": "model", + "doc": "Asset model name.", + "type": { + "$id": "253", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.DeviceRegistry.AssetProperties.model", + "serializationOptions": { + "$id": "254", + "json": { + "$id": "255", + "name": "model" + } + } + }, + { + "$id": "256", + "kind": "property", + "name": "productCode", + "serializedName": "productCode", + "doc": "Asset product code.", + "type": { + "$id": "257", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.DeviceRegistry.AssetProperties.productCode", + "serializationOptions": { + "$id": "258", + "json": { + "$id": "259", + "name": "productCode" + } + } + }, + { + "$id": "260", + "kind": "property", + "name": "hardwareRevision", + "serializedName": "hardwareRevision", + "doc": "Revision number of the hardware.", + "type": { + "$id": "261", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.DeviceRegistry.AssetProperties.hardwareRevision", + "serializationOptions": { + "$id": "262", + "json": { + "$id": "263", + "name": "hardwareRevision" + } + } + }, + { + "$id": "264", + "kind": "property", + "name": "softwareRevision", + "serializedName": "softwareRevision", + "doc": "Revision number of the software.", + "type": { + "$id": "265", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.DeviceRegistry.AssetProperties.softwareRevision", + "serializationOptions": { + "$id": "266", + "json": { + "$id": "267", + "name": "softwareRevision" + } + } + }, + { + "$id": "268", + "kind": "property", + "name": "documentationUri", + "serializedName": "documentationUri", + "doc": "Reference to the documentation.", + "type": { + "$id": "269", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.DeviceRegistry.AssetProperties.documentationUri", + "serializationOptions": { + "$id": "270", + "json": { + "$id": "271", + "name": "documentationUri" + } + } + }, + { + "$id": "272", + "kind": "property", + "name": "serialNumber", + "serializedName": "serialNumber", + "doc": "Asset serial number.", + "type": { + "$id": "273", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.DeviceRegistry.AssetProperties.serialNumber", + "serializationOptions": { + "$id": "274", + "json": { + "$id": "275", + "name": "serialNumber" + } + } + }, + { + "$id": "276", + "kind": "property", + "name": "attributes", + "serializedName": "attributes", + "doc": "A set of key-value pairs that contain custom attributes set by the customer.", + "type": { + "$id": "277", + "kind": "dict", + "keyType": { + "$id": "278", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "valueType": { + "$id": "279", + "kind": "unknown", + "name": "unknown", + "crossLanguageDefinitionId": "", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.DeviceRegistry.AssetProperties.attributes", + "serializationOptions": { + "$id": "280", + "json": { + "$id": "281", + "name": "attributes" + } + } + }, + { + "$id": "282", + "kind": "property", + "name": "discoveredAssetRefs", + "serializedName": "discoveredAssetRefs", + "doc": "Reference to a list of discovered assets. Populated only if the asset has been created from discovery flow. Discovered asset names must be provided.", + "type": { + "$id": "283", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "284", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.DeviceRegistry.AssetProperties.discoveredAssetRefs", + "serializationOptions": { + "$id": "285", + "json": { + "$id": "286", + "name": "discoveredAssetRefs" + } + } + }, + { + "$id": "287", + "kind": "property", + "name": "defaultDatasetsConfiguration", + "serializedName": "defaultDatasetsConfiguration", + "doc": "Stringified JSON that contains connector-specific default configuration for all datasets. Each dataset can have its own configuration that overrides the default settings here.", + "type": { + "$id": "288", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.DeviceRegistry.AssetProperties.defaultDatasetsConfiguration", + "serializationOptions": { + "$id": "289", + "json": { + "$id": "290", + "name": "defaultDatasetsConfiguration" + } + } + }, + { + "$id": "291", + "kind": "property", + "name": "defaultEventsConfiguration", + "serializedName": "defaultEventsConfiguration", + "doc": "Stringified JSON that contains connector-specific default configuration for all events. Each event can have its own configuration that overrides the default settings here.", + "type": { + "$id": "292", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.DeviceRegistry.AssetProperties.defaultEventsConfiguration", + "serializationOptions": { + "$id": "293", + "json": { + "$id": "294", + "name": "defaultEventsConfiguration" + } + } + }, + { + "$id": "295", + "kind": "property", + "name": "defaultTopic", + "serializedName": "defaultTopic", + "doc": "Object that describes the default topic information for the asset.", + "type": { + "$id": "296", + "kind": "model", + "name": "DeviceRegistryTopic", + "namespace": "Azure.ResourceManager.DeviceRegistry", + "crossLanguageDefinitionId": "Microsoft.DeviceRegistry.Topic", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Object that describes the topic information.", + "decorators": [], + "properties": [ + { + "$id": "297", + "kind": "property", + "name": "path", + "serializedName": "path", + "doc": "The topic path for messages published to an MQTT broker.", + "type": { + "$id": "298", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.DeviceRegistry.Topic.path", + "serializationOptions": { + "$id": "299", + "json": { + "$id": "300", + "name": "path" + } + } + }, + { + "$id": "301", + "kind": "property", + "name": "retain", + "serializedName": "retain", + "doc": "When set to 'Keep', messages published to an MQTT broker will have the retain flag set. Default: 'Never'.", + "type": { + "$ref": "14" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.DeviceRegistry.Topic.retain", + "serializationOptions": { + "$id": "302", + "json": { + "$id": "303", + "name": "retain" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.DeviceRegistry.AssetProperties.defaultTopic", + "serializationOptions": { + "$id": "304", + "json": { + "$id": "305", + "name": "defaultTopic" + } + } + }, + { + "$id": "306", + "kind": "property", + "name": "datasets", + "serializedName": "datasets", + "doc": "Array of datasets that are part of the asset. Each dataset describes the data points that make up the set.", + "type": { + "$id": "307", + "kind": "array", + "name": "ArrayDataset", + "valueType": { + "$id": "308", + "kind": "model", + "name": "DeviceRegistryDataset", + "namespace": "Azure.ResourceManager.DeviceRegistry", + "crossLanguageDefinitionId": "Microsoft.DeviceRegistry.Dataset", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Defines the dataset properties.", + "decorators": [], + "properties": [ + { + "$id": "309", + "kind": "property", + "name": "name", + "serializedName": "name", + "doc": "Name of the dataset.", + "type": { + "$id": "310", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.DeviceRegistry.Dataset.name", + "serializationOptions": { + "$id": "311", + "json": { + "$id": "312", + "name": "name" + } + } + }, + { + "$id": "313", + "kind": "property", + "name": "datasetConfiguration", + "serializedName": "datasetConfiguration", + "doc": "Stringified JSON that contains connector-specific JSON string that describes configuration for the specific dataset.", + "type": { + "$id": "314", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.DeviceRegistry.Dataset.datasetConfiguration", + "serializationOptions": { + "$id": "315", + "json": { + "$id": "316", + "name": "datasetConfiguration" + } + } + }, + { + "$id": "317", + "kind": "property", + "name": "topic", + "serializedName": "topic", + "doc": "Object that describes the topic information for the specific dataset.", + "type": { + "$ref": "296" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.DeviceRegistry.Dataset.topic", + "serializationOptions": { + "$id": "318", + "json": { + "$id": "319", + "name": "topic" + } + } + }, + { + "$id": "320", + "kind": "property", + "name": "dataPoints", + "serializedName": "dataPoints", + "doc": "Array of data points that are part of the dataset. Each data point can have per-data point configuration.", + "type": { + "$id": "321", + "kind": "array", + "name": "ArrayDataPoint", + "valueType": { + "$id": "322", + "kind": "model", + "name": "DeviceRegistryDataPoint", + "namespace": "Azure.ResourceManager.DeviceRegistry", + "crossLanguageDefinitionId": "Microsoft.DeviceRegistry.DataPoint", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Defines the data point properties.", + "decorators": [], + "baseModel": { + "$id": "323", + "kind": "model", + "name": "DeviceRegistryDataPointBase", + "namespace": "Azure.ResourceManager.DeviceRegistry", + "crossLanguageDefinitionId": "Microsoft.DeviceRegistry.DataPointBase", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Defines the data point properties.", + "decorators": [], + "properties": [ + { + "$id": "324", + "kind": "property", + "name": "name", + "serializedName": "name", + "doc": "The name of the data point.", + "type": { + "$id": "325", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.DeviceRegistry.DataPointBase.name", + "serializationOptions": { + "$id": "326", + "json": { + "$id": "327", + "name": "name" + } + } + }, + { + "$id": "328", + "kind": "property", + "name": "dataSource", + "serializedName": "dataSource", + "doc": "The address of the source of the data in the asset (e.g. URL) so that a client can access the data source on the asset.", + "type": { + "$id": "329", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.DeviceRegistry.DataPointBase.dataSource", + "serializationOptions": { + "$id": "330", + "json": { + "$id": "331", + "name": "dataSource" + } + } + }, + { + "$id": "332", + "kind": "property", + "name": "dataPointConfiguration", + "serializedName": "dataPointConfiguration", + "doc": "Stringified JSON that contains connector-specific configuration for the data point. For OPC UA, this could include configuration like, publishingInterval, samplingInterval, and queueSize.", + "type": { + "$id": "333", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.DeviceRegistry.DataPointBase.dataPointConfiguration", + "serializationOptions": { + "$id": "334", + "json": { + "$id": "335", + "name": "dataPointConfiguration" + } + } + } + ] + }, + "properties": [ + { + "$id": "336", + "kind": "property", + "name": "observabilityMode", + "serializedName": "observabilityMode", + "doc": "An indication of how the data point should be mapped to OpenTelemetry.", + "type": { + "$ref": "20" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.DeviceRegistry.DataPoint.observabilityMode", + "serializationOptions": { + "$id": "337", + "json": { + "$id": "338", + "name": "observabilityMode" + } + } + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.DeviceRegistry.Dataset.dataPoints", + "serializationOptions": { + "$id": "339", + "json": { + "$id": "340", + "name": "dataPoints" + } + } + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.DeviceRegistry.AssetProperties.datasets", + "serializationOptions": { + "$id": "341", + "json": { + "$id": "342", + "name": "datasets" + } + } + }, + { + "$id": "343", + "kind": "property", + "name": "events", + "serializedName": "events", + "doc": "Array of events that are part of the asset. Each event can have per-event configuration.", + "type": { + "$id": "344", + "kind": "array", + "name": "ArrayEvent", + "valueType": { + "$id": "345", + "kind": "model", + "name": "DeviceRegistryEvent", + "namespace": "Azure.ResourceManager.DeviceRegistry", + "crossLanguageDefinitionId": "Microsoft.DeviceRegistry.Event", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Defines the event properties.", + "decorators": [], + "baseModel": { + "$id": "346", + "kind": "model", + "name": "DeviceRegistryEventBase", + "namespace": "Azure.ResourceManager.DeviceRegistry", + "crossLanguageDefinitionId": "Microsoft.DeviceRegistry.EventBase", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Defines the event properties.", + "decorators": [], + "properties": [ + { + "$id": "347", + "kind": "property", + "name": "name", + "serializedName": "name", + "doc": "The name of the event.", + "type": { + "$id": "348", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.DeviceRegistry.EventBase.name", + "serializationOptions": { + "$id": "349", + "json": { + "$id": "350", + "name": "name" + } + } + }, + { + "$id": "351", + "kind": "property", + "name": "eventNotifier", + "serializedName": "eventNotifier", + "doc": "The address of the notifier of the event in the asset (e.g. URL) so that a client can access the event on the asset.", + "type": { + "$id": "352", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.DeviceRegistry.EventBase.eventNotifier", + "serializationOptions": { + "$id": "353", + "json": { + "$id": "354", + "name": "eventNotifier" + } + } + }, + { + "$id": "355", + "kind": "property", + "name": "eventConfiguration", + "serializedName": "eventConfiguration", + "doc": "Stringified JSON that contains connector-specific configuration for the event. For OPC UA, this could include configuration like, publishingInterval, samplingInterval, and queueSize.", + "type": { + "$id": "356", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.DeviceRegistry.EventBase.eventConfiguration", + "serializationOptions": { + "$id": "357", + "json": { + "$id": "358", + "name": "eventConfiguration" + } + } + }, + { + "$id": "359", + "kind": "property", + "name": "topic", + "serializedName": "topic", + "doc": "Object that describes the topic information for the specific event.", + "type": { + "$ref": "296" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.DeviceRegistry.EventBase.topic", + "serializationOptions": { + "$id": "360", + "json": { + "$id": "361", + "name": "topic" + } + } + } + ] + }, + "properties": [ + { + "$id": "362", + "kind": "property", + "name": "observabilityMode", + "serializedName": "observabilityMode", + "doc": "An indication of how the event should be mapped to OpenTelemetry.", + "type": { + "$ref": "32" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.DeviceRegistry.Event.observabilityMode", + "serializationOptions": { + "$id": "363", + "json": { + "$id": "364", + "name": "observabilityMode" + } + } + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.DeviceRegistry.AssetProperties.events", + "serializationOptions": { + "$id": "365", + "json": { + "$id": "366", + "name": "events" + } + } + }, + { + "$id": "367", + "kind": "property", + "name": "status", + "serializedName": "status", + "doc": "Read only object to reflect changes that have occurred on the Edge. Similar to Kubernetes status property for custom resources.", + "type": { + "$id": "368", + "kind": "model", + "name": "DeviceRegistryAssetStatus", + "namespace": "Azure.ResourceManager.DeviceRegistry", + "crossLanguageDefinitionId": "Microsoft.DeviceRegistry.AssetStatus", + "usage": "Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Defines the asset status properties.", + "decorators": [], + "properties": [ + { + "$id": "369", + "kind": "property", + "name": "errors", + "serializedName": "errors", + "doc": "Array object to transfer and persist errors that originate from the Edge.", + "type": { + "$id": "370", + "kind": "array", + "name": "ArrayAssetStatusError", + "valueType": { + "$id": "371", + "kind": "model", + "name": "DeviceRegistryAssetStatusError", + "namespace": "Azure.ResourceManager.DeviceRegistry", + "crossLanguageDefinitionId": "Microsoft.DeviceRegistry.AssetStatusError", + "usage": "Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Defines the asset status error properties.", + "decorators": [], + "properties": [ + { + "$id": "372", + "kind": "property", + "name": "code", + "serializedName": "code", + "doc": "Error code for classification of errors (ex: 400, 404, 500, etc.).", + "type": { + "$id": "373", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.DeviceRegistry.AssetStatusError.code", + "serializationOptions": { + "$id": "374", + "json": { + "$id": "375", + "name": "code" + } + } + }, + { + "$id": "376", + "kind": "property", + "name": "message", + "serializedName": "message", + "doc": "Human readable helpful error message to provide additional context for error (ex: “capability Id 'foo' does not exist”).", + "type": { + "$id": "377", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.DeviceRegistry.AssetStatusError.message", + "serializationOptions": { + "$id": "378", + "json": { + "$id": "379", + "name": "message" + } + } + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.DeviceRegistry.AssetStatus.errors", + "serializationOptions": { + "$id": "380", + "json": { + "$id": "381", + "name": "errors" + } + } + }, + { + "$id": "382", + "kind": "property", + "name": "version", + "serializedName": "version", + "doc": "A read only incremental counter indicating the number of times the configuration has been modified from the perspective of the current actual (Edge) state of the Asset. Edge would be the only writer of this value and would sync back up to the cloud. In steady state, this should equal version.", + "type": { + "$id": "383", + "kind": "int64", + "name": "int64", + "crossLanguageDefinitionId": "TypeSpec.int64", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.DeviceRegistry.AssetStatus.version", + "serializationOptions": { + "$id": "384", + "json": { + "$id": "385", + "name": "version" + } + } + }, + { + "$id": "386", + "kind": "property", + "name": "datasets", + "serializedName": "datasets", + "doc": "Array of dataset statuses that describe the status of each dataset.", + "type": { + "$id": "387", + "kind": "array", + "name": "ArrayAssetStatusDataset", + "valueType": { + "$id": "388", + "kind": "model", + "name": "DeviceRegistryAssetStatusDataset", + "namespace": "Azure.ResourceManager.DeviceRegistry", + "crossLanguageDefinitionId": "Microsoft.DeviceRegistry.AssetStatusDataset", + "usage": "Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Defines the asset status dataset properties.", + "decorators": [], + "properties": [ + { + "$id": "389", + "kind": "property", + "name": "name", + "serializedName": "name", + "doc": "The name of the dataset. Must be unique within the status.datasets array. This name is used to correlate between the spec and status dataset information.", + "type": { + "$id": "390", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.DeviceRegistry.AssetStatusDataset.name", + "serializationOptions": { + "$id": "391", + "json": { + "$id": "392", + "name": "name" + } + } + }, + { + "$id": "393", + "kind": "property", + "name": "messageSchemaReference", + "serializedName": "messageSchemaReference", + "doc": "The message schema reference object.", + "type": { + "$id": "394", + "kind": "model", + "name": "MessageSchemaReference", + "namespace": "Azure.ResourceManager.DeviceRegistry", + "crossLanguageDefinitionId": "Microsoft.DeviceRegistry.MessageSchemaReference", + "usage": "Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Defines the message schema reference properties.", + "decorators": [], + "properties": [ + { + "$id": "395", + "kind": "property", + "name": "schemaRegistryNamespace", + "serializedName": "schemaRegistryNamespace", + "doc": "The message schema registry namespace.", + "type": { + "$id": "396", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.DeviceRegistry.MessageSchemaReference.schemaRegistryNamespace", + "serializationOptions": { + "$id": "397", + "json": { + "$id": "398", + "name": "schemaRegistryNamespace" + } + } + }, + { + "$id": "399", + "kind": "property", + "name": "schemaName", + "serializedName": "schemaName", + "doc": "The message schema name.", + "type": { + "$id": "400", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.DeviceRegistry.MessageSchemaReference.schemaName", + "serializationOptions": { + "$id": "401", + "json": { + "$id": "402", + "name": "schemaName" + } + } + }, + { + "$id": "403", + "kind": "property", + "name": "schemaVersion", + "serializedName": "schemaVersion", + "doc": "The message schema version.", + "type": { + "$id": "404", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.DeviceRegistry.MessageSchemaReference.schemaVersion", + "serializationOptions": { + "$id": "405", + "json": { + "$id": "406", + "name": "schemaVersion" + } + } + } + ] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.DeviceRegistry.AssetStatusDataset.messageSchemaReference", + "serializationOptions": { + "$id": "407", + "json": { + "$id": "408", + "name": "messageSchemaReference" + } + } + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.DeviceRegistry.AssetStatus.datasets", + "serializationOptions": { + "$id": "409", + "json": { + "$id": "410", + "name": "datasets" + } + } + }, + { + "$id": "411", + "kind": "property", + "name": "events", + "serializedName": "events", + "doc": "Array of event statuses that describe the status of each event.", + "type": { + "$id": "412", + "kind": "array", + "name": "ArrayAssetStatusEvent", + "valueType": { + "$id": "413", + "kind": "model", + "name": "DeviceRegistryAssetStatusEvent", + "namespace": "Azure.ResourceManager.DeviceRegistry", + "crossLanguageDefinitionId": "Microsoft.DeviceRegistry.AssetStatusEvent", + "usage": "Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Defines the asset status event properties.", + "decorators": [], + "properties": [ + { + "$id": "414", + "kind": "property", + "name": "name", + "serializedName": "name", + "doc": "The name of the event. Must be unique within the status.events array. This name is used to correlate between the spec and status event information.", + "type": { + "$id": "415", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.DeviceRegistry.AssetStatusEvent.name", + "serializationOptions": { + "$id": "416", + "json": { + "$id": "417", + "name": "name" + } + } + }, + { + "$id": "418", + "kind": "property", + "name": "messageSchemaReference", + "serializedName": "messageSchemaReference", + "doc": "The message schema reference object.", + "type": { + "$ref": "394" + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.DeviceRegistry.AssetStatusEvent.messageSchemaReference", + "serializationOptions": { + "$id": "419", + "json": { + "$id": "420", + "name": "messageSchemaReference" + } + } + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.DeviceRegistry.AssetStatus.events", + "serializationOptions": { + "$id": "421", + "json": { + "$id": "422", + "name": "events" + } + } + } + ] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.DeviceRegistry.AssetProperties.status", + "serializationOptions": { + "$id": "423", + "json": { + "$id": "424", + "name": "status" + } + } + }, + { + "$id": "425", + "kind": "property", + "name": "provisioningState", + "serializedName": "provisioningState", + "doc": "Provisioning state of the resource.", + "type": { + "$ref": "38" + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.DeviceRegistry.AssetProperties.provisioningState", + "serializationOptions": { + "$id": "426", + "json": { + "$id": "427", + "name": "provisioningState" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.DeviceRegistry.Asset.properties", + "serializationOptions": { + "$id": "428", + "json": { + "$id": "429", + "name": "properties" + } + } + }, + { + "$id": "430", + "kind": "property", + "name": "extendedLocation", + "serializedName": "extendedLocation", + "doc": "The extended location.", + "type": { + "$id": "431", + "kind": "model", + "name": "DeviceRegistryExtendedLocation", + "namespace": "Azure.ResourceManager.DeviceRegistry", + "crossLanguageDefinitionId": "Microsoft.DeviceRegistry.ExtendedLocation", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "The extended location.", + "decorators": [], + "properties": [ + { + "$id": "432", + "kind": "property", + "name": "ExtendedLocationType", + "serializedName": "type", + "doc": "The extended location type.", + "type": { + "$id": "433", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.DeviceRegistry.ExtendedLocation.type", + "serializationOptions": { + "$id": "434", + "json": { + "$id": "435", + "name": "type" + } + } + }, + { + "$id": "436", + "kind": "property", + "name": "name", + "serializedName": "name", + "doc": "The extended location name.", + "type": { + "$id": "437", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.DeviceRegistry.ExtendedLocation.name", + "serializationOptions": { + "$id": "438", + "json": { + "$id": "439", + "name": "name" + } + } + } + ] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.DeviceRegistry.Asset.extendedLocation", + "serializationOptions": { + "$id": "440", + "json": { + "$id": "441", + "name": "extendedLocation" + } + } + } + ] + }, + { + "$ref": "215" + }, + { + "$ref": "296" + }, + { + "$ref": "308" + }, + { + "$ref": "322" + }, + { + "$ref": "323" + }, + { + "$ref": "345" + }, + { + "$ref": "346" + }, + { + "$ref": "368" + }, + { + "$ref": "371" + }, + { + "$ref": "388" + }, + { + "$ref": "394" + }, + { + "$ref": "413" + }, + { + "$ref": "431" + }, + { + "$ref": "160" + }, + { + "$ref": "161" + }, + { + "$ref": "177" + }, + { + "$id": "442", + "kind": "model", + "name": "ArmOperationStatusResourceProvisioningState", + "namespace": "Azure.ResourceManager.DeviceRegistry", + "crossLanguageDefinitionId": "Azure.ResourceManager.ArmOperationStatus", + "usage": "LroPolling", + "doc": "Standard Azure Resource Manager operation status response", + "decorators": [], + "properties": [ + { + "$id": "443", + "kind": "property", + "name": "status", + "serializedName": "status", + "doc": "The operation status", + "type": { + "$ref": "60" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.ArmOperationStatus.status", + "serializationOptions": { + "$id": "444", + "json": { + "$id": "445", + "name": "status" + } + } + }, + { + "$id": "446", + "kind": "property", + "name": "name", + "serializedName": "name", + "doc": "The name of the operationStatus resource", + "type": { + "$id": "447", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.ArmOperationStatus.name", + "serializationOptions": { + "$id": "448", + "json": { + "$id": "449", + "name": "name" + } + } + }, + { + "$id": "450", + "kind": "property", + "name": "startTime", + "serializedName": "startTime", + "doc": "Operation start time", + "type": { + "$id": "451", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "rfc3339", + "wireType": { + "$id": "452", + "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": "453", + "json": { + "$id": "454", + "name": "startTime" + } + } + }, + { + "$id": "455", + "kind": "property", + "name": "endTime", + "serializedName": "endTime", + "doc": "Operation complete time", + "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": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.ArmOperationStatus.endTime", + "serializationOptions": { + "$id": "458", + "json": { + "$id": "459", + "name": "endTime" + } + } + }, + { + "$id": "460", + "kind": "property", + "name": "percentComplete", + "serializedName": "percentComplete", + "doc": "The progress made toward completing the operation", + "type": { + "$id": "461", + "kind": "float64", + "name": "float64", + "crossLanguageDefinitionId": "TypeSpec.float64", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.ArmOperationStatus.percentComplete", + "serializationOptions": { + "$id": "462", + "json": { + "$id": "463", + "name": "percentComplete" + } + } + }, + { + "$id": "464", + "kind": "property", + "name": "error", + "serializedName": "error", + "doc": "Errors that occurred if the operation ended with Canceled or Failed status", + "type": { + "$ref": "127" + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.ArmOperationStatus.error", + "serializationOptions": { + "$id": "465", + "json": { + "$id": "466", + "name": "error" + } + } + } + ] + }, + { + "$id": "467", + "kind": "model", + "name": "AssetUpdate", + "namespace": "Azure.ResourceManager.DeviceRegistry", + "crossLanguageDefinitionId": "Azure.ResourceManager.Foundations.ResourceUpdateModel", + "usage": "Input,Json", + "doc": "The type used for update operations of the Asset.", + "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": "AssetUpdateProperties", + "namespace": "Azure.ResourceManager.DeviceRegistry", + "crossLanguageDefinitionId": "Azure.ResourceManager.Foundations.ResourceUpdateModelProperties", + "usage": "Input,Json", + "doc": "The updatable properties of the Asset.", + "decorators": [], + "properties": [ + { + "$id": "476", + "kind": "property", + "name": "IsEnabled", + "serializedName": "enabled", + "doc": "Enabled/Disabled status of the asset.", + "type": { + "$id": "477", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.Foundations.ResourceUpdateModelProperties.enabled", + "serializationOptions": { + "$id": "478", + "json": { + "$id": "479", + "name": "enabled" + } + } + }, + { + "$id": "480", + "kind": "property", + "name": "displayName", + "serializedName": "displayName", + "doc": "Human-readable display name.", + "type": { + "$id": "481", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.Foundations.ResourceUpdateModelProperties.displayName", + "serializationOptions": { + "$id": "482", + "json": { + "$id": "483", + "name": "displayName" + } + } + }, + { + "$id": "484", + "kind": "property", + "name": "description", + "serializedName": "description", + "doc": "Human-readable description of the asset.", + "type": { + "$id": "485", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.Foundations.ResourceUpdateModelProperties.description", + "serializationOptions": { + "$id": "486", + "json": { + "$id": "487", + "name": "description" + } + } + }, + { + "$id": "488", + "kind": "property", + "name": "manufacturer", + "serializedName": "manufacturer", + "doc": "Asset manufacturer name.", + "type": { + "$id": "489", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.Foundations.ResourceUpdateModelProperties.manufacturer", + "serializationOptions": { + "$id": "490", + "json": { + "$id": "491", + "name": "manufacturer" + } + } + }, + { + "$id": "492", + "kind": "property", + "name": "manufacturerUri", + "serializedName": "manufacturerUri", + "doc": "Asset manufacturer URI.", + "type": { + "$id": "493", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.Foundations.ResourceUpdateModelProperties.manufacturerUri", + "serializationOptions": { + "$id": "494", + "json": { + "$id": "495", + "name": "manufacturerUri" + } + } + }, + { + "$id": "496", + "kind": "property", + "name": "model", + "serializedName": "model", + "doc": "Asset model name.", + "type": { + "$id": "497", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.Foundations.ResourceUpdateModelProperties.model", + "serializationOptions": { + "$id": "498", + "json": { + "$id": "499", + "name": "model" + } + } + }, + { + "$id": "500", + "kind": "property", + "name": "productCode", + "serializedName": "productCode", + "doc": "Asset product code.", + "type": { + "$id": "501", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.Foundations.ResourceUpdateModelProperties.productCode", + "serializationOptions": { + "$id": "502", + "json": { + "$id": "503", + "name": "productCode" + } + } + }, + { + "$id": "504", + "kind": "property", + "name": "hardwareRevision", + "serializedName": "hardwareRevision", + "doc": "Revision number of the hardware.", + "type": { + "$id": "505", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.Foundations.ResourceUpdateModelProperties.hardwareRevision", + "serializationOptions": { + "$id": "506", + "json": { + "$id": "507", + "name": "hardwareRevision" + } + } + }, + { + "$id": "508", + "kind": "property", + "name": "softwareRevision", + "serializedName": "softwareRevision", + "doc": "Revision number of the software.", + "type": { + "$id": "509", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.Foundations.ResourceUpdateModelProperties.softwareRevision", + "serializationOptions": { + "$id": "510", + "json": { + "$id": "511", + "name": "softwareRevision" + } + } + }, + { + "$id": "512", + "kind": "property", + "name": "documentationUri", + "serializedName": "documentationUri", + "doc": "Reference to the documentation.", + "type": { + "$id": "513", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.Foundations.ResourceUpdateModelProperties.documentationUri", + "serializationOptions": { + "$id": "514", + "json": { + "$id": "515", + "name": "documentationUri" + } + } + }, + { + "$id": "516", + "kind": "property", + "name": "serialNumber", + "serializedName": "serialNumber", + "doc": "Asset serial number.", + "type": { + "$id": "517", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.Foundations.ResourceUpdateModelProperties.serialNumber", + "serializationOptions": { + "$id": "518", + "json": { + "$id": "519", + "name": "serialNumber" + } + } + }, + { + "$id": "520", + "kind": "property", + "name": "attributes", + "serializedName": "attributes", + "doc": "A set of key-value pairs that contain custom attributes set by the customer.", + "type": { + "$id": "521", + "kind": "dict", + "keyType": { + "$id": "522", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "valueType": { + "$id": "523", + "kind": "unknown", + "name": "unknown", + "crossLanguageDefinitionId": "", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.Foundations.ResourceUpdateModelProperties.attributes", + "serializationOptions": { + "$id": "524", + "json": { + "$id": "525", + "name": "attributes" + } + } + }, + { + "$id": "526", + "kind": "property", + "name": "defaultDatasetsConfiguration", + "serializedName": "defaultDatasetsConfiguration", + "doc": "Stringified JSON that contains connector-specific default configuration for all datasets. Each dataset can have its own configuration that overrides the default settings here.", + "type": { + "$id": "527", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.Foundations.ResourceUpdateModelProperties.defaultDatasetsConfiguration", + "serializationOptions": { + "$id": "528", + "json": { + "$id": "529", + "name": "defaultDatasetsConfiguration" + } + } + }, + { + "$id": "530", + "kind": "property", + "name": "defaultEventsConfiguration", + "serializedName": "defaultEventsConfiguration", + "doc": "Stringified JSON that contains connector-specific default configuration for all events. Each event can have its own configuration that overrides the default settings here.", + "type": { + "$id": "531", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.Foundations.ResourceUpdateModelProperties.defaultEventsConfiguration", + "serializationOptions": { + "$id": "532", + "json": { + "$id": "533", + "name": "defaultEventsConfiguration" + } + } + }, + { + "$id": "534", + "kind": "property", + "name": "defaultTopic", + "serializedName": "defaultTopic", + "doc": "Object that describes the default topic information for the asset.", + "type": { + "$ref": "296" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.Foundations.ResourceUpdateModelProperties.defaultTopic", + "serializationOptions": { + "$id": "535", + "json": { + "$id": "536", + "name": "defaultTopic" + } + } + }, + { + "$id": "537", + "kind": "property", + "name": "datasets", + "serializedName": "datasets", + "doc": "Array of datasets that are part of the asset. Each dataset describes the data points that make up the set.", + "type": { + "$id": "538", + "kind": "array", + "name": "ArrayDataset", + "valueType": { + "$ref": "308" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.Foundations.ResourceUpdateModelProperties.datasets", + "serializationOptions": { + "$id": "539", + "json": { + "$id": "540", + "name": "datasets" + } + } + }, + { + "$id": "541", + "kind": "property", + "name": "events", + "serializedName": "events", + "doc": "Array of events that are part of the asset. Each event can have per-event configuration.", + "type": { + "$id": "542", + "kind": "array", + "name": "ArrayEvent", + "valueType": { + "$ref": "345" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.Foundations.ResourceUpdateModelProperties.events", + "serializationOptions": { + "$id": "543", + "json": { + "$id": "544", + "name": "events" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.Foundations.ResourceUpdateModel.properties", + "serializationOptions": { + "$id": "545", + "json": { + "$id": "546", + "name": "properties" + } + } + } + ] + }, + { + "$ref": "475" + }, + { + "$id": "547", + "kind": "model", + "name": "AssetListResult", + "namespace": "Azure.ResourceManager.DeviceRegistry", + "crossLanguageDefinitionId": "Azure.ResourceManager.ResourceListResult", + "usage": "Output,Json", + "doc": "The response of a Asset list operation.", + "decorators": [], + "properties": [ + { + "$id": "548", + "kind": "property", + "name": "value", + "serializedName": "value", + "doc": "The Asset items on this page", + "type": { + "$id": "549", + "kind": "array", + "name": "ArrayAsset", + "valueType": { + "$ref": "159" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.ResourceListResult.value", + "serializationOptions": { + "$id": "550", + "json": { + "$id": "551", + "name": "value" + } + } + }, + { + "$id": "552", + "kind": "property", + "name": "nextLink", + "serializedName": "nextLink", + "doc": "The link to the next page of items", + "type": { + "$id": "553", + "kind": "url", + "name": "ResourceLocation", + "crossLanguageDefinitionId": "TypeSpec.Rest.ResourceLocation", + "baseType": { + "$id": "554", + "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": "555", + "json": { + "$id": "556", + "name": "nextLink" + } + } + } + ] + }, + { + "$id": "557", + "kind": "model", + "name": "DeviceRegistryAssetEndpointProfile", + "namespace": "Azure.ResourceManager.DeviceRegistry", + "crossLanguageDefinitionId": "Microsoft.DeviceRegistry.AssetEndpointProfile", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Asset Endpoint Profile definition.", + "decorators": [], + "baseModel": { + "$ref": "160" + }, + "properties": [ + { + "$id": "558", + "kind": "property", + "name": "properties", + "serializedName": "properties", + "doc": "The resource-specific properties for this resource.", + "type": { + "$id": "559", + "kind": "model", + "name": "DeviceRegistryAssetEndpointProfileProperties", + "namespace": "Azure.ResourceManager.DeviceRegistry", + "crossLanguageDefinitionId": "Microsoft.DeviceRegistry.AssetEndpointProfileProperties", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Defines the Asset Endpoint Profile properties.", + "decorators": [], + "properties": [ + { + "$id": "560", + "kind": "property", + "name": "uuid", + "serializedName": "uuid", + "doc": "Globally unique, immutable, non-reusable id.", + "type": { + "$id": "561", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.DeviceRegistry.AssetEndpointProfileProperties.uuid", + "serializationOptions": { + "$id": "562", + "json": { + "$id": "563", + "name": "uuid" + } + } + }, + { + "$id": "564", + "kind": "property", + "name": "targetAddress", + "serializedName": "targetAddress", + "doc": "The local valid URI specifying the network address/DNS name of a southbound device. The scheme part of the targetAddress URI specifies the type of the device. The additionalConfiguration field holds further connector type specific configuration.", + "type": { + "$id": "565", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.DeviceRegistry.AssetEndpointProfileProperties.targetAddress", + "serializationOptions": { + "$id": "566", + "json": { + "$id": "567", + "name": "targetAddress" + } + } + }, + { + "$id": "568", + "kind": "property", + "name": "endpointProfileType", + "serializedName": "endpointProfileType", + "doc": "Defines the configuration for the connector type that is being used with the endpoint profile.", + "type": { + "$id": "569", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.DeviceRegistry.AssetEndpointProfileProperties.endpointProfileType", + "serializationOptions": { + "$id": "570", + "json": { + "$id": "571", + "name": "endpointProfileType" + } + } + }, + { + "$id": "572", + "kind": "property", + "name": "authentication", + "serializedName": "authentication", + "doc": "Defines the client authentication mechanism to the server.", + "type": { + "$id": "573", + "kind": "model", + "name": "DeviceRegistryAuthentication", + "namespace": "Azure.ResourceManager.DeviceRegistry", + "crossLanguageDefinitionId": "Microsoft.DeviceRegistry.Authentication", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Definition of the client authentication mechanism to the server.", + "decorators": [], + "properties": [ + { + "$id": "574", + "kind": "property", + "name": "method", + "serializedName": "method", + "doc": "Defines the method to authenticate the user of the client at the server.", + "type": { + "$ref": "68" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.DeviceRegistry.Authentication.method", + "serializationOptions": { + "$id": "575", + "json": { + "$id": "576", + "name": "method" + } + } + }, + { + "$id": "577", + "kind": "property", + "name": "usernamePasswordCredentials", + "serializedName": "usernamePasswordCredentials", + "doc": "Defines the username and password references when UsernamePassword user authentication mode is selected.", + "type": { + "$id": "578", + "kind": "model", + "name": "DeviceRegistryUsernamePasswordCredentials", + "namespace": "Azure.ResourceManager.DeviceRegistry", + "crossLanguageDefinitionId": "Microsoft.DeviceRegistry.UsernamePasswordCredentials", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "The credentials for authentication mode UsernamePassword.", + "decorators": [], + "properties": [ + { + "$id": "579", + "kind": "property", + "name": "usernameSecretName", + "serializedName": "usernameSecretName", + "doc": "The name of the secret containing the username.", + "type": { + "$id": "580", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.DeviceRegistry.UsernamePasswordCredentials.usernameSecretName", + "serializationOptions": { + "$id": "581", + "json": { + "$id": "582", + "name": "usernameSecretName" + } + } + }, + { + "$id": "583", + "kind": "property", + "name": "passwordSecretName", + "serializedName": "passwordSecretName", + "doc": "The name of the secret containing the password.", + "type": { + "$id": "584", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.DeviceRegistry.UsernamePasswordCredentials.passwordSecretName", + "serializationOptions": { + "$id": "585", + "json": { + "$id": "586", + "name": "passwordSecretName" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.DeviceRegistry.Authentication.usernamePasswordCredentials", + "serializationOptions": { + "$id": "587", + "json": { + "$id": "588", + "name": "usernamePasswordCredentials" + } + } + }, + { + "$id": "589", + "kind": "property", + "name": "x509Credentials", + "serializedName": "x509Credentials", + "doc": "Defines the certificate reference when Certificate user authentication mode is selected.", + "type": { + "$id": "590", + "kind": "model", + "name": "DeviceRegistryX509Credentials", + "namespace": "Azure.ResourceManager.DeviceRegistry", + "crossLanguageDefinitionId": "Microsoft.DeviceRegistry.X509Credentials", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "The x509 certificate for authentication mode Certificate.", + "decorators": [], + "properties": [ + { + "$id": "591", + "kind": "property", + "name": "certificateSecretName", + "serializedName": "certificateSecretName", + "doc": "The name of the secret containing the certificate and private key (e.g. stored as .der/.pem or .der/.pfx).", + "type": { + "$id": "592", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.DeviceRegistry.X509Credentials.certificateSecretName", + "serializationOptions": { + "$id": "593", + "json": { + "$id": "594", + "name": "certificateSecretName" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.DeviceRegistry.Authentication.x509Credentials", + "serializationOptions": { + "$id": "595", + "json": { + "$id": "596", + "name": "x509Credentials" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.DeviceRegistry.AssetEndpointProfileProperties.authentication", + "serializationOptions": { + "$id": "597", + "json": { + "$id": "598", + "name": "authentication" + } + } + }, + { + "$id": "599", + "kind": "property", + "name": "additionalConfiguration", + "serializedName": "additionalConfiguration", + "doc": "Stringified JSON that contains connectivity type specific further configuration (e.g. OPC UA, Modbus, ONVIF).", + "type": { + "$id": "600", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.DeviceRegistry.AssetEndpointProfileProperties.additionalConfiguration", + "serializationOptions": { + "$id": "601", + "json": { + "$id": "602", + "name": "additionalConfiguration" + } + } + }, + { + "$id": "603", + "kind": "property", + "name": "discoveredAssetEndpointProfileRef", + "serializedName": "discoveredAssetEndpointProfileRef", + "doc": "Reference to a discovered asset endpoint profile. Populated only if the asset endpoint profile has been created from discovery flow. Discovered asset endpoint profile name must be provided.", + "type": { + "$id": "604", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.DeviceRegistry.AssetEndpointProfileProperties.discoveredAssetEndpointProfileRef", + "serializationOptions": { + "$id": "605", + "json": { + "$id": "606", + "name": "discoveredAssetEndpointProfileRef" + } + } + }, + { + "$id": "607", + "kind": "property", + "name": "status", + "serializedName": "status", + "doc": "Read only object to reflect changes that have occurred on the Edge. Similar to Kubernetes status property for custom resources.", + "type": { + "$id": "608", + "kind": "model", + "name": "AssetEndpointProfileStatus", + "namespace": "Azure.ResourceManager.DeviceRegistry", + "crossLanguageDefinitionId": "Microsoft.DeviceRegistry.AssetEndpointProfileStatus", + "usage": "Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Defines the asset endpoint profile status properties.", + "decorators": [], + "properties": [ + { + "$id": "609", + "kind": "property", + "name": "errors", + "serializedName": "errors", + "doc": "Array object to transfer and persist errors that originate from the Edge.", + "type": { + "$id": "610", + "kind": "array", + "name": "ArrayAssetEndpointProfileStatusError", + "valueType": { + "$id": "611", + "kind": "model", + "name": "AssetEndpointProfileStatusError", + "namespace": "Azure.ResourceManager.DeviceRegistry", + "crossLanguageDefinitionId": "Microsoft.DeviceRegistry.AssetEndpointProfileStatusError", + "usage": "Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Defines the asset endpoint profile status error properties.", + "decorators": [], + "properties": [ + { + "$id": "612", + "kind": "property", + "name": "code", + "serializedName": "code", + "doc": "Error code for classification of errors (ex: 400, 404, 500, etc.).", + "type": { + "$id": "613", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.DeviceRegistry.AssetEndpointProfileStatusError.code", + "serializationOptions": { + "$id": "614", + "json": { + "$id": "615", + "name": "code" + } + } + }, + { + "$id": "616", + "kind": "property", + "name": "message", + "serializedName": "message", + "doc": "Human readable helpful error message to provide additional context for error (ex: “targetAddress 'foo' is not a valid url”).", + "type": { + "$id": "617", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.DeviceRegistry.AssetEndpointProfileStatusError.message", + "serializationOptions": { + "$id": "618", + "json": { + "$id": "619", + "name": "message" + } + } + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.DeviceRegistry.AssetEndpointProfileStatus.errors", + "serializationOptions": { + "$id": "620", + "json": { + "$id": "621", + "name": "errors" + } + } + } + ] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.DeviceRegistry.AssetEndpointProfileProperties.status", + "serializationOptions": { + "$id": "622", + "json": { + "$id": "623", + "name": "status" + } + } + }, + { + "$id": "624", + "kind": "property", + "name": "provisioningState", + "serializedName": "provisioningState", + "doc": "Provisioning state of the resource.", + "type": { + "$ref": "38" + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.DeviceRegistry.AssetEndpointProfileProperties.provisioningState", + "serializationOptions": { + "$id": "625", + "json": { + "$id": "626", + "name": "provisioningState" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.DeviceRegistry.AssetEndpointProfile.properties", + "serializationOptions": { + "$id": "627", + "json": { + "$id": "628", + "name": "properties" + } + } + }, + { + "$id": "629", + "kind": "property", + "name": "extendedLocation", + "serializedName": "extendedLocation", + "doc": "The extended location.", + "type": { + "$ref": "431" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.DeviceRegistry.AssetEndpointProfile.extendedLocation", + "serializationOptions": { + "$id": "630", + "json": { + "$id": "631", + "name": "extendedLocation" + } + } + } + ] + }, + { + "$ref": "559" + }, + { + "$ref": "573" + }, + { + "$ref": "578" + }, + { + "$ref": "590" + }, + { + "$ref": "608" + }, + { + "$ref": "611" + }, + { + "$id": "632", + "kind": "model", + "name": "AssetEndpointProfileUpdate", + "namespace": "Azure.ResourceManager.DeviceRegistry", + "crossLanguageDefinitionId": "Azure.ResourceManager.Foundations.ResourceUpdateModel", + "usage": "Input,Json", + "doc": "The type used for update operations of the AssetEndpointProfile.", + "decorators": [], + "properties": [ + { + "$id": "633", + "kind": "property", + "name": "tags", + "serializedName": "tags", + "doc": "Resource tags.", + "type": { + "$id": "634", + "kind": "dict", + "keyType": { + "$id": "635", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "valueType": { + "$id": "636", + "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": "637", + "json": { + "$id": "638", + "name": "tags" + } + } + }, + { + "$id": "639", + "kind": "property", + "name": "properties", + "serializedName": "properties", + "doc": "The resource-specific properties for this resource.", + "type": { + "$id": "640", + "kind": "model", + "name": "AssetEndpointProfileUpdateProperties", + "namespace": "Azure.ResourceManager.DeviceRegistry", + "crossLanguageDefinitionId": "Azure.ResourceManager.Foundations.ResourceUpdateModelProperties", + "usage": "Input,Json", + "doc": "The updatable properties of the AssetEndpointProfile.", + "decorators": [], + "properties": [ + { + "$id": "641", + "kind": "property", + "name": "targetAddress", + "serializedName": "targetAddress", + "doc": "The local valid URI specifying the network address/DNS name of a southbound device. The scheme part of the targetAddress URI specifies the type of the device. The additionalConfiguration field holds further connector type specific configuration.", + "type": { + "$id": "642", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.Foundations.ResourceUpdateModelProperties.targetAddress", + "serializationOptions": { + "$id": "643", + "json": { + "$id": "644", + "name": "targetAddress" + } + } + }, + { + "$id": "645", + "kind": "property", + "name": "endpointProfileType", + "serializedName": "endpointProfileType", + "doc": "Defines the configuration for the connector type that is being used with the endpoint profile.", + "type": { + "$id": "646", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.Foundations.ResourceUpdateModelProperties.endpointProfileType", + "serializationOptions": { + "$id": "647", + "json": { + "$id": "648", + "name": "endpointProfileType" + } + } + }, + { + "$id": "649", + "kind": "property", + "name": "authentication", + "serializedName": "authentication", + "doc": "Defines the client authentication mechanism to the server.", + "type": { + "$ref": "573" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.Foundations.ResourceUpdateModelProperties.authentication", + "serializationOptions": { + "$id": "650", + "json": { + "$id": "651", + "name": "authentication" + } + } + }, + { + "$id": "652", + "kind": "property", + "name": "additionalConfiguration", + "serializedName": "additionalConfiguration", + "doc": "Stringified JSON that contains connectivity type specific further configuration (e.g. OPC UA, Modbus, ONVIF).", + "type": { + "$id": "653", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.Foundations.ResourceUpdateModelProperties.additionalConfiguration", + "serializationOptions": { + "$id": "654", + "json": { + "$id": "655", + "name": "additionalConfiguration" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.Foundations.ResourceUpdateModel.properties", + "serializationOptions": { + "$id": "656", + "json": { + "$id": "657", + "name": "properties" + } + } + } + ] + }, + { + "$ref": "640" + }, + { + "$id": "658", + "kind": "model", + "name": "AssetEndpointProfileListResult", + "namespace": "Azure.ResourceManager.DeviceRegistry", + "crossLanguageDefinitionId": "Azure.ResourceManager.ResourceListResult", + "usage": "Output,Json", + "doc": "The response of a AssetEndpointProfile list operation.", + "decorators": [], + "properties": [ + { + "$id": "659", + "kind": "property", + "name": "value", + "serializedName": "value", + "doc": "The AssetEndpointProfile items on this page", + "type": { + "$id": "660", + "kind": "array", + "name": "ArrayAssetEndpointProfile", + "valueType": { + "$ref": "557" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.ResourceListResult.value", + "serializationOptions": { + "$id": "661", + "json": { + "$id": "662", + "name": "value" + } + } + }, + { + "$id": "663", + "kind": "property", + "name": "nextLink", + "serializedName": "nextLink", + "doc": "The link to the next page of items", + "type": { + "$id": "664", + "kind": "url", + "name": "ResourceLocation", + "crossLanguageDefinitionId": "TypeSpec.Rest.ResourceLocation", + "baseType": { + "$id": "665", + "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": "666", + "json": { + "$id": "667", + "name": "nextLink" + } + } + } + ] + }, + { + "$id": "668", + "kind": "model", + "name": "DeviceRegistryBillingContainer", + "namespace": "Azure.ResourceManager.DeviceRegistry", + "crossLanguageDefinitionId": "Microsoft.DeviceRegistry.BillingContainer", + "usage": "Output,Json", + "doc": "billingContainer Model as Azure resource whose sole purpose is to keep track of billables resources under a subscription.", + "decorators": [], + "baseModel": { + "$id": "669", + "kind": "model", + "name": "ProxyResource", + "namespace": "Azure.ResourceManager.DeviceRegistry", + "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": "161" + }, + "properties": [] + }, + "properties": [ + { + "$id": "670", + "kind": "property", + "name": "properties", + "serializedName": "properties", + "doc": "The resource-specific properties for this resource.", + "type": { + "$id": "671", + "kind": "model", + "name": "BillingContainerProperties", + "namespace": "Azure.ResourceManager.DeviceRegistry", + "crossLanguageDefinitionId": "Microsoft.DeviceRegistry.BillingContainerProperties", + "usage": "Output,Json", + "doc": "Defines the billingContainer properties.", + "decorators": [], + "properties": [ + { + "$id": "672", + "kind": "property", + "name": "provisioningState", + "serializedName": "provisioningState", + "doc": "Provisioning state of the resource.", + "type": { + "$ref": "38" + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.DeviceRegistry.BillingContainerProperties.provisioningState", + "serializationOptions": { + "$id": "673", + "json": { + "$id": "674", + "name": "provisioningState" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.DeviceRegistry.BillingContainer.properties", + "serializationOptions": { + "$id": "675", + "json": { + "$id": "676", + "name": "properties" + } + } + }, + { + "$id": "677", + "kind": "property", + "name": "etag", + "serializedName": "etag", + "doc": "Resource ETag", + "type": { + "$id": "678", + "kind": "string", + "name": "eTag", + "crossLanguageDefinitionId": "Azure.Core.eTag", + "baseType": { + "$id": "679", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.DeviceRegistry.BillingContainer.etag", + "serializationOptions": { + "$id": "680", + "json": { + "$id": "681", + "name": "etag" + } + } + } + ] + }, + { + "$ref": "671" + }, + { + "$ref": "669" + }, + { + "$id": "682", + "kind": "model", + "name": "BillingContainerListResult", + "namespace": "Azure.ResourceManager.DeviceRegistry", + "crossLanguageDefinitionId": "Azure.ResourceManager.ResourceListResult", + "usage": "Output,Json", + "doc": "The response of a BillingContainer list operation.", + "decorators": [], + "properties": [ + { + "$id": "683", + "kind": "property", + "name": "value", + "serializedName": "value", + "doc": "The BillingContainer items on this page", + "type": { + "$id": "684", + "kind": "array", + "name": "ArrayBillingContainer", + "valueType": { + "$ref": "668" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.ResourceListResult.value", + "serializationOptions": { + "$id": "685", + "json": { + "$id": "686", + "name": "value" + } + } + }, + { + "$id": "687", + "kind": "property", + "name": "nextLink", + "serializedName": "nextLink", + "doc": "The link to the next page of items", + "type": { + "$id": "688", + "kind": "url", + "name": "ResourceLocation", + "crossLanguageDefinitionId": "TypeSpec.Rest.ResourceLocation", + "baseType": { + "$id": "689", + "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": "690", + "json": { + "$id": "691", + "name": "nextLink" + } + } + } + ] + } + ], + "clients": [ + { + "$id": "692", + "kind": "client", + "name": "DeviceRegistryClient", + "namespace": "Azure.ResourceManager.DeviceRegistry", + "doc": "Microsoft.DeviceRegistry Resource Provider management API.", + "operations": [], + "parameters": [ + { + "$id": "693", + "name": "endpoint", + "nameInRequest": "endpoint", + "doc": "Service host", + "type": { + "$id": "694", + "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": "695", + "type": { + "$id": "696", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "https://management.azure.com" + } + } + ], + "decorators": [ + { + "$id": "697", + "name": "TypeSpec.@service", + "arguments": { + "$id": "698", + "options": { + "$id": "699", + "title": "Microsoft.DeviceRegistry management service" + } + } + } + ], + "crossLanguageDefinitionId": "Microsoft.DeviceRegistry", + "apiVersions": [ + "2023-11-01-preview", + "2024-09-01-preview", + "2024-11-01" + ], + "children": [ + { + "$id": "700", + "kind": "client", + "name": "Operations", + "namespace": "Azure.ResourceManager.DeviceRegistry", + "operations": [ + { + "$id": "701", + "name": "list", + "resourceName": "Operations", + "doc": "List the operations for the provider", + "accessibility": "public", + "parameters": [ + { + "$id": "702", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "703", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "704", + "type": { + "$id": "705", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2024-11-01" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "706", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "707", + "kind": "constant", + "valueType": { + "$id": "708", + "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": "709", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "80" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "GET", + "uri": "{endpoint}", + "path": "/providers/Microsoft.DeviceRegistry/operations", + "bufferResponse": true, + "paging": { + "$id": "710", + "itemPropertySegments": [ + "value" + ], + "nextLink": { + "$id": "711", + "responseSegments": [ + "nextLink" + ], + "responseLocation": "Body" + } + }, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Azure.ResourceManager.Operations.list", + "decorators": [], + "examples": [ + { + "$id": "712", + "kind": "http", + "name": "List_Operations", + "description": "List_Operations", + "filePath": "2024-11-01/List_Operations.json", + "parameters": [ + { + "$id": "713", + "parameter": { + "$ref": "702" + }, + "value": { + "$id": "714", + "kind": "string", + "type": { + "$ref": "703" + }, + "value": "2024-11-01" + } + } + ], + "responses": [ + { + "$id": "715", + "response": { + "$ref": "709" + }, + "statusCode": 200, + "bodyValue": { + "$id": "716", + "kind": "model", + "type": { + "$ref": "80" + }, + "value": { + "$id": "717", + "value": { + "$id": "718", + "kind": "array", + "type": { + "$ref": "82" + }, + "value": [ + { + "$id": "719", + "kind": "model", + "type": { + "$ref": "83" + }, + "value": { + "$id": "720", + "name": { + "$id": "721", + "kind": "string", + "type": { + "$ref": "85" + }, + "value": "Microsoft.DeviceRegistry/assets/write" + }, + "display": { + "$id": "722", + "kind": "model", + "type": { + "$ref": "93" + }, + "value": { + "$id": "723", + "provider": { + "$id": "724", + "kind": "string", + "type": { + "$ref": "95" + }, + "value": "Microsoft Azure Device Registry" + }, + "resource": { + "$id": "725", + "kind": "string", + "type": { + "$ref": "99" + }, + "value": "Asset" + }, + "operation": { + "$id": "726", + "kind": "string", + "type": { + "$ref": "103" + }, + "value": "write" + } + } + } + } + } + ] + } + } + } + } + ] + } + ] + } + ], + "parameters": [ + { + "$id": "727", + "name": "endpoint", + "nameInRequest": "endpoint", + "doc": "Service host", + "type": { + "$id": "728", + "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": "729", + "type": { + "$id": "730", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "https://management.azure.com" + } + } + ], + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.DeviceRegistry.Operations", + "apiVersions": [ + "2023-11-01-preview", + "2024-09-01-preview", + "2024-11-01" + ], + "parent": { + "$ref": "692" + } + }, + { + "$id": "731", + "kind": "client", + "name": "OperationStatus", + "namespace": "Azure.ResourceManager.DeviceRegistry", + "operations": [], + "parameters": [ + { + "$id": "732", + "name": "endpoint", + "nameInRequest": "endpoint", + "doc": "Service host", + "type": { + "$id": "733", + "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": "734", + "type": { + "$id": "735", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "https://management.azure.com" + } + } + ], + "decorators": [ + { + "$id": "736", + "name": "Azure.ResourceManager.@armResourceOperations", + "arguments": { + "$id": "737" + } + } + ], + "crossLanguageDefinitionId": "Microsoft.DeviceRegistry.OperationStatus", + "apiVersions": [ + "2023-11-01-preview", + "2024-09-01-preview", + "2024-11-01" + ], + "parent": { + "$ref": "692" + } + }, + { + "$id": "738", + "kind": "client", + "name": "Assets", + "namespace": "Azure.ResourceManager.DeviceRegistry", + "operations": [ + { + "$id": "739", + "name": "get", + "resourceName": "Asset", + "doc": "Get a Asset", + "accessibility": "public", + "parameters": [ + { + "$id": "740", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "741", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "742", + "type": { + "$id": "743", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2024-11-01" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "744", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "745", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "746", + "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": "747", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "748", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "749", + "name": "assetName", + "nameInRequest": "assetName", + "doc": "Asset name parameter.", + "type": { + "$id": "750", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "751", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "752", + "kind": "constant", + "valueType": { + "$id": "753", + "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": "754", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "159" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "GET", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeviceRegistry/assets/{assetName}", + "bufferResponse": true, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.DeviceRegistry.Assets.get", + "decorators": [], + "examples": [ + { + "$id": "755", + "kind": "http", + "name": "Get_Asset", + "description": "Get_Asset", + "filePath": "2024-11-01/Get_Asset.json", + "parameters": [ + { + "$id": "756", + "parameter": { + "$ref": "740" + }, + "value": { + "$id": "757", + "kind": "string", + "type": { + "$ref": "741" + }, + "value": "2024-11-01" + } + }, + { + "$id": "758", + "parameter": { + "$ref": "744" + }, + "value": { + "$id": "759", + "kind": "string", + "type": { + "$ref": "745" + }, + "value": "00000000-0000-0000-0000-000000000000" + } + }, + { + "$id": "760", + "parameter": { + "$ref": "747" + }, + "value": { + "$id": "761", + "kind": "string", + "type": { + "$ref": "748" + }, + "value": "myResourceGroup" + } + }, + { + "$id": "762", + "parameter": { + "$ref": "749" + }, + "value": { + "$id": "763", + "kind": "string", + "type": { + "$ref": "750" + }, + "value": "my-asset" + } + } + ], + "responses": [ + { + "$id": "764", + "response": { + "$ref": "754" + }, + "statusCode": 200, + "bodyValue": { + "$id": "765", + "kind": "model", + "type": { + "$ref": "159" + }, + "value": { + "$id": "766", + "id": { + "$id": "767", + "kind": "string", + "type": { + "$ref": "163" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.DeviceRegistry/assets/my-asset" + }, + "name": { + "$id": "768", + "kind": "string", + "type": { + "$ref": "168" + }, + "value": "my-asset" + }, + "type": { + "$id": "769", + "kind": "string", + "type": { + "$ref": "172" + }, + "value": "Microsoft.DeviceRegistry/assets" + }, + "location": { + "$id": "770", + "kind": "string", + "type": { + "$ref": "211" + }, + "value": "West Europe" + }, + "extendedLocation": { + "$id": "771", + "kind": "model", + "type": { + "$ref": "431" + }, + "value": { + "$id": "772", + "type": { + "$id": "773", + "kind": "string", + "type": { + "$ref": "433" + }, + "value": "CustomLocation" + }, + "name": { + "$id": "774", + "kind": "string", + "type": { + "$ref": "437" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/microsoft.extendedlocation/customlocations/location1" + } + } + }, + "tags": { + "$id": "775", + "kind": "dict", + "type": { + "$ref": "205" + }, + "value": { + "$id": "776", + "site": { + "$id": "777", + "kind": "string", + "type": { + "$ref": "207" + }, + "value": "building-1" + } + } + }, + "systemData": { + "$id": "778", + "kind": "model", + "type": { + "$ref": "177" + }, + "value": { + "$id": "779", + "createdBy": { + "$id": "780", + "kind": "string", + "type": { + "$ref": "179" + }, + "value": "2ta23112-4596-44ff-b773-19405922bfc1" + }, + "createdByType": { + "$id": "781", + "kind": "string", + "type": { + "$ref": "50" + }, + "value": "Application" + }, + "createdAt": { + "$id": "782", + "kind": "string", + "type": { + "$ref": "186" + }, + "value": "2022-11-16T00:36:43.2516899Z" + }, + "lastModifiedBy": { + "$id": "783", + "kind": "string", + "type": { + "$ref": "191" + }, + "value": "2ta23112-4596-44ff-b773-19405922bfc1" + }, + "lastModifiedByType": { + "$id": "784", + "kind": "string", + "type": { + "$ref": "50" + }, + "value": "Application" + }, + "lastModifiedAt": { + "$id": "785", + "kind": "string", + "type": { + "$ref": "198" + }, + "value": "2022-11-16T01:37:16.0922793Z" + } + } + }, + "properties": { + "$id": "786", + "kind": "model", + "type": { + "$ref": "215" + }, + "value": { + "$id": "787", + "uuid": { + "$id": "788", + "kind": "string", + "type": { + "$ref": "217" + }, + "value": "0796f7c1-f2c8-44d7-9f5b-9a6f9522a85d" + }, + "enabled": { + "$id": "789", + "kind": "boolean", + "type": { + "$ref": "221" + }, + "value": true + }, + "externalAssetId": { + "$id": "790", + "kind": "string", + "type": { + "$ref": "225" + }, + "value": "8ZBA6LRHU0A458969" + }, + "displayName": { + "$id": "791", + "kind": "string", + "type": { + "$ref": "229" + }, + "value": "AssetDisplayName" + }, + "description": { + "$id": "792", + "kind": "string", + "type": { + "$ref": "233" + }, + "value": "This is a sample Asset" + }, + "assetEndpointProfileRef": { + "$id": "793", + "kind": "string", + "type": { + "$ref": "237" + }, + "value": "myAssetEndpointProfile" + }, + "version": { + "$id": "794", + "kind": "number", + "type": { + "$ref": "241" + }, + "value": 73766 + }, + "manufacturer": { + "$id": "795", + "kind": "string", + "type": { + "$ref": "245" + }, + "value": "Contoso" + }, + "manufacturerUri": { + "$id": "796", + "kind": "string", + "type": { + "$ref": "249" + }, + "value": "https://www.contoso.com/manufacturerUri" + }, + "model": { + "$id": "797", + "kind": "string", + "type": { + "$ref": "253" + }, + "value": "ContosoModel" + }, + "productCode": { + "$id": "798", + "kind": "string", + "type": { + "$ref": "257" + }, + "value": "SA34VDG" + }, + "hardwareRevision": { + "$id": "799", + "kind": "string", + "type": { + "$ref": "261" + }, + "value": "1.0" + }, + "softwareRevision": { + "$id": "800", + "kind": "string", + "type": { + "$ref": "265" + }, + "value": "2.0" + }, + "documentationUri": { + "$id": "801", + "kind": "string", + "type": { + "$ref": "269" + }, + "value": "https://www.example.com/manual" + }, + "serialNumber": { + "$id": "802", + "kind": "string", + "type": { + "$ref": "273" + }, + "value": "64-103816-519918-8" + }, + "defaultDatasetsConfiguration": { + "$id": "803", + "kind": "string", + "type": { + "$ref": "288" + }, + "value": "{\"publishingInterval\":10,\"samplingInterval\":15,\"queueSize\":20}" + }, + "defaultEventsConfiguration": { + "$id": "804", + "kind": "string", + "type": { + "$ref": "292" + }, + "value": "{\"publishingInterval\":10,\"samplingInterval\":15,\"queueSize\":20}" + }, + "defaultTopic": { + "$id": "805", + "kind": "model", + "type": { + "$ref": "296" + }, + "value": { + "$id": "806", + "path": { + "$id": "807", + "kind": "string", + "type": { + "$ref": "298" + }, + "value": "/path/defaultTopic" + }, + "retain": { + "$id": "808", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Keep" + } + } + }, + "datasets": { + "$id": "809", + "kind": "array", + "type": { + "$ref": "307" + }, + "value": [ + { + "$id": "810", + "kind": "model", + "type": { + "$ref": "308" + }, + "value": { + "$id": "811", + "name": { + "$id": "812", + "kind": "string", + "type": { + "$ref": "310" + }, + "value": "dataset1" + }, + "datasetConfiguration": { + "$id": "813", + "kind": "string", + "type": { + "$ref": "314" + }, + "value": "{\"publishingInterval\":10,\"samplingInterval\":15,\"queueSize\":20}" + }, + "topic": { + "$id": "814", + "kind": "model", + "type": { + "$ref": "296" + }, + "value": { + "$id": "815", + "path": { + "$id": "816", + "kind": "string", + "type": { + "$ref": "298" + }, + "value": "/path/dataset1" + }, + "retain": { + "$id": "817", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Keep" + } + } + }, + "dataPoints": { + "$id": "818", + "kind": "array", + "type": { + "$ref": "321" + }, + "value": [ + { + "$id": "819", + "kind": "model", + "type": { + "$ref": "322" + }, + "value": { + "$id": "820", + "name": { + "$id": "821", + "kind": "string", + "type": { + "$ref": "325" + }, + "value": "dataPoint1" + }, + "dataSource": { + "$id": "822", + "kind": "string", + "type": { + "$ref": "329" + }, + "value": "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt1" + }, + "observabilityMode": { + "$id": "823", + "kind": "string", + "type": { + "$ref": "20" + }, + "value": "Counter" + }, + "dataPointConfiguration": { + "$id": "824", + "kind": "string", + "type": { + "$ref": "333" + }, + "value": "{\"publishingInterval\":8,\"samplingInterval\":8,\"queueSize\":4}" + } + } + }, + { + "$id": "825", + "kind": "model", + "type": { + "$ref": "322" + }, + "value": { + "$id": "826", + "name": { + "$id": "827", + "kind": "string", + "type": { + "$ref": "325" + }, + "value": "dataPoint2" + }, + "dataSource": { + "$id": "828", + "kind": "string", + "type": { + "$ref": "329" + }, + "value": "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt2" + }, + "observabilityMode": { + "$id": "829", + "kind": "string", + "type": { + "$ref": "20" + }, + "value": "None" + }, + "dataPointConfiguration": { + "$id": "830", + "kind": "string", + "type": { + "$ref": "333" + }, + "value": "{\"publishingInterval\":4,\"samplingInterval\":4,\"queueSize\":7}" + } + } + } + ] + } + } + } + ] + }, + "events": { + "$id": "831", + "kind": "array", + "type": { + "$ref": "344" + }, + "value": [ + { + "$id": "832", + "kind": "model", + "type": { + "$ref": "345" + }, + "value": { + "$id": "833", + "name": { + "$id": "834", + "kind": "string", + "type": { + "$ref": "348" + }, + "value": "event1" + }, + "eventNotifier": { + "$id": "835", + "kind": "string", + "type": { + "$ref": "352" + }, + "value": "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt3" + }, + "observabilityMode": { + "$id": "836", + "kind": "string", + "type": { + "$ref": "32" + }, + "value": "None" + }, + "eventConfiguration": { + "$id": "837", + "kind": "string", + "type": { + "$ref": "356" + }, + "value": "{\"publishingInterval\":7,\"samplingInterval\":1,\"queueSize\":8}" + }, + "topic": { + "$id": "838", + "kind": "model", + "type": { + "$ref": "296" + }, + "value": { + "$id": "839", + "path": { + "$id": "840", + "kind": "string", + "type": { + "$ref": "298" + }, + "value": "/path/event1" + }, + "retain": { + "$id": "841", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Keep" + } + } + } + } + }, + { + "$id": "842", + "kind": "model", + "type": { + "$ref": "345" + }, + "value": { + "$id": "843", + "name": { + "$id": "844", + "kind": "string", + "type": { + "$ref": "348" + }, + "value": "event2" + }, + "eventNotifier": { + "$id": "845", + "kind": "string", + "type": { + "$ref": "352" + }, + "value": "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt4" + }, + "observabilityMode": { + "$id": "846", + "kind": "string", + "type": { + "$ref": "32" + }, + "value": "Log" + }, + "eventConfiguration": { + "$id": "847", + "kind": "string", + "type": { + "$ref": "356" + }, + "value": "{\"publishingInterval\":7,\"samplingInterval\":8,\"queueSize\":4}" + } + } + } + ] + }, + "provisioningState": { + "$id": "848", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Succeeded" + } + } + } + } + } + } + ] + }, + { + "$id": "849", + "kind": "http", + "name": "Get_Asset_With_SyncStatus", + "description": "Get_Asset_With_SyncStatus", + "filePath": "2024-11-01/Get_Asset_With_SyncStatus.json", + "parameters": [ + { + "$id": "850", + "parameter": { + "$ref": "740" + }, + "value": { + "$id": "851", + "kind": "string", + "type": { + "$ref": "741" + }, + "value": "2024-11-01" + } + }, + { + "$id": "852", + "parameter": { + "$ref": "744" + }, + "value": { + "$id": "853", + "kind": "string", + "type": { + "$ref": "745" + }, + "value": "00000000-0000-0000-0000-000000000000" + } + }, + { + "$id": "854", + "parameter": { + "$ref": "747" + }, + "value": { + "$id": "855", + "kind": "string", + "type": { + "$ref": "748" + }, + "value": "myResourceGroup" + } + }, + { + "$id": "856", + "parameter": { + "$ref": "749" + }, + "value": { + "$id": "857", + "kind": "string", + "type": { + "$ref": "750" + }, + "value": "my-asset" + } + } + ], + "responses": [ + { + "$id": "858", + "response": { + "$ref": "754" + }, + "statusCode": 200, + "bodyValue": { + "$id": "859", + "kind": "model", + "type": { + "$ref": "159" + }, + "value": { + "$id": "860", + "id": { + "$id": "861", + "kind": "string", + "type": { + "$ref": "163" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.DeviceRegistry/assets/my-asset" + }, + "name": { + "$id": "862", + "kind": "string", + "type": { + "$ref": "168" + }, + "value": "my-asset" + }, + "type": { + "$id": "863", + "kind": "string", + "type": { + "$ref": "172" + }, + "value": "Microsoft.DeviceRegistry/assets" + }, + "location": { + "$id": "864", + "kind": "string", + "type": { + "$ref": "211" + }, + "value": "West Europe" + }, + "extendedLocation": { + "$id": "865", + "kind": "model", + "type": { + "$ref": "431" + }, + "value": { + "$id": "866", + "type": { + "$id": "867", + "kind": "string", + "type": { + "$ref": "433" + }, + "value": "CustomLocation" + }, + "name": { + "$id": "868", + "kind": "string", + "type": { + "$ref": "437" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/microsoft.extendedlocation/customlocations/location1" + } + } + }, + "tags": { + "$id": "869", + "kind": "dict", + "type": { + "$ref": "205" + }, + "value": { + "$id": "870", + "site": { + "$id": "871", + "kind": "string", + "type": { + "$ref": "207" + }, + "value": "building-1" + } + } + }, + "systemData": { + "$id": "872", + "kind": "model", + "type": { + "$ref": "177" + }, + "value": { + "$id": "873", + "createdBy": { + "$id": "874", + "kind": "string", + "type": { + "$ref": "179" + }, + "value": "2ta23112-4596-44ff-b773-19405922bfc1" + }, + "createdByType": { + "$id": "875", + "kind": "string", + "type": { + "$ref": "50" + }, + "value": "Application" + }, + "createdAt": { + "$id": "876", + "kind": "string", + "type": { + "$ref": "186" + }, + "value": "2022-11-16T00:36:43.2516899Z" + }, + "lastModifiedBy": { + "$id": "877", + "kind": "string", + "type": { + "$ref": "191" + }, + "value": "2ta23112-4596-44ff-b773-19405922bfc1" + }, + "lastModifiedByType": { + "$id": "878", + "kind": "string", + "type": { + "$ref": "50" + }, + "value": "Application" + }, + "lastModifiedAt": { + "$id": "879", + "kind": "string", + "type": { + "$ref": "198" + }, + "value": "2022-11-16T01:37:16.0922793Z" + } + } + }, + "properties": { + "$id": "880", + "kind": "model", + "type": { + "$ref": "215" + }, + "value": { + "$id": "881", + "uuid": { + "$id": "882", + "kind": "string", + "type": { + "$ref": "217" + }, + "value": "0796f7c1-f2c8-44d7-9f5b-9a6f9522a85d" + }, + "enabled": { + "$id": "883", + "kind": "boolean", + "type": { + "$ref": "221" + }, + "value": true + }, + "externalAssetId": { + "$id": "884", + "kind": "string", + "type": { + "$ref": "225" + }, + "value": "8ZBA6LRHU0A458969" + }, + "displayName": { + "$id": "885", + "kind": "string", + "type": { + "$ref": "229" + }, + "value": "AssetDisplayName" + }, + "description": { + "$id": "886", + "kind": "string", + "type": { + "$ref": "233" + }, + "value": "This is a sample Asset" + }, + "assetEndpointProfileRef": { + "$id": "887", + "kind": "string", + "type": { + "$ref": "237" + }, + "value": "myAssetEndpointProfile" + }, + "version": { + "$id": "888", + "kind": "number", + "type": { + "$ref": "241" + }, + "value": 73766 + }, + "manufacturer": { + "$id": "889", + "kind": "string", + "type": { + "$ref": "245" + }, + "value": "Contoso" + }, + "manufacturerUri": { + "$id": "890", + "kind": "string", + "type": { + "$ref": "249" + }, + "value": "https://www.contoso.com/manufacturerUri" + }, + "model": { + "$id": "891", + "kind": "string", + "type": { + "$ref": "253" + }, + "value": "ContosoModel" + }, + "productCode": { + "$id": "892", + "kind": "string", + "type": { + "$ref": "257" + }, + "value": "SA34VDG" + }, + "hardwareRevision": { + "$id": "893", + "kind": "string", + "type": { + "$ref": "261" + }, + "value": "1.0" + }, + "softwareRevision": { + "$id": "894", + "kind": "string", + "type": { + "$ref": "265" + }, + "value": "2.0" + }, + "documentationUri": { + "$id": "895", + "kind": "string", + "type": { + "$ref": "269" + }, + "value": "https://www.example.com/manual" + }, + "serialNumber": { + "$id": "896", + "kind": "string", + "type": { + "$ref": "273" + }, + "value": "64-103816-519918-8" + }, + "defaultDatasetsConfiguration": { + "$id": "897", + "kind": "string", + "type": { + "$ref": "288" + }, + "value": "{\"publishingInterval\":10,\"samplingInterval\":15,\"queueSize\":20}" + }, + "defaultEventsConfiguration": { + "$id": "898", + "kind": "string", + "type": { + "$ref": "292" + }, + "value": "{\"publishingInterval\":10,\"samplingInterval\":15,\"queueSize\":20}" + }, + "defaultTopic": { + "$id": "899", + "kind": "model", + "type": { + "$ref": "296" + }, + "value": { + "$id": "900", + "path": { + "$id": "901", + "kind": "string", + "type": { + "$ref": "298" + }, + "value": "/path/defaultTopic" + }, + "retain": { + "$id": "902", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Keep" + } + } + }, + "datasets": { + "$id": "903", + "kind": "array", + "type": { + "$ref": "307" + }, + "value": [ + { + "$id": "904", + "kind": "model", + "type": { + "$ref": "308" + }, + "value": { + "$id": "905", + "name": { + "$id": "906", + "kind": "string", + "type": { + "$ref": "310" + }, + "value": "dataset1" + }, + "datasetConfiguration": { + "$id": "907", + "kind": "string", + "type": { + "$ref": "314" + }, + "value": "{\"publishingInterval\":10,\"samplingInterval\":15,\"queueSize\":20}" + }, + "topic": { + "$id": "908", + "kind": "model", + "type": { + "$ref": "296" + }, + "value": { + "$id": "909", + "path": { + "$id": "910", + "kind": "string", + "type": { + "$ref": "298" + }, + "value": "/path/dataset1" + }, + "retain": { + "$id": "911", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Keep" + } + } + }, + "dataPoints": { + "$id": "912", + "kind": "array", + "type": { + "$ref": "321" + }, + "value": [ + { + "$id": "913", + "kind": "model", + "type": { + "$ref": "322" + }, + "value": { + "$id": "914", + "name": { + "$id": "915", + "kind": "string", + "type": { + "$ref": "325" + }, + "value": "dataPoint1" + }, + "dataSource": { + "$id": "916", + "kind": "string", + "type": { + "$ref": "329" + }, + "value": "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt1" + }, + "observabilityMode": { + "$id": "917", + "kind": "string", + "type": { + "$ref": "20" + }, + "value": "Counter" + }, + "dataPointConfiguration": { + "$id": "918", + "kind": "string", + "type": { + "$ref": "333" + }, + "value": "{\"publishingInterval\":8,\"samplingInterval\":8,\"queueSize\":4}" + } + } + }, + { + "$id": "919", + "kind": "model", + "type": { + "$ref": "322" + }, + "value": { + "$id": "920", + "name": { + "$id": "921", + "kind": "string", + "type": { + "$ref": "325" + }, + "value": "dataPoint2" + }, + "dataSource": { + "$id": "922", + "kind": "string", + "type": { + "$ref": "329" + }, + "value": "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt2" + }, + "observabilityMode": { + "$id": "923", + "kind": "string", + "type": { + "$ref": "20" + }, + "value": "None" + }, + "dataPointConfiguration": { + "$id": "924", + "kind": "string", + "type": { + "$ref": "333" + }, + "value": "{\"publishingInterval\":4,\"samplingInterval\":4,\"queueSize\":7}" + } + } + } + ] + } + } + } + ] + }, + "events": { + "$id": "925", + "kind": "array", + "type": { + "$ref": "344" + }, + "value": [ + { + "$id": "926", + "kind": "model", + "type": { + "$ref": "345" + }, + "value": { + "$id": "927", + "name": { + "$id": "928", + "kind": "string", + "type": { + "$ref": "348" + }, + "value": "event1" + }, + "eventNotifier": { + "$id": "929", + "kind": "string", + "type": { + "$ref": "352" + }, + "value": "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt3" + }, + "observabilityMode": { + "$id": "930", + "kind": "string", + "type": { + "$ref": "32" + }, + "value": "None" + }, + "eventConfiguration": { + "$id": "931", + "kind": "string", + "type": { + "$ref": "356" + }, + "value": "{\"publishingInterval\":7,\"samplingInterval\":1,\"queueSize\":8}" + }, + "topic": { + "$id": "932", + "kind": "model", + "type": { + "$ref": "296" + }, + "value": { + "$id": "933", + "path": { + "$id": "934", + "kind": "string", + "type": { + "$ref": "298" + }, + "value": "/path/event1" + }, + "retain": { + "$id": "935", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Keep" + } + } + } + } + }, + { + "$id": "936", + "kind": "model", + "type": { + "$ref": "345" + }, + "value": { + "$id": "937", + "name": { + "$id": "938", + "kind": "string", + "type": { + "$ref": "348" + }, + "value": "event2" + }, + "eventNotifier": { + "$id": "939", + "kind": "string", + "type": { + "$ref": "352" + }, + "value": "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt4" + }, + "observabilityMode": { + "$id": "940", + "kind": "string", + "type": { + "$ref": "32" + }, + "value": "Log" + }, + "eventConfiguration": { + "$id": "941", + "kind": "string", + "type": { + "$ref": "356" + }, + "value": "{\"publishingInterval\":7,\"samplingInterval\":8,\"queueSize\":4}" + } + } + } + ] + }, + "status": { + "$id": "942", + "kind": "model", + "type": { + "$ref": "368" + }, + "value": { + "$id": "943", + "errors": { + "$id": "944", + "kind": "array", + "type": { + "$ref": "370" + }, + "value": [ + { + "$id": "945", + "kind": "model", + "type": { + "$ref": "371" + }, + "value": { + "$id": "946", + "code": { + "$id": "947", + "kind": "number", + "type": { + "$ref": "373" + }, + "value": 500 + }, + "message": { + "$id": "948", + "kind": "string", + "type": { + "$ref": "377" + }, + "value": "Internal Server Error" + } + } + } + ] + }, + "version": { + "$id": "949", + "kind": "number", + "type": { + "$ref": "383" + }, + "value": 1 + }, + "datasets": { + "$id": "950", + "kind": "array", + "type": { + "$ref": "387" + }, + "value": [ + { + "$id": "951", + "kind": "model", + "type": { + "$ref": "388" + }, + "value": { + "$id": "952", + "name": { + "$id": "953", + "kind": "string", + "type": { + "$ref": "390" + }, + "value": "dataset1" + }, + "messageSchemaReference": { + "$id": "954", + "kind": "model", + "type": { + "$ref": "394" + }, + "value": { + "$id": "955", + "schemaRegistryNamespace": { + "$id": "956", + "kind": "string", + "type": { + "$ref": "396" + }, + "value": "schemans" + }, + "schemaName": { + "$id": "957", + "kind": "string", + "type": { + "$ref": "400" + }, + "value": "schema1" + }, + "schemaVersion": { + "$id": "958", + "kind": "string", + "type": { + "$ref": "404" + }, + "value": "1.0.0" + } + } + } + } + } + ] + }, + "events": { + "$id": "959", + "kind": "array", + "type": { + "$ref": "412" + }, + "value": [ + { + "$id": "960", + "kind": "model", + "type": { + "$ref": "413" + }, + "value": { + "$id": "961", + "name": { + "$id": "962", + "kind": "string", + "type": { + "$ref": "415" + }, + "value": "event1" + }, + "messageSchemaReference": { + "$id": "963", + "kind": "model", + "type": { + "$ref": "394" + }, + "value": { + "$id": "964", + "schemaRegistryNamespace": { + "$id": "965", + "kind": "string", + "type": { + "$ref": "396" + }, + "value": "schemans" + }, + "schemaName": { + "$id": "966", + "kind": "string", + "type": { + "$ref": "400" + }, + "value": "schema2" + }, + "schemaVersion": { + "$id": "967", + "kind": "string", + "type": { + "$ref": "404" + }, + "value": "1.0.0" + } + } + } + } + } + ] + } + } + }, + "provisioningState": { + "$id": "968", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Succeeded" + } + } + } + } + } + } + ] + } + ] + }, + { + "$id": "969", + "name": "createOrReplace", + "resourceName": "Asset", + "doc": "Create a Asset", + "accessibility": "public", + "parameters": [ + { + "$id": "970", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "971", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "972", + "type": { + "$id": "973", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2024-11-01" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "974", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "975", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "976", + "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": "977", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "978", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "979", + "name": "assetName", + "nameInRequest": "assetName", + "doc": "Asset name parameter.", + "type": { + "$id": "980", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "981", + "name": "contentType", + "nameInRequest": "Content-Type", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$id": "982", + "kind": "constant", + "valueType": { + "$id": "983", + "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": "984", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "985", + "kind": "constant", + "valueType": { + "$id": "986", + "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": "987", + "name": "resource", + "nameInRequest": "resource", + "doc": "Resource create parameters.", + "type": { + "$ref": "159" + }, + "location": "Body", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "988", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "159" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + }, + { + "$id": "989", + "statusCodes": [ + 201 + ], + "bodyType": { + "$ref": "159" + }, + "headers": [ + { + "$id": "990", + "name": "azureAsyncOperation", + "nameInResponse": "Azure-AsyncOperation", + "doc": "A link to the status monitor", + "type": { + "$id": "991", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + { + "$id": "992", + "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": "993", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + } + } + ], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "PUT", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeviceRegistry/assets/{assetName}", + "requestMediaTypes": [ + "application/json" + ], + "bufferResponse": true, + "longRunning": { + "$id": "994", + "finalStateVia": 0, + "finalResponse": { + "$id": "995", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "159" + } + } + }, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.DeviceRegistry.Assets.createOrReplace", + "decorators": [], + "examples": [ + { + "$id": "996", + "kind": "http", + "name": "Create_Asset_With_DiscoveredAssetRefs", + "description": "Create_Asset_With_DiscoveredAssetRefs", + "filePath": "2024-11-01/Create_Asset_With_DiscoveredAssetRef.json", + "parameters": [ + { + "$id": "997", + "parameter": { + "$ref": "970" + }, + "value": { + "$id": "998", + "kind": "string", + "type": { + "$ref": "971" + }, + "value": "2024-11-01" + } + }, + { + "$id": "999", + "parameter": { + "$ref": "974" + }, + "value": { + "$id": "1000", + "kind": "string", + "type": { + "$ref": "975" + }, + "value": "00000000-0000-0000-0000-000000000000" + } + }, + { + "$id": "1001", + "parameter": { + "$ref": "977" + }, + "value": { + "$id": "1002", + "kind": "string", + "type": { + "$ref": "978" + }, + "value": "myResourceGroup" + } + }, + { + "$id": "1003", + "parameter": { + "$ref": "979" + }, + "value": { + "$id": "1004", + "kind": "string", + "type": { + "$ref": "980" + }, + "value": "my-asset" + } + }, + { + "$id": "1005", + "parameter": { + "$ref": "987" + }, + "value": { + "$id": "1006", + "kind": "model", + "type": { + "$ref": "159" + }, + "value": { + "$id": "1007", + "location": { + "$id": "1008", + "kind": "string", + "type": { + "$ref": "211" + }, + "value": "West Europe" + }, + "extendedLocation": { + "$id": "1009", + "kind": "model", + "type": { + "$ref": "431" + }, + "value": { + "$id": "1010", + "type": { + "$id": "1011", + "kind": "string", + "type": { + "$ref": "433" + }, + "value": "CustomLocation" + }, + "name": { + "$id": "1012", + "kind": "string", + "type": { + "$ref": "437" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/microsoft.extendedlocation/customlocations/location1" + } + } + }, + "tags": { + "$id": "1013", + "kind": "dict", + "type": { + "$ref": "205" + }, + "value": { + "$id": "1014", + "site": { + "$id": "1015", + "kind": "string", + "type": { + "$ref": "207" + }, + "value": "building-1" + } + } + }, + "properties": { + "$id": "1016", + "kind": "model", + "type": { + "$ref": "215" + }, + "value": { + "$id": "1017", + "enabled": { + "$id": "1018", + "kind": "boolean", + "type": { + "$ref": "221" + }, + "value": true + }, + "externalAssetId": { + "$id": "1019", + "kind": "string", + "type": { + "$ref": "225" + }, + "value": "8ZBA6LRHU0A458969" + }, + "displayName": { + "$id": "1020", + "kind": "string", + "type": { + "$ref": "229" + }, + "value": "AssetDisplayName" + }, + "description": { + "$id": "1021", + "kind": "string", + "type": { + "$ref": "233" + }, + "value": "This is a sample Asset" + }, + "assetEndpointProfileRef": { + "$id": "1022", + "kind": "string", + "type": { + "$ref": "237" + }, + "value": "myAssetEndpointProfile" + }, + "manufacturer": { + "$id": "1023", + "kind": "string", + "type": { + "$ref": "245" + }, + "value": "Contoso" + }, + "manufacturerUri": { + "$id": "1024", + "kind": "string", + "type": { + "$ref": "249" + }, + "value": "https://www.contoso.com/manufacturerUri" + }, + "model": { + "$id": "1025", + "kind": "string", + "type": { + "$ref": "253" + }, + "value": "ContosoModel" + }, + "productCode": { + "$id": "1026", + "kind": "string", + "type": { + "$ref": "257" + }, + "value": "SA34VDG" + }, + "hardwareRevision": { + "$id": "1027", + "kind": "string", + "type": { + "$ref": "261" + }, + "value": "1.0" + }, + "softwareRevision": { + "$id": "1028", + "kind": "string", + "type": { + "$ref": "265" + }, + "value": "2.0" + }, + "documentationUri": { + "$id": "1029", + "kind": "string", + "type": { + "$ref": "269" + }, + "value": "https://www.example.com/manual" + }, + "serialNumber": { + "$id": "1030", + "kind": "string", + "type": { + "$ref": "273" + }, + "value": "64-103816-519918-8" + }, + "discoveredAssetRefs": { + "$id": "1031", + "kind": "array", + "type": { + "$ref": "283" + }, + "value": [ + { + "$id": "1032", + "kind": "string", + "type": { + "$ref": "284" + }, + "value": "discoveredAsset1" + }, + { + "$id": "1033", + "kind": "string", + "type": { + "$ref": "284" + }, + "value": "discoveredAsset2" + } + ] + }, + "defaultDatasetsConfiguration": { + "$id": "1034", + "kind": "string", + "type": { + "$ref": "288" + }, + "value": "{\"publishingInterval\":10,\"samplingInterval\":15,\"queueSize\":20}" + }, + "defaultEventsConfiguration": { + "$id": "1035", + "kind": "string", + "type": { + "$ref": "292" + }, + "value": "{\"publishingInterval\":10,\"samplingInterval\":15,\"queueSize\":20}" + }, + "defaultTopic": { + "$id": "1036", + "kind": "model", + "type": { + "$ref": "296" + }, + "value": { + "$id": "1037", + "path": { + "$id": "1038", + "kind": "string", + "type": { + "$ref": "298" + }, + "value": "/path/defaultTopic" + }, + "retain": { + "$id": "1039", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Keep" + } + } + }, + "datasets": { + "$id": "1040", + "kind": "array", + "type": { + "$ref": "307" + }, + "value": [ + { + "$id": "1041", + "kind": "model", + "type": { + "$ref": "308" + }, + "value": { + "$id": "1042", + "name": { + "$id": "1043", + "kind": "string", + "type": { + "$ref": "310" + }, + "value": "dataset1" + }, + "datasetConfiguration": { + "$id": "1044", + "kind": "string", + "type": { + "$ref": "314" + }, + "value": "{\"publishingInterval\":10,\"samplingInterval\":15,\"queueSize\":20}" + }, + "topic": { + "$id": "1045", + "kind": "model", + "type": { + "$ref": "296" + }, + "value": { + "$id": "1046", + "path": { + "$id": "1047", + "kind": "string", + "type": { + "$ref": "298" + }, + "value": "/path/dataset1" + }, + "retain": { + "$id": "1048", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Keep" + } + } + }, + "dataPoints": { + "$id": "1049", + "kind": "array", + "type": { + "$ref": "321" + }, + "value": [ + { + "$id": "1050", + "kind": "model", + "type": { + "$ref": "322" + }, + "value": { + "$id": "1051", + "name": { + "$id": "1052", + "kind": "string", + "type": { + "$ref": "325" + }, + "value": "dataPoint1" + }, + "dataSource": { + "$id": "1053", + "kind": "string", + "type": { + "$ref": "329" + }, + "value": "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt1" + }, + "observabilityMode": { + "$id": "1054", + "kind": "string", + "type": { + "$ref": "20" + }, + "value": "Counter" + }, + "dataPointConfiguration": { + "$id": "1055", + "kind": "string", + "type": { + "$ref": "333" + }, + "value": "{\"publishingInterval\":8,\"samplingInterval\":8,\"queueSize\":4}" + } + } + }, + { + "$id": "1056", + "kind": "model", + "type": { + "$ref": "322" + }, + "value": { + "$id": "1057", + "name": { + "$id": "1058", + "kind": "string", + "type": { + "$ref": "325" + }, + "value": "dataPoint2" + }, + "dataSource": { + "$id": "1059", + "kind": "string", + "type": { + "$ref": "329" + }, + "value": "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt2" + }, + "observabilityMode": { + "$id": "1060", + "kind": "string", + "type": { + "$ref": "20" + }, + "value": "None" + }, + "dataPointConfiguration": { + "$id": "1061", + "kind": "string", + "type": { + "$ref": "333" + }, + "value": "{\"publishingInterval\":4,\"samplingInterval\":4,\"queueSize\":7}" + } + } + } + ] + } + } + } + ] + }, + "events": { + "$id": "1062", + "kind": "array", + "type": { + "$ref": "344" + }, + "value": [ + { + "$id": "1063", + "kind": "model", + "type": { + "$ref": "345" + }, + "value": { + "$id": "1064", + "name": { + "$id": "1065", + "kind": "string", + "type": { + "$ref": "348" + }, + "value": "event1" + }, + "eventNotifier": { + "$id": "1066", + "kind": "string", + "type": { + "$ref": "352" + }, + "value": "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt3" + }, + "observabilityMode": { + "$id": "1067", + "kind": "string", + "type": { + "$ref": "32" + }, + "value": "None" + }, + "eventConfiguration": { + "$id": "1068", + "kind": "string", + "type": { + "$ref": "356" + }, + "value": "{\"publishingInterval\":7,\"samplingInterval\":1,\"queueSize\":8}" + }, + "topic": { + "$id": "1069", + "kind": "model", + "type": { + "$ref": "296" + }, + "value": { + "$id": "1070", + "path": { + "$id": "1071", + "kind": "string", + "type": { + "$ref": "298" + }, + "value": "/path/event1" + }, + "retain": { + "$id": "1072", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Keep" + } + } + } + } + }, + { + "$id": "1073", + "kind": "model", + "type": { + "$ref": "345" + }, + "value": { + "$id": "1074", + "name": { + "$id": "1075", + "kind": "string", + "type": { + "$ref": "348" + }, + "value": "event2" + }, + "eventNotifier": { + "$id": "1076", + "kind": "string", + "type": { + "$ref": "352" + }, + "value": "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt4" + }, + "observabilityMode": { + "$id": "1077", + "kind": "string", + "type": { + "$ref": "32" + }, + "value": "Log" + }, + "eventConfiguration": { + "$id": "1078", + "kind": "string", + "type": { + "$ref": "356" + }, + "value": "{\"publishingInterval\":7,\"samplingInterval\":8,\"queueSize\":4}" + } + } + } + ] + } + } + } + } + } + } + ], + "responses": [ + { + "$id": "1079", + "response": { + "$ref": "988" + }, + "statusCode": 200, + "bodyValue": { + "$id": "1080", + "kind": "model", + "type": { + "$ref": "159" + }, + "value": { + "$id": "1081", + "id": { + "$id": "1082", + "kind": "string", + "type": { + "$ref": "163" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.DeviceRegistry/assets/my-asset" + }, + "name": { + "$id": "1083", + "kind": "string", + "type": { + "$ref": "168" + }, + "value": "my-asset" + }, + "type": { + "$id": "1084", + "kind": "string", + "type": { + "$ref": "172" + }, + "value": "Microsoft.DeviceRegistry/assets" + }, + "location": { + "$id": "1085", + "kind": "string", + "type": { + "$ref": "211" + }, + "value": "West Europe" + }, + "extendedLocation": { + "$id": "1086", + "kind": "model", + "type": { + "$ref": "431" + }, + "value": { + "$id": "1087", + "type": { + "$id": "1088", + "kind": "string", + "type": { + "$ref": "433" + }, + "value": "CustomLocation" + }, + "name": { + "$id": "1089", + "kind": "string", + "type": { + "$ref": "437" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/microsoft.extendedlocation/customlocations/location1" + } + } + }, + "tags": { + "$id": "1090", + "kind": "dict", + "type": { + "$ref": "205" + }, + "value": { + "$id": "1091", + "site": { + "$id": "1092", + "kind": "string", + "type": { + "$ref": "207" + }, + "value": "building-1" + } + } + }, + "systemData": { + "$id": "1093", + "kind": "model", + "type": { + "$ref": "177" + }, + "value": { + "$id": "1094", + "createdBy": { + "$id": "1095", + "kind": "string", + "type": { + "$ref": "179" + }, + "value": "2ta23112-4596-44ff-b773-19405922bfc1" + }, + "createdByType": { + "$id": "1096", + "kind": "string", + "type": { + "$ref": "50" + }, + "value": "Application" + }, + "createdAt": { + "$id": "1097", + "kind": "string", + "type": { + "$ref": "186" + }, + "value": "2022-11-16T00:36:43.2516899Z" + }, + "lastModifiedBy": { + "$id": "1098", + "kind": "string", + "type": { + "$ref": "191" + }, + "value": "2ta23112-4596-44ff-b773-19405922bfc1" + }, + "lastModifiedByType": { + "$id": "1099", + "kind": "string", + "type": { + "$ref": "50" + }, + "value": "Application" + }, + "lastModifiedAt": { + "$id": "1100", + "kind": "string", + "type": { + "$ref": "198" + }, + "value": "2022-11-16T01:37:16.0922793Z" + } + } + }, + "properties": { + "$id": "1101", + "kind": "model", + "type": { + "$ref": "215" + }, + "value": { + "$id": "1102", + "uuid": { + "$id": "1103", + "kind": "string", + "type": { + "$ref": "217" + }, + "value": "0796f7c1-f2c8-44d7-9f5b-9a6f9522a85d" + }, + "enabled": { + "$id": "1104", + "kind": "boolean", + "type": { + "$ref": "221" + }, + "value": true + }, + "externalAssetId": { + "$id": "1105", + "kind": "string", + "type": { + "$ref": "225" + }, + "value": "8ZBA6LRHU0A458969" + }, + "displayName": { + "$id": "1106", + "kind": "string", + "type": { + "$ref": "229" + }, + "value": "AssetDisplayName" + }, + "description": { + "$id": "1107", + "kind": "string", + "type": { + "$ref": "233" + }, + "value": "This is a sample Asset" + }, + "assetEndpointProfileRef": { + "$id": "1108", + "kind": "string", + "type": { + "$ref": "237" + }, + "value": "myAssetEndpointProfile" + }, + "version": { + "$id": "1109", + "kind": "number", + "type": { + "$ref": "241" + }, + "value": 73766 + }, + "manufacturer": { + "$id": "1110", + "kind": "string", + "type": { + "$ref": "245" + }, + "value": "Contoso" + }, + "manufacturerUri": { + "$id": "1111", + "kind": "string", + "type": { + "$ref": "249" + }, + "value": "https://www.contoso.com/manufacturerUri" + }, + "model": { + "$id": "1112", + "kind": "string", + "type": { + "$ref": "253" + }, + "value": "ContosoModel" + }, + "productCode": { + "$id": "1113", + "kind": "string", + "type": { + "$ref": "257" + }, + "value": "SA34VDG" + }, + "hardwareRevision": { + "$id": "1114", + "kind": "string", + "type": { + "$ref": "261" + }, + "value": "1.0" + }, + "softwareRevision": { + "$id": "1115", + "kind": "string", + "type": { + "$ref": "265" + }, + "value": "2.0" + }, + "documentationUri": { + "$id": "1116", + "kind": "string", + "type": { + "$ref": "269" + }, + "value": "https://www.example.com/manual" + }, + "serialNumber": { + "$id": "1117", + "kind": "string", + "type": { + "$ref": "273" + }, + "value": "64-103816-519918-8" + }, + "discoveredAssetRefs": { + "$id": "1118", + "kind": "array", + "type": { + "$ref": "283" + }, + "value": [ + { + "$id": "1119", + "kind": "string", + "type": { + "$ref": "284" + }, + "value": "discoveredAsset1" + }, + { + "$id": "1120", + "kind": "string", + "type": { + "$ref": "284" + }, + "value": "discoveredAsset2" + } + ] + }, + "defaultDatasetsConfiguration": { + "$id": "1121", + "kind": "string", + "type": { + "$ref": "288" + }, + "value": "{\"publishingInterval\":10,\"samplingInterval\":15,\"queueSize\":20}" + }, + "defaultEventsConfiguration": { + "$id": "1122", + "kind": "string", + "type": { + "$ref": "292" + }, + "value": "{\"publishingInterval\":10,\"samplingInterval\":15,\"queueSize\":20}" + }, + "defaultTopic": { + "$id": "1123", + "kind": "model", + "type": { + "$ref": "296" + }, + "value": { + "$id": "1124", + "path": { + "$id": "1125", + "kind": "string", + "type": { + "$ref": "298" + }, + "value": "/path/defaultTopic" + }, + "retain": { + "$id": "1126", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Keep" + } + } + }, + "datasets": { + "$id": "1127", + "kind": "array", + "type": { + "$ref": "307" + }, + "value": [ + { + "$id": "1128", + "kind": "model", + "type": { + "$ref": "308" + }, + "value": { + "$id": "1129", + "name": { + "$id": "1130", + "kind": "string", + "type": { + "$ref": "310" + }, + "value": "dataset1" + }, + "datasetConfiguration": { + "$id": "1131", + "kind": "string", + "type": { + "$ref": "314" + }, + "value": "{\"publishingInterval\":10,\"samplingInterval\":15,\"queueSize\":20}" + }, + "topic": { + "$id": "1132", + "kind": "model", + "type": { + "$ref": "296" + }, + "value": { + "$id": "1133", + "path": { + "$id": "1134", + "kind": "string", + "type": { + "$ref": "298" + }, + "value": "/path/dataset1" + }, + "retain": { + "$id": "1135", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Keep" + } + } + }, + "dataPoints": { + "$id": "1136", + "kind": "array", + "type": { + "$ref": "321" + }, + "value": [ + { + "$id": "1137", + "kind": "model", + "type": { + "$ref": "322" + }, + "value": { + "$id": "1138", + "name": { + "$id": "1139", + "kind": "string", + "type": { + "$ref": "325" + }, + "value": "dataPoint1" + }, + "dataSource": { + "$id": "1140", + "kind": "string", + "type": { + "$ref": "329" + }, + "value": "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt1" + }, + "observabilityMode": { + "$id": "1141", + "kind": "string", + "type": { + "$ref": "20" + }, + "value": "Counter" + }, + "dataPointConfiguration": { + "$id": "1142", + "kind": "string", + "type": { + "$ref": "333" + }, + "value": "{\"publishingInterval\":8,\"samplingInterval\":8,\"queueSize\":4}" + } + } + }, + { + "$id": "1143", + "kind": "model", + "type": { + "$ref": "322" + }, + "value": { + "$id": "1144", + "name": { + "$id": "1145", + "kind": "string", + "type": { + "$ref": "325" + }, + "value": "dataPoint2" + }, + "dataSource": { + "$id": "1146", + "kind": "string", + "type": { + "$ref": "329" + }, + "value": "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt2" + }, + "observabilityMode": { + "$id": "1147", + "kind": "string", + "type": { + "$ref": "20" + }, + "value": "None" + }, + "dataPointConfiguration": { + "$id": "1148", + "kind": "string", + "type": { + "$ref": "333" + }, + "value": "{\"publishingInterval\":4,\"samplingInterval\":4,\"queueSize\":7}" + } + } + } + ] + } + } + } + ] + }, + "events": { + "$id": "1149", + "kind": "array", + "type": { + "$ref": "344" + }, + "value": [ + { + "$id": "1150", + "kind": "model", + "type": { + "$ref": "345" + }, + "value": { + "$id": "1151", + "name": { + "$id": "1152", + "kind": "string", + "type": { + "$ref": "348" + }, + "value": "event1" + }, + "eventNotifier": { + "$id": "1153", + "kind": "string", + "type": { + "$ref": "352" + }, + "value": "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt3" + }, + "observabilityMode": { + "$id": "1154", + "kind": "string", + "type": { + "$ref": "32" + }, + "value": "None" + }, + "eventConfiguration": { + "$id": "1155", + "kind": "string", + "type": { + "$ref": "356" + }, + "value": "{\"publishingInterval\":7,\"samplingInterval\":1,\"queueSize\":8}" + }, + "topic": { + "$id": "1156", + "kind": "model", + "type": { + "$ref": "296" + }, + "value": { + "$id": "1157", + "path": { + "$id": "1158", + "kind": "string", + "type": { + "$ref": "298" + }, + "value": "/path/event1" + }, + "retain": { + "$id": "1159", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Keep" + } + } + } + } + }, + { + "$id": "1160", + "kind": "model", + "type": { + "$ref": "345" + }, + "value": { + "$id": "1161", + "name": { + "$id": "1162", + "kind": "string", + "type": { + "$ref": "348" + }, + "value": "event2" + }, + "eventNotifier": { + "$id": "1163", + "kind": "string", + "type": { + "$ref": "352" + }, + "value": "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt4" + }, + "observabilityMode": { + "$id": "1164", + "kind": "string", + "type": { + "$ref": "32" + }, + "value": "Log" + }, + "eventConfiguration": { + "$id": "1165", + "kind": "string", + "type": { + "$ref": "356" + }, + "value": "{\"publishingInterval\":7,\"samplingInterval\":8,\"queueSize\":4}" + } + } + } + ] + }, + "provisioningState": { + "$id": "1166", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Succeeded" + } + } + } + } + } + }, + { + "$id": "1167", + "response": { + "$ref": "989" + }, + "statusCode": 201, + "bodyValue": { + "$id": "1168", + "kind": "model", + "type": { + "$ref": "159" + }, + "value": { + "$id": "1169", + "id": { + "$id": "1170", + "kind": "string", + "type": { + "$ref": "163" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.DeviceRegistry/assets/my-asset" + }, + "name": { + "$id": "1171", + "kind": "string", + "type": { + "$ref": "168" + }, + "value": "my-asset" + }, + "type": { + "$id": "1172", + "kind": "string", + "type": { + "$ref": "172" + }, + "value": "Microsoft.DeviceRegistry/assets" + }, + "location": { + "$id": "1173", + "kind": "string", + "type": { + "$ref": "211" + }, + "value": "West Europe" + }, + "extendedLocation": { + "$id": "1174", + "kind": "model", + "type": { + "$ref": "431" + }, + "value": { + "$id": "1175", + "type": { + "$id": "1176", + "kind": "string", + "type": { + "$ref": "433" + }, + "value": "CustomLocation" + }, + "name": { + "$id": "1177", + "kind": "string", + "type": { + "$ref": "437" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/microsoft.extendedlocation/customlocations/location1" + } + } + }, + "tags": { + "$id": "1178", + "kind": "dict", + "type": { + "$ref": "205" + }, + "value": { + "$id": "1179", + "site": { + "$id": "1180", + "kind": "string", + "type": { + "$ref": "207" + }, + "value": "building-1" + } + } + }, + "systemData": { + "$id": "1181", + "kind": "model", + "type": { + "$ref": "177" + }, + "value": { + "$id": "1182", + "createdBy": { + "$id": "1183", + "kind": "string", + "type": { + "$ref": "179" + }, + "value": "2ta23112-4596-44ff-b773-19405922bfc1" + }, + "createdByType": { + "$id": "1184", + "kind": "string", + "type": { + "$ref": "50" + }, + "value": "Application" + }, + "createdAt": { + "$id": "1185", + "kind": "string", + "type": { + "$ref": "186" + }, + "value": "2022-11-16T00:36:43.2516899Z" + }, + "lastModifiedBy": { + "$id": "1186", + "kind": "string", + "type": { + "$ref": "191" + }, + "value": "2ta23112-4596-44ff-b773-19405922bfc1" + }, + "lastModifiedByType": { + "$id": "1187", + "kind": "string", + "type": { + "$ref": "50" + }, + "value": "Application" + }, + "lastModifiedAt": { + "$id": "1188", + "kind": "string", + "type": { + "$ref": "198" + }, + "value": "2022-11-16T01:37:16.0922793Z" + } + } + }, + "properties": { + "$id": "1189", + "kind": "model", + "type": { + "$ref": "215" + }, + "value": { + "$id": "1190", + "uuid": { + "$id": "1191", + "kind": "string", + "type": { + "$ref": "217" + }, + "value": "0796f7c1-f2c8-44d7-9f5b-9a6f9522a85d" + }, + "enabled": { + "$id": "1192", + "kind": "boolean", + "type": { + "$ref": "221" + }, + "value": true + }, + "externalAssetId": { + "$id": "1193", + "kind": "string", + "type": { + "$ref": "225" + }, + "value": "8ZBA6LRHU0A458969" + }, + "displayName": { + "$id": "1194", + "kind": "string", + "type": { + "$ref": "229" + }, + "value": "AssetDisplayName" + }, + "description": { + "$id": "1195", + "kind": "string", + "type": { + "$ref": "233" + }, + "value": "This is a sample Asset" + }, + "assetEndpointProfileRef": { + "$id": "1196", + "kind": "string", + "type": { + "$ref": "237" + }, + "value": "myAssetEndpointProfile" + }, + "version": { + "$id": "1197", + "kind": "number", + "type": { + "$ref": "241" + }, + "value": 73766 + }, + "manufacturer": { + "$id": "1198", + "kind": "string", + "type": { + "$ref": "245" + }, + "value": "Contoso" + }, + "manufacturerUri": { + "$id": "1199", + "kind": "string", + "type": { + "$ref": "249" + }, + "value": "https://www.contoso.com/manufacturerUri" + }, + "model": { + "$id": "1200", + "kind": "string", + "type": { + "$ref": "253" + }, + "value": "ContosoModel" + }, + "productCode": { + "$id": "1201", + "kind": "string", + "type": { + "$ref": "257" + }, + "value": "SA34VDG" + }, + "hardwareRevision": { + "$id": "1202", + "kind": "string", + "type": { + "$ref": "261" + }, + "value": "1.0" + }, + "softwareRevision": { + "$id": "1203", + "kind": "string", + "type": { + "$ref": "265" + }, + "value": "2.0" + }, + "documentationUri": { + "$id": "1204", + "kind": "string", + "type": { + "$ref": "269" + }, + "value": "https://www.example.com/manual" + }, + "serialNumber": { + "$id": "1205", + "kind": "string", + "type": { + "$ref": "273" + }, + "value": "64-103816-519918-8" + }, + "discoveredAssetRefs": { + "$id": "1206", + "kind": "array", + "type": { + "$ref": "283" + }, + "value": [ + { + "$id": "1207", + "kind": "string", + "type": { + "$ref": "284" + }, + "value": "discoveredAsset1" + }, + { + "$id": "1208", + "kind": "string", + "type": { + "$ref": "284" + }, + "value": "discoveredAsset2" + } + ] + }, + "defaultDatasetsConfiguration": { + "$id": "1209", + "kind": "string", + "type": { + "$ref": "288" + }, + "value": "{\"publishingInterval\":10,\"samplingInterval\":15,\"queueSize\":20}" + }, + "defaultEventsConfiguration": { + "$id": "1210", + "kind": "string", + "type": { + "$ref": "292" + }, + "value": "{\"publishingInterval\":10,\"samplingInterval\":15,\"queueSize\":20}" + }, + "defaultTopic": { + "$id": "1211", + "kind": "model", + "type": { + "$ref": "296" + }, + "value": { + "$id": "1212", + "path": { + "$id": "1213", + "kind": "string", + "type": { + "$ref": "298" + }, + "value": "/path/defaultTopic" + }, + "retain": { + "$id": "1214", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Keep" + } + } + }, + "datasets": { + "$id": "1215", + "kind": "array", + "type": { + "$ref": "307" + }, + "value": [ + { + "$id": "1216", + "kind": "model", + "type": { + "$ref": "308" + }, + "value": { + "$id": "1217", + "name": { + "$id": "1218", + "kind": "string", + "type": { + "$ref": "310" + }, + "value": "dataset1" + }, + "datasetConfiguration": { + "$id": "1219", + "kind": "string", + "type": { + "$ref": "314" + }, + "value": "{\"publishingInterval\":10,\"samplingInterval\":15,\"queueSize\":20}" + }, + "topic": { + "$id": "1220", + "kind": "model", + "type": { + "$ref": "296" + }, + "value": { + "$id": "1221", + "path": { + "$id": "1222", + "kind": "string", + "type": { + "$ref": "298" + }, + "value": "/path/dataset1" + }, + "retain": { + "$id": "1223", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Keep" + } + } + }, + "dataPoints": { + "$id": "1224", + "kind": "array", + "type": { + "$ref": "321" + }, + "value": [ + { + "$id": "1225", + "kind": "model", + "type": { + "$ref": "322" + }, + "value": { + "$id": "1226", + "name": { + "$id": "1227", + "kind": "string", + "type": { + "$ref": "325" + }, + "value": "dataPoint1" + }, + "dataSource": { + "$id": "1228", + "kind": "string", + "type": { + "$ref": "329" + }, + "value": "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt1" + }, + "observabilityMode": { + "$id": "1229", + "kind": "string", + "type": { + "$ref": "20" + }, + "value": "Counter" + }, + "dataPointConfiguration": { + "$id": "1230", + "kind": "string", + "type": { + "$ref": "333" + }, + "value": "{\"publishingInterval\":8,\"samplingInterval\":8,\"queueSize\":4}" + } + } + }, + { + "$id": "1231", + "kind": "model", + "type": { + "$ref": "322" + }, + "value": { + "$id": "1232", + "name": { + "$id": "1233", + "kind": "string", + "type": { + "$ref": "325" + }, + "value": "dataPoint2" + }, + "dataSource": { + "$id": "1234", + "kind": "string", + "type": { + "$ref": "329" + }, + "value": "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt2" + }, + "observabilityMode": { + "$id": "1235", + "kind": "string", + "type": { + "$ref": "20" + }, + "value": "None" + }, + "dataPointConfiguration": { + "$id": "1236", + "kind": "string", + "type": { + "$ref": "333" + }, + "value": "{\"publishingInterval\":4,\"samplingInterval\":4,\"queueSize\":7}" + } + } + } + ] + } + } + } + ] + }, + "events": { + "$id": "1237", + "kind": "array", + "type": { + "$ref": "344" + }, + "value": [ + { + "$id": "1238", + "kind": "model", + "type": { + "$ref": "345" + }, + "value": { + "$id": "1239", + "name": { + "$id": "1240", + "kind": "string", + "type": { + "$ref": "348" + }, + "value": "event1" + }, + "eventNotifier": { + "$id": "1241", + "kind": "string", + "type": { + "$ref": "352" + }, + "value": "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt3" + }, + "observabilityMode": { + "$id": "1242", + "kind": "string", + "type": { + "$ref": "32" + }, + "value": "None" + }, + "eventConfiguration": { + "$id": "1243", + "kind": "string", + "type": { + "$ref": "356" + }, + "value": "{\"publishingInterval\":7,\"samplingInterval\":1,\"queueSize\":8}" + }, + "topic": { + "$id": "1244", + "kind": "model", + "type": { + "$ref": "296" + }, + "value": { + "$id": "1245", + "path": { + "$id": "1246", + "kind": "string", + "type": { + "$ref": "298" + }, + "value": "/path/event1" + }, + "retain": { + "$id": "1247", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Keep" + } + } + } + } + }, + { + "$id": "1248", + "kind": "model", + "type": { + "$ref": "345" + }, + "value": { + "$id": "1249", + "name": { + "$id": "1250", + "kind": "string", + "type": { + "$ref": "348" + }, + "value": "event2" + }, + "eventNotifier": { + "$id": "1251", + "kind": "string", + "type": { + "$ref": "352" + }, + "value": "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt4" + }, + "observabilityMode": { + "$id": "1252", + "kind": "string", + "type": { + "$ref": "32" + }, + "value": "Log" + }, + "eventConfiguration": { + "$id": "1253", + "kind": "string", + "type": { + "$ref": "356" + }, + "value": "{\"publishingInterval\":7,\"samplingInterval\":8,\"queueSize\":4}" + } + } + } + ] + }, + "provisioningState": { + "$id": "1254", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Accepted" + } + } + } + } + } + } + ] + }, + { + "$id": "1255", + "kind": "http", + "name": "Create_Asset_With_ExternalAssetId", + "description": "Create_Asset_With_ExternalAssetId", + "filePath": "2024-11-01/Create_Asset_With_ExternalAssetId.json", + "parameters": [ + { + "$id": "1256", + "parameter": { + "$ref": "970" + }, + "value": { + "$id": "1257", + "kind": "string", + "type": { + "$ref": "971" + }, + "value": "2024-11-01" + } + }, + { + "$id": "1258", + "parameter": { + "$ref": "974" + }, + "value": { + "$id": "1259", + "kind": "string", + "type": { + "$ref": "975" + }, + "value": "00000000-0000-0000-0000-000000000000" + } + }, + { + "$id": "1260", + "parameter": { + "$ref": "977" + }, + "value": { + "$id": "1261", + "kind": "string", + "type": { + "$ref": "978" + }, + "value": "myResourceGroup" + } + }, + { + "$id": "1262", + "parameter": { + "$ref": "979" + }, + "value": { + "$id": "1263", + "kind": "string", + "type": { + "$ref": "980" + }, + "value": "my-asset" + } + }, + { + "$id": "1264", + "parameter": { + "$ref": "987" + }, + "value": { + "$id": "1265", + "kind": "model", + "type": { + "$ref": "159" + }, + "value": { + "$id": "1266", + "location": { + "$id": "1267", + "kind": "string", + "type": { + "$ref": "211" + }, + "value": "West Europe" + }, + "extendedLocation": { + "$id": "1268", + "kind": "model", + "type": { + "$ref": "431" + }, + "value": { + "$id": "1269", + "type": { + "$id": "1270", + "kind": "string", + "type": { + "$ref": "433" + }, + "value": "CustomLocation" + }, + "name": { + "$id": "1271", + "kind": "string", + "type": { + "$ref": "437" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/microsoft.extendedlocation/customlocations/location1" + } + } + }, + "tags": { + "$id": "1272", + "kind": "dict", + "type": { + "$ref": "205" + }, + "value": { + "$id": "1273", + "site": { + "$id": "1274", + "kind": "string", + "type": { + "$ref": "207" + }, + "value": "building-1" + } + } + }, + "properties": { + "$id": "1275", + "kind": "model", + "type": { + "$ref": "215" + }, + "value": { + "$id": "1276", + "enabled": { + "$id": "1277", + "kind": "boolean", + "type": { + "$ref": "221" + }, + "value": true + }, + "externalAssetId": { + "$id": "1278", + "kind": "string", + "type": { + "$ref": "225" + }, + "value": "8ZBA6LRHU0A458969" + }, + "displayName": { + "$id": "1279", + "kind": "string", + "type": { + "$ref": "229" + }, + "value": "AssetDisplayName" + }, + "description": { + "$id": "1280", + "kind": "string", + "type": { + "$ref": "233" + }, + "value": "This is a sample Asset" + }, + "assetEndpointProfileRef": { + "$id": "1281", + "kind": "string", + "type": { + "$ref": "237" + }, + "value": "myAssetEndpointProfile" + }, + "manufacturer": { + "$id": "1282", + "kind": "string", + "type": { + "$ref": "245" + }, + "value": "Contoso" + }, + "manufacturerUri": { + "$id": "1283", + "kind": "string", + "type": { + "$ref": "249" + }, + "value": "https://www.contoso.com/manufacturerUri" + }, + "model": { + "$id": "1284", + "kind": "string", + "type": { + "$ref": "253" + }, + "value": "ContosoModel" + }, + "productCode": { + "$id": "1285", + "kind": "string", + "type": { + "$ref": "257" + }, + "value": "SA34VDG" + }, + "hardwareRevision": { + "$id": "1286", + "kind": "string", + "type": { + "$ref": "261" + }, + "value": "1.0" + }, + "softwareRevision": { + "$id": "1287", + "kind": "string", + "type": { + "$ref": "265" + }, + "value": "2.0" + }, + "documentationUri": { + "$id": "1288", + "kind": "string", + "type": { + "$ref": "269" + }, + "value": "https://www.example.com/manual" + }, + "serialNumber": { + "$id": "1289", + "kind": "string", + "type": { + "$ref": "273" + }, + "value": "64-103816-519918-8" + }, + "defaultDatasetsConfiguration": { + "$id": "1290", + "kind": "string", + "type": { + "$ref": "288" + }, + "value": "{\"publishingInterval\":10,\"samplingInterval\":15,\"queueSize\":20}" + }, + "defaultEventsConfiguration": { + "$id": "1291", + "kind": "string", + "type": { + "$ref": "292" + }, + "value": "{\"publishingInterval\":10,\"samplingInterval\":15,\"queueSize\":20}" + }, + "defaultTopic": { + "$id": "1292", + "kind": "model", + "type": { + "$ref": "296" + }, + "value": { + "$id": "1293", + "path": { + "$id": "1294", + "kind": "string", + "type": { + "$ref": "298" + }, + "value": "/path/defaultTopic" + }, + "retain": { + "$id": "1295", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Keep" + } + } + }, + "datasets": { + "$id": "1296", + "kind": "array", + "type": { + "$ref": "307" + }, + "value": [ + { + "$id": "1297", + "kind": "model", + "type": { + "$ref": "308" + }, + "value": { + "$id": "1298", + "name": { + "$id": "1299", + "kind": "string", + "type": { + "$ref": "310" + }, + "value": "dataset1" + }, + "datasetConfiguration": { + "$id": "1300", + "kind": "string", + "type": { + "$ref": "314" + }, + "value": "{\"publishingInterval\":10,\"samplingInterval\":15,\"queueSize\":20}" + }, + "topic": { + "$id": "1301", + "kind": "model", + "type": { + "$ref": "296" + }, + "value": { + "$id": "1302", + "path": { + "$id": "1303", + "kind": "string", + "type": { + "$ref": "298" + }, + "value": "/path/dataset1" + }, + "retain": { + "$id": "1304", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Keep" + } + } + }, + "dataPoints": { + "$id": "1305", + "kind": "array", + "type": { + "$ref": "321" + }, + "value": [ + { + "$id": "1306", + "kind": "model", + "type": { + "$ref": "322" + }, + "value": { + "$id": "1307", + "name": { + "$id": "1308", + "kind": "string", + "type": { + "$ref": "325" + }, + "value": "dataPoint1" + }, + "dataSource": { + "$id": "1309", + "kind": "string", + "type": { + "$ref": "329" + }, + "value": "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt1" + }, + "observabilityMode": { + "$id": "1310", + "kind": "string", + "type": { + "$ref": "20" + }, + "value": "Counter" + }, + "dataPointConfiguration": { + "$id": "1311", + "kind": "string", + "type": { + "$ref": "333" + }, + "value": "{\"publishingInterval\":8,\"samplingInterval\":8,\"queueSize\":4}" + } + } + }, + { + "$id": "1312", + "kind": "model", + "type": { + "$ref": "322" + }, + "value": { + "$id": "1313", + "name": { + "$id": "1314", + "kind": "string", + "type": { + "$ref": "325" + }, + "value": "dataPoint2" + }, + "dataSource": { + "$id": "1315", + "kind": "string", + "type": { + "$ref": "329" + }, + "value": "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt2" + }, + "observabilityMode": { + "$id": "1316", + "kind": "string", + "type": { + "$ref": "20" + }, + "value": "None" + }, + "dataPointConfiguration": { + "$id": "1317", + "kind": "string", + "type": { + "$ref": "333" + }, + "value": "{\"publishingInterval\":4,\"samplingInterval\":4,\"queueSize\":7}" + } + } + } + ] + } + } + } + ] + }, + "events": { + "$id": "1318", + "kind": "array", + "type": { + "$ref": "344" + }, + "value": [ + { + "$id": "1319", + "kind": "model", + "type": { + "$ref": "345" + }, + "value": { + "$id": "1320", + "name": { + "$id": "1321", + "kind": "string", + "type": { + "$ref": "348" + }, + "value": "event1" + }, + "eventNotifier": { + "$id": "1322", + "kind": "string", + "type": { + "$ref": "352" + }, + "value": "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt3" + }, + "observabilityMode": { + "$id": "1323", + "kind": "string", + "type": { + "$ref": "32" + }, + "value": "None" + }, + "eventConfiguration": { + "$id": "1324", + "kind": "string", + "type": { + "$ref": "356" + }, + "value": "{\"publishingInterval\":7,\"samplingInterval\":1,\"queueSize\":8}" + }, + "topic": { + "$id": "1325", + "kind": "model", + "type": { + "$ref": "296" + }, + "value": { + "$id": "1326", + "path": { + "$id": "1327", + "kind": "string", + "type": { + "$ref": "298" + }, + "value": "/path/event1" + }, + "retain": { + "$id": "1328", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Keep" + } + } + } + } + }, + { + "$id": "1329", + "kind": "model", + "type": { + "$ref": "345" + }, + "value": { + "$id": "1330", + "name": { + "$id": "1331", + "kind": "string", + "type": { + "$ref": "348" + }, + "value": "event2" + }, + "eventNotifier": { + "$id": "1332", + "kind": "string", + "type": { + "$ref": "352" + }, + "value": "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt4" + }, + "observabilityMode": { + "$id": "1333", + "kind": "string", + "type": { + "$ref": "32" + }, + "value": "Log" + }, + "eventConfiguration": { + "$id": "1334", + "kind": "string", + "type": { + "$ref": "356" + }, + "value": "{\"publishingInterval\":7,\"samplingInterval\":8,\"queueSize\":4}" + } + } + } + ] + } + } + } + } + } + } + ], + "responses": [ + { + "$id": "1335", + "response": { + "$ref": "988" + }, + "statusCode": 200, + "bodyValue": { + "$id": "1336", + "kind": "model", + "type": { + "$ref": "159" + }, + "value": { + "$id": "1337", + "id": { + "$id": "1338", + "kind": "string", + "type": { + "$ref": "163" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.DeviceRegistry/assets/my-asset" + }, + "name": { + "$id": "1339", + "kind": "string", + "type": { + "$ref": "168" + }, + "value": "my-asset" + }, + "type": { + "$id": "1340", + "kind": "string", + "type": { + "$ref": "172" + }, + "value": "Microsoft.DeviceRegistry/assets" + }, + "location": { + "$id": "1341", + "kind": "string", + "type": { + "$ref": "211" + }, + "value": "West Europe" + }, + "extendedLocation": { + "$id": "1342", + "kind": "model", + "type": { + "$ref": "431" + }, + "value": { + "$id": "1343", + "type": { + "$id": "1344", + "kind": "string", + "type": { + "$ref": "433" + }, + "value": "CustomLocation" + }, + "name": { + "$id": "1345", + "kind": "string", + "type": { + "$ref": "437" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/microsoft.extendedlocation/customlocations/location1" + } + } + }, + "tags": { + "$id": "1346", + "kind": "dict", + "type": { + "$ref": "205" + }, + "value": { + "$id": "1347", + "site": { + "$id": "1348", + "kind": "string", + "type": { + "$ref": "207" + }, + "value": "building-1" + } + } + }, + "systemData": { + "$id": "1349", + "kind": "model", + "type": { + "$ref": "177" + }, + "value": { + "$id": "1350", + "createdBy": { + "$id": "1351", + "kind": "string", + "type": { + "$ref": "179" + }, + "value": "2ta23112-4596-44ff-b773-19405922bfc1" + }, + "createdByType": { + "$id": "1352", + "kind": "string", + "type": { + "$ref": "50" + }, + "value": "Application" + }, + "createdAt": { + "$id": "1353", + "kind": "string", + "type": { + "$ref": "186" + }, + "value": "2022-11-16T00:36:43.2516899Z" + }, + "lastModifiedBy": { + "$id": "1354", + "kind": "string", + "type": { + "$ref": "191" + }, + "value": "2ta23112-4596-44ff-b773-19405922bfc1" + }, + "lastModifiedByType": { + "$id": "1355", + "kind": "string", + "type": { + "$ref": "50" + }, + "value": "Application" + }, + "lastModifiedAt": { + "$id": "1356", + "kind": "string", + "type": { + "$ref": "198" + }, + "value": "2022-11-16T01:37:16.0922793Z" + } + } + }, + "properties": { + "$id": "1357", + "kind": "model", + "type": { + "$ref": "215" + }, + "value": { + "$id": "1358", + "uuid": { + "$id": "1359", + "kind": "string", + "type": { + "$ref": "217" + }, + "value": "0796f7c1-f2c8-44d7-9f5b-9a6f9522a85d" + }, + "enabled": { + "$id": "1360", + "kind": "boolean", + "type": { + "$ref": "221" + }, + "value": true + }, + "externalAssetId": { + "$id": "1361", + "kind": "string", + "type": { + "$ref": "225" + }, + "value": "8ZBA6LRHU0A458969" + }, + "displayName": { + "$id": "1362", + "kind": "string", + "type": { + "$ref": "229" + }, + "value": "AssetDisplayName" + }, + "description": { + "$id": "1363", + "kind": "string", + "type": { + "$ref": "233" + }, + "value": "This is a sample Asset" + }, + "assetEndpointProfileRef": { + "$id": "1364", + "kind": "string", + "type": { + "$ref": "237" + }, + "value": "myAssetEndpointProfile" + }, + "version": { + "$id": "1365", + "kind": "number", + "type": { + "$ref": "241" + }, + "value": 73766 + }, + "manufacturer": { + "$id": "1366", + "kind": "string", + "type": { + "$ref": "245" + }, + "value": "Contoso" + }, + "manufacturerUri": { + "$id": "1367", + "kind": "string", + "type": { + "$ref": "249" + }, + "value": "https://www.contoso.com/manufacturerUri" + }, + "model": { + "$id": "1368", + "kind": "string", + "type": { + "$ref": "253" + }, + "value": "ContosoModel" + }, + "productCode": { + "$id": "1369", + "kind": "string", + "type": { + "$ref": "257" + }, + "value": "SA34VDG" + }, + "hardwareRevision": { + "$id": "1370", + "kind": "string", + "type": { + "$ref": "261" + }, + "value": "1.0" + }, + "softwareRevision": { + "$id": "1371", + "kind": "string", + "type": { + "$ref": "265" + }, + "value": "2.0" + }, + "documentationUri": { + "$id": "1372", + "kind": "string", + "type": { + "$ref": "269" + }, + "value": "https://www.example.com/manual" + }, + "serialNumber": { + "$id": "1373", + "kind": "string", + "type": { + "$ref": "273" + }, + "value": "64-103816-519918-8" + }, + "defaultDatasetsConfiguration": { + "$id": "1374", + "kind": "string", + "type": { + "$ref": "288" + }, + "value": "{\"publishingInterval\":10,\"samplingInterval\":15,\"queueSize\":20}" + }, + "defaultEventsConfiguration": { + "$id": "1375", + "kind": "string", + "type": { + "$ref": "292" + }, + "value": "{\"publishingInterval\":10,\"samplingInterval\":15,\"queueSize\":20}" + }, + "defaultTopic": { + "$id": "1376", + "kind": "model", + "type": { + "$ref": "296" + }, + "value": { + "$id": "1377", + "path": { + "$id": "1378", + "kind": "string", + "type": { + "$ref": "298" + }, + "value": "/path/defaultTopic" + }, + "retain": { + "$id": "1379", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Keep" + } + } + }, + "datasets": { + "$id": "1380", + "kind": "array", + "type": { + "$ref": "307" + }, + "value": [ + { + "$id": "1381", + "kind": "model", + "type": { + "$ref": "308" + }, + "value": { + "$id": "1382", + "name": { + "$id": "1383", + "kind": "string", + "type": { + "$ref": "310" + }, + "value": "dataset1" + }, + "datasetConfiguration": { + "$id": "1384", + "kind": "string", + "type": { + "$ref": "314" + }, + "value": "{\"publishingInterval\":10,\"samplingInterval\":15,\"queueSize\":20}" + }, + "topic": { + "$id": "1385", + "kind": "model", + "type": { + "$ref": "296" + }, + "value": { + "$id": "1386", + "path": { + "$id": "1387", + "kind": "string", + "type": { + "$ref": "298" + }, + "value": "/path/dataset1" + }, + "retain": { + "$id": "1388", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Keep" + } + } + }, + "dataPoints": { + "$id": "1389", + "kind": "array", + "type": { + "$ref": "321" + }, + "value": [ + { + "$id": "1390", + "kind": "model", + "type": { + "$ref": "322" + }, + "value": { + "$id": "1391", + "name": { + "$id": "1392", + "kind": "string", + "type": { + "$ref": "325" + }, + "value": "dataPoint1" + }, + "dataSource": { + "$id": "1393", + "kind": "string", + "type": { + "$ref": "329" + }, + "value": "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt1" + }, + "observabilityMode": { + "$id": "1394", + "kind": "string", + "type": { + "$ref": "20" + }, + "value": "Counter" + }, + "dataPointConfiguration": { + "$id": "1395", + "kind": "string", + "type": { + "$ref": "333" + }, + "value": "{\"publishingInterval\":8,\"samplingInterval\":8,\"queueSize\":4}" + } + } + }, + { + "$id": "1396", + "kind": "model", + "type": { + "$ref": "322" + }, + "value": { + "$id": "1397", + "name": { + "$id": "1398", + "kind": "string", + "type": { + "$ref": "325" + }, + "value": "dataPoint2" + }, + "dataSource": { + "$id": "1399", + "kind": "string", + "type": { + "$ref": "329" + }, + "value": "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt2" + }, + "observabilityMode": { + "$id": "1400", + "kind": "string", + "type": { + "$ref": "20" + }, + "value": "None" + }, + "dataPointConfiguration": { + "$id": "1401", + "kind": "string", + "type": { + "$ref": "333" + }, + "value": "{\"publishingInterval\":4,\"samplingInterval\":4,\"queueSize\":7}" + } + } + } + ] + } + } + } + ] + }, + "events": { + "$id": "1402", + "kind": "array", + "type": { + "$ref": "344" + }, + "value": [ + { + "$id": "1403", + "kind": "model", + "type": { + "$ref": "345" + }, + "value": { + "$id": "1404", + "name": { + "$id": "1405", + "kind": "string", + "type": { + "$ref": "348" + }, + "value": "event1" + }, + "eventNotifier": { + "$id": "1406", + "kind": "string", + "type": { + "$ref": "352" + }, + "value": "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt3" + }, + "observabilityMode": { + "$id": "1407", + "kind": "string", + "type": { + "$ref": "32" + }, + "value": "None" + }, + "eventConfiguration": { + "$id": "1408", + "kind": "string", + "type": { + "$ref": "356" + }, + "value": "{\"publishingInterval\":7,\"samplingInterval\":1,\"queueSize\":8}" + }, + "topic": { + "$id": "1409", + "kind": "model", + "type": { + "$ref": "296" + }, + "value": { + "$id": "1410", + "path": { + "$id": "1411", + "kind": "string", + "type": { + "$ref": "298" + }, + "value": "/path/event1" + }, + "retain": { + "$id": "1412", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Keep" + } + } + } + } + }, + { + "$id": "1413", + "kind": "model", + "type": { + "$ref": "345" + }, + "value": { + "$id": "1414", + "name": { + "$id": "1415", + "kind": "string", + "type": { + "$ref": "348" + }, + "value": "event2" + }, + "eventNotifier": { + "$id": "1416", + "kind": "string", + "type": { + "$ref": "352" + }, + "value": "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt4" + }, + "observabilityMode": { + "$id": "1417", + "kind": "string", + "type": { + "$ref": "32" + }, + "value": "Log" + }, + "eventConfiguration": { + "$id": "1418", + "kind": "string", + "type": { + "$ref": "356" + }, + "value": "{\"publishingInterval\":7,\"samplingInterval\":8,\"queueSize\":4}" + } + } + } + ] + }, + "provisioningState": { + "$id": "1419", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Succeeded" + } + } + } + } + } + }, + { + "$id": "1420", + "response": { + "$ref": "989" + }, + "statusCode": 201, + "bodyValue": { + "$id": "1421", + "kind": "model", + "type": { + "$ref": "159" + }, + "value": { + "$id": "1422", + "id": { + "$id": "1423", + "kind": "string", + "type": { + "$ref": "163" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.DeviceRegistry/assets/my-asset" + }, + "name": { + "$id": "1424", + "kind": "string", + "type": { + "$ref": "168" + }, + "value": "my-asset" + }, + "type": { + "$id": "1425", + "kind": "string", + "type": { + "$ref": "172" + }, + "value": "Microsoft.DeviceRegistry/assets" + }, + "location": { + "$id": "1426", + "kind": "string", + "type": { + "$ref": "211" + }, + "value": "West Europe" + }, + "extendedLocation": { + "$id": "1427", + "kind": "model", + "type": { + "$ref": "431" + }, + "value": { + "$id": "1428", + "type": { + "$id": "1429", + "kind": "string", + "type": { + "$ref": "433" + }, + "value": "CustomLocation" + }, + "name": { + "$id": "1430", + "kind": "string", + "type": { + "$ref": "437" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/microsoft.extendedlocation/customlocations/location1" + } + } + }, + "tags": { + "$id": "1431", + "kind": "dict", + "type": { + "$ref": "205" + }, + "value": { + "$id": "1432", + "site": { + "$id": "1433", + "kind": "string", + "type": { + "$ref": "207" + }, + "value": "building-1" + } + } + }, + "systemData": { + "$id": "1434", + "kind": "model", + "type": { + "$ref": "177" + }, + "value": { + "$id": "1435", + "createdBy": { + "$id": "1436", + "kind": "string", + "type": { + "$ref": "179" + }, + "value": "2ta23112-4596-44ff-b773-19405922bfc1" + }, + "createdByType": { + "$id": "1437", + "kind": "string", + "type": { + "$ref": "50" + }, + "value": "Application" + }, + "createdAt": { + "$id": "1438", + "kind": "string", + "type": { + "$ref": "186" + }, + "value": "2022-11-16T00:36:43.2516899Z" + }, + "lastModifiedBy": { + "$id": "1439", + "kind": "string", + "type": { + "$ref": "191" + }, + "value": "2ta23112-4596-44ff-b773-19405922bfc1" + }, + "lastModifiedByType": { + "$id": "1440", + "kind": "string", + "type": { + "$ref": "50" + }, + "value": "Application" + }, + "lastModifiedAt": { + "$id": "1441", + "kind": "string", + "type": { + "$ref": "198" + }, + "value": "2022-11-16T01:37:16.0922793Z" + } + } + }, + "properties": { + "$id": "1442", + "kind": "model", + "type": { + "$ref": "215" + }, + "value": { + "$id": "1443", + "uuid": { + "$id": "1444", + "kind": "string", + "type": { + "$ref": "217" + }, + "value": "0796f7c1-f2c8-44d7-9f5b-9a6f9522a85d" + }, + "enabled": { + "$id": "1445", + "kind": "boolean", + "type": { + "$ref": "221" + }, + "value": true + }, + "externalAssetId": { + "$id": "1446", + "kind": "string", + "type": { + "$ref": "225" + }, + "value": "8ZBA6LRHU0A458969" + }, + "displayName": { + "$id": "1447", + "kind": "string", + "type": { + "$ref": "229" + }, + "value": "AssetDisplayName" + }, + "description": { + "$id": "1448", + "kind": "string", + "type": { + "$ref": "233" + }, + "value": "This is a sample Asset" + }, + "assetEndpointProfileRef": { + "$id": "1449", + "kind": "string", + "type": { + "$ref": "237" + }, + "value": "myAssetEndpointProfile" + }, + "version": { + "$id": "1450", + "kind": "number", + "type": { + "$ref": "241" + }, + "value": 73766 + }, + "manufacturer": { + "$id": "1451", + "kind": "string", + "type": { + "$ref": "245" + }, + "value": "Contoso" + }, + "manufacturerUri": { + "$id": "1452", + "kind": "string", + "type": { + "$ref": "249" + }, + "value": "https://www.contoso.com/manufacturerUri" + }, + "model": { + "$id": "1453", + "kind": "string", + "type": { + "$ref": "253" + }, + "value": "ContosoModel" + }, + "productCode": { + "$id": "1454", + "kind": "string", + "type": { + "$ref": "257" + }, + "value": "SA34VDG" + }, + "hardwareRevision": { + "$id": "1455", + "kind": "string", + "type": { + "$ref": "261" + }, + "value": "1.0" + }, + "softwareRevision": { + "$id": "1456", + "kind": "string", + "type": { + "$ref": "265" + }, + "value": "2.0" + }, + "documentationUri": { + "$id": "1457", + "kind": "string", + "type": { + "$ref": "269" + }, + "value": "https://www.example.com/manual" + }, + "serialNumber": { + "$id": "1458", + "kind": "string", + "type": { + "$ref": "273" + }, + "value": "64-103816-519918-8" + }, + "defaultDatasetsConfiguration": { + "$id": "1459", + "kind": "string", + "type": { + "$ref": "288" + }, + "value": "{\"publishingInterval\":10,\"samplingInterval\":15,\"queueSize\":20}" + }, + "defaultEventsConfiguration": { + "$id": "1460", + "kind": "string", + "type": { + "$ref": "292" + }, + "value": "{\"publishingInterval\":10,\"samplingInterval\":15,\"queueSize\":20}" + }, + "defaultTopic": { + "$id": "1461", + "kind": "model", + "type": { + "$ref": "296" + }, + "value": { + "$id": "1462", + "path": { + "$id": "1463", + "kind": "string", + "type": { + "$ref": "298" + }, + "value": "/path/defaultTopic" + }, + "retain": { + "$id": "1464", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Keep" + } + } + }, + "datasets": { + "$id": "1465", + "kind": "array", + "type": { + "$ref": "307" + }, + "value": [ + { + "$id": "1466", + "kind": "model", + "type": { + "$ref": "308" + }, + "value": { + "$id": "1467", + "name": { + "$id": "1468", + "kind": "string", + "type": { + "$ref": "310" + }, + "value": "dataset1" + }, + "datasetConfiguration": { + "$id": "1469", + "kind": "string", + "type": { + "$ref": "314" + }, + "value": "{\"publishingInterval\":10,\"samplingInterval\":15,\"queueSize\":20}" + }, + "topic": { + "$id": "1470", + "kind": "model", + "type": { + "$ref": "296" + }, + "value": { + "$id": "1471", + "path": { + "$id": "1472", + "kind": "string", + "type": { + "$ref": "298" + }, + "value": "/path/dataset1" + }, + "retain": { + "$id": "1473", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Keep" + } + } + }, + "dataPoints": { + "$id": "1474", + "kind": "array", + "type": { + "$ref": "321" + }, + "value": [ + { + "$id": "1475", + "kind": "model", + "type": { + "$ref": "322" + }, + "value": { + "$id": "1476", + "name": { + "$id": "1477", + "kind": "string", + "type": { + "$ref": "325" + }, + "value": "dataPoint1" + }, + "dataSource": { + "$id": "1478", + "kind": "string", + "type": { + "$ref": "329" + }, + "value": "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt1" + }, + "observabilityMode": { + "$id": "1479", + "kind": "string", + "type": { + "$ref": "20" + }, + "value": "Counter" + }, + "dataPointConfiguration": { + "$id": "1480", + "kind": "string", + "type": { + "$ref": "333" + }, + "value": "{\"publishingInterval\":8,\"samplingInterval\":8,\"queueSize\":4}" + } + } + }, + { + "$id": "1481", + "kind": "model", + "type": { + "$ref": "322" + }, + "value": { + "$id": "1482", + "name": { + "$id": "1483", + "kind": "string", + "type": { + "$ref": "325" + }, + "value": "dataPoint2" + }, + "dataSource": { + "$id": "1484", + "kind": "string", + "type": { + "$ref": "329" + }, + "value": "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt2" + }, + "observabilityMode": { + "$id": "1485", + "kind": "string", + "type": { + "$ref": "20" + }, + "value": "None" + }, + "dataPointConfiguration": { + "$id": "1486", + "kind": "string", + "type": { + "$ref": "333" + }, + "value": "{\"publishingInterval\":4,\"samplingInterval\":4,\"queueSize\":7}" + } + } + } + ] + } + } + } + ] + }, + "events": { + "$id": "1487", + "kind": "array", + "type": { + "$ref": "344" + }, + "value": [ + { + "$id": "1488", + "kind": "model", + "type": { + "$ref": "345" + }, + "value": { + "$id": "1489", + "name": { + "$id": "1490", + "kind": "string", + "type": { + "$ref": "348" + }, + "value": "event1" + }, + "eventNotifier": { + "$id": "1491", + "kind": "string", + "type": { + "$ref": "352" + }, + "value": "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt3" + }, + "observabilityMode": { + "$id": "1492", + "kind": "string", + "type": { + "$ref": "32" + }, + "value": "None" + }, + "eventConfiguration": { + "$id": "1493", + "kind": "string", + "type": { + "$ref": "356" + }, + "value": "{\"publishingInterval\":7,\"samplingInterval\":1,\"queueSize\":8}" + }, + "topic": { + "$id": "1494", + "kind": "model", + "type": { + "$ref": "296" + }, + "value": { + "$id": "1495", + "path": { + "$id": "1496", + "kind": "string", + "type": { + "$ref": "298" + }, + "value": "/path/event1" + }, + "retain": { + "$id": "1497", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Keep" + } + } + } + } + }, + { + "$id": "1498", + "kind": "model", + "type": { + "$ref": "345" + }, + "value": { + "$id": "1499", + "name": { + "$id": "1500", + "kind": "string", + "type": { + "$ref": "348" + }, + "value": "event2" + }, + "eventNotifier": { + "$id": "1501", + "kind": "string", + "type": { + "$ref": "352" + }, + "value": "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt4" + }, + "observabilityMode": { + "$id": "1502", + "kind": "string", + "type": { + "$ref": "32" + }, + "value": "Log" + }, + "eventConfiguration": { + "$id": "1503", + "kind": "string", + "type": { + "$ref": "356" + }, + "value": "{\"publishingInterval\":7,\"samplingInterval\":8,\"queueSize\":4}" + } + } + } + ] + }, + "provisioningState": { + "$id": "1504", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Accepted" + } + } + } + } + } + } + ] + }, + { + "$id": "1505", + "kind": "http", + "name": "Create_Asset_Without_DisplayName", + "description": "Create_Asset_Without_DisplayName", + "filePath": "2024-11-01/Create_Asset_Without_DisplayName.json", + "parameters": [ + { + "$id": "1506", + "parameter": { + "$ref": "970" + }, + "value": { + "$id": "1507", + "kind": "string", + "type": { + "$ref": "971" + }, + "value": "2024-11-01" + } + }, + { + "$id": "1508", + "parameter": { + "$ref": "974" + }, + "value": { + "$id": "1509", + "kind": "string", + "type": { + "$ref": "975" + }, + "value": "00000000-0000-0000-0000-000000000000" + } + }, + { + "$id": "1510", + "parameter": { + "$ref": "977" + }, + "value": { + "$id": "1511", + "kind": "string", + "type": { + "$ref": "978" + }, + "value": "myResourceGroup" + } + }, + { + "$id": "1512", + "parameter": { + "$ref": "979" + }, + "value": { + "$id": "1513", + "kind": "string", + "type": { + "$ref": "980" + }, + "value": "my-asset" + } + }, + { + "$id": "1514", + "parameter": { + "$ref": "987" + }, + "value": { + "$id": "1515", + "kind": "model", + "type": { + "$ref": "159" + }, + "value": { + "$id": "1516", + "location": { + "$id": "1517", + "kind": "string", + "type": { + "$ref": "211" + }, + "value": "West Europe" + }, + "extendedLocation": { + "$id": "1518", + "kind": "model", + "type": { + "$ref": "431" + }, + "value": { + "$id": "1519", + "type": { + "$id": "1520", + "kind": "string", + "type": { + "$ref": "433" + }, + "value": "CustomLocation" + }, + "name": { + "$id": "1521", + "kind": "string", + "type": { + "$ref": "437" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/microsoft.extendedlocation/customlocations/location1" + } + } + }, + "tags": { + "$id": "1522", + "kind": "dict", + "type": { + "$ref": "205" + }, + "value": { + "$id": "1523", + "site": { + "$id": "1524", + "kind": "string", + "type": { + "$ref": "207" + }, + "value": "building-1" + } + } + }, + "properties": { + "$id": "1525", + "kind": "model", + "type": { + "$ref": "215" + }, + "value": { + "$id": "1526", + "enabled": { + "$id": "1527", + "kind": "boolean", + "type": { + "$ref": "221" + }, + "value": true + }, + "externalAssetId": { + "$id": "1528", + "kind": "string", + "type": { + "$ref": "225" + }, + "value": "8ZBA6LRHU0A458969" + }, + "description": { + "$id": "1529", + "kind": "string", + "type": { + "$ref": "233" + }, + "value": "This is a sample Asset" + }, + "assetEndpointProfileRef": { + "$id": "1530", + "kind": "string", + "type": { + "$ref": "237" + }, + "value": "myAssetEndpointProfile" + }, + "manufacturer": { + "$id": "1531", + "kind": "string", + "type": { + "$ref": "245" + }, + "value": "Contoso" + }, + "manufacturerUri": { + "$id": "1532", + "kind": "string", + "type": { + "$ref": "249" + }, + "value": "https://www.contoso.com/manufacturerUri" + }, + "model": { + "$id": "1533", + "kind": "string", + "type": { + "$ref": "253" + }, + "value": "ContosoModel" + }, + "productCode": { + "$id": "1534", + "kind": "string", + "type": { + "$ref": "257" + }, + "value": "SA34VDG" + }, + "hardwareRevision": { + "$id": "1535", + "kind": "string", + "type": { + "$ref": "261" + }, + "value": "1.0" + }, + "softwareRevision": { + "$id": "1536", + "kind": "string", + "type": { + "$ref": "265" + }, + "value": "2.0" + }, + "documentationUri": { + "$id": "1537", + "kind": "string", + "type": { + "$ref": "269" + }, + "value": "https://www.example.com/manual" + }, + "serialNumber": { + "$id": "1538", + "kind": "string", + "type": { + "$ref": "273" + }, + "value": "64-103816-519918-8" + }, + "defaultDatasetsConfiguration": { + "$id": "1539", + "kind": "string", + "type": { + "$ref": "288" + }, + "value": "{\"publishingInterval\":10,\"samplingInterval\":15,\"queueSize\":20}" + }, + "defaultEventsConfiguration": { + "$id": "1540", + "kind": "string", + "type": { + "$ref": "292" + }, + "value": "{\"publishingInterval\":10,\"samplingInterval\":15,\"queueSize\":20}" + }, + "defaultTopic": { + "$id": "1541", + "kind": "model", + "type": { + "$ref": "296" + }, + "value": { + "$id": "1542", + "path": { + "$id": "1543", + "kind": "string", + "type": { + "$ref": "298" + }, + "value": "/path/defaultTopic" + }, + "retain": { + "$id": "1544", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Keep" + } + } + }, + "datasets": { + "$id": "1545", + "kind": "array", + "type": { + "$ref": "307" + }, + "value": [ + { + "$id": "1546", + "kind": "model", + "type": { + "$ref": "308" + }, + "value": { + "$id": "1547", + "name": { + "$id": "1548", + "kind": "string", + "type": { + "$ref": "310" + }, + "value": "dataset1" + }, + "datasetConfiguration": { + "$id": "1549", + "kind": "string", + "type": { + "$ref": "314" + }, + "value": "{\"publishingInterval\":10,\"samplingInterval\":15,\"queueSize\":20}" + }, + "topic": { + "$id": "1550", + "kind": "model", + "type": { + "$ref": "296" + }, + "value": { + "$id": "1551", + "path": { + "$id": "1552", + "kind": "string", + "type": { + "$ref": "298" + }, + "value": "/path/dataset1" + }, + "retain": { + "$id": "1553", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Keep" + } + } + }, + "dataPoints": { + "$id": "1554", + "kind": "array", + "type": { + "$ref": "321" + }, + "value": [ + { + "$id": "1555", + "kind": "model", + "type": { + "$ref": "322" + }, + "value": { + "$id": "1556", + "name": { + "$id": "1557", + "kind": "string", + "type": { + "$ref": "325" + }, + "value": "dataPoint1" + }, + "dataSource": { + "$id": "1558", + "kind": "string", + "type": { + "$ref": "329" + }, + "value": "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt1" + }, + "observabilityMode": { + "$id": "1559", + "kind": "string", + "type": { + "$ref": "20" + }, + "value": "Counter" + }, + "dataPointConfiguration": { + "$id": "1560", + "kind": "string", + "type": { + "$ref": "333" + }, + "value": "{\"publishingInterval\":8,\"samplingInterval\":8,\"queueSize\":4}" + } + } + }, + { + "$id": "1561", + "kind": "model", + "type": { + "$ref": "322" + }, + "value": { + "$id": "1562", + "name": { + "$id": "1563", + "kind": "string", + "type": { + "$ref": "325" + }, + "value": "dataPoint2" + }, + "dataSource": { + "$id": "1564", + "kind": "string", + "type": { + "$ref": "329" + }, + "value": "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt2" + }, + "observabilityMode": { + "$id": "1565", + "kind": "string", + "type": { + "$ref": "20" + }, + "value": "None" + }, + "dataPointConfiguration": { + "$id": "1566", + "kind": "string", + "type": { + "$ref": "333" + }, + "value": "{\"publishingInterval\":4,\"samplingInterval\":4,\"queueSize\":7}" + } + } + } + ] + } + } + } + ] + }, + "events": { + "$id": "1567", + "kind": "array", + "type": { + "$ref": "344" + }, + "value": [ + { + "$id": "1568", + "kind": "model", + "type": { + "$ref": "345" + }, + "value": { + "$id": "1569", + "name": { + "$id": "1570", + "kind": "string", + "type": { + "$ref": "348" + }, + "value": "event1" + }, + "eventNotifier": { + "$id": "1571", + "kind": "string", + "type": { + "$ref": "352" + }, + "value": "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt3" + }, + "observabilityMode": { + "$id": "1572", + "kind": "string", + "type": { + "$ref": "32" + }, + "value": "None" + }, + "eventConfiguration": { + "$id": "1573", + "kind": "string", + "type": { + "$ref": "356" + }, + "value": "{\"publishingInterval\":7,\"samplingInterval\":1,\"queueSize\":8}" + }, + "topic": { + "$id": "1574", + "kind": "model", + "type": { + "$ref": "296" + }, + "value": { + "$id": "1575", + "path": { + "$id": "1576", + "kind": "string", + "type": { + "$ref": "298" + }, + "value": "/path/event1" + }, + "retain": { + "$id": "1577", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Keep" + } + } + } + } + }, + { + "$id": "1578", + "kind": "model", + "type": { + "$ref": "345" + }, + "value": { + "$id": "1579", + "name": { + "$id": "1580", + "kind": "string", + "type": { + "$ref": "348" + }, + "value": "event2" + }, + "eventNotifier": { + "$id": "1581", + "kind": "string", + "type": { + "$ref": "352" + }, + "value": "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt4" + }, + "observabilityMode": { + "$id": "1582", + "kind": "string", + "type": { + "$ref": "32" + }, + "value": "Log" + }, + "eventConfiguration": { + "$id": "1583", + "kind": "string", + "type": { + "$ref": "356" + }, + "value": "{\"publishingInterval\":7,\"samplingInterval\":8,\"queueSize\":4}" + } + } + } + ] + } + } + } + } + } + } + ], + "responses": [ + { + "$id": "1584", + "response": { + "$ref": "988" + }, + "statusCode": 200, + "bodyValue": { + "$id": "1585", + "kind": "model", + "type": { + "$ref": "159" + }, + "value": { + "$id": "1586", + "id": { + "$id": "1587", + "kind": "string", + "type": { + "$ref": "163" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.DeviceRegistry/assets/my-asset" + }, + "name": { + "$id": "1588", + "kind": "string", + "type": { + "$ref": "168" + }, + "value": "my-asset" + }, + "type": { + "$id": "1589", + "kind": "string", + "type": { + "$ref": "172" + }, + "value": "Microsoft.DeviceRegistry/assets" + }, + "location": { + "$id": "1590", + "kind": "string", + "type": { + "$ref": "211" + }, + "value": "West Europe" + }, + "extendedLocation": { + "$id": "1591", + "kind": "model", + "type": { + "$ref": "431" + }, + "value": { + "$id": "1592", + "type": { + "$id": "1593", + "kind": "string", + "type": { + "$ref": "433" + }, + "value": "CustomLocation" + }, + "name": { + "$id": "1594", + "kind": "string", + "type": { + "$ref": "437" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/microsoft.extendedlocation/customlocations/location1" + } + } + }, + "tags": { + "$id": "1595", + "kind": "dict", + "type": { + "$ref": "205" + }, + "value": { + "$id": "1596", + "site": { + "$id": "1597", + "kind": "string", + "type": { + "$ref": "207" + }, + "value": "building-1" + } + } + }, + "systemData": { + "$id": "1598", + "kind": "model", + "type": { + "$ref": "177" + }, + "value": { + "$id": "1599", + "createdBy": { + "$id": "1600", + "kind": "string", + "type": { + "$ref": "179" + }, + "value": "2ta23112-4596-44ff-b773-19405922bfc1" + }, + "createdByType": { + "$id": "1601", + "kind": "string", + "type": { + "$ref": "50" + }, + "value": "Application" + }, + "createdAt": { + "$id": "1602", + "kind": "string", + "type": { + "$ref": "186" + }, + "value": "2022-11-16T00:36:43.2516899Z" + }, + "lastModifiedBy": { + "$id": "1603", + "kind": "string", + "type": { + "$ref": "191" + }, + "value": "2ta23112-4596-44ff-b773-19405922bfc1" + }, + "lastModifiedByType": { + "$id": "1604", + "kind": "string", + "type": { + "$ref": "50" + }, + "value": "Application" + }, + "lastModifiedAt": { + "$id": "1605", + "kind": "string", + "type": { + "$ref": "198" + }, + "value": "2022-11-16T01:37:16.0922793Z" + } + } + }, + "properties": { + "$id": "1606", + "kind": "model", + "type": { + "$ref": "215" + }, + "value": { + "$id": "1607", + "uuid": { + "$id": "1608", + "kind": "string", + "type": { + "$ref": "217" + }, + "value": "0796f7c1-f2c8-44d7-9f5b-9a6f9522a85d" + }, + "enabled": { + "$id": "1609", + "kind": "boolean", + "type": { + "$ref": "221" + }, + "value": true + }, + "externalAssetId": { + "$id": "1610", + "kind": "string", + "type": { + "$ref": "225" + }, + "value": "8ZBA6LRHU0A458969" + }, + "displayName": { + "$id": "1611", + "kind": "string", + "type": { + "$ref": "229" + }, + "value": "my-asset" + }, + "description": { + "$id": "1612", + "kind": "string", + "type": { + "$ref": "233" + }, + "value": "This is a sample Asset" + }, + "assetEndpointProfileRef": { + "$id": "1613", + "kind": "string", + "type": { + "$ref": "237" + }, + "value": "myAssetEndpointProfile" + }, + "version": { + "$id": "1614", + "kind": "number", + "type": { + "$ref": "241" + }, + "value": 73766 + }, + "manufacturer": { + "$id": "1615", + "kind": "string", + "type": { + "$ref": "245" + }, + "value": "Contoso" + }, + "manufacturerUri": { + "$id": "1616", + "kind": "string", + "type": { + "$ref": "249" + }, + "value": "https://www.contoso.com/manufacturerUri" + }, + "model": { + "$id": "1617", + "kind": "string", + "type": { + "$ref": "253" + }, + "value": "ContosoModel" + }, + "productCode": { + "$id": "1618", + "kind": "string", + "type": { + "$ref": "257" + }, + "value": "SA34VDG" + }, + "hardwareRevision": { + "$id": "1619", + "kind": "string", + "type": { + "$ref": "261" + }, + "value": "1.0" + }, + "softwareRevision": { + "$id": "1620", + "kind": "string", + "type": { + "$ref": "265" + }, + "value": "2.0" + }, + "documentationUri": { + "$id": "1621", + "kind": "string", + "type": { + "$ref": "269" + }, + "value": "https://www.example.com/manual" + }, + "serialNumber": { + "$id": "1622", + "kind": "string", + "type": { + "$ref": "273" + }, + "value": "64-103816-519918-8" + }, + "defaultDatasetsConfiguration": { + "$id": "1623", + "kind": "string", + "type": { + "$ref": "288" + }, + "value": "{\"publishingInterval\":10,\"samplingInterval\":15,\"queueSize\":20}" + }, + "defaultEventsConfiguration": { + "$id": "1624", + "kind": "string", + "type": { + "$ref": "292" + }, + "value": "{\"publishingInterval\":10,\"samplingInterval\":15,\"queueSize\":20}" + }, + "defaultTopic": { + "$id": "1625", + "kind": "model", + "type": { + "$ref": "296" + }, + "value": { + "$id": "1626", + "path": { + "$id": "1627", + "kind": "string", + "type": { + "$ref": "298" + }, + "value": "/path/defaultTopic" + }, + "retain": { + "$id": "1628", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Keep" + } + } + }, + "datasets": { + "$id": "1629", + "kind": "array", + "type": { + "$ref": "307" + }, + "value": [ + { + "$id": "1630", + "kind": "model", + "type": { + "$ref": "308" + }, + "value": { + "$id": "1631", + "name": { + "$id": "1632", + "kind": "string", + "type": { + "$ref": "310" + }, + "value": "dataset1" + }, + "datasetConfiguration": { + "$id": "1633", + "kind": "string", + "type": { + "$ref": "314" + }, + "value": "{\"publishingInterval\":10,\"samplingInterval\":15,\"queueSize\":20}" + }, + "topic": { + "$id": "1634", + "kind": "model", + "type": { + "$ref": "296" + }, + "value": { + "$id": "1635", + "path": { + "$id": "1636", + "kind": "string", + "type": { + "$ref": "298" + }, + "value": "/path/dataset1" + }, + "retain": { + "$id": "1637", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Keep" + } + } + }, + "dataPoints": { + "$id": "1638", + "kind": "array", + "type": { + "$ref": "321" + }, + "value": [ + { + "$id": "1639", + "kind": "model", + "type": { + "$ref": "322" + }, + "value": { + "$id": "1640", + "name": { + "$id": "1641", + "kind": "string", + "type": { + "$ref": "325" + }, + "value": "dataPoint1" + }, + "dataSource": { + "$id": "1642", + "kind": "string", + "type": { + "$ref": "329" + }, + "value": "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt1" + }, + "observabilityMode": { + "$id": "1643", + "kind": "string", + "type": { + "$ref": "20" + }, + "value": "Counter" + }, + "dataPointConfiguration": { + "$id": "1644", + "kind": "string", + "type": { + "$ref": "333" + }, + "value": "{\"publishingInterval\":8,\"samplingInterval\":8,\"queueSize\":4}" + } + } + }, + { + "$id": "1645", + "kind": "model", + "type": { + "$ref": "322" + }, + "value": { + "$id": "1646", + "name": { + "$id": "1647", + "kind": "string", + "type": { + "$ref": "325" + }, + "value": "dataPoint2" + }, + "dataSource": { + "$id": "1648", + "kind": "string", + "type": { + "$ref": "329" + }, + "value": "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt2" + }, + "observabilityMode": { + "$id": "1649", + "kind": "string", + "type": { + "$ref": "20" + }, + "value": "None" + }, + "dataPointConfiguration": { + "$id": "1650", + "kind": "string", + "type": { + "$ref": "333" + }, + "value": "{\"publishingInterval\":4,\"samplingInterval\":4,\"queueSize\":7}" + } + } + } + ] + } + } + } + ] + }, + "events": { + "$id": "1651", + "kind": "array", + "type": { + "$ref": "344" + }, + "value": [ + { + "$id": "1652", + "kind": "model", + "type": { + "$ref": "345" + }, + "value": { + "$id": "1653", + "name": { + "$id": "1654", + "kind": "string", + "type": { + "$ref": "348" + }, + "value": "event1" + }, + "eventNotifier": { + "$id": "1655", + "kind": "string", + "type": { + "$ref": "352" + }, + "value": "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt3" + }, + "observabilityMode": { + "$id": "1656", + "kind": "string", + "type": { + "$ref": "32" + }, + "value": "None" + }, + "eventConfiguration": { + "$id": "1657", + "kind": "string", + "type": { + "$ref": "356" + }, + "value": "{\"publishingInterval\":7,\"samplingInterval\":1,\"queueSize\":8}" + }, + "topic": { + "$id": "1658", + "kind": "model", + "type": { + "$ref": "296" + }, + "value": { + "$id": "1659", + "path": { + "$id": "1660", + "kind": "string", + "type": { + "$ref": "298" + }, + "value": "/path/event1" + }, + "retain": { + "$id": "1661", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Keep" + } + } + } + } + }, + { + "$id": "1662", + "kind": "model", + "type": { + "$ref": "345" + }, + "value": { + "$id": "1663", + "name": { + "$id": "1664", + "kind": "string", + "type": { + "$ref": "348" + }, + "value": "event2" + }, + "eventNotifier": { + "$id": "1665", + "kind": "string", + "type": { + "$ref": "352" + }, + "value": "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt4" + }, + "observabilityMode": { + "$id": "1666", + "kind": "string", + "type": { + "$ref": "32" + }, + "value": "Log" + }, + "eventConfiguration": { + "$id": "1667", + "kind": "string", + "type": { + "$ref": "356" + }, + "value": "{\"publishingInterval\":7,\"samplingInterval\":8,\"queueSize\":4}" + } + } + } + ] + }, + "provisioningState": { + "$id": "1668", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Succeeded" + } + } + } + } + } + }, + { + "$id": "1669", + "response": { + "$ref": "989" + }, + "statusCode": 201, + "bodyValue": { + "$id": "1670", + "kind": "model", + "type": { + "$ref": "159" + }, + "value": { + "$id": "1671", + "id": { + "$id": "1672", + "kind": "string", + "type": { + "$ref": "163" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.DeviceRegistry/assets/my-asset" + }, + "name": { + "$id": "1673", + "kind": "string", + "type": { + "$ref": "168" + }, + "value": "my-asset" + }, + "type": { + "$id": "1674", + "kind": "string", + "type": { + "$ref": "172" + }, + "value": "Microsoft.DeviceRegistry/assets" + }, + "location": { + "$id": "1675", + "kind": "string", + "type": { + "$ref": "211" + }, + "value": "West Europe" + }, + "extendedLocation": { + "$id": "1676", + "kind": "model", + "type": { + "$ref": "431" + }, + "value": { + "$id": "1677", + "type": { + "$id": "1678", + "kind": "string", + "type": { + "$ref": "433" + }, + "value": "CustomLocation" + }, + "name": { + "$id": "1679", + "kind": "string", + "type": { + "$ref": "437" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/microsoft.extendedlocation/customlocations/location1" + } + } + }, + "tags": { + "$id": "1680", + "kind": "dict", + "type": { + "$ref": "205" + }, + "value": { + "$id": "1681", + "site": { + "$id": "1682", + "kind": "string", + "type": { + "$ref": "207" + }, + "value": "building-1" + } + } + }, + "systemData": { + "$id": "1683", + "kind": "model", + "type": { + "$ref": "177" + }, + "value": { + "$id": "1684", + "createdBy": { + "$id": "1685", + "kind": "string", + "type": { + "$ref": "179" + }, + "value": "2ta23112-4596-44ff-b773-19405922bfc1" + }, + "createdByType": { + "$id": "1686", + "kind": "string", + "type": { + "$ref": "50" + }, + "value": "Application" + }, + "createdAt": { + "$id": "1687", + "kind": "string", + "type": { + "$ref": "186" + }, + "value": "2022-11-16T00:36:43.2516899Z" + }, + "lastModifiedBy": { + "$id": "1688", + "kind": "string", + "type": { + "$ref": "191" + }, + "value": "2ta23112-4596-44ff-b773-19405922bfc1" + }, + "lastModifiedByType": { + "$id": "1689", + "kind": "string", + "type": { + "$ref": "50" + }, + "value": "Application" + }, + "lastModifiedAt": { + "$id": "1690", + "kind": "string", + "type": { + "$ref": "198" + }, + "value": "2022-11-16T01:37:16.0922793Z" + } + } + }, + "properties": { + "$id": "1691", + "kind": "model", + "type": { + "$ref": "215" + }, + "value": { + "$id": "1692", + "uuid": { + "$id": "1693", + "kind": "string", + "type": { + "$ref": "217" + }, + "value": "0796f7c1-f2c8-44d7-9f5b-9a6f9522a85d" + }, + "enabled": { + "$id": "1694", + "kind": "boolean", + "type": { + "$ref": "221" + }, + "value": true + }, + "externalAssetId": { + "$id": "1695", + "kind": "string", + "type": { + "$ref": "225" + }, + "value": "8ZBA6LRHU0A458969" + }, + "displayName": { + "$id": "1696", + "kind": "string", + "type": { + "$ref": "229" + }, + "value": "my-asset" + }, + "description": { + "$id": "1697", + "kind": "string", + "type": { + "$ref": "233" + }, + "value": "This is a sample Asset" + }, + "assetEndpointProfileRef": { + "$id": "1698", + "kind": "string", + "type": { + "$ref": "237" + }, + "value": "myAssetEndpointProfile" + }, + "version": { + "$id": "1699", + "kind": "number", + "type": { + "$ref": "241" + }, + "value": 73766 + }, + "manufacturer": { + "$id": "1700", + "kind": "string", + "type": { + "$ref": "245" + }, + "value": "Contoso" + }, + "manufacturerUri": { + "$id": "1701", + "kind": "string", + "type": { + "$ref": "249" + }, + "value": "https://www.contoso.com/manufacturerUri" + }, + "model": { + "$id": "1702", + "kind": "string", + "type": { + "$ref": "253" + }, + "value": "ContosoModel" + }, + "productCode": { + "$id": "1703", + "kind": "string", + "type": { + "$ref": "257" + }, + "value": "SA34VDG" + }, + "hardwareRevision": { + "$id": "1704", + "kind": "string", + "type": { + "$ref": "261" + }, + "value": "1.0" + }, + "softwareRevision": { + "$id": "1705", + "kind": "string", + "type": { + "$ref": "265" + }, + "value": "2.0" + }, + "documentationUri": { + "$id": "1706", + "kind": "string", + "type": { + "$ref": "269" + }, + "value": "https://www.example.com/manual" + }, + "serialNumber": { + "$id": "1707", + "kind": "string", + "type": { + "$ref": "273" + }, + "value": "64-103816-519918-8" + }, + "defaultDatasetsConfiguration": { + "$id": "1708", + "kind": "string", + "type": { + "$ref": "288" + }, + "value": "{\"publishingInterval\":10,\"samplingInterval\":15,\"queueSize\":20}" + }, + "defaultEventsConfiguration": { + "$id": "1709", + "kind": "string", + "type": { + "$ref": "292" + }, + "value": "{\"publishingInterval\":10,\"samplingInterval\":15,\"queueSize\":20}" + }, + "defaultTopic": { + "$id": "1710", + "kind": "model", + "type": { + "$ref": "296" + }, + "value": { + "$id": "1711", + "path": { + "$id": "1712", + "kind": "string", + "type": { + "$ref": "298" + }, + "value": "/path/defaultTopic" + }, + "retain": { + "$id": "1713", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Keep" + } + } + }, + "datasets": { + "$id": "1714", + "kind": "array", + "type": { + "$ref": "307" + }, + "value": [ + { + "$id": "1715", + "kind": "model", + "type": { + "$ref": "308" + }, + "value": { + "$id": "1716", + "name": { + "$id": "1717", + "kind": "string", + "type": { + "$ref": "310" + }, + "value": "dataset1" + }, + "datasetConfiguration": { + "$id": "1718", + "kind": "string", + "type": { + "$ref": "314" + }, + "value": "{\"publishingInterval\":10,\"samplingInterval\":15,\"queueSize\":20}" + }, + "topic": { + "$id": "1719", + "kind": "model", + "type": { + "$ref": "296" + }, + "value": { + "$id": "1720", + "path": { + "$id": "1721", + "kind": "string", + "type": { + "$ref": "298" + }, + "value": "/path/dataset1" + }, + "retain": { + "$id": "1722", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Keep" + } + } + }, + "dataPoints": { + "$id": "1723", + "kind": "array", + "type": { + "$ref": "321" + }, + "value": [ + { + "$id": "1724", + "kind": "model", + "type": { + "$ref": "322" + }, + "value": { + "$id": "1725", + "name": { + "$id": "1726", + "kind": "string", + "type": { + "$ref": "325" + }, + "value": "dataPoint1" + }, + "dataSource": { + "$id": "1727", + "kind": "string", + "type": { + "$ref": "329" + }, + "value": "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt1" + }, + "observabilityMode": { + "$id": "1728", + "kind": "string", + "type": { + "$ref": "20" + }, + "value": "Counter" + }, + "dataPointConfiguration": { + "$id": "1729", + "kind": "string", + "type": { + "$ref": "333" + }, + "value": "{\"publishingInterval\":8,\"samplingInterval\":8,\"queueSize\":4}" + } + } + }, + { + "$id": "1730", + "kind": "model", + "type": { + "$ref": "322" + }, + "value": { + "$id": "1731", + "name": { + "$id": "1732", + "kind": "string", + "type": { + "$ref": "325" + }, + "value": "dataPoint2" + }, + "dataSource": { + "$id": "1733", + "kind": "string", + "type": { + "$ref": "329" + }, + "value": "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt2" + }, + "observabilityMode": { + "$id": "1734", + "kind": "string", + "type": { + "$ref": "20" + }, + "value": "None" + }, + "dataPointConfiguration": { + "$id": "1735", + "kind": "string", + "type": { + "$ref": "333" + }, + "value": "{\"publishingInterval\":4,\"samplingInterval\":4,\"queueSize\":7}" + } + } + } + ] + } + } + } + ] + }, + "events": { + "$id": "1736", + "kind": "array", + "type": { + "$ref": "344" + }, + "value": [ + { + "$id": "1737", + "kind": "model", + "type": { + "$ref": "345" + }, + "value": { + "$id": "1738", + "name": { + "$id": "1739", + "kind": "string", + "type": { + "$ref": "348" + }, + "value": "event1" + }, + "eventNotifier": { + "$id": "1740", + "kind": "string", + "type": { + "$ref": "352" + }, + "value": "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt3" + }, + "observabilityMode": { + "$id": "1741", + "kind": "string", + "type": { + "$ref": "32" + }, + "value": "None" + }, + "eventConfiguration": { + "$id": "1742", + "kind": "string", + "type": { + "$ref": "356" + }, + "value": "{\"publishingInterval\":7,\"samplingInterval\":1,\"queueSize\":8}" + }, + "topic": { + "$id": "1743", + "kind": "model", + "type": { + "$ref": "296" + }, + "value": { + "$id": "1744", + "path": { + "$id": "1745", + "kind": "string", + "type": { + "$ref": "298" + }, + "value": "/path/event1" + }, + "retain": { + "$id": "1746", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Keep" + } + } + } + } + }, + { + "$id": "1747", + "kind": "model", + "type": { + "$ref": "345" + }, + "value": { + "$id": "1748", + "name": { + "$id": "1749", + "kind": "string", + "type": { + "$ref": "348" + }, + "value": "event2" + }, + "eventNotifier": { + "$id": "1750", + "kind": "string", + "type": { + "$ref": "352" + }, + "value": "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt4" + }, + "observabilityMode": { + "$id": "1751", + "kind": "string", + "type": { + "$ref": "32" + }, + "value": "Log" + }, + "eventConfiguration": { + "$id": "1752", + "kind": "string", + "type": { + "$ref": "356" + }, + "value": "{\"publishingInterval\":7,\"samplingInterval\":8,\"queueSize\":4}" + } + } + } + ] + }, + "provisioningState": { + "$id": "1753", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Accepted" + } + } + } + } + } + } + ] + }, + { + "$id": "1754", + "kind": "http", + "name": "Create_Asset_Without_ExternalAssetId", + "description": "Create_Asset_Without_ExternalAssetId", + "filePath": "2024-11-01/Create_Asset_Without_ExternalAssetId.json", + "parameters": [ + { + "$id": "1755", + "parameter": { + "$ref": "970" + }, + "value": { + "$id": "1756", + "kind": "string", + "type": { + "$ref": "971" + }, + "value": "2024-11-01" + } + }, + { + "$id": "1757", + "parameter": { + "$ref": "974" + }, + "value": { + "$id": "1758", + "kind": "string", + "type": { + "$ref": "975" + }, + "value": "00000000-0000-0000-0000-000000000000" + } + }, + { + "$id": "1759", + "parameter": { + "$ref": "977" + }, + "value": { + "$id": "1760", + "kind": "string", + "type": { + "$ref": "978" + }, + "value": "myResourceGroup" + } + }, + { + "$id": "1761", + "parameter": { + "$ref": "979" + }, + "value": { + "$id": "1762", + "kind": "string", + "type": { + "$ref": "980" + }, + "value": "my-asset" + } + }, + { + "$id": "1763", + "parameter": { + "$ref": "987" + }, + "value": { + "$id": "1764", + "kind": "model", + "type": { + "$ref": "159" + }, + "value": { + "$id": "1765", + "location": { + "$id": "1766", + "kind": "string", + "type": { + "$ref": "211" + }, + "value": "West Europe" + }, + "extendedLocation": { + "$id": "1767", + "kind": "model", + "type": { + "$ref": "431" + }, + "value": { + "$id": "1768", + "type": { + "$id": "1769", + "kind": "string", + "type": { + "$ref": "433" + }, + "value": "CustomLocation" + }, + "name": { + "$id": "1770", + "kind": "string", + "type": { + "$ref": "437" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/microsoft.extendedlocation/customlocations/location1" + } + } + }, + "tags": { + "$id": "1771", + "kind": "dict", + "type": { + "$ref": "205" + }, + "value": { + "$id": "1772", + "site": { + "$id": "1773", + "kind": "string", + "type": { + "$ref": "207" + }, + "value": "building-1" + } + } + }, + "properties": { + "$id": "1774", + "kind": "model", + "type": { + "$ref": "215" + }, + "value": { + "$id": "1775", + "enabled": { + "$id": "1776", + "kind": "boolean", + "type": { + "$ref": "221" + }, + "value": true + }, + "displayName": { + "$id": "1777", + "kind": "string", + "type": { + "$ref": "229" + }, + "value": "AssetDisplayName" + }, + "description": { + "$id": "1778", + "kind": "string", + "type": { + "$ref": "233" + }, + "value": "This is a sample Asset" + }, + "assetEndpointProfileRef": { + "$id": "1779", + "kind": "string", + "type": { + "$ref": "237" + }, + "value": "myAssetEndpointProfile" + }, + "manufacturer": { + "$id": "1780", + "kind": "string", + "type": { + "$ref": "245" + }, + "value": "Contoso" + }, + "manufacturerUri": { + "$id": "1781", + "kind": "string", + "type": { + "$ref": "249" + }, + "value": "https://www.contoso.com/manufacturerUri" + }, + "model": { + "$id": "1782", + "kind": "string", + "type": { + "$ref": "253" + }, + "value": "ContosoModel" + }, + "productCode": { + "$id": "1783", + "kind": "string", + "type": { + "$ref": "257" + }, + "value": "SA34VDG" + }, + "hardwareRevision": { + "$id": "1784", + "kind": "string", + "type": { + "$ref": "261" + }, + "value": "1.0" + }, + "softwareRevision": { + "$id": "1785", + "kind": "string", + "type": { + "$ref": "265" + }, + "value": "2.0" + }, + "documentationUri": { + "$id": "1786", + "kind": "string", + "type": { + "$ref": "269" + }, + "value": "https://www.example.com/manual" + }, + "serialNumber": { + "$id": "1787", + "kind": "string", + "type": { + "$ref": "273" + }, + "value": "64-103816-519918-8" + }, + "defaultDatasetsConfiguration": { + "$id": "1788", + "kind": "string", + "type": { + "$ref": "288" + }, + "value": "{\"publishingInterval\":10,\"samplingInterval\":15,\"queueSize\":20}" + }, + "defaultEventsConfiguration": { + "$id": "1789", + "kind": "string", + "type": { + "$ref": "292" + }, + "value": "{\"publishingInterval\":10,\"samplingInterval\":15,\"queueSize\":20}" + }, + "defaultTopic": { + "$id": "1790", + "kind": "model", + "type": { + "$ref": "296" + }, + "value": { + "$id": "1791", + "path": { + "$id": "1792", + "kind": "string", + "type": { + "$ref": "298" + }, + "value": "/path/defaultTopic" + }, + "retain": { + "$id": "1793", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Keep" + } + } + }, + "datasets": { + "$id": "1794", + "kind": "array", + "type": { + "$ref": "307" + }, + "value": [ + { + "$id": "1795", + "kind": "model", + "type": { + "$ref": "308" + }, + "value": { + "$id": "1796", + "name": { + "$id": "1797", + "kind": "string", + "type": { + "$ref": "310" + }, + "value": "dataset1" + }, + "datasetConfiguration": { + "$id": "1798", + "kind": "string", + "type": { + "$ref": "314" + }, + "value": "{\"publishingInterval\":10,\"samplingInterval\":15,\"queueSize\":20}" + }, + "topic": { + "$id": "1799", + "kind": "model", + "type": { + "$ref": "296" + }, + "value": { + "$id": "1800", + "path": { + "$id": "1801", + "kind": "string", + "type": { + "$ref": "298" + }, + "value": "/path/dataset1" + }, + "retain": { + "$id": "1802", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Keep" + } + } + }, + "dataPoints": { + "$id": "1803", + "kind": "array", + "type": { + "$ref": "321" + }, + "value": [ + { + "$id": "1804", + "kind": "model", + "type": { + "$ref": "322" + }, + "value": { + "$id": "1805", + "name": { + "$id": "1806", + "kind": "string", + "type": { + "$ref": "325" + }, + "value": "dataPoint1" + }, + "dataSource": { + "$id": "1807", + "kind": "string", + "type": { + "$ref": "329" + }, + "value": "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt1" + }, + "observabilityMode": { + "$id": "1808", + "kind": "string", + "type": { + "$ref": "20" + }, + "value": "Counter" + }, + "dataPointConfiguration": { + "$id": "1809", + "kind": "string", + "type": { + "$ref": "333" + }, + "value": "{\"publishingInterval\":8,\"samplingInterval\":8,\"queueSize\":4}" + } + } + }, + { + "$id": "1810", + "kind": "model", + "type": { + "$ref": "322" + }, + "value": { + "$id": "1811", + "name": { + "$id": "1812", + "kind": "string", + "type": { + "$ref": "325" + }, + "value": "dataPoint2" + }, + "dataSource": { + "$id": "1813", + "kind": "string", + "type": { + "$ref": "329" + }, + "value": "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt2" + }, + "observabilityMode": { + "$id": "1814", + "kind": "string", + "type": { + "$ref": "20" + }, + "value": "None" + }, + "dataPointConfiguration": { + "$id": "1815", + "kind": "string", + "type": { + "$ref": "333" + }, + "value": "{\"publishingInterval\":4,\"samplingInterval\":4,\"queueSize\":7}" + } + } + } + ] + } + } + } + ] + }, + "events": { + "$id": "1816", + "kind": "array", + "type": { + "$ref": "344" + }, + "value": [ + { + "$id": "1817", + "kind": "model", + "type": { + "$ref": "345" + }, + "value": { + "$id": "1818", + "name": { + "$id": "1819", + "kind": "string", + "type": { + "$ref": "348" + }, + "value": "event1" + }, + "eventNotifier": { + "$id": "1820", + "kind": "string", + "type": { + "$ref": "352" + }, + "value": "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt3" + }, + "observabilityMode": { + "$id": "1821", + "kind": "string", + "type": { + "$ref": "32" + }, + "value": "None" + }, + "eventConfiguration": { + "$id": "1822", + "kind": "string", + "type": { + "$ref": "356" + }, + "value": "{\"publishingInterval\":7,\"samplingInterval\":1,\"queueSize\":8}" + }, + "topic": { + "$id": "1823", + "kind": "model", + "type": { + "$ref": "296" + }, + "value": { + "$id": "1824", + "path": { + "$id": "1825", + "kind": "string", + "type": { + "$ref": "298" + }, + "value": "/path/event1" + }, + "retain": { + "$id": "1826", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Keep" + } + } + } + } + }, + { + "$id": "1827", + "kind": "model", + "type": { + "$ref": "345" + }, + "value": { + "$id": "1828", + "name": { + "$id": "1829", + "kind": "string", + "type": { + "$ref": "348" + }, + "value": "event2" + }, + "eventNotifier": { + "$id": "1830", + "kind": "string", + "type": { + "$ref": "352" + }, + "value": "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt4" + }, + "observabilityMode": { + "$id": "1831", + "kind": "string", + "type": { + "$ref": "32" + }, + "value": "Log" + }, + "eventConfiguration": { + "$id": "1832", + "kind": "string", + "type": { + "$ref": "356" + }, + "value": "{\"publishingInterval\":7,\"samplingInterval\":8,\"queueSize\":4}" + } + } + } + ] + } + } + } + } + } + } + ], + "responses": [ + { + "$id": "1833", + "response": { + "$ref": "988" + }, + "statusCode": 200, + "bodyValue": { + "$id": "1834", + "kind": "model", + "type": { + "$ref": "159" + }, + "value": { + "$id": "1835", + "id": { + "$id": "1836", + "kind": "string", + "type": { + "$ref": "163" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.DeviceRegistry/assets/my-asset" + }, + "name": { + "$id": "1837", + "kind": "string", + "type": { + "$ref": "168" + }, + "value": "my-asset" + }, + "type": { + "$id": "1838", + "kind": "string", + "type": { + "$ref": "172" + }, + "value": "Microsoft.DeviceRegistry/assets" + }, + "location": { + "$id": "1839", + "kind": "string", + "type": { + "$ref": "211" + }, + "value": "West Europe" + }, + "extendedLocation": { + "$id": "1840", + "kind": "model", + "type": { + "$ref": "431" + }, + "value": { + "$id": "1841", + "type": { + "$id": "1842", + "kind": "string", + "type": { + "$ref": "433" + }, + "value": "CustomLocation" + }, + "name": { + "$id": "1843", + "kind": "string", + "type": { + "$ref": "437" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/microsoft.extendedlocation/customlocations/location1" + } + } + }, + "tags": { + "$id": "1844", + "kind": "dict", + "type": { + "$ref": "205" + }, + "value": { + "$id": "1845", + "site": { + "$id": "1846", + "kind": "string", + "type": { + "$ref": "207" + }, + "value": "building-1" + } + } + }, + "systemData": { + "$id": "1847", + "kind": "model", + "type": { + "$ref": "177" + }, + "value": { + "$id": "1848", + "createdBy": { + "$id": "1849", + "kind": "string", + "type": { + "$ref": "179" + }, + "value": "2ta23112-4596-44ff-b773-19405922bfc1" + }, + "createdByType": { + "$id": "1850", + "kind": "string", + "type": { + "$ref": "50" + }, + "value": "Application" + }, + "createdAt": { + "$id": "1851", + "kind": "string", + "type": { + "$ref": "186" + }, + "value": "2022-11-16T00:36:43.2516899Z" + }, + "lastModifiedBy": { + "$id": "1852", + "kind": "string", + "type": { + "$ref": "191" + }, + "value": "2ta23112-4596-44ff-b773-19405922bfc1" + }, + "lastModifiedByType": { + "$id": "1853", + "kind": "string", + "type": { + "$ref": "50" + }, + "value": "Application" + }, + "lastModifiedAt": { + "$id": "1854", + "kind": "string", + "type": { + "$ref": "198" + }, + "value": "2022-11-16T01:37:16.0922793Z" + } + } + }, + "properties": { + "$id": "1855", + "kind": "model", + "type": { + "$ref": "215" + }, + "value": { + "$id": "1856", + "uuid": { + "$id": "1857", + "kind": "string", + "type": { + "$ref": "217" + }, + "value": "0796f7c1-f2c8-44d7-9f5b-9a6f9522a85d" + }, + "enabled": { + "$id": "1858", + "kind": "boolean", + "type": { + "$ref": "221" + }, + "value": true + }, + "externalAssetId": { + "$id": "1859", + "kind": "string", + "type": { + "$ref": "225" + }, + "value": "0796f7c1-f2c8-44d7-9f5b-9a6f9522a85d" + }, + "displayName": { + "$id": "1860", + "kind": "string", + "type": { + "$ref": "229" + }, + "value": "AssetDisplayName" + }, + "description": { + "$id": "1861", + "kind": "string", + "type": { + "$ref": "233" + }, + "value": "This is a sample Asset" + }, + "assetEndpointProfileRef": { + "$id": "1862", + "kind": "string", + "type": { + "$ref": "237" + }, + "value": "myAssetEndpointProfile" + }, + "version": { + "$id": "1863", + "kind": "number", + "type": { + "$ref": "241" + }, + "value": 73766 + }, + "manufacturer": { + "$id": "1864", + "kind": "string", + "type": { + "$ref": "245" + }, + "value": "Contoso" + }, + "manufacturerUri": { + "$id": "1865", + "kind": "string", + "type": { + "$ref": "249" + }, + "value": "https://www.contoso.com/manufacturerUri" + }, + "model": { + "$id": "1866", + "kind": "string", + "type": { + "$ref": "253" + }, + "value": "ContosoModel" + }, + "productCode": { + "$id": "1867", + "kind": "string", + "type": { + "$ref": "257" + }, + "value": "SA34VDG" + }, + "hardwareRevision": { + "$id": "1868", + "kind": "string", + "type": { + "$ref": "261" + }, + "value": "1.0" + }, + "softwareRevision": { + "$id": "1869", + "kind": "string", + "type": { + "$ref": "265" + }, + "value": "2.0" + }, + "documentationUri": { + "$id": "1870", + "kind": "string", + "type": { + "$ref": "269" + }, + "value": "https://www.example.com/manual" + }, + "serialNumber": { + "$id": "1871", + "kind": "string", + "type": { + "$ref": "273" + }, + "value": "64-103816-519918-8" + }, + "defaultDatasetsConfiguration": { + "$id": "1872", + "kind": "string", + "type": { + "$ref": "288" + }, + "value": "{\"publishingInterval\":10,\"samplingInterval\":15,\"queueSize\":20}" + }, + "defaultEventsConfiguration": { + "$id": "1873", + "kind": "string", + "type": { + "$ref": "292" + }, + "value": "{\"publishingInterval\":10,\"samplingInterval\":15,\"queueSize\":20}" + }, + "defaultTopic": { + "$id": "1874", + "kind": "model", + "type": { + "$ref": "296" + }, + "value": { + "$id": "1875", + "path": { + "$id": "1876", + "kind": "string", + "type": { + "$ref": "298" + }, + "value": "/path/defaultTopic" + }, + "retain": { + "$id": "1877", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Keep" + } + } + }, + "datasets": { + "$id": "1878", + "kind": "array", + "type": { + "$ref": "307" + }, + "value": [ + { + "$id": "1879", + "kind": "model", + "type": { + "$ref": "308" + }, + "value": { + "$id": "1880", + "name": { + "$id": "1881", + "kind": "string", + "type": { + "$ref": "310" + }, + "value": "dataset1" + }, + "datasetConfiguration": { + "$id": "1882", + "kind": "string", + "type": { + "$ref": "314" + }, + "value": "{\"publishingInterval\":10,\"samplingInterval\":15,\"queueSize\":20}" + }, + "topic": { + "$id": "1883", + "kind": "model", + "type": { + "$ref": "296" + }, + "value": { + "$id": "1884", + "path": { + "$id": "1885", + "kind": "string", + "type": { + "$ref": "298" + }, + "value": "/path/dataset1" + }, + "retain": { + "$id": "1886", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Keep" + } + } + }, + "dataPoints": { + "$id": "1887", + "kind": "array", + "type": { + "$ref": "321" + }, + "value": [ + { + "$id": "1888", + "kind": "model", + "type": { + "$ref": "322" + }, + "value": { + "$id": "1889", + "name": { + "$id": "1890", + "kind": "string", + "type": { + "$ref": "325" + }, + "value": "dataPoint1" + }, + "dataSource": { + "$id": "1891", + "kind": "string", + "type": { + "$ref": "329" + }, + "value": "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt1" + }, + "observabilityMode": { + "$id": "1892", + "kind": "string", + "type": { + "$ref": "20" + }, + "value": "Counter" + }, + "dataPointConfiguration": { + "$id": "1893", + "kind": "string", + "type": { + "$ref": "333" + }, + "value": "{\"publishingInterval\":8,\"samplingInterval\":8,\"queueSize\":4}" + } + } + }, + { + "$id": "1894", + "kind": "model", + "type": { + "$ref": "322" + }, + "value": { + "$id": "1895", + "name": { + "$id": "1896", + "kind": "string", + "type": { + "$ref": "325" + }, + "value": "dataPoint2" + }, + "dataSource": { + "$id": "1897", + "kind": "string", + "type": { + "$ref": "329" + }, + "value": "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt2" + }, + "observabilityMode": { + "$id": "1898", + "kind": "string", + "type": { + "$ref": "20" + }, + "value": "None" + }, + "dataPointConfiguration": { + "$id": "1899", + "kind": "string", + "type": { + "$ref": "333" + }, + "value": "{\"publishingInterval\":4,\"samplingInterval\":4,\"queueSize\":7}" + } + } + } + ] + } + } + } + ] + }, + "events": { + "$id": "1900", + "kind": "array", + "type": { + "$ref": "344" + }, + "value": [ + { + "$id": "1901", + "kind": "model", + "type": { + "$ref": "345" + }, + "value": { + "$id": "1902", + "name": { + "$id": "1903", + "kind": "string", + "type": { + "$ref": "348" + }, + "value": "event1" + }, + "eventNotifier": { + "$id": "1904", + "kind": "string", + "type": { + "$ref": "352" + }, + "value": "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt3" + }, + "observabilityMode": { + "$id": "1905", + "kind": "string", + "type": { + "$ref": "32" + }, + "value": "None" + }, + "eventConfiguration": { + "$id": "1906", + "kind": "string", + "type": { + "$ref": "356" + }, + "value": "{\"publishingInterval\":7,\"samplingInterval\":1,\"queueSize\":8}" + }, + "topic": { + "$id": "1907", + "kind": "model", + "type": { + "$ref": "296" + }, + "value": { + "$id": "1908", + "path": { + "$id": "1909", + "kind": "string", + "type": { + "$ref": "298" + }, + "value": "/path/event1" + }, + "retain": { + "$id": "1910", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Keep" + } + } + } + } + }, + { + "$id": "1911", + "kind": "model", + "type": { + "$ref": "345" + }, + "value": { + "$id": "1912", + "name": { + "$id": "1913", + "kind": "string", + "type": { + "$ref": "348" + }, + "value": "event2" + }, + "eventNotifier": { + "$id": "1914", + "kind": "string", + "type": { + "$ref": "352" + }, + "value": "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt4" + }, + "observabilityMode": { + "$id": "1915", + "kind": "string", + "type": { + "$ref": "32" + }, + "value": "Log" + }, + "eventConfiguration": { + "$id": "1916", + "kind": "string", + "type": { + "$ref": "356" + }, + "value": "{\"publishingInterval\":7,\"samplingInterval\":8,\"queueSize\":4}" + } + } + } + ] + }, + "provisioningState": { + "$id": "1917", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Succeeded" + } + } + } + } + } + }, + { + "$id": "1918", + "response": { + "$ref": "989" + }, + "statusCode": 201, + "bodyValue": { + "$id": "1919", + "kind": "model", + "type": { + "$ref": "159" + }, + "value": { + "$id": "1920", + "id": { + "$id": "1921", + "kind": "string", + "type": { + "$ref": "163" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.DeviceRegistry/assets/my-asset" + }, + "name": { + "$id": "1922", + "kind": "string", + "type": { + "$ref": "168" + }, + "value": "my-asset" + }, + "type": { + "$id": "1923", + "kind": "string", + "type": { + "$ref": "172" + }, + "value": "Microsoft.DeviceRegistry/assets" + }, + "location": { + "$id": "1924", + "kind": "string", + "type": { + "$ref": "211" + }, + "value": "West Europe" + }, + "extendedLocation": { + "$id": "1925", + "kind": "model", + "type": { + "$ref": "431" + }, + "value": { + "$id": "1926", + "type": { + "$id": "1927", + "kind": "string", + "type": { + "$ref": "433" + }, + "value": "CustomLocation" + }, + "name": { + "$id": "1928", + "kind": "string", + "type": { + "$ref": "437" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/microsoft.extendedlocation/customlocations/location1" + } + } + }, + "tags": { + "$id": "1929", + "kind": "dict", + "type": { + "$ref": "205" + }, + "value": { + "$id": "1930", + "site": { + "$id": "1931", + "kind": "string", + "type": { + "$ref": "207" + }, + "value": "building-1" + } + } + }, + "systemData": { + "$id": "1932", + "kind": "model", + "type": { + "$ref": "177" + }, + "value": { + "$id": "1933", + "createdBy": { + "$id": "1934", + "kind": "string", + "type": { + "$ref": "179" + }, + "value": "2ta23112-4596-44ff-b773-19405922bfc1" + }, + "createdByType": { + "$id": "1935", + "kind": "string", + "type": { + "$ref": "50" + }, + "value": "Application" + }, + "createdAt": { + "$id": "1936", + "kind": "string", + "type": { + "$ref": "186" + }, + "value": "2022-11-16T00:36:43.2516899Z" + }, + "lastModifiedBy": { + "$id": "1937", + "kind": "string", + "type": { + "$ref": "191" + }, + "value": "2ta23112-4596-44ff-b773-19405922bfc1" + }, + "lastModifiedByType": { + "$id": "1938", + "kind": "string", + "type": { + "$ref": "50" + }, + "value": "Application" + }, + "lastModifiedAt": { + "$id": "1939", + "kind": "string", + "type": { + "$ref": "198" + }, + "value": "2022-11-16T01:37:16.0922793Z" + } + } + }, + "properties": { + "$id": "1940", + "kind": "model", + "type": { + "$ref": "215" + }, + "value": { + "$id": "1941", + "uuid": { + "$id": "1942", + "kind": "string", + "type": { + "$ref": "217" + }, + "value": "0796f7c1-f2c8-44d7-9f5b-9a6f9522a85d" + }, + "enabled": { + "$id": "1943", + "kind": "boolean", + "type": { + "$ref": "221" + }, + "value": true + }, + "externalAssetId": { + "$id": "1944", + "kind": "string", + "type": { + "$ref": "225" + }, + "value": "0796f7c1-f2c8-44d7-9f5b-9a6f9522a85d" + }, + "displayName": { + "$id": "1945", + "kind": "string", + "type": { + "$ref": "229" + }, + "value": "AssetDisplayName" + }, + "description": { + "$id": "1946", + "kind": "string", + "type": { + "$ref": "233" + }, + "value": "This is a sample Asset" + }, + "assetEndpointProfileRef": { + "$id": "1947", + "kind": "string", + "type": { + "$ref": "237" + }, + "value": "myAssetEndpointProfile" + }, + "version": { + "$id": "1948", + "kind": "number", + "type": { + "$ref": "241" + }, + "value": 73766 + }, + "manufacturer": { + "$id": "1949", + "kind": "string", + "type": { + "$ref": "245" + }, + "value": "Contoso" + }, + "manufacturerUri": { + "$id": "1950", + "kind": "string", + "type": { + "$ref": "249" + }, + "value": "https://www.contoso.com/manufacturerUri" + }, + "model": { + "$id": "1951", + "kind": "string", + "type": { + "$ref": "253" + }, + "value": "ContosoModel" + }, + "productCode": { + "$id": "1952", + "kind": "string", + "type": { + "$ref": "257" + }, + "value": "SA34VDG" + }, + "hardwareRevision": { + "$id": "1953", + "kind": "string", + "type": { + "$ref": "261" + }, + "value": "1.0" + }, + "softwareRevision": { + "$id": "1954", + "kind": "string", + "type": { + "$ref": "265" + }, + "value": "2.0" + }, + "documentationUri": { + "$id": "1955", + "kind": "string", + "type": { + "$ref": "269" + }, + "value": "https://www.example.com/manual" + }, + "serialNumber": { + "$id": "1956", + "kind": "string", + "type": { + "$ref": "273" + }, + "value": "64-103816-519918-8" + }, + "defaultDatasetsConfiguration": { + "$id": "1957", + "kind": "string", + "type": { + "$ref": "288" + }, + "value": "{\"publishingInterval\":10,\"samplingInterval\":15,\"queueSize\":20}" + }, + "defaultEventsConfiguration": { + "$id": "1958", + "kind": "string", + "type": { + "$ref": "292" + }, + "value": "{\"publishingInterval\":10,\"samplingInterval\":15,\"queueSize\":20}" + }, + "defaultTopic": { + "$id": "1959", + "kind": "model", + "type": { + "$ref": "296" + }, + "value": { + "$id": "1960", + "path": { + "$id": "1961", + "kind": "string", + "type": { + "$ref": "298" + }, + "value": "/path/defaultTopic" + }, + "retain": { + "$id": "1962", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Keep" + } + } + }, + "datasets": { + "$id": "1963", + "kind": "array", + "type": { + "$ref": "307" + }, + "value": [ + { + "$id": "1964", + "kind": "model", + "type": { + "$ref": "308" + }, + "value": { + "$id": "1965", + "name": { + "$id": "1966", + "kind": "string", + "type": { + "$ref": "310" + }, + "value": "dataset1" + }, + "datasetConfiguration": { + "$id": "1967", + "kind": "string", + "type": { + "$ref": "314" + }, + "value": "{\"publishingInterval\":10,\"samplingInterval\":15,\"queueSize\":20}" + }, + "topic": { + "$id": "1968", + "kind": "model", + "type": { + "$ref": "296" + }, + "value": { + "$id": "1969", + "path": { + "$id": "1970", + "kind": "string", + "type": { + "$ref": "298" + }, + "value": "/path/dataset1" + }, + "retain": { + "$id": "1971", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Keep" + } + } + }, + "dataPoints": { + "$id": "1972", + "kind": "array", + "type": { + "$ref": "321" + }, + "value": [ + { + "$id": "1973", + "kind": "model", + "type": { + "$ref": "322" + }, + "value": { + "$id": "1974", + "name": { + "$id": "1975", + "kind": "string", + "type": { + "$ref": "325" + }, + "value": "dataPoint1" + }, + "dataSource": { + "$id": "1976", + "kind": "string", + "type": { + "$ref": "329" + }, + "value": "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt1" + }, + "observabilityMode": { + "$id": "1977", + "kind": "string", + "type": { + "$ref": "20" + }, + "value": "Counter" + }, + "dataPointConfiguration": { + "$id": "1978", + "kind": "string", + "type": { + "$ref": "333" + }, + "value": "{\"publishingInterval\":8,\"samplingInterval\":8,\"queueSize\":4}" + } + } + }, + { + "$id": "1979", + "kind": "model", + "type": { + "$ref": "322" + }, + "value": { + "$id": "1980", + "name": { + "$id": "1981", + "kind": "string", + "type": { + "$ref": "325" + }, + "value": "dataPoint2" + }, + "dataSource": { + "$id": "1982", + "kind": "string", + "type": { + "$ref": "329" + }, + "value": "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt2" + }, + "observabilityMode": { + "$id": "1983", + "kind": "string", + "type": { + "$ref": "20" + }, + "value": "None" + }, + "dataPointConfiguration": { + "$id": "1984", + "kind": "string", + "type": { + "$ref": "333" + }, + "value": "{\"publishingInterval\":4,\"samplingInterval\":4,\"queueSize\":7}" + } + } + } + ] + } + } + } + ] + }, + "events": { + "$id": "1985", + "kind": "array", + "type": { + "$ref": "344" + }, + "value": [ + { + "$id": "1986", + "kind": "model", + "type": { + "$ref": "345" + }, + "value": { + "$id": "1987", + "name": { + "$id": "1988", + "kind": "string", + "type": { + "$ref": "348" + }, + "value": "event1" + }, + "eventNotifier": { + "$id": "1989", + "kind": "string", + "type": { + "$ref": "352" + }, + "value": "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt3" + }, + "observabilityMode": { + "$id": "1990", + "kind": "string", + "type": { + "$ref": "32" + }, + "value": "None" + }, + "eventConfiguration": { + "$id": "1991", + "kind": "string", + "type": { + "$ref": "356" + }, + "value": "{\"publishingInterval\":7,\"samplingInterval\":1,\"queueSize\":8}" + }, + "topic": { + "$id": "1992", + "kind": "model", + "type": { + "$ref": "296" + }, + "value": { + "$id": "1993", + "path": { + "$id": "1994", + "kind": "string", + "type": { + "$ref": "298" + }, + "value": "/path/event1" + }, + "retain": { + "$id": "1995", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Keep" + } + } + } + } + }, + { + "$id": "1996", + "kind": "model", + "type": { + "$ref": "345" + }, + "value": { + "$id": "1997", + "name": { + "$id": "1998", + "kind": "string", + "type": { + "$ref": "348" + }, + "value": "event2" + }, + "eventNotifier": { + "$id": "1999", + "kind": "string", + "type": { + "$ref": "352" + }, + "value": "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt4" + }, + "observabilityMode": { + "$id": "2000", + "kind": "string", + "type": { + "$ref": "32" + }, + "value": "Log" + }, + "eventConfiguration": { + "$id": "2001", + "kind": "string", + "type": { + "$ref": "356" + }, + "value": "{\"publishingInterval\":7,\"samplingInterval\":8,\"queueSize\":4}" + } + } + } + ] + }, + "provisioningState": { + "$id": "2002", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Accepted" + } + } + } + } + } + } + ] + } + ] + }, + { + "$id": "2003", + "name": "update", + "resourceName": "Asset", + "doc": "Update a Asset", + "accessibility": "public", + "parameters": [ + { + "$id": "2004", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "2005", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "2006", + "type": { + "$id": "2007", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2024-11-01" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2008", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "2009", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "2010", + "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": "2011", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "2012", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2013", + "name": "assetName", + "nameInRequest": "assetName", + "doc": "Asset name parameter.", + "type": { + "$id": "2014", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2015", + "name": "contentType", + "nameInRequest": "Content-Type", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$id": "2016", + "kind": "constant", + "valueType": { + "$id": "2017", + "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": "2018", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "2019", + "kind": "constant", + "valueType": { + "$id": "2020", + "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": "2021", + "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": "2022", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "159" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + }, + { + "$id": "2023", + "statusCodes": [ + 202 + ], + "headers": [ + { + "$id": "2024", + "name": "location", + "nameInResponse": "Location", + "doc": "The Location header contains the URL where the status of the long running operation can be checked.", + "type": { + "$id": "2025", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + { + "$id": "2026", + "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": "2027", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + } + } + ], + "isErrorResponse": false + } + ], + "httpMethod": "PATCH", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeviceRegistry/assets/{assetName}", + "requestMediaTypes": [ + "application/json" + ], + "bufferResponse": true, + "longRunning": { + "$id": "2028", + "finalStateVia": 1, + "finalResponse": { + "$id": "2029", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "159" + } + } + }, + "generateProtocolMethod": true, + "generateConvenienceMethod": false, + "crossLanguageDefinitionId": "Microsoft.DeviceRegistry.Assets.update", + "decorators": [], + "examples": [ + { + "$id": "2030", + "kind": "http", + "name": "Update_Asset", + "description": "Update_Asset", + "filePath": "2024-11-01/Update_Asset.json", + "parameters": [ + { + "$id": "2031", + "parameter": { + "$ref": "2004" + }, + "value": { + "$id": "2032", + "kind": "string", + "type": { + "$ref": "2005" + }, + "value": "2024-11-01" + } + }, + { + "$id": "2033", + "parameter": { + "$ref": "2008" + }, + "value": { + "$id": "2034", + "kind": "string", + "type": { + "$ref": "2009" + }, + "value": "00000000-0000-0000-0000-000000000000" + } + }, + { + "$id": "2035", + "parameter": { + "$ref": "2011" + }, + "value": { + "$id": "2036", + "kind": "string", + "type": { + "$ref": "2012" + }, + "value": "myResourceGroup" + } + }, + { + "$id": "2037", + "parameter": { + "$ref": "2013" + }, + "value": { + "$id": "2038", + "kind": "string", + "type": { + "$ref": "2014" + }, + "value": "my-asset" + } + }, + { + "$id": "2039", + "parameter": { + "$ref": "2021" + }, + "value": { + "$id": "2040", + "kind": "model", + "type": { + "$ref": "467" + }, + "value": { + "$id": "2041", + "properties": { + "$id": "2042", + "kind": "model", + "type": { + "$ref": "475" + }, + "value": { + "$id": "2043", + "enabled": { + "$id": "2044", + "kind": "boolean", + "type": { + "$ref": "477" + }, + "value": false + }, + "displayName": { + "$id": "2045", + "kind": "string", + "type": { + "$ref": "481" + }, + "value": "NewAssetDisplayName" + } + } + } + } + } + } + ], + "responses": [ + { + "$id": "2046", + "response": { + "$ref": "2022" + }, + "statusCode": 200, + "bodyValue": { + "$id": "2047", + "kind": "model", + "type": { + "$ref": "159" + }, + "value": { + "$id": "2048", + "id": { + "$id": "2049", + "kind": "string", + "type": { + "$ref": "163" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.DeviceRegistry/assets/my-asset" + }, + "name": { + "$id": "2050", + "kind": "string", + "type": { + "$ref": "168" + }, + "value": "my-asset" + }, + "type": { + "$id": "2051", + "kind": "string", + "type": { + "$ref": "172" + }, + "value": "Microsoft.DeviceRegistry/assets" + }, + "location": { + "$id": "2052", + "kind": "string", + "type": { + "$ref": "211" + }, + "value": "West Europe" + }, + "extendedLocation": { + "$id": "2053", + "kind": "model", + "type": { + "$ref": "431" + }, + "value": { + "$id": "2054", + "type": { + "$id": "2055", + "kind": "string", + "type": { + "$ref": "433" + }, + "value": "CustomLocation" + }, + "name": { + "$id": "2056", + "kind": "string", + "type": { + "$ref": "437" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/microsoft.extendedlocation/customlocations/location1" + } + } + }, + "tags": { + "$id": "2057", + "kind": "dict", + "type": { + "$ref": "205" + }, + "value": { + "$id": "2058", + "site": { + "$id": "2059", + "kind": "string", + "type": { + "$ref": "207" + }, + "value": "building-1" + } + } + }, + "systemData": { + "$id": "2060", + "kind": "model", + "type": { + "$ref": "177" + }, + "value": { + "$id": "2061", + "createdBy": { + "$id": "2062", + "kind": "string", + "type": { + "$ref": "179" + }, + "value": "2ta23112-4596-44ff-b773-19405922bfc1" + }, + "createdByType": { + "$id": "2063", + "kind": "string", + "type": { + "$ref": "50" + }, + "value": "Application" + }, + "createdAt": { + "$id": "2064", + "kind": "string", + "type": { + "$ref": "186" + }, + "value": "2022-11-16T00:36:43.2516899Z" + }, + "lastModifiedBy": { + "$id": "2065", + "kind": "string", + "type": { + "$ref": "191" + }, + "value": "2ta23112-4596-44ff-b773-19405922bfc1" + }, + "lastModifiedByType": { + "$id": "2066", + "kind": "string", + "type": { + "$ref": "50" + }, + "value": "Application" + }, + "lastModifiedAt": { + "$id": "2067", + "kind": "string", + "type": { + "$ref": "198" + }, + "value": "2022-11-16T01:37:16.0922793Z" + } + } + }, + "properties": { + "$id": "2068", + "kind": "model", + "type": { + "$ref": "215" + }, + "value": { + "$id": "2069", + "uuid": { + "$id": "2070", + "kind": "string", + "type": { + "$ref": "217" + }, + "value": "0796f7c1-f2c8-44d7-9f5b-9a6f9522a85d" + }, + "enabled": { + "$id": "2071", + "kind": "boolean", + "type": { + "$ref": "221" + }, + "value": true + }, + "externalAssetId": { + "$id": "2072", + "kind": "string", + "type": { + "$ref": "225" + }, + "value": "8ZBA6LRHU0A458969" + }, + "displayName": { + "$id": "2073", + "kind": "string", + "type": { + "$ref": "229" + }, + "value": "NewAssetDisplayName" + }, + "description": { + "$id": "2074", + "kind": "string", + "type": { + "$ref": "233" + }, + "value": "This is a sample Asset" + }, + "assetEndpointProfileRef": { + "$id": "2075", + "kind": "string", + "type": { + "$ref": "237" + }, + "value": "myAssetEndpointProfile" + }, + "version": { + "$id": "2076", + "kind": "number", + "type": { + "$ref": "241" + }, + "value": 73766 + }, + "manufacturer": { + "$id": "2077", + "kind": "string", + "type": { + "$ref": "245" + }, + "value": "Contoso" + }, + "manufacturerUri": { + "$id": "2078", + "kind": "string", + "type": { + "$ref": "249" + }, + "value": "https://www.contoso.com/manufacturerUri" + }, + "model": { + "$id": "2079", + "kind": "string", + "type": { + "$ref": "253" + }, + "value": "ContosoModel" + }, + "productCode": { + "$id": "2080", + "kind": "string", + "type": { + "$ref": "257" + }, + "value": "SA34VDG" + }, + "hardwareRevision": { + "$id": "2081", + "kind": "string", + "type": { + "$ref": "261" + }, + "value": "1.0" + }, + "softwareRevision": { + "$id": "2082", + "kind": "string", + "type": { + "$ref": "265" + }, + "value": "2.0" + }, + "documentationUri": { + "$id": "2083", + "kind": "string", + "type": { + "$ref": "269" + }, + "value": "https://www.example.com/manual" + }, + "serialNumber": { + "$id": "2084", + "kind": "string", + "type": { + "$ref": "273" + }, + "value": "64-103816-519918-8" + }, + "defaultDatasetsConfiguration": { + "$id": "2085", + "kind": "string", + "type": { + "$ref": "288" + }, + "value": "{\"publishingInterval\":10,\"samplingInterval\":15,\"queueSize\":20}" + }, + "defaultEventsConfiguration": { + "$id": "2086", + "kind": "string", + "type": { + "$ref": "292" + }, + "value": "{\"publishingInterval\":10,\"samplingInterval\":15,\"queueSize\":20}" + }, + "defaultTopic": { + "$id": "2087", + "kind": "model", + "type": { + "$ref": "296" + }, + "value": { + "$id": "2088", + "path": { + "$id": "2089", + "kind": "string", + "type": { + "$ref": "298" + }, + "value": "/path/defaultTopic" + }, + "retain": { + "$id": "2090", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Keep" + } + } + }, + "datasets": { + "$id": "2091", + "kind": "array", + "type": { + "$ref": "307" + }, + "value": [ + { + "$id": "2092", + "kind": "model", + "type": { + "$ref": "308" + }, + "value": { + "$id": "2093", + "name": { + "$id": "2094", + "kind": "string", + "type": { + "$ref": "310" + }, + "value": "dataset1" + }, + "datasetConfiguration": { + "$id": "2095", + "kind": "string", + "type": { + "$ref": "314" + }, + "value": "{\"publishingInterval\":10,\"samplingInterval\":15,\"queueSize\":20}" + }, + "topic": { + "$id": "2096", + "kind": "model", + "type": { + "$ref": "296" + }, + "value": { + "$id": "2097", + "path": { + "$id": "2098", + "kind": "string", + "type": { + "$ref": "298" + }, + "value": "/path/dataset1" + }, + "retain": { + "$id": "2099", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Keep" + } + } + }, + "dataPoints": { + "$id": "2100", + "kind": "array", + "type": { + "$ref": "321" + }, + "value": [ + { + "$id": "2101", + "kind": "model", + "type": { + "$ref": "322" + }, + "value": { + "$id": "2102", + "name": { + "$id": "2103", + "kind": "string", + "type": { + "$ref": "325" + }, + "value": "dataPoint1" + }, + "dataSource": { + "$id": "2104", + "kind": "string", + "type": { + "$ref": "329" + }, + "value": "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt1" + }, + "observabilityMode": { + "$id": "2105", + "kind": "string", + "type": { + "$ref": "20" + }, + "value": "Counter" + }, + "dataPointConfiguration": { + "$id": "2106", + "kind": "string", + "type": { + "$ref": "333" + }, + "value": "{\"publishingInterval\":8,\"samplingInterval\":8,\"queueSize\":4}" + } + } + }, + { + "$id": "2107", + "kind": "model", + "type": { + "$ref": "322" + }, + "value": { + "$id": "2108", + "name": { + "$id": "2109", + "kind": "string", + "type": { + "$ref": "325" + }, + "value": "dataPoint2" + }, + "dataSource": { + "$id": "2110", + "kind": "string", + "type": { + "$ref": "329" + }, + "value": "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt2" + }, + "observabilityMode": { + "$id": "2111", + "kind": "string", + "type": { + "$ref": "20" + }, + "value": "None" + }, + "dataPointConfiguration": { + "$id": "2112", + "kind": "string", + "type": { + "$ref": "333" + }, + "value": "{\"publishingInterval\":4,\"samplingInterval\":4,\"queueSize\":7}" + } + } + } + ] + } + } + } + ] + }, + "events": { + "$id": "2113", + "kind": "array", + "type": { + "$ref": "344" + }, + "value": [ + { + "$id": "2114", + "kind": "model", + "type": { + "$ref": "345" + }, + "value": { + "$id": "2115", + "name": { + "$id": "2116", + "kind": "string", + "type": { + "$ref": "348" + }, + "value": "event1" + }, + "eventNotifier": { + "$id": "2117", + "kind": "string", + "type": { + "$ref": "352" + }, + "value": "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt3" + }, + "observabilityMode": { + "$id": "2118", + "kind": "string", + "type": { + "$ref": "32" + }, + "value": "None" + }, + "eventConfiguration": { + "$id": "2119", + "kind": "string", + "type": { + "$ref": "356" + }, + "value": "{\"publishingInterval\":7,\"samplingInterval\":1,\"queueSize\":8}" + }, + "topic": { + "$id": "2120", + "kind": "model", + "type": { + "$ref": "296" + }, + "value": { + "$id": "2121", + "path": { + "$id": "2122", + "kind": "string", + "type": { + "$ref": "298" + }, + "value": "/path/event1" + }, + "retain": { + "$id": "2123", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Keep" + } + } + } + } + }, + { + "$id": "2124", + "kind": "model", + "type": { + "$ref": "345" + }, + "value": { + "$id": "2125", + "name": { + "$id": "2126", + "kind": "string", + "type": { + "$ref": "348" + }, + "value": "event2" + }, + "eventNotifier": { + "$id": "2127", + "kind": "string", + "type": { + "$ref": "352" + }, + "value": "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt4" + }, + "observabilityMode": { + "$id": "2128", + "kind": "string", + "type": { + "$ref": "32" + }, + "value": "Log" + }, + "eventConfiguration": { + "$id": "2129", + "kind": "string", + "type": { + "$ref": "356" + }, + "value": "{\"publishingInterval\":7,\"samplingInterval\":8,\"queueSize\":4}" + } + } + } + ] + }, + "provisioningState": { + "$id": "2130", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Succeeded" + } + } + } + } + } + }, + { + "$id": "2131", + "response": { + "$ref": "2023" + }, + "statusCode": 202 + } + ] + } + ] + }, + { + "$id": "2132", + "name": "delete", + "resourceName": "Asset", + "doc": "Delete a Asset", + "accessibility": "public", + "parameters": [ + { + "$id": "2133", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "2134", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "2135", + "type": { + "$id": "2136", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2024-11-01" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2137", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "2138", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "2139", + "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": "2140", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "2141", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2142", + "name": "assetName", + "nameInRequest": "assetName", + "doc": "Asset name parameter.", + "type": { + "$id": "2143", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2144", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "2145", + "kind": "constant", + "valueType": { + "$id": "2146", + "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": "2147", + "statusCodes": [ + 202 + ], + "headers": [ + { + "$id": "2148", + "name": "location", + "nameInResponse": "Location", + "doc": "The Location header contains the URL where the status of the long running operation can be checked.", + "type": { + "$id": "2149", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + { + "$id": "2150", + "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": "2151", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + } + } + ], + "isErrorResponse": false + }, + { + "$id": "2152", + "statusCodes": [ + 204 + ], + "headers": [], + "isErrorResponse": false + } + ], + "httpMethod": "DELETE", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeviceRegistry/assets/{assetName}", + "bufferResponse": true, + "longRunning": { + "$id": "2153", + "finalStateVia": 1, + "finalResponse": { + "$id": "2154", + "statusCodes": [ + 204 + ] + } + }, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.DeviceRegistry.Assets.delete", + "decorators": [], + "examples": [ + { + "$id": "2155", + "kind": "http", + "name": "Delete_Asset", + "description": "Delete_Asset", + "filePath": "2024-11-01/Delete_Asset.json", + "parameters": [ + { + "$id": "2156", + "parameter": { + "$ref": "2133" + }, + "value": { + "$id": "2157", + "kind": "string", + "type": { + "$ref": "2134" + }, + "value": "2024-11-01" + } + }, + { + "$id": "2158", + "parameter": { + "$ref": "2137" + }, + "value": { + "$id": "2159", + "kind": "string", + "type": { + "$ref": "2138" + }, + "value": "00000000-0000-0000-0000-000000000000" + } + }, + { + "$id": "2160", + "parameter": { + "$ref": "2140" + }, + "value": { + "$id": "2161", + "kind": "string", + "type": { + "$ref": "2141" + }, + "value": "myResourceGroup" + } + }, + { + "$id": "2162", + "parameter": { + "$ref": "2142" + }, + "value": { + "$id": "2163", + "kind": "string", + "type": { + "$ref": "2143" + }, + "value": "my-asset" + } + } + ], + "responses": [ + { + "$id": "2164", + "response": { + "$ref": "2147" + }, + "statusCode": 202 + }, + { + "$id": "2165", + "response": { + "$ref": "2152" + }, + "statusCode": 204 + } + ] + } + ] + }, + { + "$id": "2166", + "name": "listByResourceGroup", + "resourceName": "Asset", + "doc": "List Asset resources by resource group", + "accessibility": "public", + "parameters": [ + { + "$id": "2167", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "2168", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "2169", + "type": { + "$id": "2170", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2024-11-01" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2171", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "2172", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "2173", + "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": "2174", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "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": "547" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "GET", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeviceRegistry/assets", + "bufferResponse": true, + "paging": { + "$id": "2180", + "itemPropertySegments": [ + "value" + ], + "nextLink": { + "$id": "2181", + "responseSegments": [ + "nextLink" + ], + "responseLocation": "Body" + } + }, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.DeviceRegistry.Assets.listByResourceGroup", + "decorators": [], + "examples": [ + { + "$id": "2182", + "kind": "http", + "name": "List_Assets_ResourceGroup", + "description": "List_Assets_ResourceGroup", + "filePath": "2024-11-01/List_Assets_ResourceGroup.json", + "parameters": [ + { + "$id": "2183", + "parameter": { + "$ref": "2167" + }, + "value": { + "$id": "2184", + "kind": "string", + "type": { + "$ref": "2168" + }, + "value": "2024-11-01" + } + }, + { + "$id": "2185", + "parameter": { + "$ref": "2171" + }, + "value": { + "$id": "2186", + "kind": "string", + "type": { + "$ref": "2172" + }, + "value": "00000000-0000-0000-0000-000000000000" + } + }, + { + "$id": "2187", + "parameter": { + "$ref": "2174" + }, + "value": { + "$id": "2188", + "kind": "string", + "type": { + "$ref": "2175" + }, + "value": "myResourceGroup" + } + } + ], + "responses": [ + { + "$id": "2189", + "response": { + "$ref": "2179" + }, + "statusCode": 200, + "bodyValue": { + "$id": "2190", + "kind": "model", + "type": { + "$ref": "547" + }, + "value": { + "$id": "2191", + "value": { + "$id": "2192", + "kind": "array", + "type": { + "$ref": "549" + }, + "value": [ + { + "$id": "2193", + "kind": "model", + "type": { + "$ref": "159" + }, + "value": { + "$id": "2194", + "id": { + "$id": "2195", + "kind": "string", + "type": { + "$ref": "163" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.DeviceRegistry/assets/my-asset" + }, + "name": { + "$id": "2196", + "kind": "string", + "type": { + "$ref": "168" + }, + "value": "my-asset" + }, + "type": { + "$id": "2197", + "kind": "string", + "type": { + "$ref": "172" + }, + "value": "Microsoft.DeviceRegistry/assets" + }, + "location": { + "$id": "2198", + "kind": "string", + "type": { + "$ref": "211" + }, + "value": "West Europe" + }, + "extendedLocation": { + "$id": "2199", + "kind": "model", + "type": { + "$ref": "431" + }, + "value": { + "$id": "2200", + "type": { + "$id": "2201", + "kind": "string", + "type": { + "$ref": "433" + }, + "value": "CustomLocation" + }, + "name": { + "$id": "2202", + "kind": "string", + "type": { + "$ref": "437" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/microsoft.extendedlocation/customlocations/location1" + } + } + }, + "tags": { + "$id": "2203", + "kind": "dict", + "type": { + "$ref": "205" + }, + "value": { + "$id": "2204", + "site": { + "$id": "2205", + "kind": "string", + "type": { + "$ref": "207" + }, + "value": "building-1" + } + } + }, + "systemData": { + "$id": "2206", + "kind": "model", + "type": { + "$ref": "177" + }, + "value": { + "$id": "2207", + "createdBy": { + "$id": "2208", + "kind": "string", + "type": { + "$ref": "179" + }, + "value": "2ta23112-4596-44ff-b773-19405922bfc1" + }, + "createdByType": { + "$id": "2209", + "kind": "string", + "type": { + "$ref": "50" + }, + "value": "Application" + }, + "createdAt": { + "$id": "2210", + "kind": "string", + "type": { + "$ref": "186" + }, + "value": "2022-11-16T00:36:43.2516899Z" + }, + "lastModifiedBy": { + "$id": "2211", + "kind": "string", + "type": { + "$ref": "191" + }, + "value": "2ta23112-4596-44ff-b773-19405922bfc1" + }, + "lastModifiedByType": { + "$id": "2212", + "kind": "string", + "type": { + "$ref": "50" + }, + "value": "Application" + }, + "lastModifiedAt": { + "$id": "2213", + "kind": "string", + "type": { + "$ref": "198" + }, + "value": "2022-11-16T01:37:16.0922793Z" + } + } + }, + "properties": { + "$id": "2214", + "kind": "model", + "type": { + "$ref": "215" + }, + "value": { + "$id": "2215", + "uuid": { + "$id": "2216", + "kind": "string", + "type": { + "$ref": "217" + }, + "value": "0796f7c1-f2c8-44d7-9f5b-9a6f9522a85d" + }, + "enabled": { + "$id": "2217", + "kind": "boolean", + "type": { + "$ref": "221" + }, + "value": true + }, + "externalAssetId": { + "$id": "2218", + "kind": "string", + "type": { + "$ref": "225" + }, + "value": "8ZBA6LRHU0A458969" + }, + "displayName": { + "$id": "2219", + "kind": "string", + "type": { + "$ref": "229" + }, + "value": "AssetDisplayName" + }, + "description": { + "$id": "2220", + "kind": "string", + "type": { + "$ref": "233" + }, + "value": "This is a sample Asset" + }, + "assetEndpointProfileRef": { + "$id": "2221", + "kind": "string", + "type": { + "$ref": "237" + }, + "value": "myAssetEndpointProfile" + }, + "version": { + "$id": "2222", + "kind": "number", + "type": { + "$ref": "241" + }, + "value": 73766 + }, + "manufacturer": { + "$id": "2223", + "kind": "string", + "type": { + "$ref": "245" + }, + "value": "Contoso" + }, + "manufacturerUri": { + "$id": "2224", + "kind": "string", + "type": { + "$ref": "249" + }, + "value": "https://www.contoso.com/manufacturerUri" + }, + "model": { + "$id": "2225", + "kind": "string", + "type": { + "$ref": "253" + }, + "value": "ContosoModel" + }, + "productCode": { + "$id": "2226", + "kind": "string", + "type": { + "$ref": "257" + }, + "value": "SA34VDG" + }, + "hardwareRevision": { + "$id": "2227", + "kind": "string", + "type": { + "$ref": "261" + }, + "value": "1.0" + }, + "softwareRevision": { + "$id": "2228", + "kind": "string", + "type": { + "$ref": "265" + }, + "value": "2.0" + }, + "documentationUri": { + "$id": "2229", + "kind": "string", + "type": { + "$ref": "269" + }, + "value": "https://www.example.com/manual" + }, + "serialNumber": { + "$id": "2230", + "kind": "string", + "type": { + "$ref": "273" + }, + "value": "64-103816-519918-8" + }, + "defaultDatasetsConfiguration": { + "$id": "2231", + "kind": "string", + "type": { + "$ref": "288" + }, + "value": "{\"publishingInterval\":10,\"samplingInterval\":15,\"queueSize\":20}" + }, + "defaultEventsConfiguration": { + "$id": "2232", + "kind": "string", + "type": { + "$ref": "292" + }, + "value": "{\"publishingInterval\":10,\"samplingInterval\":15,\"queueSize\":20}" + }, + "defaultTopic": { + "$id": "2233", + "kind": "model", + "type": { + "$ref": "296" + }, + "value": { + "$id": "2234", + "path": { + "$id": "2235", + "kind": "string", + "type": { + "$ref": "298" + }, + "value": "/path/defaultTopic" + }, + "retain": { + "$id": "2236", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Keep" + } + } + }, + "datasets": { + "$id": "2237", + "kind": "array", + "type": { + "$ref": "307" + }, + "value": [ + { + "$id": "2238", + "kind": "model", + "type": { + "$ref": "308" + }, + "value": { + "$id": "2239", + "name": { + "$id": "2240", + "kind": "string", + "type": { + "$ref": "310" + }, + "value": "dataset1" + }, + "datasetConfiguration": { + "$id": "2241", + "kind": "string", + "type": { + "$ref": "314" + }, + "value": "{\"publishingInterval\":10,\"samplingInterval\":15,\"queueSize\":20}" + }, + "topic": { + "$id": "2242", + "kind": "model", + "type": { + "$ref": "296" + }, + "value": { + "$id": "2243", + "path": { + "$id": "2244", + "kind": "string", + "type": { + "$ref": "298" + }, + "value": "/path/dataset1" + }, + "retain": { + "$id": "2245", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Keep" + } + } + }, + "dataPoints": { + "$id": "2246", + "kind": "array", + "type": { + "$ref": "321" + }, + "value": [ + { + "$id": "2247", + "kind": "model", + "type": { + "$ref": "322" + }, + "value": { + "$id": "2248", + "name": { + "$id": "2249", + "kind": "string", + "type": { + "$ref": "325" + }, + "value": "dataPoint1" + }, + "dataSource": { + "$id": "2250", + "kind": "string", + "type": { + "$ref": "329" + }, + "value": "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt1" + }, + "observabilityMode": { + "$id": "2251", + "kind": "string", + "type": { + "$ref": "20" + }, + "value": "Counter" + }, + "dataPointConfiguration": { + "$id": "2252", + "kind": "string", + "type": { + "$ref": "333" + }, + "value": "{\"publishingInterval\":8,\"samplingInterval\":8,\"queueSize\":4}" + } + } + }, + { + "$id": "2253", + "kind": "model", + "type": { + "$ref": "322" + }, + "value": { + "$id": "2254", + "name": { + "$id": "2255", + "kind": "string", + "type": { + "$ref": "325" + }, + "value": "dataPoint2" + }, + "dataSource": { + "$id": "2256", + "kind": "string", + "type": { + "$ref": "329" + }, + "value": "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt2" + }, + "observabilityMode": { + "$id": "2257", + "kind": "string", + "type": { + "$ref": "20" + }, + "value": "None" + }, + "dataPointConfiguration": { + "$id": "2258", + "kind": "string", + "type": { + "$ref": "333" + }, + "value": "{\"publishingInterval\":4,\"samplingInterval\":4,\"queueSize\":7}" + } + } + } + ] + } + } + } + ] + }, + "events": { + "$id": "2259", + "kind": "array", + "type": { + "$ref": "344" + }, + "value": [ + { + "$id": "2260", + "kind": "model", + "type": { + "$ref": "345" + }, + "value": { + "$id": "2261", + "name": { + "$id": "2262", + "kind": "string", + "type": { + "$ref": "348" + }, + "value": "event1" + }, + "eventNotifier": { + "$id": "2263", + "kind": "string", + "type": { + "$ref": "352" + }, + "value": "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt3" + }, + "observabilityMode": { + "$id": "2264", + "kind": "string", + "type": { + "$ref": "32" + }, + "value": "None" + }, + "eventConfiguration": { + "$id": "2265", + "kind": "string", + "type": { + "$ref": "356" + }, + "value": "{\"publishingInterval\":7,\"samplingInterval\":1,\"queueSize\":8}" + }, + "topic": { + "$id": "2266", + "kind": "model", + "type": { + "$ref": "296" + }, + "value": { + "$id": "2267", + "path": { + "$id": "2268", + "kind": "string", + "type": { + "$ref": "298" + }, + "value": "/path/event1" + }, + "retain": { + "$id": "2269", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Keep" + } + } + } + } + }, + { + "$id": "2270", + "kind": "model", + "type": { + "$ref": "345" + }, + "value": { + "$id": "2271", + "name": { + "$id": "2272", + "kind": "string", + "type": { + "$ref": "348" + }, + "value": "event2" + }, + "eventNotifier": { + "$id": "2273", + "kind": "string", + "type": { + "$ref": "352" + }, + "value": "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt4" + }, + "observabilityMode": { + "$id": "2274", + "kind": "string", + "type": { + "$ref": "32" + }, + "value": "Log" + }, + "eventConfiguration": { + "$id": "2275", + "kind": "string", + "type": { + "$ref": "356" + }, + "value": "{\"publishingInterval\":7,\"samplingInterval\":8,\"queueSize\":4}" + } + } + } + ] + }, + "provisioningState": { + "$id": "2276", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Succeeded" + } + } + } + } + }, + { + "$id": "2277", + "kind": "model", + "type": { + "$ref": "159" + }, + "value": { + "$id": "2278", + "id": { + "$id": "2279", + "kind": "string", + "type": { + "$ref": "163" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.DeviceRegistry/assets/my-asset1" + }, + "name": { + "$id": "2280", + "kind": "string", + "type": { + "$ref": "168" + }, + "value": "my-asset1" + }, + "type": { + "$id": "2281", + "kind": "string", + "type": { + "$ref": "172" + }, + "value": "Microsoft.DeviceRegistry/assets" + }, + "location": { + "$id": "2282", + "kind": "string", + "type": { + "$ref": "211" + }, + "value": "West Europe" + }, + "extendedLocation": { + "$id": "2283", + "kind": "model", + "type": { + "$ref": "431" + }, + "value": { + "$id": "2284", + "type": { + "$id": "2285", + "kind": "string", + "type": { + "$ref": "433" + }, + "value": "CustomLocation" + }, + "name": { + "$id": "2286", + "kind": "string", + "type": { + "$ref": "437" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/microsoft.extendedlocation/customlocations/location1" + } + } + }, + "tags": { + "$id": "2287", + "kind": "dict", + "type": { + "$ref": "205" + }, + "value": { + "$id": "2288", + "site": { + "$id": "2289", + "kind": "string", + "type": { + "$ref": "207" + }, + "value": "building-2" + } + } + }, + "systemData": { + "$id": "2290", + "kind": "model", + "type": { + "$ref": "177" + }, + "value": { + "$id": "2291", + "createdBy": { + "$id": "2292", + "kind": "string", + "type": { + "$ref": "179" + }, + "value": "2ta23112-4596-44ff-b773-19405922bfc1" + }, + "createdByType": { + "$id": "2293", + "kind": "string", + "type": { + "$ref": "50" + }, + "value": "Application" + }, + "createdAt": { + "$id": "2294", + "kind": "string", + "type": { + "$ref": "186" + }, + "value": "2022-11-16T00:36:43.2516899Z" + }, + "lastModifiedBy": { + "$id": "2295", + "kind": "string", + "type": { + "$ref": "191" + }, + "value": "2ta23112-4596-44ff-b773-19405922bfc1" + }, + "lastModifiedByType": { + "$id": "2296", + "kind": "string", + "type": { + "$ref": "50" + }, + "value": "Application" + }, + "lastModifiedAt": { + "$id": "2297", + "kind": "string", + "type": { + "$ref": "198" + }, + "value": "2022-11-16T01:37:16.0922793Z" + } + } + }, + "properties": { + "$id": "2298", + "kind": "model", + "type": { + "$ref": "215" + }, + "value": { + "$id": "2299", + "uuid": { + "$id": "2300", + "kind": "string", + "type": { + "$ref": "217" + }, + "value": "7824a74f-21e1-4458-ae06-604d3a241d2c" + }, + "enabled": { + "$id": "2301", + "kind": "boolean", + "type": { + "$ref": "221" + }, + "value": true + }, + "externalAssetId": { + "$id": "2302", + "kind": "string", + "type": { + "$ref": "225" + }, + "value": "9AVD7KLPU03377981" + }, + "displayName": { + "$id": "2303", + "kind": "string", + "type": { + "$ref": "229" + }, + "value": "AssetDisplayName 1" + }, + "description": { + "$id": "2304", + "kind": "string", + "type": { + "$ref": "233" + }, + "value": "This is a sample Asset 1" + }, + "assetEndpointProfileRef": { + "$id": "2305", + "kind": "string", + "type": { + "$ref": "237" + }, + "value": "myAssetEndpointProfile" + }, + "version": { + "$id": "2306", + "kind": "number", + "type": { + "$ref": "241" + }, + "value": 73766 + }, + "manufacturer": { + "$id": "2307", + "kind": "string", + "type": { + "$ref": "245" + }, + "value": "Contoso" + }, + "manufacturerUri": { + "$id": "2308", + "kind": "string", + "type": { + "$ref": "249" + }, + "value": "https://www.contoso.com/manufacturerUri" + }, + "model": { + "$id": "2309", + "kind": "string", + "type": { + "$ref": "253" + }, + "value": "ContosoModel" + }, + "productCode": { + "$id": "2310", + "kind": "string", + "type": { + "$ref": "257" + }, + "value": "SA34VDG" + }, + "hardwareRevision": { + "$id": "2311", + "kind": "string", + "type": { + "$ref": "261" + }, + "value": "1.0" + }, + "softwareRevision": { + "$id": "2312", + "kind": "string", + "type": { + "$ref": "265" + }, + "value": "2.0" + }, + "documentationUri": { + "$id": "2313", + "kind": "string", + "type": { + "$ref": "269" + }, + "value": "https://www.example.com/manual" + }, + "serialNumber": { + "$id": "2314", + "kind": "string", + "type": { + "$ref": "273" + }, + "value": "12-984302-792341-8" + }, + "defaultDatasetsConfiguration": { + "$id": "2315", + "kind": "string", + "type": { + "$ref": "288" + }, + "value": "{\"publishingInterval\":10,\"samplingInterval\":15,\"queueSize\":20}" + }, + "defaultEventsConfiguration": { + "$id": "2316", + "kind": "string", + "type": { + "$ref": "292" + }, + "value": "{\"publishingInterval\":10,\"samplingInterval\":15,\"queueSize\":20}" + }, + "defaultTopic": { + "$id": "2317", + "kind": "model", + "type": { + "$ref": "296" + }, + "value": { + "$id": "2318", + "path": { + "$id": "2319", + "kind": "string", + "type": { + "$ref": "298" + }, + "value": "/path/defaultTopic" + }, + "retain": { + "$id": "2320", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Keep" + } + } + }, + "datasets": { + "$id": "2321", + "kind": "array", + "type": { + "$ref": "307" + }, + "value": [ + { + "$id": "2322", + "kind": "model", + "type": { + "$ref": "308" + }, + "value": { + "$id": "2323", + "name": { + "$id": "2324", + "kind": "string", + "type": { + "$ref": "310" + }, + "value": "dataset1" + }, + "datasetConfiguration": { + "$id": "2325", + "kind": "string", + "type": { + "$ref": "314" + }, + "value": "{\"publishingInterval\":10,\"samplingInterval\":15,\"queueSize\":20}" + }, + "topic": { + "$id": "2326", + "kind": "model", + "type": { + "$ref": "296" + }, + "value": { + "$id": "2327", + "path": { + "$id": "2328", + "kind": "string", + "type": { + "$ref": "298" + }, + "value": "/path/dataset1" + }, + "retain": { + "$id": "2329", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Keep" + } + } + }, + "dataPoints": { + "$id": "2330", + "kind": "array", + "type": { + "$ref": "321" + }, + "value": [ + { + "$id": "2331", + "kind": "model", + "type": { + "$ref": "322" + }, + "value": { + "$id": "2332", + "name": { + "$id": "2333", + "kind": "string", + "type": { + "$ref": "325" + }, + "value": "dataPoint1" + }, + "dataSource": { + "$id": "2334", + "kind": "string", + "type": { + "$ref": "329" + }, + "value": "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt1" + }, + "observabilityMode": { + "$id": "2335", + "kind": "string", + "type": { + "$ref": "20" + }, + "value": "Counter" + }, + "dataPointConfiguration": { + "$id": "2336", + "kind": "string", + "type": { + "$ref": "333" + }, + "value": "{\"publishingInterval\":8,\"samplingInterval\":8,\"queueSize\":4}" + } + } + }, + { + "$id": "2337", + "kind": "model", + "type": { + "$ref": "322" + }, + "value": { + "$id": "2338", + "name": { + "$id": "2339", + "kind": "string", + "type": { + "$ref": "325" + }, + "value": "dataPoint2" + }, + "dataSource": { + "$id": "2340", + "kind": "string", + "type": { + "$ref": "329" + }, + "value": "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt2" + }, + "observabilityMode": { + "$id": "2341", + "kind": "string", + "type": { + "$ref": "20" + }, + "value": "None" + }, + "dataPointConfiguration": { + "$id": "2342", + "kind": "string", + "type": { + "$ref": "333" + }, + "value": "{\"publishingInterval\":4,\"samplingInterval\":4,\"queueSize\":7}" + } + } + } + ] + } + } + } + ] + }, + "events": { + "$id": "2343", + "kind": "array", + "type": { + "$ref": "344" + }, + "value": [ + { + "$id": "2344", + "kind": "model", + "type": { + "$ref": "345" + }, + "value": { + "$id": "2345", + "name": { + "$id": "2346", + "kind": "string", + "type": { + "$ref": "348" + }, + "value": "event1" + }, + "eventNotifier": { + "$id": "2347", + "kind": "string", + "type": { + "$ref": "352" + }, + "value": "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt3" + }, + "observabilityMode": { + "$id": "2348", + "kind": "string", + "type": { + "$ref": "32" + }, + "value": "None" + }, + "eventConfiguration": { + "$id": "2349", + "kind": "string", + "type": { + "$ref": "356" + }, + "value": "{\"publishingInterval\":7,\"samplingInterval\":1,\"queueSize\":8}" + }, + "topic": { + "$id": "2350", + "kind": "model", + "type": { + "$ref": "296" + }, + "value": { + "$id": "2351", + "path": { + "$id": "2352", + "kind": "string", + "type": { + "$ref": "298" + }, + "value": "/path/event1" + }, + "retain": { + "$id": "2353", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Keep" + } + } + } + } + }, + { + "$id": "2354", + "kind": "model", + "type": { + "$ref": "345" + }, + "value": { + "$id": "2355", + "name": { + "$id": "2356", + "kind": "string", + "type": { + "$ref": "348" + }, + "value": "event2" + }, + "eventNotifier": { + "$id": "2357", + "kind": "string", + "type": { + "$ref": "352" + }, + "value": "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt4" + }, + "observabilityMode": { + "$id": "2358", + "kind": "string", + "type": { + "$ref": "32" + }, + "value": "Log" + }, + "eventConfiguration": { + "$id": "2359", + "kind": "string", + "type": { + "$ref": "356" + }, + "value": "{\"publishingInterval\":7,\"samplingInterval\":8,\"queueSize\":4}" + } + } + } + ] + }, + "provisioningState": { + "$id": "2360", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Succeeded" + } + } + } + } + } + ] + } + } + } + } + ] + } + ] + }, + { + "$id": "2361", + "name": "listBySubscription", + "resourceName": "Asset", + "doc": "List Asset resources by subscription ID", + "accessibility": "public", + "parameters": [ + { + "$id": "2362", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "2363", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "2364", + "type": { + "$id": "2365", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2024-11-01" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2366", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "2367", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "2368", + "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": "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": "547" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "GET", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/providers/Microsoft.DeviceRegistry/assets", + "bufferResponse": true, + "paging": { + "$id": "2373", + "itemPropertySegments": [ + "value" + ], + "nextLink": { + "$id": "2374", + "responseSegments": [ + "nextLink" + ], + "responseLocation": "Body" + } + }, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.DeviceRegistry.Assets.listBySubscription", + "decorators": [], + "examples": [ + { + "$id": "2375", + "kind": "http", + "name": "List_Assets_Subscription", + "description": "List_Assets_Subscription", + "filePath": "2024-11-01/List_Assets_Subscription.json", + "parameters": [ + { + "$id": "2376", + "parameter": { + "$ref": "2362" + }, + "value": { + "$id": "2377", + "kind": "string", + "type": { + "$ref": "2363" + }, + "value": "2024-11-01" + } + }, + { + "$id": "2378", + "parameter": { + "$ref": "2366" + }, + "value": { + "$id": "2379", + "kind": "string", + "type": { + "$ref": "2367" + }, + "value": "00000000-0000-0000-0000-000000000000" + } + } + ], + "responses": [ + { + "$id": "2380", + "response": { + "$ref": "2372" + }, + "statusCode": 200, + "bodyValue": { + "$id": "2381", + "kind": "model", + "type": { + "$ref": "547" + }, + "value": { + "$id": "2382", + "value": { + "$id": "2383", + "kind": "array", + "type": { + "$ref": "549" + }, + "value": [ + { + "$id": "2384", + "kind": "model", + "type": { + "$ref": "159" + }, + "value": { + "$id": "2385", + "id": { + "$id": "2386", + "kind": "string", + "type": { + "$ref": "163" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.DeviceRegistry/assets/my-asset" + }, + "name": { + "$id": "2387", + "kind": "string", + "type": { + "$ref": "168" + }, + "value": "my-asset" + }, + "type": { + "$id": "2388", + "kind": "string", + "type": { + "$ref": "172" + }, + "value": "Microsoft.DeviceRegistry/assets" + }, + "location": { + "$id": "2389", + "kind": "string", + "type": { + "$ref": "211" + }, + "value": "West Europe" + }, + "extendedLocation": { + "$id": "2390", + "kind": "model", + "type": { + "$ref": "431" + }, + "value": { + "$id": "2391", + "type": { + "$id": "2392", + "kind": "string", + "type": { + "$ref": "433" + }, + "value": "CustomLocation" + }, + "name": { + "$id": "2393", + "kind": "string", + "type": { + "$ref": "437" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/microsoft.extendedlocation/customlocations/location1" + } + } + }, + "tags": { + "$id": "2394", + "kind": "dict", + "type": { + "$ref": "205" + }, + "value": { + "$id": "2395", + "site": { + "$id": "2396", + "kind": "string", + "type": { + "$ref": "207" + }, + "value": "building-1" + } + } + }, + "systemData": { + "$id": "2397", + "kind": "model", + "type": { + "$ref": "177" + }, + "value": { + "$id": "2398", + "createdBy": { + "$id": "2399", + "kind": "string", + "type": { + "$ref": "179" + }, + "value": "2ta23112-4596-44ff-b773-19405922bfc1" + }, + "createdByType": { + "$id": "2400", + "kind": "string", + "type": { + "$ref": "50" + }, + "value": "Application" + }, + "createdAt": { + "$id": "2401", + "kind": "string", + "type": { + "$ref": "186" + }, + "value": "2022-11-16T00:36:43.2516899Z" + }, + "lastModifiedBy": { + "$id": "2402", + "kind": "string", + "type": { + "$ref": "191" + }, + "value": "2ta23112-4596-44ff-b773-19405922bfc1" + }, + "lastModifiedByType": { + "$id": "2403", + "kind": "string", + "type": { + "$ref": "50" + }, + "value": "Application" + }, + "lastModifiedAt": { + "$id": "2404", + "kind": "string", + "type": { + "$ref": "198" + }, + "value": "2022-11-16T01:37:16.0922793Z" + } + } + }, + "properties": { + "$id": "2405", + "kind": "model", + "type": { + "$ref": "215" + }, + "value": { + "$id": "2406", + "uuid": { + "$id": "2407", + "kind": "string", + "type": { + "$ref": "217" + }, + "value": "0796f7c1-f2c8-44d7-9f5b-9a6f9522a85d" + }, + "enabled": { + "$id": "2408", + "kind": "boolean", + "type": { + "$ref": "221" + }, + "value": true + }, + "externalAssetId": { + "$id": "2409", + "kind": "string", + "type": { + "$ref": "225" + }, + "value": "8ZBA6LRHU0A458969" + }, + "displayName": { + "$id": "2410", + "kind": "string", + "type": { + "$ref": "229" + }, + "value": "AssetDisplayName" + }, + "description": { + "$id": "2411", + "kind": "string", + "type": { + "$ref": "233" + }, + "value": "This is a sample Asset" + }, + "assetEndpointProfileRef": { + "$id": "2412", + "kind": "string", + "type": { + "$ref": "237" + }, + "value": "myAssetEndpointProfile" + }, + "version": { + "$id": "2413", + "kind": "number", + "type": { + "$ref": "241" + }, + "value": 73766 + }, + "manufacturer": { + "$id": "2414", + "kind": "string", + "type": { + "$ref": "245" + }, + "value": "Contoso" + }, + "manufacturerUri": { + "$id": "2415", + "kind": "string", + "type": { + "$ref": "249" + }, + "value": "https://www.contoso.com/manufacturerUri" + }, + "model": { + "$id": "2416", + "kind": "string", + "type": { + "$ref": "253" + }, + "value": "ContosoModel" + }, + "productCode": { + "$id": "2417", + "kind": "string", + "type": { + "$ref": "257" + }, + "value": "SA34VDG" + }, + "hardwareRevision": { + "$id": "2418", + "kind": "string", + "type": { + "$ref": "261" + }, + "value": "1.0" + }, + "softwareRevision": { + "$id": "2419", + "kind": "string", + "type": { + "$ref": "265" + }, + "value": "2.0" + }, + "documentationUri": { + "$id": "2420", + "kind": "string", + "type": { + "$ref": "269" + }, + "value": "https://www.example.com/manual" + }, + "serialNumber": { + "$id": "2421", + "kind": "string", + "type": { + "$ref": "273" + }, + "value": "64-103816-519918-8" + }, + "defaultDatasetsConfiguration": { + "$id": "2422", + "kind": "string", + "type": { + "$ref": "288" + }, + "value": "{\"publishingInterval\":10,\"samplingInterval\":15,\"queueSize\":20}" + }, + "defaultEventsConfiguration": { + "$id": "2423", + "kind": "string", + "type": { + "$ref": "292" + }, + "value": "{\"publishingInterval\":10,\"samplingInterval\":15,\"queueSize\":20}" + }, + "defaultTopic": { + "$id": "2424", + "kind": "model", + "type": { + "$ref": "296" + }, + "value": { + "$id": "2425", + "path": { + "$id": "2426", + "kind": "string", + "type": { + "$ref": "298" + }, + "value": "/path/defaultTopic" + }, + "retain": { + "$id": "2427", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Keep" + } + } + }, + "datasets": { + "$id": "2428", + "kind": "array", + "type": { + "$ref": "307" + }, + "value": [ + { + "$id": "2429", + "kind": "model", + "type": { + "$ref": "308" + }, + "value": { + "$id": "2430", + "name": { + "$id": "2431", + "kind": "string", + "type": { + "$ref": "310" + }, + "value": "dataset1" + }, + "datasetConfiguration": { + "$id": "2432", + "kind": "string", + "type": { + "$ref": "314" + }, + "value": "{\"publishingInterval\":10,\"samplingInterval\":15,\"queueSize\":20}" + }, + "topic": { + "$id": "2433", + "kind": "model", + "type": { + "$ref": "296" + }, + "value": { + "$id": "2434", + "path": { + "$id": "2435", + "kind": "string", + "type": { + "$ref": "298" + }, + "value": "/path/dataset1" + }, + "retain": { + "$id": "2436", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Keep" + } + } + }, + "dataPoints": { + "$id": "2437", + "kind": "array", + "type": { + "$ref": "321" + }, + "value": [ + { + "$id": "2438", + "kind": "model", + "type": { + "$ref": "322" + }, + "value": { + "$id": "2439", + "name": { + "$id": "2440", + "kind": "string", + "type": { + "$ref": "325" + }, + "value": "dataPoint1" + }, + "dataSource": { + "$id": "2441", + "kind": "string", + "type": { + "$ref": "329" + }, + "value": "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt1" + }, + "observabilityMode": { + "$id": "2442", + "kind": "string", + "type": { + "$ref": "20" + }, + "value": "Counter" + }, + "dataPointConfiguration": { + "$id": "2443", + "kind": "string", + "type": { + "$ref": "333" + }, + "value": "{\"publishingInterval\":8,\"samplingInterval\":8,\"queueSize\":4}" + } + } + }, + { + "$id": "2444", + "kind": "model", + "type": { + "$ref": "322" + }, + "value": { + "$id": "2445", + "name": { + "$id": "2446", + "kind": "string", + "type": { + "$ref": "325" + }, + "value": "dataPoint2" + }, + "dataSource": { + "$id": "2447", + "kind": "string", + "type": { + "$ref": "329" + }, + "value": "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt2" + }, + "observabilityMode": { + "$id": "2448", + "kind": "string", + "type": { + "$ref": "20" + }, + "value": "None" + }, + "dataPointConfiguration": { + "$id": "2449", + "kind": "string", + "type": { + "$ref": "333" + }, + "value": "{\"publishingInterval\":4,\"samplingInterval\":4,\"queueSize\":7}" + } + } + } + ] + } + } + } + ] + }, + "events": { + "$id": "2450", + "kind": "array", + "type": { + "$ref": "344" + }, + "value": [ + { + "$id": "2451", + "kind": "model", + "type": { + "$ref": "345" + }, + "value": { + "$id": "2452", + "name": { + "$id": "2453", + "kind": "string", + "type": { + "$ref": "348" + }, + "value": "event1" + }, + "eventNotifier": { + "$id": "2454", + "kind": "string", + "type": { + "$ref": "352" + }, + "value": "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt3" + }, + "observabilityMode": { + "$id": "2455", + "kind": "string", + "type": { + "$ref": "32" + }, + "value": "None" + }, + "eventConfiguration": { + "$id": "2456", + "kind": "string", + "type": { + "$ref": "356" + }, + "value": "{\"publishingInterval\":7,\"samplingInterval\":1,\"queueSize\":8}" + }, + "topic": { + "$id": "2457", + "kind": "model", + "type": { + "$ref": "296" + }, + "value": { + "$id": "2458", + "path": { + "$id": "2459", + "kind": "string", + "type": { + "$ref": "298" + }, + "value": "/path/event1" + }, + "retain": { + "$id": "2460", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Keep" + } + } + } + } + }, + { + "$id": "2461", + "kind": "model", + "type": { + "$ref": "345" + }, + "value": { + "$id": "2462", + "name": { + "$id": "2463", + "kind": "string", + "type": { + "$ref": "348" + }, + "value": "event2" + }, + "eventNotifier": { + "$id": "2464", + "kind": "string", + "type": { + "$ref": "352" + }, + "value": "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt4" + }, + "observabilityMode": { + "$id": "2465", + "kind": "string", + "type": { + "$ref": "32" + }, + "value": "Log" + }, + "eventConfiguration": { + "$id": "2466", + "kind": "string", + "type": { + "$ref": "356" + }, + "value": "{\"publishingInterval\":7,\"samplingInterval\":8,\"queueSize\":4}" + } + } + } + ] + }, + "provisioningState": { + "$id": "2467", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Succeeded" + } + } + } + } + }, + { + "$id": "2468", + "kind": "model", + "type": { + "$ref": "159" + }, + "value": { + "$id": "2469", + "id": { + "$id": "2470", + "kind": "string", + "type": { + "$ref": "163" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.DeviceRegistry/assets/my-asset1" + }, + "name": { + "$id": "2471", + "kind": "string", + "type": { + "$ref": "168" + }, + "value": "my-asset1" + }, + "type": { + "$id": "2472", + "kind": "string", + "type": { + "$ref": "172" + }, + "value": "Microsoft.DeviceRegistry/assets" + }, + "location": { + "$id": "2473", + "kind": "string", + "type": { + "$ref": "211" + }, + "value": "West Europe" + }, + "extendedLocation": { + "$id": "2474", + "kind": "model", + "type": { + "$ref": "431" + }, + "value": { + "$id": "2475", + "type": { + "$id": "2476", + "kind": "string", + "type": { + "$ref": "433" + }, + "value": "CustomLocation" + }, + "name": { + "$id": "2477", + "kind": "string", + "type": { + "$ref": "437" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/microsoft.extendedlocation/customlocations/location1" + } + } + }, + "tags": { + "$id": "2478", + "kind": "dict", + "type": { + "$ref": "205" + }, + "value": { + "$id": "2479", + "site": { + "$id": "2480", + "kind": "string", + "type": { + "$ref": "207" + }, + "value": "building-2" + } + } + }, + "systemData": { + "$id": "2481", + "kind": "model", + "type": { + "$ref": "177" + }, + "value": { + "$id": "2482", + "createdBy": { + "$id": "2483", + "kind": "string", + "type": { + "$ref": "179" + }, + "value": "2ta23112-4596-44ff-b773-19405922bfc1" + }, + "createdByType": { + "$id": "2484", + "kind": "string", + "type": { + "$ref": "50" + }, + "value": "Application" + }, + "createdAt": { + "$id": "2485", + "kind": "string", + "type": { + "$ref": "186" + }, + "value": "2022-11-16T00:36:43.2516899Z" + }, + "lastModifiedBy": { + "$id": "2486", + "kind": "string", + "type": { + "$ref": "191" + }, + "value": "2ta23112-4596-44ff-b773-19405922bfc1" + }, + "lastModifiedByType": { + "$id": "2487", + "kind": "string", + "type": { + "$ref": "50" + }, + "value": "Application" + }, + "lastModifiedAt": { + "$id": "2488", + "kind": "string", + "type": { + "$ref": "198" + }, + "value": "2022-11-16T01:37:16.0922793Z" + } + } + }, + "properties": { + "$id": "2489", + "kind": "model", + "type": { + "$ref": "215" + }, + "value": { + "$id": "2490", + "uuid": { + "$id": "2491", + "kind": "string", + "type": { + "$ref": "217" + }, + "value": "7824a74f-21e1-4458-ae06-604d3a241d2c" + }, + "enabled": { + "$id": "2492", + "kind": "boolean", + "type": { + "$ref": "221" + }, + "value": true + }, + "externalAssetId": { + "$id": "2493", + "kind": "string", + "type": { + "$ref": "225" + }, + "value": "9AVD7KLPU03377981" + }, + "displayName": { + "$id": "2494", + "kind": "string", + "type": { + "$ref": "229" + }, + "value": "AssetDisplayName 1" + }, + "description": { + "$id": "2495", + "kind": "string", + "type": { + "$ref": "233" + }, + "value": "This is a sample Asset 1" + }, + "assetEndpointProfileRef": { + "$id": "2496", + "kind": "string", + "type": { + "$ref": "237" + }, + "value": "myAssetEndpointProfile" + }, + "version": { + "$id": "2497", + "kind": "number", + "type": { + "$ref": "241" + }, + "value": 73766 + }, + "manufacturer": { + "$id": "2498", + "kind": "string", + "type": { + "$ref": "245" + }, + "value": "Contoso" + }, + "manufacturerUri": { + "$id": "2499", + "kind": "string", + "type": { + "$ref": "249" + }, + "value": "https://www.contoso.com/manufacturerUri" + }, + "model": { + "$id": "2500", + "kind": "string", + "type": { + "$ref": "253" + }, + "value": "ContosoModel" + }, + "productCode": { + "$id": "2501", + "kind": "string", + "type": { + "$ref": "257" + }, + "value": "SA34VDG" + }, + "hardwareRevision": { + "$id": "2502", + "kind": "string", + "type": { + "$ref": "261" + }, + "value": "1.0" + }, + "softwareRevision": { + "$id": "2503", + "kind": "string", + "type": { + "$ref": "265" + }, + "value": "2.0" + }, + "documentationUri": { + "$id": "2504", + "kind": "string", + "type": { + "$ref": "269" + }, + "value": "https://www.example.com/manual" + }, + "serialNumber": { + "$id": "2505", + "kind": "string", + "type": { + "$ref": "273" + }, + "value": "12-984302-792341-8" + }, + "defaultDatasetsConfiguration": { + "$id": "2506", + "kind": "string", + "type": { + "$ref": "288" + }, + "value": "{\"publishingInterval\":10,\"samplingInterval\":15,\"queueSize\":20}" + }, + "defaultEventsConfiguration": { + "$id": "2507", + "kind": "string", + "type": { + "$ref": "292" + }, + "value": "{\"publishingInterval\":10,\"samplingInterval\":15,\"queueSize\":20}" + }, + "defaultTopic": { + "$id": "2508", + "kind": "model", + "type": { + "$ref": "296" + }, + "value": { + "$id": "2509", + "path": { + "$id": "2510", + "kind": "string", + "type": { + "$ref": "298" + }, + "value": "/path/defaultTopic" + }, + "retain": { + "$id": "2511", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Keep" + } + } + }, + "datasets": { + "$id": "2512", + "kind": "array", + "type": { + "$ref": "307" + }, + "value": [ + { + "$id": "2513", + "kind": "model", + "type": { + "$ref": "308" + }, + "value": { + "$id": "2514", + "name": { + "$id": "2515", + "kind": "string", + "type": { + "$ref": "310" + }, + "value": "dataset1" + }, + "datasetConfiguration": { + "$id": "2516", + "kind": "string", + "type": { + "$ref": "314" + }, + "value": "{\"publishingInterval\":10,\"samplingInterval\":15,\"queueSize\":20}" + }, + "topic": { + "$id": "2517", + "kind": "model", + "type": { + "$ref": "296" + }, + "value": { + "$id": "2518", + "path": { + "$id": "2519", + "kind": "string", + "type": { + "$ref": "298" + }, + "value": "/path/dataset1" + }, + "retain": { + "$id": "2520", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Keep" + } + } + }, + "dataPoints": { + "$id": "2521", + "kind": "array", + "type": { + "$ref": "321" + }, + "value": [ + { + "$id": "2522", + "kind": "model", + "type": { + "$ref": "322" + }, + "value": { + "$id": "2523", + "name": { + "$id": "2524", + "kind": "string", + "type": { + "$ref": "325" + }, + "value": "dataPoint1" + }, + "dataSource": { + "$id": "2525", + "kind": "string", + "type": { + "$ref": "329" + }, + "value": "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt1" + }, + "observabilityMode": { + "$id": "2526", + "kind": "string", + "type": { + "$ref": "20" + }, + "value": "Counter" + }, + "dataPointConfiguration": { + "$id": "2527", + "kind": "string", + "type": { + "$ref": "333" + }, + "value": "{\"publishingInterval\":8,\"samplingInterval\":8,\"queueSize\":4}" + } + } + }, + { + "$id": "2528", + "kind": "model", + "type": { + "$ref": "322" + }, + "value": { + "$id": "2529", + "name": { + "$id": "2530", + "kind": "string", + "type": { + "$ref": "325" + }, + "value": "dataPoint2" + }, + "dataSource": { + "$id": "2531", + "kind": "string", + "type": { + "$ref": "329" + }, + "value": "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt2" + }, + "observabilityMode": { + "$id": "2532", + "kind": "string", + "type": { + "$ref": "20" + }, + "value": "None" + }, + "dataPointConfiguration": { + "$id": "2533", + "kind": "string", + "type": { + "$ref": "333" + }, + "value": "{\"publishingInterval\":4,\"samplingInterval\":4,\"queueSize\":7}" + } + } + } + ] + } + } + } + ] + }, + "events": { + "$id": "2534", + "kind": "array", + "type": { + "$ref": "344" + }, + "value": [ + { + "$id": "2535", + "kind": "model", + "type": { + "$ref": "345" + }, + "value": { + "$id": "2536", + "name": { + "$id": "2537", + "kind": "string", + "type": { + "$ref": "348" + }, + "value": "event1" + }, + "eventNotifier": { + "$id": "2538", + "kind": "string", + "type": { + "$ref": "352" + }, + "value": "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt3" + }, + "observabilityMode": { + "$id": "2539", + "kind": "string", + "type": { + "$ref": "32" + }, + "value": "None" + }, + "eventConfiguration": { + "$id": "2540", + "kind": "string", + "type": { + "$ref": "356" + }, + "value": "{\"publishingInterval\":7,\"samplingInterval\":1,\"queueSize\":8}" + }, + "topic": { + "$id": "2541", + "kind": "model", + "type": { + "$ref": "296" + }, + "value": { + "$id": "2542", + "path": { + "$id": "2543", + "kind": "string", + "type": { + "$ref": "298" + }, + "value": "/path/event1" + }, + "retain": { + "$id": "2544", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Keep" + } + } + } + } + }, + { + "$id": "2545", + "kind": "model", + "type": { + "$ref": "345" + }, + "value": { + "$id": "2546", + "name": { + "$id": "2547", + "kind": "string", + "type": { + "$ref": "348" + }, + "value": "event2" + }, + "eventNotifier": { + "$id": "2548", + "kind": "string", + "type": { + "$ref": "352" + }, + "value": "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt4" + }, + "observabilityMode": { + "$id": "2549", + "kind": "string", + "type": { + "$ref": "32" + }, + "value": "Log" + }, + "eventConfiguration": { + "$id": "2550", + "kind": "string", + "type": { + "$ref": "356" + }, + "value": "{\"publishingInterval\":7,\"samplingInterval\":8,\"queueSize\":4}" + } + } + } + ] + }, + "provisioningState": { + "$id": "2551", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Succeeded" + } + } + } + } + } + ] + } + } + } + } + ] + } + ] + } + ], + "parameters": [ + { + "$id": "2552", + "name": "endpoint", + "nameInRequest": "endpoint", + "doc": "Service host", + "type": { + "$id": "2553", + "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": "2554", + "type": { + "$id": "2555", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "https://management.azure.com" + } + } + ], + "decorators": [ + { + "$id": "2556", + "name": "Azure.ResourceManager.@armResourceOperations", + "arguments": { + "$id": "2557" + } + } + ], + "crossLanguageDefinitionId": "Microsoft.DeviceRegistry.Assets", + "apiVersions": [ + "2023-11-01-preview", + "2024-09-01-preview", + "2024-11-01" + ], + "parent": { + "$ref": "692" + } + }, + { + "$id": "2558", + "kind": "client", + "name": "AssetEndpointProfiles", + "namespace": "Azure.ResourceManager.DeviceRegistry", + "operations": [ + { + "$id": "2559", + "name": "get", + "resourceName": "AssetEndpointProfile", + "doc": "Get a AssetEndpointProfile", + "accessibility": "public", + "parameters": [ + { + "$id": "2560", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "2561", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "2562", + "type": { + "$id": "2563", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2024-11-01" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2564", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "2565", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "2566", + "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": "2567", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "2568", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2569", + "name": "assetEndpointProfileName", + "nameInRequest": "assetEndpointProfileName", + "doc": "Asset Endpoint Profile name parameter.", + "type": { + "$id": "2570", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2571", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "2572", + "kind": "constant", + "valueType": { + "$id": "2573", + "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": "2574", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "557" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "GET", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeviceRegistry/assetEndpointProfiles/{assetEndpointProfileName}", + "bufferResponse": true, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.DeviceRegistry.AssetEndpointProfiles.get", + "decorators": [], + "examples": [ + { + "$id": "2575", + "kind": "http", + "name": "Get_AssetEndpointProfile", + "description": "Get_AssetEndpointProfile", + "filePath": "2024-11-01/Get_AssetEndpointProfile.json", + "parameters": [ + { + "$id": "2576", + "parameter": { + "$ref": "2560" + }, + "value": { + "$id": "2577", + "kind": "string", + "type": { + "$ref": "2561" + }, + "value": "2024-11-01" + } + }, + { + "$id": "2578", + "parameter": { + "$ref": "2564" + }, + "value": { + "$id": "2579", + "kind": "string", + "type": { + "$ref": "2565" + }, + "value": "00000000-0000-0000-0000-000000000000" + } + }, + { + "$id": "2580", + "parameter": { + "$ref": "2567" + }, + "value": { + "$id": "2581", + "kind": "string", + "type": { + "$ref": "2568" + }, + "value": "myResourceGroup" + } + }, + { + "$id": "2582", + "parameter": { + "$ref": "2569" + }, + "value": { + "$id": "2583", + "kind": "string", + "type": { + "$ref": "2570" + }, + "value": "my-assetendpointprofile" + } + } + ], + "responses": [ + { + "$id": "2584", + "response": { + "$ref": "2574" + }, + "statusCode": 200, + "bodyValue": { + "$id": "2585", + "kind": "model", + "type": { + "$ref": "557" + }, + "value": { + "$id": "2586", + "id": { + "$id": "2587", + "kind": "string", + "type": { + "$ref": "163" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.DeviceRegistry/assetEndpointProfiles/my-assetendpointprofile" + }, + "name": { + "$id": "2588", + "kind": "string", + "type": { + "$ref": "168" + }, + "value": "my-assetendpointprofile" + }, + "type": { + "$id": "2589", + "kind": "string", + "type": { + "$ref": "172" + }, + "value": "Microsoft.DeviceRegistry/assetEndpointProfiles" + }, + "location": { + "$id": "2590", + "kind": "string", + "type": { + "$ref": "211" + }, + "value": "West Europe" + }, + "extendedLocation": { + "$id": "2591", + "kind": "model", + "type": { + "$ref": "431" + }, + "value": { + "$id": "2592", + "type": { + "$id": "2593", + "kind": "string", + "type": { + "$ref": "433" + }, + "value": "CustomLocation" + }, + "name": { + "$id": "2594", + "kind": "string", + "type": { + "$ref": "437" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/microsoft.extendedlocation/customlocations/location1" + } + } + }, + "tags": { + "$id": "2595", + "kind": "dict", + "type": { + "$ref": "205" + }, + "value": { + "$id": "2596", + "site": { + "$id": "2597", + "kind": "string", + "type": { + "$ref": "207" + }, + "value": "building-1" + } + } + }, + "systemData": { + "$id": "2598", + "kind": "model", + "type": { + "$ref": "177" + }, + "value": { + "$id": "2599", + "createdBy": { + "$id": "2600", + "kind": "string", + "type": { + "$ref": "179" + }, + "value": "2ta23112-4596-44ff-b773-19405922bfc1" + }, + "createdByType": { + "$id": "2601", + "kind": "string", + "type": { + "$ref": "50" + }, + "value": "Application" + }, + "createdAt": { + "$id": "2602", + "kind": "string", + "type": { + "$ref": "186" + }, + "value": "2022-11-16T00:36:43.2516899Z" + }, + "lastModifiedBy": { + "$id": "2603", + "kind": "string", + "type": { + "$ref": "191" + }, + "value": "2ta23112-4596-44ff-b773-19405922bfc1" + }, + "lastModifiedByType": { + "$id": "2604", + "kind": "string", + "type": { + "$ref": "50" + }, + "value": "Application" + }, + "lastModifiedAt": { + "$id": "2605", + "kind": "string", + "type": { + "$ref": "198" + }, + "value": "2022-11-16T01:37:16.0922793Z" + } + } + }, + "properties": { + "$id": "2606", + "kind": "model", + "type": { + "$ref": "559" + }, + "value": { + "$id": "2607", + "uuid": { + "$id": "2608", + "kind": "string", + "type": { + "$ref": "561" + }, + "value": "1824a74f-21e1-4458-ae07-604d3a241d2e" + }, + "targetAddress": { + "$id": "2609", + "kind": "string", + "type": { + "$ref": "565" + }, + "value": "https://www.example.com/myTargetAddress" + }, + "endpointProfileType": { + "$id": "2610", + "kind": "string", + "type": { + "$ref": "569" + }, + "value": "myEndpointProfileType" + }, + "authentication": { + "$id": "2611", + "kind": "model", + "type": { + "$ref": "573" + }, + "value": { + "$id": "2612", + "method": { + "$id": "2613", + "kind": "string", + "type": { + "$ref": "68" + }, + "value": "UsernamePassword" + }, + "usernamePasswordCredentials": { + "$id": "2614", + "kind": "model", + "type": { + "$ref": "578" + }, + "value": { + "$id": "2615", + "usernameSecretName": { + "$id": "2616", + "kind": "string", + "type": { + "$ref": "580" + }, + "value": "usernameRef" + }, + "passwordSecretName": { + "$id": "2617", + "kind": "string", + "type": { + "$ref": "584" + }, + "value": "passwordRef" + } + } + } + } + }, + "provisioningState": { + "$id": "2618", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Succeeded" + } + } + } + } + } + } + ] + }, + { + "$id": "2619", + "kind": "http", + "name": "Get_AssetEndpointProfile_With_SyncStatus", + "description": "Get_AssetEndpointProfile_With_SyncStatus", + "filePath": "2024-11-01/Get_AssetEndpointProfile_With_SyncStatus.json", + "parameters": [ + { + "$id": "2620", + "parameter": { + "$ref": "2560" + }, + "value": { + "$id": "2621", + "kind": "string", + "type": { + "$ref": "2561" + }, + "value": "2024-11-01" + } + }, + { + "$id": "2622", + "parameter": { + "$ref": "2564" + }, + "value": { + "$id": "2623", + "kind": "string", + "type": { + "$ref": "2565" + }, + "value": "00000000-0000-0000-0000-000000000000" + } + }, + { + "$id": "2624", + "parameter": { + "$ref": "2567" + }, + "value": { + "$id": "2625", + "kind": "string", + "type": { + "$ref": "2568" + }, + "value": "myResourceGroup" + } + }, + { + "$id": "2626", + "parameter": { + "$ref": "2569" + }, + "value": { + "$id": "2627", + "kind": "string", + "type": { + "$ref": "2570" + }, + "value": "my-assetendpointprofile" + } + } + ], + "responses": [ + { + "$id": "2628", + "response": { + "$ref": "2574" + }, + "statusCode": 200, + "bodyValue": { + "$id": "2629", + "kind": "model", + "type": { + "$ref": "557" + }, + "value": { + "$id": "2630", + "id": { + "$id": "2631", + "kind": "string", + "type": { + "$ref": "163" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.DeviceRegistry/assetEndpointProfiles/my-assetendpointprofile" + }, + "name": { + "$id": "2632", + "kind": "string", + "type": { + "$ref": "168" + }, + "value": "my-assetendpointprofile" + }, + "type": { + "$id": "2633", + "kind": "string", + "type": { + "$ref": "172" + }, + "value": "Microsoft.DeviceRegistry/assetEndpointProfiles" + }, + "location": { + "$id": "2634", + "kind": "string", + "type": { + "$ref": "211" + }, + "value": "West Europe" + }, + "extendedLocation": { + "$id": "2635", + "kind": "model", + "type": { + "$ref": "431" + }, + "value": { + "$id": "2636", + "type": { + "$id": "2637", + "kind": "string", + "type": { + "$ref": "433" + }, + "value": "CustomLocation" + }, + "name": { + "$id": "2638", + "kind": "string", + "type": { + "$ref": "437" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/microsoft.extendedlocation/customlocations/location1" + } + } + }, + "tags": { + "$id": "2639", + "kind": "dict", + "type": { + "$ref": "205" + }, + "value": { + "$id": "2640", + "site": { + "$id": "2641", + "kind": "string", + "type": { + "$ref": "207" + }, + "value": "building-1" + } + } + }, + "systemData": { + "$id": "2642", + "kind": "model", + "type": { + "$ref": "177" + }, + "value": { + "$id": "2643", + "createdBy": { + "$id": "2644", + "kind": "string", + "type": { + "$ref": "179" + }, + "value": "2ta23112-4596-44ff-b773-19405922bfc1" + }, + "createdByType": { + "$id": "2645", + "kind": "string", + "type": { + "$ref": "50" + }, + "value": "Application" + }, + "createdAt": { + "$id": "2646", + "kind": "string", + "type": { + "$ref": "186" + }, + "value": "2022-11-16T00:36:43.2516899Z" + }, + "lastModifiedBy": { + "$id": "2647", + "kind": "string", + "type": { + "$ref": "191" + }, + "value": "2ta23112-4596-44ff-b773-19405922bfc1" + }, + "lastModifiedByType": { + "$id": "2648", + "kind": "string", + "type": { + "$ref": "50" + }, + "value": "Application" + }, + "lastModifiedAt": { + "$id": "2649", + "kind": "string", + "type": { + "$ref": "198" + }, + "value": "2022-11-16T01:37:16.0922793Z" + } + } + }, + "properties": { + "$id": "2650", + "kind": "model", + "type": { + "$ref": "559" + }, + "value": { + "$id": "2651", + "uuid": { + "$id": "2652", + "kind": "string", + "type": { + "$ref": "561" + }, + "value": "1824a74f-21e1-4458-ae07-604d3a241d2e" + }, + "targetAddress": { + "$id": "2653", + "kind": "string", + "type": { + "$ref": "565" + }, + "value": "https://www.example.com/myTargetAddress" + }, + "endpointProfileType": { + "$id": "2654", + "kind": "string", + "type": { + "$ref": "569" + }, + "value": "myEndpointProfileType" + }, + "authentication": { + "$id": "2655", + "kind": "model", + "type": { + "$ref": "573" + }, + "value": { + "$id": "2656", + "method": { + "$id": "2657", + "kind": "string", + "type": { + "$ref": "68" + }, + "value": "UsernamePassword" + }, + "usernamePasswordCredentials": { + "$id": "2658", + "kind": "model", + "type": { + "$ref": "578" + }, + "value": { + "$id": "2659", + "usernameSecretName": { + "$id": "2660", + "kind": "string", + "type": { + "$ref": "580" + }, + "value": "usernameRef" + }, + "passwordSecretName": { + "$id": "2661", + "kind": "string", + "type": { + "$ref": "584" + }, + "value": "passwordRef" + } + } + } + } + }, + "status": { + "$id": "2662", + "kind": "model", + "type": { + "$ref": "608" + }, + "value": { + "$id": "2663", + "errors": { + "$id": "2664", + "kind": "array", + "type": { + "$ref": "610" + }, + "value": [ + { + "$id": "2665", + "kind": "model", + "type": { + "$ref": "611" + }, + "value": { + "$id": "2666", + "code": { + "$id": "2667", + "kind": "number", + "type": { + "$ref": "613" + }, + "value": 500 + }, + "message": { + "$id": "2668", + "kind": "string", + "type": { + "$ref": "617" + }, + "value": "Internal Server Error" + } + } + } + ] + } + } + }, + "provisioningState": { + "$id": "2669", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Succeeded" + } + } + } + } + } + } + ] + } + ] + }, + { + "$id": "2670", + "name": "createOrReplace", + "resourceName": "AssetEndpointProfile", + "doc": "Create a AssetEndpointProfile", + "accessibility": "public", + "parameters": [ + { + "$id": "2671", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "2672", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "2673", + "type": { + "$id": "2674", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2024-11-01" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2675", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "2676", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "2677", + "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": "2678", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "2679", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2680", + "name": "assetEndpointProfileName", + "nameInRequest": "assetEndpointProfileName", + "doc": "Asset Endpoint Profile name parameter.", + "type": { + "$id": "2681", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2682", + "name": "contentType", + "nameInRequest": "Content-Type", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$id": "2683", + "kind": "constant", + "valueType": { + "$id": "2684", + "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": "2685", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "2686", + "kind": "constant", + "valueType": { + "$id": "2687", + "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": "2688", + "name": "resource", + "nameInRequest": "resource", + "doc": "Resource create parameters.", + "type": { + "$ref": "557" + }, + "location": "Body", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "2689", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "557" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + }, + { + "$id": "2690", + "statusCodes": [ + 201 + ], + "bodyType": { + "$ref": "557" + }, + "headers": [ + { + "$id": "2691", + "name": "azureAsyncOperation", + "nameInResponse": "Azure-AsyncOperation", + "doc": "A link to the status monitor", + "type": { + "$id": "2692", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + { + "$id": "2693", + "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": "2694", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + } + } + ], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "PUT", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeviceRegistry/assetEndpointProfiles/{assetEndpointProfileName}", + "requestMediaTypes": [ + "application/json" + ], + "bufferResponse": true, + "longRunning": { + "$id": "2695", + "finalStateVia": 0, + "finalResponse": { + "$id": "2696", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "557" + } + } + }, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.DeviceRegistry.AssetEndpointProfiles.createOrReplace", + "decorators": [], + "examples": [ + { + "$id": "2697", + "kind": "http", + "name": "Create_AssetEndpointProfile", + "description": "Create_AssetEndpointProfile", + "filePath": "2024-11-01/Create_AssetEndpointProfile.json", + "parameters": [ + { + "$id": "2698", + "parameter": { + "$ref": "2671" + }, + "value": { + "$id": "2699", + "kind": "string", + "type": { + "$ref": "2672" + }, + "value": "2024-11-01" + } + }, + { + "$id": "2700", + "parameter": { + "$ref": "2675" + }, + "value": { + "$id": "2701", + "kind": "string", + "type": { + "$ref": "2676" + }, + "value": "00000000-0000-0000-0000-000000000000" + } + }, + { + "$id": "2702", + "parameter": { + "$ref": "2678" + }, + "value": { + "$id": "2703", + "kind": "string", + "type": { + "$ref": "2679" + }, + "value": "myResourceGroup" + } + }, + { + "$id": "2704", + "parameter": { + "$ref": "2680" + }, + "value": { + "$id": "2705", + "kind": "string", + "type": { + "$ref": "2681" + }, + "value": "my-assetendpointprofile" + } + }, + { + "$id": "2706", + "parameter": { + "$ref": "2688" + }, + "value": { + "$id": "2707", + "kind": "model", + "type": { + "$ref": "557" + }, + "value": { + "$id": "2708", + "location": { + "$id": "2709", + "kind": "string", + "type": { + "$ref": "211" + }, + "value": "West Europe" + }, + "extendedLocation": { + "$id": "2710", + "kind": "model", + "type": { + "$ref": "431" + }, + "value": { + "$id": "2711", + "type": { + "$id": "2712", + "kind": "string", + "type": { + "$ref": "433" + }, + "value": "CustomLocation" + }, + "name": { + "$id": "2713", + "kind": "string", + "type": { + "$ref": "437" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/microsoft.extendedlocation/customlocations/location1" + } + } + }, + "tags": { + "$id": "2714", + "kind": "dict", + "type": { + "$ref": "205" + }, + "value": { + "$id": "2715", + "site": { + "$id": "2716", + "kind": "string", + "type": { + "$ref": "207" + }, + "value": "building-1" + } + } + }, + "properties": { + "$id": "2717", + "kind": "model", + "type": { + "$ref": "559" + }, + "value": { + "$id": "2718", + "targetAddress": { + "$id": "2719", + "kind": "string", + "type": { + "$ref": "565" + }, + "value": "https://www.example.com/myTargetAddress" + }, + "endpointProfileType": { + "$id": "2720", + "kind": "string", + "type": { + "$ref": "569" + }, + "value": "myEndpointProfileType" + }, + "authentication": { + "$id": "2721", + "kind": "model", + "type": { + "$ref": "573" + }, + "value": { + "$id": "2722", + "method": { + "$id": "2723", + "kind": "string", + "type": { + "$ref": "68" + }, + "value": "Anonymous" + } + } + } + } + } + } + } + } + ], + "responses": [ + { + "$id": "2724", + "response": { + "$ref": "2689" + }, + "statusCode": 200, + "bodyValue": { + "$id": "2725", + "kind": "model", + "type": { + "$ref": "557" + }, + "value": { + "$id": "2726", + "id": { + "$id": "2727", + "kind": "string", + "type": { + "$ref": "163" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.DeviceRegistry/assetEndpointProfiles/my-assetendpointprofile" + }, + "name": { + "$id": "2728", + "kind": "string", + "type": { + "$ref": "168" + }, + "value": "my-assetendpointprofile" + }, + "type": { + "$id": "2729", + "kind": "string", + "type": { + "$ref": "172" + }, + "value": "Microsoft.DeviceRegistry/assetEndpointProfiles" + }, + "location": { + "$id": "2730", + "kind": "string", + "type": { + "$ref": "211" + }, + "value": "West Europe" + }, + "extendedLocation": { + "$id": "2731", + "kind": "model", + "type": { + "$ref": "431" + }, + "value": { + "$id": "2732", + "type": { + "$id": "2733", + "kind": "string", + "type": { + "$ref": "433" + }, + "value": "CustomLocation" + }, + "name": { + "$id": "2734", + "kind": "string", + "type": { + "$ref": "437" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/microsoft.extendedlocation/customlocations/location1" + } + } + }, + "tags": { + "$id": "2735", + "kind": "dict", + "type": { + "$ref": "205" + }, + "value": { + "$id": "2736", + "site": { + "$id": "2737", + "kind": "string", + "type": { + "$ref": "207" + }, + "value": "building-1" + } + } + }, + "systemData": { + "$id": "2738", + "kind": "model", + "type": { + "$ref": "177" + }, + "value": { + "$id": "2739", + "createdBy": { + "$id": "2740", + "kind": "string", + "type": { + "$ref": "179" + }, + "value": "2ta23112-4596-44ff-b773-19405922bfc1" + }, + "createdByType": { + "$id": "2741", + "kind": "string", + "type": { + "$ref": "50" + }, + "value": "Application" + }, + "createdAt": { + "$id": "2742", + "kind": "string", + "type": { + "$ref": "186" + }, + "value": "2022-11-16T00:36:43.2516899Z" + }, + "lastModifiedBy": { + "$id": "2743", + "kind": "string", + "type": { + "$ref": "191" + }, + "value": "2ta23112-4596-44ff-b773-19405922bfc1" + }, + "lastModifiedByType": { + "$id": "2744", + "kind": "string", + "type": { + "$ref": "50" + }, + "value": "Application" + }, + "lastModifiedAt": { + "$id": "2745", + "kind": "string", + "type": { + "$ref": "198" + }, + "value": "2022-11-16T01:37:16.0922793Z" + } + } + }, + "properties": { + "$id": "2746", + "kind": "model", + "type": { + "$ref": "559" + }, + "value": { + "$id": "2747", + "uuid": { + "$id": "2748", + "kind": "string", + "type": { + "$ref": "561" + }, + "value": "0796f7c1-f2c8-44d7-9f5b-9a6f9522a85d" + }, + "targetAddress": { + "$id": "2749", + "kind": "string", + "type": { + "$ref": "565" + }, + "value": "https://www.example.com/myTargetAddress" + }, + "endpointProfileType": { + "$id": "2750", + "kind": "string", + "type": { + "$ref": "569" + }, + "value": "myEndpointProfileType" + }, + "authentication": { + "$id": "2751", + "kind": "model", + "type": { + "$ref": "573" + }, + "value": { + "$id": "2752", + "method": { + "$id": "2753", + "kind": "string", + "type": { + "$ref": "68" + }, + "value": "Anonymous" + } + } + }, + "provisioningState": { + "$id": "2754", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Succeeded" + } + } + } + } + } + }, + { + "$id": "2755", + "response": { + "$ref": "2690" + }, + "statusCode": 201, + "bodyValue": { + "$id": "2756", + "kind": "model", + "type": { + "$ref": "557" + }, + "value": { + "$id": "2757", + "id": { + "$id": "2758", + "kind": "string", + "type": { + "$ref": "163" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.DeviceRegistry/assetEndpointProfiles/my-assetendpointprofile" + }, + "name": { + "$id": "2759", + "kind": "string", + "type": { + "$ref": "168" + }, + "value": "my-assetendpointprofile" + }, + "type": { + "$id": "2760", + "kind": "string", + "type": { + "$ref": "172" + }, + "value": "Microsoft.DeviceRegistry/assetEndpointProfiles" + }, + "location": { + "$id": "2761", + "kind": "string", + "type": { + "$ref": "211" + }, + "value": "West Europe" + }, + "extendedLocation": { + "$id": "2762", + "kind": "model", + "type": { + "$ref": "431" + }, + "value": { + "$id": "2763", + "type": { + "$id": "2764", + "kind": "string", + "type": { + "$ref": "433" + }, + "value": "CustomLocation" + }, + "name": { + "$id": "2765", + "kind": "string", + "type": { + "$ref": "437" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/microsoft.extendedlocation/customlocations/location1" + } + } + }, + "tags": { + "$id": "2766", + "kind": "dict", + "type": { + "$ref": "205" + }, + "value": { + "$id": "2767", + "site": { + "$id": "2768", + "kind": "string", + "type": { + "$ref": "207" + }, + "value": "building-1" + } + } + }, + "systemData": { + "$id": "2769", + "kind": "model", + "type": { + "$ref": "177" + }, + "value": { + "$id": "2770", + "createdBy": { + "$id": "2771", + "kind": "string", + "type": { + "$ref": "179" + }, + "value": "2ta23112-4596-44ff-b773-19405922bfc1" + }, + "createdByType": { + "$id": "2772", + "kind": "string", + "type": { + "$ref": "50" + }, + "value": "Application" + }, + "createdAt": { + "$id": "2773", + "kind": "string", + "type": { + "$ref": "186" + }, + "value": "2022-11-16T00:36:43.2516899Z" + }, + "lastModifiedBy": { + "$id": "2774", + "kind": "string", + "type": { + "$ref": "191" + }, + "value": "2ta23112-4596-44ff-b773-19405922bfc1" + }, + "lastModifiedByType": { + "$id": "2775", + "kind": "string", + "type": { + "$ref": "50" + }, + "value": "Application" + }, + "lastModifiedAt": { + "$id": "2776", + "kind": "string", + "type": { + "$ref": "198" + }, + "value": "2022-11-16T01:37:16.0922793Z" + } + } + }, + "properties": { + "$id": "2777", + "kind": "model", + "type": { + "$ref": "559" + }, + "value": { + "$id": "2778", + "uuid": { + "$id": "2779", + "kind": "string", + "type": { + "$ref": "561" + }, + "value": "0796f7c1-f2c8-44d7-9f5b-9a6f9522a85d" + }, + "targetAddress": { + "$id": "2780", + "kind": "string", + "type": { + "$ref": "565" + }, + "value": "https://www.example.com/myTargetAddress" + }, + "endpointProfileType": { + "$id": "2781", + "kind": "string", + "type": { + "$ref": "569" + }, + "value": "myEndpointProfileType" + }, + "authentication": { + "$id": "2782", + "kind": "model", + "type": { + "$ref": "573" + }, + "value": { + "$id": "2783", + "method": { + "$id": "2784", + "kind": "string", + "type": { + "$ref": "68" + }, + "value": "Anonymous" + } + } + }, + "provisioningState": { + "$id": "2785", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Accepted" + } + } + } + } + } + } + ] + }, + { + "$id": "2786", + "kind": "http", + "name": "Create_AssetEndpointProfile_With_DiscoveredAepRef", + "description": "Create_AssetEndpointProfile_With_DiscoveredAepRef", + "filePath": "2024-11-01/Create_AssetEndpointProfile_With_DiscoveredAepRef.json", + "parameters": [ + { + "$id": "2787", + "parameter": { + "$ref": "2671" + }, + "value": { + "$id": "2788", + "kind": "string", + "type": { + "$ref": "2672" + }, + "value": "2024-11-01" + } + }, + { + "$id": "2789", + "parameter": { + "$ref": "2675" + }, + "value": { + "$id": "2790", + "kind": "string", + "type": { + "$ref": "2676" + }, + "value": "00000000-0000-0000-0000-000000000000" + } + }, + { + "$id": "2791", + "parameter": { + "$ref": "2678" + }, + "value": { + "$id": "2792", + "kind": "string", + "type": { + "$ref": "2679" + }, + "value": "myResourceGroup" + } + }, + { + "$id": "2793", + "parameter": { + "$ref": "2680" + }, + "value": { + "$id": "2794", + "kind": "string", + "type": { + "$ref": "2681" + }, + "value": "my-assetendpointprofile" + } + }, + { + "$id": "2795", + "parameter": { + "$ref": "2688" + }, + "value": { + "$id": "2796", + "kind": "model", + "type": { + "$ref": "557" + }, + "value": { + "$id": "2797", + "location": { + "$id": "2798", + "kind": "string", + "type": { + "$ref": "211" + }, + "value": "West Europe" + }, + "extendedLocation": { + "$id": "2799", + "kind": "model", + "type": { + "$ref": "431" + }, + "value": { + "$id": "2800", + "type": { + "$id": "2801", + "kind": "string", + "type": { + "$ref": "433" + }, + "value": "CustomLocation" + }, + "name": { + "$id": "2802", + "kind": "string", + "type": { + "$ref": "437" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/microsoft.extendedlocation/customlocations/location1" + } + } + }, + "tags": { + "$id": "2803", + "kind": "dict", + "type": { + "$ref": "205" + }, + "value": { + "$id": "2804", + "site": { + "$id": "2805", + "kind": "string", + "type": { + "$ref": "207" + }, + "value": "building-1" + } + } + }, + "properties": { + "$id": "2806", + "kind": "model", + "type": { + "$ref": "559" + }, + "value": { + "$id": "2807", + "targetAddress": { + "$id": "2808", + "kind": "string", + "type": { + "$ref": "565" + }, + "value": "https://www.example.com/myTargetAddress" + }, + "endpointProfileType": { + "$id": "2809", + "kind": "string", + "type": { + "$ref": "569" + }, + "value": "myEndpointProfileType" + }, + "discoveredAssetEndpointProfileRef": { + "$id": "2810", + "kind": "string", + "type": { + "$ref": "604" + }, + "value": "discoveredAssetEndpointProfile1" + }, + "authentication": { + "$id": "2811", + "kind": "model", + "type": { + "$ref": "573" + }, + "value": { + "$id": "2812", + "method": { + "$id": "2813", + "kind": "string", + "type": { + "$ref": "68" + }, + "value": "Anonymous" + } + } + } + } + } + } + } + } + ], + "responses": [ + { + "$id": "2814", + "response": { + "$ref": "2689" + }, + "statusCode": 200, + "bodyValue": { + "$id": "2815", + "kind": "model", + "type": { + "$ref": "557" + }, + "value": { + "$id": "2816", + "id": { + "$id": "2817", + "kind": "string", + "type": { + "$ref": "163" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.DeviceRegistry/assetEndpointProfiles/my-assetendpointprofile" + }, + "name": { + "$id": "2818", + "kind": "string", + "type": { + "$ref": "168" + }, + "value": "my-assetendpointprofile" + }, + "type": { + "$id": "2819", + "kind": "string", + "type": { + "$ref": "172" + }, + "value": "Microsoft.DeviceRegistry/assetEndpointProfiles" + }, + "location": { + "$id": "2820", + "kind": "string", + "type": { + "$ref": "211" + }, + "value": "West Europe" + }, + "extendedLocation": { + "$id": "2821", + "kind": "model", + "type": { + "$ref": "431" + }, + "value": { + "$id": "2822", + "type": { + "$id": "2823", + "kind": "string", + "type": { + "$ref": "433" + }, + "value": "CustomLocation" + }, + "name": { + "$id": "2824", + "kind": "string", + "type": { + "$ref": "437" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/microsoft.extendedlocation/customlocations/location1" + } + } + }, + "tags": { + "$id": "2825", + "kind": "dict", + "type": { + "$ref": "205" + }, + "value": { + "$id": "2826", + "site": { + "$id": "2827", + "kind": "string", + "type": { + "$ref": "207" + }, + "value": "building-1" + } + } + }, + "systemData": { + "$id": "2828", + "kind": "model", + "type": { + "$ref": "177" + }, + "value": { + "$id": "2829", + "createdBy": { + "$id": "2830", + "kind": "string", + "type": { + "$ref": "179" + }, + "value": "2ta23112-4596-44ff-b773-19405922bfc1" + }, + "createdByType": { + "$id": "2831", + "kind": "string", + "type": { + "$ref": "50" + }, + "value": "Application" + }, + "createdAt": { + "$id": "2832", + "kind": "string", + "type": { + "$ref": "186" + }, + "value": "2022-11-16T00:36:43.2516899Z" + }, + "lastModifiedBy": { + "$id": "2833", + "kind": "string", + "type": { + "$ref": "191" + }, + "value": "2ta23112-4596-44ff-b773-19405922bfc1" + }, + "lastModifiedByType": { + "$id": "2834", + "kind": "string", + "type": { + "$ref": "50" + }, + "value": "Application" + }, + "lastModifiedAt": { + "$id": "2835", + "kind": "string", + "type": { + "$ref": "198" + }, + "value": "2022-11-16T01:37:16.0922793Z" + } + } + }, + "properties": { + "$id": "2836", + "kind": "model", + "type": { + "$ref": "559" + }, + "value": { + "$id": "2837", + "uuid": { + "$id": "2838", + "kind": "string", + "type": { + "$ref": "561" + }, + "value": "0796f7c1-f2c8-44d7-9f5b-9a6f9522a85d" + }, + "targetAddress": { + "$id": "2839", + "kind": "string", + "type": { + "$ref": "565" + }, + "value": "https://www.example.com/myTargetAddress" + }, + "endpointProfileType": { + "$id": "2840", + "kind": "string", + "type": { + "$ref": "569" + }, + "value": "myEndpointProfileType" + }, + "discoveredAssetEndpointProfileRef": { + "$id": "2841", + "kind": "string", + "type": { + "$ref": "604" + }, + "value": "discoveredAssetEndpointProfile1" + }, + "authentication": { + "$id": "2842", + "kind": "model", + "type": { + "$ref": "573" + }, + "value": { + "$id": "2843", + "method": { + "$id": "2844", + "kind": "string", + "type": { + "$ref": "68" + }, + "value": "Anonymous" + } + } + }, + "provisioningState": { + "$id": "2845", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Succeeded" + } + } + } + } + } + }, + { + "$id": "2846", + "response": { + "$ref": "2690" + }, + "statusCode": 201, + "bodyValue": { + "$id": "2847", + "kind": "model", + "type": { + "$ref": "557" + }, + "value": { + "$id": "2848", + "id": { + "$id": "2849", + "kind": "string", + "type": { + "$ref": "163" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.DeviceRegistry/assetEndpointProfiles/my-assetendpointprofile" + }, + "name": { + "$id": "2850", + "kind": "string", + "type": { + "$ref": "168" + }, + "value": "my-assetendpointprofile" + }, + "type": { + "$id": "2851", + "kind": "string", + "type": { + "$ref": "172" + }, + "value": "Microsoft.DeviceRegistry/assetEndpointProfiles" + }, + "location": { + "$id": "2852", + "kind": "string", + "type": { + "$ref": "211" + }, + "value": "West Europe" + }, + "extendedLocation": { + "$id": "2853", + "kind": "model", + "type": { + "$ref": "431" + }, + "value": { + "$id": "2854", + "type": { + "$id": "2855", + "kind": "string", + "type": { + "$ref": "433" + }, + "value": "CustomLocation" + }, + "name": { + "$id": "2856", + "kind": "string", + "type": { + "$ref": "437" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/microsoft.extendedlocation/customlocations/location1" + } + } + }, + "tags": { + "$id": "2857", + "kind": "dict", + "type": { + "$ref": "205" + }, + "value": { + "$id": "2858", + "site": { + "$id": "2859", + "kind": "string", + "type": { + "$ref": "207" + }, + "value": "building-1" + } + } + }, + "systemData": { + "$id": "2860", + "kind": "model", + "type": { + "$ref": "177" + }, + "value": { + "$id": "2861", + "createdBy": { + "$id": "2862", + "kind": "string", + "type": { + "$ref": "179" + }, + "value": "2ta23112-4596-44ff-b773-19405922bfc1" + }, + "createdByType": { + "$id": "2863", + "kind": "string", + "type": { + "$ref": "50" + }, + "value": "Application" + }, + "createdAt": { + "$id": "2864", + "kind": "string", + "type": { + "$ref": "186" + }, + "value": "2022-11-16T00:36:43.2516899Z" + }, + "lastModifiedBy": { + "$id": "2865", + "kind": "string", + "type": { + "$ref": "191" + }, + "value": "2ta23112-4596-44ff-b773-19405922bfc1" + }, + "lastModifiedByType": { + "$id": "2866", + "kind": "string", + "type": { + "$ref": "50" + }, + "value": "Application" + }, + "lastModifiedAt": { + "$id": "2867", + "kind": "string", + "type": { + "$ref": "198" + }, + "value": "2022-11-16T01:37:16.0922793Z" + } + } + }, + "properties": { + "$id": "2868", + "kind": "model", + "type": { + "$ref": "559" + }, + "value": { + "$id": "2869", + "uuid": { + "$id": "2870", + "kind": "string", + "type": { + "$ref": "561" + }, + "value": "0796f7c1-f2c8-44d7-9f5b-9a6f9522a85d" + }, + "targetAddress": { + "$id": "2871", + "kind": "string", + "type": { + "$ref": "565" + }, + "value": "https://www.example.com/myTargetAddress" + }, + "endpointProfileType": { + "$id": "2872", + "kind": "string", + "type": { + "$ref": "569" + }, + "value": "myEndpointProfileType" + }, + "discoveredAssetEndpointProfileRef": { + "$id": "2873", + "kind": "string", + "type": { + "$ref": "604" + }, + "value": "discoveredAssetEndpointProfile1" + }, + "authentication": { + "$id": "2874", + "kind": "model", + "type": { + "$ref": "573" + }, + "value": { + "$id": "2875", + "method": { + "$id": "2876", + "kind": "string", + "type": { + "$ref": "68" + }, + "value": "Anonymous" + } + } + }, + "provisioningState": { + "$id": "2877", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Accepted" + } + } + } + } + } + } + ] + } + ] + }, + { + "$id": "2878", + "name": "update", + "resourceName": "AssetEndpointProfile", + "doc": "Update a AssetEndpointProfile", + "accessibility": "public", + "parameters": [ + { + "$id": "2879", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "2880", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "2881", + "type": { + "$id": "2882", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2024-11-01" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2883", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "2884", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "2885", + "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": "2886", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "2887", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2888", + "name": "assetEndpointProfileName", + "nameInRequest": "assetEndpointProfileName", + "doc": "Asset Endpoint Profile name parameter.", + "type": { + "$id": "2889", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2890", + "name": "contentType", + "nameInRequest": "Content-Type", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$id": "2891", + "kind": "constant", + "valueType": { + "$id": "2892", + "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": "2893", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "2894", + "kind": "constant", + "valueType": { + "$id": "2895", + "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": "2896", + "name": "properties", + "nameInRequest": "properties", + "doc": "The resource properties to be updated.", + "type": { + "$ref": "632" + }, + "location": "Body", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "2897", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "557" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + }, + { + "$id": "2898", + "statusCodes": [ + 202 + ], + "headers": [ + { + "$id": "2899", + "name": "location", + "nameInResponse": "Location", + "doc": "The Location header contains the URL where the status of the long running operation can be checked.", + "type": { + "$id": "2900", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + { + "$id": "2901", + "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": "2902", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + } + } + ], + "isErrorResponse": false + } + ], + "httpMethod": "PATCH", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeviceRegistry/assetEndpointProfiles/{assetEndpointProfileName}", + "requestMediaTypes": [ + "application/json" + ], + "bufferResponse": true, + "longRunning": { + "$id": "2903", + "finalStateVia": 1, + "finalResponse": { + "$id": "2904", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "557" + } + } + }, + "generateProtocolMethod": true, + "generateConvenienceMethod": false, + "crossLanguageDefinitionId": "Microsoft.DeviceRegistry.AssetEndpointProfiles.update", + "decorators": [], + "examples": [ + { + "$id": "2905", + "kind": "http", + "name": "Update_AssetEndpointProfile", + "description": "Update_AssetEndpointProfile", + "filePath": "2024-11-01/Update_AssetEndpointProfile.json", + "parameters": [ + { + "$id": "2906", + "parameter": { + "$ref": "2879" + }, + "value": { + "$id": "2907", + "kind": "string", + "type": { + "$ref": "2880" + }, + "value": "2024-11-01" + } + }, + { + "$id": "2908", + "parameter": { + "$ref": "2883" + }, + "value": { + "$id": "2909", + "kind": "string", + "type": { + "$ref": "2884" + }, + "value": "00000000-0000-0000-0000-000000000000" + } + }, + { + "$id": "2910", + "parameter": { + "$ref": "2886" + }, + "value": { + "$id": "2911", + "kind": "string", + "type": { + "$ref": "2887" + }, + "value": "myResourceGroup" + } + }, + { + "$id": "2912", + "parameter": { + "$ref": "2888" + }, + "value": { + "$id": "2913", + "kind": "string", + "type": { + "$ref": "2889" + }, + "value": "my-assetendpointprofile" + } + }, + { + "$id": "2914", + "parameter": { + "$ref": "2896" + }, + "value": { + "$id": "2915", + "kind": "model", + "type": { + "$ref": "632" + }, + "value": { + "$id": "2916", + "properties": { + "$id": "2917", + "kind": "model", + "type": { + "$ref": "640" + }, + "value": { + "$id": "2918", + "targetAddress": { + "$id": "2919", + "kind": "string", + "type": { + "$ref": "642" + }, + "value": "https://www.example.com/myTargetAddress" + } + } + } + } + } + } + ], + "responses": [ + { + "$id": "2920", + "response": { + "$ref": "2897" + }, + "statusCode": 200, + "bodyValue": { + "$id": "2921", + "kind": "model", + "type": { + "$ref": "557" + }, + "value": { + "$id": "2922", + "id": { + "$id": "2923", + "kind": "string", + "type": { + "$ref": "163" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.DeviceRegistry/assetEndpointProfiles/my-assetendpointprofile" + }, + "name": { + "$id": "2924", + "kind": "string", + "type": { + "$ref": "168" + }, + "value": "my-assetendpointprofile" + }, + "type": { + "$id": "2925", + "kind": "string", + "type": { + "$ref": "172" + }, + "value": "Microsoft.DeviceRegistry/assetEndpointProfiles" + }, + "location": { + "$id": "2926", + "kind": "string", + "type": { + "$ref": "211" + }, + "value": "West Europe" + }, + "extendedLocation": { + "$id": "2927", + "kind": "model", + "type": { + "$ref": "431" + }, + "value": { + "$id": "2928", + "type": { + "$id": "2929", + "kind": "string", + "type": { + "$ref": "433" + }, + "value": "CustomLocation" + }, + "name": { + "$id": "2930", + "kind": "string", + "type": { + "$ref": "437" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/microsoft.extendedlocation/customlocations/location1" + } + } + }, + "tags": { + "$id": "2931", + "kind": "dict", + "type": { + "$ref": "205" + }, + "value": { + "$id": "2932", + "site": { + "$id": "2933", + "kind": "string", + "type": { + "$ref": "207" + }, + "value": "building-1" + } + } + }, + "systemData": { + "$id": "2934", + "kind": "model", + "type": { + "$ref": "177" + }, + "value": { + "$id": "2935", + "createdBy": { + "$id": "2936", + "kind": "string", + "type": { + "$ref": "179" + }, + "value": "2ta23112-4596-44ff-b773-19405922bfc1" + }, + "createdByType": { + "$id": "2937", + "kind": "string", + "type": { + "$ref": "50" + }, + "value": "Application" + }, + "createdAt": { + "$id": "2938", + "kind": "string", + "type": { + "$ref": "186" + }, + "value": "2022-11-16T00:36:43.2516899Z" + }, + "lastModifiedBy": { + "$id": "2939", + "kind": "string", + "type": { + "$ref": "191" + }, + "value": "2ta23112-4596-44ff-b773-19405922bfc1" + }, + "lastModifiedByType": { + "$id": "2940", + "kind": "string", + "type": { + "$ref": "50" + }, + "value": "Application" + }, + "lastModifiedAt": { + "$id": "2941", + "kind": "string", + "type": { + "$ref": "198" + }, + "value": "2022-11-16T01:37:16.0922793Z" + } + } + }, + "properties": { + "$id": "2942", + "kind": "model", + "type": { + "$ref": "559" + }, + "value": { + "$id": "2943", + "uuid": { + "$id": "2944", + "kind": "string", + "type": { + "$ref": "561" + }, + "value": "0796f7c1-f2c8-44d7-9f5b-9a6f9522a85d" + }, + "targetAddress": { + "$id": "2945", + "kind": "string", + "type": { + "$ref": "565" + }, + "value": "https://www.example.com/myTargetAddress" + }, + "endpointProfileType": { + "$id": "2946", + "kind": "string", + "type": { + "$ref": "569" + }, + "value": "myEndpointProfileType" + }, + "authentication": { + "$id": "2947", + "kind": "model", + "type": { + "$ref": "573" + }, + "value": { + "$id": "2948", + "method": { + "$id": "2949", + "kind": "string", + "type": { + "$ref": "68" + }, + "value": "Anonymous" + } + } + }, + "provisioningState": { + "$id": "2950", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Succeeded" + } + } + } + } + } + }, + { + "$id": "2951", + "response": { + "$ref": "2898" + }, + "statusCode": 202 + } + ] + } + ] + }, + { + "$id": "2952", + "name": "delete", + "resourceName": "AssetEndpointProfile", + "doc": "Delete a AssetEndpointProfile", + "accessibility": "public", + "parameters": [ + { + "$id": "2953", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "2954", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "2955", + "type": { + "$id": "2956", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2024-11-01" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2957", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "2958", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "2959", + "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": "2960", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "2961", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2962", + "name": "assetEndpointProfileName", + "nameInRequest": "assetEndpointProfileName", + "doc": "Asset Endpoint Profile name parameter.", + "type": { + "$id": "2963", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2964", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "2965", + "kind": "constant", + "valueType": { + "$id": "2966", + "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": "2967", + "statusCodes": [ + 202 + ], + "headers": [ + { + "$id": "2968", + "name": "location", + "nameInResponse": "Location", + "doc": "The Location header contains the URL where the status of the long running operation can be checked.", + "type": { + "$id": "2969", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + { + "$id": "2970", + "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": "2971", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + } + } + ], + "isErrorResponse": false + }, + { + "$id": "2972", + "statusCodes": [ + 204 + ], + "headers": [], + "isErrorResponse": false + } + ], + "httpMethod": "DELETE", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeviceRegistry/assetEndpointProfiles/{assetEndpointProfileName}", + "bufferResponse": true, + "longRunning": { + "$id": "2973", + "finalStateVia": 1, + "finalResponse": { + "$id": "2974", + "statusCodes": [ + 204 + ] + } + }, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.DeviceRegistry.AssetEndpointProfiles.delete", + "decorators": [], + "examples": [ + { + "$id": "2975", + "kind": "http", + "name": "Delete_AssetEndpointProfile", + "description": "Delete_AssetEndpointProfile", + "filePath": "2024-11-01/Delete_AssetEndpointProfile.json", + "parameters": [ + { + "$id": "2976", + "parameter": { + "$ref": "2953" + }, + "value": { + "$id": "2977", + "kind": "string", + "type": { + "$ref": "2954" + }, + "value": "2024-11-01" + } + }, + { + "$id": "2978", + "parameter": { + "$ref": "2957" + }, + "value": { + "$id": "2979", + "kind": "string", + "type": { + "$ref": "2958" + }, + "value": "00000000-0000-0000-0000-000000000000" + } + }, + { + "$id": "2980", + "parameter": { + "$ref": "2960" + }, + "value": { + "$id": "2981", + "kind": "string", + "type": { + "$ref": "2961" + }, + "value": "myResourceGroup" + } + }, + { + "$id": "2982", + "parameter": { + "$ref": "2962" + }, + "value": { + "$id": "2983", + "kind": "string", + "type": { + "$ref": "2963" + }, + "value": "my-assetendpointprofile" + } + } + ], + "responses": [ + { + "$id": "2984", + "response": { + "$ref": "2967" + }, + "statusCode": 202 + }, + { + "$id": "2985", + "response": { + "$ref": "2972" + }, + "statusCode": 204 + } + ] + } + ] + }, + { + "$id": "2986", + "name": "listByResourceGroup", + "resourceName": "AssetEndpointProfile", + "doc": "List AssetEndpointProfile resources by resource group", + "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": "2024-11-01" + }, + "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": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "2993", + "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": "2994", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "2995", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2996", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "2997", + "kind": "constant", + "valueType": { + "$id": "2998", + "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": "2999", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "658" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "GET", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeviceRegistry/assetEndpointProfiles", + "bufferResponse": true, + "paging": { + "$id": "3000", + "itemPropertySegments": [ + "value" + ], + "nextLink": { + "$id": "3001", + "responseSegments": [ + "nextLink" + ], + "responseLocation": "Body" + } + }, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.DeviceRegistry.AssetEndpointProfiles.listByResourceGroup", + "decorators": [], + "examples": [ + { + "$id": "3002", + "kind": "http", + "name": "List_AssetEndpointProfiles_ResourceGroup", + "description": "List_AssetEndpointProfiles_ResourceGroup", + "filePath": "2024-11-01/List_AssetEndpointProfiles_ResourceGroup.json", + "parameters": [ + { + "$id": "3003", + "parameter": { + "$ref": "2987" + }, + "value": { + "$id": "3004", + "kind": "string", + "type": { + "$ref": "2988" + }, + "value": "2024-11-01" + } + }, + { + "$id": "3005", + "parameter": { + "$ref": "2991" + }, + "value": { + "$id": "3006", + "kind": "string", + "type": { + "$ref": "2992" + }, + "value": "00000000-0000-0000-0000-000000000000" + } + }, + { + "$id": "3007", + "parameter": { + "$ref": "2994" + }, + "value": { + "$id": "3008", + "kind": "string", + "type": { + "$ref": "2995" + }, + "value": "myResourceGroup" + } + } + ], + "responses": [ + { + "$id": "3009", + "response": { + "$ref": "2999" + }, + "statusCode": 200, + "bodyValue": { + "$id": "3010", + "kind": "model", + "type": { + "$ref": "658" + }, + "value": { + "$id": "3011", + "value": { + "$id": "3012", + "kind": "array", + "type": { + "$ref": "660" + }, + "value": [ + { + "$id": "3013", + "kind": "model", + "type": { + "$ref": "557" + }, + "value": { + "$id": "3014", + "id": { + "$id": "3015", + "kind": "string", + "type": { + "$ref": "163" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.DeviceRegistry/assetEndpointProfiles/my-assetendpointprofile" + }, + "name": { + "$id": "3016", + "kind": "string", + "type": { + "$ref": "168" + }, + "value": "my-assetendpointprofile" + }, + "type": { + "$id": "3017", + "kind": "string", + "type": { + "$ref": "172" + }, + "value": "Microsoft.DeviceRegistry/assetEndpointProfiles" + }, + "location": { + "$id": "3018", + "kind": "string", + "type": { + "$ref": "211" + }, + "value": "West Europe" + }, + "extendedLocation": { + "$id": "3019", + "kind": "model", + "type": { + "$ref": "431" + }, + "value": { + "$id": "3020", + "type": { + "$id": "3021", + "kind": "string", + "type": { + "$ref": "433" + }, + "value": "CustomLocation" + }, + "name": { + "$id": "3022", + "kind": "string", + "type": { + "$ref": "437" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/microsoft.extendedlocation/customlocations/location1" + } + } + }, + "tags": { + "$id": "3023", + "kind": "dict", + "type": { + "$ref": "205" + }, + "value": { + "$id": "3024", + "site": { + "$id": "3025", + "kind": "string", + "type": { + "$ref": "207" + }, + "value": "building-1" + } + } + }, + "systemData": { + "$id": "3026", + "kind": "model", + "type": { + "$ref": "177" + }, + "value": { + "$id": "3027", + "createdBy": { + "$id": "3028", + "kind": "string", + "type": { + "$ref": "179" + }, + "value": "2ta23112-4596-44ff-b773-19405922bfc1" + }, + "createdByType": { + "$id": "3029", + "kind": "string", + "type": { + "$ref": "50" + }, + "value": "Application" + }, + "createdAt": { + "$id": "3030", + "kind": "string", + "type": { + "$ref": "186" + }, + "value": "2022-11-16T00:36:43.2516899Z" + }, + "lastModifiedBy": { + "$id": "3031", + "kind": "string", + "type": { + "$ref": "191" + }, + "value": "2ta23112-4596-44ff-b773-19405922bfc1" + }, + "lastModifiedByType": { + "$id": "3032", + "kind": "string", + "type": { + "$ref": "50" + }, + "value": "Application" + }, + "lastModifiedAt": { + "$id": "3033", + "kind": "string", + "type": { + "$ref": "198" + }, + "value": "2022-11-16T01:37:16.0922793Z" + } + } + }, + "properties": { + "$id": "3034", + "kind": "model", + "type": { + "$ref": "559" + }, + "value": { + "$id": "3035", + "uuid": { + "$id": "3036", + "kind": "string", + "type": { + "$ref": "561" + }, + "value": "0796f7c1-f2c8-44d7-9f5b-9a6f9522a85d" + }, + "targetAddress": { + "$id": "3037", + "kind": "string", + "type": { + "$ref": "565" + }, + "value": "https://www.example.com/myTargetAddress" + }, + "endpointProfileType": { + "$id": "3038", + "kind": "string", + "type": { + "$ref": "569" + }, + "value": "myEndpointProfileType" + }, + "authentication": { + "$id": "3039", + "kind": "model", + "type": { + "$ref": "573" + }, + "value": { + "$id": "3040", + "method": { + "$id": "3041", + "kind": "string", + "type": { + "$ref": "68" + }, + "value": "Anonymous" + } + } + }, + "provisioningState": { + "$id": "3042", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Succeeded" + } + } + } + } + }, + { + "$id": "3043", + "kind": "model", + "type": { + "$ref": "557" + }, + "value": { + "$id": "3044", + "id": { + "$id": "3045", + "kind": "string", + "type": { + "$ref": "163" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.DeviceRegistry/assetEndpointProfiles/my-assetendpointprofile1" + }, + "name": { + "$id": "3046", + "kind": "string", + "type": { + "$ref": "168" + }, + "value": "my-assetendpointprofile1" + }, + "type": { + "$id": "3047", + "kind": "string", + "type": { + "$ref": "172" + }, + "value": "Microsoft.DeviceRegistry/assetEndpointProfiles" + }, + "location": { + "$id": "3048", + "kind": "string", + "type": { + "$ref": "211" + }, + "value": "West Europe" + }, + "extendedLocation": { + "$id": "3049", + "kind": "model", + "type": { + "$ref": "431" + }, + "value": { + "$id": "3050", + "type": { + "$id": "3051", + "kind": "string", + "type": { + "$ref": "433" + }, + "value": "CustomLocation" + }, + "name": { + "$id": "3052", + "kind": "string", + "type": { + "$ref": "437" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/microsoft.extendedlocation/customlocations/location1" + } + } + }, + "tags": { + "$id": "3053", + "kind": "dict", + "type": { + "$ref": "205" + }, + "value": { + "$id": "3054", + "site": { + "$id": "3055", + "kind": "string", + "type": { + "$ref": "207" + }, + "value": "building-2" + } + } + }, + "systemData": { + "$id": "3056", + "kind": "model", + "type": { + "$ref": "177" + }, + "value": { + "$id": "3057", + "createdBy": { + "$id": "3058", + "kind": "string", + "type": { + "$ref": "179" + }, + "value": "2ta23112-4596-44ff-b773-19405922bfc1" + }, + "createdByType": { + "$id": "3059", + "kind": "string", + "type": { + "$ref": "50" + }, + "value": "Application" + }, + "createdAt": { + "$id": "3060", + "kind": "string", + "type": { + "$ref": "186" + }, + "value": "2022-11-16T00:36:43.2516899Z" + }, + "lastModifiedBy": { + "$id": "3061", + "kind": "string", + "type": { + "$ref": "191" + }, + "value": "2ta23112-4596-44ff-b773-19405922bfc1" + }, + "lastModifiedByType": { + "$id": "3062", + "kind": "string", + "type": { + "$ref": "50" + }, + "value": "Application" + }, + "lastModifiedAt": { + "$id": "3063", + "kind": "string", + "type": { + "$ref": "198" + }, + "value": "2022-11-16T01:37:16.0922793Z" + } + } + }, + "properties": { + "$id": "3064", + "kind": "model", + "type": { + "$ref": "559" + }, + "value": { + "$id": "3065", + "uuid": { + "$id": "3066", + "kind": "string", + "type": { + "$ref": "561" + }, + "value": "7824a74f-21e1-4458-ae06-604d3a241d2c" + }, + "targetAddress": { + "$id": "3067", + "kind": "string", + "type": { + "$ref": "565" + }, + "value": "https://www.example.com/myTargetAddress1" + }, + "endpointProfileType": { + "$id": "3068", + "kind": "string", + "type": { + "$ref": "569" + }, + "value": "myEndpointProfileType" + }, + "authentication": { + "$id": "3069", + "kind": "model", + "type": { + "$ref": "573" + }, + "value": { + "$id": "3070", + "method": { + "$id": "3071", + "kind": "string", + "type": { + "$ref": "68" + }, + "value": "Certificate" + }, + "x509Credentials": { + "$id": "3072", + "kind": "model", + "type": { + "$ref": "590" + }, + "value": { + "$id": "3073", + "certificateSecretName": { + "$id": "3074", + "kind": "string", + "type": { + "$ref": "592" + }, + "value": "certificatRef" + } + } + } + } + }, + "provisioningState": { + "$id": "3075", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Succeeded" + } + } + } + } + }, + { + "$id": "3076", + "kind": "model", + "type": { + "$ref": "557" + }, + "value": { + "$id": "3077", + "id": { + "$id": "3078", + "kind": "string", + "type": { + "$ref": "163" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.DeviceRegistry/assetEndpointProfiles/my-assetendpointprofile2" + }, + "name": { + "$id": "3079", + "kind": "string", + "type": { + "$ref": "168" + }, + "value": "my-assetendpointprofile2" + }, + "type": { + "$id": "3080", + "kind": "string", + "type": { + "$ref": "172" + }, + "value": "Microsoft.DeviceRegistry/assetEndpointProfiles" + }, + "location": { + "$id": "3081", + "kind": "string", + "type": { + "$ref": "211" + }, + "value": "West Europe" + }, + "extendedLocation": { + "$id": "3082", + "kind": "model", + "type": { + "$ref": "431" + }, + "value": { + "$id": "3083", + "type": { + "$id": "3084", + "kind": "string", + "type": { + "$ref": "433" + }, + "value": "CustomLocation" + }, + "name": { + "$id": "3085", + "kind": "string", + "type": { + "$ref": "437" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/microsoft.extendedlocation/customlocations/location1" + } + } + }, + "tags": { + "$id": "3086", + "kind": "dict", + "type": { + "$ref": "205" + }, + "value": { + "$id": "3087", + "site": { + "$id": "3088", + "kind": "string", + "type": { + "$ref": "207" + }, + "value": "building-2" + } + } + }, + "systemData": { + "$id": "3089", + "kind": "model", + "type": { + "$ref": "177" + }, + "value": { + "$id": "3090", + "createdBy": { + "$id": "3091", + "kind": "string", + "type": { + "$ref": "179" + }, + "value": "2ta23112-4596-44ff-b773-19405922bfc1" + }, + "createdByType": { + "$id": "3092", + "kind": "string", + "type": { + "$ref": "50" + }, + "value": "Application" + }, + "createdAt": { + "$id": "3093", + "kind": "string", + "type": { + "$ref": "186" + }, + "value": "2022-11-16T00:36:43.2516899Z" + }, + "lastModifiedBy": { + "$id": "3094", + "kind": "string", + "type": { + "$ref": "191" + }, + "value": "2ta23112-4596-44ff-b773-19405922bfc1" + }, + "lastModifiedByType": { + "$id": "3095", + "kind": "string", + "type": { + "$ref": "50" + }, + "value": "Application" + }, + "lastModifiedAt": { + "$id": "3096", + "kind": "string", + "type": { + "$ref": "198" + }, + "value": "2022-11-16T01:37:16.0922793Z" + } + } + }, + "properties": { + "$id": "3097", + "kind": "model", + "type": { + "$ref": "559" + }, + "value": { + "$id": "3098", + "uuid": { + "$id": "3099", + "kind": "string", + "type": { + "$ref": "561" + }, + "value": "1824a74f-21e1-4458-ae07-604d3a241d2e" + }, + "targetAddress": { + "$id": "3100", + "kind": "string", + "type": { + "$ref": "565" + }, + "value": "https://www.example.com/myTargetAddress2" + }, + "endpointProfileType": { + "$id": "3101", + "kind": "string", + "type": { + "$ref": "569" + }, + "value": "myEndpointProfileType" + }, + "authentication": { + "$id": "3102", + "kind": "model", + "type": { + "$ref": "573" + }, + "value": { + "$id": "3103", + "method": { + "$id": "3104", + "kind": "string", + "type": { + "$ref": "68" + }, + "value": "UsernamePassword" + }, + "usernamePasswordCredentials": { + "$id": "3105", + "kind": "model", + "type": { + "$ref": "578" + }, + "value": { + "$id": "3106", + "usernameSecretName": { + "$id": "3107", + "kind": "string", + "type": { + "$ref": "580" + }, + "value": "usernameRef" + }, + "passwordSecretName": { + "$id": "3108", + "kind": "string", + "type": { + "$ref": "584" + }, + "value": "passwordRef" + } + } + } + } + }, + "provisioningState": { + "$id": "3109", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Succeeded" + } + } + } + } + } + ] + } + } + } + } + ] + } + ] + }, + { + "$id": "3110", + "name": "listBySubscription", + "resourceName": "AssetEndpointProfile", + "doc": "List AssetEndpointProfile resources by subscription ID", + "accessibility": "public", + "parameters": [ + { + "$id": "3111", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "3112", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "3113", + "type": { + "$id": "3114", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2024-11-01" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3115", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "3116", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "3117", + "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": "3118", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "3119", + "kind": "constant", + "valueType": { + "$id": "3120", + "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": "3121", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "658" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "GET", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/providers/Microsoft.DeviceRegistry/assetEndpointProfiles", + "bufferResponse": true, + "paging": { + "$id": "3122", + "itemPropertySegments": [ + "value" + ], + "nextLink": { + "$id": "3123", + "responseSegments": [ + "nextLink" + ], + "responseLocation": "Body" + } + }, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.DeviceRegistry.AssetEndpointProfiles.listBySubscription", + "decorators": [], + "examples": [ + { + "$id": "3124", + "kind": "http", + "name": "List_AssetEndpointProfiles_Subscription", + "description": "List_AssetEndpointProfiles_Subscription", + "filePath": "2024-11-01/List_AssetEndpointProfiles_Subscription.json", + "parameters": [ + { + "$id": "3125", + "parameter": { + "$ref": "3111" + }, + "value": { + "$id": "3126", + "kind": "string", + "type": { + "$ref": "3112" + }, + "value": "2024-11-01" + } + }, + { + "$id": "3127", + "parameter": { + "$ref": "3115" + }, + "value": { + "$id": "3128", + "kind": "string", + "type": { + "$ref": "3116" + }, + "value": "00000000-0000-0000-0000-000000000000" + } + } + ], + "responses": [ + { + "$id": "3129", + "response": { + "$ref": "3121" + }, + "statusCode": 200, + "bodyValue": { + "$id": "3130", + "kind": "model", + "type": { + "$ref": "658" + }, + "value": { + "$id": "3131", + "value": { + "$id": "3132", + "kind": "array", + "type": { + "$ref": "660" + }, + "value": [ + { + "$id": "3133", + "kind": "model", + "type": { + "$ref": "557" + }, + "value": { + "$id": "3134", + "id": { + "$id": "3135", + "kind": "string", + "type": { + "$ref": "163" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.DeviceRegistry/assetEndpointProfiles/my-assetendpointprofile" + }, + "name": { + "$id": "3136", + "kind": "string", + "type": { + "$ref": "168" + }, + "value": "my-assetendpointprofile" + }, + "type": { + "$id": "3137", + "kind": "string", + "type": { + "$ref": "172" + }, + "value": "Microsoft.DeviceRegistry/assetEndpointProfiles" + }, + "location": { + "$id": "3138", + "kind": "string", + "type": { + "$ref": "211" + }, + "value": "West Europe" + }, + "extendedLocation": { + "$id": "3139", + "kind": "model", + "type": { + "$ref": "431" + }, + "value": { + "$id": "3140", + "type": { + "$id": "3141", + "kind": "string", + "type": { + "$ref": "433" + }, + "value": "CustomLocation" + }, + "name": { + "$id": "3142", + "kind": "string", + "type": { + "$ref": "437" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/microsoft.extendedlocation/customlocations/location1" + } + } + }, + "tags": { + "$id": "3143", + "kind": "dict", + "type": { + "$ref": "205" + }, + "value": { + "$id": "3144", + "site": { + "$id": "3145", + "kind": "string", + "type": { + "$ref": "207" + }, + "value": "building-1" + } + } + }, + "systemData": { + "$id": "3146", + "kind": "model", + "type": { + "$ref": "177" + }, + "value": { + "$id": "3147", + "createdBy": { + "$id": "3148", + "kind": "string", + "type": { + "$ref": "179" + }, + "value": "2ta23112-4596-44ff-b773-19405922bfc1" + }, + "createdByType": { + "$id": "3149", + "kind": "string", + "type": { + "$ref": "50" + }, + "value": "Application" + }, + "createdAt": { + "$id": "3150", + "kind": "string", + "type": { + "$ref": "186" + }, + "value": "2022-11-16T00:36:43.2516899Z" + }, + "lastModifiedBy": { + "$id": "3151", + "kind": "string", + "type": { + "$ref": "191" + }, + "value": "2ta23112-4596-44ff-b773-19405922bfc1" + }, + "lastModifiedByType": { + "$id": "3152", + "kind": "string", + "type": { + "$ref": "50" + }, + "value": "Application" + }, + "lastModifiedAt": { + "$id": "3153", + "kind": "string", + "type": { + "$ref": "198" + }, + "value": "2022-11-16T01:37:16.0922793Z" + } + } + }, + "properties": { + "$id": "3154", + "kind": "model", + "type": { + "$ref": "559" + }, + "value": { + "$id": "3155", + "uuid": { + "$id": "3156", + "kind": "string", + "type": { + "$ref": "561" + }, + "value": "0796f7c1-f2c8-44d7-9f5b-9a6f9522a85d" + }, + "targetAddress": { + "$id": "3157", + "kind": "string", + "type": { + "$ref": "565" + }, + "value": "https://www.example.com/myTargetAddress" + }, + "endpointProfileType": { + "$id": "3158", + "kind": "string", + "type": { + "$ref": "569" + }, + "value": "myEndpointProfileType" + }, + "authentication": { + "$id": "3159", + "kind": "model", + "type": { + "$ref": "573" + }, + "value": { + "$id": "3160", + "method": { + "$id": "3161", + "kind": "string", + "type": { + "$ref": "68" + }, + "value": "Anonymous" + } + } + }, + "provisioningState": { + "$id": "3162", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Succeeded" + } + } + } + } + }, + { + "$id": "3163", + "kind": "model", + "type": { + "$ref": "557" + }, + "value": { + "$id": "3164", + "id": { + "$id": "3165", + "kind": "string", + "type": { + "$ref": "163" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.DeviceRegistry/assetEndpointProfiles/my-assetendpointprofile1" + }, + "name": { + "$id": "3166", + "kind": "string", + "type": { + "$ref": "168" + }, + "value": "my-assetendpointprofile1" + }, + "type": { + "$id": "3167", + "kind": "string", + "type": { + "$ref": "172" + }, + "value": "Microsoft.DeviceRegistry/assetEndpointProfiles" + }, + "location": { + "$id": "3168", + "kind": "string", + "type": { + "$ref": "211" + }, + "value": "West Europe" + }, + "extendedLocation": { + "$id": "3169", + "kind": "model", + "type": { + "$ref": "431" + }, + "value": { + "$id": "3170", + "type": { + "$id": "3171", + "kind": "string", + "type": { + "$ref": "433" + }, + "value": "CustomLocation" + }, + "name": { + "$id": "3172", + "kind": "string", + "type": { + "$ref": "437" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/microsoft.extendedlocation/customlocations/location1" + } + } + }, + "tags": { + "$id": "3173", + "kind": "dict", + "type": { + "$ref": "205" + }, + "value": { + "$id": "3174", + "site": { + "$id": "3175", + "kind": "string", + "type": { + "$ref": "207" + }, + "value": "building-2" + } + } + }, + "systemData": { + "$id": "3176", + "kind": "model", + "type": { + "$ref": "177" + }, + "value": { + "$id": "3177", + "createdBy": { + "$id": "3178", + "kind": "string", + "type": { + "$ref": "179" + }, + "value": "2ta23112-4596-44ff-b773-19405922bfc1" + }, + "createdByType": { + "$id": "3179", + "kind": "string", + "type": { + "$ref": "50" + }, + "value": "Application" + }, + "createdAt": { + "$id": "3180", + "kind": "string", + "type": { + "$ref": "186" + }, + "value": "2022-11-16T00:36:43.2516899Z" + }, + "lastModifiedBy": { + "$id": "3181", + "kind": "string", + "type": { + "$ref": "191" + }, + "value": "2ta23112-4596-44ff-b773-19405922bfc1" + }, + "lastModifiedByType": { + "$id": "3182", + "kind": "string", + "type": { + "$ref": "50" + }, + "value": "Application" + }, + "lastModifiedAt": { + "$id": "3183", + "kind": "string", + "type": { + "$ref": "198" + }, + "value": "2022-11-16T01:37:16.0922793Z" + } + } + }, + "properties": { + "$id": "3184", + "kind": "model", + "type": { + "$ref": "559" + }, + "value": { + "$id": "3185", + "uuid": { + "$id": "3186", + "kind": "string", + "type": { + "$ref": "561" + }, + "value": "7824a74f-21e1-4458-ae06-604d3a241d2c" + }, + "targetAddress": { + "$id": "3187", + "kind": "string", + "type": { + "$ref": "565" + }, + "value": "https://www.example.com/myTargetAddress1" + }, + "endpointProfileType": { + "$id": "3188", + "kind": "string", + "type": { + "$ref": "569" + }, + "value": "myEndpointProfileType" + }, + "authentication": { + "$id": "3189", + "kind": "model", + "type": { + "$ref": "573" + }, + "value": { + "$id": "3190", + "method": { + "$id": "3191", + "kind": "string", + "type": { + "$ref": "68" + }, + "value": "Certificate" + }, + "x509Credentials": { + "$id": "3192", + "kind": "model", + "type": { + "$ref": "590" + }, + "value": { + "$id": "3193", + "certificateSecretName": { + "$id": "3194", + "kind": "string", + "type": { + "$ref": "592" + }, + "value": "certificatRef" + } + } + } + } + }, + "provisioningState": { + "$id": "3195", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Succeeded" + } + } + } + } + }, + { + "$id": "3196", + "kind": "model", + "type": { + "$ref": "557" + }, + "value": { + "$id": "3197", + "id": { + "$id": "3198", + "kind": "string", + "type": { + "$ref": "163" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.DeviceRegistry/assetEndpointProfiles/my-assetendpointprofile2" + }, + "name": { + "$id": "3199", + "kind": "string", + "type": { + "$ref": "168" + }, + "value": "my-assetendpointprofile2" + }, + "type": { + "$id": "3200", + "kind": "string", + "type": { + "$ref": "172" + }, + "value": "Microsoft.DeviceRegistry/assetEndpointProfiles" + }, + "location": { + "$id": "3201", + "kind": "string", + "type": { + "$ref": "211" + }, + "value": "West Europe" + }, + "extendedLocation": { + "$id": "3202", + "kind": "model", + "type": { + "$ref": "431" + }, + "value": { + "$id": "3203", + "type": { + "$id": "3204", + "kind": "string", + "type": { + "$ref": "433" + }, + "value": "CustomLocation" + }, + "name": { + "$id": "3205", + "kind": "string", + "type": { + "$ref": "437" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/microsoft.extendedlocation/customlocations/location1" + } + } + }, + "tags": { + "$id": "3206", + "kind": "dict", + "type": { + "$ref": "205" + }, + "value": { + "$id": "3207", + "site": { + "$id": "3208", + "kind": "string", + "type": { + "$ref": "207" + }, + "value": "building-2" + } + } + }, + "systemData": { + "$id": "3209", + "kind": "model", + "type": { + "$ref": "177" + }, + "value": { + "$id": "3210", + "createdBy": { + "$id": "3211", + "kind": "string", + "type": { + "$ref": "179" + }, + "value": "2ta23112-4596-44ff-b773-19405922bfc1" + }, + "createdByType": { + "$id": "3212", + "kind": "string", + "type": { + "$ref": "50" + }, + "value": "Application" + }, + "createdAt": { + "$id": "3213", + "kind": "string", + "type": { + "$ref": "186" + }, + "value": "2022-11-16T00:36:43.2516899Z" + }, + "lastModifiedBy": { + "$id": "3214", + "kind": "string", + "type": { + "$ref": "191" + }, + "value": "2ta23112-4596-44ff-b773-19405922bfc1" + }, + "lastModifiedByType": { + "$id": "3215", + "kind": "string", + "type": { + "$ref": "50" + }, + "value": "Application" + }, + "lastModifiedAt": { + "$id": "3216", + "kind": "string", + "type": { + "$ref": "198" + }, + "value": "2022-11-16T01:37:16.0922793Z" + } + } + }, + "properties": { + "$id": "3217", + "kind": "model", + "type": { + "$ref": "559" + }, + "value": { + "$id": "3218", + "uuid": { + "$id": "3219", + "kind": "string", + "type": { + "$ref": "561" + }, + "value": "1824a74f-21e1-4458-ae07-604d3a241d2e" + }, + "targetAddress": { + "$id": "3220", + "kind": "string", + "type": { + "$ref": "565" + }, + "value": "https://www.example.com/myTargetAddress2" + }, + "endpointProfileType": { + "$id": "3221", + "kind": "string", + "type": { + "$ref": "569" + }, + "value": "myEndpointProfileType" + }, + "authentication": { + "$id": "3222", + "kind": "model", + "type": { + "$ref": "573" + }, + "value": { + "$id": "3223", + "method": { + "$id": "3224", + "kind": "string", + "type": { + "$ref": "68" + }, + "value": "UsernamePassword" + }, + "usernamePasswordCredentials": { + "$id": "3225", + "kind": "model", + "type": { + "$ref": "578" + }, + "value": { + "$id": "3226", + "usernameSecretName": { + "$id": "3227", + "kind": "string", + "type": { + "$ref": "580" + }, + "value": "usernameRef" + }, + "passwordSecretName": { + "$id": "3228", + "kind": "string", + "type": { + "$ref": "584" + }, + "value": "passwordRef" + } + } + } + } + }, + "provisioningState": { + "$id": "3229", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Succeeded" + } + } + } + } + } + ] + } + } + } + } + ] + } + ] + } + ], + "parameters": [ + { + "$id": "3230", + "name": "endpoint", + "nameInRequest": "endpoint", + "doc": "Service host", + "type": { + "$id": "3231", + "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": "3232", + "type": { + "$id": "3233", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "https://management.azure.com" + } + } + ], + "decorators": [ + { + "$id": "3234", + "name": "Azure.ResourceManager.@armResourceOperations", + "arguments": { + "$id": "3235" + } + } + ], + "crossLanguageDefinitionId": "Microsoft.DeviceRegistry.AssetEndpointProfiles", + "apiVersions": [ + "2023-11-01-preview", + "2024-09-01-preview", + "2024-11-01" + ], + "parent": { + "$ref": "692" + } + }, + { + "$id": "3236", + "kind": "client", + "name": "BillingContainers", + "namespace": "Azure.ResourceManager.DeviceRegistry", + "operations": [ + { + "$id": "3237", + "name": "get", + "resourceName": "BillingContainer", + "doc": "Get a BillingContainer", + "accessibility": "public", + "parameters": [ + { + "$id": "3238", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "3239", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "3240", + "type": { + "$id": "3241", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2024-11-01" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3242", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "3243", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "3244", + "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": "3245", + "name": "billingContainerName", + "nameInRequest": "billingContainerName", + "doc": "Name of the billing container.", + "type": { + "$id": "3246", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3247", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "3248", + "kind": "constant", + "valueType": { + "$id": "3249", + "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": "3250", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "668" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "GET", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/providers/Microsoft.DeviceRegistry/billingContainers/{billingContainerName}", + "bufferResponse": true, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.DeviceRegistry.BillingContainers.get", + "decorators": [], + "examples": [ + { + "$id": "3251", + "kind": "http", + "name": "Get_BillingContainer", + "description": "Get_BillingContainer", + "filePath": "2024-11-01/Get_BillingContainer.json", + "parameters": [ + { + "$id": "3252", + "parameter": { + "$ref": "3238" + }, + "value": { + "$id": "3253", + "kind": "string", + "type": { + "$ref": "3239" + }, + "value": "2024-11-01" + } + }, + { + "$id": "3254", + "parameter": { + "$ref": "3242" + }, + "value": { + "$id": "3255", + "kind": "string", + "type": { + "$ref": "3243" + }, + "value": "00000000-0000-0000-0000-000000000000" + } + }, + { + "$id": "3256", + "parameter": { + "$ref": "3245" + }, + "value": { + "$id": "3257", + "kind": "string", + "type": { + "$ref": "3246" + }, + "value": "my-billingContainer" + } + } + ], + "responses": [ + { + "$id": "3258", + "response": { + "$ref": "3250" + }, + "statusCode": 200, + "bodyValue": { + "$id": "3259", + "kind": "model", + "type": { + "$ref": "668" + }, + "value": { + "$id": "3260", + "id": { + "$id": "3261", + "kind": "string", + "type": { + "$ref": "163" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DeviceRegistry/billingContainers/my-billingContainer" + }, + "name": { + "$id": "3262", + "kind": "string", + "type": { + "$ref": "168" + }, + "value": "my-billingContainer" + }, + "type": { + "$id": "3263", + "kind": "string", + "type": { + "$ref": "172" + }, + "value": "Microsoft.DeviceRegistry/billingcontainers" + }, + "etag": { + "$id": "3264", + "kind": "string", + "type": { + "$ref": "678" + }, + "value": "\"00001300-0000-0100-0000-6671f0170000\"" + }, + "systemData": { + "$id": "3265", + "kind": "model", + "type": { + "$ref": "177" + }, + "value": { + "$id": "3266", + "createdBy": { + "$id": "3267", + "kind": "string", + "type": { + "$ref": "179" + }, + "value": "0e1b4448-67b9-46a1-8158-e3dade4c008e" + }, + "createdByType": { + "$id": "3268", + "kind": "string", + "type": { + "$ref": "50" + }, + "value": "Application" + }, + "createdAt": { + "$id": "3269", + "kind": "string", + "type": { + "$ref": "186" + }, + "value": "2024-05-20T21:51:21.169954Z" + }, + "lastModifiedBy": { + "$id": "3270", + "kind": "string", + "type": { + "$ref": "191" + }, + "value": "0e1b4448-67b9-46a1-8158-e3dade4c008e" + }, + "lastModifiedByType": { + "$id": "3271", + "kind": "string", + "type": { + "$ref": "50" + }, + "value": "Application" + }, + "lastModifiedAt": { + "$id": "3272", + "kind": "string", + "type": { + "$ref": "198" + }, + "value": "2024-06-18T20:37:41.9371846Z" + } + } + }, + "properties": { + "$id": "3273", + "kind": "model", + "type": { + "$ref": "671" + }, + "value": { + "$id": "3274", + "provisioningState": { + "$id": "3275", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Succeeded" + } + } + } + } + } + } + ] + } + ] + }, + { + "$id": "3276", + "name": "listBySubscription", + "resourceName": "BillingContainer", + "doc": "List BillingContainer resources by subscription ID", + "accessibility": "public", + "parameters": [ + { + "$id": "3277", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "3278", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "3279", + "type": { + "$id": "3280", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2024-11-01" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3281", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "3282", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "3283", + "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": "3284", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "3285", + "kind": "constant", + "valueType": { + "$id": "3286", + "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": "3287", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "682" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "GET", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/providers/Microsoft.DeviceRegistry/billingContainers", + "bufferResponse": true, + "paging": { + "$id": "3288", + "itemPropertySegments": [ + "value" + ], + "nextLink": { + "$id": "3289", + "responseSegments": [ + "nextLink" + ], + "responseLocation": "Body" + } + }, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.DeviceRegistry.BillingContainers.listBySubscription", + "decorators": [], + "examples": [ + { + "$id": "3290", + "kind": "http", + "name": "List_BillingContainers_Subscription", + "description": "List_BillingContainers_Subscription", + "filePath": "2024-11-01/List_BillingContainers_Subscription.json", + "parameters": [ + { + "$id": "3291", + "parameter": { + "$ref": "3277" + }, + "value": { + "$id": "3292", + "kind": "string", + "type": { + "$ref": "3278" + }, + "value": "2024-11-01" + } + }, + { + "$id": "3293", + "parameter": { + "$ref": "3281" + }, + "value": { + "$id": "3294", + "kind": "string", + "type": { + "$ref": "3282" + }, + "value": "00000000-0000-0000-0000-000000000000" + } + } + ], + "responses": [ + { + "$id": "3295", + "response": { + "$ref": "3287" + }, + "statusCode": 200, + "bodyValue": { + "$id": "3296", + "kind": "model", + "type": { + "$ref": "682" + }, + "value": { + "$id": "3297", + "value": { + "$id": "3298", + "kind": "array", + "type": { + "$ref": "684" + }, + "value": [ + { + "$id": "3299", + "kind": "model", + "type": { + "$ref": "668" + }, + "value": { + "$id": "3300", + "id": { + "$id": "3301", + "kind": "string", + "type": { + "$ref": "163" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DeviceRegistry/billingContainers/my-billingContainer1" + }, + "name": { + "$id": "3302", + "kind": "string", + "type": { + "$ref": "168" + }, + "value": "my-billingContainer1" + }, + "type": { + "$id": "3303", + "kind": "string", + "type": { + "$ref": "172" + }, + "value": "Microsoft.DeviceRegistry/billingcontainers" + }, + "etag": { + "$id": "3304", + "kind": "string", + "type": { + "$ref": "678" + }, + "value": "\"4b036688-0000-0100-0000-6632c7bf0000\"" + }, + "systemData": { + "$id": "3305", + "kind": "model", + "type": { + "$ref": "177" + }, + "value": { + "$id": "3306", + "createdBy": { + "$id": "3307", + "kind": "string", + "type": { + "$ref": "179" + }, + "value": "0e1b4448-67b9-46a1-8158-e3dade4c008e" + }, + "createdByType": { + "$id": "3308", + "kind": "string", + "type": { + "$ref": "50" + }, + "value": "Application" + }, + "createdAt": { + "$id": "3309", + "kind": "string", + "type": { + "$ref": "186" + }, + "value": "2024-05-01T22:52:46.0165055Z" + }, + "lastModifiedBy": { + "$id": "3310", + "kind": "string", + "type": { + "$ref": "191" + }, + "value": "0e1b4448-67b9-46a1-8158-e3dade4c008e" + }, + "lastModifiedByType": { + "$id": "3311", + "kind": "string", + "type": { + "$ref": "50" + }, + "value": "Application" + }, + "lastModifiedAt": { + "$id": "3312", + "kind": "string", + "type": { + "$ref": "198" + }, + "value": "2024-05-01T22:52:46.0165055Z" + } + } + }, + "properties": { + "$id": "3313", + "kind": "model", + "type": { + "$ref": "671" + }, + "value": { + "$id": "3314", + "provisioningState": { + "$id": "3315", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Succeeded" + } + } + } + } + }, + { + "$id": "3316", + "kind": "model", + "type": { + "$ref": "668" + }, + "value": { + "$id": "3317", + "id": { + "$id": "3318", + "kind": "string", + "type": { + "$ref": "163" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DeviceRegistry/billingContainers/my-billingContainer2" + }, + "name": { + "$id": "3319", + "kind": "string", + "type": { + "$ref": "168" + }, + "value": "my-billingContainer2" + }, + "type": { + "$id": "3320", + "kind": "string", + "type": { + "$ref": "172" + }, + "value": "Microsoft.DeviceRegistry/billingcontainers" + }, + "etag": { + "$id": "3321", + "kind": "string", + "type": { + "$ref": "678" + }, + "value": "\"4e03ed61-0000-0100-0000-6632d7200000\"" + }, + "systemData": { + "$id": "3322", + "kind": "model", + "type": { + "$ref": "177" + }, + "value": { + "$id": "3323", + "createdBy": { + "$id": "3324", + "kind": "string", + "type": { + "$ref": "179" + }, + "value": "0e1b4448-67b9-46a1-8158-e3dade4c008e" + }, + "createdByType": { + "$id": "3325", + "kind": "string", + "type": { + "$ref": "50" + }, + "value": "Application" + }, + "createdAt": { + "$id": "3326", + "kind": "string", + "type": { + "$ref": "186" + }, + "value": "2024-05-01T23:58:23.3213061Z" + }, + "lastModifiedBy": { + "$id": "3327", + "kind": "string", + "type": { + "$ref": "191" + }, + "value": "0e1b4448-67b9-46a1-8158-e3dade4c008e" + }, + "lastModifiedByType": { + "$id": "3328", + "kind": "string", + "type": { + "$ref": "50" + }, + "value": "Application" + }, + "lastModifiedAt": { + "$id": "3329", + "kind": "string", + "type": { + "$ref": "198" + }, + "value": "2024-05-01T23:58:23.3213061Z" + } + } + }, + "properties": { + "$id": "3330", + "kind": "model", + "type": { + "$ref": "671" + }, + "value": { + "$id": "3331", + "provisioningState": { + "$id": "3332", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Succeeded" + } + } + } + } + } + ] + } + } + } + } + ] + } + ] + } + ], + "parameters": [ + { + "$id": "3333", + "name": "endpoint", + "nameInRequest": "endpoint", + "doc": "Service host", + "type": { + "$id": "3334", + "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": "3335", + "type": { + "$id": "3336", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "https://management.azure.com" + } + } + ], + "decorators": [ + { + "$id": "3337", + "name": "Azure.ResourceManager.@armResourceOperations", + "arguments": { + "$id": "3338" + } + } + ], + "crossLanguageDefinitionId": "Microsoft.DeviceRegistry.BillingContainers", + "apiVersions": [ + "2024-09-01-preview", + "2024-11-01" + ], + "parent": { + "$ref": "692" + } + } + ] + } + ], + "auth": { + "$id": "3339", + "oAuth2": { + "$id": "3340", + "scopes": [ + "user_impersonation" + ] + } + } +} diff --git a/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/api/Azure.ResourceManager.DevOpsInfrastructure.net8.0.cs b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/api/Azure.ResourceManager.DevOpsInfrastructure.net8.0.cs index 86448afdc637..257cbf40ba48 100644 --- a/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/api/Azure.ResourceManager.DevOpsInfrastructure.net8.0.cs +++ b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/api/Azure.ResourceManager.DevOpsInfrastructure.net8.0.cs @@ -2,6 +2,8 @@ namespace Azure.ResourceManager.DevOpsInfrastructure { public static partial class DevOpsInfrastructureExtensions { + public static Azure.Response CheckNameAvailabilityPool(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.ResourceManager.DevOpsInfrastructure.Models.CheckNameAvailability body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static System.Threading.Tasks.Task> CheckNameAvailabilityPoolAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.ResourceManager.DevOpsInfrastructure.Models.CheckNameAvailability body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.Response GetDevOpsPool(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string poolName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static System.Threading.Tasks.Task> GetDevOpsPoolAsync(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string poolName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.ResourceManager.DevOpsInfrastructure.DevOpsPoolResource GetDevOpsPoolResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } @@ -91,6 +93,8 @@ protected MockableDevOpsInfrastructureResourceGroupResource() { } public partial class MockableDevOpsInfrastructureSubscriptionResource : Azure.ResourceManager.ArmResource { protected MockableDevOpsInfrastructureSubscriptionResource() { } + public virtual Azure.Response CheckNameAvailabilityPool(Azure.ResourceManager.DevOpsInfrastructure.Models.CheckNameAvailability body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CheckNameAvailabilityPoolAsync(Azure.ResourceManager.DevOpsInfrastructure.Models.CheckNameAvailability body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Pageable GetDevOpsPools(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.AsyncPageable GetDevOpsPoolsAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Pageable GetSkusByLocation(string locationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -103,6 +107,7 @@ namespace Azure.ResourceManager.DevOpsInfrastructure.Models { public static partial class ArmDevOpsInfrastructureModelFactory { + public static Azure.ResourceManager.DevOpsInfrastructure.Models.CheckNameAvailabilityResult CheckNameAvailabilityResult(Azure.ResourceManager.DevOpsInfrastructure.Models.AvailabilityStatus available = default(Azure.ResourceManager.DevOpsInfrastructure.Models.AvailabilityStatus), string message = null, string name = null, Azure.ResourceManager.DevOpsInfrastructure.Models.CheckNameAvailabilityReason reason = default(Azure.ResourceManager.DevOpsInfrastructure.Models.CheckNameAvailabilityReason)) { throw null; } public static Azure.ResourceManager.DevOpsInfrastructure.Models.DevOpsImageVersion DevOpsImageVersion(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string imageVersion = null) { throw null; } public static Azure.ResourceManager.DevOpsInfrastructure.DevOpsPoolData DevOpsPoolData(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.DevOpsInfrastructure.Models.DevOpsPoolProperties properties = null, Azure.ResourceManager.Models.ManagedServiceIdentity identity = null) { throw null; } public static Azure.ResourceManager.DevOpsInfrastructure.Models.DevOpsResourceDetails DevOpsResourceDetails(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.DevOpsInfrastructure.Models.DevOpsResourceDetailsProperties properties = null) { throw null; } @@ -128,6 +133,86 @@ protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter write string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct AvailabilityStatus : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public AvailabilityStatus(string value) { throw null; } + public static Azure.ResourceManager.DevOpsInfrastructure.Models.AvailabilityStatus Available { get { throw null; } } + public static Azure.ResourceManager.DevOpsInfrastructure.Models.AvailabilityStatus Unavailable { get { throw null; } } + public bool Equals(Azure.ResourceManager.DevOpsInfrastructure.Models.AvailabilityStatus 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.DevOpsInfrastructure.Models.AvailabilityStatus left, Azure.ResourceManager.DevOpsInfrastructure.Models.AvailabilityStatus right) { throw null; } + public static implicit operator Azure.ResourceManager.DevOpsInfrastructure.Models.AvailabilityStatus (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.DevOpsInfrastructure.Models.AvailabilityStatus left, Azure.ResourceManager.DevOpsInfrastructure.Models.AvailabilityStatus right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct CertificateStoreNameOption : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public CertificateStoreNameOption(string value) { throw null; } + public static Azure.ResourceManager.DevOpsInfrastructure.Models.CertificateStoreNameOption My { get { throw null; } } + public static Azure.ResourceManager.DevOpsInfrastructure.Models.CertificateStoreNameOption Root { get { throw null; } } + public bool Equals(Azure.ResourceManager.DevOpsInfrastructure.Models.CertificateStoreNameOption 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.DevOpsInfrastructure.Models.CertificateStoreNameOption left, Azure.ResourceManager.DevOpsInfrastructure.Models.CertificateStoreNameOption right) { throw null; } + public static implicit operator Azure.ResourceManager.DevOpsInfrastructure.Models.CertificateStoreNameOption (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.DevOpsInfrastructure.Models.CertificateStoreNameOption left, Azure.ResourceManager.DevOpsInfrastructure.Models.CertificateStoreNameOption right) { throw null; } + public override string ToString() { throw null; } + } + public partial class CheckNameAvailability : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public CheckNameAvailability(string name, Azure.ResourceManager.DevOpsInfrastructure.Models.DevOpsInfrastructureResourceType type) { } + public string Name { get { throw null; } } + public Azure.ResourceManager.DevOpsInfrastructure.Models.DevOpsInfrastructureResourceType Type { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DevOpsInfrastructure.Models.CheckNameAvailability System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DevOpsInfrastructure.Models.CheckNameAvailability System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.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 CheckNameAvailabilityReason : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public CheckNameAvailabilityReason(string value) { throw null; } + public static Azure.ResourceManager.DevOpsInfrastructure.Models.CheckNameAvailabilityReason AlreadyExists { get { throw null; } } + public static Azure.ResourceManager.DevOpsInfrastructure.Models.CheckNameAvailabilityReason Invalid { get { throw null; } } + public bool Equals(Azure.ResourceManager.DevOpsInfrastructure.Models.CheckNameAvailabilityReason 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.DevOpsInfrastructure.Models.CheckNameAvailabilityReason left, Azure.ResourceManager.DevOpsInfrastructure.Models.CheckNameAvailabilityReason right) { throw null; } + public static implicit operator Azure.ResourceManager.DevOpsInfrastructure.Models.CheckNameAvailabilityReason (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.DevOpsInfrastructure.Models.CheckNameAvailabilityReason left, Azure.ResourceManager.DevOpsInfrastructure.Models.CheckNameAvailabilityReason right) { throw null; } + public override string ToString() { throw null; } + } + public partial class CheckNameAvailabilityResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal CheckNameAvailabilityResult() { } + public Azure.ResourceManager.DevOpsInfrastructure.Models.AvailabilityStatus Available { get { throw null; } } + public string Message { get { throw null; } } + public string Name { get { throw null; } } + public Azure.ResourceManager.DevOpsInfrastructure.Models.CheckNameAvailabilityReason Reason { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DevOpsInfrastructure.Models.CheckNameAvailabilityResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DevOpsInfrastructure.Models.CheckNameAvailabilityResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class DevOpsAzureOrganizationProfile : Azure.ResourceManager.DevOpsInfrastructure.Models.DevOpsOrganizationProfile, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public DevOpsAzureOrganizationProfile(System.Collections.Generic.IEnumerable organizations) { } @@ -284,6 +369,23 @@ protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter write public override string ToString() { throw null; } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct DevOpsInfrastructureResourceType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public DevOpsInfrastructureResourceType(string value) { throw null; } + public static Azure.ResourceManager.DevOpsInfrastructure.Models.DevOpsInfrastructureResourceType MicrosoftDevOpsInfrastructurePools { get { throw null; } } + public bool Equals(Azure.ResourceManager.DevOpsInfrastructure.Models.DevOpsInfrastructureResourceType 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.DevOpsInfrastructure.Models.DevOpsInfrastructureResourceType left, Azure.ResourceManager.DevOpsInfrastructure.Models.DevOpsInfrastructureResourceType right) { throw null; } + public static implicit operator Azure.ResourceManager.DevOpsInfrastructure.Models.DevOpsInfrastructureResourceType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.DevOpsInfrastructure.Models.DevOpsInfrastructureResourceType left, Azure.ResourceManager.DevOpsInfrastructure.Models.DevOpsInfrastructureResourceType right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct DevOpsLogonType : System.IEquatable { private readonly object _dummy; @@ -304,6 +406,7 @@ protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter write public partial class DevOpsOrganization : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public DevOpsOrganization(System.Uri uri) { } + public bool? OpenAccess { get { throw null; } set { } } public int? Parallelism { get { throw null; } set { } } public System.Collections.Generic.IList Projects { get { throw null; } } public System.Uri Uri { get { throw null; } set { } } @@ -382,6 +485,7 @@ public partial class DevOpsPoolVmImage : System.ClientModel.Primitives.IJsonMode public DevOpsPoolVmImage() { } public System.Collections.Generic.IList Aliases { get { throw null; } } public string Buffer { get { throw null; } set { } } + public Azure.ResourceManager.DevOpsInfrastructure.Models.EphemeralType? EphemeralType { get { throw null; } set { } } public string ResourceId { get { throw null; } set { } } public string WellKnownImageName { get { throw null; } set { } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -568,6 +672,25 @@ protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter write string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct EphemeralType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public EphemeralType(string value) { throw null; } + public static Azure.ResourceManager.DevOpsInfrastructure.Models.EphemeralType Automatic { get { throw null; } } + public static Azure.ResourceManager.DevOpsInfrastructure.Models.EphemeralType CacheDisk { get { throw null; } } + public static Azure.ResourceManager.DevOpsInfrastructure.Models.EphemeralType ResourceDisk { get { throw null; } } + public bool Equals(Azure.ResourceManager.DevOpsInfrastructure.Models.EphemeralType 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.DevOpsInfrastructure.Models.EphemeralType left, Azure.ResourceManager.DevOpsInfrastructure.Models.EphemeralType right) { throw null; } + public static implicit operator Azure.ResourceManager.DevOpsInfrastructure.Models.EphemeralType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.DevOpsInfrastructure.Models.EphemeralType left, Azure.ResourceManager.DevOpsInfrastructure.Models.EphemeralType right) { throw null; } + public override string ToString() { throw null; } + } public partial class ManualResourcePredictionsProfile : Azure.ResourceManager.DevOpsInfrastructure.Models.ResourcePredictionsProfile, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public ManualResourcePredictionsProfile() { } @@ -757,6 +880,7 @@ public partial class SecretsManagementSettings : System.ClientModel.Primitives.I { public SecretsManagementSettings(System.Collections.Generic.IEnumerable observedCertificates, bool keyExportable) { } public string CertificateStoreLocation { get { throw null; } set { } } + public Azure.ResourceManager.DevOpsInfrastructure.Models.CertificateStoreNameOption? CertificateStoreName { get { throw null; } set { } } public bool KeyExportable { get { throw null; } set { } } public System.Collections.Generic.IList ObservedCertificates { get { throw null; } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } diff --git a/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/api/Azure.ResourceManager.DevOpsInfrastructure.netstandard2.0.cs b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/api/Azure.ResourceManager.DevOpsInfrastructure.netstandard2.0.cs index 86448afdc637..257cbf40ba48 100644 --- a/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/api/Azure.ResourceManager.DevOpsInfrastructure.netstandard2.0.cs +++ b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/api/Azure.ResourceManager.DevOpsInfrastructure.netstandard2.0.cs @@ -2,6 +2,8 @@ namespace Azure.ResourceManager.DevOpsInfrastructure { public static partial class DevOpsInfrastructureExtensions { + public static Azure.Response CheckNameAvailabilityPool(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.ResourceManager.DevOpsInfrastructure.Models.CheckNameAvailability body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static System.Threading.Tasks.Task> CheckNameAvailabilityPoolAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.ResourceManager.DevOpsInfrastructure.Models.CheckNameAvailability body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.Response GetDevOpsPool(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string poolName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static System.Threading.Tasks.Task> GetDevOpsPoolAsync(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string poolName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.ResourceManager.DevOpsInfrastructure.DevOpsPoolResource GetDevOpsPoolResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } @@ -91,6 +93,8 @@ protected MockableDevOpsInfrastructureResourceGroupResource() { } public partial class MockableDevOpsInfrastructureSubscriptionResource : Azure.ResourceManager.ArmResource { protected MockableDevOpsInfrastructureSubscriptionResource() { } + public virtual Azure.Response CheckNameAvailabilityPool(Azure.ResourceManager.DevOpsInfrastructure.Models.CheckNameAvailability body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CheckNameAvailabilityPoolAsync(Azure.ResourceManager.DevOpsInfrastructure.Models.CheckNameAvailability body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Pageable GetDevOpsPools(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.AsyncPageable GetDevOpsPoolsAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Pageable GetSkusByLocation(string locationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -103,6 +107,7 @@ namespace Azure.ResourceManager.DevOpsInfrastructure.Models { public static partial class ArmDevOpsInfrastructureModelFactory { + public static Azure.ResourceManager.DevOpsInfrastructure.Models.CheckNameAvailabilityResult CheckNameAvailabilityResult(Azure.ResourceManager.DevOpsInfrastructure.Models.AvailabilityStatus available = default(Azure.ResourceManager.DevOpsInfrastructure.Models.AvailabilityStatus), string message = null, string name = null, Azure.ResourceManager.DevOpsInfrastructure.Models.CheckNameAvailabilityReason reason = default(Azure.ResourceManager.DevOpsInfrastructure.Models.CheckNameAvailabilityReason)) { throw null; } public static Azure.ResourceManager.DevOpsInfrastructure.Models.DevOpsImageVersion DevOpsImageVersion(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string imageVersion = null) { throw null; } public static Azure.ResourceManager.DevOpsInfrastructure.DevOpsPoolData DevOpsPoolData(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.DevOpsInfrastructure.Models.DevOpsPoolProperties properties = null, Azure.ResourceManager.Models.ManagedServiceIdentity identity = null) { throw null; } public static Azure.ResourceManager.DevOpsInfrastructure.Models.DevOpsResourceDetails DevOpsResourceDetails(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.DevOpsInfrastructure.Models.DevOpsResourceDetailsProperties properties = null) { throw null; } @@ -128,6 +133,86 @@ protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter write string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct AvailabilityStatus : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public AvailabilityStatus(string value) { throw null; } + public static Azure.ResourceManager.DevOpsInfrastructure.Models.AvailabilityStatus Available { get { throw null; } } + public static Azure.ResourceManager.DevOpsInfrastructure.Models.AvailabilityStatus Unavailable { get { throw null; } } + public bool Equals(Azure.ResourceManager.DevOpsInfrastructure.Models.AvailabilityStatus 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.DevOpsInfrastructure.Models.AvailabilityStatus left, Azure.ResourceManager.DevOpsInfrastructure.Models.AvailabilityStatus right) { throw null; } + public static implicit operator Azure.ResourceManager.DevOpsInfrastructure.Models.AvailabilityStatus (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.DevOpsInfrastructure.Models.AvailabilityStatus left, Azure.ResourceManager.DevOpsInfrastructure.Models.AvailabilityStatus right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct CertificateStoreNameOption : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public CertificateStoreNameOption(string value) { throw null; } + public static Azure.ResourceManager.DevOpsInfrastructure.Models.CertificateStoreNameOption My { get { throw null; } } + public static Azure.ResourceManager.DevOpsInfrastructure.Models.CertificateStoreNameOption Root { get { throw null; } } + public bool Equals(Azure.ResourceManager.DevOpsInfrastructure.Models.CertificateStoreNameOption 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.DevOpsInfrastructure.Models.CertificateStoreNameOption left, Azure.ResourceManager.DevOpsInfrastructure.Models.CertificateStoreNameOption right) { throw null; } + public static implicit operator Azure.ResourceManager.DevOpsInfrastructure.Models.CertificateStoreNameOption (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.DevOpsInfrastructure.Models.CertificateStoreNameOption left, Azure.ResourceManager.DevOpsInfrastructure.Models.CertificateStoreNameOption right) { throw null; } + public override string ToString() { throw null; } + } + public partial class CheckNameAvailability : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public CheckNameAvailability(string name, Azure.ResourceManager.DevOpsInfrastructure.Models.DevOpsInfrastructureResourceType type) { } + public string Name { get { throw null; } } + public Azure.ResourceManager.DevOpsInfrastructure.Models.DevOpsInfrastructureResourceType Type { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DevOpsInfrastructure.Models.CheckNameAvailability System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DevOpsInfrastructure.Models.CheckNameAvailability System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.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 CheckNameAvailabilityReason : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public CheckNameAvailabilityReason(string value) { throw null; } + public static Azure.ResourceManager.DevOpsInfrastructure.Models.CheckNameAvailabilityReason AlreadyExists { get { throw null; } } + public static Azure.ResourceManager.DevOpsInfrastructure.Models.CheckNameAvailabilityReason Invalid { get { throw null; } } + public bool Equals(Azure.ResourceManager.DevOpsInfrastructure.Models.CheckNameAvailabilityReason 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.DevOpsInfrastructure.Models.CheckNameAvailabilityReason left, Azure.ResourceManager.DevOpsInfrastructure.Models.CheckNameAvailabilityReason right) { throw null; } + public static implicit operator Azure.ResourceManager.DevOpsInfrastructure.Models.CheckNameAvailabilityReason (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.DevOpsInfrastructure.Models.CheckNameAvailabilityReason left, Azure.ResourceManager.DevOpsInfrastructure.Models.CheckNameAvailabilityReason right) { throw null; } + public override string ToString() { throw null; } + } + public partial class CheckNameAvailabilityResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal CheckNameAvailabilityResult() { } + public Azure.ResourceManager.DevOpsInfrastructure.Models.AvailabilityStatus Available { get { throw null; } } + public string Message { get { throw null; } } + public string Name { get { throw null; } } + public Azure.ResourceManager.DevOpsInfrastructure.Models.CheckNameAvailabilityReason Reason { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DevOpsInfrastructure.Models.CheckNameAvailabilityResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DevOpsInfrastructure.Models.CheckNameAvailabilityResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class DevOpsAzureOrganizationProfile : Azure.ResourceManager.DevOpsInfrastructure.Models.DevOpsOrganizationProfile, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public DevOpsAzureOrganizationProfile(System.Collections.Generic.IEnumerable organizations) { } @@ -284,6 +369,23 @@ protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter write public override string ToString() { throw null; } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct DevOpsInfrastructureResourceType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public DevOpsInfrastructureResourceType(string value) { throw null; } + public static Azure.ResourceManager.DevOpsInfrastructure.Models.DevOpsInfrastructureResourceType MicrosoftDevOpsInfrastructurePools { get { throw null; } } + public bool Equals(Azure.ResourceManager.DevOpsInfrastructure.Models.DevOpsInfrastructureResourceType 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.DevOpsInfrastructure.Models.DevOpsInfrastructureResourceType left, Azure.ResourceManager.DevOpsInfrastructure.Models.DevOpsInfrastructureResourceType right) { throw null; } + public static implicit operator Azure.ResourceManager.DevOpsInfrastructure.Models.DevOpsInfrastructureResourceType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.DevOpsInfrastructure.Models.DevOpsInfrastructureResourceType left, Azure.ResourceManager.DevOpsInfrastructure.Models.DevOpsInfrastructureResourceType right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct DevOpsLogonType : System.IEquatable { private readonly object _dummy; @@ -304,6 +406,7 @@ protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter write public partial class DevOpsOrganization : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public DevOpsOrganization(System.Uri uri) { } + public bool? OpenAccess { get { throw null; } set { } } public int? Parallelism { get { throw null; } set { } } public System.Collections.Generic.IList Projects { get { throw null; } } public System.Uri Uri { get { throw null; } set { } } @@ -382,6 +485,7 @@ public partial class DevOpsPoolVmImage : System.ClientModel.Primitives.IJsonMode public DevOpsPoolVmImage() { } public System.Collections.Generic.IList Aliases { get { throw null; } } public string Buffer { get { throw null; } set { } } + public Azure.ResourceManager.DevOpsInfrastructure.Models.EphemeralType? EphemeralType { get { throw null; } set { } } public string ResourceId { get { throw null; } set { } } public string WellKnownImageName { get { throw null; } set { } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -568,6 +672,25 @@ protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter write string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct EphemeralType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public EphemeralType(string value) { throw null; } + public static Azure.ResourceManager.DevOpsInfrastructure.Models.EphemeralType Automatic { get { throw null; } } + public static Azure.ResourceManager.DevOpsInfrastructure.Models.EphemeralType CacheDisk { get { throw null; } } + public static Azure.ResourceManager.DevOpsInfrastructure.Models.EphemeralType ResourceDisk { get { throw null; } } + public bool Equals(Azure.ResourceManager.DevOpsInfrastructure.Models.EphemeralType 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.DevOpsInfrastructure.Models.EphemeralType left, Azure.ResourceManager.DevOpsInfrastructure.Models.EphemeralType right) { throw null; } + public static implicit operator Azure.ResourceManager.DevOpsInfrastructure.Models.EphemeralType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.DevOpsInfrastructure.Models.EphemeralType left, Azure.ResourceManager.DevOpsInfrastructure.Models.EphemeralType right) { throw null; } + public override string ToString() { throw null; } + } public partial class ManualResourcePredictionsProfile : Azure.ResourceManager.DevOpsInfrastructure.Models.ResourcePredictionsProfile, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public ManualResourcePredictionsProfile() { } @@ -757,6 +880,7 @@ public partial class SecretsManagementSettings : System.ClientModel.Primitives.I { public SecretsManagementSettings(System.Collections.Generic.IEnumerable observedCertificates, bool keyExportable) { } public string CertificateStoreLocation { get { throw null; } set { } } + public Azure.ResourceManager.DevOpsInfrastructure.Models.CertificateStoreNameOption? CertificateStoreName { get { throw null; } set { } } public bool KeyExportable { get { throw null; } set { } } public System.Collections.Generic.IList ObservedCertificates { get { throw null; } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } diff --git a/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/samples/Generated/Samples/Sample_DevOpsPoolCollection.cs b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/samples/Generated/Samples/Sample_DevOpsPoolCollection.cs index c380856cbc2a..5a0bb2ef594f 100644 --- a/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/samples/Generated/Samples/Sample_DevOpsPoolCollection.cs +++ b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/samples/Generated/Samples/Sample_DevOpsPoolCollection.cs @@ -21,7 +21,7 @@ public partial class Sample_DevOpsPoolCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_PoolsCreateOrUpdate() { - // Generated from example definition: 2024-10-19/CreateOrUpdatePool.json + // Generated from example definition: 2025-01-21/CreateOrUpdatePool.json // this example is just showing the usage of "Pool_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 @@ -46,13 +46,26 @@ public async Task CreateOrUpdate_PoolsCreateOrUpdate() Properties = new DevOpsPoolProperties(10, new DevOpsAzureOrganizationProfile(new DevOpsOrganization[] { new DevOpsOrganization(new Uri("https://mseng.visualstudio.com")) +{ +OpenAccess = true, +} }), new DevOpsStatelessAgentProfile(), new DevOpsVmssFabricProfile(new DevOpsAzureSku("Standard_D4ads_v5"), new DevOpsPoolVmImage[] { new DevOpsPoolVmImage { ResourceId = "/MicrosoftWindowsServer/WindowsServer/2019-Datacenter/latest", +EphemeralType = EphemeralType.Automatic, } - }), "/subscriptions/222e81d0-cf38-4dab-baa5-289bf16baaa4/resourceGroups/rg-1es-devcenter/providers/Microsoft.DevCenter/projects/1ES") + }) + { + OSProfile = new DevOpsOSProfile + { + SecretsManagementSettings = new SecretsManagementSettings(new Uri[] { new Uri("https://abc.vault.azure.net/secrets/one") }, false) + { + CertificateStoreName = CertificateStoreNameOption.Root, + }, + }, + }, "/subscriptions/222e81d0-cf38-4dab-baa5-289bf16baaa4/resourceGroups/rg-1es-devcenter/providers/Microsoft.DevCenter/projects/1ES") { ProvisioningState = DevOpsInfrastructureProvisioningState.Succeeded, }, @@ -71,7 +84,7 @@ public async Task CreateOrUpdate_PoolsCreateOrUpdate() [Ignore("Only validating compilation of examples")] public async Task Get_PoolsGet() { - // Generated from example definition: 2024-10-19/GetPool.json + // Generated from example definition: 2025-01-21/GetPool.json // this example is just showing the usage of "Pool_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 @@ -104,7 +117,7 @@ public async Task Get_PoolsGet() [Ignore("Only validating compilation of examples")] public async Task GetAll_PoolsListByResourceGroup() { - // Generated from example definition: 2024-10-19/ListPoolsBySubscriptionAndResourceGroup.json + // Generated from example definition: 2025-01-21/ListPoolsBySubscriptionAndResourceGroup.json // this example is just showing the usage of "Pool_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 @@ -139,7 +152,7 @@ public async Task GetAll_PoolsListByResourceGroup() [Ignore("Only validating compilation of examples")] public async Task Exists_PoolsGet() { - // Generated from example definition: 2024-10-19/GetPool.json + // Generated from example definition: 2025-01-21/GetPool.json // this example is just showing the usage of "Pool_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -168,7 +181,7 @@ public async Task Exists_PoolsGet() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_PoolsGet() { - // Generated from example definition: 2024-10-19/GetPool.json + // Generated from example definition: 2025-01-21/GetPool.json // this example is just showing the usage of "Pool_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/samples/Generated/Samples/Sample_DevOpsPoolResource.cs b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/samples/Generated/Samples/Sample_DevOpsPoolResource.cs index a4b685804527..35b6bc86998c 100644 --- a/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/samples/Generated/Samples/Sample_DevOpsPoolResource.cs +++ b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/samples/Generated/Samples/Sample_DevOpsPoolResource.cs @@ -20,7 +20,7 @@ public partial class Sample_DevOpsPoolResource [Ignore("Only validating compilation of examples")] public async Task Get_PoolsGet() { - // Generated from example definition: 2024-10-19/GetPool.json + // Generated from example definition: 2025-01-21/GetPool.json // this example is just showing the usage of "Pool_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -50,7 +50,7 @@ public async Task Get_PoolsGet() [Ignore("Only validating compilation of examples")] public async Task Delete_PoolsDelete() { - // Generated from example definition: 2024-10-19/DeletePool.json + // Generated from example definition: 2025-01-21/DeletePool.json // this example is just showing the usage of "Pool_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -76,7 +76,7 @@ public async Task Delete_PoolsDelete() [Ignore("Only validating compilation of examples")] public async Task Update_PoolsUpdate() { - // Generated from example definition: 2024-10-19/UpdatePool.json + // Generated from example definition: 2025-01-21/UpdatePool.json // this example is just showing the usage of "Pool_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 @@ -108,7 +108,7 @@ public async Task Update_PoolsUpdate() [Ignore("Only validating compilation of examples")] public async Task GetResourceDetails_ResourceDetailsListByPool() { - // Generated from example definition: 2024-10-19/ResourceDetails_ListByPool.json + // Generated from example definition: 2025-01-21/ResourceDetails_ListByPool.json // this example is just showing the usage of "ResourceDetailsObject_ListByPool" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/samples/Generated/Samples/Sample_ResourceGroupResourceExtensions.cs b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/samples/Generated/Samples/Sample_ResourceGroupResourceExtensions.cs index b3f54cb97955..812ebf638b70 100644 --- a/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/samples/Generated/Samples/Sample_ResourceGroupResourceExtensions.cs +++ b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/samples/Generated/Samples/Sample_ResourceGroupResourceExtensions.cs @@ -21,7 +21,7 @@ public partial class Sample_ResourceGroupResourceExtensions [Ignore("Only validating compilation of examples")] public async Task GetImageVersionsByImage_ImageVersionsListByImage() { - // Generated from example definition: 2024-10-19/ImageVersions_ListByImage.json + // Generated from example definition: 2025-01-21/ImageVersions_ListByImage.json // this example is just showing the usage of "ImageVersion_ListByImage" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs index 97546467a4f7..bf121c2d49c4 100644 --- a/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs +++ b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs @@ -21,7 +21,7 @@ public partial class Sample_SubscriptionResourceExtensions [Ignore("Only validating compilation of examples")] public async Task GetDevOpsPools_PoolsListBySubscription() { - // Generated from example definition: 2024-10-19/ListPoolsBySubscription.json + // Generated from example definition: 2025-01-21/ListPoolsBySubscription.json // this example is just showing the usage of "Pool_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 @@ -48,11 +48,36 @@ public async Task GetDevOpsPools_PoolsListBySubscription() Console.WriteLine("Succeeded"); } + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CheckNameAvailabilityPool_PoolsCheckNameAvailability() + { + // Generated from example definition: 2025-01-21/Pools_CheckNameAvailability.json + // this example is just showing the usage of "Pools_CheckNameAvailability" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + 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 = "a2e95d27-c161-4b61-bda4-11512c14c2c2"; + ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); + SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); + + // invoke the operation + CheckNameAvailability body = new CheckNameAvailability("mydevopspool", DevOpsInfrastructureResourceType.MicrosoftDevOpsInfrastructurePools); + CheckNameAvailabilityResult result = await subscriptionResource.CheckNameAvailabilityPoolAsync(body); + + Console.WriteLine($"Succeeded: {result}"); + } + [Test] [Ignore("Only validating compilation of examples")] public async Task GetSkusByLocation_SkuListByLocation() { - // Generated from example definition: 2024-10-19/Sku_ListByLocation.json + // Generated from example definition: 2025-01-21/Sku_ListByLocation.json // this example is just showing the usage of "ResourceSku_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 @@ -80,7 +105,7 @@ public async Task GetSkusByLocation_SkuListByLocation() [Ignore("Only validating compilation of examples")] public async Task GetUsages_SubscriptionUsagesUsages() { - // Generated from example definition: 2024-10-19/SubscriptionUsages_Usages.json + // Generated from example definition: 2025-01-21/SubscriptionUsages_Usages.json // this example is just showing the usage of "SubscriptionUsages_GetUsages" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/ArmDevOpsInfrastructureModelFactory.cs b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/ArmDevOpsInfrastructureModelFactory.cs index d8593cf86ebd..0f025145b05b 100644 --- a/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/ArmDevOpsInfrastructureModelFactory.cs +++ b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/ArmDevOpsInfrastructureModelFactory.cs @@ -42,6 +42,17 @@ public static DevOpsPoolData DevOpsPoolData(ResourceIdentifier id = null, string serializedAdditionalRawData: null); } + /// Initializes a new instance of . + /// Availability status of the name. + /// A message explaining why the name is unavailable. Will be null if the name is available. + /// The name whose availability was checked. + /// The reason code explaining why the name is unavailable. Will be null if the name is available. + /// A new instance for mocking. + public static CheckNameAvailabilityResult CheckNameAvailabilityResult(AvailabilityStatus available = default, string message = null, string name = null, CheckNameAvailabilityReason reason = default) + { + return new CheckNameAvailabilityResult(available, message, name, reason, serializedAdditionalRawData: null); + } + /// Initializes a new instance of . /// The id. /// The name. diff --git a/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/DevOpsPoolCollection.cs b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/DevOpsPoolCollection.cs index 1e2ea411a868..7373fd2c720c 100644 --- a/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/DevOpsPoolCollection.cs +++ b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/DevOpsPoolCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-10-19 + /// 2025-01-21 /// /// /// Resource @@ -114,7 +114,7 @@ public virtual async Task> CreateOrUpdateAsync( /// /// /// Default Api Version - /// 2024-10-19 + /// 2025-01-21 /// /// /// Resource @@ -163,7 +163,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil waitUnt /// /// /// Default Api Version - /// 2024-10-19 + /// 2025-01-21 /// /// /// Resource @@ -208,7 +208,7 @@ public virtual async Task> GetAsync(string poolName /// /// /// Default Api Version - /// 2024-10-19 + /// 2025-01-21 /// /// /// Resource @@ -253,7 +253,7 @@ public virtual Response Get(string poolName, CancellationTok /// /// /// Default Api Version - /// 2024-10-19 + /// 2025-01-21 /// /// /// Resource @@ -283,7 +283,7 @@ public virtual AsyncPageable GetAllAsync(CancellationToken c /// /// /// Default Api Version - /// 2024-10-19 + /// 2025-01-21 /// /// /// Resource @@ -313,7 +313,7 @@ public virtual Pageable GetAll(CancellationToken cancellatio /// /// /// Default Api Version - /// 2024-10-19 + /// 2025-01-21 /// /// /// Resource @@ -356,7 +356,7 @@ public virtual async Task> ExistsAsync(string poolName, Cancellat /// /// /// Default Api Version - /// 2024-10-19 + /// 2025-01-21 /// /// /// Resource @@ -399,7 +399,7 @@ public virtual Response Exists(string poolName, CancellationToken cancella /// /// /// Default Api Version - /// 2024-10-19 + /// 2025-01-21 /// /// /// Resource @@ -444,7 +444,7 @@ public virtual async Task> GetIfExistsAsync /// /// /// Default Api Version - /// 2024-10-19 + /// 2025-01-21 /// /// /// Resource diff --git a/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/DevOpsPoolResource.cs b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/DevOpsPoolResource.cs index a3b6aeebb638..cd7b24c30bf8 100644 --- a/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/DevOpsPoolResource.cs +++ b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/DevOpsPoolResource.cs @@ -108,7 +108,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-10-19 + /// 2025-01-21 /// /// /// Resource @@ -148,7 +148,7 @@ public virtual async Task> GetAsync(CancellationTok /// /// /// Default Api Version - /// 2024-10-19 + /// 2025-01-21 /// /// /// Resource @@ -188,7 +188,7 @@ public virtual Response Get(CancellationToken cancellationTo /// /// /// Default Api Version - /// 2024-10-19 + /// 2025-01-21 /// /// /// Resource @@ -230,7 +230,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2024-10-19 + /// 2025-01-21 /// /// /// Resource @@ -272,7 +272,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2024-10-19 + /// 2025-01-21 /// /// /// Resource @@ -318,7 +318,7 @@ public virtual async Task> UpdateAsync(WaitUnti /// /// /// Default Api Version - /// 2024-10-19 + /// 2025-01-21 /// /// /// Resource @@ -364,7 +364,7 @@ public virtual ArmOperation Update(WaitUntil waitUntil, DevO /// /// /// Default Api Version - /// 2024-10-19 + /// 2025-01-21 /// /// /// @@ -390,7 +390,7 @@ public virtual AsyncPageable GetResourceDetailsAsync(Canc /// /// /// Default Api Version - /// 2024-10-19 + /// 2025-01-21 /// /// /// @@ -416,7 +416,7 @@ public virtual Pageable GetResourceDetails(CancellationTo /// /// /// Default Api Version - /// 2024-10-19 + /// 2025-01-21 /// /// /// Resource @@ -478,7 +478,7 @@ public virtual async Task> AddTagAsync(string key, /// /// /// Default Api Version - /// 2024-10-19 + /// 2025-01-21 /// /// /// Resource @@ -540,7 +540,7 @@ public virtual Response AddTag(string key, string value, Can /// /// /// Default Api Version - /// 2024-10-19 + /// 2025-01-21 /// /// /// Resource @@ -597,7 +597,7 @@ public virtual async Task> SetTagsAsync(IDictionary /// /// /// Default Api Version - /// 2024-10-19 + /// 2025-01-21 /// /// /// Resource @@ -654,7 +654,7 @@ public virtual Response SetTags(IDictionary /// /// /// Default Api Version - /// 2024-10-19 + /// 2025-01-21 /// /// /// Resource @@ -714,7 +714,7 @@ public virtual async Task> RemoveTagAsync(string ke /// /// /// Default Api Version - /// 2024-10-19 + /// 2025-01-21 /// /// /// Resource diff --git a/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Extensions/DevOpsInfrastructureExtensions.cs b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Extensions/DevOpsInfrastructureExtensions.cs index 3e3e44d9dcd3..a85b1cb206f9 100644 --- a/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Extensions/DevOpsInfrastructureExtensions.cs +++ b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Extensions/DevOpsInfrastructureExtensions.cs @@ -82,7 +82,7 @@ public static DevOpsPoolCollection GetDevOpsPools(this ResourceGroupResource res /// /// /// Default Api Version - /// 2024-10-19 + /// 2025-01-21 /// /// /// Resource @@ -120,7 +120,7 @@ public static async Task> GetDevOpsPoolAsync(this R /// /// /// Default Api Version - /// 2024-10-19 + /// 2025-01-21 /// /// /// Resource @@ -158,7 +158,7 @@ public static Response GetDevOpsPool(this ResourceGroupResou /// /// /// Default Api Version - /// 2024-10-19 + /// 2025-01-21 /// /// /// @@ -192,7 +192,7 @@ public static AsyncPageable GetImageVersionsByImageAsync(thi /// /// /// Default Api Version - /// 2024-10-19 + /// 2025-01-21 /// /// /// @@ -226,7 +226,7 @@ public static Pageable GetImageVersionsByImage(this Resource /// /// /// Default Api Version - /// 2024-10-19 + /// 2025-01-21 /// /// /// Resource @@ -262,7 +262,7 @@ public static AsyncPageable GetDevOpsPoolsAsync(this Subscri /// /// /// Default Api Version - /// 2024-10-19 + /// 2025-01-21 /// /// /// Resource @@ -285,6 +285,78 @@ public static Pageable GetDevOpsPools(this SubscriptionResou return GetMockableDevOpsInfrastructureSubscriptionResource(subscriptionResource).GetDevOpsPools(cancellationToken); } + /// + /// Checks that the pool name is valid and is not already in use. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.DevOpsInfrastructure/checkNameAvailability + /// + /// + /// Operation Id + /// Pools_CheckNameAvailability + /// + /// + /// Default Api Version + /// 2025-01-21 + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The CheckAvailability request. + /// The cancellation token to use. + /// or is null. + public static async Task> CheckNameAvailabilityPoolAsync(this SubscriptionResource subscriptionResource, CheckNameAvailability body, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); + + return await GetMockableDevOpsInfrastructureSubscriptionResource(subscriptionResource).CheckNameAvailabilityPoolAsync(body, cancellationToken).ConfigureAwait(false); + } + + /// + /// Checks that the pool name is valid and is not already in use. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.DevOpsInfrastructure/checkNameAvailability + /// + /// + /// Operation Id + /// Pools_CheckNameAvailability + /// + /// + /// Default Api Version + /// 2025-01-21 + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The CheckAvailability request. + /// The cancellation token to use. + /// or is null. + public static Response CheckNameAvailabilityPool(this SubscriptionResource subscriptionResource, CheckNameAvailability body, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); + + return GetMockableDevOpsInfrastructureSubscriptionResource(subscriptionResource).CheckNameAvailabilityPool(body, cancellationToken); + } + /// /// List ResourceSku resources by subscription ID /// @@ -298,7 +370,7 @@ public static Pageable GetDevOpsPools(this SubscriptionResou /// /// /// Default Api Version - /// 2024-10-19 + /// 2025-01-21 /// /// /// @@ -332,7 +404,7 @@ public static AsyncPageable GetSkusByLocationAsync(this Subsc /// /// /// Default Api Version - /// 2024-10-19 + /// 2025-01-21 /// /// /// @@ -366,7 +438,7 @@ public static Pageable GetSkusByLocation(this SubscriptionRes /// /// /// Default Api Version - /// 2024-10-19 + /// 2025-01-21 /// /// /// @@ -399,7 +471,7 @@ public static AsyncPageable GetUsagesAsync(this Subscriptio /// /// /// Default Api Version - /// 2024-10-19 + /// 2025-01-21 /// /// /// diff --git a/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Extensions/MockableDevOpsInfrastructureResourceGroupResource.cs b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Extensions/MockableDevOpsInfrastructureResourceGroupResource.cs index fbfc1fee6226..f5787074c63d 100644 --- a/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Extensions/MockableDevOpsInfrastructureResourceGroupResource.cs +++ b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Extensions/MockableDevOpsInfrastructureResourceGroupResource.cs @@ -62,7 +62,7 @@ public virtual DevOpsPoolCollection GetDevOpsPools() /// /// /// Default Api Version - /// 2024-10-19 + /// 2025-01-21 /// /// /// Resource @@ -93,7 +93,7 @@ public virtual async Task> GetDevOpsPoolAsync(strin /// /// /// Default Api Version - /// 2024-10-19 + /// 2025-01-21 /// /// /// Resource @@ -124,7 +124,7 @@ public virtual Response GetDevOpsPool(string poolName, Cance /// /// /// Default Api Version - /// 2024-10-19 + /// 2025-01-21 /// /// /// @@ -155,7 +155,7 @@ public virtual AsyncPageable GetImageVersionsByImageAsync(st /// /// /// Default Api Version - /// 2024-10-19 + /// 2025-01-21 /// /// /// diff --git a/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Extensions/MockableDevOpsInfrastructureSubscriptionResource.cs b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Extensions/MockableDevOpsInfrastructureSubscriptionResource.cs index 224f919ee0d4..f8f46cdffa0e 100644 --- a/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Extensions/MockableDevOpsInfrastructureSubscriptionResource.cs +++ b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Extensions/MockableDevOpsInfrastructureSubscriptionResource.cs @@ -7,6 +7,7 @@ using System; using System.Threading; +using System.Threading.Tasks; using Autorest.CSharp.Core; using Azure.Core; using Azure.Core.Pipeline; @@ -62,7 +63,7 @@ private string GetApiVersionOrNull(ResourceType resourceType) /// /// /// Default Api Version - /// 2024-10-19 + /// 2025-01-21 /// /// /// Resource @@ -92,7 +93,7 @@ public virtual AsyncPageable GetDevOpsPoolsAsync(Cancellatio /// /// /// Default Api Version - /// 2024-10-19 + /// 2025-01-21 /// /// /// Resource @@ -109,6 +110,90 @@ public virtual Pageable GetDevOpsPools(CancellationToken can return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new DevOpsPoolResource(Client, DevOpsPoolData.DeserializeDevOpsPoolData(e)), DevOpsPoolPoolsClientDiagnostics, Pipeline, "MockableDevOpsInfrastructureSubscriptionResource.GetDevOpsPools", "value", "nextLink", cancellationToken); } + /// + /// Checks that the pool name is valid and is not already in use. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.DevOpsInfrastructure/checkNameAvailability + /// + /// + /// Operation Id + /// Pools_CheckNameAvailability + /// + /// + /// Default Api Version + /// 2025-01-21 + /// + /// + /// Resource + /// + /// + /// + /// + /// The CheckAvailability request. + /// The cancellation token to use. + /// is null. + public virtual async Task> CheckNameAvailabilityPoolAsync(CheckNameAvailability body, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(body, nameof(body)); + + using var scope = DevOpsPoolPoolsClientDiagnostics.CreateScope("MockableDevOpsInfrastructureSubscriptionResource.CheckNameAvailabilityPool"); + scope.Start(); + try + { + var response = await DevOpsPoolPoolsRestClient.CheckNameAvailabilityAsync(Id.SubscriptionId, body, cancellationToken).ConfigureAwait(false); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Checks that the pool name is valid and is not already in use. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.DevOpsInfrastructure/checkNameAvailability + /// + /// + /// Operation Id + /// Pools_CheckNameAvailability + /// + /// + /// Default Api Version + /// 2025-01-21 + /// + /// + /// Resource + /// + /// + /// + /// + /// The CheckAvailability request. + /// The cancellation token to use. + /// is null. + public virtual Response CheckNameAvailabilityPool(CheckNameAvailability body, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(body, nameof(body)); + + using var scope = DevOpsPoolPoolsClientDiagnostics.CreateScope("MockableDevOpsInfrastructureSubscriptionResource.CheckNameAvailabilityPool"); + scope.Start(); + try + { + var response = DevOpsPoolPoolsRestClient.CheckNameAvailability(Id.SubscriptionId, body, cancellationToken); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + /// /// List ResourceSku resources by subscription ID /// @@ -122,7 +207,7 @@ public virtual Pageable GetDevOpsPools(CancellationToken can /// /// /// Default Api Version - /// 2024-10-19 + /// 2025-01-21 /// /// /// @@ -153,7 +238,7 @@ public virtual AsyncPageable GetSkusByLocationAsync(string lo /// /// /// Default Api Version - /// 2024-10-19 + /// 2025-01-21 /// /// /// @@ -184,7 +269,7 @@ public virtual Pageable GetSkusByLocation(string locationName /// /// /// Default Api Version - /// 2024-10-19 + /// 2025-01-21 /// /// /// @@ -211,7 +296,7 @@ public virtual AsyncPageable GetUsagesAsync(AzureLocation l /// /// /// Default Api Version - /// 2024-10-19 + /// 2025-01-21 /// /// /// diff --git a/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/AvailabilityStatus.cs b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/AvailabilityStatus.cs new file mode 100644 index 000000000000..6d18aa34fb56 --- /dev/null +++ b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/AvailabilityStatus.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.DevOpsInfrastructure.Models +{ + /// AvailabilityStatus of a name. + public readonly partial struct AvailabilityStatus : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public AvailabilityStatus(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string AvailableValue = "Available"; + private const string UnavailableValue = "Unavailable"; + + /// The name is available. + public static AvailabilityStatus Available { get; } = new AvailabilityStatus(AvailableValue); + /// The name is unavailable. + public static AvailabilityStatus Unavailable { get; } = new AvailabilityStatus(UnavailableValue); + /// Determines if two values are the same. + public static bool operator ==(AvailabilityStatus left, AvailabilityStatus right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(AvailabilityStatus left, AvailabilityStatus right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator AvailabilityStatus(string value) => new AvailabilityStatus(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is AvailabilityStatus other && Equals(other); + /// + public bool Equals(AvailabilityStatus 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/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/CertificateStoreNameOption.cs b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/CertificateStoreNameOption.cs new file mode 100644 index 000000000000..5027fb886be1 --- /dev/null +++ b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/CertificateStoreNameOption.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.DevOpsInfrastructure.Models +{ + /// The certificate store name type. + public readonly partial struct CertificateStoreNameOption : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public CertificateStoreNameOption(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string MyValue = "My"; + private const string RootValue = "Root"; + + /// The X.509 certificate store for personal certificates. + public static CertificateStoreNameOption My { get; } = new CertificateStoreNameOption(MyValue); + /// The X.509 certificate store for trusted root certificate authorities (CAs). + public static CertificateStoreNameOption Root { get; } = new CertificateStoreNameOption(RootValue); + /// Determines if two values are the same. + public static bool operator ==(CertificateStoreNameOption left, CertificateStoreNameOption right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(CertificateStoreNameOption left, CertificateStoreNameOption right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator CertificateStoreNameOption(string value) => new CertificateStoreNameOption(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is CertificateStoreNameOption other && Equals(other); + /// + public bool Equals(CertificateStoreNameOption 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/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/CheckNameAvailability.Serialization.cs b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/CheckNameAvailability.Serialization.cs new file mode 100644 index 000000000000..f00d4133e584 --- /dev/null +++ b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/CheckNameAvailability.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.DevOpsInfrastructure.Models +{ + public partial class CheckNameAvailability : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(CheckNameAvailability)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + writer.WritePropertyName("type"u8); + writer.WriteStringValue(Type.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 + } + } + } + + CheckNameAvailability IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(CheckNameAvailability)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeCheckNameAvailability(document.RootElement, options); + } + + internal static CheckNameAvailability DeserializeCheckNameAvailability(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string name = default; + DevOpsInfrastructureResourceType 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)) + { + type = new DevOpsInfrastructureResourceType(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new CheckNameAvailability(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(CheckNameAvailability)} does not support writing '{options.Format}' format."); + } + } + + CheckNameAvailability IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeCheckNameAvailability(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(CheckNameAvailability)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/CheckNameAvailability.cs b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/CheckNameAvailability.cs new file mode 100644 index 000000000000..62c886d554e5 --- /dev/null +++ b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/CheckNameAvailability.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.DevOpsInfrastructure.Models +{ + /// The parameters used to check the availability of a resource. + public partial class CheckNameAvailability + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The name of the resource. + /// The type of resource that is used as the scope of the availability check. + /// is null. + public CheckNameAvailability(string name, DevOpsInfrastructureResourceType type) + { + Argument.AssertNotNull(name, nameof(name)); + + Name = name; + Type = type; + } + + /// Initializes a new instance of . + /// The name of the resource. + /// The type of resource that is used as the scope of the availability check. + /// Keeps track of any properties unknown to the library. + internal CheckNameAvailability(string name, DevOpsInfrastructureResourceType type, IDictionary serializedAdditionalRawData) + { + Name = name; + Type = type; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal CheckNameAvailability() + { + } + + /// The name of the resource. + public string Name { get; } + /// The type of resource that is used as the scope of the availability check. + public DevOpsInfrastructureResourceType Type { get; } + } +} diff --git a/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/CheckNameAvailabilityReason.cs b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/CheckNameAvailabilityReason.cs new file mode 100644 index 000000000000..4f0bf5b350a3 --- /dev/null +++ b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/CheckNameAvailabilityReason.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.DevOpsInfrastructure.Models +{ + /// The reason code explaining why the name is unavailable. Will be null if the name is available. + public readonly partial struct CheckNameAvailabilityReason : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public CheckNameAvailabilityReason(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string InvalidValue = "Invalid"; + private const string AlreadyExistsValue = "AlreadyExists"; + + /// The name is invalid. + public static CheckNameAvailabilityReason Invalid { get; } = new CheckNameAvailabilityReason(InvalidValue); + /// The name already exists. + public static CheckNameAvailabilityReason AlreadyExists { get; } = new CheckNameAvailabilityReason(AlreadyExistsValue); + /// Determines if two values are the same. + public static bool operator ==(CheckNameAvailabilityReason left, CheckNameAvailabilityReason right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(CheckNameAvailabilityReason left, CheckNameAvailabilityReason right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator CheckNameAvailabilityReason(string value) => new CheckNameAvailabilityReason(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is CheckNameAvailabilityReason other && Equals(other); + /// + public bool Equals(CheckNameAvailabilityReason 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/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/CheckNameAvailabilityResult.Serialization.cs b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/CheckNameAvailabilityResult.Serialization.cs new file mode 100644 index 000000000000..a357a965bdc6 --- /dev/null +++ b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/CheckNameAvailabilityResult.Serialization.cs @@ -0,0 +1,150 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.DevOpsInfrastructure.Models +{ + public partial class CheckNameAvailabilityResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(CheckNameAvailabilityResult)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("available"u8); + writer.WriteStringValue(Available.ToString()); + writer.WritePropertyName("message"u8); + writer.WriteStringValue(Message); + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + writer.WritePropertyName("reason"u8); + writer.WriteStringValue(Reason.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 + } + } + } + + CheckNameAvailabilityResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(CheckNameAvailabilityResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeCheckNameAvailabilityResult(document.RootElement, options); + } + + internal static CheckNameAvailabilityResult DeserializeCheckNameAvailabilityResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + AvailabilityStatus available = default; + string message = default; + string name = default; + CheckNameAvailabilityReason reason = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("available"u8)) + { + available = new AvailabilityStatus(property.Value.GetString()); + continue; + } + if (property.NameEquals("message"u8)) + { + message = property.Value.GetString(); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("reason"u8)) + { + reason = new CheckNameAvailabilityReason(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new CheckNameAvailabilityResult(available, message, name, reason, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(CheckNameAvailabilityResult)} does not support writing '{options.Format}' format."); + } + } + + CheckNameAvailabilityResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeCheckNameAvailabilityResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(CheckNameAvailabilityResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/CheckNameAvailabilityResult.cs b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/CheckNameAvailabilityResult.cs new file mode 100644 index 000000000000..e41317ea87be --- /dev/null +++ b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/CheckNameAvailabilityResult.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.DevOpsInfrastructure.Models +{ + /// The CheckNameAvailability operation response. + public partial class CheckNameAvailabilityResult + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Availability status of the name. + /// A message explaining why the name is unavailable. Will be null if the name is available. + /// The name whose availability was checked. + /// The reason code explaining why the name is unavailable. Will be null if the name is available. + /// or is null. + internal CheckNameAvailabilityResult(AvailabilityStatus available, string message, string name, CheckNameAvailabilityReason reason) + { + Argument.AssertNotNull(message, nameof(message)); + Argument.AssertNotNull(name, nameof(name)); + + Available = available; + Message = message; + Name = name; + Reason = reason; + } + + /// Initializes a new instance of . + /// Availability status of the name. + /// A message explaining why the name is unavailable. Will be null if the name is available. + /// The name whose availability was checked. + /// The reason code explaining why the name is unavailable. Will be null if the name is available. + /// Keeps track of any properties unknown to the library. + internal CheckNameAvailabilityResult(AvailabilityStatus available, string message, string name, CheckNameAvailabilityReason reason, IDictionary serializedAdditionalRawData) + { + Available = available; + Message = message; + Name = name; + Reason = reason; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal CheckNameAvailabilityResult() + { + } + + /// Availability status of the name. + public AvailabilityStatus Available { get; } + /// A message explaining why the name is unavailable. Will be null if the name is available. + public string Message { get; } + /// The name whose availability was checked. + public string Name { get; } + /// The reason code explaining why the name is unavailable. Will be null if the name is available. + public CheckNameAvailabilityReason Reason { get; } + } +} diff --git a/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/DevOpsInfrastructureResourceType.cs b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/DevOpsInfrastructureResourceType.cs new file mode 100644 index 000000000000..6579f2c59af9 --- /dev/null +++ b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/DevOpsInfrastructureResourceType.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.DevOpsInfrastructure.Models +{ + /// The type of resource. + public readonly partial struct DevOpsInfrastructureResourceType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public DevOpsInfrastructureResourceType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string MicrosoftDevOpsInfrastructurePoolsValue = "Microsoft.DevOpsInfrastructure/pools"; + + /// DevOpsInfrastructure pool resource. + public static DevOpsInfrastructureResourceType MicrosoftDevOpsInfrastructurePools { get; } = new DevOpsInfrastructureResourceType(MicrosoftDevOpsInfrastructurePoolsValue); + /// Determines if two values are the same. + public static bool operator ==(DevOpsInfrastructureResourceType left, DevOpsInfrastructureResourceType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(DevOpsInfrastructureResourceType left, DevOpsInfrastructureResourceType right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator DevOpsInfrastructureResourceType(string value) => new DevOpsInfrastructureResourceType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is DevOpsInfrastructureResourceType other && Equals(other); + /// + public bool Equals(DevOpsInfrastructureResourceType 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/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/DevOpsOrganization.Serialization.cs b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/DevOpsOrganization.Serialization.cs index aabd2cf6a05d..0d06f3329de4 100644 --- a/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/DevOpsOrganization.Serialization.cs +++ b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/DevOpsOrganization.Serialization.cs @@ -51,6 +51,11 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("parallelism"u8); writer.WriteNumberValue(Parallelism.Value); } + if (Optional.IsDefined(OpenAccess)) + { + writer.WritePropertyName("openAccess"u8); + writer.WriteBooleanValue(OpenAccess.Value); + } if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -91,6 +96,7 @@ internal static DevOpsOrganization DeserializeDevOpsOrganization(JsonElement ele Uri url = default; IList projects = default; int? parallelism = default; + bool? openAccess = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -123,13 +129,22 @@ internal static DevOpsOrganization DeserializeDevOpsOrganization(JsonElement ele parallelism = property.Value.GetInt32(); continue; } + if (property.NameEquals("openAccess"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + openAccess = property.Value.GetBoolean(); + continue; + } if (options.Format != "W") { rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); } } serializedAdditionalRawData = rawDataDictionary; - return new DevOpsOrganization(url, projects ?? new ChangeTrackingList(), parallelism, serializedAdditionalRawData); + return new DevOpsOrganization(url, projects ?? new ChangeTrackingList(), parallelism, openAccess, serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/DevOpsOrganization.cs b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/DevOpsOrganization.cs index c811965dd068..0452f359220f 100644 --- a/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/DevOpsOrganization.cs +++ b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/DevOpsOrganization.cs @@ -60,12 +60,14 @@ public DevOpsOrganization(Uri uri) /// The Azure DevOps organization URL in which the pool should be created. /// Optional list of projects in which the pool should be created. /// How many machines can be created at maximum in this organization out of the maximumConcurrency of the pool. + /// Determines if the pool should have open access to all projects in this organization. /// Keeps track of any properties unknown to the library. - internal DevOpsOrganization(Uri uri, IList projects, int? parallelism, IDictionary serializedAdditionalRawData) + internal DevOpsOrganization(Uri uri, IList projects, int? parallelism, bool? openAccess, IDictionary serializedAdditionalRawData) { Uri = uri; Projects = projects; Parallelism = parallelism; + OpenAccess = openAccess; _serializedAdditionalRawData = serializedAdditionalRawData; } @@ -80,5 +82,7 @@ internal DevOpsOrganization() public IList Projects { get; } /// How many machines can be created at maximum in this organization out of the maximumConcurrency of the pool. public int? Parallelism { get; set; } + /// Determines if the pool should have open access to all projects in this organization. + public bool? OpenAccess { get; set; } } } diff --git a/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/DevOpsPoolVmImage.Serialization.cs b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/DevOpsPoolVmImage.Serialization.cs index 1f84860918c6..61762405bf17 100644 --- a/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/DevOpsPoolVmImage.Serialization.cs +++ b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/DevOpsPoolVmImage.Serialization.cs @@ -59,6 +59,11 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("buffer"u8); writer.WriteStringValue(Buffer); } + if (Optional.IsDefined(EphemeralType)) + { + writer.WritePropertyName("ephemeralType"u8); + writer.WriteStringValue(EphemeralType.Value.ToString()); + } if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -100,6 +105,7 @@ internal static DevOpsPoolVmImage DeserializeDevOpsPoolVmImage(JsonElement eleme string wellKnownImageName = default; IList aliases = default; string buffer = default; + EphemeralType? ephemeralType = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -133,13 +139,28 @@ internal static DevOpsPoolVmImage DeserializeDevOpsPoolVmImage(JsonElement eleme buffer = property.Value.GetString(); continue; } + if (property.NameEquals("ephemeralType"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + ephemeralType = new EphemeralType(property.Value.GetString()); + continue; + } if (options.Format != "W") { rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); } } serializedAdditionalRawData = rawDataDictionary; - return new DevOpsPoolVmImage(resourceId, wellKnownImageName, aliases ?? new ChangeTrackingList(), buffer, serializedAdditionalRawData); + return new DevOpsPoolVmImage( + resourceId, + wellKnownImageName, + aliases ?? new ChangeTrackingList(), + buffer, + ephemeralType, + serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/DevOpsPoolVmImage.cs b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/DevOpsPoolVmImage.cs index 62da13c18c4e..e14eee5a9b74 100644 --- a/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/DevOpsPoolVmImage.cs +++ b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/DevOpsPoolVmImage.cs @@ -56,13 +56,15 @@ public DevOpsPoolVmImage() /// The image to use from a well-known set of images made available to customers. /// List of aliases to reference the image by. /// The percentage of the buffer to be allocated to this image. + /// The ephemeral type of the image. /// Keeps track of any properties unknown to the library. - internal DevOpsPoolVmImage(string resourceId, string wellKnownImageName, IList aliases, string buffer, IDictionary serializedAdditionalRawData) + internal DevOpsPoolVmImage(string resourceId, string wellKnownImageName, IList aliases, string buffer, EphemeralType? ephemeralType, IDictionary serializedAdditionalRawData) { ResourceId = resourceId; WellKnownImageName = wellKnownImageName; Aliases = aliases; Buffer = buffer; + EphemeralType = ephemeralType; _serializedAdditionalRawData = serializedAdditionalRawData; } @@ -74,5 +76,7 @@ internal DevOpsPoolVmImage(string resourceId, string wellKnownImageName, IList Aliases { get; } /// The percentage of the buffer to be allocated to this image. public string Buffer { get; set; } + /// The ephemeral type of the image. + public EphemeralType? EphemeralType { get; set; } } } diff --git a/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/EphemeralType.cs b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/EphemeralType.cs new file mode 100644 index 000000000000..22740c036b08 --- /dev/null +++ b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/EphemeralType.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.DevOpsInfrastructure.Models +{ + /// The type of Ephemeral option the pool will use on underlying VMs when loading this image. + public readonly partial struct EphemeralType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public EphemeralType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string AutomaticValue = "Automatic"; + private const string CacheDiskValue = "CacheDisk"; + private const string ResourceDiskValue = "ResourceDisk"; + + /// Ephemeral is handled by Managed DevOps Pools service. + public static EphemeralType Automatic { get; } = new EphemeralType(AutomaticValue); + /// CacheDisk ephemeral only, requires that the SKU has a cache that is large enough for the image. + public static EphemeralType CacheDisk { get; } = new EphemeralType(CacheDiskValue); + /// ResourceDisk ephemeral only, requires only that the SKU supports it. + public static EphemeralType ResourceDisk { get; } = new EphemeralType(ResourceDiskValue); + /// Determines if two values are the same. + public static bool operator ==(EphemeralType left, EphemeralType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(EphemeralType left, EphemeralType right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator EphemeralType(string value) => new EphemeralType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is EphemeralType other && Equals(other); + /// + public bool Equals(EphemeralType 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/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/SecretsManagementSettings.Serialization.cs b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/SecretsManagementSettings.Serialization.cs index bd5d5f47e10c..ca35268ecdcb 100644 --- a/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/SecretsManagementSettings.Serialization.cs +++ b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/SecretsManagementSettings.Serialization.cs @@ -39,6 +39,11 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("certificateStoreLocation"u8); writer.WriteStringValue(CertificateStoreLocation); } + if (Optional.IsDefined(CertificateStoreName)) + { + writer.WritePropertyName("certificateStoreName"u8); + writer.WriteStringValue(CertificateStoreName.Value.ToString()); + } writer.WritePropertyName("observedCertificates"u8); writer.WriteStartArray(); foreach (var item in ObservedCertificates) @@ -91,6 +96,7 @@ internal static SecretsManagementSettings DeserializeSecretsManagementSettings(J return null; } string certificateStoreLocation = default; + CertificateStoreNameOption? certificateStoreName = default; IList observedCertificates = default; bool keyExportable = default; IDictionary serializedAdditionalRawData = default; @@ -102,6 +108,15 @@ internal static SecretsManagementSettings DeserializeSecretsManagementSettings(J certificateStoreLocation = property.Value.GetString(); continue; } + if (property.NameEquals("certificateStoreName"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + certificateStoreName = new CertificateStoreNameOption(property.Value.GetString()); + continue; + } if (property.NameEquals("observedCertificates"u8)) { List array = new List(); @@ -130,7 +145,7 @@ internal static SecretsManagementSettings DeserializeSecretsManagementSettings(J } } serializedAdditionalRawData = rawDataDictionary; - return new SecretsManagementSettings(certificateStoreLocation, observedCertificates, keyExportable, serializedAdditionalRawData); + return new SecretsManagementSettings(certificateStoreLocation, certificateStoreName, observedCertificates, keyExportable, serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/SecretsManagementSettings.cs b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/SecretsManagementSettings.cs index 7abbf15aff0d..31ab5987c6dd 100644 --- a/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/SecretsManagementSettings.cs +++ b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/SecretsManagementSettings.cs @@ -60,12 +60,14 @@ public SecretsManagementSettings(IEnumerable observedCertificates, bool key /// Initializes a new instance of . /// Where to store certificates on the machine. + /// Name of the certificate store to use on the machine, currently 'My' and 'Root' are supported. /// The list of certificates to install on all machines in the pool. /// Defines if the key of the certificates should be exportable. /// Keeps track of any properties unknown to the library. - internal SecretsManagementSettings(string certificateStoreLocation, IList observedCertificates, bool keyExportable, IDictionary serializedAdditionalRawData) + internal SecretsManagementSettings(string certificateStoreLocation, CertificateStoreNameOption? certificateStoreName, IList observedCertificates, bool keyExportable, IDictionary serializedAdditionalRawData) { CertificateStoreLocation = certificateStoreLocation; + CertificateStoreName = certificateStoreName; ObservedCertificates = observedCertificates; KeyExportable = keyExportable; _serializedAdditionalRawData = serializedAdditionalRawData; @@ -78,6 +80,8 @@ internal SecretsManagementSettings() /// Where to store certificates on the machine. public string CertificateStoreLocation { get; set; } + /// Name of the certificate store to use on the machine, currently 'My' and 'Root' are supported. + public CertificateStoreNameOption? CertificateStoreName { get; set; } /// The list of certificates to install on all machines in the pool. public IList ObservedCertificates { get; } /// Defines if the key of the certificates should be exportable. diff --git a/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/RestOperations/ImageVersionsRestOperations.cs b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/RestOperations/ImageVersionsRestOperations.cs index 68af6e66f25a..0cb680e70a45 100644 --- a/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/RestOperations/ImageVersionsRestOperations.cs +++ b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/RestOperations/ImageVersionsRestOperations.cs @@ -32,7 +32,7 @@ public ImageVersionsRestOperations(HttpPipeline pipeline, string applicationId, { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-10-19"; + _apiVersion = apiVersion ?? "2025-01-21"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/RestOperations/PoolsRestOperations.cs b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/RestOperations/PoolsRestOperations.cs index b50f8d102b20..42857c721ccb 100644 --- a/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/RestOperations/PoolsRestOperations.cs +++ b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/RestOperations/PoolsRestOperations.cs @@ -32,7 +32,7 @@ public PoolsRestOperations(HttpPipeline pipeline, string applicationId, Uri endp { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-10-19"; + _apiVersion = apiVersion ?? "2025-01-21"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -564,6 +564,92 @@ public Response ListBySubscription(string subscriptionId, Cancel } } + internal RequestUriBuilder CreateCheckNameAvailabilityRequestUri(string subscriptionId, CheckNameAvailability body) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Microsoft.DevOpsInfrastructure/checkNameAvailability", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateCheckNameAvailabilityRequest(string subscriptionId, CheckNameAvailability 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/Microsoft.DevOpsInfrastructure/checkNameAvailability", 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; + } + + /// Checks that the pool name is valid and is not already in use. + /// The ID of the target subscription. The value must be an UUID. + /// The CheckAvailability request. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + public async Task> CheckNameAvailabilityAsync(string subscriptionId, CheckNameAvailability body, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNull(body, nameof(body)); + + using var message = CreateCheckNameAvailabilityRequest(subscriptionId, body); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + CheckNameAvailabilityResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = CheckNameAvailabilityResult.DeserializeCheckNameAvailabilityResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Checks that the pool name is valid and is not already in use. + /// The ID of the target subscription. The value must be an UUID. + /// The CheckAvailability request. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + public Response CheckNameAvailability(string subscriptionId, CheckNameAvailability body, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNull(body, nameof(body)); + + using var message = CreateCheckNameAvailabilityRequest(subscriptionId, body); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + CheckNameAvailabilityResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = CheckNameAvailabilityResult.DeserializeCheckNameAvailabilityResult(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/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/RestOperations/ResourceDetailsRestOperations.cs b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/RestOperations/ResourceDetailsRestOperations.cs index 51091db7457a..64f23016f63a 100644 --- a/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/RestOperations/ResourceDetailsRestOperations.cs +++ b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/RestOperations/ResourceDetailsRestOperations.cs @@ -32,7 +32,7 @@ public ResourceDetailsRestOperations(HttpPipeline pipeline, string applicationId { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-10-19"; + _apiVersion = apiVersion ?? "2025-01-21"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/RestOperations/SkuRestOperations.cs b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/RestOperations/SkuRestOperations.cs index 5b7df3569c4c..11c6821a411e 100644 --- a/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/RestOperations/SkuRestOperations.cs +++ b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/RestOperations/SkuRestOperations.cs @@ -32,7 +32,7 @@ public SkuRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoi { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-10-19"; + _apiVersion = apiVersion ?? "2025-01-21"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/RestOperations/SubscriptionUsagesRestOperations.cs b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/RestOperations/SubscriptionUsagesRestOperations.cs index 86477371a6eb..afa21c7a0870 100644 --- a/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/RestOperations/SubscriptionUsagesRestOperations.cs +++ b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/RestOperations/SubscriptionUsagesRestOperations.cs @@ -32,7 +32,7 @@ public SubscriptionUsagesRestOperations(HttpPipeline pipeline, string applicatio { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-10-19"; + _apiVersion = apiVersion ?? "2025-01-21"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/tsp-location.yaml b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/tsp-location.yaml index 5a21266de9ea..e4eaf041c577 100644 --- a/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/tsp-location.yaml +++ b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/tsp-location.yaml @@ -1,3 +1,4 @@ -directory: specification/devopsinfrastructure -commit: ee39ef4ad91a08dae2ddf47ea4de1176bc24ecc7 -repo: Azure/azure-rest-api-specs \ No newline at end of file +directory: specification/devopsinfrastructure/Microsoft.DevOpsInfrastructure.Management +commit: 6e702986ee542ebd38d0ab2e2f2c00ab48a50b45 +repo: Azure/azure-rest-api-specs +additionalDirectories: diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AppConfigurationKeyValueDeletedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AppConfigurationKeyValueDeletedEventData.Serialization.cs index 3d95b902797b..8348d264b024 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AppConfigurationKeyValueDeletedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AppConfigurationKeyValueDeletedEventData.Serialization.cs @@ -34,26 +34,14 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(AppConfigurationKeyValueDeletedEventData)} does not support writing '{format}' format."); } - if (Optional.IsDefined(Key)) - { - writer.WritePropertyName("key"u8); - writer.WriteStringValue(Key); - } - if (Optional.IsDefined(Label)) - { - writer.WritePropertyName("label"u8); - writer.WriteStringValue(Label); - } - if (Optional.IsDefined(Etag)) - { - writer.WritePropertyName("etag"u8); - writer.WriteStringValue(Etag); - } - if (Optional.IsDefined(SyncToken)) - { - writer.WritePropertyName("syncToken"u8); - writer.WriteStringValue(SyncToken); - } + writer.WritePropertyName("key"u8); + writer.WriteStringValue(Key); + writer.WritePropertyName("label"u8); + writer.WriteStringValue(Label); + writer.WritePropertyName("etag"u8); + writer.WriteStringValue(Etag); + writer.WritePropertyName("syncToken"u8); + writer.WriteStringValue(SyncToken); if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AppConfigurationKeyValueDeletedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AppConfigurationKeyValueDeletedEventData.cs index b920a0b33dd2..7a4cf1ce7212 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AppConfigurationKeyValueDeletedEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AppConfigurationKeyValueDeletedEventData.cs @@ -46,8 +46,22 @@ public partial class AppConfigurationKeyValueDeletedEventData private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - internal AppConfigurationKeyValueDeletedEventData() + /// The key used to identify the key-value that was deleted. + /// The label, if any, used to identify the key-value that was deleted. + /// The etag representing the key-value that was deleted. + /// The sync token representing the server state after the event. + /// , , or is null. + internal AppConfigurationKeyValueDeletedEventData(string key, string label, string etag, string syncToken) { + Argument.AssertNotNull(key, nameof(key)); + Argument.AssertNotNull(label, nameof(label)); + Argument.AssertNotNull(etag, nameof(etag)); + Argument.AssertNotNull(syncToken, nameof(syncToken)); + + Key = key; + Label = label; + Etag = etag; + SyncToken = syncToken; } /// Initializes a new instance of . @@ -65,6 +79,11 @@ internal AppConfigurationKeyValueDeletedEventData(string key, string label, stri _serializedAdditionalRawData = serializedAdditionalRawData; } + /// Initializes a new instance of for deserialization. + internal AppConfigurationKeyValueDeletedEventData() + { + } + /// The key used to identify the key-value that was deleted. public string Key { get; } /// The label, if any, used to identify the key-value that was deleted. diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AppConfigurationKeyValueModifiedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AppConfigurationKeyValueModifiedEventData.Serialization.cs index e33caff65a77..86478e6dd36d 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AppConfigurationKeyValueModifiedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AppConfigurationKeyValueModifiedEventData.Serialization.cs @@ -34,26 +34,21 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(AppConfigurationKeyValueModifiedEventData)} does not support writing '{format}' format."); } - if (Optional.IsDefined(Key)) - { - writer.WritePropertyName("key"u8); - writer.WriteStringValue(Key); - } - if (Optional.IsDefined(Label)) + writer.WritePropertyName("key"u8); + writer.WriteStringValue(Key); + if (Label != null) { writer.WritePropertyName("label"u8); writer.WriteStringValue(Label); } - if (Optional.IsDefined(Etag)) - { - writer.WritePropertyName("etag"u8); - writer.WriteStringValue(Etag); - } - if (Optional.IsDefined(SyncToken)) + else { - writer.WritePropertyName("syncToken"u8); - writer.WriteStringValue(SyncToken); + writer.WriteNull("label"); } + writer.WritePropertyName("etag"u8); + writer.WriteStringValue(Etag); + writer.WritePropertyName("syncToken"u8); + writer.WriteStringValue(SyncToken); if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -106,6 +101,11 @@ internal static AppConfigurationKeyValueModifiedEventData DeserializeAppConfigur } if (property.NameEquals("label"u8)) { + if (property.Value.ValueKind == JsonValueKind.Null) + { + label = null; + continue; + } label = property.Value.GetString(); continue; } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AppConfigurationKeyValueModifiedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AppConfigurationKeyValueModifiedEventData.cs index e03cb8ded63b..1dcc27c11d46 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AppConfigurationKeyValueModifiedEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AppConfigurationKeyValueModifiedEventData.cs @@ -46,8 +46,21 @@ public partial class AppConfigurationKeyValueModifiedEventData private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - internal AppConfigurationKeyValueModifiedEventData() + /// The key used to identify the key-value that was modified. + /// The label, if any, used to identify the key-value that was modified. + /// The etag representing the new state of the key-value. + /// The sync token representing the server state after the event. + /// , or is null. + internal AppConfigurationKeyValueModifiedEventData(string key, string label, string etag, string syncToken) { + Argument.AssertNotNull(key, nameof(key)); + Argument.AssertNotNull(etag, nameof(etag)); + Argument.AssertNotNull(syncToken, nameof(syncToken)); + + Key = key; + Label = label; + Etag = etag; + SyncToken = syncToken; } /// Initializes a new instance of . @@ -65,6 +78,11 @@ internal AppConfigurationKeyValueModifiedEventData(string key, string label, str _serializedAdditionalRawData = serializedAdditionalRawData; } + /// Initializes a new instance of for deserialization. + internal AppConfigurationKeyValueModifiedEventData() + { + } + /// The key used to identify the key-value that was modified. public string Key { get; } /// The label, if any, used to identify the key-value that was modified. diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AppConfigurationSnapshotCreatedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AppConfigurationSnapshotCreatedEventData.cs index 319beef466ce..d5d7832fa69b 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AppConfigurationSnapshotCreatedEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AppConfigurationSnapshotCreatedEventData.cs @@ -14,8 +14,15 @@ namespace Azure.Messaging.EventGrid.SystemEvents public partial class AppConfigurationSnapshotCreatedEventData : AppConfigurationSnapshotEventData { /// Initializes a new instance of . - internal AppConfigurationSnapshotCreatedEventData() + /// The name of the snapshot. + /// The etag representing the new state of the snapshot. + /// The sync token representing the server state after the event. + /// , or is null. + internal AppConfigurationSnapshotCreatedEventData(string name, string etag, string syncToken) : base(name, etag, syncToken) { + Argument.AssertNotNull(name, nameof(name)); + Argument.AssertNotNull(etag, nameof(etag)); + Argument.AssertNotNull(syncToken, nameof(syncToken)); } /// Initializes a new instance of . @@ -26,5 +33,10 @@ internal AppConfigurationSnapshotCreatedEventData() internal AppConfigurationSnapshotCreatedEventData(string name, string etag, string syncToken, IDictionary serializedAdditionalRawData) : base(name, etag, syncToken, serializedAdditionalRawData) { } + + /// Initializes a new instance of for deserialization. + internal AppConfigurationSnapshotCreatedEventData() + { + } } } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AppConfigurationSnapshotEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AppConfigurationSnapshotEventData.Serialization.cs index 3d5566107a39..672a2002ad54 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AppConfigurationSnapshotEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AppConfigurationSnapshotEventData.Serialization.cs @@ -34,21 +34,12 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(AppConfigurationSnapshotEventData)} does not support writing '{format}' format."); } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (Optional.IsDefined(Etag)) - { - writer.WritePropertyName("etag"u8); - writer.WriteStringValue(Etag); - } - if (Optional.IsDefined(SyncToken)) - { - writer.WritePropertyName("syncToken"u8); - writer.WriteStringValue(SyncToken); - } + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + writer.WritePropertyName("etag"u8); + writer.WriteStringValue(Etag); + writer.WritePropertyName("syncToken"u8); + writer.WriteStringValue(SyncToken); if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AppConfigurationSnapshotEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AppConfigurationSnapshotEventData.cs index a64d0e66a4fc..43c5283bd828 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AppConfigurationSnapshotEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AppConfigurationSnapshotEventData.cs @@ -46,8 +46,19 @@ public partial class AppConfigurationSnapshotEventData private protected IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - internal AppConfigurationSnapshotEventData() + /// The name of the snapshot. + /// The etag representing the new state of the snapshot. + /// The sync token representing the server state after the event. + /// , or is null. + internal AppConfigurationSnapshotEventData(string name, string etag, string syncToken) { + Argument.AssertNotNull(name, nameof(name)); + Argument.AssertNotNull(etag, nameof(etag)); + Argument.AssertNotNull(syncToken, nameof(syncToken)); + + Name = name; + Etag = etag; + SyncToken = syncToken; } /// Initializes a new instance of . @@ -63,6 +74,11 @@ internal AppConfigurationSnapshotEventData(string name, string etag, string sync _serializedAdditionalRawData = serializedAdditionalRawData; } + /// Initializes a new instance of for deserialization. + internal AppConfigurationSnapshotEventData() + { + } + /// The name of the snapshot. public string Name { get; } /// The etag representing the new state of the snapshot. diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AppConfigurationSnapshotModifiedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AppConfigurationSnapshotModifiedEventData.cs index cd89dfdb11d1..b2164f525aa9 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AppConfigurationSnapshotModifiedEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AppConfigurationSnapshotModifiedEventData.cs @@ -14,8 +14,15 @@ namespace Azure.Messaging.EventGrid.SystemEvents public partial class AppConfigurationSnapshotModifiedEventData : AppConfigurationSnapshotEventData { /// Initializes a new instance of . - internal AppConfigurationSnapshotModifiedEventData() + /// The name of the snapshot. + /// The etag representing the new state of the snapshot. + /// The sync token representing the server state after the event. + /// , or is null. + internal AppConfigurationSnapshotModifiedEventData(string name, string etag, string syncToken) : base(name, etag, syncToken) { + Argument.AssertNotNull(name, nameof(name)); + Argument.AssertNotNull(etag, nameof(etag)); + Argument.AssertNotNull(syncToken, nameof(syncToken)); } /// Initializes a new instance of . @@ -26,5 +33,10 @@ internal AppConfigurationSnapshotModifiedEventData() internal AppConfigurationSnapshotModifiedEventData(string name, string etag, string syncToken, IDictionary serializedAdditionalRawData) : base(name, etag, syncToken, serializedAdditionalRawData) { } + + /// Initializes a new instance of for deserialization. + internal AppConfigurationSnapshotModifiedEventData() + { + } } } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerServiceClusterSupportEndedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerServiceClusterSupportEndedEventData.cs index 66ed2b8c4b62..ef80f3e0864a 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerServiceClusterSupportEndedEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerServiceClusterSupportEndedEventData.cs @@ -14,8 +14,11 @@ namespace Azure.Messaging.EventGrid.SystemEvents public partial class ContainerServiceClusterSupportEndedEventData : ContainerServiceClusterSupportEventData { /// Initializes a new instance of . - internal ContainerServiceClusterSupportEndedEventData() + /// The Kubernetes version of the ManagedCluster resource. + /// is null. + internal ContainerServiceClusterSupportEndedEventData(string kubernetesVersion) : base(kubernetesVersion) { + Argument.AssertNotNull(kubernetesVersion, nameof(kubernetesVersion)); } /// Initializes a new instance of . @@ -24,5 +27,10 @@ internal ContainerServiceClusterSupportEndedEventData() internal ContainerServiceClusterSupportEndedEventData(string kubernetesVersion, IDictionary serializedAdditionalRawData) : base(kubernetesVersion, serializedAdditionalRawData) { } + + /// Initializes a new instance of for deserialization. + internal ContainerServiceClusterSupportEndedEventData() + { + } } } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerServiceClusterSupportEndingEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerServiceClusterSupportEndingEventData.cs index 0a3fa362492c..ea696b7348fe 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerServiceClusterSupportEndingEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerServiceClusterSupportEndingEventData.cs @@ -14,8 +14,11 @@ namespace Azure.Messaging.EventGrid.SystemEvents public partial class ContainerServiceClusterSupportEndingEventData : ContainerServiceClusterSupportEventData { /// Initializes a new instance of . - internal ContainerServiceClusterSupportEndingEventData() + /// The Kubernetes version of the ManagedCluster resource. + /// is null. + internal ContainerServiceClusterSupportEndingEventData(string kubernetesVersion) : base(kubernetesVersion) { + Argument.AssertNotNull(kubernetesVersion, nameof(kubernetesVersion)); } /// Initializes a new instance of . @@ -24,5 +27,10 @@ internal ContainerServiceClusterSupportEndingEventData() internal ContainerServiceClusterSupportEndingEventData(string kubernetesVersion, IDictionary serializedAdditionalRawData) : base(kubernetesVersion, serializedAdditionalRawData) { } + + /// Initializes a new instance of for deserialization. + internal ContainerServiceClusterSupportEndingEventData() + { + } } } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerServiceClusterSupportEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerServiceClusterSupportEventData.Serialization.cs index e69c3cab6fd7..2bda65aa23a3 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerServiceClusterSupportEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerServiceClusterSupportEventData.Serialization.cs @@ -34,11 +34,8 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(ContainerServiceClusterSupportEventData)} does not support writing '{format}' format."); } - if (Optional.IsDefined(KubernetesVersion)) - { - writer.WritePropertyName("kubernetesVersion"u8); - writer.WriteStringValue(KubernetesVersion); - } + writer.WritePropertyName("kubernetesVersion"u8); + writer.WriteStringValue(KubernetesVersion); if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerServiceClusterSupportEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerServiceClusterSupportEventData.cs index 3ad05c8cb79b..d6720cabcd35 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerServiceClusterSupportEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerServiceClusterSupportEventData.cs @@ -46,8 +46,13 @@ public partial class ContainerServiceClusterSupportEventData private protected IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - internal ContainerServiceClusterSupportEventData() + /// The Kubernetes version of the ManagedCluster resource. + /// is null. + internal ContainerServiceClusterSupportEventData(string kubernetesVersion) { + Argument.AssertNotNull(kubernetesVersion, nameof(kubernetesVersion)); + + KubernetesVersion = kubernetesVersion; } /// Initializes a new instance of . @@ -59,6 +64,11 @@ internal ContainerServiceClusterSupportEventData(string kubernetesVersion, IDict _serializedAdditionalRawData = serializedAdditionalRawData; } + /// Initializes a new instance of for deserialization. + internal ContainerServiceClusterSupportEventData() + { + } + /// The Kubernetes version of the ManagedCluster resource. public string KubernetesVersion { get; } } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerServiceNewKubernetesVersionAvailableEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerServiceNewKubernetesVersionAvailableEventData.Serialization.cs index 0e51cceccbfc..3f166a5de8e3 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerServiceNewKubernetesVersionAvailableEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerServiceNewKubernetesVersionAvailableEventData.Serialization.cs @@ -34,21 +34,12 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(ContainerServiceNewKubernetesVersionAvailableEventData)} does not support writing '{format}' format."); } - if (Optional.IsDefined(LatestSupportedKubernetesVersion)) - { - writer.WritePropertyName("latestSupportedKubernetesVersion"u8); - writer.WriteStringValue(LatestSupportedKubernetesVersion); - } - if (Optional.IsDefined(LatestStableKubernetesVersion)) - { - writer.WritePropertyName("latestStableKubernetesVersion"u8); - writer.WriteStringValue(LatestStableKubernetesVersion); - } - if (Optional.IsDefined(LowestMinorKubernetesVersion)) - { - writer.WritePropertyName("lowestMinorKubernetesVersion"u8); - writer.WriteStringValue(LowestMinorKubernetesVersion); - } + writer.WritePropertyName("latestSupportedKubernetesVersion"u8); + writer.WriteStringValue(LatestSupportedKubernetesVersion); + writer.WritePropertyName("latestStableKubernetesVersion"u8); + writer.WriteStringValue(LatestStableKubernetesVersion); + writer.WritePropertyName("lowestMinorKubernetesVersion"u8); + writer.WriteStringValue(LowestMinorKubernetesVersion); if (Optional.IsDefined(LatestPreviewKubernetesVersion)) { writer.WritePropertyName("latestPreviewKubernetesVersion"u8); diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerServiceNewKubernetesVersionAvailableEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerServiceNewKubernetesVersionAvailableEventData.cs index a220ba99996e..c27879af09ee 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerServiceNewKubernetesVersionAvailableEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerServiceNewKubernetesVersionAvailableEventData.cs @@ -46,8 +46,19 @@ public partial class ContainerServiceNewKubernetesVersionAvailableEventData private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - internal ContainerServiceNewKubernetesVersionAvailableEventData() + /// The highest PATCH Kubernetes version for the highest MINOR version supported by ManagedCluster resource. + /// The highest PATCH Kubernetes version for the MINOR version considered stable for the ManagedCluster resource. + /// The highest PATCH Kubernetes version for the lowest applicable MINOR version available for the ManagedCluster resource. + /// , or is null. + internal ContainerServiceNewKubernetesVersionAvailableEventData(string latestSupportedKubernetesVersion, string latestStableKubernetesVersion, string lowestMinorKubernetesVersion) { + Argument.AssertNotNull(latestSupportedKubernetesVersion, nameof(latestSupportedKubernetesVersion)); + Argument.AssertNotNull(latestStableKubernetesVersion, nameof(latestStableKubernetesVersion)); + Argument.AssertNotNull(lowestMinorKubernetesVersion, nameof(lowestMinorKubernetesVersion)); + + LatestSupportedKubernetesVersion = latestSupportedKubernetesVersion; + LatestStableKubernetesVersion = latestStableKubernetesVersion; + LowestMinorKubernetesVersion = lowestMinorKubernetesVersion; } /// Initializes a new instance of . @@ -65,6 +76,11 @@ internal ContainerServiceNewKubernetesVersionAvailableEventData(string latestSup _serializedAdditionalRawData = serializedAdditionalRawData; } + /// Initializes a new instance of for deserialization. + internal ContainerServiceNewKubernetesVersionAvailableEventData() + { + } + /// The highest PATCH Kubernetes version for the highest MINOR version supported by ManagedCluster resource. public string LatestSupportedKubernetesVersion { get; } /// The highest PATCH Kubernetes version for the MINOR version considered stable for the ManagedCluster resource. diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerServiceNodePoolRollingEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerServiceNodePoolRollingEventData.Serialization.cs index b8c25b055989..cae02d7a7392 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerServiceNodePoolRollingEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerServiceNodePoolRollingEventData.Serialization.cs @@ -34,11 +34,8 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(ContainerServiceNodePoolRollingEventData)} does not support writing '{format}' format."); } - if (Optional.IsDefined(NodePoolName)) - { - writer.WritePropertyName("nodePoolName"u8); - writer.WriteStringValue(NodePoolName); - } + writer.WritePropertyName("nodePoolName"u8); + writer.WriteStringValue(NodePoolName); if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerServiceNodePoolRollingEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerServiceNodePoolRollingEventData.cs index 3b5580803572..65ffdb4776f8 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerServiceNodePoolRollingEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerServiceNodePoolRollingEventData.cs @@ -46,8 +46,13 @@ public partial class ContainerServiceNodePoolRollingEventData private protected IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - internal ContainerServiceNodePoolRollingEventData() + /// The name of the node pool in the ManagedCluster resource. + /// is null. + internal ContainerServiceNodePoolRollingEventData(string nodePoolName) { + Argument.AssertNotNull(nodePoolName, nameof(nodePoolName)); + + NodePoolName = nodePoolName; } /// Initializes a new instance of . @@ -59,6 +64,11 @@ internal ContainerServiceNodePoolRollingEventData(string nodePoolName, IDictiona _serializedAdditionalRawData = serializedAdditionalRawData; } + /// Initializes a new instance of for deserialization. + internal ContainerServiceNodePoolRollingEventData() + { + } + /// The name of the node pool in the ManagedCluster resource. public string NodePoolName { get; } } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerServiceNodePoolRollingFailedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerServiceNodePoolRollingFailedEventData.cs index 0bf9331c72ca..e2889e098f99 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerServiceNodePoolRollingFailedEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerServiceNodePoolRollingFailedEventData.cs @@ -14,8 +14,11 @@ namespace Azure.Messaging.EventGrid.SystemEvents public partial class ContainerServiceNodePoolRollingFailedEventData : ContainerServiceNodePoolRollingEventData { /// Initializes a new instance of . - internal ContainerServiceNodePoolRollingFailedEventData() + /// The name of the node pool in the ManagedCluster resource. + /// is null. + internal ContainerServiceNodePoolRollingFailedEventData(string nodePoolName) : base(nodePoolName) { + Argument.AssertNotNull(nodePoolName, nameof(nodePoolName)); } /// Initializes a new instance of . @@ -24,5 +27,10 @@ internal ContainerServiceNodePoolRollingFailedEventData() internal ContainerServiceNodePoolRollingFailedEventData(string nodePoolName, IDictionary serializedAdditionalRawData) : base(nodePoolName, serializedAdditionalRawData) { } + + /// Initializes a new instance of for deserialization. + internal ContainerServiceNodePoolRollingFailedEventData() + { + } } } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerServiceNodePoolRollingStartedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerServiceNodePoolRollingStartedEventData.cs index 88958ee63eef..89edc1138e28 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerServiceNodePoolRollingStartedEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerServiceNodePoolRollingStartedEventData.cs @@ -14,8 +14,11 @@ namespace Azure.Messaging.EventGrid.SystemEvents public partial class ContainerServiceNodePoolRollingStartedEventData : ContainerServiceNodePoolRollingEventData { /// Initializes a new instance of . - internal ContainerServiceNodePoolRollingStartedEventData() + /// The name of the node pool in the ManagedCluster resource. + /// is null. + internal ContainerServiceNodePoolRollingStartedEventData(string nodePoolName) : base(nodePoolName) { + Argument.AssertNotNull(nodePoolName, nameof(nodePoolName)); } /// Initializes a new instance of . @@ -24,5 +27,10 @@ internal ContainerServiceNodePoolRollingStartedEventData() internal ContainerServiceNodePoolRollingStartedEventData(string nodePoolName, IDictionary serializedAdditionalRawData) : base(nodePoolName, serializedAdditionalRawData) { } + + /// Initializes a new instance of for deserialization. + internal ContainerServiceNodePoolRollingStartedEventData() + { + } } } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerServiceNodePoolRollingSucceededEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerServiceNodePoolRollingSucceededEventData.cs index 18c9e4ada789..6209fe995bdb 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerServiceNodePoolRollingSucceededEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerServiceNodePoolRollingSucceededEventData.cs @@ -14,8 +14,11 @@ namespace Azure.Messaging.EventGrid.SystemEvents public partial class ContainerServiceNodePoolRollingSucceededEventData : ContainerServiceNodePoolRollingEventData { /// Initializes a new instance of . - internal ContainerServiceNodePoolRollingSucceededEventData() + /// The name of the node pool in the ManagedCluster resource. + /// is null. + internal ContainerServiceNodePoolRollingSucceededEventData(string nodePoolName) : base(nodePoolName) { + Argument.AssertNotNull(nodePoolName, nameof(nodePoolName)); } /// Initializes a new instance of . @@ -24,5 +27,10 @@ internal ContainerServiceNodePoolRollingSucceededEventData() internal ContainerServiceNodePoolRollingSucceededEventData(string nodePoolName, IDictionary serializedAdditionalRawData) : base(nodePoolName, serializedAdditionalRawData) { } + + /// Initializes a new instance of for deserialization. + internal ContainerServiceNodePoolRollingSucceededEventData() + { + } } } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/EventHubCaptureFileCreatedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/EventHubCaptureFileCreatedEventData.Serialization.cs index 19dde868710b..e7187c3cd8f2 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/EventHubCaptureFileCreatedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/EventHubCaptureFileCreatedEventData.Serialization.cs @@ -34,21 +34,12 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(EventHubCaptureFileCreatedEventData)} does not support writing '{format}' format."); } - if (Optional.IsDefined(Fileurl)) - { - writer.WritePropertyName("fileUrl"u8); - writer.WriteStringValue(Fileurl); - } - if (Optional.IsDefined(FileType)) - { - writer.WritePropertyName("fileType"u8); - writer.WriteStringValue(FileType); - } - if (Optional.IsDefined(PartitionId)) - { - writer.WritePropertyName("partitionId"u8); - writer.WriteStringValue(PartitionId); - } + writer.WritePropertyName("fileUrl"u8); + writer.WriteStringValue(Fileurl); + writer.WritePropertyName("fileType"u8); + writer.WriteStringValue(FileType); + writer.WritePropertyName("partitionId"u8); + writer.WriteStringValue(PartitionId); if (Optional.IsDefined(SizeInBytes)) { writer.WritePropertyName("sizeInBytes"u8); diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/EventHubCaptureFileCreatedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/EventHubCaptureFileCreatedEventData.cs index ff8f7f2a0e35..5f9b01e7d9f9 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/EventHubCaptureFileCreatedEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/EventHubCaptureFileCreatedEventData.cs @@ -46,8 +46,19 @@ public partial class EventHubCaptureFileCreatedEventData private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - internal EventHubCaptureFileCreatedEventData() + /// The path to the capture file. + /// The file type of the capture file. + /// The shard ID. + /// , or is null. + internal EventHubCaptureFileCreatedEventData(string fileurl, string fileType, string partitionId) { + Argument.AssertNotNull(fileurl, nameof(fileurl)); + Argument.AssertNotNull(fileType, nameof(fileType)); + Argument.AssertNotNull(partitionId, nameof(partitionId)); + + Fileurl = fileurl; + FileType = fileType; + PartitionId = partitionId; } /// Initializes a new instance of . @@ -75,6 +86,11 @@ internal EventHubCaptureFileCreatedEventData(string fileurl, string fileType, st _serializedAdditionalRawData = serializedAdditionalRawData; } + /// Initializes a new instance of for deserialization. + internal EventHubCaptureFileCreatedEventData() + { + } + /// The path to the capture file. public string Fileurl { get; } /// The file type of the capture file. diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MachineLearningServicesDatasetDriftDetectedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MachineLearningServicesDatasetDriftDetectedEventData.Serialization.cs index ddbbe5a5defc..4ed4a9962eaf 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MachineLearningServicesDatasetDriftDetectedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MachineLearningServicesDatasetDriftDetectedEventData.Serialization.cs @@ -34,31 +34,16 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(MachineLearningServicesDatasetDriftDetectedEventData)} does not support writing '{format}' format."); } - if (Optional.IsDefined(DataDriftId)) - { - writer.WritePropertyName("dataDriftId"u8); - writer.WriteStringValue(DataDriftId); - } - if (Optional.IsDefined(DataDriftName)) - { - writer.WritePropertyName("dataDriftName"u8); - writer.WriteStringValue(DataDriftName); - } - if (Optional.IsDefined(RunId)) - { - writer.WritePropertyName("runId"u8); - writer.WriteStringValue(RunId); - } - if (Optional.IsDefined(BaseDatasetId)) - { - writer.WritePropertyName("baseDatasetId"u8); - writer.WriteStringValue(BaseDatasetId); - } - if (Optional.IsDefined(TargetDatasetId)) - { - writer.WritePropertyName("targetDatasetId"u8); - writer.WriteStringValue(TargetDatasetId); - } + writer.WritePropertyName("dataDriftId"u8); + writer.WriteStringValue(DataDriftId); + writer.WritePropertyName("dataDriftName"u8); + writer.WriteStringValue(DataDriftName); + writer.WritePropertyName("runId"u8); + writer.WriteStringValue(RunId); + writer.WritePropertyName("baseDatasetId"u8); + writer.WriteStringValue(BaseDatasetId); + writer.WritePropertyName("targetDatasetId"u8); + writer.WriteStringValue(TargetDatasetId); if (Optional.IsDefined(DriftCoefficient)) { writer.WritePropertyName("driftCoefficient"u8); @@ -66,13 +51,27 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } if (Optional.IsDefined(StartTime)) { - writer.WritePropertyName("startTime"u8); - writer.WriteStringValue(StartTime.Value, "O"); + if (StartTime != null) + { + writer.WritePropertyName("startTime"u8); + writer.WriteStringValue(StartTime.Value, "O"); + } + else + { + writer.WriteNull("startTime"); + } } if (Optional.IsDefined(EndTime)) { - writer.WritePropertyName("endTime"u8); - writer.WriteStringValue(EndTime.Value, "O"); + if (EndTime != null) + { + writer.WritePropertyName("endTime"u8); + writer.WriteStringValue(EndTime.Value, "O"); + } + else + { + writer.WriteNull("endTime"); + } } if (options.Format != "W" && _serializedAdditionalRawData != null) { @@ -161,6 +160,7 @@ internal static MachineLearningServicesDatasetDriftDetectedEventData Deserialize { if (property.Value.ValueKind == JsonValueKind.Null) { + startTime = null; continue; } startTime = property.Value.GetDateTimeOffset("O"); @@ -170,6 +170,7 @@ internal static MachineLearningServicesDatasetDriftDetectedEventData Deserialize { if (property.Value.ValueKind == JsonValueKind.Null) { + endTime = null; continue; } endTime = property.Value.GetDateTimeOffset("O"); diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MachineLearningServicesDatasetDriftDetectedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MachineLearningServicesDatasetDriftDetectedEventData.cs index f86f30e006be..66d7e5943085 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MachineLearningServicesDatasetDriftDetectedEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MachineLearningServicesDatasetDriftDetectedEventData.cs @@ -46,8 +46,25 @@ public partial class MachineLearningServicesDatasetDriftDetectedEventData private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - internal MachineLearningServicesDatasetDriftDetectedEventData() + /// The ID of the data drift monitor that triggered the event. + /// The name of the data drift monitor that triggered the event. + /// The ID of the Run that detected data drift. + /// The ID of the base Dataset used to detect drift. + /// The ID of the target Dataset used to detect drift. + /// , , , or is null. + internal MachineLearningServicesDatasetDriftDetectedEventData(string dataDriftId, string dataDriftName, string runId, string baseDatasetId, string targetDatasetId) { + Argument.AssertNotNull(dataDriftId, nameof(dataDriftId)); + Argument.AssertNotNull(dataDriftName, nameof(dataDriftName)); + Argument.AssertNotNull(runId, nameof(runId)); + Argument.AssertNotNull(baseDatasetId, nameof(baseDatasetId)); + Argument.AssertNotNull(targetDatasetId, nameof(targetDatasetId)); + + DataDriftId = dataDriftId; + DataDriftName = dataDriftName; + RunId = runId; + BaseDatasetId = baseDatasetId; + TargetDatasetId = targetDatasetId; } /// Initializes a new instance of . @@ -73,6 +90,11 @@ internal MachineLearningServicesDatasetDriftDetectedEventData(string dataDriftId _serializedAdditionalRawData = serializedAdditionalRawData; } + /// Initializes a new instance of for deserialization. + internal MachineLearningServicesDatasetDriftDetectedEventData() + { + } + /// The ID of the data drift monitor that triggered the event. public string DataDriftId { get; } /// The name of the data drift monitor that triggered the event. diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MachineLearningServicesModelDeployedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MachineLearningServicesModelDeployedEventData.Serialization.cs index bc2c9c9fb87b..4e8e161a8da2 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MachineLearningServicesModelDeployedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MachineLearningServicesModelDeployedEventData.Serialization.cs @@ -34,61 +34,58 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(MachineLearningServicesModelDeployedEventData)} does not support writing '{format}' format."); } - if (Optional.IsDefined(ServiceName)) + writer.WritePropertyName("serviceName"u8); + writer.WriteStringValue(ServiceName); + writer.WritePropertyName("serviceComputeType"u8); + writer.WriteStringValue(ServiceComputeType); + writer.WritePropertyName("modelIds"u8); + writer.WriteStringValue(ModelIds); + if (Optional.IsCollectionDefined(ServiceTags)) { - writer.WritePropertyName("serviceName"u8); - writer.WriteStringValue(ServiceName); - } - if (Optional.IsDefined(ServiceComputeType)) - { - writer.WritePropertyName("serviceComputeType"u8); - writer.WriteStringValue(ServiceComputeType); - } - if (Optional.IsDefined(ModelIds)) - { - writer.WritePropertyName("modelIds"u8); - writer.WriteStringValue(ModelIds); - } - writer.WritePropertyName("serviceTags"u8); - writer.WriteStartObject(); - foreach (var item in ServiceTags) - { - writer.WritePropertyName(item.Key); - if (item.Value == null) + writer.WritePropertyName("serviceTags"u8); + writer.WriteStartObject(); + foreach (var item in ServiceTags) { - writer.WriteNullValue(); - continue; - } + writer.WritePropertyName(item.Key); + if (item.Value == null) + { + writer.WriteNullValue(); + continue; + } #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); #else - using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } #endif + } + writer.WriteEndObject(); } - writer.WriteEndObject(); - writer.WritePropertyName("serviceProperties"u8); - writer.WriteStartObject(); - foreach (var item in ServiceProperties) + if (Optional.IsCollectionDefined(ServiceProperties)) { - writer.WritePropertyName(item.Key); - if (item.Value == null) + writer.WritePropertyName("serviceProperties"u8); + writer.WriteStartObject(); + foreach (var item in ServiceProperties) { - writer.WriteNullValue(); - continue; - } + writer.WritePropertyName(item.Key); + if (item.Value == null) + { + writer.WriteNullValue(); + continue; + } #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); #else - using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } #endif + } + writer.WriteEndObject(); } - writer.WriteEndObject(); if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -152,6 +149,10 @@ internal static MachineLearningServicesModelDeployedEventData DeserializeMachine } if (property.NameEquals("serviceTags"u8)) { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } Dictionary dictionary = new Dictionary(); foreach (var property0 in property.Value.EnumerateObject()) { @@ -169,6 +170,10 @@ internal static MachineLearningServicesModelDeployedEventData DeserializeMachine } if (property.NameEquals("serviceProperties"u8)) { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } Dictionary dictionary = new Dictionary(); foreach (var property0 in property.Value.EnumerateObject()) { @@ -194,8 +199,8 @@ internal static MachineLearningServicesModelDeployedEventData DeserializeMachine serviceName, serviceComputeType, modelIds, - serviceTags, - serviceProperties, + serviceTags ?? new ChangeTrackingDictionary(), + serviceProperties ?? new ChangeTrackingDictionary(), serializedAdditionalRawData); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MachineLearningServicesModelDeployedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MachineLearningServicesModelDeployedEventData.cs index 8d759992c57d..86cce0670b04 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MachineLearningServicesModelDeployedEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MachineLearningServicesModelDeployedEventData.cs @@ -46,16 +46,21 @@ public partial class MachineLearningServicesModelDeployedEventData private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - /// The tags of the deployed service. - /// The properties of the deployed service. - /// or is null. - internal MachineLearningServicesModelDeployedEventData(IReadOnlyDictionary serviceTags, IReadOnlyDictionary serviceProperties) + /// The name of the deployed service. + /// The compute type (e.g. ACI, AKS) of the deployed service. + /// A common separated list of model IDs. The IDs of the models deployed in the service. + /// , or is null. + internal MachineLearningServicesModelDeployedEventData(string serviceName, string serviceComputeType, string modelIds) { - Argument.AssertNotNull(serviceTags, nameof(serviceTags)); - Argument.AssertNotNull(serviceProperties, nameof(serviceProperties)); + Argument.AssertNotNull(serviceName, nameof(serviceName)); + Argument.AssertNotNull(serviceComputeType, nameof(serviceComputeType)); + Argument.AssertNotNull(modelIds, nameof(modelIds)); - ServiceTags = serviceTags; - ServiceProperties = serviceProperties; + ServiceName = serviceName; + ServiceComputeType = serviceComputeType; + ModelIds = modelIds; + ServiceTags = new ChangeTrackingDictionary(); + ServiceProperties = new ChangeTrackingDictionary(); } /// Initializes a new instance of . diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MachineLearningServicesModelRegisteredEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MachineLearningServicesModelRegisteredEventData.Serialization.cs index 6e6446370ca4..f51226031422 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MachineLearningServicesModelRegisteredEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MachineLearningServicesModelRegisteredEventData.Serialization.cs @@ -34,56 +34,56 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(MachineLearningServicesModelRegisteredEventData)} does not support writing '{format}' format."); } - if (Optional.IsDefined(ModelName)) + writer.WritePropertyName("modelName"u8); + writer.WriteStringValue(ModelName); + writer.WritePropertyName("modelVersion"u8); + writer.WriteStringValue(ModelVersion); + if (Optional.IsCollectionDefined(ModelTags)) { - writer.WritePropertyName("modelName"u8); - writer.WriteStringValue(ModelName); - } - if (Optional.IsDefined(ModelVersion)) - { - writer.WritePropertyName("modelVersion"u8); - writer.WriteStringValue(ModelVersion); - } - writer.WritePropertyName("modelTags"u8); - writer.WriteStartObject(); - foreach (var item in ModelTags) - { - writer.WritePropertyName(item.Key); - if (item.Value == null) + writer.WritePropertyName("modelTags"u8); + writer.WriteStartObject(); + foreach (var item in ModelTags) { - writer.WriteNullValue(); - continue; - } + writer.WritePropertyName(item.Key); + if (item.Value == null) + { + writer.WriteNullValue(); + continue; + } #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); #else - using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } #endif + } + writer.WriteEndObject(); } - writer.WriteEndObject(); - writer.WritePropertyName("modelProperties"u8); - writer.WriteStartObject(); - foreach (var item in ModelProperties) + if (Optional.IsCollectionDefined(ModelProperties)) { - writer.WritePropertyName(item.Key); - if (item.Value == null) + writer.WritePropertyName("modelProperties"u8); + writer.WriteStartObject(); + foreach (var item in ModelProperties) { - writer.WriteNullValue(); - continue; - } + writer.WritePropertyName(item.Key); + if (item.Value == null) + { + writer.WriteNullValue(); + continue; + } #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); #else - using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } #endif + } + writer.WriteEndObject(); } - writer.WriteEndObject(); if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -141,6 +141,10 @@ internal static MachineLearningServicesModelRegisteredEventData DeserializeMachi } if (property.NameEquals("modelTags"u8)) { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } Dictionary dictionary = new Dictionary(); foreach (var property0 in property.Value.EnumerateObject()) { @@ -158,6 +162,10 @@ internal static MachineLearningServicesModelRegisteredEventData DeserializeMachi } if (property.NameEquals("modelProperties"u8)) { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } Dictionary dictionary = new Dictionary(); foreach (var property0 in property.Value.EnumerateObject()) { @@ -179,7 +187,7 @@ internal static MachineLearningServicesModelRegisteredEventData DeserializeMachi } } serializedAdditionalRawData = rawDataDictionary; - return new MachineLearningServicesModelRegisteredEventData(modelName, modelVersion, modelTags, modelProperties, serializedAdditionalRawData); + return new MachineLearningServicesModelRegisteredEventData(modelName, modelVersion, modelTags ?? new ChangeTrackingDictionary(), modelProperties ?? new ChangeTrackingDictionary(), serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MachineLearningServicesModelRegisteredEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MachineLearningServicesModelRegisteredEventData.cs index 66af5a595773..e844c536e50b 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MachineLearningServicesModelRegisteredEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MachineLearningServicesModelRegisteredEventData.cs @@ -46,16 +46,18 @@ public partial class MachineLearningServicesModelRegisteredEventData private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - /// The tags of the model that was registered. - /// The properties of the model that was registered. - /// or is null. - internal MachineLearningServicesModelRegisteredEventData(IReadOnlyDictionary modelTags, IReadOnlyDictionary modelProperties) + /// The name of the model that was registered. + /// The version of the model that was registered. + /// or is null. + internal MachineLearningServicesModelRegisteredEventData(string modelName, string modelVersion) { - Argument.AssertNotNull(modelTags, nameof(modelTags)); - Argument.AssertNotNull(modelProperties, nameof(modelProperties)); + Argument.AssertNotNull(modelName, nameof(modelName)); + Argument.AssertNotNull(modelVersion, nameof(modelVersion)); - ModelTags = modelTags; - ModelProperties = modelProperties; + ModelName = modelName; + ModelVersion = modelVersion; + ModelTags = new ChangeTrackingDictionary(); + ModelProperties = new ChangeTrackingDictionary(); } /// Initializes a new instance of . diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MachineLearningServicesRunCompletedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MachineLearningServicesRunCompletedEventData.Serialization.cs index 218cd1801335..62dd83415d96 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MachineLearningServicesRunCompletedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MachineLearningServicesRunCompletedEventData.Serialization.cs @@ -34,66 +34,60 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(MachineLearningServicesRunCompletedEventData)} does not support writing '{format}' format."); } - if (Optional.IsDefined(ExperimentId)) + writer.WritePropertyName("experimentId"u8); + writer.WriteStringValue(ExperimentId); + writer.WritePropertyName("experimentName"u8); + writer.WriteStringValue(ExperimentName); + writer.WritePropertyName("runId"u8); + writer.WriteStringValue(RunId); + writer.WritePropertyName("runType"u8); + writer.WriteStringValue(RunType); + if (Optional.IsCollectionDefined(RunTags)) { - writer.WritePropertyName("experimentId"u8); - writer.WriteStringValue(ExperimentId); - } - if (Optional.IsDefined(ExperimentName)) - { - writer.WritePropertyName("experimentName"u8); - writer.WriteStringValue(ExperimentName); - } - if (Optional.IsDefined(RunId)) - { - writer.WritePropertyName("runId"u8); - writer.WriteStringValue(RunId); - } - if (Optional.IsDefined(RunType)) - { - writer.WritePropertyName("runType"u8); - writer.WriteStringValue(RunType); - } - writer.WritePropertyName("runTags"u8); - writer.WriteStartObject(); - foreach (var item in RunTags) - { - writer.WritePropertyName(item.Key); - if (item.Value == null) + writer.WritePropertyName("runTags"u8); + writer.WriteStartObject(); + foreach (var item in RunTags) { - writer.WriteNullValue(); - continue; - } + writer.WritePropertyName(item.Key); + if (item.Value == null) + { + writer.WriteNullValue(); + continue; + } #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); #else - using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } #endif + } + writer.WriteEndObject(); } - writer.WriteEndObject(); - writer.WritePropertyName("runProperties"u8); - writer.WriteStartObject(); - foreach (var item in RunProperties) + if (Optional.IsCollectionDefined(RunProperties)) { - writer.WritePropertyName(item.Key); - if (item.Value == null) + writer.WritePropertyName("runProperties"u8); + writer.WriteStartObject(); + foreach (var item in RunProperties) { - writer.WriteNullValue(); - continue; - } + writer.WritePropertyName(item.Key); + if (item.Value == null) + { + writer.WriteNullValue(); + continue; + } #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); #else - using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } #endif + } + writer.WriteEndObject(); } - writer.WriteEndObject(); if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -163,6 +157,10 @@ internal static MachineLearningServicesRunCompletedEventData DeserializeMachineL } if (property.NameEquals("runTags"u8)) { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } Dictionary dictionary = new Dictionary(); foreach (var property0 in property.Value.EnumerateObject()) { @@ -180,6 +178,10 @@ internal static MachineLearningServicesRunCompletedEventData DeserializeMachineL } if (property.NameEquals("runProperties"u8)) { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } Dictionary dictionary = new Dictionary(); foreach (var property0 in property.Value.EnumerateObject()) { @@ -206,8 +208,8 @@ internal static MachineLearningServicesRunCompletedEventData DeserializeMachineL experimentName, runId, runType, - runTags, - runProperties, + runTags ?? new ChangeTrackingDictionary(), + runProperties ?? new ChangeTrackingDictionary(), serializedAdditionalRawData); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MachineLearningServicesRunCompletedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MachineLearningServicesRunCompletedEventData.cs index e8c1fb9d4264..bbfe86bdb3e6 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MachineLearningServicesRunCompletedEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MachineLearningServicesRunCompletedEventData.cs @@ -46,16 +46,24 @@ public partial class MachineLearningServicesRunCompletedEventData private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - /// The tags of the completed Run. - /// The properties of the completed Run. - /// or is null. - internal MachineLearningServicesRunCompletedEventData(IReadOnlyDictionary runTags, IReadOnlyDictionary runProperties) + /// The ID of the experiment that the run belongs to. + /// The name of the experiment that the run belongs to. + /// The ID of the Run that was completed. + /// The Run Type of the completed Run. + /// , , or is null. + internal MachineLearningServicesRunCompletedEventData(string experimentId, string experimentName, string runId, string runType) { - Argument.AssertNotNull(runTags, nameof(runTags)); - Argument.AssertNotNull(runProperties, nameof(runProperties)); + Argument.AssertNotNull(experimentId, nameof(experimentId)); + Argument.AssertNotNull(experimentName, nameof(experimentName)); + Argument.AssertNotNull(runId, nameof(runId)); + Argument.AssertNotNull(runType, nameof(runType)); - RunTags = runTags; - RunProperties = runProperties; + ExperimentId = experimentId; + ExperimentName = experimentName; + RunId = runId; + RunType = runType; + RunTags = new ChangeTrackingDictionary(); + RunProperties = new ChangeTrackingDictionary(); } /// Initializes a new instance of . diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MachineLearningServicesRunStatusChangedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MachineLearningServicesRunStatusChangedEventData.Serialization.cs index 520679135bb8..1efc53ac3c3b 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MachineLearningServicesRunStatusChangedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MachineLearningServicesRunStatusChangedEventData.Serialization.cs @@ -34,71 +34,62 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(MachineLearningServicesRunStatusChangedEventData)} does not support writing '{format}' format."); } - if (Optional.IsDefined(ExperimentId)) + writer.WritePropertyName("experimentId"u8); + writer.WriteStringValue(ExperimentId); + writer.WritePropertyName("experimentName"u8); + writer.WriteStringValue(ExperimentName); + writer.WritePropertyName("runId"u8); + writer.WriteStringValue(RunId); + writer.WritePropertyName("runType"u8); + writer.WriteStringValue(RunType); + if (Optional.IsCollectionDefined(RunTags)) { - writer.WritePropertyName("experimentId"u8); - writer.WriteStringValue(ExperimentId); - } - if (Optional.IsDefined(ExperimentName)) - { - writer.WritePropertyName("experimentName"u8); - writer.WriteStringValue(ExperimentName); - } - if (Optional.IsDefined(RunId)) - { - writer.WritePropertyName("runId"u8); - writer.WriteStringValue(RunId); - } - if (Optional.IsDefined(RunType)) - { - writer.WritePropertyName("runType"u8); - writer.WriteStringValue(RunType); - } - writer.WritePropertyName("runTags"u8); - writer.WriteStartObject(); - foreach (var item in RunTags) - { - writer.WritePropertyName(item.Key); - if (item.Value == null) + writer.WritePropertyName("runTags"u8); + writer.WriteStartObject(); + foreach (var item in RunTags) { - writer.WriteNullValue(); - continue; - } + writer.WritePropertyName(item.Key); + if (item.Value == null) + { + writer.WriteNullValue(); + continue; + } #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); #else - using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } #endif + } + writer.WriteEndObject(); } - writer.WriteEndObject(); - writer.WritePropertyName("runProperties"u8); - writer.WriteStartObject(); - foreach (var item in RunProperties) + if (Optional.IsCollectionDefined(RunProperties)) { - writer.WritePropertyName(item.Key); - if (item.Value == null) + writer.WritePropertyName("runProperties"u8); + writer.WriteStartObject(); + foreach (var item in RunProperties) { - writer.WriteNullValue(); - continue; - } + writer.WritePropertyName(item.Key); + if (item.Value == null) + { + writer.WriteNullValue(); + continue; + } #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); #else - using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } #endif + } + writer.WriteEndObject(); } - writer.WriteEndObject(); - if (Optional.IsDefined(RunStatus)) - { - writer.WritePropertyName("runStatus"u8); - writer.WriteStringValue(RunStatus); - } + writer.WritePropertyName("runStatus"u8); + writer.WriteStringValue(RunStatus); if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -169,6 +160,10 @@ internal static MachineLearningServicesRunStatusChangedEventData DeserializeMach } if (property.NameEquals("runTags"u8)) { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } Dictionary dictionary = new Dictionary(); foreach (var property0 in property.Value.EnumerateObject()) { @@ -186,6 +181,10 @@ internal static MachineLearningServicesRunStatusChangedEventData DeserializeMach } if (property.NameEquals("runProperties"u8)) { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } Dictionary dictionary = new Dictionary(); foreach (var property0 in property.Value.EnumerateObject()) { @@ -217,8 +216,8 @@ internal static MachineLearningServicesRunStatusChangedEventData DeserializeMach experimentName, runId, runType, - runTags, - runProperties, + runTags ?? new ChangeTrackingDictionary(), + runProperties ?? new ChangeTrackingDictionary(), runStatus, serializedAdditionalRawData); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MachineLearningServicesRunStatusChangedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MachineLearningServicesRunStatusChangedEventData.cs index 8af67e302b82..c7c35d6ed14e 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MachineLearningServicesRunStatusChangedEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MachineLearningServicesRunStatusChangedEventData.cs @@ -46,16 +46,27 @@ public partial class MachineLearningServicesRunStatusChangedEventData private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - /// The tags of the Machine Learning Run. - /// The properties of the Machine Learning Run. - /// or is null. - internal MachineLearningServicesRunStatusChangedEventData(IReadOnlyDictionary runTags, IReadOnlyDictionary runProperties) + /// The ID of the experiment that the Machine Learning Run belongs to. + /// The name of the experiment that the Machine Learning Run belongs to. + /// The ID of the Machine Learning Run. + /// The Run Type of the Machine Learning Run. + /// The status of the Machine Learning Run. + /// , , , or is null. + internal MachineLearningServicesRunStatusChangedEventData(string experimentId, string experimentName, string runId, string runType, string runStatus) { - Argument.AssertNotNull(runTags, nameof(runTags)); - Argument.AssertNotNull(runProperties, nameof(runProperties)); + Argument.AssertNotNull(experimentId, nameof(experimentId)); + Argument.AssertNotNull(experimentName, nameof(experimentName)); + Argument.AssertNotNull(runId, nameof(runId)); + Argument.AssertNotNull(runType, nameof(runType)); + Argument.AssertNotNull(runStatus, nameof(runStatus)); - RunTags = runTags; - RunProperties = runProperties; + ExperimentId = experimentId; + ExperimentName = experimentName; + RunId = runId; + RunType = runType; + RunTags = new ChangeTrackingDictionary(); + RunProperties = new ChangeTrackingDictionary(); + RunStatus = runStatus; } /// Initializes a new instance of . diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/tsp-location.yaml b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/tsp-location.yaml index f6874a4d67e5..a158aba7e8da 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/tsp-location.yaml +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/tsp-location.yaml @@ -1,3 +1,4 @@ +directory: specification/eventgrid/Azure.Messaging.EventGrid.SystemEvents +commit: 6e702986ee542ebd38d0ab2e2f2c00ab48a50b45 repo: Azure/azure-rest-api-specs -directory: "specification/eventgrid/Azure.Messaging.EventGrid.SystemEvents" -commit: 5f079f3d5e4ec9d1e10bafbd58844fdb4977e338 +additionalDirectories: diff --git a/sdk/fabric/Azure.ResourceManager.Fabric/api/Azure.ResourceManager.Fabric.net8.0.cs b/sdk/fabric/Azure.ResourceManager.Fabric/api/Azure.ResourceManager.Fabric.net8.0.cs index dcb36b235493..6e8aca3f5bcd 100644 --- a/sdk/fabric/Azure.ResourceManager.Fabric/api/Azure.ResourceManager.Fabric.net8.0.cs +++ b/sdk/fabric/Azure.ResourceManager.Fabric/api/Azure.ResourceManager.Fabric.net8.0.cs @@ -72,6 +72,8 @@ public static partial class FabricExtensions public static Azure.ResourceManager.Fabric.FabricCapacityResource GetFabricCapacityResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.Pageable GetSkusFabricCapacities(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.AsyncPageable GetSkusFabricCapacitiesAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.Pageable GetUsagesFabricCapacities(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, string location, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.AsyncPageable GetUsagesFabricCapacitiesAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, string location, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } } namespace Azure.ResourceManager.Fabric.Mocking @@ -97,6 +99,8 @@ protected MockableFabricSubscriptionResource() { } public virtual Azure.AsyncPageable GetFabricCapacitiesAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Pageable GetSkusFabricCapacities(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.AsyncPageable GetSkusFabricCapacitiesAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetUsagesFabricCapacities(string location, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetUsagesFabricCapacitiesAsync(string location, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } } namespace Azure.ResourceManager.Fabric.Models @@ -106,8 +110,10 @@ public static partial class ArmFabricModelFactory public static Azure.ResourceManager.Fabric.FabricCapacityData FabricCapacityData(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.Fabric.Models.FabricCapacityProperties properties = null, Azure.ResourceManager.Fabric.Models.FabricSku sku = null) { throw null; } public static Azure.ResourceManager.Fabric.Models.FabricCapacityProperties FabricCapacityProperties(Azure.ResourceManager.Fabric.Models.FabricProvisioningState? provisioningState = default(Azure.ResourceManager.Fabric.Models.FabricProvisioningState?), Azure.ResourceManager.Fabric.Models.FabricResourceState? state = default(Azure.ResourceManager.Fabric.Models.FabricResourceState?), System.Collections.Generic.IEnumerable administrationMembers = null) { throw null; } public static Azure.ResourceManager.Fabric.Models.FabricNameAvailabilityResult FabricNameAvailabilityResult(bool? isNameAvailable = default(bool?), Azure.ResourceManager.Fabric.Models.FabricNameUnavailableReason? reason = default(Azure.ResourceManager.Fabric.Models.FabricNameUnavailableReason?), string message = null) { throw null; } + public static Azure.ResourceManager.Fabric.Models.FabricQuota FabricQuota(Azure.ResourceManager.Fabric.Models.QuotaName name = null, string unit = null, long currentValue = (long)0, long limit = (long)0) { throw null; } public static Azure.ResourceManager.Fabric.Models.FabricSkuDetailsForExistingCapacity FabricSkuDetailsForExistingCapacity(string resourceType = null, Azure.ResourceManager.Fabric.Models.FabricSku sku = null) { throw null; } public static Azure.ResourceManager.Fabric.Models.FabricSkuDetailsForNewCapacity FabricSkuDetailsForNewCapacity(string resourceType = null, string name = null, System.Collections.Generic.IEnumerable locations = null) { throw null; } + public static Azure.ResourceManager.Fabric.Models.QuotaName QuotaName(string value = null, string localizedValue = null) { throw null; } } public partial class FabricCapacityAdministration : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { @@ -211,6 +217,20 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public static bool operator !=(Azure.ResourceManager.Fabric.Models.FabricProvisioningState left, Azure.ResourceManager.Fabric.Models.FabricProvisioningState right) { throw null; } public override string ToString() { throw null; } } + public partial class FabricQuota : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal FabricQuota() { } + public long CurrentValue { get { throw null; } } + public long Limit { get { throw null; } } + public Azure.ResourceManager.Fabric.Models.QuotaName Name { get { throw null; } } + public string Unit { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Fabric.Models.FabricQuota System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Fabric.Models.FabricQuota System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.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 FabricResourceState : System.IEquatable { @@ -293,4 +313,16 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public static bool operator !=(Azure.ResourceManager.Fabric.Models.FabricSkuTier left, Azure.ResourceManager.Fabric.Models.FabricSkuTier right) { throw null; } public override string ToString() { throw null; } } + public partial class QuotaName : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal QuotaName() { } + public string LocalizedValue { get { throw null; } } + public string Value { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Fabric.Models.QuotaName System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Fabric.Models.QuotaName System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.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/fabric/Azure.ResourceManager.Fabric/api/Azure.ResourceManager.Fabric.netstandard2.0.cs b/sdk/fabric/Azure.ResourceManager.Fabric/api/Azure.ResourceManager.Fabric.netstandard2.0.cs index dcb36b235493..6e8aca3f5bcd 100644 --- a/sdk/fabric/Azure.ResourceManager.Fabric/api/Azure.ResourceManager.Fabric.netstandard2.0.cs +++ b/sdk/fabric/Azure.ResourceManager.Fabric/api/Azure.ResourceManager.Fabric.netstandard2.0.cs @@ -72,6 +72,8 @@ public static partial class FabricExtensions public static Azure.ResourceManager.Fabric.FabricCapacityResource GetFabricCapacityResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.Pageable GetSkusFabricCapacities(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.AsyncPageable GetSkusFabricCapacitiesAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.Pageable GetUsagesFabricCapacities(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, string location, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.AsyncPageable GetUsagesFabricCapacitiesAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, string location, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } } namespace Azure.ResourceManager.Fabric.Mocking @@ -97,6 +99,8 @@ protected MockableFabricSubscriptionResource() { } public virtual Azure.AsyncPageable GetFabricCapacitiesAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Pageable GetSkusFabricCapacities(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.AsyncPageable GetSkusFabricCapacitiesAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetUsagesFabricCapacities(string location, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetUsagesFabricCapacitiesAsync(string location, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } } namespace Azure.ResourceManager.Fabric.Models @@ -106,8 +110,10 @@ public static partial class ArmFabricModelFactory public static Azure.ResourceManager.Fabric.FabricCapacityData FabricCapacityData(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.Fabric.Models.FabricCapacityProperties properties = null, Azure.ResourceManager.Fabric.Models.FabricSku sku = null) { throw null; } public static Azure.ResourceManager.Fabric.Models.FabricCapacityProperties FabricCapacityProperties(Azure.ResourceManager.Fabric.Models.FabricProvisioningState? provisioningState = default(Azure.ResourceManager.Fabric.Models.FabricProvisioningState?), Azure.ResourceManager.Fabric.Models.FabricResourceState? state = default(Azure.ResourceManager.Fabric.Models.FabricResourceState?), System.Collections.Generic.IEnumerable administrationMembers = null) { throw null; } public static Azure.ResourceManager.Fabric.Models.FabricNameAvailabilityResult FabricNameAvailabilityResult(bool? isNameAvailable = default(bool?), Azure.ResourceManager.Fabric.Models.FabricNameUnavailableReason? reason = default(Azure.ResourceManager.Fabric.Models.FabricNameUnavailableReason?), string message = null) { throw null; } + public static Azure.ResourceManager.Fabric.Models.FabricQuota FabricQuota(Azure.ResourceManager.Fabric.Models.QuotaName name = null, string unit = null, long currentValue = (long)0, long limit = (long)0) { throw null; } public static Azure.ResourceManager.Fabric.Models.FabricSkuDetailsForExistingCapacity FabricSkuDetailsForExistingCapacity(string resourceType = null, Azure.ResourceManager.Fabric.Models.FabricSku sku = null) { throw null; } public static Azure.ResourceManager.Fabric.Models.FabricSkuDetailsForNewCapacity FabricSkuDetailsForNewCapacity(string resourceType = null, string name = null, System.Collections.Generic.IEnumerable locations = null) { throw null; } + public static Azure.ResourceManager.Fabric.Models.QuotaName QuotaName(string value = null, string localizedValue = null) { throw null; } } public partial class FabricCapacityAdministration : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { @@ -211,6 +217,20 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public static bool operator !=(Azure.ResourceManager.Fabric.Models.FabricProvisioningState left, Azure.ResourceManager.Fabric.Models.FabricProvisioningState right) { throw null; } public override string ToString() { throw null; } } + public partial class FabricQuota : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal FabricQuota() { } + public long CurrentValue { get { throw null; } } + public long Limit { get { throw null; } } + public Azure.ResourceManager.Fabric.Models.QuotaName Name { get { throw null; } } + public string Unit { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Fabric.Models.FabricQuota System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Fabric.Models.FabricQuota System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.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 FabricResourceState : System.IEquatable { @@ -293,4 +313,16 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public static bool operator !=(Azure.ResourceManager.Fabric.Models.FabricSkuTier left, Azure.ResourceManager.Fabric.Models.FabricSkuTier right) { throw null; } public override string ToString() { throw null; } } + public partial class QuotaName : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal QuotaName() { } + public string LocalizedValue { get { throw null; } } + public string Value { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Fabric.Models.QuotaName System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Fabric.Models.QuotaName System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.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/fabric/Azure.ResourceManager.Fabric/samples/Generated/Samples/Sample_FabricCapacityCollection.cs b/sdk/fabric/Azure.ResourceManager.Fabric/samples/Generated/Samples/Sample_FabricCapacityCollection.cs index b1c27d0f1b41..46bd90876462 100644 --- a/sdk/fabric/Azure.ResourceManager.Fabric/samples/Generated/Samples/Sample_FabricCapacityCollection.cs +++ b/sdk/fabric/Azure.ResourceManager.Fabric/samples/Generated/Samples/Sample_FabricCapacityCollection.cs @@ -21,7 +21,7 @@ public partial class Sample_FabricCapacityCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreateOrUpdateACapacity() { - // Generated from example definition: 2023-11-01/FabricCapacities_CreateOrUpdate.json + // Generated from example definition: 2025-01-15-preview/FabricCapacities_CreateOrUpdate.json // this example is just showing the usage of "FabricCapacity_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 @@ -56,7 +56,7 @@ public async Task CreateOrUpdate_CreateOrUpdateACapacity() [Ignore("Only validating compilation of examples")] public async Task Get_GetACapacity() { - // Generated from example definition: 2023-11-01/FabricCapacities_Get.json + // Generated from example definition: 2025-01-15-preview/FabricCapacities_Get.json // this example is just showing the usage of "FabricCapacity_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -89,7 +89,7 @@ public async Task Get_GetACapacity() [Ignore("Only validating compilation of examples")] public async Task GetAll_ListCapacitiesByResourceGroup() { - // Generated from example definition: 2023-11-01/FabricCapacities_ListByResourceGroup.json + // Generated from example definition: 2025-01-15-preview/FabricCapacities_ListByResourceGroup.json // this example is just showing the usage of "FabricCapacity_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 @@ -124,7 +124,7 @@ public async Task GetAll_ListCapacitiesByResourceGroup() [Ignore("Only validating compilation of examples")] public async Task Exists_GetACapacity() { - // Generated from example definition: 2023-11-01/FabricCapacities_Get.json + // Generated from example definition: 2025-01-15-preview/FabricCapacities_Get.json // this example is just showing the usage of "FabricCapacity_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 @@ -153,7 +153,7 @@ public async Task Exists_GetACapacity() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetACapacity() { - // Generated from example definition: 2023-11-01/FabricCapacities_Get.json + // Generated from example definition: 2025-01-15-preview/FabricCapacities_Get.json // this example is just showing the usage of "FabricCapacity_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/fabric/Azure.ResourceManager.Fabric/samples/Generated/Samples/Sample_FabricCapacityResource.cs b/sdk/fabric/Azure.ResourceManager.Fabric/samples/Generated/Samples/Sample_FabricCapacityResource.cs index 5e2c7ab6aeea..e009f1dc7148 100644 --- a/sdk/fabric/Azure.ResourceManager.Fabric/samples/Generated/Samples/Sample_FabricCapacityResource.cs +++ b/sdk/fabric/Azure.ResourceManager.Fabric/samples/Generated/Samples/Sample_FabricCapacityResource.cs @@ -20,7 +20,7 @@ public partial class Sample_FabricCapacityResource [Ignore("Only validating compilation of examples")] public async Task Get_GetACapacity() { - // Generated from example definition: 2023-11-01/FabricCapacities_Get.json + // Generated from example definition: 2025-01-15-preview/FabricCapacities_Get.json // this example is just showing the usage of "FabricCapacity_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -50,7 +50,7 @@ public async Task Get_GetACapacity() [Ignore("Only validating compilation of examples")] public async Task Delete_DeleteACapacity() { - // Generated from example definition: 2023-11-01/FabricCapacities_Delete.json + // Generated from example definition: 2025-01-15-preview/FabricCapacities_Delete.json // this example is just showing the usage of "FabricCapacity_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -76,7 +76,7 @@ public async Task Delete_DeleteACapacity() [Ignore("Only validating compilation of examples")] public async Task Update_UpdateCapacityProperties() { - // Generated from example definition: 2023-11-01/FabricCapacities_Update.json + // Generated from example definition: 2025-01-15-preview/FabricCapacities_Update.json // this example is just showing the usage of "FabricCapacity_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 @@ -116,7 +116,7 @@ public async Task Update_UpdateCapacityProperties() [Ignore("Only validating compilation of examples")] public async Task Resume_ResumeCapacity() { - // Generated from example definition: 2023-11-01/FabricCapacities_Resume.json + // Generated from example definition: 2025-01-15-preview/FabricCapacities_Resume.json // this example is just showing the usage of "FabricCapacities_Resume" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -142,7 +142,7 @@ public async Task Resume_ResumeCapacity() [Ignore("Only validating compilation of examples")] public async Task Suspend_SuspendCapacity() { - // Generated from example definition: 2023-11-01/FabricCapacities_Suspend.json + // Generated from example definition: 2025-01-15-preview/FabricCapacities_Suspend.json // this example is just showing the usage of "FabricCapacities_Suspend" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -168,7 +168,7 @@ public async Task Suspend_SuspendCapacity() [Ignore("Only validating compilation of examples")] public async Task GetSkusForCapacity_ListEligibleSKUsForAnExistingCapacity() { - // Generated from example definition: 2023-11-01/FabricCapacities_ListSkusForCapacity.json + // Generated from example definition: 2025-01-15-preview/FabricCapacities_ListSkusForCapacity.json // this example is just showing the usage of "FabricCapacities_ListSkusForCapacity" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/fabric/Azure.ResourceManager.Fabric/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs b/sdk/fabric/Azure.ResourceManager.Fabric/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs index e7a09ad2cfea..98d5e5225e06 100644 --- a/sdk/fabric/Azure.ResourceManager.Fabric/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs +++ b/sdk/fabric/Azure.ResourceManager.Fabric/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs @@ -21,7 +21,7 @@ public partial class Sample_SubscriptionResourceExtensions [Ignore("Only validating compilation of examples")] public async Task GetFabricCapacities_ListCapacitiesBySubscription() { - // Generated from example definition: 2023-11-01/FabricCapacities_ListBySubscription.json + // Generated from example definition: 2025-01-15-preview/FabricCapacities_ListBySubscription.json // this example is just showing the usage of "FabricCapacity_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 @@ -52,7 +52,7 @@ public async Task GetFabricCapacities_ListCapacitiesBySubscription() [Ignore("Only validating compilation of examples")] public async Task CheckFabricCapacityNameAvailability_CheckNameAvailabilityOfACapacity() { - // Generated from example definition: 2023-11-01/FabricCapacities_CheckNameAvailability.json + // Generated from example definition: 2025-01-15-preview/FabricCapacities_CheckNameAvailability.json // this example is just showing the usage of "FabricCapacities_CheckFabricCapacityNameAvailability" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -82,7 +82,7 @@ public async Task CheckFabricCapacityNameAvailability_CheckNameAvailabilityOfACa [Ignore("Only validating compilation of examples")] public async Task GetSkusFabricCapacities_ListEligibleSKUsForANewCapacity() { - // Generated from example definition: 2023-11-01/FabricCapacities_ListSkus.json + // Generated from example definition: 2025-01-15-preview/FabricCapacities_ListSkus.json // this example is just showing the usage of "FabricCapacities_ListSkus" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -104,5 +104,33 @@ public async Task GetSkusFabricCapacities_ListEligibleSKUsForANewCapacity() Console.WriteLine("Succeeded"); } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetUsagesFabricCapacities_ListQuotaUsagesForASubscription() + { + // Generated from example definition: 2025-01-15-preview/FabricCapacities_ListUsagesBySubscription.json + // this example is just showing the usage of "FabricCapacities_ListUsages" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/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 = "548B7FB7-3B2A-4F46-BB02-66473F1FC22C"; + ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); + SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); + + // invoke the operation and iterate over the result + string location = "centraluseuap"; + await foreach (FabricQuota item in subscriptionResource.GetUsagesFabricCapacitiesAsync(location)) + { + Console.WriteLine($"Succeeded: {item}"); + } + + Console.WriteLine("Succeeded"); + } } } diff --git a/sdk/fabric/Azure.ResourceManager.Fabric/src/Generated/ArmFabricModelFactory.cs b/sdk/fabric/Azure.ResourceManager.Fabric/src/Generated/ArmFabricModelFactory.cs index 8941166c4928..814f361c9cea 100644 --- a/sdk/fabric/Azure.ResourceManager.Fabric/src/Generated/ArmFabricModelFactory.cs +++ b/sdk/fabric/Azure.ResourceManager.Fabric/src/Generated/ArmFabricModelFactory.cs @@ -84,5 +84,25 @@ public static FabricSkuDetailsForNewCapacity FabricSkuDetailsForNewCapacity(stri return new FabricSkuDetailsForNewCapacity(resourceType, name, locations?.ToList(), serializedAdditionalRawData: null); } + + /// Initializes a new instance of . + /// The name of the quota. + /// The unit of usage measurement. + /// The current usage of the resource. + /// The maximum permitted usage of the resource. + /// A new instance for mocking. + public static FabricQuota FabricQuota(QuotaName name = null, string unit = null, long currentValue = default, long limit = default) + { + return new FabricQuota(name, unit, currentValue, limit, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The name of the resource. + /// The localized name of the resource. + /// A new instance for mocking. + public static QuotaName QuotaName(string value = null, string localizedValue = null) + { + return new QuotaName(value, localizedValue, serializedAdditionalRawData: null); + } } } diff --git a/sdk/fabric/Azure.ResourceManager.Fabric/src/Generated/Extensions/FabricExtensions.cs b/sdk/fabric/Azure.ResourceManager.Fabric/src/Generated/Extensions/FabricExtensions.cs index ed974a30caaf..89f3f3fa3879 100644 --- a/sdk/fabric/Azure.ResourceManager.Fabric/src/Generated/Extensions/FabricExtensions.cs +++ b/sdk/fabric/Azure.ResourceManager.Fabric/src/Generated/Extensions/FabricExtensions.cs @@ -82,7 +82,7 @@ public static FabricCapacityCollection GetFabricCapacities(this ResourceGroupRes /// /// /// Default Api Version - /// 2023-11-01 + /// 2025-01-15-preview /// /// /// Resource @@ -120,7 +120,7 @@ public static async Task> GetFabricCapacityAsyn /// /// /// Default Api Version - /// 2023-11-01 + /// 2025-01-15-preview /// /// /// Resource @@ -158,7 +158,7 @@ public static Response GetFabricCapacity(this ResourceGr /// /// /// Default Api Version - /// 2023-11-01 + /// 2025-01-15-preview /// /// /// Resource @@ -194,7 +194,7 @@ public static AsyncPageable GetFabricCapacitiesAsync(thi /// /// /// Default Api Version - /// 2023-11-01 + /// 2025-01-15-preview /// /// /// Resource @@ -230,7 +230,7 @@ public static Pageable GetFabricCapacities(this Subscrip /// /// /// Default Api Version - /// 2023-11-01 + /// 2025-01-15-preview /// /// /// Resource @@ -267,7 +267,7 @@ public static async Task> CheckFabricCapa /// /// /// Default Api Version - /// 2023-11-01 + /// 2025-01-15-preview /// /// /// Resource @@ -304,7 +304,7 @@ public static Response CheckFabricCapacityNameAvai /// /// /// Default Api Version - /// 2023-11-01 + /// 2025-01-15-preview /// /// /// Resource @@ -340,7 +340,7 @@ public static AsyncPageable GetSkusFabricCapacit /// /// /// Default Api Version - /// 2023-11-01 + /// 2025-01-15-preview /// /// /// Resource @@ -362,5 +362,81 @@ public static Pageable GetSkusFabricCapacities(t return GetMockableFabricSubscriptionResource(subscriptionResource).GetSkusFabricCapacities(cancellationToken); } + + /// + /// List the current consumption and limit in this location for the provided subscription + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Fabric/locations/{location}/usages + /// + /// + /// Operation Id + /// FabricCapacities_ListUsages + /// + /// + /// Default Api Version + /// 2025-01-15-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The location name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + /// An async collection of that may take multiple service requests to iterate over. + public static AsyncPageable GetUsagesFabricCapacitiesAsync(this SubscriptionResource subscriptionResource, string location, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); + + return GetMockableFabricSubscriptionResource(subscriptionResource).GetUsagesFabricCapacitiesAsync(location, cancellationToken); + } + + /// + /// List the current consumption and limit in this location for the provided subscription + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Fabric/locations/{location}/usages + /// + /// + /// Operation Id + /// FabricCapacities_ListUsages + /// + /// + /// Default Api Version + /// 2025-01-15-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The location name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + /// A collection of that may take multiple service requests to iterate over. + public static Pageable GetUsagesFabricCapacities(this SubscriptionResource subscriptionResource, string location, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); + + return GetMockableFabricSubscriptionResource(subscriptionResource).GetUsagesFabricCapacities(location, cancellationToken); + } } } diff --git a/sdk/fabric/Azure.ResourceManager.Fabric/src/Generated/Extensions/MockableFabricResourceGroupResource.cs b/sdk/fabric/Azure.ResourceManager.Fabric/src/Generated/Extensions/MockableFabricResourceGroupResource.cs index 889c9fd5efe8..3b568590ab79 100644 --- a/sdk/fabric/Azure.ResourceManager.Fabric/src/Generated/Extensions/MockableFabricResourceGroupResource.cs +++ b/sdk/fabric/Azure.ResourceManager.Fabric/src/Generated/Extensions/MockableFabricResourceGroupResource.cs @@ -53,7 +53,7 @@ public virtual FabricCapacityCollection GetFabricCapacities() /// /// /// Default Api Version - /// 2023-11-01 + /// 2025-01-15-preview /// /// /// Resource @@ -84,7 +84,7 @@ public virtual async Task> GetFabricCapacityAsy /// /// /// Default Api Version - /// 2023-11-01 + /// 2025-01-15-preview /// /// /// Resource diff --git a/sdk/fabric/Azure.ResourceManager.Fabric/src/Generated/Extensions/MockableFabricSubscriptionResource.cs b/sdk/fabric/Azure.ResourceManager.Fabric/src/Generated/Extensions/MockableFabricSubscriptionResource.cs index 713a6f250fc9..4acb11840856 100644 --- a/sdk/fabric/Azure.ResourceManager.Fabric/src/Generated/Extensions/MockableFabricSubscriptionResource.cs +++ b/sdk/fabric/Azure.ResourceManager.Fabric/src/Generated/Extensions/MockableFabricSubscriptionResource.cs @@ -55,7 +55,7 @@ private string GetApiVersionOrNull(ResourceType resourceType) /// /// /// Default Api Version - /// 2023-11-01 + /// 2025-01-15-preview /// /// /// Resource @@ -85,7 +85,7 @@ public virtual AsyncPageable GetFabricCapacitiesAsync(Ca /// /// /// Default Api Version - /// 2023-11-01 + /// 2025-01-15-preview /// /// /// Resource @@ -115,7 +115,7 @@ public virtual Pageable GetFabricCapacities(Cancellation /// /// /// Default Api Version - /// 2023-11-01 + /// 2025-01-15-preview /// /// /// Resource @@ -158,7 +158,7 @@ public virtual async Task> CheckFabricCap /// /// /// Default Api Version - /// 2023-11-01 + /// 2025-01-15-preview /// /// /// Resource @@ -201,7 +201,7 @@ public virtual Response CheckFabricCapacityNameAva /// /// /// Default Api Version - /// 2023-11-01 + /// 2025-01-15-preview /// /// /// Resource @@ -231,7 +231,7 @@ public virtual AsyncPageable GetSkusFabricCapaci /// /// /// Default Api Version - /// 2023-11-01 + /// 2025-01-15-preview /// /// /// Resource @@ -247,5 +247,75 @@ public virtual Pageable GetSkusFabricCapacities( HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => FabricCapacityRestClient.CreateListSkusNextPageRequest(nextLink, Id.SubscriptionId); return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => FabricSkuDetailsForNewCapacity.DeserializeFabricSkuDetailsForNewCapacity(e), FabricCapacityClientDiagnostics, Pipeline, "MockableFabricSubscriptionResource.GetSkusFabricCapacities", "value", "nextLink", cancellationToken); } + + /// + /// List the current consumption and limit in this location for the provided subscription + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Fabric/locations/{location}/usages + /// + /// + /// Operation Id + /// FabricCapacities_ListUsages + /// + /// + /// Default Api Version + /// 2025-01-15-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The location name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetUsagesFabricCapacitiesAsync(string location, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(location, nameof(location)); + + HttpMessage FirstPageRequest(int? pageSizeHint) => FabricCapacityRestClient.CreateListUsagesRequest(Id.SubscriptionId, location); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => FabricCapacityRestClient.CreateListUsagesNextPageRequest(nextLink, Id.SubscriptionId, location); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => FabricQuota.DeserializeFabricQuota(e), FabricCapacityClientDiagnostics, Pipeline, "MockableFabricSubscriptionResource.GetUsagesFabricCapacities", "value", "nextLink", cancellationToken); + } + + /// + /// List the current consumption and limit in this location for the provided subscription + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Fabric/locations/{location}/usages + /// + /// + /// Operation Id + /// FabricCapacities_ListUsages + /// + /// + /// Default Api Version + /// 2025-01-15-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The location name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetUsagesFabricCapacities(string location, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(location, nameof(location)); + + HttpMessage FirstPageRequest(int? pageSizeHint) => FabricCapacityRestClient.CreateListUsagesRequest(Id.SubscriptionId, location); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => FabricCapacityRestClient.CreateListUsagesNextPageRequest(nextLink, Id.SubscriptionId, location); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => FabricQuota.DeserializeFabricQuota(e), FabricCapacityClientDiagnostics, Pipeline, "MockableFabricSubscriptionResource.GetUsagesFabricCapacities", "value", "nextLink", cancellationToken); + } } } diff --git a/sdk/fabric/Azure.ResourceManager.Fabric/src/Generated/FabricCapacityCollection.cs b/sdk/fabric/Azure.ResourceManager.Fabric/src/Generated/FabricCapacityCollection.cs index db3ef094894a..a26c2e3dcae7 100644 --- a/sdk/fabric/Azure.ResourceManager.Fabric/src/Generated/FabricCapacityCollection.cs +++ b/sdk/fabric/Azure.ResourceManager.Fabric/src/Generated/FabricCapacityCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-11-01 + /// 2025-01-15-preview /// /// /// Resource @@ -114,7 +114,7 @@ public virtual async Task> CreateOrUpdateAs /// /// /// Default Api Version - /// 2023-11-01 + /// 2025-01-15-preview /// /// /// Resource @@ -163,7 +163,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil wai /// /// /// Default Api Version - /// 2023-11-01 + /// 2025-01-15-preview /// /// /// Resource @@ -208,7 +208,7 @@ public virtual async Task> GetAsync(string capa /// /// /// Default Api Version - /// 2023-11-01 + /// 2025-01-15-preview /// /// /// Resource @@ -253,7 +253,7 @@ public virtual Response Get(string capacityName, Cancell /// /// /// Default Api Version - /// 2023-11-01 + /// 2025-01-15-preview /// /// /// Resource @@ -283,7 +283,7 @@ public virtual AsyncPageable GetAllAsync(CancellationTok /// /// /// Default Api Version - /// 2023-11-01 + /// 2025-01-15-preview /// /// /// Resource @@ -313,7 +313,7 @@ public virtual Pageable GetAll(CancellationToken cancell /// /// /// Default Api Version - /// 2023-11-01 + /// 2025-01-15-preview /// /// /// Resource @@ -356,7 +356,7 @@ public virtual async Task> ExistsAsync(string capacityName, Cance /// /// /// Default Api Version - /// 2023-11-01 + /// 2025-01-15-preview /// /// /// Resource @@ -399,7 +399,7 @@ public virtual Response Exists(string capacityName, CancellationToken canc /// /// /// Default Api Version - /// 2023-11-01 + /// 2025-01-15-preview /// /// /// Resource @@ -444,7 +444,7 @@ public virtual async Task> GetIfExistsA /// /// /// Default Api Version - /// 2023-11-01 + /// 2025-01-15-preview /// /// /// Resource diff --git a/sdk/fabric/Azure.ResourceManager.Fabric/src/Generated/FabricCapacityResource.cs b/sdk/fabric/Azure.ResourceManager.Fabric/src/Generated/FabricCapacityResource.cs index 646a5cf80b01..721decb55e7d 100644 --- a/sdk/fabric/Azure.ResourceManager.Fabric/src/Generated/FabricCapacityResource.cs +++ b/sdk/fabric/Azure.ResourceManager.Fabric/src/Generated/FabricCapacityResource.cs @@ -104,7 +104,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-11-01 + /// 2025-01-15-preview /// /// /// Resource @@ -144,7 +144,7 @@ public virtual async Task> GetAsync(Cancellatio /// /// /// Default Api Version - /// 2023-11-01 + /// 2025-01-15-preview /// /// /// Resource @@ -184,7 +184,7 @@ public virtual Response Get(CancellationToken cancellati /// /// /// Default Api Version - /// 2023-11-01 + /// 2025-01-15-preview /// /// /// Resource @@ -226,7 +226,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2023-11-01 + /// 2025-01-15-preview /// /// /// Resource @@ -268,7 +268,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2023-11-01 + /// 2025-01-15-preview /// /// /// Resource @@ -314,7 +314,7 @@ public virtual async Task> UpdateAsync(Wait /// /// /// Default Api Version - /// 2023-11-01 + /// 2025-01-15-preview /// /// /// Resource @@ -360,7 +360,7 @@ public virtual ArmOperation Update(WaitUntil waitUntil, /// /// /// Default Api Version - /// 2023-11-01 + /// 2025-01-15-preview /// /// /// Resource @@ -402,7 +402,7 @@ public virtual async Task ResumeAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2023-11-01 + /// 2025-01-15-preview /// /// /// Resource @@ -444,7 +444,7 @@ public virtual ArmOperation Resume(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2023-11-01 + /// 2025-01-15-preview /// /// /// Resource @@ -486,7 +486,7 @@ public virtual async Task SuspendAsync(WaitUntil waitUntil, Cancel /// /// /// Default Api Version - /// 2023-11-01 + /// 2025-01-15-preview /// /// /// Resource @@ -528,7 +528,7 @@ public virtual ArmOperation Suspend(WaitUntil waitUntil, CancellationToken cance /// /// /// Default Api Version - /// 2023-11-01 + /// 2025-01-15-preview /// /// /// Resource @@ -558,7 +558,7 @@ public virtual AsyncPageable GetSkusForCapa /// /// /// Default Api Version - /// 2023-11-01 + /// 2025-01-15-preview /// /// /// Resource @@ -588,7 +588,7 @@ public virtual Pageable GetSkusForCapacity( /// /// /// Default Api Version - /// 2023-11-01 + /// 2025-01-15-preview /// /// /// Resource @@ -650,7 +650,7 @@ public virtual async Task> AddTagAsync(string k /// /// /// Default Api Version - /// 2023-11-01 + /// 2025-01-15-preview /// /// /// Resource @@ -712,7 +712,7 @@ public virtual Response AddTag(string key, string value, /// /// /// Default Api Version - /// 2023-11-01 + /// 2025-01-15-preview /// /// /// Resource @@ -769,7 +769,7 @@ public virtual async Task> SetTagsAsync(IDictio /// /// /// Default Api Version - /// 2023-11-01 + /// 2025-01-15-preview /// /// /// Resource @@ -826,7 +826,7 @@ public virtual Response SetTags(IDictionary /// /// Default Api Version - /// 2023-11-01 + /// 2025-01-15-preview /// /// /// Resource @@ -886,7 +886,7 @@ public virtual async Task> RemoveTagAsync(strin /// /// /// Default Api Version - /// 2023-11-01 + /// 2025-01-15-preview /// /// /// Resource diff --git a/sdk/fabric/Azure.ResourceManager.Fabric/src/Generated/Models/FabricQuota.Serialization.cs b/sdk/fabric/Azure.ResourceManager.Fabric/src/Generated/Models/FabricQuota.Serialization.cs new file mode 100644 index 000000000000..3ab7cfb825b0 --- /dev/null +++ b/sdk/fabric/Azure.ResourceManager.Fabric/src/Generated/Models/FabricQuota.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.Fabric.Models +{ + public partial class FabricQuota : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(FabricQuota)} does not support writing '{format}' format."); + } + + if (options.Format != "W" && Optional.IsDefined(Name)) + { + writer.WritePropertyName("name"u8); + writer.WriteObjectValue(Name, options); + } + writer.WritePropertyName("unit"u8); + writer.WriteStringValue(Unit); + writer.WritePropertyName("currentValue"u8); + writer.WriteNumberValue(CurrentValue); + writer.WritePropertyName("limit"u8); + writer.WriteNumberValue(Limit); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + FabricQuota IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(FabricQuota)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeFabricQuota(document.RootElement, options); + } + + internal static FabricQuota DeserializeFabricQuota(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + QuotaName name = default; + string unit = default; + long currentValue = default; + long limit = 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 = QuotaName.DeserializeQuotaName(property.Value, options); + continue; + } + if (property.NameEquals("unit"u8)) + { + unit = property.Value.GetString(); + continue; + } + if (property.NameEquals("currentValue"u8)) + { + currentValue = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("limit"u8)) + { + limit = property.Value.GetInt64(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new FabricQuota(name, unit, currentValue, limit, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(FabricQuota)} does not support writing '{options.Format}' format."); + } + } + + FabricQuota IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeFabricQuota(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(FabricQuota)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/fabric/Azure.ResourceManager.Fabric/src/Generated/Models/FabricQuota.cs b/sdk/fabric/Azure.ResourceManager.Fabric/src/Generated/Models/FabricQuota.cs new file mode 100644 index 000000000000..44b2e23c9f80 --- /dev/null +++ b/sdk/fabric/Azure.ResourceManager.Fabric/src/Generated/Models/FabricQuota.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.Fabric.Models +{ + /// Describes Resource Quota. + public partial class FabricQuota + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// 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 unit of usage measurement. + /// The current usage of the resource. + /// The maximum permitted usage of the resource. + /// is null. + internal FabricQuota(string unit, long currentValue, long limit) + { + Argument.AssertNotNull(unit, nameof(unit)); + + Unit = unit; + CurrentValue = currentValue; + Limit = limit; + } + + /// Initializes a new instance of . + /// The name of the quota. + /// The unit of usage measurement. + /// The current usage of the resource. + /// The maximum permitted usage of the resource. + /// Keeps track of any properties unknown to the library. + internal FabricQuota(QuotaName name, string unit, long currentValue, long limit, IDictionary serializedAdditionalRawData) + { + Name = name; + Unit = unit; + CurrentValue = currentValue; + Limit = limit; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal FabricQuota() + { + } + + /// The name of the quota. + public QuotaName Name { get; } + /// The unit of usage measurement. + public string Unit { get; } + /// The current usage of the resource. + public long CurrentValue { get; } + /// The maximum permitted usage of the resource. + public long Limit { get; } + } +} diff --git a/sdk/fabric/Azure.ResourceManager.Fabric/src/Generated/Models/PagedQuota.Serialization.cs b/sdk/fabric/Azure.ResourceManager.Fabric/src/Generated/Models/PagedQuota.Serialization.cs new file mode 100644 index 000000000000..65e95624e4a0 --- /dev/null +++ b/sdk/fabric/Azure.ResourceManager.Fabric/src/Generated/Models/PagedQuota.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.Fabric.Models +{ + internal partial class PagedQuota : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(PagedQuota)} 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 + } + } + } + + PagedQuota IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(PagedQuota)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializePagedQuota(document.RootElement, options); + } + + internal static PagedQuota DeserializePagedQuota(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(FabricQuota.DeserializeFabricQuota(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 PagedQuota(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(PagedQuota)} does not support writing '{options.Format}' format."); + } + } + + PagedQuota IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializePagedQuota(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(PagedQuota)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/fabric/Azure.ResourceManager.Fabric/src/Generated/Models/PagedQuota.cs b/sdk/fabric/Azure.ResourceManager.Fabric/src/Generated/Models/PagedQuota.cs new file mode 100644 index 000000000000..9126a94eba10 --- /dev/null +++ b/sdk/fabric/Azure.ResourceManager.Fabric/src/Generated/Models/PagedQuota.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.Fabric.Models +{ + /// Paged collection of Quota items. + internal partial class PagedQuota + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// 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 Quota items on this page. + /// is null. + internal PagedQuota(IEnumerable value) + { + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); + } + + /// Initializes a new instance of . + /// The Quota items on this page. + /// The link to the next page of items. + /// Keeps track of any properties unknown to the library. + internal PagedQuota(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) + { + Value = value; + NextLink = nextLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal PagedQuota() + { + } + + /// The Quota items on this page. + public IReadOnlyList Value { get; } + /// The link to the next page of items. + public Uri NextLink { get; } + } +} diff --git a/sdk/fabric/Azure.ResourceManager.Fabric/src/Generated/Models/QuotaName.Serialization.cs b/sdk/fabric/Azure.ResourceManager.Fabric/src/Generated/Models/QuotaName.Serialization.cs new file mode 100644 index 000000000000..4580eef46c42 --- /dev/null +++ b/sdk/fabric/Azure.ResourceManager.Fabric/src/Generated/Models/QuotaName.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.Fabric.Models +{ + public partial class QuotaName : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(QuotaName)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(Value)) + { + writer.WritePropertyName("value"u8); + writer.WriteStringValue(Value); + } + if (Optional.IsDefined(LocalizedValue)) + { + writer.WritePropertyName("localizedValue"u8); + writer.WriteStringValue(LocalizedValue); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + QuotaName IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(QuotaName)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeQuotaName(document.RootElement, options); + } + + internal static QuotaName DeserializeQuotaName(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string value = default; + string localizedValue = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value"u8)) + { + value = property.Value.GetString(); + continue; + } + if (property.NameEquals("localizedValue"u8)) + { + localizedValue = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new QuotaName(value, localizedValue, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(QuotaName)} does not support writing '{options.Format}' format."); + } + } + + QuotaName IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeQuotaName(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(QuotaName)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/fabric/Azure.ResourceManager.Fabric/src/Generated/Models/QuotaName.cs b/sdk/fabric/Azure.ResourceManager.Fabric/src/Generated/Models/QuotaName.cs new file mode 100644 index 000000000000..2cc074030df6 --- /dev/null +++ b/sdk/fabric/Azure.ResourceManager.Fabric/src/Generated/Models/QuotaName.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.Fabric.Models +{ + /// The Quota Names. + public partial class QuotaName + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// 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 QuotaName() + { + } + + /// Initializes a new instance of . + /// The name of the resource. + /// The localized name of the resource. + /// Keeps track of any properties unknown to the library. + internal QuotaName(string value, string localizedValue, IDictionary serializedAdditionalRawData) + { + Value = value; + LocalizedValue = localizedValue; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The name of the resource. + public string Value { get; } + /// The localized name of the resource. + public string LocalizedValue { get; } + } +} diff --git a/sdk/fabric/Azure.ResourceManager.Fabric/src/Generated/RestOperations/FabricCapacitiesRestOperations.cs b/sdk/fabric/Azure.ResourceManager.Fabric/src/Generated/RestOperations/FabricCapacitiesRestOperations.cs index b51c46a4686a..1f6ede6ea9e0 100644 --- a/sdk/fabric/Azure.ResourceManager.Fabric/src/Generated/RestOperations/FabricCapacitiesRestOperations.cs +++ b/sdk/fabric/Azure.ResourceManager.Fabric/src/Generated/RestOperations/FabricCapacitiesRestOperations.cs @@ -32,7 +32,7 @@ public FabricCapacitiesRestOperations(HttpPipeline pipeline, string applicationI { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-11-01"; + _apiVersion = apiVersion ?? "2025-01-15-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -1000,6 +1000,92 @@ public Response ListSkus(string subscripti } } + internal RequestUriBuilder CreateListUsagesRequestUri(string subscriptionId, string location) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Microsoft.Fabric/locations/", false); + uri.AppendPath(location, true); + uri.AppendPath("/usages", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListUsagesRequest(string subscriptionId, string 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/Microsoft.Fabric/locations/", false); + uri.AppendPath(location, true); + uri.AppendPath("/usages", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List the current consumption and limit in this location for the provided subscription. + /// The ID of the target subscription. The value must be an UUID. + /// The location name. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + public async Task> ListUsagesAsync(string subscriptionId, string location, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(location, nameof(location)); + + using var message = CreateListUsagesRequest(subscriptionId, location); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + PagedQuota value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = PagedQuota.DeserializePagedQuota(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List the current consumption and limit in this location for the provided subscription. + /// The ID of the target subscription. The value must be an UUID. + /// The location name. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + public Response ListUsages(string subscriptionId, string location, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(location, nameof(location)); + + using var message = CreateListUsagesRequest(subscriptionId, location); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + PagedQuota value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = PagedQuota.DeserializePagedQuota(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(); @@ -1315,5 +1401,85 @@ public Response ListSkusNextPage(string ne throw new RequestFailedException(message.Response); } } + + internal RequestUriBuilder CreateListUsagesNextPageRequestUri(string nextLink, string subscriptionId, string location) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListUsagesNextPageRequest(string nextLink, string subscriptionId, string 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 the current consumption and limit in this location for the provided subscription. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The location name. + /// The cancellation token to use. + /// , or is null. + /// or is an empty string, and was expected to be non-empty. + public async Task> ListUsagesNextPageAsync(string nextLink, string subscriptionId, string location, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(location, nameof(location)); + + using var message = CreateListUsagesNextPageRequest(nextLink, subscriptionId, location); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + PagedQuota value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = PagedQuota.DeserializePagedQuota(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List the current consumption and limit in this location for the provided subscription. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The location name. + /// The cancellation token to use. + /// , or is null. + /// or is an empty string, and was expected to be non-empty. + public Response ListUsagesNextPage(string nextLink, string subscriptionId, string location, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(location, nameof(location)); + + using var message = CreateListUsagesNextPageRequest(nextLink, subscriptionId, location); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + PagedQuota value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = PagedQuota.DeserializePagedQuota(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } } } diff --git a/sdk/fabric/Azure.ResourceManager.Fabric/tsp-location.yaml b/sdk/fabric/Azure.ResourceManager.Fabric/tsp-location.yaml index f38d63b37a0c..8ff44bf8ad65 100644 --- a/sdk/fabric/Azure.ResourceManager.Fabric/tsp-location.yaml +++ b/sdk/fabric/Azure.ResourceManager.Fabric/tsp-location.yaml @@ -1,3 +1,4 @@ directory: specification/fabric/Microsoft.Fabric.Management -commit: d055a09b43410be13ea7ba81d6e1c64d7b10043c +commit: 6e702986ee542ebd38d0ab2e2f2c00ab48a50b45 repo: Azure/azure-rest-api-specs +additionalDirectories: diff --git a/sdk/healthdataaiservices/Azure.ResourceManager.HealthDataAIServices/Configuration.json b/sdk/healthdataaiservices/Azure.ResourceManager.HealthDataAIServices/Configuration.json new file mode 100644 index 000000000000..dc18213719b4 --- /dev/null +++ b/sdk/healthdataaiservices/Azure.ResourceManager.HealthDataAIServices/Configuration.json @@ -0,0 +1,12 @@ +{ + "output-folder": ".", + "namespace": "Azure.ResourceManager.HealthDataAIServices", + "library-name": "Azure.ResourceManager.HealthDataAIServices", + "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/healthdataaiservices/Azure.ResourceManager.HealthDataAIServices/tsp-location.yaml b/sdk/healthdataaiservices/Azure.ResourceManager.HealthDataAIServices/tsp-location.yaml index 9eea9922a67b..f5625d33965e 100644 --- a/sdk/healthdataaiservices/Azure.ResourceManager.HealthDataAIServices/tsp-location.yaml +++ b/sdk/healthdataaiservices/Azure.ResourceManager.HealthDataAIServices/tsp-location.yaml @@ -1,3 +1,4 @@ directory: specification/healthdataaiservices/HealthDataAIServices.Management -commit: b0a48bcbffead733affe03944ef09f5e8d12f8c8 +commit: 6e702986ee542ebd38d0ab2e2f2c00ab48a50b45 repo: Azure/azure-rest-api-specs +additionalDirectories: diff --git a/sdk/healthdataaiservices/Azure.ResourceManager.HealthDataAIServices/tspCodeModel.json b/sdk/healthdataaiservices/Azure.ResourceManager.HealthDataAIServices/tspCodeModel.json new file mode 100644 index 000000000000..bcae47466911 --- /dev/null +++ b/sdk/healthdataaiservices/Azure.ResourceManager.HealthDataAIServices/tspCodeModel.json @@ -0,0 +1,10426 @@ +{ + "$id": "1", + "name": "Microsoft.HealthDataAIServices", + "apiVersions": [ + "2024-09-20" + ], + "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.HealthDataAIServices", + "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.HealthDataAIServices", + "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": "HealthDataAIServicesProvisioningState", + "crossLanguageDefinitionId": "Microsoft.HealthDataAIServices.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": "The resource is being 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": "The resource is being updated.", + "decorators": [] + }, + { + "$id": "26", + "kind": "enumvalue", + "name": "Deleting", + "value": "Deleting", + "valueType": { + "$id": "27", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "14" + }, + "doc": "The resource is being deleted.", + "decorators": [] + }, + { + "$id": "28", + "kind": "enumvalue", + "name": "Accepted", + "value": "Accepted", + "valueType": { + "$id": "29", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "14" + }, + "doc": "The resource provisioning request has been accepted.", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.HealthDataAIServices", + "doc": "The status of the current operation.", + "isFixed": false, + "isFlags": false, + "usage": "Output,Json,LroInitial,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "30", + "kind": "enum", + "name": "PrivateEndpointServiceConnectionStatus", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.PrivateEndpointServiceConnectionStatus", + "valueType": { + "$id": "31", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "32", + "kind": "enumvalue", + "name": "Pending", + "value": "Pending", + "valueType": { + "$id": "33", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "30" + }, + "doc": "Connectionaiting for approval or rejection", + "decorators": [] + }, + { + "$id": "34", + "kind": "enumvalue", + "name": "Approved", + "value": "Approved", + "valueType": { + "$id": "35", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "30" + }, + "doc": "Connection approved", + "decorators": [] + }, + { + "$id": "36", + "kind": "enumvalue", + "name": "Rejected", + "value": "Rejected", + "valueType": { + "$id": "37", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "30" + }, + "doc": "Connection Rejected", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.HealthDataAIServices", + "doc": "The private endpoint connection status.", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "38", + "kind": "enum", + "name": "PrivateEndpointConnectionProvisioningState", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.PrivateEndpointConnectionProvisioningState", + "valueType": { + "$id": "39", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "40", + "kind": "enumvalue", + "name": "Succeeded", + "value": "Succeeded", + "valueType": { + "$id": "41", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "38" + }, + "doc": "Connection has been provisioned", + "decorators": [] + }, + { + "$id": "42", + "kind": "enumvalue", + "name": "Creating", + "value": "Creating", + "valueType": { + "$id": "43", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "38" + }, + "doc": "Connection is being created", + "decorators": [] + }, + { + "$id": "44", + "kind": "enumvalue", + "name": "Deleting", + "value": "Deleting", + "valueType": { + "$id": "45", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "38" + }, + "doc": "Connection is being deleted", + "decorators": [] + }, + { + "$id": "46", + "kind": "enumvalue", + "name": "Failed", + "value": "Failed", + "valueType": { + "$id": "47", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "38" + }, + "doc": "Connection provisioning has failed", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.HealthDataAIServices", + "doc": "The current provisioning state.", + "isFixed": false, + "isFlags": false, + "usage": "Output,Json,LroInitial,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "48", + "kind": "enum", + "name": "createdByType", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.createdByType", + "valueType": { + "$id": "49", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "50", + "kind": "enumvalue", + "name": "User", + "value": "User", + "valueType": { + "$id": "51", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "48" + }, + "doc": "The entity was created by a user.", + "decorators": [] + }, + { + "$id": "52", + "kind": "enumvalue", + "name": "Application", + "value": "Application", + "valueType": { + "$id": "53", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "48" + }, + "doc": "The entity was created by an application.", + "decorators": [] + }, + { + "$id": "54", + "kind": "enumvalue", + "name": "ManagedIdentity", + "value": "ManagedIdentity", + "valueType": { + "$id": "55", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "48" + }, + "doc": "The entity was created by a managed identity.", + "decorators": [] + }, + { + "$id": "56", + "kind": "enumvalue", + "name": "Key", + "value": "Key", + "valueType": { + "$id": "57", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "48" + }, + "doc": "The entity was created by a key.", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.HealthDataAIServices", + "doc": "The kind of entity that created the resource.", + "isFixed": false, + "isFlags": false, + "usage": "Output,Json,LroInitial,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "58", + "kind": "enum", + "name": "HealthDataAIServicesPublicNetworkAccess", + "crossLanguageDefinitionId": "Microsoft.HealthDataAIServices.PublicNetworkAccess", + "valueType": { + "$id": "59", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "60", + "kind": "enumvalue", + "name": "Enabled", + "value": "Enabled", + "valueType": { + "$id": "61", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "58" + }, + "doc": "The public network access is enabled", + "decorators": [] + }, + { + "$id": "62", + "kind": "enumvalue", + "name": "Disabled", + "value": "Disabled", + "valueType": { + "$id": "63", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "58" + }, + "doc": "The public network access is disabled", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.HealthDataAIServices", + "doc": "State of the public network access.", + "isFixed": true, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "64", + "kind": "enum", + "name": "ManagedServiceIdentityType", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ManagedServiceIdentityType", + "valueType": { + "$id": "65", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "66", + "kind": "enumvalue", + "name": "None", + "value": "None", + "valueType": { + "$id": "67", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "64" + }, + "doc": "No managed identity.", + "decorators": [] + }, + { + "$id": "68", + "kind": "enumvalue", + "name": "SystemAssigned", + "value": "SystemAssigned", + "valueType": { + "$id": "69", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "64" + }, + "doc": "System assigned managed identity.", + "decorators": [] + }, + { + "$id": "70", + "kind": "enumvalue", + "name": "UserAssigned", + "value": "UserAssigned", + "valueType": { + "$id": "71", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "64" + }, + "doc": "User assigned managed identity.", + "decorators": [] + }, + { + "$id": "72", + "kind": "enumvalue", + "name": "SystemAssigned,UserAssigned", + "value": "SystemAssigned,UserAssigned", + "valueType": { + "$id": "73", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "64" + }, + "doc": "System and user assigned managed identity.", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.HealthDataAIServices", + "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": "74", + "kind": "enum", + "name": "ResourceProvisioningState", + "crossLanguageDefinitionId": "Azure.ResourceManager.ResourceProvisioningState", + "valueType": { + "$id": "75", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "76", + "kind": "enumvalue", + "name": "Succeeded", + "value": "Succeeded", + "valueType": { + "$id": "77", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "74" + }, + "doc": "Resource has been created.", + "decorators": [] + }, + { + "$id": "78", + "kind": "enumvalue", + "name": "Failed", + "value": "Failed", + "valueType": { + "$id": "79", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "74" + }, + "doc": "Resource creation failed.", + "decorators": [] + }, + { + "$id": "80", + "kind": "enumvalue", + "name": "Canceled", + "value": "Canceled", + "valueType": { + "$id": "81", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "74" + }, + "doc": "Resource creation was canceled.", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.HealthDataAIServices", + "doc": "The provisioning state of a resource type.", + "isFixed": false, + "isFlags": false, + "usage": "LroPolling", + "decorators": [] + }, + { + "$id": "82", + "kind": "enum", + "name": "Versions", + "crossLanguageDefinitionId": "Microsoft.HealthDataAIServices.Versions", + "valueType": { + "$id": "83", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "84", + "kind": "enumvalue", + "name": "v2024_09_20", + "value": "2024-09-20", + "valueType": { + "$id": "85", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "82" + }, + "doc": "The 2024-09-20 version.", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.HealthDataAIServices", + "doc": "Supported API versions for the Microsoft.HealthDataAIServices resource provider.", + "isFixed": true, + "isFlags": false, + "usage": "ApiVersionEnum", + "decorators": [] + } + ], + "models": [ + { + "$id": "86", + "kind": "model", + "name": "OperationListResult", + "namespace": "Azure.ResourceManager.HealthDataAIServices", + "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": "87", + "kind": "property", + "name": "value", + "serializedName": "value", + "doc": "The Operation items on this page", + "type": { + "$id": "88", + "kind": "array", + "name": "ArrayOperation", + "valueType": { + "$id": "89", + "kind": "model", + "name": "Operation", + "namespace": "Azure.ResourceManager.HealthDataAIServices", + "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": "90", + "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": "91", + "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": "92", + "json": { + "$id": "93", + "name": "name" + } + } + }, + { + "$id": "94", + "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": "95", + "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": "96", + "json": { + "$id": "97", + "name": "isDataAction" + } + } + }, + { + "$id": "98", + "kind": "property", + "name": "display", + "serializedName": "display", + "doc": "Localized display information for this particular operation.", + "type": { + "$id": "99", + "kind": "model", + "name": "OperationDisplay", + "namespace": "Azure.ResourceManager.HealthDataAIServices", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.OperationDisplay", + "usage": "Output,Json", + "doc": "Localized display information for and operation.", + "decorators": [], + "properties": [ + { + "$id": "100", + "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": "101", + "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": "102", + "json": { + "$id": "103", + "name": "provider" + } + } + }, + { + "$id": "104", + "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": "105", + "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": "106", + "json": { + "$id": "107", + "name": "resource" + } + } + }, + { + "$id": "108", + "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": "109", + "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": "110", + "json": { + "$id": "111", + "name": "operation" + } + } + }, + { + "$id": "112", + "kind": "property", + "name": "description", + "serializedName": "description", + "doc": "The short, localized friendly description of the operation; suitable for tool tips and detailed views.", + "type": { + "$id": "113", + "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": "114", + "json": { + "$id": "115", + "name": "description" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.Operation.display", + "serializationOptions": { + "$id": "116", + "json": { + "$id": "117", + "name": "display" + } + } + }, + { + "$id": "118", + "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": "119", + "json": { + "$id": "120", + "name": "origin" + } + } + }, + { + "$id": "121", + "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": "122", + "json": { + "$id": "123", + "name": "actionType" + } + } + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.OperationListResult.value", + "serializationOptions": { + "$id": "124", + "json": { + "$id": "125", + "name": "value" + } + } + }, + { + "$id": "126", + "kind": "property", + "name": "nextLink", + "serializedName": "nextLink", + "doc": "The link to the next page of items", + "type": { + "$id": "127", + "kind": "url", + "name": "ResourceLocation", + "crossLanguageDefinitionId": "TypeSpec.Rest.ResourceLocation", + "baseType": { + "$id": "128", + "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": "129", + "json": { + "$id": "130", + "name": "nextLink" + } + } + } + ] + }, + { + "$ref": "89" + }, + { + "$ref": "99" + }, + { + "$id": "131", + "kind": "model", + "name": "ErrorResponse", + "namespace": "Azure.ResourceManager.HealthDataAIServices", + "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": "132", + "kind": "property", + "name": "error", + "serializedName": "error", + "doc": "The error object.", + "type": { + "$id": "133", + "kind": "model", + "name": "ErrorDetail", + "namespace": "Azure.ResourceManager.HealthDataAIServices", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorDetail", + "usage": "Json,Exception,LroPolling", + "doc": "The error detail.", + "decorators": [], + "properties": [ + { + "$id": "134", + "kind": "property", + "name": "code", + "serializedName": "code", + "doc": "The error code.", + "type": { + "$id": "135", + "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": "136", + "json": { + "$id": "137", + "name": "code" + } + } + }, + { + "$id": "138", + "kind": "property", + "name": "message", + "serializedName": "message", + "doc": "The error message.", + "type": { + "$id": "139", + "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": "140", + "json": { + "$id": "141", + "name": "message" + } + } + }, + { + "$id": "142", + "kind": "property", + "name": "target", + "serializedName": "target", + "doc": "The error target.", + "type": { + "$id": "143", + "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": "144", + "json": { + "$id": "145", + "name": "target" + } + } + }, + { + "$id": "146", + "kind": "property", + "name": "details", + "serializedName": "details", + "doc": "The error details.", + "type": { + "$id": "147", + "kind": "array", + "name": "ArrayErrorDetail", + "valueType": { + "$ref": "133" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorDetail.details", + "serializationOptions": { + "$id": "148", + "json": { + "$id": "149", + "name": "details" + } + } + }, + { + "$id": "150", + "kind": "property", + "name": "additionalInfo", + "serializedName": "additionalInfo", + "doc": "The error additional info.", + "type": { + "$id": "151", + "kind": "array", + "name": "ArrayErrorAdditionalInfo", + "valueType": { + "$id": "152", + "kind": "model", + "name": "ErrorAdditionalInfo", + "namespace": "Azure.ResourceManager.HealthDataAIServices", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorAdditionalInfo", + "usage": "Json,Exception,LroPolling", + "doc": "The resource management error additional info.", + "decorators": [], + "properties": [ + { + "$id": "153", + "kind": "property", + "name": "type", + "serializedName": "type", + "doc": "The additional info type.", + "type": { + "$id": "154", + "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": "155", + "json": { + "$id": "156", + "name": "type" + } + } + }, + { + "$id": "157", + "kind": "property", + "name": "info", + "serializedName": "info", + "doc": "The additional info.", + "type": { + "$id": "158", + "kind": "model", + "name": "ErrorAdditionalInfoInfo", + "namespace": "Azure.ResourceManager.HealthDataAIServices", + "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": "159", + "json": { + "$id": "160", + "name": "info" + } + } + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorDetail.additionalInfo", + "serializationOptions": { + "$id": "161", + "json": { + "$id": "162", + "name": "additionalInfo" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorResponse.error", + "serializationOptions": { + "$id": "163", + "json": { + "$id": "164", + "name": "error" + } + } + } + ] + }, + { + "$ref": "133" + }, + { + "$ref": "152" + }, + { + "$ref": "158" + }, + { + "$id": "165", + "kind": "model", + "name": "DeidService", + "namespace": "Azure.ResourceManager.HealthDataAIServices", + "crossLanguageDefinitionId": "Microsoft.HealthDataAIServices.DeidService", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "A HealthDataAIServicesProviderHub resource", + "decorators": [], + "baseModel": { + "$id": "166", + "kind": "model", + "name": "TrackedResource", + "namespace": "Azure.ResourceManager.HealthDataAIServices", + "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": "167", + "kind": "model", + "name": "Resource", + "namespace": "Azure.ResourceManager.HealthDataAIServices", + "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": "168", + "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": "169", + "kind": "string", + "name": "armResourceIdentifier", + "crossLanguageDefinitionId": "Azure.Core.armResourceIdentifier", + "baseType": { + "$id": "170", + "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": "171", + "json": { + "$id": "172", + "name": "id" + } + } + }, + { + "$id": "173", + "kind": "property", + "name": "name", + "serializedName": "name", + "doc": "The name of the resource", + "type": { + "$id": "174", + "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": "175", + "json": { + "$id": "176", + "name": "name" + } + } + }, + { + "$id": "177", + "kind": "property", + "name": "type", + "serializedName": "type", + "doc": "The type of the resource. E.g. \"Microsoft.Compute/virtualMachines\" or \"Microsoft.Storage/storageAccounts\"", + "type": { + "$id": "178", + "kind": "string", + "name": "armResourceType", + "crossLanguageDefinitionId": "Azure.Core.armResourceType", + "baseType": { + "$id": "179", + "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": "180", + "json": { + "$id": "181", + "name": "type" + } + } + }, + { + "$id": "182", + "kind": "property", + "name": "systemData", + "serializedName": "systemData", + "doc": "Azure Resource Manager metadata containing createdBy and modifiedBy information.", + "type": { + "$id": "183", + "kind": "model", + "name": "SystemData", + "namespace": "Azure.ResourceManager.HealthDataAIServices", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.SystemData", + "usage": "Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Metadata pertaining to creation and last modification of the resource.", + "decorators": [], + "properties": [ + { + "$id": "184", + "kind": "property", + "name": "createdBy", + "serializedName": "createdBy", + "doc": "The identity that created the resource.", + "type": { + "$id": "185", + "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": "186", + "json": { + "$id": "187", + "name": "createdBy" + } + } + }, + { + "$id": "188", + "kind": "property", + "name": "createdByType", + "serializedName": "createdByType", + "doc": "The type of identity that created the resource.", + "type": { + "$ref": "48" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.SystemData.createdByType", + "serializationOptions": { + "$id": "189", + "json": { + "$id": "190", + "name": "createdByType" + } + } + }, + { + "$id": "191", + "kind": "property", + "name": "createdAt", + "serializedName": "createdAt", + "doc": "The timestamp of resource creation (UTC).", + "type": { + "$id": "192", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "rfc3339", + "wireType": { + "$id": "193", + "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": "194", + "json": { + "$id": "195", + "name": "createdAt" + } + } + }, + { + "$id": "196", + "kind": "property", + "name": "lastModifiedBy", + "serializedName": "lastModifiedBy", + "doc": "The identity that last modified the resource.", + "type": { + "$id": "197", + "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": "198", + "json": { + "$id": "199", + "name": "lastModifiedBy" + } + } + }, + { + "$id": "200", + "kind": "property", + "name": "lastModifiedByType", + "serializedName": "lastModifiedByType", + "doc": "The type of identity that last modified the resource.", + "type": { + "$ref": "48" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.SystemData.lastModifiedByType", + "serializationOptions": { + "$id": "201", + "json": { + "$id": "202", + "name": "lastModifiedByType" + } + } + }, + { + "$id": "203", + "kind": "property", + "name": "lastModifiedAt", + "serializedName": "lastModifiedAt", + "doc": "The timestamp of resource last modification (UTC)", + "type": { + "$id": "204", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "rfc3339", + "wireType": { + "$id": "205", + "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": "206", + "json": { + "$id": "207", + "name": "lastModifiedAt" + } + } + } + ] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.Resource.systemData", + "serializationOptions": { + "$id": "208", + "json": { + "$id": "209", + "name": "systemData" + } + } + } + ] + }, + "properties": [ + { + "$id": "210", + "kind": "property", + "name": "tags", + "serializedName": "tags", + "doc": "Resource tags.", + "type": { + "$id": "211", + "kind": "dict", + "keyType": { + "$id": "212", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "valueType": { + "$id": "213", + "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": "214", + "json": { + "$id": "215", + "name": "tags" + } + } + }, + { + "$id": "216", + "kind": "property", + "name": "location", + "serializedName": "location", + "doc": "The geo-location where the resource lives", + "type": { + "$id": "217", + "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": "218", + "json": { + "$id": "219", + "name": "location" + } + } + } + ] + }, + "properties": [ + { + "$id": "220", + "kind": "property", + "name": "properties", + "serializedName": "properties", + "doc": "The resource-specific properties for this resource.", + "type": { + "$id": "221", + "kind": "model", + "name": "DeidServiceProperties", + "namespace": "Azure.ResourceManager.HealthDataAIServices", + "crossLanguageDefinitionId": "Microsoft.HealthDataAIServices.DeidServiceProperties", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Details of the HealthDataAIServices DeidService.", + "decorators": [], + "properties": [ + { + "$id": "222", + "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.HealthDataAIServices.DeidServiceProperties.provisioningState", + "serializationOptions": { + "$id": "223", + "json": { + "$id": "224", + "name": "provisioningState" + } + } + }, + { + "$id": "225", + "kind": "property", + "name": "serviceUrl", + "serializedName": "serviceUrl", + "doc": "Deid service url.", + "type": { + "$id": "226", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.HealthDataAIServices.DeidServiceProperties.serviceUrl", + "serializationOptions": { + "$id": "227", + "json": { + "$id": "228", + "name": "serviceUrl" + } + } + }, + { + "$id": "229", + "kind": "property", + "name": "privateEndpointConnections", + "serializedName": "privateEndpointConnections", + "doc": "List of private endpoint connections.", + "type": { + "$id": "230", + "kind": "array", + "name": "ArrayPrivateEndpointConnection", + "valueType": { + "$id": "231", + "kind": "model", + "name": "PrivateEndpointConnection", + "namespace": "Azure.ResourceManager.HealthDataAIServices", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.PrivateEndpointConnection", + "usage": "Output,Json,LroInitial,LroFinalEnvelope", + "doc": "The private endpoint connection resource", + "decorators": [], + "baseModel": { + "$ref": "167" + }, + "properties": [ + { + "$id": "232", + "kind": "property", + "name": "properties", + "serializedName": "properties", + "doc": "The private endpoint connection properties", + "type": { + "$id": "233", + "kind": "model", + "name": "PrivateEndpointConnectionProperties", + "namespace": "Azure.ResourceManager.HealthDataAIServices", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.PrivateEndpointConnectionProperties", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Properties of the private endpoint connection.", + "decorators": [], + "properties": [ + { + "$id": "234", + "kind": "property", + "name": "groupIds", + "serializedName": "groupIds", + "doc": "The group ids for the private endpoint resource.", + "type": { + "$id": "235", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "236", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.PrivateEndpointConnectionProperties.groupIds", + "serializationOptions": { + "$id": "237", + "json": { + "$id": "238", + "name": "groupIds" + } + } + }, + { + "$id": "239", + "kind": "property", + "name": "privateEndpoint", + "serializedName": "privateEndpoint", + "doc": "The private endpoint resource.", + "type": { + "$id": "240", + "kind": "model", + "name": "PrivateEndpoint", + "namespace": "Azure.ResourceManager.HealthDataAIServices", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.PrivateEndpoint", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "The Private Endpoint resource.", + "decorators": [], + "properties": [ + { + "$id": "241", + "kind": "property", + "name": "id", + "serializedName": "id", + "doc": "The resource identifier for private endpoint", + "type": { + "$id": "242", + "kind": "string", + "name": "armResourceIdentifier", + "crossLanguageDefinitionId": "Azure.Core.armResourceIdentifier", + "baseType": { + "$id": "243", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.PrivateEndpoint.id", + "serializationOptions": { + "$id": "244", + "json": { + "$id": "245", + "name": "id" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.PrivateEndpointConnectionProperties.privateEndpoint", + "serializationOptions": { + "$id": "246", + "json": { + "$id": "247", + "name": "privateEndpoint" + } + } + }, + { + "$id": "248", + "kind": "property", + "name": "privateLinkServiceConnectionState", + "serializedName": "privateLinkServiceConnectionState", + "doc": "A collection of information about the state of the connection between service consumer and provider.", + "type": { + "$id": "249", + "kind": "model", + "name": "PrivateLinkServiceConnectionState", + "namespace": "Azure.ResourceManager.HealthDataAIServices", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.PrivateLinkServiceConnectionState", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "A collection of information about the state of the connection between service consumer and provider.", + "decorators": [], + "properties": [ + { + "$id": "250", + "kind": "property", + "name": "status", + "serializedName": "status", + "doc": "Indicates whether the connection has been Approved/Rejected/Removed by the owner of the service.", + "type": { + "$ref": "30" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.PrivateLinkServiceConnectionState.status", + "serializationOptions": { + "$id": "251", + "json": { + "$id": "252", + "name": "status" + } + } + }, + { + "$id": "253", + "kind": "property", + "name": "description", + "serializedName": "description", + "doc": "The reason for approval/rejection of the connection.", + "type": { + "$id": "254", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.PrivateLinkServiceConnectionState.description", + "serializationOptions": { + "$id": "255", + "json": { + "$id": "256", + "name": "description" + } + } + }, + { + "$id": "257", + "kind": "property", + "name": "actionsRequired", + "serializedName": "actionsRequired", + "doc": "A message indicating if changes on the service provider require any updates on the consumer.", + "type": { + "$id": "258", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.PrivateLinkServiceConnectionState.actionsRequired", + "serializationOptions": { + "$id": "259", + "json": { + "$id": "260", + "name": "actionsRequired" + } + } + } + ] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.PrivateEndpointConnectionProperties.privateLinkServiceConnectionState", + "serializationOptions": { + "$id": "261", + "json": { + "$id": "262", + "name": "privateLinkServiceConnectionState" + } + } + }, + { + "$id": "263", + "kind": "property", + "name": "provisioningState", + "serializedName": "provisioningState", + "doc": "The provisioning state of the private endpoint connection resource.", + "type": { + "$ref": "38" + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.PrivateEndpointConnectionProperties.provisioningState", + "serializationOptions": { + "$id": "264", + "json": { + "$id": "265", + "name": "provisioningState" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.PrivateEndpointConnection.properties", + "serializationOptions": { + "$id": "266", + "json": { + "$id": "267", + "name": "properties" + } + } + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.HealthDataAIServices.DeidServiceProperties.privateEndpointConnections", + "serializationOptions": { + "$id": "268", + "json": { + "$id": "269", + "name": "privateEndpointConnections" + } + } + }, + { + "$id": "270", + "kind": "property", + "name": "publicNetworkAccess", + "serializedName": "publicNetworkAccess", + "doc": "Gets or sets allow or disallow public network access to resource", + "type": { + "$ref": "58" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.HealthDataAIServices.DeidServiceProperties.publicNetworkAccess", + "serializationOptions": { + "$id": "271", + "json": { + "$id": "272", + "name": "publicNetworkAccess" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.HealthDataAIServices.DeidService.properties", + "serializationOptions": { + "$id": "273", + "json": { + "$id": "274", + "name": "properties" + } + } + }, + { + "$id": "275", + "kind": "property", + "name": "identity", + "serializedName": "identity", + "doc": "The managed service identities assigned to this resource.", + "type": { + "$id": "276", + "kind": "model", + "name": "ManagedServiceIdentity", + "namespace": "Azure.ResourceManager.HealthDataAIServices", + "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": "277", + "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": "278", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "279", + "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": "280", + "json": { + "$id": "281", + "name": "principalId" + } + } + }, + { + "$id": "282", + "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": "283", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "284", + "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": "285", + "json": { + "$id": "286", + "name": "tenantId" + } + } + }, + { + "$id": "287", + "kind": "property", + "name": "type", + "serializedName": "type", + "doc": "The type of managed identity assigned to this resource.", + "type": { + "$ref": "64" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ManagedServiceIdentity.type", + "serializationOptions": { + "$id": "288", + "json": { + "$id": "289", + "name": "type" + } + } + }, + { + "$id": "290", + "kind": "property", + "name": "userAssignedIdentities", + "serializedName": "userAssignedIdentities", + "doc": "The identities assigned to this resource by the user.", + "type": { + "$id": "291", + "kind": "dict", + "keyType": { + "$id": "292", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "valueType": { + "$id": "293", + "kind": "nullable", + "type": { + "$id": "294", + "kind": "model", + "name": "UserAssignedIdentity", + "namespace": "Azure.ResourceManager.HealthDataAIServices", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.UserAssignedIdentity", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "User assigned identity properties", + "decorators": [], + "properties": [ + { + "$id": "295", + "kind": "property", + "name": "clientId", + "serializedName": "clientId", + "doc": "The client ID of the assigned identity.", + "type": { + "$id": "296", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "297", + "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": "298", + "json": { + "$id": "299", + "name": "clientId" + } + } + }, + { + "$id": "300", + "kind": "property", + "name": "principalId", + "serializedName": "principalId", + "doc": "The principal ID of the assigned identity.", + "type": { + "$id": "301", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "302", + "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": "303", + "json": { + "$id": "304", + "name": "principalId" + } + } + } + ] + }, + "namespace": "Azure.ResourceManager.HealthDataAIServices" + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ManagedServiceIdentity.userAssignedIdentities", + "serializationOptions": { + "$id": "305", + "json": { + "$id": "306", + "name": "userAssignedIdentities" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.HealthDataAIServices.DeidService.identity", + "serializationOptions": { + "$id": "307", + "json": { + "$id": "308", + "name": "identity" + } + } + } + ] + }, + { + "$ref": "221" + }, + { + "$ref": "231" + }, + { + "$ref": "233" + }, + { + "$ref": "240" + }, + { + "$ref": "249" + }, + { + "$ref": "167" + }, + { + "$ref": "183" + }, + { + "$ref": "276" + }, + { + "$ref": "294" + }, + { + "$ref": "166" + }, + { + "$id": "309", + "kind": "model", + "name": "DeidServiceListResult", + "namespace": "Azure.ResourceManager.HealthDataAIServices", + "crossLanguageDefinitionId": "Azure.ResourceManager.ResourceListResult", + "usage": "Output,Json", + "doc": "The response of a DeidService list operation.", + "decorators": [], + "properties": [ + { + "$id": "310", + "kind": "property", + "name": "value", + "serializedName": "value", + "doc": "The DeidService items on this page", + "type": { + "$id": "311", + "kind": "array", + "name": "ArrayDeidService", + "valueType": { + "$ref": "165" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.ResourceListResult.value", + "serializationOptions": { + "$id": "312", + "json": { + "$id": "313", + "name": "value" + } + } + }, + { + "$id": "314", + "kind": "property", + "name": "nextLink", + "serializedName": "nextLink", + "doc": "The link to the next page of items", + "type": { + "$id": "315", + "kind": "url", + "name": "ResourceLocation", + "crossLanguageDefinitionId": "TypeSpec.Rest.ResourceLocation", + "baseType": { + "$id": "316", + "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": "317", + "json": { + "$id": "318", + "name": "nextLink" + } + } + } + ] + }, + { + "$id": "319", + "kind": "model", + "name": "ArmOperationStatusResourceProvisioningState", + "namespace": "Azure.ResourceManager.HealthDataAIServices", + "crossLanguageDefinitionId": "Azure.ResourceManager.ArmOperationStatus", + "usage": "LroPolling", + "doc": "Standard Azure Resource Manager operation status response", + "decorators": [], + "properties": [ + { + "$id": "320", + "kind": "property", + "name": "status", + "serializedName": "status", + "doc": "The operation status", + "type": { + "$ref": "74" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.ArmOperationStatus.status", + "serializationOptions": { + "$id": "321", + "json": { + "$id": "322", + "name": "status" + } + } + }, + { + "$id": "323", + "kind": "property", + "name": "name", + "serializedName": "name", + "doc": "The name of the operationStatus resource", + "type": { + "$id": "324", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.ArmOperationStatus.name", + "serializationOptions": { + "$id": "325", + "json": { + "$id": "326", + "name": "name" + } + } + }, + { + "$id": "327", + "kind": "property", + "name": "startTime", + "serializedName": "startTime", + "doc": "Operation start time", + "type": { + "$id": "328", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "rfc3339", + "wireType": { + "$id": "329", + "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": "330", + "json": { + "$id": "331", + "name": "startTime" + } + } + }, + { + "$id": "332", + "kind": "property", + "name": "endTime", + "serializedName": "endTime", + "doc": "Operation complete time", + "type": { + "$id": "333", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "rfc3339", + "wireType": { + "$id": "334", + "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": "335", + "json": { + "$id": "336", + "name": "endTime" + } + } + }, + { + "$id": "337", + "kind": "property", + "name": "percentComplete", + "serializedName": "percentComplete", + "doc": "The progress made toward completing the operation", + "type": { + "$id": "338", + "kind": "float64", + "name": "float64", + "crossLanguageDefinitionId": "TypeSpec.float64", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.ArmOperationStatus.percentComplete", + "serializationOptions": { + "$id": "339", + "json": { + "$id": "340", + "name": "percentComplete" + } + } + }, + { + "$id": "341", + "kind": "property", + "name": "error", + "serializedName": "error", + "doc": "Errors that occurred if the operation ended with Canceled or Failed status", + "type": { + "$ref": "133" + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.ArmOperationStatus.error", + "serializationOptions": { + "$id": "342", + "json": { + "$id": "343", + "name": "error" + } + } + } + ] + }, + { + "$id": "344", + "kind": "model", + "name": "DeidUpdate", + "namespace": "Azure.ResourceManager.HealthDataAIServices", + "crossLanguageDefinitionId": "Microsoft.HealthDataAIServices.DeidUpdate", + "usage": "Input,Json", + "doc": "Patch request body for DeidService", + "decorators": [], + "properties": [ + { + "$id": "345", + "kind": "property", + "name": "tags", + "serializedName": "tags", + "doc": "Resource tags.", + "type": { + "$id": "346", + "kind": "dict", + "keyType": { + "$id": "347", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "valueType": { + "$id": "348", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.HealthDataAIServices.DeidUpdate.tags", + "serializationOptions": { + "$id": "349", + "json": { + "$id": "350", + "name": "tags" + } + } + }, + { + "$id": "351", + "kind": "property", + "name": "identity", + "serializedName": "identity", + "doc": "Updatable managed service identity", + "type": { + "$id": "352", + "kind": "model", + "name": "ManagedServiceIdentityUpdate", + "namespace": "Azure.ResourceManager.HealthDataAIServices", + "crossLanguageDefinitionId": "Microsoft.HealthDataAIServices.ManagedServiceIdentityUpdate", + "usage": "Input,Json", + "doc": "The template for adding optional properties.", + "decorators": [], + "properties": [ + { + "$id": "353", + "kind": "property", + "name": "type", + "serializedName": "type", + "doc": "The type of managed identity assigned to this resource.", + "type": { + "$ref": "64" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.HealthDataAIServices.ManagedServiceIdentityUpdate.type", + "serializationOptions": { + "$id": "354", + "json": { + "$id": "355", + "name": "type" + } + } + }, + { + "$id": "356", + "kind": "property", + "name": "userAssignedIdentities", + "serializedName": "userAssignedIdentities", + "doc": "The identities assigned to this resource by the user.", + "type": { + "$id": "357", + "kind": "dict", + "keyType": { + "$id": "358", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "valueType": { + "$ref": "293" + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.HealthDataAIServices.ManagedServiceIdentityUpdate.userAssignedIdentities", + "serializationOptions": { + "$id": "359", + "json": { + "$id": "360", + "name": "userAssignedIdentities" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.HealthDataAIServices.DeidUpdate.identity", + "serializationOptions": { + "$id": "361", + "json": { + "$id": "362", + "name": "identity" + } + } + }, + { + "$id": "363", + "kind": "property", + "name": "properties", + "serializedName": "properties", + "doc": "RP-specific properties", + "type": { + "$id": "364", + "kind": "model", + "name": "DeidPropertiesUpdate", + "namespace": "Azure.ResourceManager.HealthDataAIServices", + "crossLanguageDefinitionId": "Microsoft.HealthDataAIServices.DeidPropertiesUpdate", + "usage": "Input,Json", + "doc": "The template for adding optional properties.", + "decorators": [], + "properties": [ + { + "$id": "365", + "kind": "property", + "name": "publicNetworkAccess", + "serializedName": "publicNetworkAccess", + "doc": "Gets or sets allow or disallow public network access to resource", + "type": { + "$ref": "58" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.HealthDataAIServices.DeidPropertiesUpdate.publicNetworkAccess", + "serializationOptions": { + "$id": "366", + "json": { + "$id": "367", + "name": "publicNetworkAccess" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.HealthDataAIServices.DeidUpdate.properties", + "serializationOptions": { + "$id": "368", + "json": { + "$id": "369", + "name": "properties" + } + } + } + ] + }, + { + "$ref": "352" + }, + { + "$ref": "364" + }, + { + "$id": "370", + "kind": "model", + "name": "HealthDataAIServicesPrivateEndpointConnectionResource", + "namespace": "Azure.ResourceManager.HealthDataAIServices", + "crossLanguageDefinitionId": "Microsoft.HealthDataAIServices.PrivateEndpointConnectionResource", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Holder for private endpoint connections", + "decorators": [], + "baseModel": { + "$id": "371", + "kind": "model", + "name": "ProxyResource", + "namespace": "Azure.ResourceManager.HealthDataAIServices", + "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": "167" + }, + "properties": [] + }, + "properties": [ + { + "$id": "372", + "kind": "property", + "name": "properties", + "serializedName": "properties", + "doc": "The resource-specific properties for this resource.", + "type": { + "$ref": "233" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.HealthDataAIServices.PrivateEndpointConnectionResource.properties", + "serializationOptions": { + "$id": "373", + "json": { + "$id": "374", + "name": "properties" + } + } + } + ] + }, + { + "$ref": "371" + }, + { + "$id": "375", + "kind": "model", + "name": "PrivateEndpointConnectionResourceListResult", + "namespace": "Azure.ResourceManager.HealthDataAIServices", + "crossLanguageDefinitionId": "Azure.ResourceManager.ResourceListResult", + "usage": "Output,Json", + "doc": "The response of a PrivateEndpointConnectionResource list operation.", + "decorators": [], + "properties": [ + { + "$id": "376", + "kind": "property", + "name": "value", + "serializedName": "value", + "doc": "The PrivateEndpointConnectionResource items on this page", + "type": { + "$id": "377", + "kind": "array", + "name": "ArrayPrivateEndpointConnectionResource", + "valueType": { + "$ref": "370" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.ResourceListResult.value", + "serializationOptions": { + "$id": "378", + "json": { + "$id": "379", + "name": "value" + } + } + }, + { + "$id": "380", + "kind": "property", + "name": "nextLink", + "serializedName": "nextLink", + "doc": "The link to the next page of items", + "type": { + "$id": "381", + "kind": "url", + "name": "ResourceLocation", + "crossLanguageDefinitionId": "TypeSpec.Rest.ResourceLocation", + "baseType": { + "$id": "382", + "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": "383", + "json": { + "$id": "384", + "name": "nextLink" + } + } + } + ] + }, + { + "$id": "385", + "kind": "model", + "name": "PrivateLinkResourceListResult", + "namespace": "Azure.ResourceManager.HealthDataAIServices", + "crossLanguageDefinitionId": "Azure.ResourceManager.ResourceListResult", + "usage": "Output,Json", + "doc": "The response of a PrivateLinkResource list operation.", + "decorators": [], + "properties": [ + { + "$id": "386", + "kind": "property", + "name": "value", + "serializedName": "value", + "doc": "The PrivateLinkResource items on this page", + "type": { + "$id": "387", + "kind": "array", + "name": "ArrayPrivateLinkResource", + "valueType": { + "$id": "388", + "kind": "model", + "name": "PrivateLinkResource", + "namespace": "Azure.ResourceManager.HealthDataAIServices", + "crossLanguageDefinitionId": "Microsoft.HealthDataAIServices.PrivateLinkResource", + "usage": "Output,Json", + "doc": "Private Links for DeidService resource", + "decorators": [], + "baseModel": { + "$ref": "371" + }, + "properties": [ + { + "$id": "389", + "kind": "property", + "name": "properties", + "serializedName": "properties", + "doc": "The resource-specific properties for this resource.", + "type": { + "$id": "390", + "kind": "model", + "name": "PrivateLinkResourceProperties", + "namespace": "Azure.ResourceManager.HealthDataAIServices", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.PrivateLinkResourceProperties", + "usage": "Output,Json", + "doc": "Properties of a private link resource.", + "decorators": [], + "properties": [ + { + "$id": "391", + "kind": "property", + "name": "groupId", + "serializedName": "groupId", + "doc": "The private link resource group id.", + "type": { + "$id": "392", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.PrivateLinkResourceProperties.groupId", + "serializationOptions": { + "$id": "393", + "json": { + "$id": "394", + "name": "groupId" + } + } + }, + { + "$id": "395", + "kind": "property", + "name": "requiredMembers", + "serializedName": "requiredMembers", + "doc": "The private link resource required member names.", + "type": { + "$id": "396", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "397", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.PrivateLinkResourceProperties.requiredMembers", + "serializationOptions": { + "$id": "398", + "json": { + "$id": "399", + "name": "requiredMembers" + } + } + }, + { + "$id": "400", + "kind": "property", + "name": "requiredZoneNames", + "serializedName": "requiredZoneNames", + "doc": "The private link resource private link DNS zone name.", + "type": { + "$id": "401", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "402", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.PrivateLinkResourceProperties.requiredZoneNames", + "serializationOptions": { + "$id": "403", + "json": { + "$id": "404", + "name": "requiredZoneNames" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.HealthDataAIServices.PrivateLinkResource.properties", + "serializationOptions": { + "$id": "405", + "json": { + "$id": "406", + "name": "properties" + } + } + } + ] + }, + "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" + } + } + } + ] + }, + { + "$ref": "388" + }, + { + "$ref": "390" + } + ], + "clients": [ + { + "$id": "414", + "kind": "client", + "name": "HealthDataAIServicesClient", + "namespace": "Azure.ResourceManager.HealthDataAIServices", + "operations": [], + "parameters": [ + { + "$id": "415", + "name": "endpoint", + "nameInRequest": "endpoint", + "doc": "Service host", + "type": { + "$id": "416", + "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": "417", + "type": { + "$id": "418", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "https://management.azure.com" + } + } + ], + "decorators": [ + { + "$id": "419", + "name": "TypeSpec.@service", + "arguments": { + "$id": "420", + "options": { + "$id": "421", + "title": "Microsoft.HealthDataAIServices" + } + } + } + ], + "crossLanguageDefinitionId": "Microsoft.HealthDataAIServices", + "apiVersions": [ + "2024-02-28-preview", + "2024-09-20" + ], + "children": [ + { + "$id": "422", + "kind": "client", + "name": "Operations", + "namespace": "Azure.ResourceManager.HealthDataAIServices", + "operations": [ + { + "$id": "423", + "name": "list", + "resourceName": "Operations", + "doc": "List the operations for the provider", + "accessibility": "internal", + "parameters": [ + { + "$id": "424", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "425", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "426", + "type": { + "$id": "427", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2024-09-20" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "428", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "429", + "kind": "constant", + "valueType": { + "$id": "430", + "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": "431", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "86" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "GET", + "uri": "{endpoint}", + "path": "/providers/Microsoft.HealthDataAIServices/operations", + "bufferResponse": true, + "paging": { + "$id": "432", + "itemPropertySegments": [ + "value" + ], + "nextLink": { + "$id": "433", + "responseSegments": [ + "nextLink" + ], + "responseLocation": "Body" + } + }, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Azure.ResourceManager.Operations.list", + "decorators": [], + "examples": [ + { + "$id": "434", + "kind": "http", + "name": "Operations_List_MaximumSet - generated by [MaximumSet] rule. [stable]", + "description": "Operations_List_MaximumSet - generated by [MaximumSet] rule. [stable]", + "filePath": "2024-09-20/Operations_List_MaximumSet_Gen.json", + "parameters": [ + { + "$id": "435", + "parameter": { + "$ref": "424" + }, + "value": { + "$id": "436", + "kind": "string", + "type": { + "$ref": "425" + }, + "value": "2024-09-20" + } + } + ], + "responses": [ + { + "$id": "437", + "response": { + "$ref": "431" + }, + "statusCode": 200, + "bodyValue": { + "$id": "438", + "kind": "model", + "type": { + "$ref": "86" + }, + "value": { + "$id": "439", + "value": { + "$id": "440", + "kind": "array", + "type": { + "$ref": "88" + }, + "value": [ + { + "$id": "441", + "kind": "model", + "type": { + "$ref": "89" + }, + "value": { + "$id": "442", + "name": { + "$id": "443", + "kind": "string", + "type": { + "$ref": "91" + }, + "value": "vlozcqymdxttexvmhouwzob" + }, + "isDataAction": { + "$id": "444", + "kind": "boolean", + "type": { + "$ref": "95" + }, + "value": true + }, + "display": { + "$id": "445", + "kind": "model", + "type": { + "$ref": "99" + }, + "value": { + "$id": "446", + "provider": { + "$id": "447", + "kind": "string", + "type": { + "$ref": "101" + }, + "value": "hwy" + }, + "resource": { + "$id": "448", + "kind": "string", + "type": { + "$ref": "105" + }, + "value": "yxabgnzjshmqldqthxonpam" + }, + "operation": { + "$id": "449", + "kind": "string", + "type": { + "$ref": "109" + }, + "value": "quwaawjasjgpqhskxoxzx" + }, + "description": { + "$id": "450", + "kind": "string", + "type": { + "$ref": "113" + }, + "value": "ayqiodducsbwvzcgno" + } + } + }, + "origin": { + "$id": "451", + "kind": "string", + "type": { + "$ref": "2" + }, + "value": "user" + }, + "actionType": { + "$id": "452", + "kind": "string", + "type": { + "$ref": "10" + }, + "value": "Internal" + } + } + } + ] + }, + "nextLink": { + "$id": "453", + "kind": "string", + "type": { + "$ref": "127" + }, + "value": "https://microsoft.com/a" + } + } + } + } + ] + }, + { + "$id": "454", + "kind": "http", + "name": "Operations_List_MinimumSet - generated by [MinimumSet] rule. [stable]", + "description": "Operations_List_MinimumSet - generated by [MinimumSet] rule. [stable]", + "filePath": "2024-09-20/Operations_List_MinimumSet_Gen.json", + "parameters": [ + { + "$id": "455", + "parameter": { + "$ref": "424" + }, + "value": { + "$id": "456", + "kind": "string", + "type": { + "$ref": "425" + }, + "value": "2024-09-20" + } + } + ], + "responses": [ + { + "$id": "457", + "response": { + "$ref": "431" + }, + "statusCode": 200, + "bodyValue": { + "$id": "458", + "kind": "model", + "type": { + "$ref": "86" + }, + "value": { + "$id": "459" + } + } + } + ] + } + ] + } + ], + "parameters": [ + { + "$id": "460", + "name": "endpoint", + "nameInRequest": "endpoint", + "doc": "Service host", + "type": { + "$id": "461", + "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": "462", + "type": { + "$id": "463", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "https://management.azure.com" + } + } + ], + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.HealthDataAIServices.Operations", + "apiVersions": [ + "2024-02-28-preview", + "2024-09-20" + ], + "parent": { + "$ref": "414" + } + }, + { + "$id": "464", + "kind": "client", + "name": "DeidServices", + "namespace": "Azure.ResourceManager.HealthDataAIServices", + "operations": [ + { + "$id": "465", + "name": "get", + "resourceName": "DeidService", + "doc": "Get a DeidService", + "accessibility": "public", + "parameters": [ + { + "$id": "466", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "467", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "468", + "type": { + "$id": "469", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2024-09-20" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "470", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "471", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "472", + "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": "473", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "474", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "475", + "name": "deidServiceName", + "nameInRequest": "deidServiceName", + "doc": "The name of the deid service", + "type": { + "$id": "476", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "477", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "478", + "kind": "constant", + "valueType": { + "$id": "479", + "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": "480", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "165" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "GET", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HealthDataAIServices/deidServices/{deidServiceName}", + "bufferResponse": true, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.HealthDataAIServices.DeidServices.get", + "decorators": [], + "examples": [ + { + "$id": "481", + "kind": "http", + "name": "DeidServices_Get - generated by [MaximumSet] rule. [stable]", + "description": "DeidServices_Get - generated by [MaximumSet] rule. [stable]", + "filePath": "2024-09-20/DeidServices_Get_MaximumSet_Gen.json", + "parameters": [ + { + "$id": "482", + "parameter": { + "$ref": "466" + }, + "value": { + "$id": "483", + "kind": "string", + "type": { + "$ref": "467" + }, + "value": "2024-09-20" + } + }, + { + "$id": "484", + "parameter": { + "$ref": "470" + }, + "value": { + "$id": "485", + "kind": "string", + "type": { + "$ref": "471" + }, + "value": "F21BB31B-C214-42C0-ACF0-DACCA05D3011" + } + }, + { + "$id": "486", + "parameter": { + "$ref": "473" + }, + "value": { + "$id": "487", + "kind": "string", + "type": { + "$ref": "474" + }, + "value": "rgopenapi" + } + }, + { + "$id": "488", + "parameter": { + "$ref": "475" + }, + "value": { + "$id": "489", + "kind": "string", + "type": { + "$ref": "476" + }, + "value": "deidTest" + } + } + ], + "responses": [ + { + "$id": "490", + "response": { + "$ref": "480" + }, + "statusCode": 200, + "bodyValue": { + "$id": "491", + "kind": "model", + "type": { + "$ref": "165" + }, + "value": { + "$id": "492", + "properties": { + "$id": "493", + "kind": "model", + "type": { + "$ref": "221" + }, + "value": { + "$id": "494", + "provisioningState": { + "$id": "495", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Succeeded" + }, + "publicNetworkAccess": { + "$id": "496", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "Enabled" + }, + "privateEndpointConnections": { + "$id": "497", + "kind": "array", + "type": { + "$ref": "230" + }, + "value": [ + { + "$id": "498", + "kind": "model", + "type": { + "$ref": "231" + }, + "value": { + "$id": "499", + "properties": { + "$id": "500", + "kind": "model", + "type": { + "$ref": "233" + }, + "value": { + "$id": "501", + "privateEndpoint": { + "$id": "502", + "kind": "model", + "type": { + "$ref": "240" + }, + "value": { + "$id": "503", + "id": { + "$id": "504", + "kind": "string", + "type": { + "$ref": "242" + }, + "value": "gpnxxbbtsysdhhclm" + } + } + }, + "privateLinkServiceConnectionState": { + "$id": "505", + "kind": "model", + "type": { + "$ref": "249" + }, + "value": { + "$id": "506", + "status": { + "$id": "507", + "kind": "string", + "type": { + "$ref": "30" + }, + "value": "Pending" + }, + "actionsRequired": { + "$id": "508", + "kind": "string", + "type": { + "$ref": "258" + }, + "value": "ulb" + }, + "description": { + "$id": "509", + "kind": "string", + "type": { + "$ref": "254" + }, + "value": "ddxuoved" + } + } + }, + "groupIds": { + "$id": "510", + "kind": "array", + "type": { + "$ref": "235" + }, + "value": [ + { + "$id": "511", + "kind": "string", + "type": { + "$ref": "236" + }, + "value": "xbdyjqg" + } + ] + }, + "provisioningState": { + "$id": "512", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Succeeded" + } + } + }, + "id": { + "$id": "513", + "kind": "string", + "type": { + "$ref": "169" + }, + "value": "/subscriptions/F21BB31B-C214-42C0-ACF0-DACCA05D3011/resourceGroups/rgopenapi/providers/Microsoft.HealthDataAIServices/deidServices/nlrthrxaukih/privateEndpointConnections/mdwvqjtwcjcvrh" + }, + "name": { + "$id": "514", + "kind": "string", + "type": { + "$ref": "174" + }, + "value": "mdwvqjtwcjcvrh" + }, + "type": { + "$id": "515", + "kind": "string", + "type": { + "$ref": "178" + }, + "value": "bzxabjlpbwreez" + }, + "systemData": { + "$id": "516", + "kind": "model", + "type": { + "$ref": "183" + }, + "value": { + "$id": "517", + "createdBy": { + "$id": "518", + "kind": "string", + "type": { + "$ref": "185" + }, + "value": "p" + }, + "createdByType": { + "$id": "519", + "kind": "string", + "type": { + "$ref": "48" + }, + "value": "User" + }, + "createdAt": { + "$id": "520", + "kind": "string", + "type": { + "$ref": "192" + }, + "value": "2024-04-13T19:47:24.985Z" + }, + "lastModifiedBy": { + "$id": "521", + "kind": "string", + "type": { + "$ref": "197" + }, + "value": "pmbozfvwrblbknedeb" + }, + "lastModifiedByType": { + "$id": "522", + "kind": "string", + "type": { + "$ref": "48" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "523", + "kind": "string", + "type": { + "$ref": "204" + }, + "value": "2024-04-13T19:47:24.986Z" + } + } + } + } + } + ] + }, + "serviceUrl": { + "$id": "524", + "kind": "string", + "type": { + "$ref": "226" + }, + "value": "woponotsxaippkvhwmibffywnqcfru" + } + } + }, + "identity": { + "$id": "525", + "kind": "model", + "type": { + "$ref": "276" + }, + "value": { + "$id": "526", + "type": { + "$id": "527", + "kind": "string", + "type": { + "$ref": "64" + }, + "value": "None" + }, + "userAssignedIdentities": { + "$id": "528", + "kind": "dict", + "type": { + "$ref": "291" + }, + "value": { + "$id": "529" + } + }, + "principalId": { + "$id": "530", + "kind": "string", + "type": { + "$ref": "278" + }, + "value": "a82361f4-5320-4a26-8d1b-45832d2164dd" + }, + "tenantId": { + "$id": "531", + "kind": "string", + "type": { + "$ref": "283" + }, + "value": "53a6a686-ae15-4a1d-badf-3e7947918893" + } + } + }, + "tags": { + "$id": "532", + "kind": "dict", + "type": { + "$ref": "211" + }, + "value": { + "$id": "533" + } + }, + "location": { + "$id": "534", + "kind": "string", + "type": { + "$ref": "217" + }, + "value": "qwyhvdwcsjulggagdqxlmazcl" + }, + "id": { + "$id": "535", + "kind": "string", + "type": { + "$ref": "169" + }, + "value": "/subscriptions/F21BB31B-C214-42C0-ACF0-DACCA05D3011/resourceGroups/rgopenapi/providers/Microsoft.HealthDataAIServices/deidServices/nlrthrxaukih" + }, + "name": { + "$id": "536", + "kind": "string", + "type": { + "$ref": "174" + }, + "value": "nlrthrxaukih" + }, + "type": { + "$id": "537", + "kind": "string", + "type": { + "$ref": "178" + }, + "value": "slyfiibvwlhfdpzjynsywhbfauexk" + }, + "systemData": { + "$id": "538", + "kind": "model", + "type": { + "$ref": "183" + }, + "value": { + "$id": "539", + "createdBy": { + "$id": "540", + "kind": "string", + "type": { + "$ref": "185" + }, + "value": "p" + }, + "createdByType": { + "$id": "541", + "kind": "string", + "type": { + "$ref": "48" + }, + "value": "User" + }, + "createdAt": { + "$id": "542", + "kind": "string", + "type": { + "$ref": "192" + }, + "value": "2024-04-13T19:47:24.985Z" + }, + "lastModifiedBy": { + "$id": "543", + "kind": "string", + "type": { + "$ref": "197" + }, + "value": "pmbozfvwrblbknedeb" + }, + "lastModifiedByType": { + "$id": "544", + "kind": "string", + "type": { + "$ref": "48" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "545", + "kind": "string", + "type": { + "$ref": "204" + }, + "value": "2024-04-13T19:47:24.986Z" + } + } + } + } + } + } + ] + } + ] + }, + { + "$id": "546", + "name": "listByResourceGroup", + "resourceName": "DeidService", + "doc": "List DeidService resources by resource group", + "accessibility": "public", + "parameters": [ + { + "$id": "547", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "548", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "549", + "type": { + "$id": "550", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2024-09-20" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "551", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "552", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "553", + "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": "554", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "555", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "556", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "557", + "kind": "constant", + "valueType": { + "$id": "558", + "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": "559", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "309" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "GET", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HealthDataAIServices/deidServices", + "bufferResponse": true, + "paging": { + "$id": "560", + "itemPropertySegments": [ + "value" + ], + "nextLink": { + "$id": "561", + "responseSegments": [ + "nextLink" + ], + "responseLocation": "Body" + } + }, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.HealthDataAIServices.DeidServices.listByResourceGroup", + "decorators": [], + "examples": [ + { + "$id": "562", + "kind": "http", + "name": "DeidServices_ListByResourceGroup - generated by [MaximumSet] rule. [stable]", + "description": "DeidServices_ListByResourceGroup - generated by [MaximumSet] rule. [stable]", + "filePath": "2024-09-20/DeidServices_ListByResourceGroup_MaximumSet_Gen.json", + "parameters": [ + { + "$id": "563", + "parameter": { + "$ref": "547" + }, + "value": { + "$id": "564", + "kind": "string", + "type": { + "$ref": "548" + }, + "value": "2024-09-20" + } + }, + { + "$id": "565", + "parameter": { + "$ref": "551" + }, + "value": { + "$id": "566", + "kind": "string", + "type": { + "$ref": "552" + }, + "value": "F21BB31B-C214-42C0-ACF0-DACCA05D3011" + } + }, + { + "$id": "567", + "parameter": { + "$ref": "554" + }, + "value": { + "$id": "568", + "kind": "string", + "type": { + "$ref": "555" + }, + "value": "rgopenapi" + } + } + ], + "responses": [ + { + "$id": "569", + "response": { + "$ref": "559" + }, + "statusCode": 200, + "bodyValue": { + "$id": "570", + "kind": "model", + "type": { + "$ref": "309" + }, + "value": { + "$id": "571", + "value": { + "$id": "572", + "kind": "array", + "type": { + "$ref": "311" + }, + "value": [ + { + "$id": "573", + "kind": "model", + "type": { + "$ref": "165" + }, + "value": { + "$id": "574", + "properties": { + "$id": "575", + "kind": "model", + "type": { + "$ref": "221" + }, + "value": { + "$id": "576", + "provisioningState": { + "$id": "577", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Succeeded" + }, + "serviceUrl": { + "$id": "578", + "kind": "string", + "type": { + "$ref": "226" + }, + "value": "woponotsxaippkvhwmibffywnqcfru" + }, + "privateEndpointConnections": { + "$id": "579", + "kind": "array", + "type": { + "$ref": "230" + }, + "value": [ + { + "$id": "580", + "kind": "model", + "type": { + "$ref": "231" + }, + "value": { + "$id": "581", + "properties": { + "$id": "582", + "kind": "model", + "type": { + "$ref": "233" + }, + "value": { + "$id": "583", + "groupIds": { + "$id": "584", + "kind": "array", + "type": { + "$ref": "235" + }, + "value": [ + { + "$id": "585", + "kind": "string", + "type": { + "$ref": "236" + }, + "value": "xbdyjqg" + } + ] + }, + "privateEndpoint": { + "$id": "586", + "kind": "model", + "type": { + "$ref": "240" + }, + "value": { + "$id": "587", + "id": { + "$id": "588", + "kind": "string", + "type": { + "$ref": "242" + }, + "value": "gpnxxbbtsysdhhclm" + } + } + }, + "privateLinkServiceConnectionState": { + "$id": "589", + "kind": "model", + "type": { + "$ref": "249" + }, + "value": { + "$id": "590", + "status": { + "$id": "591", + "kind": "string", + "type": { + "$ref": "30" + }, + "value": "Pending" + }, + "actionsRequired": { + "$id": "592", + "kind": "string", + "type": { + "$ref": "258" + }, + "value": "ulb" + }, + "description": { + "$id": "593", + "kind": "string", + "type": { + "$ref": "254" + }, + "value": "ro" + } + } + }, + "provisioningState": { + "$id": "594", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Succeeded" + } + } + }, + "id": { + "$id": "595", + "kind": "string", + "type": { + "$ref": "169" + }, + "value": "/subscriptions/F21BB31B-C214-42C0-ACF0-DACCA05D3011/resourceGroups/rgopenapi/providers/Microsoft.HealthDataAIServices/deidServices/nlrthrxaukih/privateEndpointConnections/mdwvqjtwcjcvrh" + }, + "name": { + "$id": "596", + "kind": "string", + "type": { + "$ref": "174" + }, + "value": "mdwvqjtwcjcvrh" + }, + "type": { + "$id": "597", + "kind": "string", + "type": { + "$ref": "178" + }, + "value": "bzxabjlpbwreez" + }, + "systemData": { + "$id": "598", + "kind": "model", + "type": { + "$ref": "183" + }, + "value": { + "$id": "599", + "createdBy": { + "$id": "600", + "kind": "string", + "type": { + "$ref": "185" + }, + "value": "p" + }, + "createdByType": { + "$id": "601", + "kind": "string", + "type": { + "$ref": "48" + }, + "value": "User" + }, + "createdAt": { + "$id": "602", + "kind": "string", + "type": { + "$ref": "192" + }, + "value": "2024-04-13T19:47:24.985Z" + }, + "lastModifiedBy": { + "$id": "603", + "kind": "string", + "type": { + "$ref": "197" + }, + "value": "pmbozfvwrblbknedeb" + }, + "lastModifiedByType": { + "$id": "604", + "kind": "string", + "type": { + "$ref": "48" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "605", + "kind": "string", + "type": { + "$ref": "204" + }, + "value": "2024-04-13T19:47:24.986Z" + } + } + } + } + } + ] + }, + "publicNetworkAccess": { + "$id": "606", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "Enabled" + } + } + }, + "identity": { + "$id": "607", + "kind": "model", + "type": { + "$ref": "276" + }, + "value": { + "$id": "608", + "principalId": { + "$id": "609", + "kind": "string", + "type": { + "$ref": "278" + }, + "value": "a82361f4-5320-4a26-8d1b-45832d2164dd" + }, + "tenantId": { + "$id": "610", + "kind": "string", + "type": { + "$ref": "283" + }, + "value": "53a6a686-ae15-4a1d-badf-3e7947918893" + }, + "type": { + "$id": "611", + "kind": "string", + "type": { + "$ref": "64" + }, + "value": "None" + }, + "userAssignedIdentities": { + "$id": "612", + "kind": "dict", + "type": { + "$ref": "291" + }, + "value": { + "$id": "613" + } + } + } + }, + "tags": { + "$id": "614", + "kind": "dict", + "type": { + "$ref": "211" + }, + "value": { + "$id": "615" + } + }, + "location": { + "$id": "616", + "kind": "string", + "type": { + "$ref": "217" + }, + "value": "qwyhvdwcsjulggagdqxlmazcl" + }, + "id": { + "$id": "617", + "kind": "string", + "type": { + "$ref": "169" + }, + "value": "/subscriptions/F21BB31B-C214-42C0-ACF0-DACCA05D3011/resourceGroups/rgopenapi/providers/Microsoft.HealthDataAIServices/deidServices/nlrthrxaukih" + }, + "name": { + "$id": "618", + "kind": "string", + "type": { + "$ref": "174" + }, + "value": "nlrthrxaukih" + }, + "type": { + "$id": "619", + "kind": "string", + "type": { + "$ref": "178" + }, + "value": "slyfiibvwlhfdpzjynsywhbfauexk" + }, + "systemData": { + "$id": "620", + "kind": "model", + "type": { + "$ref": "183" + }, + "value": { + "$id": "621", + "createdBy": { + "$id": "622", + "kind": "string", + "type": { + "$ref": "185" + }, + "value": "p" + }, + "createdByType": { + "$id": "623", + "kind": "string", + "type": { + "$ref": "48" + }, + "value": "User" + }, + "createdAt": { + "$id": "624", + "kind": "string", + "type": { + "$ref": "192" + }, + "value": "2024-04-13T19:47:24.985Z" + }, + "lastModifiedBy": { + "$id": "625", + "kind": "string", + "type": { + "$ref": "197" + }, + "value": "pmbozfvwrblbknedeb" + }, + "lastModifiedByType": { + "$id": "626", + "kind": "string", + "type": { + "$ref": "48" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "627", + "kind": "string", + "type": { + "$ref": "204" + }, + "value": "2024-04-13T19:47:24.986Z" + } + } + } + } + } + ] + }, + "nextLink": { + "$id": "628", + "kind": "string", + "type": { + "$ref": "315" + }, + "value": "https://microsoft.com/a" + } + } + } + } + ] + } + ] + }, + { + "$id": "629", + "name": "listBySubscription", + "resourceName": "DeidService", + "doc": "List DeidService resources by subscription ID", + "accessibility": "public", + "parameters": [ + { + "$id": "630", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "631", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "632", + "type": { + "$id": "633", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2024-09-20" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "634", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "635", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "636", + "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": "637", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "638", + "kind": "constant", + "valueType": { + "$id": "639", + "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": "640", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "309" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "GET", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/providers/Microsoft.HealthDataAIServices/deidServices", + "bufferResponse": true, + "paging": { + "$id": "641", + "itemPropertySegments": [ + "value" + ], + "nextLink": { + "$id": "642", + "responseSegments": [ + "nextLink" + ], + "responseLocation": "Body" + } + }, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.HealthDataAIServices.DeidServices.listBySubscription", + "decorators": [], + "examples": [ + { + "$id": "643", + "kind": "http", + "name": "DeidServices_ListBySubscription - generated by [MaximumSet] rule. [stable]", + "description": "DeidServices_ListBySubscription - generated by [MaximumSet] rule. [stable]", + "filePath": "2024-09-20/DeidServices_ListBySubscription_MaximumSet_Gen.json", + "parameters": [ + { + "$id": "644", + "parameter": { + "$ref": "630" + }, + "value": { + "$id": "645", + "kind": "string", + "type": { + "$ref": "631" + }, + "value": "2024-09-20" + } + }, + { + "$id": "646", + "parameter": { + "$ref": "634" + }, + "value": { + "$id": "647", + "kind": "string", + "type": { + "$ref": "635" + }, + "value": "F21BB31B-C214-42C0-ACF0-DACCA05D3011" + } + } + ], + "responses": [ + { + "$id": "648", + "response": { + "$ref": "640" + }, + "statusCode": 200, + "bodyValue": { + "$id": "649", + "kind": "model", + "type": { + "$ref": "309" + }, + "value": { + "$id": "650", + "value": { + "$id": "651", + "kind": "array", + "type": { + "$ref": "311" + }, + "value": [ + { + "$id": "652", + "kind": "model", + "type": { + "$ref": "165" + }, + "value": { + "$id": "653", + "properties": { + "$id": "654", + "kind": "model", + "type": { + "$ref": "221" + }, + "value": { + "$id": "655", + "provisioningState": { + "$id": "656", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Succeeded" + }, + "serviceUrl": { + "$id": "657", + "kind": "string", + "type": { + "$ref": "226" + }, + "value": "woponotsxaippkvhwmibffywnqcfru" + }, + "privateEndpointConnections": { + "$id": "658", + "kind": "array", + "type": { + "$ref": "230" + }, + "value": [ + { + "$id": "659", + "kind": "model", + "type": { + "$ref": "231" + }, + "value": { + "$id": "660", + "properties": { + "$id": "661", + "kind": "model", + "type": { + "$ref": "233" + }, + "value": { + "$id": "662", + "groupIds": { + "$id": "663", + "kind": "array", + "type": { + "$ref": "235" + }, + "value": [ + { + "$id": "664", + "kind": "string", + "type": { + "$ref": "236" + }, + "value": "xbdyjqg" + } + ] + }, + "privateEndpoint": { + "$id": "665", + "kind": "model", + "type": { + "$ref": "240" + }, + "value": { + "$id": "666", + "id": { + "$id": "667", + "kind": "string", + "type": { + "$ref": "242" + }, + "value": "gpnxxbbtsysdhhclm" + } + } + }, + "privateLinkServiceConnectionState": { + "$id": "668", + "kind": "model", + "type": { + "$ref": "249" + }, + "value": { + "$id": "669", + "status": { + "$id": "670", + "kind": "string", + "type": { + "$ref": "30" + }, + "value": "Pending" + }, + "actionsRequired": { + "$id": "671", + "kind": "string", + "type": { + "$ref": "258" + }, + "value": "ulb" + }, + "description": { + "$id": "672", + "kind": "string", + "type": { + "$ref": "254" + }, + "value": "ro" + } + } + }, + "provisioningState": { + "$id": "673", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Succeeded" + } + } + }, + "id": { + "$id": "674", + "kind": "string", + "type": { + "$ref": "169" + }, + "value": "/subscriptions/F21BB31B-C214-42C0-ACF0-DACCA05D3011/resourceGroups/rgopenapi/providers/Microsoft.HealthDataAIServices/deidServices/nlrthrxaukih/privateEndpointConnections/mdwvqjtwcjcvrh" + }, + "name": { + "$id": "675", + "kind": "string", + "type": { + "$ref": "174" + }, + "value": "mdwvqjtwcjcvrh" + }, + "type": { + "$id": "676", + "kind": "string", + "type": { + "$ref": "178" + }, + "value": "bzxabjlpbwreez" + }, + "systemData": { + "$id": "677", + "kind": "model", + "type": { + "$ref": "183" + }, + "value": { + "$id": "678", + "createdBy": { + "$id": "679", + "kind": "string", + "type": { + "$ref": "185" + }, + "value": "p" + }, + "createdByType": { + "$id": "680", + "kind": "string", + "type": { + "$ref": "48" + }, + "value": "User" + }, + "createdAt": { + "$id": "681", + "kind": "string", + "type": { + "$ref": "192" + }, + "value": "2024-04-13T19:47:24.985Z" + }, + "lastModifiedBy": { + "$id": "682", + "kind": "string", + "type": { + "$ref": "197" + }, + "value": "pmbozfvwrblbknedeb" + }, + "lastModifiedByType": { + "$id": "683", + "kind": "string", + "type": { + "$ref": "48" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "684", + "kind": "string", + "type": { + "$ref": "204" + }, + "value": "2024-04-13T19:47:24.986Z" + } + } + } + } + } + ] + }, + "publicNetworkAccess": { + "$id": "685", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "Enabled" + } + } + }, + "identity": { + "$id": "686", + "kind": "model", + "type": { + "$ref": "276" + }, + "value": { + "$id": "687", + "principalId": { + "$id": "688", + "kind": "string", + "type": { + "$ref": "278" + }, + "value": "a82361f4-5320-4a26-8d1b-45832d2164dd" + }, + "tenantId": { + "$id": "689", + "kind": "string", + "type": { + "$ref": "283" + }, + "value": "53a6a686-ae15-4a1d-badf-3e7947918893" + }, + "type": { + "$id": "690", + "kind": "string", + "type": { + "$ref": "64" + }, + "value": "None" + }, + "userAssignedIdentities": { + "$id": "691", + "kind": "dict", + "type": { + "$ref": "291" + }, + "value": { + "$id": "692" + } + } + } + }, + "tags": { + "$id": "693", + "kind": "dict", + "type": { + "$ref": "211" + }, + "value": { + "$id": "694" + } + }, + "location": { + "$id": "695", + "kind": "string", + "type": { + "$ref": "217" + }, + "value": "qwyhvdwcsjulggagdqxlmazcl" + }, + "id": { + "$id": "696", + "kind": "string", + "type": { + "$ref": "169" + }, + "value": "/subscriptions/F21BB31B-C214-42C0-ACF0-DACCA05D3011/resourceGroups/rgopenapi/providers/Microsoft.HealthDataAIServices/deidServices/nlrthrxaukih" + }, + "name": { + "$id": "697", + "kind": "string", + "type": { + "$ref": "174" + }, + "value": "nlrthrxaukih" + }, + "type": { + "$id": "698", + "kind": "string", + "type": { + "$ref": "178" + }, + "value": "slyfiibvwlhfdpzjynsywhbfauexk" + }, + "systemData": { + "$id": "699", + "kind": "model", + "type": { + "$ref": "183" + }, + "value": { + "$id": "700", + "createdBy": { + "$id": "701", + "kind": "string", + "type": { + "$ref": "185" + }, + "value": "p" + }, + "createdByType": { + "$id": "702", + "kind": "string", + "type": { + "$ref": "48" + }, + "value": "User" + }, + "createdAt": { + "$id": "703", + "kind": "string", + "type": { + "$ref": "192" + }, + "value": "2024-04-13T19:47:24.985Z" + }, + "lastModifiedBy": { + "$id": "704", + "kind": "string", + "type": { + "$ref": "197" + }, + "value": "pmbozfvwrblbknedeb" + }, + "lastModifiedByType": { + "$id": "705", + "kind": "string", + "type": { + "$ref": "48" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "706", + "kind": "string", + "type": { + "$ref": "204" + }, + "value": "2024-04-13T19:47:24.986Z" + } + } + } + } + } + ] + }, + "nextLink": { + "$id": "707", + "kind": "string", + "type": { + "$ref": "315" + }, + "value": "https://microsoft.com/a" + } + } + } + } + ] + } + ] + }, + { + "$id": "708", + "name": "create", + "resourceName": "DeidService", + "doc": "Create a DeidService", + "accessibility": "public", + "parameters": [ + { + "$id": "709", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "710", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "711", + "type": { + "$id": "712", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2024-09-20" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "713", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "714", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "715", + "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": "716", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "717", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "718", + "name": "deidServiceName", + "nameInRequest": "deidServiceName", + "doc": "The name of the deid service", + "type": { + "$id": "719", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "720", + "name": "contentType", + "nameInRequest": "Content-Type", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$id": "721", + "kind": "constant", + "valueType": { + "$id": "722", + "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": "723", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "724", + "kind": "constant", + "valueType": { + "$id": "725", + "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": "726", + "name": "resource", + "nameInRequest": "resource", + "doc": "Resource create parameters.", + "type": { + "$ref": "165" + }, + "location": "Body", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "727", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "165" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + }, + { + "$id": "728", + "statusCodes": [ + 201 + ], + "bodyType": { + "$ref": "165" + }, + "headers": [ + { + "$id": "729", + "name": "azureAsyncOperation", + "nameInResponse": "Azure-AsyncOperation", + "doc": "A link to the status monitor", + "type": { + "$id": "730", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + { + "$id": "731", + "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": "732", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + } + } + ], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "PUT", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HealthDataAIServices/deidServices/{deidServiceName}", + "requestMediaTypes": [ + "application/json" + ], + "bufferResponse": true, + "longRunning": { + "$id": "733", + "finalStateVia": 0, + "finalResponse": { + "$id": "734", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "165" + } + } + }, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.HealthDataAIServices.DeidServices.create", + "decorators": [], + "examples": [ + { + "$id": "735", + "kind": "http", + "name": "DeidServices_Create - generated by [MaximumSet] rule. [stable]", + "description": "DeidServices_Create - generated by [MaximumSet] rule. [stable]", + "filePath": "2024-09-20/DeidServices_Create_MaximumSet_Gen.json", + "parameters": [ + { + "$id": "736", + "parameter": { + "$ref": "709" + }, + "value": { + "$id": "737", + "kind": "string", + "type": { + "$ref": "710" + }, + "value": "2024-09-20" + } + }, + { + "$id": "738", + "parameter": { + "$ref": "713" + }, + "value": { + "$id": "739", + "kind": "string", + "type": { + "$ref": "714" + }, + "value": "F21BB31B-C214-42C0-ACF0-DACCA05D3011" + } + }, + { + "$id": "740", + "parameter": { + "$ref": "716" + }, + "value": { + "$id": "741", + "kind": "string", + "type": { + "$ref": "717" + }, + "value": "rgopenapi" + } + }, + { + "$id": "742", + "parameter": { + "$ref": "718" + }, + "value": { + "$id": "743", + "kind": "string", + "type": { + "$ref": "719" + }, + "value": "deidTest" + } + }, + { + "$id": "744", + "parameter": { + "$ref": "726" + }, + "value": { + "$id": "745", + "kind": "model", + "type": { + "$ref": "165" + }, + "value": { + "$id": "746", + "properties": { + "$id": "747", + "kind": "model", + "type": { + "$ref": "221" + }, + "value": { + "$id": "748", + "publicNetworkAccess": { + "$id": "749", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "Enabled" + } + } + }, + "identity": { + "$id": "750", + "kind": "model", + "type": { + "$ref": "276" + }, + "value": { + "$id": "751", + "type": { + "$id": "752", + "kind": "string", + "type": { + "$ref": "64" + }, + "value": "None" + }, + "userAssignedIdentities": { + "$id": "753", + "kind": "dict", + "type": { + "$ref": "291" + }, + "value": { + "$id": "754" + } + } + } + }, + "tags": { + "$id": "755", + "kind": "dict", + "type": { + "$ref": "211" + }, + "value": { + "$id": "756" + } + }, + "location": { + "$id": "757", + "kind": "string", + "type": { + "$ref": "217" + }, + "value": "qwyhvdwcsjulggagdqxlmazcl" + } + } + } + } + ], + "responses": [ + { + "$id": "758", + "response": { + "$ref": "727" + }, + "statusCode": 200, + "bodyValue": { + "$id": "759", + "kind": "model", + "type": { + "$ref": "165" + }, + "value": { + "$id": "760", + "properties": { + "$id": "761", + "kind": "model", + "type": { + "$ref": "221" + }, + "value": { + "$id": "762", + "provisioningState": { + "$id": "763", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Succeeded" + }, + "publicNetworkAccess": { + "$id": "764", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "Enabled" + }, + "privateEndpointConnections": { + "$id": "765", + "kind": "array", + "type": { + "$ref": "230" + }, + "value": [ + { + "$id": "766", + "kind": "model", + "type": { + "$ref": "231" + }, + "value": { + "$id": "767", + "properties": { + "$id": "768", + "kind": "model", + "type": { + "$ref": "233" + }, + "value": { + "$id": "769", + "privateEndpoint": { + "$id": "770", + "kind": "model", + "type": { + "$ref": "240" + }, + "value": { + "$id": "771", + "id": { + "$id": "772", + "kind": "string", + "type": { + "$ref": "242" + }, + "value": "gpnxxbbtsysdhhclm" + } + } + }, + "privateLinkServiceConnectionState": { + "$id": "773", + "kind": "model", + "type": { + "$ref": "249" + }, + "value": { + "$id": "774", + "status": { + "$id": "775", + "kind": "string", + "type": { + "$ref": "30" + }, + "value": "Pending" + }, + "actionsRequired": { + "$id": "776", + "kind": "string", + "type": { + "$ref": "258" + }, + "value": "ulb" + }, + "description": { + "$id": "777", + "kind": "string", + "type": { + "$ref": "254" + }, + "value": "ddxuoved" + } + } + }, + "groupIds": { + "$id": "778", + "kind": "array", + "type": { + "$ref": "235" + }, + "value": [ + { + "$id": "779", + "kind": "string", + "type": { + "$ref": "236" + }, + "value": "xbdyjqg" + } + ] + }, + "provisioningState": { + "$id": "780", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Succeeded" + } + } + }, + "id": { + "$id": "781", + "kind": "string", + "type": { + "$ref": "169" + }, + "value": "/subscriptions/F21BB31B-C214-42C0-ACF0-DACCA05D3011/resourceGroups/rgopenapi/providers/Microsoft.HealthDataAIServices/deidServices/nlrthrxaukih/privateEndpointConnections/mdwvqjtwcjcvrh" + }, + "name": { + "$id": "782", + "kind": "string", + "type": { + "$ref": "174" + }, + "value": "mdwvqjtwcjcvrh" + }, + "type": { + "$id": "783", + "kind": "string", + "type": { + "$ref": "178" + }, + "value": "bzxabjlpbwreez" + }, + "systemData": { + "$id": "784", + "kind": "model", + "type": { + "$ref": "183" + }, + "value": { + "$id": "785", + "createdBy": { + "$id": "786", + "kind": "string", + "type": { + "$ref": "185" + }, + "value": "p" + }, + "createdByType": { + "$id": "787", + "kind": "string", + "type": { + "$ref": "48" + }, + "value": "User" + }, + "createdAt": { + "$id": "788", + "kind": "string", + "type": { + "$ref": "192" + }, + "value": "2024-04-13T19:47:24.985Z" + }, + "lastModifiedBy": { + "$id": "789", + "kind": "string", + "type": { + "$ref": "197" + }, + "value": "pmbozfvwrblbknedeb" + }, + "lastModifiedByType": { + "$id": "790", + "kind": "string", + "type": { + "$ref": "48" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "791", + "kind": "string", + "type": { + "$ref": "204" + }, + "value": "2024-04-13T19:47:24.986Z" + } + } + } + } + } + ] + }, + "serviceUrl": { + "$id": "792", + "kind": "string", + "type": { + "$ref": "226" + }, + "value": "woponotsxaippkvhwmibffywnqcfru" + } + } + }, + "identity": { + "$id": "793", + "kind": "model", + "type": { + "$ref": "276" + }, + "value": { + "$id": "794", + "type": { + "$id": "795", + "kind": "string", + "type": { + "$ref": "64" + }, + "value": "None" + }, + "userAssignedIdentities": { + "$id": "796", + "kind": "dict", + "type": { + "$ref": "291" + }, + "value": { + "$id": "797" + } + }, + "principalId": { + "$id": "798", + "kind": "string", + "type": { + "$ref": "278" + }, + "value": "a82361f4-5320-4a26-8d1b-45832d2164dd" + }, + "tenantId": { + "$id": "799", + "kind": "string", + "type": { + "$ref": "283" + }, + "value": "53a6a686-ae15-4a1d-badf-3e7947918893" + } + } + }, + "tags": { + "$id": "800", + "kind": "dict", + "type": { + "$ref": "211" + }, + "value": { + "$id": "801" + } + }, + "location": { + "$id": "802", + "kind": "string", + "type": { + "$ref": "217" + }, + "value": "qwyhvdwcsjulggagdqxlmazcl" + }, + "id": { + "$id": "803", + "kind": "string", + "type": { + "$ref": "169" + }, + "value": "/subscriptions/F21BB31B-C214-42C0-ACF0-DACCA05D3011/resourceGroups/rgopenapi/providers/Microsoft.HealthDataAIServices/deidServices/nlrthrxaukih" + }, + "name": { + "$id": "804", + "kind": "string", + "type": { + "$ref": "174" + }, + "value": "nlrthrxaukih" + }, + "type": { + "$id": "805", + "kind": "string", + "type": { + "$ref": "178" + }, + "value": "slyfiibvwlhfdpzjynsywhbfauexk" + }, + "systemData": { + "$id": "806", + "kind": "model", + "type": { + "$ref": "183" + }, + "value": { + "$id": "807", + "createdBy": { + "$id": "808", + "kind": "string", + "type": { + "$ref": "185" + }, + "value": "p" + }, + "createdByType": { + "$id": "809", + "kind": "string", + "type": { + "$ref": "48" + }, + "value": "User" + }, + "createdAt": { + "$id": "810", + "kind": "string", + "type": { + "$ref": "192" + }, + "value": "2024-04-13T19:47:24.985Z" + }, + "lastModifiedBy": { + "$id": "811", + "kind": "string", + "type": { + "$ref": "197" + }, + "value": "pmbozfvwrblbknedeb" + }, + "lastModifiedByType": { + "$id": "812", + "kind": "string", + "type": { + "$ref": "48" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "813", + "kind": "string", + "type": { + "$ref": "204" + }, + "value": "2024-04-13T19:47:24.986Z" + } + } + } + } + } + }, + { + "$id": "814", + "response": { + "$ref": "728" + }, + "statusCode": 201, + "bodyValue": { + "$id": "815", + "kind": "model", + "type": { + "$ref": "165" + }, + "value": { + "$id": "816", + "properties": { + "$id": "817", + "kind": "model", + "type": { + "$ref": "221" + }, + "value": { + "$id": "818", + "provisioningState": { + "$id": "819", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Succeeded" + }, + "publicNetworkAccess": { + "$id": "820", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "Enabled" + }, + "privateEndpointConnections": { + "$id": "821", + "kind": "array", + "type": { + "$ref": "230" + }, + "value": [ + { + "$id": "822", + "kind": "model", + "type": { + "$ref": "231" + }, + "value": { + "$id": "823", + "properties": { + "$id": "824", + "kind": "model", + "type": { + "$ref": "233" + }, + "value": { + "$id": "825", + "privateEndpoint": { + "$id": "826", + "kind": "model", + "type": { + "$ref": "240" + }, + "value": { + "$id": "827", + "id": { + "$id": "828", + "kind": "string", + "type": { + "$ref": "242" + }, + "value": "gpnxxbbtsysdhhclm" + } + } + }, + "privateLinkServiceConnectionState": { + "$id": "829", + "kind": "model", + "type": { + "$ref": "249" + }, + "value": { + "$id": "830", + "status": { + "$id": "831", + "kind": "string", + "type": { + "$ref": "30" + }, + "value": "Pending" + }, + "actionsRequired": { + "$id": "832", + "kind": "string", + "type": { + "$ref": "258" + }, + "value": "ulb" + }, + "description": { + "$id": "833", + "kind": "string", + "type": { + "$ref": "254" + }, + "value": "ddxuoved" + } + } + }, + "groupIds": { + "$id": "834", + "kind": "array", + "type": { + "$ref": "235" + }, + "value": [ + { + "$id": "835", + "kind": "string", + "type": { + "$ref": "236" + }, + "value": "xbdyjqg" + } + ] + }, + "provisioningState": { + "$id": "836", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Succeeded" + } + } + }, + "id": { + "$id": "837", + "kind": "string", + "type": { + "$ref": "169" + }, + "value": "/subscriptions/F21BB31B-C214-42C0-ACF0-DACCA05D3011/resourceGroups/rgopenapi/providers/Microsoft.HealthDataAIServices/deidServices/nlrthrxaukih/privateEndpointConnections/mdwvqjtwcjcvrh" + }, + "name": { + "$id": "838", + "kind": "string", + "type": { + "$ref": "174" + }, + "value": "mdwvqjtwcjcvrh" + }, + "type": { + "$id": "839", + "kind": "string", + "type": { + "$ref": "178" + }, + "value": "bzxabjlpbwreez" + }, + "systemData": { + "$id": "840", + "kind": "model", + "type": { + "$ref": "183" + }, + "value": { + "$id": "841", + "createdBy": { + "$id": "842", + "kind": "string", + "type": { + "$ref": "185" + }, + "value": "p" + }, + "createdByType": { + "$id": "843", + "kind": "string", + "type": { + "$ref": "48" + }, + "value": "User" + }, + "createdAt": { + "$id": "844", + "kind": "string", + "type": { + "$ref": "192" + }, + "value": "2024-04-13T19:47:24.985Z" + }, + "lastModifiedBy": { + "$id": "845", + "kind": "string", + "type": { + "$ref": "197" + }, + "value": "pmbozfvwrblbknedeb" + }, + "lastModifiedByType": { + "$id": "846", + "kind": "string", + "type": { + "$ref": "48" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "847", + "kind": "string", + "type": { + "$ref": "204" + }, + "value": "2024-04-13T19:47:24.986Z" + } + } + } + } + } + ] + }, + "serviceUrl": { + "$id": "848", + "kind": "string", + "type": { + "$ref": "226" + }, + "value": "woponotsxaippkvhwmibffywnqcfru" + } + } + }, + "identity": { + "$id": "849", + "kind": "model", + "type": { + "$ref": "276" + }, + "value": { + "$id": "850", + "type": { + "$id": "851", + "kind": "string", + "type": { + "$ref": "64" + }, + "value": "None" + }, + "userAssignedIdentities": { + "$id": "852", + "kind": "dict", + "type": { + "$ref": "291" + }, + "value": { + "$id": "853" + } + }, + "principalId": { + "$id": "854", + "kind": "string", + "type": { + "$ref": "278" + }, + "value": "a82361f4-5320-4a26-8d1b-45832d2164dd" + }, + "tenantId": { + "$id": "855", + "kind": "string", + "type": { + "$ref": "283" + }, + "value": "53a6a686-ae15-4a1d-badf-3e7947918893" + } + } + }, + "tags": { + "$id": "856", + "kind": "dict", + "type": { + "$ref": "211" + }, + "value": { + "$id": "857" + } + }, + "location": { + "$id": "858", + "kind": "string", + "type": { + "$ref": "217" + }, + "value": "qwyhvdwcsjulggagdqxlmazcl" + }, + "id": { + "$id": "859", + "kind": "string", + "type": { + "$ref": "169" + }, + "value": "/subscriptions/F21BB31B-C214-42C0-ACF0-DACCA05D3011/resourceGroups/rgopenapi/providers/Microsoft.HealthDataAIServices/deidServices/nlrthrxaukih" + }, + "name": { + "$id": "860", + "kind": "string", + "type": { + "$ref": "174" + }, + "value": "nlrthrxaukih" + }, + "type": { + "$id": "861", + "kind": "string", + "type": { + "$ref": "178" + }, + "value": "slyfiibvwlhfdpzjynsywhbfauexk" + }, + "systemData": { + "$id": "862", + "kind": "model", + "type": { + "$ref": "183" + }, + "value": { + "$id": "863", + "createdBy": { + "$id": "864", + "kind": "string", + "type": { + "$ref": "185" + }, + "value": "p" + }, + "createdByType": { + "$id": "865", + "kind": "string", + "type": { + "$ref": "48" + }, + "value": "User" + }, + "createdAt": { + "$id": "866", + "kind": "string", + "type": { + "$ref": "192" + }, + "value": "2024-04-13T19:47:24.985Z" + }, + "lastModifiedBy": { + "$id": "867", + "kind": "string", + "type": { + "$ref": "197" + }, + "value": "pmbozfvwrblbknedeb" + }, + "lastModifiedByType": { + "$id": "868", + "kind": "string", + "type": { + "$ref": "48" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "869", + "kind": "string", + "type": { + "$ref": "204" + }, + "value": "2024-04-13T19:47:24.986Z" + } + } + } + } + } + } + ] + } + ] + }, + { + "$id": "870", + "name": "update", + "resourceName": "DeidService", + "doc": "Update a DeidService", + "accessibility": "public", + "parameters": [ + { + "$id": "871", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "872", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "873", + "type": { + "$id": "874", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2024-09-20" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "875", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "876", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "877", + "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": "878", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "879", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "880", + "name": "deidServiceName", + "nameInRequest": "deidServiceName", + "doc": "The name of the deid service", + "type": { + "$id": "881", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "882", + "name": "contentType", + "nameInRequest": "Content-Type", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$id": "883", + "kind": "constant", + "valueType": { + "$id": "884", + "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": "885", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "886", + "kind": "constant", + "valueType": { + "$id": "887", + "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": "888", + "name": "properties", + "nameInRequest": "properties", + "doc": "The resource properties to be updated.", + "type": { + "$ref": "344" + }, + "location": "Body", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "889", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "165" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + }, + { + "$id": "890", + "statusCodes": [ + 202 + ], + "headers": [ + { + "$id": "891", + "name": "location", + "nameInResponse": "Location", + "doc": "The Location header contains the URL where the status of the long running operation can be checked.", + "type": { + "$id": "892", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + { + "$id": "893", + "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": "894", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + } + } + ], + "isErrorResponse": false + } + ], + "httpMethod": "PATCH", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HealthDataAIServices/deidServices/{deidServiceName}", + "requestMediaTypes": [ + "application/json" + ], + "bufferResponse": true, + "longRunning": { + "$id": "895", + "finalStateVia": 1, + "finalResponse": { + "$id": "896", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "165" + } + } + }, + "generateProtocolMethod": true, + "generateConvenienceMethod": false, + "crossLanguageDefinitionId": "Microsoft.HealthDataAIServices.DeidServices.update", + "decorators": [], + "examples": [ + { + "$id": "897", + "kind": "http", + "name": "DeidServices_Update - generated by [MaximumSet] rule. [stable]", + "description": "DeidServices_Update - generated by [MaximumSet] rule. [stable]", + "filePath": "2024-09-20/DeidServices_Update_MaximumSet_Gen.json", + "parameters": [ + { + "$id": "898", + "parameter": { + "$ref": "871" + }, + "value": { + "$id": "899", + "kind": "string", + "type": { + "$ref": "872" + }, + "value": "2024-09-20" + } + }, + { + "$id": "900", + "parameter": { + "$ref": "875" + }, + "value": { + "$id": "901", + "kind": "string", + "type": { + "$ref": "876" + }, + "value": "F21BB31B-C214-42C0-ACF0-DACCA05D3011" + } + }, + { + "$id": "902", + "parameter": { + "$ref": "878" + }, + "value": { + "$id": "903", + "kind": "string", + "type": { + "$ref": "879" + }, + "value": "rgopenapi" + } + }, + { + "$id": "904", + "parameter": { + "$ref": "880" + }, + "value": { + "$id": "905", + "kind": "string", + "type": { + "$ref": "881" + }, + "value": "deidTest" + } + }, + { + "$id": "906", + "parameter": { + "$ref": "888" + }, + "value": { + "$id": "907", + "kind": "model", + "type": { + "$ref": "344" + }, + "value": { + "$id": "908", + "identity": { + "$id": "909", + "kind": "model", + "type": { + "$ref": "352" + }, + "value": { + "$id": "910", + "type": { + "$id": "911", + "kind": "string", + "type": { + "$ref": "64" + }, + "value": "None" + }, + "userAssignedIdentities": { + "$id": "912", + "kind": "dict", + "type": { + "$ref": "357" + }, + "value": { + "$id": "913" + } + } + } + }, + "tags": { + "$id": "914", + "kind": "dict", + "type": { + "$ref": "346" + }, + "value": { + "$id": "915" + } + }, + "properties": { + "$id": "916", + "kind": "model", + "type": { + "$ref": "364" + }, + "value": { + "$id": "917", + "publicNetworkAccess": { + "$id": "918", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "Enabled" + } + } + } + } + } + } + ], + "responses": [ + { + "$id": "919", + "response": { + "$ref": "889" + }, + "statusCode": 200, + "bodyValue": { + "$id": "920", + "kind": "model", + "type": { + "$ref": "165" + }, + "value": { + "$id": "921", + "properties": { + "$id": "922", + "kind": "model", + "type": { + "$ref": "221" + }, + "value": { + "$id": "923", + "provisioningState": { + "$id": "924", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Succeeded" + }, + "publicNetworkAccess": { + "$id": "925", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "Enabled" + }, + "privateEndpointConnections": { + "$id": "926", + "kind": "array", + "type": { + "$ref": "230" + }, + "value": [ + { + "$id": "927", + "kind": "model", + "type": { + "$ref": "231" + }, + "value": { + "$id": "928", + "properties": { + "$id": "929", + "kind": "model", + "type": { + "$ref": "233" + }, + "value": { + "$id": "930", + "privateEndpoint": { + "$id": "931", + "kind": "model", + "type": { + "$ref": "240" + }, + "value": { + "$id": "932", + "id": { + "$id": "933", + "kind": "string", + "type": { + "$ref": "242" + }, + "value": "gpnxxbbtsysdhhclm" + } + } + }, + "privateLinkServiceConnectionState": { + "$id": "934", + "kind": "model", + "type": { + "$ref": "249" + }, + "value": { + "$id": "935", + "status": { + "$id": "936", + "kind": "string", + "type": { + "$ref": "30" + }, + "value": "Pending" + }, + "actionsRequired": { + "$id": "937", + "kind": "string", + "type": { + "$ref": "258" + }, + "value": "ulb" + }, + "description": { + "$id": "938", + "kind": "string", + "type": { + "$ref": "254" + }, + "value": "ddxuoved" + } + } + }, + "groupIds": { + "$id": "939", + "kind": "array", + "type": { + "$ref": "235" + }, + "value": [ + { + "$id": "940", + "kind": "string", + "type": { + "$ref": "236" + }, + "value": "xbdyjqg" + } + ] + }, + "provisioningState": { + "$id": "941", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Succeeded" + } + } + }, + "id": { + "$id": "942", + "kind": "string", + "type": { + "$ref": "169" + }, + "value": "/subscriptions/F21BB31B-C214-42C0-ACF0-DACCA05D3011/resourceGroups/rgopenapi/providers/Microsoft.HealthDataAIServices/deidServices/nlrthrxaukih/privateEndpointConnections/mdwvqjtwcjcvrh" + }, + "name": { + "$id": "943", + "kind": "string", + "type": { + "$ref": "174" + }, + "value": "mdwvqjtwcjcvrh" + }, + "type": { + "$id": "944", + "kind": "string", + "type": { + "$ref": "178" + }, + "value": "bzxabjlpbwreez" + }, + "systemData": { + "$id": "945", + "kind": "model", + "type": { + "$ref": "183" + }, + "value": { + "$id": "946", + "createdBy": { + "$id": "947", + "kind": "string", + "type": { + "$ref": "185" + }, + "value": "p" + }, + "createdByType": { + "$id": "948", + "kind": "string", + "type": { + "$ref": "48" + }, + "value": "User" + }, + "createdAt": { + "$id": "949", + "kind": "string", + "type": { + "$ref": "192" + }, + "value": "2024-04-13T19:47:24.985Z" + }, + "lastModifiedBy": { + "$id": "950", + "kind": "string", + "type": { + "$ref": "197" + }, + "value": "pmbozfvwrblbknedeb" + }, + "lastModifiedByType": { + "$id": "951", + "kind": "string", + "type": { + "$ref": "48" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "952", + "kind": "string", + "type": { + "$ref": "204" + }, + "value": "2024-04-13T19:47:24.986Z" + } + } + } + } + } + ] + }, + "serviceUrl": { + "$id": "953", + "kind": "string", + "type": { + "$ref": "226" + }, + "value": "woponotsxaippkvhwmibffywnqcfru" + } + } + }, + "identity": { + "$id": "954", + "kind": "model", + "type": { + "$ref": "276" + }, + "value": { + "$id": "955", + "type": { + "$id": "956", + "kind": "string", + "type": { + "$ref": "64" + }, + "value": "None" + }, + "userAssignedIdentities": { + "$id": "957", + "kind": "dict", + "type": { + "$ref": "291" + }, + "value": { + "$id": "958" + } + }, + "principalId": { + "$id": "959", + "kind": "string", + "type": { + "$ref": "278" + }, + "value": "a82361f4-5320-4a26-8d1b-45832d2164dd" + }, + "tenantId": { + "$id": "960", + "kind": "string", + "type": { + "$ref": "283" + }, + "value": "53a6a686-ae15-4a1d-badf-3e7947918893" + } + } + }, + "tags": { + "$id": "961", + "kind": "dict", + "type": { + "$ref": "211" + }, + "value": { + "$id": "962" + } + }, + "location": { + "$id": "963", + "kind": "string", + "type": { + "$ref": "217" + }, + "value": "qwyhvdwcsjulggagdqxlmazcl" + }, + "id": { + "$id": "964", + "kind": "string", + "type": { + "$ref": "169" + }, + "value": "/subscriptions/F21BB31B-C214-42C0-ACF0-DACCA05D3011/resourceGroups/rgopenapi/providers/Microsoft.HealthDataAIServices/deidServices/nlrthrxaukih" + }, + "name": { + "$id": "965", + "kind": "string", + "type": { + "$ref": "174" + }, + "value": "nlrthrxaukih" + }, + "type": { + "$id": "966", + "kind": "string", + "type": { + "$ref": "178" + }, + "value": "slyfiibvwlhfdpzjynsywhbfauexk" + }, + "systemData": { + "$id": "967", + "kind": "model", + "type": { + "$ref": "183" + }, + "value": { + "$id": "968", + "createdBy": { + "$id": "969", + "kind": "string", + "type": { + "$ref": "185" + }, + "value": "p" + }, + "createdByType": { + "$id": "970", + "kind": "string", + "type": { + "$ref": "48" + }, + "value": "User" + }, + "createdAt": { + "$id": "971", + "kind": "string", + "type": { + "$ref": "192" + }, + "value": "2024-04-13T19:47:24.985Z" + }, + "lastModifiedBy": { + "$id": "972", + "kind": "string", + "type": { + "$ref": "197" + }, + "value": "pmbozfvwrblbknedeb" + }, + "lastModifiedByType": { + "$id": "973", + "kind": "string", + "type": { + "$ref": "48" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "974", + "kind": "string", + "type": { + "$ref": "204" + }, + "value": "2024-04-13T19:47:24.986Z" + } + } + } + } + } + }, + { + "$id": "975", + "response": { + "$ref": "890" + }, + "statusCode": 202 + } + ] + } + ] + }, + { + "$id": "976", + "name": "delete", + "resourceName": "DeidService", + "doc": "Delete a DeidService", + "accessibility": "public", + "parameters": [ + { + "$id": "977", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "978", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "979", + "type": { + "$id": "980", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2024-09-20" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "981", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "982", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "983", + "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": "984", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "985", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "986", + "name": "deidServiceName", + "nameInRequest": "deidServiceName", + "doc": "The name of the deid service", + "type": { + "$id": "987", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "988", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "989", + "kind": "constant", + "valueType": { + "$id": "990", + "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": "991", + "statusCodes": [ + 202 + ], + "headers": [ + { + "$id": "992", + "name": "location", + "nameInResponse": "Location", + "doc": "The Location header contains the URL where the status of the long running operation can be checked.", + "type": { + "$id": "993", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + { + "$id": "994", + "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": "995", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + } + } + ], + "isErrorResponse": false + }, + { + "$id": "996", + "statusCodes": [ + 204 + ], + "headers": [], + "isErrorResponse": false + } + ], + "httpMethod": "DELETE", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HealthDataAIServices/deidServices/{deidServiceName}", + "bufferResponse": true, + "longRunning": { + "$id": "997", + "finalStateVia": 1, + "finalResponse": { + "$id": "998", + "statusCodes": [ + 204 + ] + } + }, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.HealthDataAIServices.DeidServices.delete", + "decorators": [], + "examples": [ + { + "$id": "999", + "kind": "http", + "name": "DeidServices_Delete - generated by [MaximumSet] rule. [stable]", + "description": "DeidServices_Delete - generated by [MaximumSet] rule. [stable]", + "filePath": "2024-09-20/DeidServices_Delete_MaximumSet_Gen.json", + "parameters": [ + { + "$id": "1000", + "parameter": { + "$ref": "977" + }, + "value": { + "$id": "1001", + "kind": "string", + "type": { + "$ref": "978" + }, + "value": "2024-09-20" + } + }, + { + "$id": "1002", + "parameter": { + "$ref": "981" + }, + "value": { + "$id": "1003", + "kind": "string", + "type": { + "$ref": "982" + }, + "value": "F21BB31B-C214-42C0-ACF0-DACCA05D3011" + } + }, + { + "$id": "1004", + "parameter": { + "$ref": "984" + }, + "value": { + "$id": "1005", + "kind": "string", + "type": { + "$ref": "985" + }, + "value": "rgopenapi" + } + }, + { + "$id": "1006", + "parameter": { + "$ref": "986" + }, + "value": { + "$id": "1007", + "kind": "string", + "type": { + "$ref": "987" + }, + "value": "deidTest" + } + } + ], + "responses": [ + { + "$id": "1008", + "response": { + "$ref": "991" + }, + "statusCode": 202 + }, + { + "$id": "1009", + "response": { + "$ref": "996" + }, + "statusCode": 204 + } + ] + } + ] + } + ], + "parameters": [ + { + "$id": "1010", + "name": "endpoint", + "nameInRequest": "endpoint", + "doc": "Service host", + "type": { + "$id": "1011", + "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": "1012", + "type": { + "$id": "1013", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "https://management.azure.com" + } + } + ], + "decorators": [ + { + "$id": "1014", + "name": "Azure.ResourceManager.@armResourceOperations", + "arguments": { + "$id": "1015" + } + } + ], + "crossLanguageDefinitionId": "Microsoft.HealthDataAIServices.DeidServices", + "apiVersions": [ + "2024-02-28-preview", + "2024-09-20" + ], + "parent": { + "$ref": "414" + } + }, + { + "$id": "1016", + "kind": "client", + "name": "PrivateEndpointConnections", + "namespace": "Azure.ResourceManager.HealthDataAIServices", + "doc": "Private connection operations", + "operations": [ + { + "$id": "1017", + "name": "get", + "resourceName": "PrivateEndpointConnectionResource", + "doc": "Get a specific private connection", + "accessibility": "public", + "parameters": [ + { + "$id": "1018", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "1019", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "1020", + "type": { + "$id": "1021", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2024-09-20" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1022", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "1023", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "1024", + "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": "1025", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "1026", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1027", + "name": "deidServiceName", + "nameInRequest": "deidServiceName", + "doc": "The name of the deid service", + "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": "privateEndpointConnectionName", + "nameInRequest": "privateEndpointConnectionName", + "doc": "The name of the private endpoint connection associated with the Azure resource.", + "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": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "1032", + "kind": "constant", + "valueType": { + "$id": "1033", + "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": "1034", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "370" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "GET", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HealthDataAIServices/deidServices/{deidServiceName}/privateEndpointConnections/{privateEndpointConnectionName}", + "bufferResponse": true, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.HealthDataAIServices.PrivateEndpointConnections.get", + "decorators": [], + "examples": [ + { + "$id": "1035", + "kind": "http", + "name": "PrivateEndpointConnections_Get - generated by [MaximumSet] rule. [stable]", + "description": "PrivateEndpointConnections_Get - generated by [MaximumSet] rule. [stable]", + "filePath": "2024-09-20/PrivateEndpointConnections_Get_MaximumSet_Gen.json", + "parameters": [ + { + "$id": "1036", + "parameter": { + "$ref": "1018" + }, + "value": { + "$id": "1037", + "kind": "string", + "type": { + "$ref": "1019" + }, + "value": "2024-09-20" + } + }, + { + "$id": "1038", + "parameter": { + "$ref": "1022" + }, + "value": { + "$id": "1039", + "kind": "string", + "type": { + "$ref": "1023" + }, + "value": "F21BB31B-C214-42C0-ACF0-DACCA05D3011" + } + }, + { + "$id": "1040", + "parameter": { + "$ref": "1025" + }, + "value": { + "$id": "1041", + "kind": "string", + "type": { + "$ref": "1026" + }, + "value": "rgopenapi" + } + }, + { + "$id": "1042", + "parameter": { + "$ref": "1027" + }, + "value": { + "$id": "1043", + "kind": "string", + "type": { + "$ref": "1028" + }, + "value": "deidTest" + } + }, + { + "$id": "1044", + "parameter": { + "$ref": "1029" + }, + "value": { + "$id": "1045", + "kind": "string", + "type": { + "$ref": "1030" + }, + "value": "kgwgrrpabvrsrrvpcgcnfmyfgyrl" + } + } + ], + "responses": [ + { + "$id": "1046", + "response": { + "$ref": "1034" + }, + "statusCode": 200, + "bodyValue": { + "$id": "1047", + "kind": "model", + "type": { + "$ref": "370" + }, + "value": { + "$id": "1048", + "properties": { + "$id": "1049", + "kind": "model", + "type": { + "$ref": "233" + }, + "value": { + "$id": "1050", + "privateEndpoint": { + "$id": "1051", + "kind": "model", + "type": { + "$ref": "240" + }, + "value": { + "$id": "1052", + "id": { + "$id": "1053", + "kind": "string", + "type": { + "$ref": "242" + }, + "value": "gpnxxbbtsysdhhclm" + } + } + }, + "privateLinkServiceConnectionState": { + "$id": "1054", + "kind": "model", + "type": { + "$ref": "249" + }, + "value": { + "$id": "1055", + "status": { + "$id": "1056", + "kind": "string", + "type": { + "$ref": "30" + }, + "value": "Pending" + }, + "actionsRequired": { + "$id": "1057", + "kind": "string", + "type": { + "$ref": "258" + }, + "value": "ulb" + }, + "description": { + "$id": "1058", + "kind": "string", + "type": { + "$ref": "254" + }, + "value": "xr" + } + } + }, + "groupIds": { + "$id": "1059", + "kind": "array", + "type": { + "$ref": "235" + }, + "value": [ + { + "$id": "1060", + "kind": "string", + "type": { + "$ref": "236" + }, + "value": "xbdyjqg" + } + ] + }, + "provisioningState": { + "$id": "1061", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Succeeded" + } + } + }, + "id": { + "$id": "1062", + "kind": "string", + "type": { + "$ref": "169" + }, + "value": "/subscriptions/F21BB31B-C214-42C0-ACF0-DACCA05D3011/resourceGroups/rgopenapi/providers/Microsoft.HealthDataAIServices/deidServices/deidTest/privateEndpointConnections/aduyb" + }, + "name": { + "$id": "1063", + "kind": "string", + "type": { + "$ref": "174" + }, + "value": "aduyb" + }, + "type": { + "$id": "1064", + "kind": "string", + "type": { + "$ref": "178" + }, + "value": "umjjkodjuhccrngl" + }, + "systemData": { + "$id": "1065", + "kind": "model", + "type": { + "$ref": "183" + }, + "value": { + "$id": "1066", + "createdBy": { + "$id": "1067", + "kind": "string", + "type": { + "$ref": "185" + }, + "value": "p" + }, + "createdByType": { + "$id": "1068", + "kind": "string", + "type": { + "$ref": "48" + }, + "value": "User" + }, + "createdAt": { + "$id": "1069", + "kind": "string", + "type": { + "$ref": "192" + }, + "value": "2024-04-13T19:47:24.985Z" + }, + "lastModifiedBy": { + "$id": "1070", + "kind": "string", + "type": { + "$ref": "197" + }, + "value": "pmbozfvwrblbknedeb" + }, + "lastModifiedByType": { + "$id": "1071", + "kind": "string", + "type": { + "$ref": "48" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "1072", + "kind": "string", + "type": { + "$ref": "204" + }, + "value": "2024-04-13T19:47:24.986Z" + } + } + } + } + } + } + ] + } + ] + }, + { + "$id": "1073", + "name": "create", + "resourceName": "PrivateEndpointConnectionResource", + "doc": "Create a Private endpoint connection", + "accessibility": "public", + "parameters": [ + { + "$id": "1074", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "1075", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "1076", + "type": { + "$id": "1077", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2024-09-20" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1078", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "1079", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "1080", + "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": "1081", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "1082", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1083", + "name": "deidServiceName", + "nameInRequest": "deidServiceName", + "doc": "The name of the deid service", + "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": "privateEndpointConnectionName", + "nameInRequest": "privateEndpointConnectionName", + "doc": "The name of the private endpoint connection associated with the Azure resource.", + "type": { + "$id": "1086", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1087", + "name": "contentType", + "nameInRequest": "Content-Type", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$id": "1088", + "kind": "constant", + "valueType": { + "$id": "1089", + "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": "1090", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "1091", + "kind": "constant", + "valueType": { + "$id": "1092", + "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": "1093", + "name": "resource", + "nameInRequest": "resource", + "doc": "Resource create parameters.", + "type": { + "$ref": "370" + }, + "location": "Body", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "1094", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "370" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + }, + { + "$id": "1095", + "statusCodes": [ + 201 + ], + "bodyType": { + "$ref": "370" + }, + "headers": [ + { + "$id": "1096", + "name": "azureAsyncOperation", + "nameInResponse": "Azure-AsyncOperation", + "doc": "A link to the status monitor", + "type": { + "$id": "1097", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + { + "$id": "1098", + "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": "1099", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + } + } + ], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "PUT", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HealthDataAIServices/deidServices/{deidServiceName}/privateEndpointConnections/{privateEndpointConnectionName}", + "requestMediaTypes": [ + "application/json" + ], + "bufferResponse": true, + "longRunning": { + "$id": "1100", + "finalStateVia": 0, + "finalResponse": { + "$id": "1101", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "370" + } + } + }, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.HealthDataAIServices.PrivateEndpointConnections.create", + "decorators": [], + "examples": [ + { + "$id": "1102", + "kind": "http", + "name": "PrivateEndpointConnections_Create - generated by [MaximumSet] rule. [stable]", + "description": "PrivateEndpointConnections_Create - generated by [MaximumSet] rule. [stable]", + "filePath": "2024-09-20/PrivateEndpointConnections_Create_MaximumSet_Gen.json", + "parameters": [ + { + "$id": "1103", + "parameter": { + "$ref": "1074" + }, + "value": { + "$id": "1104", + "kind": "string", + "type": { + "$ref": "1075" + }, + "value": "2024-09-20" + } + }, + { + "$id": "1105", + "parameter": { + "$ref": "1078" + }, + "value": { + "$id": "1106", + "kind": "string", + "type": { + "$ref": "1079" + }, + "value": "F21BB31B-C214-42C0-ACF0-DACCA05D3011" + } + }, + { + "$id": "1107", + "parameter": { + "$ref": "1081" + }, + "value": { + "$id": "1108", + "kind": "string", + "type": { + "$ref": "1082" + }, + "value": "rgopenapi" + } + }, + { + "$id": "1109", + "parameter": { + "$ref": "1083" + }, + "value": { + "$id": "1110", + "kind": "string", + "type": { + "$ref": "1084" + }, + "value": "deidTest" + } + }, + { + "$id": "1111", + "parameter": { + "$ref": "1085" + }, + "value": { + "$id": "1112", + "kind": "string", + "type": { + "$ref": "1086" + }, + "value": "kgwgrrpabvrsrrvpcgcnfmyfgyrl" + } + }, + { + "$id": "1113", + "parameter": { + "$ref": "1093" + }, + "value": { + "$id": "1114", + "kind": "model", + "type": { + "$ref": "370" + }, + "value": { + "$id": "1115", + "properties": { + "$id": "1116", + "kind": "model", + "type": { + "$ref": "233" + }, + "value": { + "$id": "1117", + "privateEndpoint": { + "$id": "1118", + "kind": "model", + "type": { + "$ref": "240" + }, + "value": { + "$id": "1119" + } + }, + "privateLinkServiceConnectionState": { + "$id": "1120", + "kind": "model", + "type": { + "$ref": "249" + }, + "value": { + "$id": "1121", + "status": { + "$id": "1122", + "kind": "string", + "type": { + "$ref": "30" + }, + "value": "Pending" + }, + "actionsRequired": { + "$id": "1123", + "kind": "string", + "type": { + "$ref": "258" + }, + "value": "ulb" + }, + "description": { + "$id": "1124", + "kind": "string", + "type": { + "$ref": "254" + }, + "value": "xr" + } + } + } + } + } + } + } + } + ], + "responses": [ + { + "$id": "1125", + "response": { + "$ref": "1094" + }, + "statusCode": 200, + "bodyValue": { + "$id": "1126", + "kind": "model", + "type": { + "$ref": "370" + }, + "value": { + "$id": "1127", + "properties": { + "$id": "1128", + "kind": "model", + "type": { + "$ref": "233" + }, + "value": { + "$id": "1129", + "privateEndpoint": { + "$id": "1130", + "kind": "model", + "type": { + "$ref": "240" + }, + "value": { + "$id": "1131", + "id": { + "$id": "1132", + "kind": "string", + "type": { + "$ref": "242" + }, + "value": "gpnxxbbtsysdhhclm" + } + } + }, + "privateLinkServiceConnectionState": { + "$id": "1133", + "kind": "model", + "type": { + "$ref": "249" + }, + "value": { + "$id": "1134", + "status": { + "$id": "1135", + "kind": "string", + "type": { + "$ref": "30" + }, + "value": "Pending" + }, + "actionsRequired": { + "$id": "1136", + "kind": "string", + "type": { + "$ref": "258" + }, + "value": "ulb" + }, + "description": { + "$id": "1137", + "kind": "string", + "type": { + "$ref": "254" + }, + "value": "xr" + } + } + }, + "groupIds": { + "$id": "1138", + "kind": "array", + "type": { + "$ref": "235" + }, + "value": [ + { + "$id": "1139", + "kind": "string", + "type": { + "$ref": "236" + }, + "value": "xbdyjqg" + } + ] + }, + "provisioningState": { + "$id": "1140", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Succeeded" + } + } + }, + "id": { + "$id": "1141", + "kind": "string", + "type": { + "$ref": "169" + }, + "value": "/subscriptions/F21BB31B-C214-42C0-ACF0-DACCA05D3011/resourceGroups/rgopenapi/providers/Microsoft.HealthDataAIServices/deidServices/deidTest/privateEndpointConnections/aduyb" + }, + "name": { + "$id": "1142", + "kind": "string", + "type": { + "$ref": "174" + }, + "value": "aduyb" + }, + "type": { + "$id": "1143", + "kind": "string", + "type": { + "$ref": "178" + }, + "value": "umjjkodjuhccrngl" + }, + "systemData": { + "$id": "1144", + "kind": "model", + "type": { + "$ref": "183" + }, + "value": { + "$id": "1145", + "createdBy": { + "$id": "1146", + "kind": "string", + "type": { + "$ref": "185" + }, + "value": "p" + }, + "createdByType": { + "$id": "1147", + "kind": "string", + "type": { + "$ref": "48" + }, + "value": "User" + }, + "createdAt": { + "$id": "1148", + "kind": "string", + "type": { + "$ref": "192" + }, + "value": "2024-04-13T19:47:24.985Z" + }, + "lastModifiedBy": { + "$id": "1149", + "kind": "string", + "type": { + "$ref": "197" + }, + "value": "pmbozfvwrblbknedeb" + }, + "lastModifiedByType": { + "$id": "1150", + "kind": "string", + "type": { + "$ref": "48" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "1151", + "kind": "string", + "type": { + "$ref": "204" + }, + "value": "2024-04-13T19:47:24.986Z" + } + } + } + } + } + }, + { + "$id": "1152", + "response": { + "$ref": "1095" + }, + "statusCode": 201, + "bodyValue": { + "$id": "1153", + "kind": "model", + "type": { + "$ref": "370" + }, + "value": { + "$id": "1154", + "properties": { + "$id": "1155", + "kind": "model", + "type": { + "$ref": "233" + }, + "value": { + "$id": "1156", + "privateEndpoint": { + "$id": "1157", + "kind": "model", + "type": { + "$ref": "240" + }, + "value": { + "$id": "1158", + "id": { + "$id": "1159", + "kind": "string", + "type": { + "$ref": "242" + }, + "value": "gpnxxbbtsysdhhclm" + } + } + }, + "privateLinkServiceConnectionState": { + "$id": "1160", + "kind": "model", + "type": { + "$ref": "249" + }, + "value": { + "$id": "1161", + "status": { + "$id": "1162", + "kind": "string", + "type": { + "$ref": "30" + }, + "value": "Pending" + }, + "actionsRequired": { + "$id": "1163", + "kind": "string", + "type": { + "$ref": "258" + }, + "value": "ulb" + }, + "description": { + "$id": "1164", + "kind": "string", + "type": { + "$ref": "254" + }, + "value": "xr" + } + } + }, + "groupIds": { + "$id": "1165", + "kind": "array", + "type": { + "$ref": "235" + }, + "value": [ + { + "$id": "1166", + "kind": "string", + "type": { + "$ref": "236" + }, + "value": "xbdyjqg" + } + ] + }, + "provisioningState": { + "$id": "1167", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Succeeded" + } + } + }, + "id": { + "$id": "1168", + "kind": "string", + "type": { + "$ref": "169" + }, + "value": "/subscriptions/F21BB31B-C214-42C0-ACF0-DACCA05D3011/resourceGroups/rgopenapi/providers/Microsoft.HealthDataAIServices/deidServices/deidTest/privateEndpointConnections/aduyb" + }, + "name": { + "$id": "1169", + "kind": "string", + "type": { + "$ref": "174" + }, + "value": "aduyb" + }, + "type": { + "$id": "1170", + "kind": "string", + "type": { + "$ref": "178" + }, + "value": "umjjkodjuhccrngl" + }, + "systemData": { + "$id": "1171", + "kind": "model", + "type": { + "$ref": "183" + }, + "value": { + "$id": "1172", + "createdBy": { + "$id": "1173", + "kind": "string", + "type": { + "$ref": "185" + }, + "value": "p" + }, + "createdByType": { + "$id": "1174", + "kind": "string", + "type": { + "$ref": "48" + }, + "value": "User" + }, + "createdAt": { + "$id": "1175", + "kind": "string", + "type": { + "$ref": "192" + }, + "value": "2024-04-13T19:47:24.985Z" + }, + "lastModifiedBy": { + "$id": "1176", + "kind": "string", + "type": { + "$ref": "197" + }, + "value": "pmbozfvwrblbknedeb" + }, + "lastModifiedByType": { + "$id": "1177", + "kind": "string", + "type": { + "$ref": "48" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "1178", + "kind": "string", + "type": { + "$ref": "204" + }, + "value": "2024-04-13T19:47:24.986Z" + } + } + } + } + } + } + ] + } + ] + }, + { + "$id": "1179", + "name": "delete", + "resourceName": "PrivateEndpointConnectionResource", + "doc": "Delete the private endpoint connection", + "accessibility": "public", + "parameters": [ + { + "$id": "1180", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "1181", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "1182", + "type": { + "$id": "1183", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2024-09-20" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1184", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "1185", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "1186", + "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": "1187", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "1188", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1189", + "name": "deidServiceName", + "nameInRequest": "deidServiceName", + "doc": "The name of the deid service", + "type": { + "$id": "1190", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1191", + "name": "privateEndpointConnectionName", + "nameInRequest": "privateEndpointConnectionName", + "doc": "The name of the private endpoint connection associated with the Azure resource.", + "type": { + "$id": "1192", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1193", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "1194", + "kind": "constant", + "valueType": { + "$id": "1195", + "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": "1196", + "statusCodes": [ + 202 + ], + "headers": [ + { + "$id": "1197", + "name": "location", + "nameInResponse": "Location", + "doc": "The Location header contains the URL where the status of the long running operation can be checked.", + "type": { + "$id": "1198", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + { + "$id": "1199", + "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": "1200", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + } + } + ], + "isErrorResponse": false + }, + { + "$id": "1201", + "statusCodes": [ + 204 + ], + "headers": [], + "isErrorResponse": false + } + ], + "httpMethod": "DELETE", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HealthDataAIServices/deidServices/{deidServiceName}/privateEndpointConnections/{privateEndpointConnectionName}", + "bufferResponse": true, + "longRunning": { + "$id": "1202", + "finalStateVia": 1, + "finalResponse": { + "$id": "1203", + "statusCodes": [ + 204 + ] + } + }, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.HealthDataAIServices.PrivateEndpointConnections.delete", + "decorators": [], + "examples": [ + { + "$id": "1204", + "kind": "http", + "name": "PrivateEndpointConnections_Delete - generated by [MaximumSet] rule. [stable]", + "description": "PrivateEndpointConnections_Delete - generated by [MaximumSet] rule. [stable]", + "filePath": "2024-09-20/PrivateEndpointConnections_Delete_MaximumSet_Gen.json", + "parameters": [ + { + "$id": "1205", + "parameter": { + "$ref": "1180" + }, + "value": { + "$id": "1206", + "kind": "string", + "type": { + "$ref": "1181" + }, + "value": "2024-09-20" + } + }, + { + "$id": "1207", + "parameter": { + "$ref": "1184" + }, + "value": { + "$id": "1208", + "kind": "string", + "type": { + "$ref": "1185" + }, + "value": "F21BB31B-C214-42C0-ACF0-DACCA05D3011" + } + }, + { + "$id": "1209", + "parameter": { + "$ref": "1187" + }, + "value": { + "$id": "1210", + "kind": "string", + "type": { + "$ref": "1188" + }, + "value": "rgopenapi" + } + }, + { + "$id": "1211", + "parameter": { + "$ref": "1189" + }, + "value": { + "$id": "1212", + "kind": "string", + "type": { + "$ref": "1190" + }, + "value": "deidTest" + } + }, + { + "$id": "1213", + "parameter": { + "$ref": "1191" + }, + "value": { + "$id": "1214", + "kind": "string", + "type": { + "$ref": "1192" + }, + "value": "kgwgrrpabvrsrrvpcgcnfmyfgyrl" + } + } + ], + "responses": [ + { + "$id": "1215", + "response": { + "$ref": "1196" + }, + "statusCode": 202 + }, + { + "$id": "1216", + "response": { + "$ref": "1201" + }, + "statusCode": 204 + } + ] + } + ] + }, + { + "$id": "1217", + "name": "listByDeidService", + "resourceName": "PrivateEndpointConnectionResource", + "doc": "List private endpoint connections on the given resource", + "accessibility": "public", + "parameters": [ + { + "$id": "1218", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "1219", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "1220", + "type": { + "$id": "1221", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2024-09-20" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1222", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "1223", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "1224", + "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": "1225", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "1226", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1227", + "name": "deidServiceName", + "nameInRequest": "deidServiceName", + "doc": "The name of the deid service", + "type": { + "$id": "1228", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1229", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "1230", + "kind": "constant", + "valueType": { + "$id": "1231", + "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": "1232", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "375" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "GET", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HealthDataAIServices/deidServices/{deidServiceName}/privateEndpointConnections", + "bufferResponse": true, + "paging": { + "$id": "1233", + "itemPropertySegments": [ + "value" + ], + "nextLink": { + "$id": "1234", + "responseSegments": [ + "nextLink" + ], + "responseLocation": "Body" + } + }, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.HealthDataAIServices.PrivateEndpointConnections.listByDeidService", + "decorators": [], + "examples": [ + { + "$id": "1235", + "kind": "http", + "name": "PrivateEndpointConnections_ListByDeidService - generated by [MaximumSet] rule. [stable]", + "description": "PrivateEndpointConnections_ListByDeidService - generated by [MaximumSet] rule. [stable]", + "filePath": "2024-09-20/PrivateEndpointConnections_ListByDeidService_MaximumSet_Gen.json", + "parameters": [ + { + "$id": "1236", + "parameter": { + "$ref": "1218" + }, + "value": { + "$id": "1237", + "kind": "string", + "type": { + "$ref": "1219" + }, + "value": "2024-09-20" + } + }, + { + "$id": "1238", + "parameter": { + "$ref": "1222" + }, + "value": { + "$id": "1239", + "kind": "string", + "type": { + "$ref": "1223" + }, + "value": "F21BB31B-C214-42C0-ACF0-DACCA05D3011" + } + }, + { + "$id": "1240", + "parameter": { + "$ref": "1225" + }, + "value": { + "$id": "1241", + "kind": "string", + "type": { + "$ref": "1226" + }, + "value": "rgopenapi" + } + }, + { + "$id": "1242", + "parameter": { + "$ref": "1227" + }, + "value": { + "$id": "1243", + "kind": "string", + "type": { + "$ref": "1228" + }, + "value": "deidTest" + } + } + ], + "responses": [ + { + "$id": "1244", + "response": { + "$ref": "1232" + }, + "statusCode": 200, + "bodyValue": { + "$id": "1245", + "kind": "model", + "type": { + "$ref": "375" + }, + "value": { + "$id": "1246", + "value": { + "$id": "1247", + "kind": "array", + "type": { + "$ref": "377" + }, + "value": [ + { + "$id": "1248", + "kind": "model", + "type": { + "$ref": "370" + }, + "value": { + "$id": "1249", + "properties": { + "$id": "1250", + "kind": "model", + "type": { + "$ref": "233" + }, + "value": { + "$id": "1251", + "privateEndpoint": { + "$id": "1252", + "kind": "model", + "type": { + "$ref": "240" + }, + "value": { + "$id": "1253", + "id": { + "$id": "1254", + "kind": "string", + "type": { + "$ref": "242" + }, + "value": "gpnxxbbtsysdhhclm" + } + } + }, + "privateLinkServiceConnectionState": { + "$id": "1255", + "kind": "model", + "type": { + "$ref": "249" + }, + "value": { + "$id": "1256", + "status": { + "$id": "1257", + "kind": "string", + "type": { + "$ref": "30" + }, + "value": "Pending" + }, + "actionsRequired": { + "$id": "1258", + "kind": "string", + "type": { + "$ref": "258" + }, + "value": "ulb" + }, + "description": { + "$id": "1259", + "kind": "string", + "type": { + "$ref": "254" + }, + "value": "mmvcleuufspfrojjveuith" + } + } + }, + "groupIds": { + "$id": "1260", + "kind": "array", + "type": { + "$ref": "235" + }, + "value": [ + { + "$id": "1261", + "kind": "string", + "type": { + "$ref": "236" + }, + "value": "xbdyjqg" + } + ] + }, + "provisioningState": { + "$id": "1262", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Succeeded" + } + } + }, + "id": { + "$id": "1263", + "kind": "string", + "type": { + "$ref": "169" + }, + "value": "/subscriptions/F21BB31B-C214-42C0-ACF0-DACCA05D3011/resourceGroups/rgopenapi/providers/Microsoft.HealthDataAIServices/deidServices/deidTest/privateEndpointConnections/aduyb" + }, + "name": { + "$id": "1264", + "kind": "string", + "type": { + "$ref": "174" + }, + "value": "aduyb" + }, + "type": { + "$id": "1265", + "kind": "string", + "type": { + "$ref": "178" + }, + "value": "umjjkodjuhccrngl" + }, + "systemData": { + "$id": "1266", + "kind": "model", + "type": { + "$ref": "183" + }, + "value": { + "$id": "1267", + "createdBy": { + "$id": "1268", + "kind": "string", + "type": { + "$ref": "185" + }, + "value": "p" + }, + "createdByType": { + "$id": "1269", + "kind": "string", + "type": { + "$ref": "48" + }, + "value": "User" + }, + "createdAt": { + "$id": "1270", + "kind": "string", + "type": { + "$ref": "192" + }, + "value": "2024-04-13T19:47:24.985Z" + }, + "lastModifiedBy": { + "$id": "1271", + "kind": "string", + "type": { + "$ref": "197" + }, + "value": "pmbozfvwrblbknedeb" + }, + "lastModifiedByType": { + "$id": "1272", + "kind": "string", + "type": { + "$ref": "48" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "1273", + "kind": "string", + "type": { + "$ref": "204" + }, + "value": "2024-04-13T19:47:24.986Z" + } + } + } + } + } + ] + }, + "nextLink": { + "$id": "1274", + "kind": "string", + "type": { + "$ref": "381" + }, + "value": "https://microsoft.com/a" + } + } + } + } + ] + } + ] + } + ], + "parameters": [ + { + "$id": "1275", + "name": "endpoint", + "nameInRequest": "endpoint", + "doc": "Service host", + "type": { + "$id": "1276", + "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": "1277", + "type": { + "$id": "1278", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "https://management.azure.com" + } + } + ], + "decorators": [ + { + "$id": "1279", + "name": "Azure.ResourceManager.@armResourceOperations", + "arguments": { + "$id": "1280" + } + } + ], + "crossLanguageDefinitionId": "Microsoft.HealthDataAIServices.PrivateEndpointConnections", + "apiVersions": [ + "2024-02-28-preview", + "2024-09-20" + ], + "parent": { + "$ref": "414" + } + }, + { + "$id": "1281", + "kind": "client", + "name": "PrivateLinks", + "namespace": "Azure.ResourceManager.HealthDataAIServices", + "doc": "Operations for private links on DeidService resource", + "operations": [ + { + "$id": "1282", + "name": "listByDeidService", + "resourceName": "PrivateLinkResource", + "doc": "List private links on the given resource", + "accessibility": "public", + "parameters": [ + { + "$id": "1283", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "1284", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "1285", + "type": { + "$id": "1286", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2024-09-20" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1287", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "1288", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "1289", + "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": "1290", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "1291", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1292", + "name": "deidServiceName", + "nameInRequest": "deidServiceName", + "doc": "The name of the deid service", + "type": { + "$id": "1293", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1294", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "1295", + "kind": "constant", + "valueType": { + "$id": "1296", + "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": "1297", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "385" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "GET", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HealthDataAIServices/deidServices/{deidServiceName}/privateLinkResources", + "bufferResponse": true, + "paging": { + "$id": "1298", + "itemPropertySegments": [ + "value" + ], + "nextLink": { + "$id": "1299", + "responseSegments": [ + "nextLink" + ], + "responseLocation": "Body" + } + }, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.HealthDataAIServices.PrivateLinks.listByDeidService", + "decorators": [], + "examples": [ + { + "$id": "1300", + "kind": "http", + "name": "PrivateLinks_ListByDeidService - generated by [MaximumSet] rule. [stable]", + "description": "PrivateLinks_ListByDeidService - generated by [MaximumSet] rule. [stable]", + "filePath": "2024-09-20/PrivateLinks_ListByDeidService_MaximumSet_Gen.json", + "parameters": [ + { + "$id": "1301", + "parameter": { + "$ref": "1283" + }, + "value": { + "$id": "1302", + "kind": "string", + "type": { + "$ref": "1284" + }, + "value": "2024-09-20" + } + }, + { + "$id": "1303", + "parameter": { + "$ref": "1287" + }, + "value": { + "$id": "1304", + "kind": "string", + "type": { + "$ref": "1288" + }, + "value": "F21BB31B-C214-42C0-ACF0-DACCA05D3011" + } + }, + { + "$id": "1305", + "parameter": { + "$ref": "1290" + }, + "value": { + "$id": "1306", + "kind": "string", + "type": { + "$ref": "1291" + }, + "value": "rgopenapi" + } + }, + { + "$id": "1307", + "parameter": { + "$ref": "1292" + }, + "value": { + "$id": "1308", + "kind": "string", + "type": { + "$ref": "1293" + }, + "value": "deidTest" + } + } + ], + "responses": [ + { + "$id": "1309", + "response": { + "$ref": "1297" + }, + "statusCode": 200, + "bodyValue": { + "$id": "1310", + "kind": "model", + "type": { + "$ref": "385" + }, + "value": { + "$id": "1311", + "value": { + "$id": "1312", + "kind": "array", + "type": { + "$ref": "387" + }, + "value": [ + { + "$id": "1313", + "kind": "model", + "type": { + "$ref": "388" + }, + "value": { + "$id": "1314", + "properties": { + "$id": "1315", + "kind": "model", + "type": { + "$ref": "390" + }, + "value": { + "$id": "1316", + "groupId": { + "$id": "1317", + "kind": "string", + "type": { + "$ref": "392" + }, + "value": "flaloakbdcqjisfhfnkrxmt" + }, + "requiredMembers": { + "$id": "1318", + "kind": "array", + "type": { + "$ref": "396" + }, + "value": [ + { + "$id": "1319", + "kind": "string", + "type": { + "$ref": "397" + }, + "value": "wbraaugftjqa" + } + ] + }, + "requiredZoneNames": { + "$id": "1320", + "kind": "array", + "type": { + "$ref": "401" + }, + "value": [ + { + "$id": "1321", + "kind": "string", + "type": { + "$ref": "402" + }, + "value": "ndsmc" + } + ] + } + } + }, + "id": { + "$id": "1322", + "kind": "string", + "type": { + "$ref": "169" + }, + "value": "/subscriptions/F21BB31B-C214-42C0-ACF0-DACCA05D3011/resourceGroups/rgopenapi/providers/Microsoft.HealthDataAIServices/deidServices/deidTest/privateLinkResources/rmptbzejhgxhlfpdizsekhsq" + }, + "name": { + "$id": "1323", + "kind": "string", + "type": { + "$ref": "174" + }, + "value": "rmptbzejhgxhlfpdizsekhsq" + }, + "type": { + "$id": "1324", + "kind": "string", + "type": { + "$ref": "178" + }, + "value": "lplbvyjkvsujegzqr" + }, + "systemData": { + "$id": "1325", + "kind": "model", + "type": { + "$ref": "183" + }, + "value": { + "$id": "1326", + "createdBy": { + "$id": "1327", + "kind": "string", + "type": { + "$ref": "185" + }, + "value": "p" + }, + "createdByType": { + "$id": "1328", + "kind": "string", + "type": { + "$ref": "48" + }, + "value": "User" + }, + "createdAt": { + "$id": "1329", + "kind": "string", + "type": { + "$ref": "192" + }, + "value": "2024-04-13T19:47:24.985Z" + }, + "lastModifiedBy": { + "$id": "1330", + "kind": "string", + "type": { + "$ref": "197" + }, + "value": "pmbozfvwrblbknedeb" + }, + "lastModifiedByType": { + "$id": "1331", + "kind": "string", + "type": { + "$ref": "48" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "1332", + "kind": "string", + "type": { + "$ref": "204" + }, + "value": "2024-04-13T19:47:24.986Z" + } + } + } + } + } + ] + }, + "nextLink": { + "$id": "1333", + "kind": "string", + "type": { + "$ref": "410" + }, + "value": "https://microsoft.com/arzijt" + } + } + } + } + ] + } + ] + } + ], + "parameters": [ + { + "$id": "1334", + "name": "endpoint", + "nameInRequest": "endpoint", + "doc": "Service host", + "type": { + "$id": "1335", + "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": "1336", + "type": { + "$id": "1337", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "https://management.azure.com" + } + } + ], + "decorators": [ + { + "$id": "1338", + "name": "Azure.ResourceManager.@armResourceOperations", + "arguments": { + "$id": "1339" + } + } + ], + "crossLanguageDefinitionId": "Microsoft.HealthDataAIServices.PrivateLinks", + "apiVersions": [ + "2024-02-28-preview", + "2024-09-20" + ], + "parent": { + "$ref": "414" + } + } + ] + } + ], + "auth": { + "$id": "1340", + "oAuth2": { + "$id": "1341", + "scopes": [ + "user_impersonation" + ] + } + } +} diff --git a/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/tsp-location.yaml b/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/tsp-location.yaml index 2b3e253ddbf3..ed6a4c14b299 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: 6e702986ee542ebd38d0ab2e2f2c00ab48a50b45 +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..e52fad01e2ad 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: 6e702986ee542ebd38d0ab2e2f2c00ab48a50b45 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..851bcbf1f4c3 --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/tspCodeModel.json @@ -0,0 +1,69178 @@ +{ + "$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": "property", + "name": "extendedLocation", + "serializedName": "extendedLocation", + "doc": "Edge location of the resource.", + "type": { + "$id": "510", + "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": "511", + "kind": "property", + "name": "name", + "serializedName": "name", + "doc": "The name of the extended location.", + "type": { + "$id": "512", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.ExtendedLocation.name", + "serializationOptions": { + "$id": "513", + "json": { + "$id": "514", + "name": "name" + } + } + }, + { + "$id": "515", + "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": "516", + "json": { + "$id": "517", + "name": "type" + } + } + } + ] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.InstanceResource.extendedLocation", + "serializationOptions": { + "$id": "518", + "json": { + "$id": "519", + "name": "extendedLocation" + } + } + }, + { + "$id": "520", + "kind": "property", + "name": "identity", + "serializedName": "identity", + "doc": "The managed service identities assigned to this resource.", + "type": { + "$id": "521", + "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": "522", + "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": "523", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "524", + "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": "525", + "json": { + "$id": "526", + "name": "principalId" + } + } + }, + { + "$id": "527", + "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": "528", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "529", + "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": "530", + "json": { + "$id": "531", + "name": "tenantId" + } + } + }, + { + "$id": "532", + "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": "533", + "json": { + "$id": "534", + "name": "type" + } + } + }, + { + "$id": "535", + "kind": "property", + "name": "userAssignedIdentities", + "serializedName": "userAssignedIdentities", + "doc": "The identities assigned to this resource by the user.", + "type": { + "$id": "536", + "kind": "dict", + "keyType": { + "$id": "537", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "valueType": { + "$id": "538", + "kind": "nullable", + "type": { + "$id": "539", + "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": "540", + "kind": "property", + "name": "clientId", + "serializedName": "clientId", + "doc": "The client ID of the assigned identity.", + "type": { + "$id": "541", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "542", + "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": "543", + "json": { + "$id": "544", + "name": "clientId" + } + } + }, + { + "$id": "545", + "kind": "property", + "name": "principalId", + "serializedName": "principalId", + "doc": "The principal ID of the assigned identity.", + "type": { + "$id": "546", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "547", + "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": "548", + "json": { + "$id": "549", + "name": "principalId" + } + } + } + ] + }, + "namespace": "Azure.ResourceManager.IotOperations" + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ManagedServiceIdentity.userAssignedIdentities", + "serializationOptions": { + "$id": "550", + "json": { + "$id": "551", + "name": "userAssignedIdentities" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.InstanceResource.identity", + "serializationOptions": { + "$id": "552", + "json": { + "$id": "553", + "name": "identity" + } + } + } + ] + }, + { + "$ref": "471" + }, + { + "$ref": "484" + }, + { + "$ref": "496" + }, + { + "$ref": "510" + }, + { + "$ref": "521" + }, + { + "$ref": "539" + }, + { + "$ref": "416" + }, + { + "$ref": "417" + }, + { + "$ref": "433" + }, + { + "$id": "554", + "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": "555", + "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": "556", + "json": { + "$id": "557", + "name": "status" + } + } + }, + { + "$id": "558", + "kind": "property", + "name": "name", + "serializedName": "name", + "doc": "The name of the operationStatus resource", + "type": { + "$id": "559", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.ArmOperationStatus.name", + "serializationOptions": { + "$id": "560", + "json": { + "$id": "561", + "name": "name" + } + } + }, + { + "$id": "562", + "kind": "property", + "name": "startTime", + "serializedName": "startTime", + "doc": "Operation start time", + "type": { + "$id": "563", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "rfc3339", + "wireType": { + "$id": "564", + "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": "565", + "json": { + "$id": "566", + "name": "startTime" + } + } + }, + { + "$id": "567", + "kind": "property", + "name": "endTime", + "serializedName": "endTime", + "doc": "Operation complete time", + "type": { + "$id": "568", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "rfc3339", + "wireType": { + "$id": "569", + "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": "570", + "json": { + "$id": "571", + "name": "endTime" + } + } + }, + { + "$id": "572", + "kind": "property", + "name": "percentComplete", + "serializedName": "percentComplete", + "doc": "The progress made toward completing the operation", + "type": { + "$id": "573", + "kind": "float64", + "name": "float64", + "crossLanguageDefinitionId": "TypeSpec.float64", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.ArmOperationStatus.percentComplete", + "serializationOptions": { + "$id": "574", + "json": { + "$id": "575", + "name": "percentComplete" + } + } + }, + { + "$id": "576", + "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": "577", + "json": { + "$id": "578", + "name": "error" + } + } + } + ] + }, + { + "$id": "579", + "kind": "model", + "name": "InstancePatchModel", + "namespace": "Azure.ResourceManager.IotOperations", + "crossLanguageDefinitionId": "Microsoft.IoTOperations.InstancePatchModel", + "usage": "Input,Json", + "doc": "The Instance update model.", + "decorators": [], + "properties": [ + { + "$id": "580", + "kind": "property", + "name": "tags", + "serializedName": "tags", + "doc": "Resource tags.", + "type": { + "$id": "581", + "kind": "dict", + "keyType": { + "$id": "582", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "valueType": { + "$id": "583", + "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": "584", + "json": { + "$id": "585", + "name": "tags" + } + } + }, + { + "$id": "586", + "kind": "property", + "name": "identity", + "serializedName": "identity", + "doc": "The managed service identities assigned to this resource.", + "type": { + "$ref": "521" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.InstancePatchModel.identity", + "serializationOptions": { + "$id": "587", + "json": { + "$id": "588", + "name": "identity" + } + } + } + ] + }, + { + "$id": "589", + "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": "590", + "kind": "property", + "name": "value", + "serializedName": "value", + "doc": "The InstanceResource items on this page", + "type": { + "$id": "591", + "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": "592", + "json": { + "$id": "593", + "name": "value" + } + } + }, + { + "$id": "594", + "kind": "property", + "name": "nextLink", + "serializedName": "nextLink", + "doc": "The link to the next page of items", + "type": { + "$id": "595", + "kind": "url", + "name": "ResourceLocation", + "crossLanguageDefinitionId": "TypeSpec.Rest.ResourceLocation", + "baseType": { + "$id": "596", + "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": "597", + "json": { + "$id": "598", + "name": "nextLink" + } + } + } + ] + }, + { + "$id": "599", + "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": "600", + "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": "601", + "kind": "property", + "name": "properties", + "serializedName": "properties", + "doc": "The resource-specific properties for this resource.", + "type": { + "$id": "602", + "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": "603", + "kind": "property", + "name": "advanced", + "serializedName": "advanced", + "doc": "Advanced settings of Broker.", + "type": { + "$id": "604", + "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": "605", + "kind": "property", + "name": "clients", + "serializedName": "clients", + "doc": "Configurations related to All Clients.", + "type": { + "$id": "606", + "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": "607", + "kind": "property", + "name": "maxSessionExpirySeconds", + "serializedName": "maxSessionExpirySeconds", + "doc": "Upper bound of Session Expiry Interval, in seconds.", + "type": { + "$id": "608", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.ClientConfig.maxSessionExpirySeconds", + "serializationOptions": { + "$id": "609", + "json": { + "$id": "610", + "name": "maxSessionExpirySeconds" + } + } + }, + { + "$id": "611", + "kind": "property", + "name": "maxMessageExpirySeconds", + "serializedName": "maxMessageExpirySeconds", + "doc": "Upper bound of Message 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.maxMessageExpirySeconds", + "serializationOptions": { + "$id": "613", + "json": { + "$id": "614", + "name": "maxMessageExpirySeconds" + } + } + }, + { + "$id": "615", + "kind": "property", + "name": "maxPacketSizeBytes", + "serializedName": "maxPacketSizeBytes", + "doc": "Max message size for a packet in Bytes.", + "type": { + "$id": "616", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.ClientConfig.maxPacketSizeBytes", + "serializationOptions": { + "$id": "617", + "json": { + "$id": "618", + "name": "maxPacketSizeBytes" + } + } + }, + { + "$id": "619", + "kind": "property", + "name": "subscriberQueueLimit", + "serializedName": "subscriberQueueLimit", + "doc": "The limit on the number of queued messages for a subscriber.", + "type": { + "$id": "620", + "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": "621", + "kind": "property", + "name": "length", + "serializedName": "length", + "doc": "The maximum length of the queue before messages start getting dropped.", + "type": { + "$id": "622", + "kind": "int64", + "name": "int64", + "crossLanguageDefinitionId": "TypeSpec.int64", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.SubscriberQueueLimit.length", + "serializationOptions": { + "$id": "623", + "json": { + "$id": "624", + "name": "length" + } + } + }, + { + "$id": "625", + "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": "626", + "json": { + "$id": "627", + "name": "strategy" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.ClientConfig.subscriberQueueLimit", + "serializationOptions": { + "$id": "628", + "json": { + "$id": "629", + "name": "subscriberQueueLimit" + } + } + }, + { + "$id": "630", + "kind": "property", + "name": "maxReceiveMaximum", + "serializedName": "maxReceiveMaximum", + "doc": "Upper bound of Receive Maximum that a client can request in the CONNECT packet.", + "type": { + "$id": "631", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.ClientConfig.maxReceiveMaximum", + "serializationOptions": { + "$id": "632", + "json": { + "$id": "633", + "name": "maxReceiveMaximum" + } + } + }, + { + "$id": "634", + "kind": "property", + "name": "maxKeepAliveSeconds", + "serializedName": "maxKeepAliveSeconds", + "doc": "Upper bound of a client's Keep Alive, in seconds.", + "type": { + "$id": "635", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.ClientConfig.maxKeepAliveSeconds", + "serializationOptions": { + "$id": "636", + "json": { + "$id": "637", + "name": "maxKeepAliveSeconds" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.AdvancedSettings.clients", + "serializationOptions": { + "$id": "638", + "json": { + "$id": "639", + "name": "clients" + } + } + }, + { + "$id": "640", + "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": "641", + "json": { + "$id": "642", + "name": "encryptInternalTraffic" + } + } + }, + { + "$id": "643", + "kind": "property", + "name": "internalCerts", + "serializedName": "internalCerts", + "doc": "Certificate rotation and private key configuration.", + "type": { + "$id": "644", + "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": "645", + "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": "646", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.CertManagerCertOptions.duration", + "serializationOptions": { + "$id": "647", + "json": { + "$id": "648", + "name": "duration" + } + } + }, + { + "$id": "649", + "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": "650", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.CertManagerCertOptions.renewBefore", + "serializationOptions": { + "$id": "651", + "json": { + "$id": "652", + "name": "renewBefore" + } + } + }, + { + "$id": "653", + "kind": "property", + "name": "privateKey", + "serializedName": "privateKey", + "doc": "Configuration of certificate private key.", + "type": { + "$id": "654", + "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": "655", + "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": "656", + "json": { + "$id": "657", + "name": "algorithm" + } + } + }, + { + "$id": "658", + "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": "659", + "json": { + "$id": "660", + "name": "rotationPolicy" + } + } + } + ] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.CertManagerCertOptions.privateKey", + "serializationOptions": { + "$id": "661", + "json": { + "$id": "662", + "name": "privateKey" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.AdvancedSettings.internalCerts", + "serializationOptions": { + "$id": "663", + "json": { + "$id": "664", + "name": "internalCerts" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.BrokerProperties.advanced", + "serializationOptions": { + "$id": "665", + "json": { + "$id": "666", + "name": "advanced" + } + } + }, + { + "$id": "667", + "kind": "property", + "name": "cardinality", + "serializedName": "cardinality", + "doc": "The cardinality details of the broker.", + "type": { + "$id": "668", + "kind": "model", + "name": "BrokerCardinality", + "namespace": "Azure.ResourceManager.IotOperations", + "crossLanguageDefinitionId": "Microsoft.IoTOperations.Cardinality", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Cardinality properties", + "decorators": [], + "properties": [ + { + "$id": "669", + "kind": "property", + "name": "backendChain", + "serializedName": "backendChain", + "doc": "The backend broker desired properties", + "type": { + "$id": "670", + "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": "671", + "kind": "property", + "name": "partitions", + "serializedName": "partitions", + "doc": "The desired number of physical backend partitions.", + "type": { + "$id": "672", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.BackendChain.partitions", + "serializationOptions": { + "$id": "673", + "json": { + "$id": "674", + "name": "partitions" + } + } + }, + { + "$id": "675", + "kind": "property", + "name": "redundancyFactor", + "serializedName": "redundancyFactor", + "doc": "The desired numbers of backend replicas (pods) in a physical partition.", + "type": { + "$id": "676", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.BackendChain.redundancyFactor", + "serializationOptions": { + "$id": "677", + "json": { + "$id": "678", + "name": "redundancyFactor" + } + } + }, + { + "$id": "679", + "kind": "property", + "name": "workers", + "serializedName": "workers", + "doc": "Number of logical backend workers per replica (pod).", + "type": { + "$id": "680", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.BackendChain.workers", + "serializationOptions": { + "$id": "681", + "json": { + "$id": "682", + "name": "workers" + } + } + } + ] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.Cardinality.backendChain", + "serializationOptions": { + "$id": "683", + "json": { + "$id": "684", + "name": "backendChain" + } + } + }, + { + "$id": "685", + "kind": "property", + "name": "frontend", + "serializedName": "frontend", + "doc": "The frontend desired properties", + "type": { + "$id": "686", + "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": "687", + "kind": "property", + "name": "replicas", + "serializedName": "replicas", + "doc": "The desired number of frontend instances (pods).", + "type": { + "$id": "688", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.Frontend.replicas", + "serializationOptions": { + "$id": "689", + "json": { + "$id": "690", + "name": "replicas" + } + } + }, + { + "$id": "691", + "kind": "property", + "name": "workers", + "serializedName": "workers", + "doc": "Number of logical frontend workers per instance (pod).", + "type": { + "$id": "692", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.Frontend.workers", + "serializationOptions": { + "$id": "693", + "json": { + "$id": "694", + "name": "workers" + } + } + } + ] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.Cardinality.frontend", + "serializationOptions": { + "$id": "695", + "json": { + "$id": "696", + "name": "frontend" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.BrokerProperties.cardinality", + "serializationOptions": { + "$id": "697", + "json": { + "$id": "698", + "name": "cardinality" + } + } + }, + { + "$id": "699", + "kind": "property", + "name": "diagnostics", + "serializedName": "diagnostics", + "doc": "Spec defines the desired identities of Broker diagnostics settings.", + "type": { + "$id": "700", + "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": "701", + "kind": "property", + "name": "logs", + "serializedName": "logs", + "doc": "Diagnostic log settings for the resource.", + "type": { + "$id": "702", + "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": "703", + "kind": "property", + "name": "level", + "serializedName": "level", + "doc": "The log level. Examples - 'debug', 'info', 'warn', 'error', 'trace'.", + "type": { + "$id": "704", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DiagnosticsLogs.level", + "serializationOptions": { + "$id": "705", + "json": { + "$id": "706", + "name": "level" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.BrokerDiagnostics.logs", + "serializationOptions": { + "$id": "707", + "json": { + "$id": "708", + "name": "logs" + } + } + }, + { + "$id": "709", + "kind": "property", + "name": "metrics", + "serializedName": "metrics", + "doc": "The metrics settings for the resource.", + "type": { + "$id": "710", + "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": "711", + "kind": "property", + "name": "prometheusPort", + "serializedName": "prometheusPort", + "doc": "The prometheus port to expose the metrics.", + "type": { + "$id": "712", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.Metrics.prometheusPort", + "serializationOptions": { + "$id": "713", + "json": { + "$id": "714", + "name": "prometheusPort" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.BrokerDiagnostics.metrics", + "serializationOptions": { + "$id": "715", + "json": { + "$id": "716", + "name": "metrics" + } + } + }, + { + "$id": "717", + "kind": "property", + "name": "selfCheck", + "serializedName": "selfCheck", + "doc": "The self check properties.", + "type": { + "$id": "718", + "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": "719", + "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": "720", + "json": { + "$id": "721", + "name": "mode" + } + } + }, + { + "$id": "722", + "kind": "property", + "name": "intervalSeconds", + "serializedName": "intervalSeconds", + "doc": "The self check interval.", + "type": { + "$id": "723", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.SelfCheck.intervalSeconds", + "serializationOptions": { + "$id": "724", + "json": { + "$id": "725", + "name": "intervalSeconds" + } + } + }, + { + "$id": "726", + "kind": "property", + "name": "timeoutSeconds", + "serializedName": "timeoutSeconds", + "doc": "The timeout for self check.", + "type": { + "$id": "727", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.SelfCheck.timeoutSeconds", + "serializationOptions": { + "$id": "728", + "json": { + "$id": "729", + "name": "timeoutSeconds" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.BrokerDiagnostics.selfCheck", + "serializationOptions": { + "$id": "730", + "json": { + "$id": "731", + "name": "selfCheck" + } + } + }, + { + "$id": "732", + "kind": "property", + "name": "traces", + "serializedName": "traces", + "doc": "The trace properties.", + "type": { + "$id": "733", + "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": "734", + "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": "735", + "json": { + "$id": "736", + "name": "mode" + } + } + }, + { + "$id": "737", + "kind": "property", + "name": "cacheSizeMegabytes", + "serializedName": "cacheSizeMegabytes", + "doc": "The cache size in megabytes.", + "type": { + "$id": "738", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.Traces.cacheSizeMegabytes", + "serializationOptions": { + "$id": "739", + "json": { + "$id": "740", + "name": "cacheSizeMegabytes" + } + } + }, + { + "$id": "741", + "kind": "property", + "name": "selfTracing", + "serializedName": "selfTracing", + "doc": "The self tracing properties.", + "type": { + "$id": "742", + "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": "743", + "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": "744", + "json": { + "$id": "745", + "name": "mode" + } + } + }, + { + "$id": "746", + "kind": "property", + "name": "intervalSeconds", + "serializedName": "intervalSeconds", + "doc": "The self tracing interval.", + "type": { + "$id": "747", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.SelfTracing.intervalSeconds", + "serializationOptions": { + "$id": "748", + "json": { + "$id": "749", + "name": "intervalSeconds" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.Traces.selfTracing", + "serializationOptions": { + "$id": "750", + "json": { + "$id": "751", + "name": "selfTracing" + } + } + }, + { + "$id": "752", + "kind": "property", + "name": "spanChannelCapacity", + "serializedName": "spanChannelCapacity", + "doc": "The span channel capacity.", + "type": { + "$id": "753", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.Traces.spanChannelCapacity", + "serializationOptions": { + "$id": "754", + "json": { + "$id": "755", + "name": "spanChannelCapacity" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.BrokerDiagnostics.traces", + "serializationOptions": { + "$id": "756", + "json": { + "$id": "757", + "name": "traces" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.BrokerProperties.diagnostics", + "serializationOptions": { + "$id": "758", + "json": { + "$id": "759", + "name": "diagnostics" + } + } + }, + { + "$id": "760", + "kind": "property", + "name": "diskBackedMessageBuffer", + "serializedName": "diskBackedMessageBuffer", + "doc": "Settings of Disk Backed Message Buffer.", + "type": { + "$id": "761", + "kind": "model", + "name": "DiskBackedMessageBuffer", + "namespace": "Azure.ResourceManager.IotOperations", + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DiskBackedMessageBuffer", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "DiskBackedMessageBuffer properties", + "decorators": [], + "properties": [ + { + "$id": "762", + "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": "763", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DiskBackedMessageBuffer.maxSize", + "serializationOptions": { + "$id": "764", + "json": { + "$id": "765", + "name": "maxSize" + } + } + }, + { + "$id": "766", + "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": "767", + "kind": "model", + "name": "VolumeClaimSpec", + "namespace": "Azure.ResourceManager.IotOperations", + "crossLanguageDefinitionId": "Microsoft.IoTOperations.VolumeClaimSpec", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "VolumeClaimSpec properties", + "decorators": [], + "properties": [ + { + "$id": "768", + "kind": "property", + "name": "volumeName", + "serializedName": "volumeName", + "doc": "VolumeName is the binding reference to the PersistentVolume backing this claim.", + "type": { + "$id": "769", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.VolumeClaimSpec.volumeName", + "serializationOptions": { + "$id": "770", + "json": { + "$id": "771", + "name": "volumeName" + } + } + }, + { + "$id": "772", + "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": "773", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.VolumeClaimSpec.volumeMode", + "serializationOptions": { + "$id": "774", + "json": { + "$id": "775", + "name": "volumeMode" + } + } + }, + { + "$id": "776", + "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": "777", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.VolumeClaimSpec.storageClassName", + "serializationOptions": { + "$id": "778", + "json": { + "$id": "779", + "name": "storageClassName" + } + } + }, + { + "$id": "780", + "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": "781", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "782", + "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": "783", + "json": { + "$id": "784", + "name": "accessModes" + } + } + }, + { + "$id": "785", + "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": "786", + "kind": "model", + "name": "LocalKubernetesReference", + "namespace": "Azure.ResourceManager.IotOperations", + "crossLanguageDefinitionId": "Microsoft.IoTOperations.LocalKubernetesReference", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Kubernetes reference", + "decorators": [], + "properties": [ + { + "$id": "787", + "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": "788", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.LocalKubernetesReference.apiGroup", + "serializationOptions": { + "$id": "789", + "json": { + "$id": "790", + "name": "apiGroup" + } + } + }, + { + "$id": "791", + "kind": "property", + "name": "kind", + "serializedName": "kind", + "doc": "Kind is the type of resource being referenced", + "type": { + "$id": "792", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.LocalKubernetesReference.kind", + "serializationOptions": { + "$id": "793", + "json": { + "$id": "794", + "name": "kind" + } + } + }, + { + "$id": "795", + "kind": "property", + "name": "name", + "serializedName": "name", + "doc": "Name is the name 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.name", + "serializationOptions": { + "$id": "797", + "json": { + "$id": "798", + "name": "name" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.VolumeClaimSpec.dataSource", + "serializationOptions": { + "$id": "799", + "json": { + "$id": "800", + "name": "dataSource" + } + } + }, + { + "$id": "801", + "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": "802", + "kind": "model", + "name": "KubernetesReference", + "namespace": "Azure.ResourceManager.IotOperations", + "crossLanguageDefinitionId": "Microsoft.IoTOperations.KubernetesReference", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Kubernetes reference", + "decorators": [], + "properties": [ + { + "$id": "803", + "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": "804", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.KubernetesReference.apiGroup", + "serializationOptions": { + "$id": "805", + "json": { + "$id": "806", + "name": "apiGroup" + } + } + }, + { + "$id": "807", + "kind": "property", + "name": "kind", + "serializedName": "kind", + "doc": "Kind is the type of resource being referenced", + "type": { + "$id": "808", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.KubernetesReference.kind", + "serializationOptions": { + "$id": "809", + "json": { + "$id": "810", + "name": "kind" + } + } + }, + { + "$id": "811", + "kind": "property", + "name": "name", + "serializedName": "name", + "doc": "Name is the name 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.name", + "serializationOptions": { + "$id": "813", + "json": { + "$id": "814", + "name": "name" + } + } + }, + { + "$id": "815", + "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": "816", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.KubernetesReference.namespace", + "serializationOptions": { + "$id": "817", + "json": { + "$id": "818", + "name": "namespace" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.VolumeClaimSpec.dataSourceRef", + "serializationOptions": { + "$id": "819", + "json": { + "$id": "820", + "name": "dataSourceRef" + } + } + }, + { + "$id": "821", + "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": "822", + "kind": "model", + "name": "VolumeClaimResourceRequirements", + "namespace": "Azure.ResourceManager.IotOperations", + "crossLanguageDefinitionId": "Microsoft.IoTOperations.VolumeClaimResourceRequirements", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "VolumeClaimResourceRequirements properties", + "decorators": [], + "properties": [ + { + "$id": "823", + "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": "824", + "kind": "dict", + "keyType": { + "$id": "825", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "valueType": { + "$id": "826", + "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": "827", + "json": { + "$id": "828", + "name": "limits" + } + } + }, + { + "$id": "829", + "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": "830", + "kind": "dict", + "keyType": { + "$id": "831", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "valueType": { + "$id": "832", + "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": "833", + "json": { + "$id": "834", + "name": "requests" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.VolumeClaimSpec.resources", + "serializationOptions": { + "$id": "835", + "json": { + "$id": "836", + "name": "resources" + } + } + }, + { + "$id": "837", + "kind": "property", + "name": "selector", + "serializedName": "selector", + "doc": "A label query over volumes to consider for binding.", + "type": { + "$id": "838", + "kind": "model", + "name": "VolumeClaimSpecSelector", + "namespace": "Azure.ResourceManager.IotOperations", + "crossLanguageDefinitionId": "Microsoft.IoTOperations.VolumeClaimSpecSelector", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "VolumeClaimSpecSelector properties", + "decorators": [], + "properties": [ + { + "$id": "839", + "kind": "property", + "name": "matchExpressions", + "serializedName": "matchExpressions", + "doc": "MatchExpressions is a list of label selector requirements. The requirements are ANDed.", + "type": { + "$id": "840", + "kind": "array", + "name": "ArrayVolumeClaimSpecSelectorMatchExpressions", + "valueType": { + "$id": "841", + "kind": "model", + "name": "VolumeClaimSpecSelectorMatchExpressions", + "namespace": "Azure.ResourceManager.IotOperations", + "crossLanguageDefinitionId": "Microsoft.IoTOperations.VolumeClaimSpecSelectorMatchExpressions", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "VolumeClaimSpecSelectorMatchExpressions properties", + "decorators": [], + "properties": [ + { + "$id": "842", + "kind": "property", + "name": "key", + "serializedName": "key", + "doc": "key is the label key that the selector applies to.", + "type": { + "$id": "843", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.VolumeClaimSpecSelectorMatchExpressions.key", + "serializationOptions": { + "$id": "844", + "json": { + "$id": "845", + "name": "key" + } + } + }, + { + "$id": "846", + "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": "847", + "json": { + "$id": "848", + "name": "operator" + } + } + }, + { + "$id": "849", + "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": "850", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "851", + "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": "852", + "json": { + "$id": "853", + "name": "values" + } + } + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.VolumeClaimSpecSelector.matchExpressions", + "serializationOptions": { + "$id": "854", + "json": { + "$id": "855", + "name": "matchExpressions" + } + } + }, + { + "$id": "856", + "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": "857", + "kind": "dict", + "keyType": { + "$id": "858", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "valueType": { + "$id": "859", + "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": "860", + "json": { + "$id": "861", + "name": "matchLabels" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.VolumeClaimSpec.selector", + "serializationOptions": { + "$id": "862", + "json": { + "$id": "863", + "name": "selector" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DiskBackedMessageBuffer.ephemeralVolumeClaimSpec", + "serializationOptions": { + "$id": "864", + "json": { + "$id": "865", + "name": "ephemeralVolumeClaimSpec" + } + } + }, + { + "$id": "866", + "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": "767" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DiskBackedMessageBuffer.persistentVolumeClaimSpec", + "serializationOptions": { + "$id": "867", + "json": { + "$id": "868", + "name": "persistentVolumeClaimSpec" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.BrokerProperties.diskBackedMessageBuffer", + "serializationOptions": { + "$id": "869", + "json": { + "$id": "870", + "name": "diskBackedMessageBuffer" + } + } + }, + { + "$id": "871", + "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": "872", + "kind": "model", + "name": "GenerateResourceLimits", + "namespace": "Azure.ResourceManager.IotOperations", + "crossLanguageDefinitionId": "Microsoft.IoTOperations.GenerateResourceLimits", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "GenerateResourceLimits properties", + "decorators": [], + "properties": [ + { + "$id": "873", + "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": "874", + "json": { + "$id": "875", + "name": "cpu" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.BrokerProperties.generateResourceLimits", + "serializationOptions": { + "$id": "876", + "json": { + "$id": "877", + "name": "generateResourceLimits" + } + } + }, + { + "$id": "878", + "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": "879", + "json": { + "$id": "880", + "name": "memoryProfile" + } + } + }, + { + "$id": "881", + "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": "882", + "json": { + "$id": "883", + "name": "provisioningState" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.BrokerResource.properties", + "serializationOptions": { + "$id": "884", + "json": { + "$id": "885", + "name": "properties" + } + } + }, + { + "$id": "886", + "kind": "property", + "name": "extendedLocation", + "serializedName": "extendedLocation", + "doc": "Edge location of the resource.", + "type": { + "$ref": "510" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.BrokerResource.extendedLocation", + "serializationOptions": { + "$id": "887", + "json": { + "$id": "888", + "name": "extendedLocation" + } + } + } + ] + }, + { + "$ref": "602" + }, + { + "$ref": "604" + }, + { + "$ref": "606" + }, + { + "$ref": "620" + }, + { + "$ref": "644" + }, + { + "$ref": "654" + }, + { + "$ref": "668" + }, + { + "$ref": "670" + }, + { + "$ref": "686" + }, + { + "$ref": "700" + }, + { + "$ref": "702" + }, + { + "$ref": "710" + }, + { + "$ref": "718" + }, + { + "$ref": "733" + }, + { + "$ref": "742" + }, + { + "$ref": "761" + }, + { + "$ref": "767" + }, + { + "$ref": "786" + }, + { + "$ref": "802" + }, + { + "$ref": "822" + }, + { + "$ref": "838" + }, + { + "$ref": "841" + }, + { + "$ref": "872" + }, + { + "$ref": "600" + }, + { + "$id": "889", + "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": "890", + "kind": "property", + "name": "value", + "serializedName": "value", + "doc": "The BrokerResource items on this page", + "type": { + "$id": "891", + "kind": "array", + "name": "ArrayBrokerResource", + "valueType": { + "$ref": "599" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.ResourceListResult.value", + "serializationOptions": { + "$id": "892", + "json": { + "$id": "893", + "name": "value" + } + } + }, + { + "$id": "894", + "kind": "property", + "name": "nextLink", + "serializedName": "nextLink", + "doc": "The link to the next page of items", + "type": { + "$id": "895", + "kind": "url", + "name": "ResourceLocation", + "crossLanguageDefinitionId": "TypeSpec.Rest.ResourceLocation", + "baseType": { + "$id": "896", + "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": "897", + "json": { + "$id": "898", + "name": "nextLink" + } + } + } + ] + }, + { + "$id": "899", + "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": "600" + }, + "properties": [ + { + "$id": "900", + "kind": "property", + "name": "properties", + "serializedName": "properties", + "doc": "The resource-specific properties for this resource.", + "type": { + "$id": "901", + "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": "902", + "kind": "property", + "name": "serviceName", + "serializedName": "serviceName", + "doc": "Kubernetes Service name of this listener.", + "type": { + "$id": "903", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.BrokerListenerProperties.serviceName", + "serializationOptions": { + "$id": "904", + "json": { + "$id": "905", + "name": "serviceName" + } + } + }, + { + "$id": "906", + "kind": "property", + "name": "ports", + "serializedName": "ports", + "doc": "Ports on which this listener accepts client connections.", + "type": { + "$id": "907", + "kind": "array", + "name": "ArrayListenerPort", + "valueType": { + "$id": "908", + "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": "909", + "kind": "property", + "name": "authenticationRef", + "serializedName": "authenticationRef", + "doc": "Reference to client authentication settings. Omit to disable authentication.", + "type": { + "$id": "910", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.ListenerPort.authenticationRef", + "serializationOptions": { + "$id": "911", + "json": { + "$id": "912", + "name": "authenticationRef" + } + } + }, + { + "$id": "913", + "kind": "property", + "name": "authorizationRef", + "serializedName": "authorizationRef", + "doc": "Reference to client authorization settings. Omit to disable authorization.", + "type": { + "$id": "914", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.ListenerPort.authorizationRef", + "serializationOptions": { + "$id": "915", + "json": { + "$id": "916", + "name": "authorizationRef" + } + } + }, + { + "$id": "917", + "kind": "property", + "name": "nodePort", + "serializedName": "nodePort", + "doc": "Kubernetes node port. Only relevant when this port is associated with a `NodePort` listener.", + "type": { + "$id": "918", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.ListenerPort.nodePort", + "serializationOptions": { + "$id": "919", + "json": { + "$id": "920", + "name": "nodePort" + } + } + }, + { + "$id": "921", + "kind": "property", + "name": "port", + "serializedName": "port", + "doc": "TCP port for accepting client connections.", + "type": { + "$id": "922", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.ListenerPort.port", + "serializationOptions": { + "$id": "923", + "json": { + "$id": "924", + "name": "port" + } + } + }, + { + "$id": "925", + "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": "926", + "json": { + "$id": "927", + "name": "protocol" + } + } + }, + { + "$id": "928", + "kind": "property", + "name": "tls", + "serializedName": "tls", + "doc": "TLS server certificate settings for this port. Omit to disable TLS.", + "type": { + "$id": "929", + "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": "930", + "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": "931", + "json": { + "$id": "932", + "name": "mode" + } + } + }, + { + "$id": "933", + "kind": "property", + "name": "certManagerCertificateSpec", + "serializedName": "certManagerCertificateSpec", + "doc": "Option 1 - Automatic TLS server certificate management with cert-manager.", + "type": { + "$id": "934", + "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": "935", + "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": "936", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.CertManagerCertificateSpec.duration", + "serializationOptions": { + "$id": "937", + "json": { + "$id": "938", + "name": "duration" + } + } + }, + { + "$id": "939", + "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": "940", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.CertManagerCertificateSpec.secretName", + "serializationOptions": { + "$id": "941", + "json": { + "$id": "942", + "name": "secretName" + } + } + }, + { + "$id": "943", + "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": "944", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.CertManagerCertificateSpec.renewBefore", + "serializationOptions": { + "$id": "945", + "json": { + "$id": "946", + "name": "renewBefore" + } + } + }, + { + "$id": "947", + "kind": "property", + "name": "issuerRef", + "serializedName": "issuerRef", + "doc": "cert-manager issuerRef.", + "type": { + "$id": "948", + "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": "949", + "kind": "property", + "name": "group", + "serializedName": "group", + "doc": "group of issuer.", + "type": { + "$id": "950", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.CertManagerIssuerRef.group", + "serializationOptions": { + "$id": "951", + "json": { + "$id": "952", + "name": "group" + } + } + }, + { + "$id": "953", + "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": "954", + "json": { + "$id": "955", + "name": "kind" + } + } + }, + { + "$id": "956", + "kind": "property", + "name": "name", + "serializedName": "name", + "doc": "name of issuer.", + "type": { + "$id": "957", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.CertManagerIssuerRef.name", + "serializationOptions": { + "$id": "958", + "json": { + "$id": "959", + "name": "name" + } + } + } + ] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.CertManagerCertificateSpec.issuerRef", + "serializationOptions": { + "$id": "960", + "json": { + "$id": "961", + "name": "issuerRef" + } + } + }, + { + "$id": "962", + "kind": "property", + "name": "privateKey", + "serializedName": "privateKey", + "doc": "Type of certificate private key.", + "type": { + "$ref": "654" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.CertManagerCertificateSpec.privateKey", + "serializationOptions": { + "$id": "963", + "json": { + "$id": "964", + "name": "privateKey" + } + } + }, + { + "$id": "965", + "kind": "property", + "name": "san", + "serializedName": "san", + "doc": "Additional Subject Alternative Names (SANs) to include in the certificate.", + "type": { + "$id": "966", + "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": "967", + "kind": "property", + "name": "dns", + "serializedName": "dns", + "doc": "DNS SANs.", + "type": { + "$id": "968", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "969", + "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": "970", + "json": { + "$id": "971", + "name": "dns" + } + } + }, + { + "$id": "972", + "kind": "property", + "name": "ip", + "serializedName": "ip", + "doc": "IP address SANs.", + "type": { + "$id": "973", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "974", + "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": "975", + "json": { + "$id": "976", + "name": "ip" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.CertManagerCertificateSpec.san", + "serializationOptions": { + "$id": "977", + "json": { + "$id": "978", + "name": "san" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.TlsCertMethod.certManagerCertificateSpec", + "serializationOptions": { + "$id": "979", + "json": { + "$id": "980", + "name": "certManagerCertificateSpec" + } + } + }, + { + "$id": "981", + "kind": "property", + "name": "manual", + "serializedName": "manual", + "doc": "Option 2 - Manual TLS server certificate management through a defined secret.", + "type": { + "$id": "982", + "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": "983", + "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": "984", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.X509ManualCertificate.secretRef", + "serializationOptions": { + "$id": "985", + "json": { + "$id": "986", + "name": "secretRef" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.TlsCertMethod.manual", + "serializationOptions": { + "$id": "987", + "json": { + "$id": "988", + "name": "manual" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.ListenerPort.tls", + "serializationOptions": { + "$id": "989", + "json": { + "$id": "990", + "name": "tls" + } + } + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.BrokerListenerProperties.ports", + "serializationOptions": { + "$id": "991", + "json": { + "$id": "992", + "name": "ports" + } + } + }, + { + "$id": "993", + "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": "994", + "json": { + "$id": "995", + "name": "serviceType" + } + } + }, + { + "$id": "996", + "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": "997", + "json": { + "$id": "998", + "name": "provisioningState" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.BrokerListenerResource.properties", + "serializationOptions": { + "$id": "999", + "json": { + "$id": "1000", + "name": "properties" + } + } + }, + { + "$id": "1001", + "kind": "property", + "name": "extendedLocation", + "serializedName": "extendedLocation", + "doc": "Edge location of the resource.", + "type": { + "$ref": "510" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.BrokerListenerResource.extendedLocation", + "serializationOptions": { + "$id": "1002", + "json": { + "$id": "1003", + "name": "extendedLocation" + } + } + } + ] + }, + { + "$ref": "901" + }, + { + "$ref": "908" + }, + { + "$ref": "929" + }, + { + "$ref": "934" + }, + { + "$ref": "948" + }, + { + "$ref": "966" + }, + { + "$ref": "982" + }, + { + "$id": "1004", + "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": "1005", + "kind": "property", + "name": "value", + "serializedName": "value", + "doc": "The BrokerListenerResource items on this page", + "type": { + "$id": "1006", + "kind": "array", + "name": "ArrayBrokerListenerResource", + "valueType": { + "$ref": "899" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.ResourceListResult.value", + "serializationOptions": { + "$id": "1007", + "json": { + "$id": "1008", + "name": "value" + } + } + }, + { + "$id": "1009", + "kind": "property", + "name": "nextLink", + "serializedName": "nextLink", + "doc": "The link to the next page of items", + "type": { + "$id": "1010", + "kind": "url", + "name": "ResourceLocation", + "crossLanguageDefinitionId": "TypeSpec.Rest.ResourceLocation", + "baseType": { + "$id": "1011", + "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": "1012", + "json": { + "$id": "1013", + "name": "nextLink" + } + } + } + ] + }, + { + "$id": "1014", + "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": "600" + }, + "properties": [ + { + "$id": "1015", + "kind": "property", + "name": "properties", + "serializedName": "properties", + "doc": "The resource-specific properties for this resource.", + "type": { + "$id": "1016", + "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": "1017", + "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": "1018", + "kind": "array", + "name": "ArrayBrokerAuthenticatorMethods", + "valueType": { + "$id": "1019", + "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": "1020", + "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": "1021", + "json": { + "$id": "1022", + "name": "method" + } + } + }, + { + "$id": "1023", + "kind": "property", + "name": "customSettings", + "serializedName": "customSettings", + "doc": "Custom authentication configuration.", + "type": { + "$id": "1024", + "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": "1025", + "kind": "property", + "name": "auth", + "serializedName": "auth", + "doc": "Optional authentication needed for authenticating with the custom authentication server.", + "type": { + "$id": "1026", + "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": "1027", + "kind": "property", + "name": "x509", + "serializedName": "x509", + "doc": "X509 Custom Auth type details.", + "type": { + "$ref": "982" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.BrokerAuthenticatorCustomAuth.x509", + "serializationOptions": { + "$id": "1028", + "json": { + "$id": "1029", + "name": "x509" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.BrokerAuthenticatorMethodCustom.auth", + "serializationOptions": { + "$id": "1030", + "json": { + "$id": "1031", + "name": "auth" + } + } + }, + { + "$id": "1032", + "kind": "property", + "name": "caCertConfigMap", + "serializedName": "caCertConfigMap", + "doc": "Optional CA certificate for validating the custom authentication server's certificate.", + "type": { + "$id": "1033", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.BrokerAuthenticatorMethodCustom.caCertConfigMap", + "serializationOptions": { + "$id": "1034", + "json": { + "$id": "1035", + "name": "caCertConfigMap" + } + } + }, + { + "$id": "1036", + "kind": "property", + "name": "endpoint", + "serializedName": "endpoint", + "doc": "Endpoint of the custom authentication server. Must be an HTTPS endpoint.", + "type": { + "$id": "1037", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.BrokerAuthenticatorMethodCustom.endpoint", + "serializationOptions": { + "$id": "1038", + "json": { + "$id": "1039", + "name": "endpoint" + } + } + }, + { + "$id": "1040", + "kind": "property", + "name": "headers", + "serializedName": "headers", + "doc": "Additional HTTP headers to pass to the custom authentication server.", + "type": { + "$id": "1041", + "kind": "dict", + "keyType": { + "$id": "1042", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "valueType": { + "$id": "1043", + "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": "1044", + "json": { + "$id": "1045", + "name": "headers" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.BrokerAuthenticatorMethods.customSettings", + "serializationOptions": { + "$id": "1046", + "json": { + "$id": "1047", + "name": "customSettings" + } + } + }, + { + "$id": "1048", + "kind": "property", + "name": "serviceAccountTokenSettings", + "serializedName": "serviceAccountTokenSettings", + "doc": "ServiceAccountToken authentication configuration.", + "type": { + "$id": "1049", + "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": "1050", + "kind": "property", + "name": "audiences", + "serializedName": "audiences", + "doc": "List of allowed audience.", + "type": { + "$id": "1051", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "1052", + "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": "1053", + "json": { + "$id": "1054", + "name": "audiences" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.BrokerAuthenticatorMethods.serviceAccountTokenSettings", + "serializationOptions": { + "$id": "1055", + "json": { + "$id": "1056", + "name": "serviceAccountTokenSettings" + } + } + }, + { + "$id": "1057", + "kind": "property", + "name": "x509Settings", + "serializedName": "x509Settings", + "doc": "X.509 authentication configuration.", + "type": { + "$id": "1058", + "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": "1059", + "kind": "property", + "name": "authorizationAttributes", + "serializedName": "authorizationAttributes", + "doc": "X509 authorization attributes properties.", + "type": { + "$id": "1060", + "kind": "dict", + "keyType": { + "$id": "1061", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "valueType": { + "$id": "1062", + "kind": "model", + "name": "BrokerAuthenticatorMethodX509Attributes", + "namespace": "Azure.ResourceManager.IotOperations", + "crossLanguageDefinitionId": "Microsoft.IoTOperations.BrokerAuthenticatorMethodX509Attributes", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "BrokerAuthenticatorMethodX509Attributes properties.", + "decorators": [], + "properties": [ + { + "$id": "1063", + "kind": "property", + "name": "attributes", + "serializedName": "attributes", + "doc": "Attributes object.", + "type": { + "$id": "1064", + "kind": "dict", + "keyType": { + "$id": "1065", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "valueType": { + "$id": "1066", + "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": "1067", + "json": { + "$id": "1068", + "name": "attributes" + } + } + }, + { + "$id": "1069", + "kind": "property", + "name": "subject", + "serializedName": "subject", + "doc": "Subject of the X509 attribute.", + "type": { + "$id": "1070", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.BrokerAuthenticatorMethodX509Attributes.subject", + "serializationOptions": { + "$id": "1071", + "json": { + "$id": "1072", + "name": "subject" + } + } + } + ] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.BrokerAuthenticatorMethodX509.authorizationAttributes", + "serializationOptions": { + "$id": "1073", + "json": { + "$id": "1074", + "name": "authorizationAttributes" + } + } + }, + { + "$id": "1075", + "kind": "property", + "name": "trustedClientCaCert", + "serializedName": "trustedClientCaCert", + "doc": "Name of the trusted client ca cert resource.", + "type": { + "$id": "1076", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.BrokerAuthenticatorMethodX509.trustedClientCaCert", + "serializationOptions": { + "$id": "1077", + "json": { + "$id": "1078", + "name": "trustedClientCaCert" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.BrokerAuthenticatorMethods.x509Settings", + "serializationOptions": { + "$id": "1079", + "json": { + "$id": "1080", + "name": "x509Settings" + } + } + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.BrokerAuthenticationProperties.authenticationMethods", + "serializationOptions": { + "$id": "1081", + "json": { + "$id": "1082", + "name": "authenticationMethods" + } + } + }, + { + "$id": "1083", + "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": "1084", + "json": { + "$id": "1085", + "name": "provisioningState" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.BrokerAuthenticationResource.properties", + "serializationOptions": { + "$id": "1086", + "json": { + "$id": "1087", + "name": "properties" + } + } + }, + { + "$id": "1088", + "kind": "property", + "name": "extendedLocation", + "serializedName": "extendedLocation", + "doc": "Edge location of the resource.", + "type": { + "$ref": "510" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.BrokerAuthenticationResource.extendedLocation", + "serializationOptions": { + "$id": "1089", + "json": { + "$id": "1090", + "name": "extendedLocation" + } + } + } + ] + }, + { + "$ref": "1016" + }, + { + "$ref": "1019" + }, + { + "$ref": "1024" + }, + { + "$ref": "1026" + }, + { + "$ref": "1049" + }, + { + "$ref": "1058" + }, + { + "$ref": "1062" + }, + { + "$id": "1091", + "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": "1092", + "kind": "property", + "name": "value", + "serializedName": "value", + "doc": "The BrokerAuthenticationResource items on this page", + "type": { + "$id": "1093", + "kind": "array", + "name": "ArrayBrokerAuthenticationResource", + "valueType": { + "$ref": "1014" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.ResourceListResult.value", + "serializationOptions": { + "$id": "1094", + "json": { + "$id": "1095", + "name": "value" + } + } + }, + { + "$id": "1096", + "kind": "property", + "name": "nextLink", + "serializedName": "nextLink", + "doc": "The link to the next page of items", + "type": { + "$id": "1097", + "kind": "url", + "name": "ResourceLocation", + "crossLanguageDefinitionId": "TypeSpec.Rest.ResourceLocation", + "baseType": { + "$id": "1098", + "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": "1099", + "json": { + "$id": "1100", + "name": "nextLink" + } + } + } + ] + }, + { + "$id": "1101", + "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": "600" + }, + "properties": [ + { + "$id": "1102", + "kind": "property", + "name": "properties", + "serializedName": "properties", + "doc": "The resource-specific properties for this resource.", + "type": { + "$id": "1103", + "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": "1104", + "kind": "property", + "name": "authorizationPolicies", + "serializedName": "authorizationPolicies", + "doc": "The list of authorization policies supported by the Authorization Resource.", + "type": { + "$id": "1105", + "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": "1106", + "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": "1107", + "json": { + "$id": "1108", + "name": "cache" + } + } + }, + { + "$id": "1109", + "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": "1110", + "kind": "array", + "name": "ArrayAuthorizationRule", + "valueType": { + "$id": "1111", + "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": "1112", + "kind": "property", + "name": "brokerResources", + "serializedName": "brokerResources", + "doc": "Give access to Broker methods and topics.", + "type": { + "$id": "1113", + "kind": "array", + "name": "ArrayBrokerResourceRule", + "valueType": { + "$id": "1114", + "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": "1115", + "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": "1116", + "json": { + "$id": "1117", + "name": "method" + } + } + }, + { + "$id": "1118", + "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": "1119", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "1120", + "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": "1121", + "json": { + "$id": "1122", + "name": "clientIds" + } + } + }, + { + "$id": "1123", + "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": "1124", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "1125", + "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": "1126", + "json": { + "$id": "1127", + "name": "topics" + } + } + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.AuthorizationRule.brokerResources", + "serializationOptions": { + "$id": "1128", + "json": { + "$id": "1129", + "name": "brokerResources" + } + } + }, + { + "$id": "1130", + "kind": "property", + "name": "principals", + "serializedName": "principals", + "doc": "Give access to clients based on the following properties.", + "type": { + "$id": "1131", + "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": "1132", + "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": "1133", + "kind": "array", + "name": "ArrayRecord", + "valueType": { + "$id": "1134", + "kind": "dict", + "keyType": { + "$id": "1135", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "valueType": { + "$id": "1136", + "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": "1137", + "json": { + "$id": "1138", + "name": "attributes" + } + } + }, + { + "$id": "1139", + "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": "1140", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "1141", + "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": "1142", + "json": { + "$id": "1143", + "name": "clientIds" + } + } + }, + { + "$id": "1144", + "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": "1145", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "1146", + "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": "1147", + "json": { + "$id": "1148", + "name": "usernames" + } + } + } + ] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.AuthorizationRule.principals", + "serializationOptions": { + "$id": "1149", + "json": { + "$id": "1150", + "name": "principals" + } + } + }, + { + "$id": "1151", + "kind": "property", + "name": "stateStoreResources", + "serializedName": "stateStoreResources", + "doc": "Give access to state store resources.", + "type": { + "$id": "1152", + "kind": "array", + "name": "ArrayStateStoreResourceRule", + "valueType": { + "$id": "1153", + "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": "1154", + "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": "1155", + "json": { + "$id": "1156", + "name": "keyType" + } + } + }, + { + "$id": "1157", + "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": "1158", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "1159", + "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": "1160", + "json": { + "$id": "1161", + "name": "keys" + } + } + }, + { + "$id": "1162", + "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": "1163", + "json": { + "$id": "1164", + "name": "method" + } + } + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.AuthorizationRule.stateStoreResources", + "serializationOptions": { + "$id": "1165", + "json": { + "$id": "1166", + "name": "stateStoreResources" + } + } + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.AuthorizationConfig.rules", + "serializationOptions": { + "$id": "1167", + "json": { + "$id": "1168", + "name": "rules" + } + } + } + ] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.BrokerAuthorizationProperties.authorizationPolicies", + "serializationOptions": { + "$id": "1169", + "json": { + "$id": "1170", + "name": "authorizationPolicies" + } + } + }, + { + "$id": "1171", + "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": "1172", + "json": { + "$id": "1173", + "name": "provisioningState" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.BrokerAuthorizationResource.properties", + "serializationOptions": { + "$id": "1174", + "json": { + "$id": "1175", + "name": "properties" + } + } + }, + { + "$id": "1176", + "kind": "property", + "name": "extendedLocation", + "serializedName": "extendedLocation", + "doc": "Edge location of the resource.", + "type": { + "$ref": "510" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.BrokerAuthorizationResource.extendedLocation", + "serializationOptions": { + "$id": "1177", + "json": { + "$id": "1178", + "name": "extendedLocation" + } + } + } + ] + }, + { + "$ref": "1103" + }, + { + "$ref": "1105" + }, + { + "$ref": "1111" + }, + { + "$ref": "1114" + }, + { + "$ref": "1131" + }, + { + "$ref": "1153" + }, + { + "$id": "1179", + "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": "1180", + "kind": "property", + "name": "value", + "serializedName": "value", + "doc": "The BrokerAuthorizationResource items on this page", + "type": { + "$id": "1181", + "kind": "array", + "name": "ArrayBrokerAuthorizationResource", + "valueType": { + "$ref": "1101" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.ResourceListResult.value", + "serializationOptions": { + "$id": "1182", + "json": { + "$id": "1183", + "name": "value" + } + } + }, + { + "$id": "1184", + "kind": "property", + "name": "nextLink", + "serializedName": "nextLink", + "doc": "The link to the next page of items", + "type": { + "$id": "1185", + "kind": "url", + "name": "ResourceLocation", + "crossLanguageDefinitionId": "TypeSpec.Rest.ResourceLocation", + "baseType": { + "$id": "1186", + "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": "1187", + "json": { + "$id": "1188", + "name": "nextLink" + } + } + } + ] + }, + { + "$id": "1189", + "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": "600" + }, + "properties": [ + { + "$id": "1190", + "kind": "property", + "name": "properties", + "serializedName": "properties", + "doc": "The resource-specific properties for this resource.", + "type": { + "$id": "1191", + "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": "1192", + "kind": "property", + "name": "diagnostics", + "serializedName": "diagnostics", + "doc": "Spec defines the desired identities of NBC diagnostics settings.", + "type": { + "$id": "1193", + "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": "1194", + "kind": "property", + "name": "logs", + "serializedName": "logs", + "doc": "Diagnostic log settings for the resource.", + "type": { + "$ref": "702" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.ProfileDiagnostics.logs", + "serializationOptions": { + "$id": "1195", + "json": { + "$id": "1196", + "name": "logs" + } + } + }, + { + "$id": "1197", + "kind": "property", + "name": "metrics", + "serializedName": "metrics", + "doc": "The metrics settings for the resource.", + "type": { + "$ref": "710" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.ProfileDiagnostics.metrics", + "serializationOptions": { + "$id": "1198", + "json": { + "$id": "1199", + "name": "metrics" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowProfileProperties.diagnostics", + "serializationOptions": { + "$id": "1200", + "json": { + "$id": "1201", + "name": "diagnostics" + } + } + }, + { + "$id": "1202", + "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": "1203", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowProfileProperties.instanceCount", + "serializationOptions": { + "$id": "1204", + "json": { + "$id": "1205", + "name": "instanceCount" + } + } + }, + { + "$id": "1206", + "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": "1207", + "json": { + "$id": "1208", + "name": "provisioningState" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowProfileResource.properties", + "serializationOptions": { + "$id": "1209", + "json": { + "$id": "1210", + "name": "properties" + } + } + }, + { + "$id": "1211", + "kind": "property", + "name": "extendedLocation", + "serializedName": "extendedLocation", + "doc": "Edge location of the resource.", + "type": { + "$ref": "510" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowProfileResource.extendedLocation", + "serializationOptions": { + "$id": "1212", + "json": { + "$id": "1213", + "name": "extendedLocation" + } + } + } + ] + }, + { + "$ref": "1191" + }, + { + "$ref": "1193" + }, + { + "$id": "1214", + "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": "1215", + "kind": "property", + "name": "value", + "serializedName": "value", + "doc": "The DataflowProfileResource items on this page", + "type": { + "$id": "1216", + "kind": "array", + "name": "ArrayDataflowProfileResource", + "valueType": { + "$ref": "1189" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.ResourceListResult.value", + "serializationOptions": { + "$id": "1217", + "json": { + "$id": "1218", + "name": "value" + } + } + }, + { + "$id": "1219", + "kind": "property", + "name": "nextLink", + "serializedName": "nextLink", + "doc": "The link to the next page of items", + "type": { + "$id": "1220", + "kind": "url", + "name": "ResourceLocation", + "crossLanguageDefinitionId": "TypeSpec.Rest.ResourceLocation", + "baseType": { + "$id": "1221", + "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": "1222", + "json": { + "$id": "1223", + "name": "nextLink" + } + } + } + ] + }, + { + "$id": "1224", + "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": "600" + }, + "properties": [ + { + "$id": "1225", + "kind": "property", + "name": "properties", + "serializedName": "properties", + "doc": "The resource-specific properties for this resource.", + "type": { + "$id": "1226", + "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": "1227", + "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": "1228", + "json": { + "$id": "1229", + "name": "mode" + } + } + }, + { + "$id": "1230", + "kind": "property", + "name": "operations", + "serializedName": "operations", + "doc": "List of operations including source and destination references as well as transformation.", + "type": { + "$id": "1231", + "kind": "array", + "name": "ArrayDataflowOperation", + "valueType": { + "$id": "1232", + "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": "1233", + "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": "1234", + "json": { + "$id": "1235", + "name": "operationType" + } + } + }, + { + "$id": "1236", + "kind": "property", + "name": "name", + "serializedName": "name", + "doc": "Optional user provided name of the transformation.", + "type": { + "$id": "1237", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowOperation.name", + "serializationOptions": { + "$id": "1238", + "json": { + "$id": "1239", + "name": "name" + } + } + }, + { + "$id": "1240", + "kind": "property", + "name": "sourceSettings", + "serializedName": "sourceSettings", + "doc": "Source configuration.", + "type": { + "$id": "1241", + "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": "1242", + "kind": "property", + "name": "endpointRef", + "serializedName": "endpointRef", + "doc": "Reference to the Dataflow Endpoint resource. Can only be of Broker and Kafka type.", + "type": { + "$id": "1243", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowSourceOperationSettings.endpointRef", + "serializationOptions": { + "$id": "1244", + "json": { + "$id": "1245", + "name": "endpointRef" + } + } + }, + { + "$id": "1246", + "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": "1247", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowSourceOperationSettings.assetRef", + "serializationOptions": { + "$id": "1248", + "json": { + "$id": "1249", + "name": "assetRef" + } + } + }, + { + "$id": "1250", + "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": "1251", + "json": { + "$id": "1252", + "name": "serializationFormat" + } + } + }, + { + "$id": "1253", + "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": "1254", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowSourceOperationSettings.schemaRef", + "serializationOptions": { + "$id": "1255", + "json": { + "$id": "1256", + "name": "schemaRef" + } + } + }, + { + "$id": "1257", + "kind": "property", + "name": "dataSources", + "serializedName": "dataSources", + "doc": "List of source locations. Can be Broker or Kafka topics. Supports wildcards # and +.", + "type": { + "$id": "1258", + "kind": "array", + "name": "Array1", + "valueType": { + "$id": "1259", + "kind": "string", + "name": "NonEmptyString", + "crossLanguageDefinitionId": "Microsoft.IoTOperations.NonEmptyString", + "baseType": { + "$id": "1260", + "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": "1261", + "json": { + "$id": "1262", + "name": "dataSources" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowOperation.sourceSettings", + "serializationOptions": { + "$id": "1263", + "json": { + "$id": "1264", + "name": "sourceSettings" + } + } + }, + { + "$id": "1265", + "kind": "property", + "name": "builtInTransformationSettings", + "serializedName": "builtInTransformationSettings", + "doc": "Built In Transformation configuration.", + "type": { + "$id": "1266", + "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": "1267", + "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": "1268", + "json": { + "$id": "1269", + "name": "serializationFormat" + } + } + }, + { + "$id": "1270", + "kind": "property", + "name": "schemaRef", + "serializedName": "schemaRef", + "doc": "Reference to the schema that describes the output of the transformation.", + "type": { + "$id": "1271", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowBuiltInTransformationSettings.schemaRef", + "serializationOptions": { + "$id": "1272", + "json": { + "$id": "1273", + "name": "schemaRef" + } + } + }, + { + "$id": "1274", + "kind": "property", + "name": "datasets", + "serializedName": "datasets", + "doc": "Enrich data from Broker State Store. Dataset references a key in Broker State Store.", + "type": { + "$id": "1275", + "kind": "array", + "name": "ArrayDataflowBuiltInTransformationDataset", + "valueType": { + "$id": "1276", + "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": "1277", + "kind": "property", + "name": "key", + "serializedName": "key", + "doc": "The key of the dataset.", + "type": { + "$id": "1278", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowBuiltInTransformationDataset.key", + "serializationOptions": { + "$id": "1279", + "json": { + "$id": "1280", + "name": "key" + } + } + }, + { + "$id": "1281", + "kind": "property", + "name": "description", + "serializedName": "description", + "doc": "A user provided optional description of the dataset.", + "type": { + "$id": "1282", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowBuiltInTransformationDataset.description", + "serializationOptions": { + "$id": "1283", + "json": { + "$id": "1284", + "name": "description" + } + } + }, + { + "$id": "1285", + "kind": "property", + "name": "schemaRef", + "serializedName": "schemaRef", + "doc": "The reference to the schema that describes the dataset. Allowed: JSON Schema/draft-7.", + "type": { + "$id": "1286", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowBuiltInTransformationDataset.schemaRef", + "serializationOptions": { + "$id": "1287", + "json": { + "$id": "1288", + "name": "schemaRef" + } + } + }, + { + "$id": "1289", + "kind": "property", + "name": "inputs", + "serializedName": "inputs", + "doc": "List of fields for enriching from the Broker State Store.", + "type": { + "$id": "1290", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "1291", + "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": "1292", + "json": { + "$id": "1293", + "name": "inputs" + } + } + }, + { + "$id": "1294", + "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": "1295", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowBuiltInTransformationDataset.expression", + "serializationOptions": { + "$id": "1296", + "json": { + "$id": "1297", + "name": "expression" + } + } + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowBuiltInTransformationSettings.datasets", + "serializationOptions": { + "$id": "1298", + "json": { + "$id": "1299", + "name": "datasets" + } + } + }, + { + "$id": "1300", + "kind": "property", + "name": "filter", + "serializedName": "filter", + "doc": "Filters input record or datapoints based on condition.", + "type": { + "$id": "1301", + "kind": "array", + "name": "ArrayDataflowBuiltInTransformationFilter", + "valueType": { + "$id": "1302", + "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": "1303", + "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": "1304", + "json": { + "$id": "1305", + "name": "type" + } + } + }, + { + "$id": "1306", + "kind": "property", + "name": "description", + "serializedName": "description", + "doc": "A user provided optional description of the filter.", + "type": { + "$id": "1307", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowBuiltInTransformationFilter.description", + "serializationOptions": { + "$id": "1308", + "json": { + "$id": "1309", + "name": "description" + } + } + }, + { + "$id": "1310", + "kind": "property", + "name": "inputs", + "serializedName": "inputs", + "doc": "List of fields for filtering in JSON path expression.", + "type": { + "$id": "1311", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "1312", + "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": "1313", + "json": { + "$id": "1314", + "name": "inputs" + } + } + }, + { + "$id": "1315", + "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": "1316", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowBuiltInTransformationFilter.expression", + "serializationOptions": { + "$id": "1317", + "json": { + "$id": "1318", + "name": "expression" + } + } + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowBuiltInTransformationSettings.filter", + "serializationOptions": { + "$id": "1319", + "json": { + "$id": "1320", + "name": "filter" + } + } + }, + { + "$id": "1321", + "kind": "property", + "name": "map", + "serializedName": "map", + "doc": "Maps input to output message.", + "type": { + "$id": "1322", + "kind": "array", + "name": "ArrayDataflowBuiltInTransformationMap", + "valueType": { + "$id": "1323", + "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": "1324", + "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": "1325", + "json": { + "$id": "1326", + "name": "type" + } + } + }, + { + "$id": "1327", + "kind": "property", + "name": "description", + "serializedName": "description", + "doc": "A user provided optional description of the mapping function.", + "type": { + "$id": "1328", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowBuiltInTransformationMap.description", + "serializationOptions": { + "$id": "1329", + "json": { + "$id": "1330", + "name": "description" + } + } + }, + { + "$id": "1331", + "kind": "property", + "name": "inputs", + "serializedName": "inputs", + "doc": "List of fields for mapping in JSON path expression.", + "type": { + "$id": "1332", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "1333", + "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": "1334", + "json": { + "$id": "1335", + "name": "inputs" + } + } + }, + { + "$id": "1336", + "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": "1337", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowBuiltInTransformationMap.expression", + "serializationOptions": { + "$id": "1338", + "json": { + "$id": "1339", + "name": "expression" + } + } + }, + { + "$id": "1340", + "kind": "property", + "name": "output", + "serializedName": "output", + "doc": "Where and how the input fields to be organized in the output record.", + "type": { + "$id": "1341", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowBuiltInTransformationMap.output", + "serializationOptions": { + "$id": "1342", + "json": { + "$id": "1343", + "name": "output" + } + } + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowBuiltInTransformationSettings.map", + "serializationOptions": { + "$id": "1344", + "json": { + "$id": "1345", + "name": "map" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowOperation.builtInTransformationSettings", + "serializationOptions": { + "$id": "1346", + "json": { + "$id": "1347", + "name": "builtInTransformationSettings" + } + } + }, + { + "$id": "1348", + "kind": "property", + "name": "destinationSettings", + "serializedName": "destinationSettings", + "doc": "Destination configuration.", + "type": { + "$id": "1349", + "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": "1350", + "kind": "property", + "name": "endpointRef", + "serializedName": "endpointRef", + "doc": "Reference to the Endpoint CR. Can be of Broker, Kafka, Fabric, ADLS, ADX type.", + "type": { + "$id": "1351", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowDestinationOperationSettings.endpointRef", + "serializationOptions": { + "$id": "1352", + "json": { + "$id": "1353", + "name": "endpointRef" + } + } + }, + { + "$id": "1354", + "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": "1355", + "kind": "string", + "name": "NonEmptyString", + "crossLanguageDefinitionId": "Microsoft.IoTOperations.NonEmptyString", + "baseType": { + "$id": "1356", + "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": "1357", + "json": { + "$id": "1358", + "name": "dataDestination" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowOperation.destinationSettings", + "serializationOptions": { + "$id": "1359", + "json": { + "$id": "1360", + "name": "destinationSettings" + } + } + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowProperties.operations", + "serializationOptions": { + "$id": "1361", + "json": { + "$id": "1362", + "name": "operations" + } + } + }, + { + "$id": "1363", + "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": "1364", + "json": { + "$id": "1365", + "name": "provisioningState" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowResource.properties", + "serializationOptions": { + "$id": "1366", + "json": { + "$id": "1367", + "name": "properties" + } + } + }, + { + "$id": "1368", + "kind": "property", + "name": "extendedLocation", + "serializedName": "extendedLocation", + "doc": "Edge location of the resource.", + "type": { + "$ref": "510" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowResource.extendedLocation", + "serializationOptions": { + "$id": "1369", + "json": { + "$id": "1370", + "name": "extendedLocation" + } + } + } + ] + }, + { + "$ref": "1226" + }, + { + "$ref": "1232" + }, + { + "$ref": "1241" + }, + { + "$ref": "1266" + }, + { + "$ref": "1276" + }, + { + "$ref": "1302" + }, + { + "$ref": "1323" + }, + { + "$ref": "1349" + }, + { + "$id": "1371", + "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": "1372", + "kind": "property", + "name": "value", + "serializedName": "value", + "doc": "The DataflowResource items on this page", + "type": { + "$id": "1373", + "kind": "array", + "name": "ArrayDataflowResource", + "valueType": { + "$ref": "1224" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.ResourceListResult.value", + "serializationOptions": { + "$id": "1374", + "json": { + "$id": "1375", + "name": "value" + } + } + }, + { + "$id": "1376", + "kind": "property", + "name": "nextLink", + "serializedName": "nextLink", + "doc": "The link to the next page of items", + "type": { + "$id": "1377", + "kind": "url", + "name": "ResourceLocation", + "crossLanguageDefinitionId": "TypeSpec.Rest.ResourceLocation", + "baseType": { + "$id": "1378", + "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": "1379", + "json": { + "$id": "1380", + "name": "nextLink" + } + } + } + ] + }, + { + "$id": "1381", + "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": "600" + }, + "properties": [ + { + "$id": "1382", + "kind": "property", + "name": "properties", + "serializedName": "properties", + "doc": "The resource-specific properties for this resource.", + "type": { + "$id": "1383", + "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": "1384", + "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": "1385", + "json": { + "$id": "1386", + "name": "endpointType" + } + } + }, + { + "$id": "1387", + "kind": "property", + "name": "dataExplorerSettings", + "serializedName": "dataExplorerSettings", + "doc": "Azure Data Explorer endpoint.", + "type": { + "$id": "1388", + "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": "1389", + "kind": "property", + "name": "authentication", + "serializedName": "authentication", + "doc": "Authentication configuration. NOTE - only authentication property is allowed per entry.", + "type": { + "$id": "1390", + "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": "1391", + "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": "1392", + "json": { + "$id": "1393", + "name": "method" + } + } + }, + { + "$id": "1394", + "kind": "property", + "name": "systemAssignedManagedIdentitySettings", + "serializedName": "systemAssignedManagedIdentitySettings", + "doc": "System-assigned managed identity authentication.", + "type": { + "$id": "1395", + "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": "1396", + "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": "1397", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpointAuthenticationSystemAssignedManagedIdentity.audience", + "serializationOptions": { + "$id": "1398", + "json": { + "$id": "1399", + "name": "audience" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpointDataExplorerAuthentication.systemAssignedManagedIdentitySettings", + "serializationOptions": { + "$id": "1400", + "json": { + "$id": "1401", + "name": "systemAssignedManagedIdentitySettings" + } + } + }, + { + "$id": "1402", + "kind": "property", + "name": "userAssignedManagedIdentitySettings", + "serializedName": "userAssignedManagedIdentitySettings", + "doc": "User-assigned managed identity authentication.", + "type": { + "$id": "1403", + "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": "1404", + "kind": "property", + "name": "clientId", + "serializedName": "clientId", + "doc": "Client ID for the user-assigned managed identity.", + "type": { + "$id": "1405", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpointAuthenticationUserAssignedManagedIdentity.clientId", + "serializationOptions": { + "$id": "1406", + "json": { + "$id": "1407", + "name": "clientId" + } + } + }, + { + "$id": "1408", + "kind": "property", + "name": "scope", + "serializedName": "scope", + "doc": "Resource identifier (application ID URI) of the resource, affixed with the .default suffix.", + "type": { + "$id": "1409", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpointAuthenticationUserAssignedManagedIdentity.scope", + "serializationOptions": { + "$id": "1410", + "json": { + "$id": "1411", + "name": "scope" + } + } + }, + { + "$id": "1412", + "kind": "property", + "name": "tenantId", + "serializedName": "tenantId", + "doc": "Tenant ID.", + "type": { + "$id": "1413", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpointAuthenticationUserAssignedManagedIdentity.tenantId", + "serializationOptions": { + "$id": "1414", + "json": { + "$id": "1415", + "name": "tenantId" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpointDataExplorerAuthentication.userAssignedManagedIdentitySettings", + "serializationOptions": { + "$id": "1416", + "json": { + "$id": "1417", + "name": "userAssignedManagedIdentitySettings" + } + } + } + ] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpointDataExplorer.authentication", + "serializationOptions": { + "$id": "1418", + "json": { + "$id": "1419", + "name": "authentication" + } + } + }, + { + "$id": "1420", + "kind": "property", + "name": "database", + "serializedName": "database", + "doc": "Database name.", + "type": { + "$id": "1421", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpointDataExplorer.database", + "serializationOptions": { + "$id": "1422", + "json": { + "$id": "1423", + "name": "database" + } + } + }, + { + "$id": "1424", + "kind": "property", + "name": "host", + "serializedName": "host", + "doc": "Host of the Azure Data Explorer in the form of ..kusto.windows.net .", + "type": { + "$id": "1425", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpointDataExplorer.host", + "serializationOptions": { + "$id": "1426", + "json": { + "$id": "1427", + "name": "host" + } + } + }, + { + "$id": "1428", + "kind": "property", + "name": "batching", + "serializedName": "batching", + "doc": "Azure Data Explorer endpoint batching configuration.", + "type": { + "$id": "1429", + "kind": "model", + "name": "IotOperationsBatchingConfig", + "namespace": "Azure.ResourceManager.IotOperations", + "crossLanguageDefinitionId": "Microsoft.IoTOperations.BatchingConfiguration", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Batching configuration", + "decorators": [], + "properties": [ + { + "$id": "1430", + "kind": "property", + "name": "latencySeconds", + "serializedName": "latencySeconds", + "doc": "Batching latency in seconds.", + "type": { + "$id": "1431", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.BatchingConfiguration.latencySeconds", + "serializationOptions": { + "$id": "1432", + "json": { + "$id": "1433", + "name": "latencySeconds" + } + } + }, + { + "$id": "1434", + "kind": "property", + "name": "maxMessages", + "serializedName": "maxMessages", + "doc": "Maximum number of messages in a batch.", + "type": { + "$id": "1435", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.BatchingConfiguration.maxMessages", + "serializationOptions": { + "$id": "1436", + "json": { + "$id": "1437", + "name": "maxMessages" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpointDataExplorer.batching", + "serializationOptions": { + "$id": "1438", + "json": { + "$id": "1439", + "name": "batching" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpointProperties.dataExplorerSettings", + "serializationOptions": { + "$id": "1440", + "json": { + "$id": "1441", + "name": "dataExplorerSettings" + } + } + }, + { + "$id": "1442", + "kind": "property", + "name": "dataLakeStorageSettings", + "serializedName": "dataLakeStorageSettings", + "doc": "Azure Data Lake endpoint.", + "type": { + "$id": "1443", + "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": "1444", + "kind": "property", + "name": "authentication", + "serializedName": "authentication", + "doc": "Authentication configuration. NOTE - only authentication property is allowed per entry.", + "type": { + "$id": "1445", + "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": "1446", + "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": "1447", + "json": { + "$id": "1448", + "name": "method" + } + } + }, + { + "$id": "1449", + "kind": "property", + "name": "accessTokenSettings", + "serializedName": "accessTokenSettings", + "doc": "SAS token authentication.", + "type": { + "$id": "1450", + "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": "1451", + "kind": "property", + "name": "secretRef", + "serializedName": "secretRef", + "doc": "Token secret name.", + "type": { + "$id": "1452", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpointAuthenticationAccessToken.secretRef", + "serializationOptions": { + "$id": "1453", + "json": { + "$id": "1454", + "name": "secretRef" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpointDataLakeStorageAuthentication.accessTokenSettings", + "serializationOptions": { + "$id": "1455", + "json": { + "$id": "1456", + "name": "accessTokenSettings" + } + } + }, + { + "$id": "1457", + "kind": "property", + "name": "systemAssignedManagedIdentitySettings", + "serializedName": "systemAssignedManagedIdentitySettings", + "doc": "System-assigned managed identity authentication.", + "type": { + "$ref": "1395" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpointDataLakeStorageAuthentication.systemAssignedManagedIdentitySettings", + "serializationOptions": { + "$id": "1458", + "json": { + "$id": "1459", + "name": "systemAssignedManagedIdentitySettings" + } + } + }, + { + "$id": "1460", + "kind": "property", + "name": "userAssignedManagedIdentitySettings", + "serializedName": "userAssignedManagedIdentitySettings", + "doc": "User-assigned managed identity authentication.", + "type": { + "$ref": "1403" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpointDataLakeStorageAuthentication.userAssignedManagedIdentitySettings", + "serializationOptions": { + "$id": "1461", + "json": { + "$id": "1462", + "name": "userAssignedManagedIdentitySettings" + } + } + } + ] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpointDataLakeStorage.authentication", + "serializationOptions": { + "$id": "1463", + "json": { + "$id": "1464", + "name": "authentication" + } + } + }, + { + "$id": "1465", + "kind": "property", + "name": "host", + "serializedName": "host", + "doc": "Host of the Azure Data Lake in the form of .blob.core.windows.net .", + "type": { + "$id": "1466", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpointDataLakeStorage.host", + "serializationOptions": { + "$id": "1467", + "json": { + "$id": "1468", + "name": "host" + } + } + }, + { + "$id": "1469", + "kind": "property", + "name": "batching", + "serializedName": "batching", + "doc": "Azure Data Lake endpoint batching configuration.", + "type": { + "$ref": "1429" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpointDataLakeStorage.batching", + "serializationOptions": { + "$id": "1470", + "json": { + "$id": "1471", + "name": "batching" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpointProperties.dataLakeStorageSettings", + "serializationOptions": { + "$id": "1472", + "json": { + "$id": "1473", + "name": "dataLakeStorageSettings" + } + } + }, + { + "$id": "1474", + "kind": "property", + "name": "fabricOneLakeSettings", + "serializedName": "fabricOneLakeSettings", + "doc": "Microsoft Fabric endpoint.", + "type": { + "$id": "1475", + "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": "1476", + "kind": "property", + "name": "authentication", + "serializedName": "authentication", + "doc": "Authentication configuration. NOTE - only one authentication property is allowed per entry.", + "type": { + "$id": "1477", + "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": "1478", + "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": "1479", + "json": { + "$id": "1480", + "name": "method" + } + } + }, + { + "$id": "1481", + "kind": "property", + "name": "systemAssignedManagedIdentitySettings", + "serializedName": "systemAssignedManagedIdentitySettings", + "doc": "System-assigned managed identity authentication.", + "type": { + "$ref": "1395" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpointFabricOneLakeAuthentication.systemAssignedManagedIdentitySettings", + "serializationOptions": { + "$id": "1482", + "json": { + "$id": "1483", + "name": "systemAssignedManagedIdentitySettings" + } + } + }, + { + "$id": "1484", + "kind": "property", + "name": "userAssignedManagedIdentitySettings", + "serializedName": "userAssignedManagedIdentitySettings", + "doc": "User-assigned managed identity authentication.", + "type": { + "$ref": "1403" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpointFabricOneLakeAuthentication.userAssignedManagedIdentitySettings", + "serializationOptions": { + "$id": "1485", + "json": { + "$id": "1486", + "name": "userAssignedManagedIdentitySettings" + } + } + } + ] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpointFabricOneLake.authentication", + "serializationOptions": { + "$id": "1487", + "json": { + "$id": "1488", + "name": "authentication" + } + } + }, + { + "$id": "1489", + "kind": "property", + "name": "names", + "serializedName": "names", + "doc": "Names of the workspace and lakehouse.", + "type": { + "$id": "1490", + "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": "1491", + "kind": "property", + "name": "lakehouseName", + "serializedName": "lakehouseName", + "doc": "Lakehouse name.", + "type": { + "$id": "1492", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpointFabricOneLakeNames.lakehouseName", + "serializationOptions": { + "$id": "1493", + "json": { + "$id": "1494", + "name": "lakehouseName" + } + } + }, + { + "$id": "1495", + "kind": "property", + "name": "workspaceName", + "serializedName": "workspaceName", + "doc": "Workspace name.", + "type": { + "$id": "1496", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpointFabricOneLakeNames.workspaceName", + "serializationOptions": { + "$id": "1497", + "json": { + "$id": "1498", + "name": "workspaceName" + } + } + } + ] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpointFabricOneLake.names", + "serializationOptions": { + "$id": "1499", + "json": { + "$id": "1500", + "name": "names" + } + } + }, + { + "$id": "1501", + "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": "1502", + "json": { + "$id": "1503", + "name": "oneLakePathType" + } + } + }, + { + "$id": "1504", + "kind": "property", + "name": "host", + "serializedName": "host", + "doc": "Host of the Microsoft Fabric in the form of https://.fabric.microsoft.com.", + "type": { + "$id": "1505", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpointFabricOneLake.host", + "serializationOptions": { + "$id": "1506", + "json": { + "$id": "1507", + "name": "host" + } + } + }, + { + "$id": "1508", + "kind": "property", + "name": "batching", + "serializedName": "batching", + "doc": "Batching configuration.", + "type": { + "$ref": "1429" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpointFabricOneLake.batching", + "serializationOptions": { + "$id": "1509", + "json": { + "$id": "1510", + "name": "batching" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpointProperties.fabricOneLakeSettings", + "serializationOptions": { + "$id": "1511", + "json": { + "$id": "1512", + "name": "fabricOneLakeSettings" + } + } + }, + { + "$id": "1513", + "kind": "property", + "name": "kafkaSettings", + "serializedName": "kafkaSettings", + "doc": "Kafka endpoint.", + "type": { + "$id": "1514", + "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": "1515", + "kind": "property", + "name": "authentication", + "serializedName": "authentication", + "doc": "Authentication configuration. NOTE - only authentication property is allowed per entry.", + "type": { + "$id": "1516", + "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": "1517", + "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": "1518", + "json": { + "$id": "1519", + "name": "method" + } + } + }, + { + "$id": "1520", + "kind": "property", + "name": "systemAssignedManagedIdentitySettings", + "serializedName": "systemAssignedManagedIdentitySettings", + "doc": "System-assigned managed identity authentication.", + "type": { + "$ref": "1395" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpointKafkaAuthentication.systemAssignedManagedIdentitySettings", + "serializationOptions": { + "$id": "1521", + "json": { + "$id": "1522", + "name": "systemAssignedManagedIdentitySettings" + } + } + }, + { + "$id": "1523", + "kind": "property", + "name": "userAssignedManagedIdentitySettings", + "serializedName": "userAssignedManagedIdentitySettings", + "doc": "User-assigned managed identity authentication.", + "type": { + "$ref": "1403" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpointKafkaAuthentication.userAssignedManagedIdentitySettings", + "serializationOptions": { + "$id": "1524", + "json": { + "$id": "1525", + "name": "userAssignedManagedIdentitySettings" + } + } + }, + { + "$id": "1526", + "kind": "property", + "name": "saslSettings", + "serializedName": "saslSettings", + "doc": "SASL authentication.", + "type": { + "$id": "1527", + "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": "1528", + "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": "1529", + "json": { + "$id": "1530", + "name": "saslType" + } + } + }, + { + "$id": "1531", + "kind": "property", + "name": "secretRef", + "serializedName": "secretRef", + "doc": "Token secret name.", + "type": { + "$id": "1532", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpointAuthenticationSasl.secretRef", + "serializationOptions": { + "$id": "1533", + "json": { + "$id": "1534", + "name": "secretRef" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpointKafkaAuthentication.saslSettings", + "serializationOptions": { + "$id": "1535", + "json": { + "$id": "1536", + "name": "saslSettings" + } + } + }, + { + "$id": "1537", + "kind": "property", + "name": "x509CertificateSettings", + "serializedName": "x509CertificateSettings", + "doc": "X.509 certificate authentication.", + "type": { + "$id": "1538", + "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": "1539", + "kind": "property", + "name": "secretRef", + "serializedName": "secretRef", + "doc": "Secret reference of the X.509 certificate.", + "type": { + "$id": "1540", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpointAuthenticationX509.secretRef", + "serializationOptions": { + "$id": "1541", + "json": { + "$id": "1542", + "name": "secretRef" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpointKafkaAuthentication.x509CertificateSettings", + "serializationOptions": { + "$id": "1543", + "json": { + "$id": "1544", + "name": "x509CertificateSettings" + } + } + } + ] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpointKafka.authentication", + "serializationOptions": { + "$id": "1545", + "json": { + "$id": "1546", + "name": "authentication" + } + } + }, + { + "$id": "1547", + "kind": "property", + "name": "consumerGroupId", + "serializedName": "consumerGroupId", + "doc": "Consumer group ID.", + "type": { + "$id": "1548", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpointKafka.consumerGroupId", + "serializationOptions": { + "$id": "1549", + "json": { + "$id": "1550", + "name": "consumerGroupId" + } + } + }, + { + "$id": "1551", + "kind": "property", + "name": "host", + "serializedName": "host", + "doc": "Kafka endpoint host.", + "type": { + "$id": "1552", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpointKafka.host", + "serializationOptions": { + "$id": "1553", + "json": { + "$id": "1554", + "name": "host" + } + } + }, + { + "$id": "1555", + "kind": "property", + "name": "batching", + "serializedName": "batching", + "doc": "Batching configuration.", + "type": { + "$id": "1556", + "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": "1557", + "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": "1558", + "json": { + "$id": "1559", + "name": "mode" + } + } + }, + { + "$id": "1560", + "kind": "property", + "name": "latencyMs", + "serializedName": "latencyMs", + "doc": "Batching latency in milliseconds.", + "type": { + "$id": "1561", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpointKafkaBatching.latencyMs", + "serializationOptions": { + "$id": "1562", + "json": { + "$id": "1563", + "name": "latencyMs" + } + } + }, + { + "$id": "1564", + "kind": "property", + "name": "maxBytes", + "serializedName": "maxBytes", + "doc": "Maximum number of bytes in a batch.", + "type": { + "$id": "1565", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpointKafkaBatching.maxBytes", + "serializationOptions": { + "$id": "1566", + "json": { + "$id": "1567", + "name": "maxBytes" + } + } + }, + { + "$id": "1568", + "kind": "property", + "name": "maxMessages", + "serializedName": "maxMessages", + "doc": "Maximum number of messages in a batch.", + "type": { + "$id": "1569", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpointKafkaBatching.maxMessages", + "serializationOptions": { + "$id": "1570", + "json": { + "$id": "1571", + "name": "maxMessages" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpointKafka.batching", + "serializationOptions": { + "$id": "1572", + "json": { + "$id": "1573", + "name": "batching" + } + } + }, + { + "$id": "1574", + "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": "1575", + "json": { + "$id": "1576", + "name": "copyMqttProperties" + } + } + }, + { + "$id": "1577", + "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": "1578", + "json": { + "$id": "1579", + "name": "compression" + } + } + }, + { + "$id": "1580", + "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": "1581", + "json": { + "$id": "1582", + "name": "kafkaAcks" + } + } + }, + { + "$id": "1583", + "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": "1584", + "json": { + "$id": "1585", + "name": "partitionStrategy" + } + } + }, + { + "$id": "1586", + "kind": "property", + "name": "tls", + "serializedName": "tls", + "doc": "TLS configuration.", + "type": { + "$id": "1587", + "kind": "model", + "name": "IotOperationsTlsProperties", + "namespace": "Azure.ResourceManager.IotOperations", + "crossLanguageDefinitionId": "Microsoft.IoTOperations.TlsProperties", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Tls properties", + "decorators": [], + "properties": [ + { + "$id": "1588", + "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": "1589", + "json": { + "$id": "1590", + "name": "mode" + } + } + }, + { + "$id": "1591", + "kind": "property", + "name": "trustedCaCertificateConfigMapRef", + "serializedName": "trustedCaCertificateConfigMapRef", + "doc": "Trusted CA certificate config map.", + "type": { + "$id": "1592", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.TlsProperties.trustedCaCertificateConfigMapRef", + "serializationOptions": { + "$id": "1593", + "json": { + "$id": "1594", + "name": "trustedCaCertificateConfigMapRef" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpointKafka.tls", + "serializationOptions": { + "$id": "1595", + "json": { + "$id": "1596", + "name": "tls" + } + } + }, + { + "$id": "1597", + "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": "1598", + "json": { + "$id": "1599", + "name": "cloudEventAttributes" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpointProperties.kafkaSettings", + "serializationOptions": { + "$id": "1600", + "json": { + "$id": "1601", + "name": "kafkaSettings" + } + } + }, + { + "$id": "1602", + "kind": "property", + "name": "localStorageSettings", + "serializedName": "localStorageSettings", + "doc": "Local persistent volume endpoint.", + "type": { + "$id": "1603", + "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": "1604", + "kind": "property", + "name": "persistentVolumeClaimRef", + "serializedName": "persistentVolumeClaimRef", + "doc": "Persistent volume claim name.", + "type": { + "$id": "1605", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpointLocalStorage.persistentVolumeClaimRef", + "serializationOptions": { + "$id": "1606", + "json": { + "$id": "1607", + "name": "persistentVolumeClaimRef" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpointProperties.localStorageSettings", + "serializationOptions": { + "$id": "1608", + "json": { + "$id": "1609", + "name": "localStorageSettings" + } + } + }, + { + "$id": "1610", + "kind": "property", + "name": "mqttSettings", + "serializedName": "mqttSettings", + "doc": "Broker endpoint.", + "type": { + "$id": "1611", + "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": "1612", + "kind": "property", + "name": "authentication", + "serializedName": "authentication", + "doc": "authentication properties. DEFAULT: kubernetes.audience=aio-internal. NOTE - Enum field only property is allowed", + "type": { + "$id": "1613", + "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": "1614", + "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": "1615", + "json": { + "$id": "1616", + "name": "method" + } + } + }, + { + "$id": "1617", + "kind": "property", + "name": "systemAssignedManagedIdentitySettings", + "serializedName": "systemAssignedManagedIdentitySettings", + "doc": "System-assigned managed identity authentication.", + "type": { + "$ref": "1395" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpointMqttAuthentication.systemAssignedManagedIdentitySettings", + "serializationOptions": { + "$id": "1618", + "json": { + "$id": "1619", + "name": "systemAssignedManagedIdentitySettings" + } + } + }, + { + "$id": "1620", + "kind": "property", + "name": "userAssignedManagedIdentitySettings", + "serializedName": "userAssignedManagedIdentitySettings", + "doc": "User-assigned managed identity authentication.", + "type": { + "$ref": "1403" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpointMqttAuthentication.userAssignedManagedIdentitySettings", + "serializationOptions": { + "$id": "1621", + "json": { + "$id": "1622", + "name": "userAssignedManagedIdentitySettings" + } + } + }, + { + "$id": "1623", + "kind": "property", + "name": "serviceAccountTokenSettings", + "serializedName": "serviceAccountTokenSettings", + "doc": "Kubernetes service account token authentication. Default audience if not set is aio-internal", + "type": { + "$id": "1624", + "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": "1625", + "kind": "property", + "name": "audience", + "serializedName": "audience", + "doc": "Audience of the service account. Optional, defaults to the broker internal service account audience.", + "type": { + "$id": "1626", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpointAuthenticationServiceAccountToken.audience", + "serializationOptions": { + "$id": "1627", + "json": { + "$id": "1628", + "name": "audience" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpointMqttAuthentication.serviceAccountTokenSettings", + "serializationOptions": { + "$id": "1629", + "json": { + "$id": "1630", + "name": "serviceAccountTokenSettings" + } + } + }, + { + "$id": "1631", + "kind": "property", + "name": "x509CertificateSettings", + "serializedName": "x509CertificateSettings", + "doc": "X.509 certificate authentication.", + "type": { + "$ref": "1538" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpointMqttAuthentication.x509CertificateSettings", + "serializationOptions": { + "$id": "1632", + "json": { + "$id": "1633", + "name": "x509CertificateSettings" + } + } + } + ] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpointMqtt.authentication", + "serializationOptions": { + "$id": "1634", + "json": { + "$id": "1635", + "name": "authentication" + } + } + }, + { + "$id": "1636", + "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": "1637", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpointMqtt.clientIdPrefix", + "serializationOptions": { + "$id": "1638", + "json": { + "$id": "1639", + "name": "clientIdPrefix" + } + } + }, + { + "$id": "1640", + "kind": "property", + "name": "host", + "serializedName": "host", + "doc": "Host of the Broker in the form of :. Optional; connects to Broker if omitted.", + "type": { + "$id": "1641", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpointMqtt.host", + "serializationOptions": { + "$id": "1642", + "json": { + "$id": "1643", + "name": "host" + } + } + }, + { + "$id": "1644", + "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": "1645", + "json": { + "$id": "1646", + "name": "protocol" + } + } + }, + { + "$id": "1647", + "kind": "property", + "name": "keepAliveSeconds", + "serializedName": "keepAliveSeconds", + "doc": "Broker KeepAlive for connection in seconds.", + "type": { + "$id": "1648", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpointMqtt.keepAliveSeconds", + "serializationOptions": { + "$id": "1649", + "json": { + "$id": "1650", + "name": "keepAliveSeconds" + } + } + }, + { + "$id": "1651", + "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": "1652", + "json": { + "$id": "1653", + "name": "retain" + } + } + }, + { + "$id": "1654", + "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": "1655", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpointMqtt.maxInflightMessages", + "serializationOptions": { + "$id": "1656", + "json": { + "$id": "1657", + "name": "maxInflightMessages" + } + } + }, + { + "$id": "1658", + "kind": "property", + "name": "qos", + "serializedName": "qos", + "doc": "Qos for Broker connection.", + "type": { + "$id": "1659", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpointMqtt.qos", + "serializationOptions": { + "$id": "1660", + "json": { + "$id": "1661", + "name": "qos" + } + } + }, + { + "$id": "1662", + "kind": "property", + "name": "sessionExpirySeconds", + "serializedName": "sessionExpirySeconds", + "doc": "Session expiry in seconds.", + "type": { + "$id": "1663", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpointMqtt.sessionExpirySeconds", + "serializationOptions": { + "$id": "1664", + "json": { + "$id": "1665", + "name": "sessionExpirySeconds" + } + } + }, + { + "$id": "1666", + "kind": "property", + "name": "tls", + "serializedName": "tls", + "doc": "TLS configuration.", + "type": { + "$ref": "1587" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpointMqtt.tls", + "serializationOptions": { + "$id": "1667", + "json": { + "$id": "1668", + "name": "tls" + } + } + }, + { + "$id": "1669", + "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": "1670", + "json": { + "$id": "1671", + "name": "cloudEventAttributes" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpointProperties.mqttSettings", + "serializationOptions": { + "$id": "1672", + "json": { + "$id": "1673", + "name": "mqttSettings" + } + } + }, + { + "$id": "1674", + "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": "1675", + "json": { + "$id": "1676", + "name": "provisioningState" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpointResource.properties", + "serializationOptions": { + "$id": "1677", + "json": { + "$id": "1678", + "name": "properties" + } + } + }, + { + "$id": "1679", + "kind": "property", + "name": "extendedLocation", + "serializedName": "extendedLocation", + "doc": "Edge location of the resource.", + "type": { + "$ref": "510" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpointResource.extendedLocation", + "serializationOptions": { + "$id": "1680", + "json": { + "$id": "1681", + "name": "extendedLocation" + } + } + } + ] + }, + { + "$ref": "1383" + }, + { + "$ref": "1388" + }, + { + "$ref": "1390" + }, + { + "$ref": "1395" + }, + { + "$ref": "1403" + }, + { + "$ref": "1429" + }, + { + "$ref": "1443" + }, + { + "$ref": "1445" + }, + { + "$ref": "1450" + }, + { + "$ref": "1475" + }, + { + "$ref": "1477" + }, + { + "$ref": "1490" + }, + { + "$ref": "1514" + }, + { + "$ref": "1516" + }, + { + "$ref": "1527" + }, + { + "$ref": "1538" + }, + { + "$ref": "1556" + }, + { + "$ref": "1587" + }, + { + "$ref": "1603" + }, + { + "$ref": "1611" + }, + { + "$ref": "1613" + }, + { + "$ref": "1624" + }, + { + "$id": "1682", + "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": "1683", + "kind": "property", + "name": "value", + "serializedName": "value", + "doc": "The DataflowEndpointResource items on this page", + "type": { + "$id": "1684", + "kind": "array", + "name": "ArrayDataflowEndpointResource", + "valueType": { + "$ref": "1381" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.ResourceListResult.value", + "serializationOptions": { + "$id": "1685", + "json": { + "$id": "1686", + "name": "value" + } + } + }, + { + "$id": "1687", + "kind": "property", + "name": "nextLink", + "serializedName": "nextLink", + "doc": "The link to the next page of items", + "type": { + "$id": "1688", + "kind": "url", + "name": "ResourceLocation", + "crossLanguageDefinitionId": "TypeSpec.Rest.ResourceLocation", + "baseType": { + "$id": "1689", + "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": "1690", + "json": { + "$id": "1691", + "name": "nextLink" + } + } + } + ] + } + ], + "clients": [ + { + "$id": "1692", + "kind": "client", + "name": "IoTOperationsClient", + "namespace": "Azure.ResourceManager.IotOperations", + "doc": "Microsoft.IoTOperations Resource Provider management API.", + "operations": [], + "parameters": [ + { + "$id": "1693", + "name": "endpoint", + "nameInRequest": "endpoint", + "doc": "Service host", + "type": { + "$id": "1694", + "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": "1695", + "type": { + "$id": "1696", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "https://management.azure.com" + } + } + ], + "decorators": [ + { + "$id": "1697", + "name": "TypeSpec.@service", + "arguments": { + "$id": "1698", + "options": { + "$id": "1699", + "title": "Microsoft.IoTOperations management service." + } + } + } + ], + "crossLanguageDefinitionId": "Microsoft.IoTOperations", + "apiVersions": [ + "2024-11-01", + "2025-04-01" + ], + "children": [ + { + "$id": "1700", + "kind": "client", + "name": "Operations", + "namespace": "Azure.ResourceManager.IotOperations", + "operations": [ + { + "$id": "1701", + "name": "list", + "resourceName": "Operations", + "doc": "List the operations for the provider", + "accessibility": "public", + "parameters": [ + { + "$id": "1702", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "1703", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "1704", + "type": { + "$id": "1705", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-04-01" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1706", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "1707", + "kind": "constant", + "valueType": { + "$id": "1708", + "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": "1709", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "336" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "GET", + "uri": "{endpoint}", + "path": "/providers/Microsoft.IoTOperations/operations", + "bufferResponse": true, + "paging": { + "$id": "1710", + "itemPropertySegments": [ + "value" + ], + "nextLink": { + "$id": "1711", + "responseSegments": [ + "nextLink" + ], + "responseLocation": "Body" + } + }, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Azure.ResourceManager.Operations.list", + "decorators": [], + "examples": [ + { + "$id": "1712", + "kind": "http", + "name": "Operations_List", + "description": "Operations_List", + "filePath": "2025-04-01/Operations_List_MaximumSet_Gen.json", + "parameters": [ + { + "$id": "1713", + "parameter": { + "$ref": "1702" + }, + "value": { + "$id": "1714", + "kind": "string", + "type": { + "$ref": "1703" + }, + "value": "2025-04-01" + } + } + ], + "responses": [ + { + "$id": "1715", + "response": { + "$ref": "1709" + }, + "statusCode": 200, + "bodyValue": { + "$id": "1716", + "kind": "model", + "type": { + "$ref": "336" + }, + "value": { + "$id": "1717", + "value": { + "$id": "1718", + "kind": "array", + "type": { + "$ref": "338" + }, + "value": [ + { + "$id": "1719", + "kind": "model", + "type": { + "$ref": "339" + }, + "value": { + "$id": "1720", + "name": { + "$id": "1721", + "kind": "string", + "type": { + "$ref": "341" + }, + "value": "xzxqfusky" + }, + "isDataAction": { + "$id": "1722", + "kind": "boolean", + "type": { + "$ref": "345" + }, + "value": true + }, + "display": { + "$id": "1723", + "kind": "model", + "type": { + "$ref": "349" + }, + "value": { + "$id": "1724", + "provider": { + "$id": "1725", + "kind": "string", + "type": { + "$ref": "351" + }, + "value": "lrveskajtuwf" + }, + "resource": { + "$id": "1726", + "kind": "string", + "type": { + "$ref": "355" + }, + "value": "d" + }, + "operation": { + "$id": "1727", + "kind": "string", + "type": { + "$ref": "359" + }, + "value": "icuckgobartrrgmirax" + }, + "description": { + "$id": "1728", + "kind": "string", + "type": { + "$ref": "363" + }, + "value": "dsbfnxzvnoqdm" + } + } + }, + "origin": { + "$id": "1729", + "kind": "string", + "type": { + "$ref": "2" + }, + "value": "user" + }, + "actionType": { + "$id": "1730", + "kind": "string", + "type": { + "$ref": "10" + }, + "value": "Internal" + } + } + } + ] + }, + "nextLink": { + "$id": "1731", + "kind": "string", + "type": { + "$ref": "377" + }, + "value": "https://microsoft.com/a" + } + } + } + } + ] + } + ] + } + ], + "parameters": [ + { + "$id": "1732", + "name": "endpoint", + "nameInRequest": "endpoint", + "doc": "Service host", + "type": { + "$id": "1733", + "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": "1734", + "type": { + "$id": "1735", + "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": "1692" + } + }, + { + "$id": "1736", + "kind": "client", + "name": "Instance", + "namespace": "Azure.ResourceManager.IotOperations", + "operations": [ + { + "$id": "1737", + "name": "get", + "resourceName": "InstanceResource", + "doc": "Get a InstanceResource", + "accessibility": "public", + "parameters": [ + { + "$id": "1738", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "1739", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "1740", + "type": { + "$id": "1741", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-04-01" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1742", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "1743", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "1744", + "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": "1745", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "1746", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1747", + "name": "instanceName", + "nameInRequest": "instanceName", + "doc": "Name of instance.", + "type": { + "$id": "1748", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1749", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "1750", + "kind": "constant", + "valueType": { + "$id": "1751", + "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": "1752", + "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": "1753", + "kind": "http", + "name": "Instance_Get", + "description": "Instance_Get", + "filePath": "2025-04-01/Instance_Get_MaximumSet_Gen.json", + "parameters": [ + { + "$id": "1754", + "parameter": { + "$ref": "1738" + }, + "value": { + "$id": "1755", + "kind": "string", + "type": { + "$ref": "1739" + }, + "value": "2025-04-01" + } + }, + { + "$id": "1756", + "parameter": { + "$ref": "1742" + }, + "value": { + "$id": "1757", + "kind": "string", + "type": { + "$ref": "1743" + }, + "value": "F8C729F9-DF9C-4743-848F-96EE433D8E53" + } + }, + { + "$id": "1758", + "parameter": { + "$ref": "1745" + }, + "value": { + "$id": "1759", + "kind": "string", + "type": { + "$ref": "1746" + }, + "value": "rgiotoperations" + } + }, + { + "$id": "1760", + "parameter": { + "$ref": "1747" + }, + "value": { + "$id": "1761", + "kind": "string", + "type": { + "$ref": "1748" + }, + "value": "aio-instance" + } + } + ], + "responses": [ + { + "$id": "1762", + "response": { + "$ref": "1752" + }, + "statusCode": 200, + "bodyValue": { + "$id": "1763", + "kind": "model", + "type": { + "$ref": "415" + }, + "value": { + "$id": "1764", + "properties": { + "$id": "1765", + "kind": "model", + "type": { + "$ref": "471" + }, + "value": { + "$id": "1766", + "schemaRegistryRef": { + "$id": "1767", + "kind": "model", + "type": { + "$ref": "484" + }, + "value": { + "$id": "1768", + "resourceId": { + "$id": "1769", + "kind": "string", + "type": { + "$ref": "486" + }, + "value": "/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.DeviceRegistry/schemaRegistries/resource-name123" + } + } + }, + "description": { + "$id": "1770", + "kind": "string", + "type": { + "$ref": "473" + }, + "value": "rlfvvnnhcypp" + }, + "provisioningState": { + "$id": "1771", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Succeeded" + }, + "version": { + "$id": "1772", + "kind": "string", + "type": { + "$ref": "480" + }, + "value": "vjjbmunthiphfmekvxgxcxkzdwjti" + }, + "features": { + "$id": "1773", + "kind": "dict", + "type": { + "$ref": "494" + }, + "value": { + "$id": "1774", + "dataFlows": { + "$id": "1775", + "kind": "model", + "type": { + "$ref": "496" + }, + "value": { + "$id": "1776", + "mode": { + "$id": "1777", + "kind": "string", + "type": { + "$ref": "30" + }, + "value": "Disabled" + } + } + }, + "akri": { + "$id": "1778", + "kind": "model", + "type": { + "$ref": "496" + }, + "value": { + "$id": "1779", + "mode": { + "$id": "1780", + "kind": "string", + "type": { + "$ref": "30" + }, + "value": "Preview" + } + } + }, + "mqttBroker": { + "$id": "1781", + "kind": "model", + "type": { + "$ref": "496" + }, + "value": { + "$id": "1782", + "settings": { + "$id": "1783", + "kind": "dict", + "type": { + "$ref": "501" + }, + "value": { + "$id": "1784", + "preview": { + "$id": "1785", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Enabled" + } + } + } + } + } + } + } + } + }, + "extendedLocation": { + "$id": "1786", + "kind": "model", + "type": { + "$ref": "510" + }, + "value": { + "$id": "1787", + "name": { + "$id": "1788", + "kind": "string", + "type": { + "$ref": "512" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "1789", + "kind": "string", + "type": { + "$ref": "44" + }, + "value": "CustomLocation" + } + } + }, + "identity": { + "$id": "1790", + "kind": "model", + "type": { + "$ref": "521" + }, + "value": { + "$id": "1791", + "type": { + "$id": "1792", + "kind": "string", + "type": { + "$ref": "48" + }, + "value": "None" + }, + "userAssignedIdentities": { + "$id": "1793", + "kind": "dict", + "type": { + "$ref": "536" + }, + "value": { + "$id": "1794" + } + }, + "principalId": { + "$id": "1795", + "kind": "string", + "type": { + "$ref": "523" + }, + "value": "4a6e4195-75b8-4685-aa0c-0b5704779327" + }, + "tenantId": { + "$id": "1796", + "kind": "string", + "type": { + "$ref": "528" + }, + "value": "ed060aa2-71ff-4d3f-99c4-a9138356fdec" + } + } + }, + "tags": { + "$id": "1797", + "kind": "dict", + "type": { + "$ref": "461" + }, + "value": { + "$id": "1798" + } + }, + "location": { + "$id": "1799", + "kind": "string", + "type": { + "$ref": "467" + }, + "value": "xvewadyhycrjpu" + }, + "id": { + "$id": "1800", + "kind": "string", + "type": { + "$ref": "419" + }, + "value": "/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.IoTOperations/instances/resource-name123" + }, + "name": { + "$id": "1801", + "kind": "string", + "type": { + "$ref": "424" + }, + "value": "llptmlifnqqwairx" + }, + "type": { + "$id": "1802", + "kind": "string", + "type": { + "$ref": "428" + }, + "value": "qwrfzxjfxvismlqvigot" + }, + "systemData": { + "$id": "1803", + "kind": "model", + "type": { + "$ref": "433" + }, + "value": { + "$id": "1804", + "createdBy": { + "$id": "1805", + "kind": "string", + "type": { + "$ref": "435" + }, + "value": "ssvaslsmudloholronopqyxjcu" + }, + "createdByType": { + "$id": "1806", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "createdAt": { + "$id": "1807", + "kind": "string", + "type": { + "$ref": "442" + }, + "value": "2024-08-09T18:13:29.389Z" + }, + "lastModifiedBy": { + "$id": "1808", + "kind": "string", + "type": { + "$ref": "447" + }, + "value": "gnicpuszwd" + }, + "lastModifiedByType": { + "$id": "1809", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "1810", + "kind": "string", + "type": { + "$ref": "454" + }, + "value": "2024-08-09T18:13:29.389Z" + } + } + } + } + } + } + ] + } + ] + }, + { + "$id": "1811", + "name": "createOrUpdate", + "resourceName": "InstanceResource", + "doc": "Create a InstanceResource", + "accessibility": "public", + "parameters": [ + { + "$id": "1812", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "1813", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "1814", + "type": { + "$id": "1815", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-04-01" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1816", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "1817", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "1818", + "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": "1819", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "1820", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1821", + "name": "instanceName", + "nameInRequest": "instanceName", + "doc": "Name of instance.", + "type": { + "$id": "1822", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1823", + "name": "contentType", + "nameInRequest": "Content-Type", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$id": "1824", + "kind": "constant", + "valueType": { + "$id": "1825", + "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": "1826", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "1827", + "kind": "constant", + "valueType": { + "$id": "1828", + "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": "1829", + "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": "1830", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "415" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + }, + { + "$id": "1831", + "statusCodes": [ + 201 + ], + "bodyType": { + "$ref": "415" + }, + "headers": [ + { + "$id": "1832", + "name": "azureAsyncOperation", + "nameInResponse": "Azure-AsyncOperation", + "doc": "A link to the status monitor", + "type": { + "$id": "1833", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + { + "$id": "1834", + "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": "1835", + "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": "1836", + "finalStateVia": 0, + "finalResponse": { + "$id": "1837", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "415" + } + } + }, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.IoTOperations.Instance.createOrUpdate", + "decorators": [], + "examples": [ + { + "$id": "1838", + "kind": "http", + "name": "Instance_CreateOrUpdate", + "description": "Instance_CreateOrUpdate", + "filePath": "2025-04-01/Instance_CreateOrUpdate_MaximumSet_Gen.json", + "parameters": [ + { + "$id": "1839", + "parameter": { + "$ref": "1812" + }, + "value": { + "$id": "1840", + "kind": "string", + "type": { + "$ref": "1813" + }, + "value": "2025-04-01" + } + }, + { + "$id": "1841", + "parameter": { + "$ref": "1816" + }, + "value": { + "$id": "1842", + "kind": "string", + "type": { + "$ref": "1817" + }, + "value": "F8C729F9-DF9C-4743-848F-96EE433D8E53" + } + }, + { + "$id": "1843", + "parameter": { + "$ref": "1819" + }, + "value": { + "$id": "1844", + "kind": "string", + "type": { + "$ref": "1820" + }, + "value": "rgiotoperations" + } + }, + { + "$id": "1845", + "parameter": { + "$ref": "1821" + }, + "value": { + "$id": "1846", + "kind": "string", + "type": { + "$ref": "1822" + }, + "value": "aio-instance" + } + }, + { + "$id": "1847", + "parameter": { + "$ref": "1829" + }, + "value": { + "$id": "1848", + "kind": "model", + "type": { + "$ref": "415" + }, + "value": { + "$id": "1849", + "properties": { + "$id": "1850", + "kind": "model", + "type": { + "$ref": "471" + }, + "value": { + "$id": "1851", + "schemaRegistryRef": { + "$id": "1852", + "kind": "model", + "type": { + "$ref": "484" + }, + "value": { + "$id": "1853", + "resourceId": { + "$id": "1854", + "kind": "string", + "type": { + "$ref": "486" + }, + "value": "/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.DeviceRegistry/schemaRegistries/resource-name123" + } + } + }, + "description": { + "$id": "1855", + "kind": "string", + "type": { + "$ref": "473" + }, + "value": "kpqtgocs" + } + } + }, + "extendedLocation": { + "$id": "1856", + "kind": "model", + "type": { + "$ref": "510" + }, + "value": { + "$id": "1857", + "name": { + "$id": "1858", + "kind": "string", + "type": { + "$ref": "512" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "1859", + "kind": "string", + "type": { + "$ref": "44" + }, + "value": "CustomLocation" + } + } + }, + "identity": { + "$id": "1860", + "kind": "model", + "type": { + "$ref": "521" + }, + "value": { + "$id": "1861", + "type": { + "$id": "1862", + "kind": "string", + "type": { + "$ref": "48" + }, + "value": "None" + }, + "userAssignedIdentities": { + "$id": "1863", + "kind": "dict", + "type": { + "$ref": "536" + }, + "value": { + "$id": "1864" + } + } + } + }, + "tags": { + "$id": "1865", + "kind": "dict", + "type": { + "$ref": "461" + }, + "value": { + "$id": "1866" + } + }, + "location": { + "$id": "1867", + "kind": "string", + "type": { + "$ref": "467" + }, + "value": "xvewadyhycrjpu" + } + } + } + } + ], + "responses": [ + { + "$id": "1868", + "response": { + "$ref": "1830" + }, + "statusCode": 200, + "bodyValue": { + "$id": "1869", + "kind": "model", + "type": { + "$ref": "415" + }, + "value": { + "$id": "1870", + "properties": { + "$id": "1871", + "kind": "model", + "type": { + "$ref": "471" + }, + "value": { + "$id": "1872", + "schemaRegistryRef": { + "$id": "1873", + "kind": "model", + "type": { + "$ref": "484" + }, + "value": { + "$id": "1874", + "resourceId": { + "$id": "1875", + "kind": "string", + "type": { + "$ref": "486" + }, + "value": "/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.DeviceRegistry/schemaRegistries/resource-name123" + } + } + }, + "description": { + "$id": "1876", + "kind": "string", + "type": { + "$ref": "473" + }, + "value": "kpqtgocs" + }, + "provisioningState": { + "$id": "1877", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Succeeded" + }, + "version": { + "$id": "1878", + "kind": "string", + "type": { + "$ref": "480" + }, + "value": "vjjbmunthiphfmekvxgxcxkzdwjti" + } + } + }, + "extendedLocation": { + "$id": "1879", + "kind": "model", + "type": { + "$ref": "510" + }, + "value": { + "$id": "1880", + "name": { + "$id": "1881", + "kind": "string", + "type": { + "$ref": "512" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "1882", + "kind": "string", + "type": { + "$ref": "44" + }, + "value": "CustomLocation" + } + } + }, + "identity": { + "$id": "1883", + "kind": "model", + "type": { + "$ref": "521" + }, + "value": { + "$id": "1884", + "type": { + "$id": "1885", + "kind": "string", + "type": { + "$ref": "48" + }, + "value": "None" + }, + "userAssignedIdentities": { + "$id": "1886", + "kind": "dict", + "type": { + "$ref": "536" + }, + "value": { + "$id": "1887" + } + }, + "principalId": { + "$id": "1888", + "kind": "string", + "type": { + "$ref": "523" + }, + "value": "4a6e4195-75b8-4685-aa0c-0b5704779327" + }, + "tenantId": { + "$id": "1889", + "kind": "string", + "type": { + "$ref": "528" + }, + "value": "ed060aa2-71ff-4d3f-99c4-a9138356fdec" + } + } + }, + "tags": { + "$id": "1890", + "kind": "dict", + "type": { + "$ref": "461" + }, + "value": { + "$id": "1891" + } + }, + "location": { + "$id": "1892", + "kind": "string", + "type": { + "$ref": "467" + }, + "value": "xvewadyhycrjpu" + }, + "id": { + "$id": "1893", + "kind": "string", + "type": { + "$ref": "419" + }, + "value": "/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.IoTOperations/instances/resource-name123" + }, + "name": { + "$id": "1894", + "kind": "string", + "type": { + "$ref": "424" + }, + "value": "llptmlifnqqwairx" + }, + "type": { + "$id": "1895", + "kind": "string", + "type": { + "$ref": "428" + }, + "value": "qwrfzxjfxvismlqvigot" + }, + "systemData": { + "$id": "1896", + "kind": "model", + "type": { + "$ref": "433" + }, + "value": { + "$id": "1897", + "createdBy": { + "$id": "1898", + "kind": "string", + "type": { + "$ref": "435" + }, + "value": "ssvaslsmudloholronopqyxjcu" + }, + "createdByType": { + "$id": "1899", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "createdAt": { + "$id": "1900", + "kind": "string", + "type": { + "$ref": "442" + }, + "value": "2024-08-09T18:13:29.389Z" + }, + "lastModifiedBy": { + "$id": "1901", + "kind": "string", + "type": { + "$ref": "447" + }, + "value": "gnicpuszwd" + }, + "lastModifiedByType": { + "$id": "1902", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "1903", + "kind": "string", + "type": { + "$ref": "454" + }, + "value": "2024-08-09T18:13:29.389Z" + } + } + } + } + } + }, + { + "$id": "1904", + "response": { + "$ref": "1831" + }, + "statusCode": 201, + "bodyValue": { + "$id": "1905", + "kind": "model", + "type": { + "$ref": "415" + }, + "value": { + "$id": "1906", + "properties": { + "$id": "1907", + "kind": "model", + "type": { + "$ref": "471" + }, + "value": { + "$id": "1908", + "schemaRegistryRef": { + "$id": "1909", + "kind": "model", + "type": { + "$ref": "484" + }, + "value": { + "$id": "1910", + "resourceId": { + "$id": "1911", + "kind": "string", + "type": { + "$ref": "486" + }, + "value": "/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.DeviceRegistry/schemaRegistries/resource-name123" + } + } + }, + "description": { + "$id": "1912", + "kind": "string", + "type": { + "$ref": "473" + }, + "value": "kpqtgocs" + }, + "provisioningState": { + "$id": "1913", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Succeeded" + }, + "version": { + "$id": "1914", + "kind": "string", + "type": { + "$ref": "480" + }, + "value": "vjjbmunthiphfmekvxgxcxkzdwjti" + } + } + }, + "extendedLocation": { + "$id": "1915", + "kind": "model", + "type": { + "$ref": "510" + }, + "value": { + "$id": "1916", + "name": { + "$id": "1917", + "kind": "string", + "type": { + "$ref": "512" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "1918", + "kind": "string", + "type": { + "$ref": "44" + }, + "value": "CustomLocation" + } + } + }, + "identity": { + "$id": "1919", + "kind": "model", + "type": { + "$ref": "521" + }, + "value": { + "$id": "1920", + "type": { + "$id": "1921", + "kind": "string", + "type": { + "$ref": "48" + }, + "value": "None" + }, + "userAssignedIdentities": { + "$id": "1922", + "kind": "dict", + "type": { + "$ref": "536" + }, + "value": { + "$id": "1923" + } + }, + "principalId": { + "$id": "1924", + "kind": "string", + "type": { + "$ref": "523" + }, + "value": "4a6e4195-75b8-4685-aa0c-0b5704779327" + }, + "tenantId": { + "$id": "1925", + "kind": "string", + "type": { + "$ref": "528" + }, + "value": "ed060aa2-71ff-4d3f-99c4-a9138356fdec" + } + } + }, + "tags": { + "$id": "1926", + "kind": "dict", + "type": { + "$ref": "461" + }, + "value": { + "$id": "1927" + } + }, + "location": { + "$id": "1928", + "kind": "string", + "type": { + "$ref": "467" + }, + "value": "xvewadyhycrjpu" + }, + "id": { + "$id": "1929", + "kind": "string", + "type": { + "$ref": "419" + }, + "value": "/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.IoTOperations/instances/resource-name123" + }, + "name": { + "$id": "1930", + "kind": "string", + "type": { + "$ref": "424" + }, + "value": "llptmlifnqqwairx" + }, + "type": { + "$id": "1931", + "kind": "string", + "type": { + "$ref": "428" + }, + "value": "qwrfzxjfxvismlqvigot" + }, + "systemData": { + "$id": "1932", + "kind": "model", + "type": { + "$ref": "433" + }, + "value": { + "$id": "1933", + "createdBy": { + "$id": "1934", + "kind": "string", + "type": { + "$ref": "435" + }, + "value": "ssvaslsmudloholronopqyxjcu" + }, + "createdByType": { + "$id": "1935", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "createdAt": { + "$id": "1936", + "kind": "string", + "type": { + "$ref": "442" + }, + "value": "2024-08-09T18:13:29.389Z" + }, + "lastModifiedBy": { + "$id": "1937", + "kind": "string", + "type": { + "$ref": "447" + }, + "value": "gnicpuszwd" + }, + "lastModifiedByType": { + "$id": "1938", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "1939", + "kind": "string", + "type": { + "$ref": "454" + }, + "value": "2024-08-09T18:13:29.389Z" + } + } + } + } + } + } + ] + } + ] + }, + { + "$id": "1940", + "name": "update", + "resourceName": "InstanceResource", + "doc": "Update a InstanceResource", + "accessibility": "public", + "parameters": [ + { + "$id": "1941", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "1942", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "1943", + "type": { + "$id": "1944", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-04-01" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1945", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "1946", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "1947", + "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": "1948", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "1949", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1950", + "name": "instanceName", + "nameInRequest": "instanceName", + "doc": "Name of instance.", + "type": { + "$id": "1951", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1952", + "name": "contentType", + "nameInRequest": "Content-Type", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$id": "1953", + "kind": "constant", + "valueType": { + "$id": "1954", + "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": "1955", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "1956", + "kind": "constant", + "valueType": { + "$id": "1957", + "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": "1958", + "name": "properties", + "nameInRequest": "properties", + "doc": "The resource properties to be updated.", + "type": { + "$ref": "579" + }, + "location": "Body", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "1959", + "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": "1960", + "kind": "http", + "name": "Instance_Update", + "description": "Instance_Update", + "filePath": "2025-04-01/Instance_Update_MaximumSet_Gen.json", + "parameters": [ + { + "$id": "1961", + "parameter": { + "$ref": "1941" + }, + "value": { + "$id": "1962", + "kind": "string", + "type": { + "$ref": "1942" + }, + "value": "2025-04-01" + } + }, + { + "$id": "1963", + "parameter": { + "$ref": "1945" + }, + "value": { + "$id": "1964", + "kind": "string", + "type": { + "$ref": "1946" + }, + "value": "F8C729F9-DF9C-4743-848F-96EE433D8E53" + } + }, + { + "$id": "1965", + "parameter": { + "$ref": "1948" + }, + "value": { + "$id": "1966", + "kind": "string", + "type": { + "$ref": "1949" + }, + "value": "rgiotoperations" + } + }, + { + "$id": "1967", + "parameter": { + "$ref": "1950" + }, + "value": { + "$id": "1968", + "kind": "string", + "type": { + "$ref": "1951" + }, + "value": "aio-instance" + } + }, + { + "$id": "1969", + "parameter": { + "$ref": "1958" + }, + "value": { + "$id": "1970", + "kind": "model", + "type": { + "$ref": "579" + }, + "value": { + "$id": "1971", + "tags": { + "$id": "1972", + "kind": "dict", + "type": { + "$ref": "581" + }, + "value": { + "$id": "1973" + } + }, + "identity": { + "$id": "1974", + "kind": "model", + "type": { + "$ref": "521" + }, + "value": { + "$id": "1975", + "type": { + "$id": "1976", + "kind": "string", + "type": { + "$ref": "48" + }, + "value": "None" + }, + "userAssignedIdentities": { + "$id": "1977", + "kind": "dict", + "type": { + "$ref": "536" + }, + "value": { + "$id": "1978" + } + } + } + } + } + } + } + ], + "responses": [ + { + "$id": "1979", + "response": { + "$ref": "1959" + }, + "statusCode": 200, + "bodyValue": { + "$id": "1980", + "kind": "model", + "type": { + "$ref": "415" + }, + "value": { + "$id": "1981", + "properties": { + "$id": "1982", + "kind": "model", + "type": { + "$ref": "471" + }, + "value": { + "$id": "1983", + "schemaRegistryRef": { + "$id": "1984", + "kind": "model", + "type": { + "$ref": "484" + }, + "value": { + "$id": "1985", + "resourceId": { + "$id": "1986", + "kind": "string", + "type": { + "$ref": "486" + }, + "value": "/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.DeviceRegistry/schemaRegistries/resource-name123" + } + } + }, + "description": { + "$id": "1987", + "kind": "string", + "type": { + "$ref": "473" + }, + "value": "wwihkapmgjbyrtyaj" + }, + "provisioningState": { + "$id": "1988", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Succeeded" + }, + "version": { + "$id": "1989", + "kind": "string", + "type": { + "$ref": "480" + }, + "value": "vjjbmunthiphfmekvxgxcxkzdwjti" + } + } + }, + "extendedLocation": { + "$id": "1990", + "kind": "model", + "type": { + "$ref": "510" + }, + "value": { + "$id": "1991", + "name": { + "$id": "1992", + "kind": "string", + "type": { + "$ref": "512" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "1993", + "kind": "string", + "type": { + "$ref": "44" + }, + "value": "CustomLocation" + } + } + }, + "identity": { + "$id": "1994", + "kind": "model", + "type": { + "$ref": "521" + }, + "value": { + "$id": "1995", + "type": { + "$id": "1996", + "kind": "string", + "type": { + "$ref": "48" + }, + "value": "None" + }, + "userAssignedIdentities": { + "$id": "1997", + "kind": "dict", + "type": { + "$ref": "536" + }, + "value": { + "$id": "1998" + } + }, + "principalId": { + "$id": "1999", + "kind": "string", + "type": { + "$ref": "523" + }, + "value": "4a6e4195-75b8-4685-aa0c-0b5704779327" + }, + "tenantId": { + "$id": "2000", + "kind": "string", + "type": { + "$ref": "528" + }, + "value": "ed060aa2-71ff-4d3f-99c4-a9138356fdec" + } + } + }, + "tags": { + "$id": "2001", + "kind": "dict", + "type": { + "$ref": "461" + }, + "value": { + "$id": "2002" + } + }, + "location": { + "$id": "2003", + "kind": "string", + "type": { + "$ref": "467" + }, + "value": "xvewadyhycrjpu" + }, + "id": { + "$id": "2004", + "kind": "string", + "type": { + "$ref": "419" + }, + "value": "/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.IoTOperations/instances/resource-name123" + }, + "name": { + "$id": "2005", + "kind": "string", + "type": { + "$ref": "424" + }, + "value": "llptmlifnqqwairx" + }, + "type": { + "$id": "2006", + "kind": "string", + "type": { + "$ref": "428" + }, + "value": "qwrfzxjfxvismlqvigot" + }, + "systemData": { + "$id": "2007", + "kind": "model", + "type": { + "$ref": "433" + }, + "value": { + "$id": "2008", + "createdBy": { + "$id": "2009", + "kind": "string", + "type": { + "$ref": "435" + }, + "value": "ssvaslsmudloholronopqyxjcu" + }, + "createdByType": { + "$id": "2010", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "createdAt": { + "$id": "2011", + "kind": "string", + "type": { + "$ref": "442" + }, + "value": "2024-08-09T18:13:29.389Z" + }, + "lastModifiedBy": { + "$id": "2012", + "kind": "string", + "type": { + "$ref": "447" + }, + "value": "gnicpuszwd" + }, + "lastModifiedByType": { + "$id": "2013", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "2014", + "kind": "string", + "type": { + "$ref": "454" + }, + "value": "2024-08-09T18:13:29.389Z" + } + } + } + } + } + } + ] + } + ] + }, + { + "$id": "2015", + "name": "delete", + "resourceName": "InstanceResource", + "doc": "Delete a InstanceResource", + "accessibility": "public", + "parameters": [ + { + "$id": "2016", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "2017", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "2018", + "type": { + "$id": "2019", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-04-01" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2020", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "2021", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "2022", + "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": "2023", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "2024", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2025", + "name": "instanceName", + "nameInRequest": "instanceName", + "doc": "Name of instance.", + "type": { + "$id": "2026", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2027", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "2028", + "kind": "constant", + "valueType": { + "$id": "2029", + "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": "2030", + "statusCodes": [ + 202 + ], + "headers": [ + { + "$id": "2031", + "name": "location", + "nameInResponse": "Location", + "doc": "The Location header contains the URL where the status of the long running operation can be checked.", + "type": { + "$id": "2032", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + { + "$id": "2033", + "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": "2034", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + } + } + ], + "isErrorResponse": false + }, + { + "$id": "2035", + "statusCodes": [ + 204 + ], + "headers": [], + "isErrorResponse": false + } + ], + "httpMethod": "DELETE", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTOperations/instances/{instanceName}", + "bufferResponse": true, + "longRunning": { + "$id": "2036", + "finalStateVia": 1, + "finalResponse": { + "$id": "2037", + "statusCodes": [ + 204 + ] + } + }, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.IoTOperations.Instance.delete", + "decorators": [], + "examples": [ + { + "$id": "2038", + "kind": "http", + "name": "Instance_Delete", + "description": "Instance_Delete", + "filePath": "2025-04-01/Instance_Delete_MaximumSet_Gen.json", + "parameters": [ + { + "$id": "2039", + "parameter": { + "$ref": "2016" + }, + "value": { + "$id": "2040", + "kind": "string", + "type": { + "$ref": "2017" + }, + "value": "2025-04-01" + } + }, + { + "$id": "2041", + "parameter": { + "$ref": "2020" + }, + "value": { + "$id": "2042", + "kind": "string", + "type": { + "$ref": "2021" + }, + "value": "F8C729F9-DF9C-4743-848F-96EE433D8E53" + } + }, + { + "$id": "2043", + "parameter": { + "$ref": "2023" + }, + "value": { + "$id": "2044", + "kind": "string", + "type": { + "$ref": "2024" + }, + "value": "rgiotoperations" + } + }, + { + "$id": "2045", + "parameter": { + "$ref": "2025" + }, + "value": { + "$id": "2046", + "kind": "string", + "type": { + "$ref": "2026" + }, + "value": "aio-instance" + } + } + ], + "responses": [ + { + "$id": "2047", + "response": { + "$ref": "2030" + }, + "statusCode": 202 + }, + { + "$id": "2048", + "response": { + "$ref": "2035" + }, + "statusCode": 204 + } + ] + } + ] + }, + { + "$id": "2049", + "name": "listByResourceGroup", + "resourceName": "InstanceResource", + "doc": "List InstanceResource resources by resource group", + "accessibility": "public", + "parameters": [ + { + "$id": "2050", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "2051", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "2052", + "type": { + "$id": "2053", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-04-01" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2054", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "2055", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "2056", + "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": "2057", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "2058", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2059", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "2060", + "kind": "constant", + "valueType": { + "$id": "2061", + "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": "2062", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "589" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "GET", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTOperations/instances", + "bufferResponse": true, + "paging": { + "$id": "2063", + "itemPropertySegments": [ + "value" + ], + "nextLink": { + "$id": "2064", + "responseSegments": [ + "nextLink" + ], + "responseLocation": "Body" + } + }, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.IoTOperations.Instance.listByResourceGroup", + "decorators": [], + "examples": [ + { + "$id": "2065", + "kind": "http", + "name": "Instance_ListByResourceGroup", + "description": "Instance_ListByResourceGroup", + "filePath": "2025-04-01/Instance_ListByResourceGroup_MaximumSet_Gen.json", + "parameters": [ + { + "$id": "2066", + "parameter": { + "$ref": "2050" + }, + "value": { + "$id": "2067", + "kind": "string", + "type": { + "$ref": "2051" + }, + "value": "2025-04-01" + } + }, + { + "$id": "2068", + "parameter": { + "$ref": "2054" + }, + "value": { + "$id": "2069", + "kind": "string", + "type": { + "$ref": "2055" + }, + "value": "F8C729F9-DF9C-4743-848F-96EE433D8E53" + } + }, + { + "$id": "2070", + "parameter": { + "$ref": "2057" + }, + "value": { + "$id": "2071", + "kind": "string", + "type": { + "$ref": "2058" + }, + "value": "rgiotoperations" + } + } + ], + "responses": [ + { + "$id": "2072", + "response": { + "$ref": "2062" + }, + "statusCode": 200, + "bodyValue": { + "$id": "2073", + "kind": "model", + "type": { + "$ref": "589" + }, + "value": { + "$id": "2074", + "value": { + "$id": "2075", + "kind": "array", + "type": { + "$ref": "591" + }, + "value": [ + { + "$id": "2076", + "kind": "model", + "type": { + "$ref": "415" + }, + "value": { + "$id": "2077", + "properties": { + "$id": "2078", + "kind": "model", + "type": { + "$ref": "471" + }, + "value": { + "$id": "2079", + "provisioningState": { + "$id": "2080", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Succeeded" + }, + "version": { + "$id": "2081", + "kind": "string", + "type": { + "$ref": "480" + }, + "value": "vjjbmunthiphfmekvxgxcxkzdwjti" + }, + "schemaRegistryRef": { + "$id": "2082", + "kind": "model", + "type": { + "$ref": "484" + }, + "value": { + "$id": "2083", + "resourceId": { + "$id": "2084", + "kind": "string", + "type": { + "$ref": "486" + }, + "value": "/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.DeviceRegistry/schemaRegistries/resource-name123" + } + } + }, + "description": { + "$id": "2085", + "kind": "string", + "type": { + "$ref": "473" + }, + "value": "vmujggxdvxk" + } + } + }, + "extendedLocation": { + "$id": "2086", + "kind": "model", + "type": { + "$ref": "510" + }, + "value": { + "$id": "2087", + "name": { + "$id": "2088", + "kind": "string", + "type": { + "$ref": "512" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "2089", + "kind": "string", + "type": { + "$ref": "44" + }, + "value": "CustomLocation" + } + } + }, + "identity": { + "$id": "2090", + "kind": "model", + "type": { + "$ref": "521" + }, + "value": { + "$id": "2091", + "principalId": { + "$id": "2092", + "kind": "string", + "type": { + "$ref": "523" + }, + "value": "4a6e4195-75b8-4685-aa0c-0b5704779327" + }, + "tenantId": { + "$id": "2093", + "kind": "string", + "type": { + "$ref": "528" + }, + "value": "ed060aa2-71ff-4d3f-99c4-a9138356fdec" + }, + "type": { + "$id": "2094", + "kind": "string", + "type": { + "$ref": "48" + }, + "value": "None" + }, + "userAssignedIdentities": { + "$id": "2095", + "kind": "dict", + "type": { + "$ref": "536" + }, + "value": { + "$id": "2096" + } + } + } + }, + "tags": { + "$id": "2097", + "kind": "dict", + "type": { + "$ref": "461" + }, + "value": { + "$id": "2098" + } + }, + "location": { + "$id": "2099", + "kind": "string", + "type": { + "$ref": "467" + }, + "value": "xvewadyhycrjpu" + }, + "id": { + "$id": "2100", + "kind": "string", + "type": { + "$ref": "419" + }, + "value": "/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.IoTOperations/instances/resource-name123" + }, + "name": { + "$id": "2101", + "kind": "string", + "type": { + "$ref": "424" + }, + "value": "llptmlifnqqwairx" + }, + "type": { + "$id": "2102", + "kind": "string", + "type": { + "$ref": "428" + }, + "value": "qwrfzxjfxvismlqvigot" + }, + "systemData": { + "$id": "2103", + "kind": "model", + "type": { + "$ref": "433" + }, + "value": { + "$id": "2104", + "createdBy": { + "$id": "2105", + "kind": "string", + "type": { + "$ref": "435" + }, + "value": "ssvaslsmudloholronopqyxjcu" + }, + "createdByType": { + "$id": "2106", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "createdAt": { + "$id": "2107", + "kind": "string", + "type": { + "$ref": "442" + }, + "value": "2024-08-09T18:13:29.389Z" + }, + "lastModifiedBy": { + "$id": "2108", + "kind": "string", + "type": { + "$ref": "447" + }, + "value": "gnicpuszwd" + }, + "lastModifiedByType": { + "$id": "2109", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "2110", + "kind": "string", + "type": { + "$ref": "454" + }, + "value": "2024-08-09T18:13:29.389Z" + } + } + } + } + } + ] + }, + "nextLink": { + "$id": "2111", + "kind": "string", + "type": { + "$ref": "595" + }, + "value": "https://microsoft.com/a" + } + } + } + } + ] + } + ] + }, + { + "$id": "2112", + "name": "listBySubscription", + "resourceName": "InstanceResource", + "doc": "List InstanceResource resources by subscription ID", + "accessibility": "public", + "parameters": [ + { + "$id": "2113", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "2114", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "2115", + "type": { + "$id": "2116", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-04-01" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2117", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "2118", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "2119", + "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": "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": "589" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "GET", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/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.listBySubscription", + "decorators": [], + "examples": [ + { + "$id": "2126", + "kind": "http", + "name": "Instance_ListBySubscription", + "description": "Instance_ListBySubscription", + "filePath": "2025-04-01/Instance_ListBySubscription_MaximumSet_Gen.json", + "parameters": [ + { + "$id": "2127", + "parameter": { + "$ref": "2113" + }, + "value": { + "$id": "2128", + "kind": "string", + "type": { + "$ref": "2114" + }, + "value": "2025-04-01" + } + }, + { + "$id": "2129", + "parameter": { + "$ref": "2117" + }, + "value": { + "$id": "2130", + "kind": "string", + "type": { + "$ref": "2118" + }, + "value": "F8C729F9-DF9C-4743-848F-96EE433D8E53" + } + } + ], + "responses": [ + { + "$id": "2131", + "response": { + "$ref": "2123" + }, + "statusCode": 200, + "bodyValue": { + "$id": "2132", + "kind": "model", + "type": { + "$ref": "589" + }, + "value": { + "$id": "2133", + "value": { + "$id": "2134", + "kind": "array", + "type": { + "$ref": "591" + }, + "value": [ + { + "$id": "2135", + "kind": "model", + "type": { + "$ref": "415" + }, + "value": { + "$id": "2136", + "properties": { + "$id": "2137", + "kind": "model", + "type": { + "$ref": "471" + }, + "value": { + "$id": "2138", + "provisioningState": { + "$id": "2139", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Succeeded" + }, + "version": { + "$id": "2140", + "kind": "string", + "type": { + "$ref": "480" + }, + "value": "vjjbmunthiphfmekvxgxcxkzdwjti" + }, + "schemaRegistryRef": { + "$id": "2141", + "kind": "model", + "type": { + "$ref": "484" + }, + "value": { + "$id": "2142", + "resourceId": { + "$id": "2143", + "kind": "string", + "type": { + "$ref": "486" + }, + "value": "/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.DeviceRegistry/schemaRegistries/resource-name123" + } + } + }, + "description": { + "$id": "2144", + "kind": "string", + "type": { + "$ref": "473" + }, + "value": "empgqmbhvklcqlyahmdsjemlep" + } + } + }, + "extendedLocation": { + "$id": "2145", + "kind": "model", + "type": { + "$ref": "510" + }, + "value": { + "$id": "2146", + "name": { + "$id": "2147", + "kind": "string", + "type": { + "$ref": "512" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "2148", + "kind": "string", + "type": { + "$ref": "44" + }, + "value": "CustomLocation" + } + } + }, + "identity": { + "$id": "2149", + "kind": "model", + "type": { + "$ref": "521" + }, + "value": { + "$id": "2150", + "principalId": { + "$id": "2151", + "kind": "string", + "type": { + "$ref": "523" + }, + "value": "4a6e4195-75b8-4685-aa0c-0b5704779327" + }, + "tenantId": { + "$id": "2152", + "kind": "string", + "type": { + "$ref": "528" + }, + "value": "ed060aa2-71ff-4d3f-99c4-a9138356fdec" + }, + "type": { + "$id": "2153", + "kind": "string", + "type": { + "$ref": "48" + }, + "value": "None" + }, + "userAssignedIdentities": { + "$id": "2154", + "kind": "dict", + "type": { + "$ref": "536" + }, + "value": { + "$id": "2155" + } + } + } + }, + "tags": { + "$id": "2156", + "kind": "dict", + "type": { + "$ref": "461" + }, + "value": { + "$id": "2157" + } + }, + "location": { + "$id": "2158", + "kind": "string", + "type": { + "$ref": "467" + }, + "value": "xvewadyhycrjpu" + }, + "id": { + "$id": "2159", + "kind": "string", + "type": { + "$ref": "419" + }, + "value": "/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.IoTOperations/instances/resource-name123" + }, + "name": { + "$id": "2160", + "kind": "string", + "type": { + "$ref": "424" + }, + "value": "llptmlifnqqwairx" + }, + "type": { + "$id": "2161", + "kind": "string", + "type": { + "$ref": "428" + }, + "value": "qwrfzxjfxvismlqvigot" + }, + "systemData": { + "$id": "2162", + "kind": "model", + "type": { + "$ref": "433" + }, + "value": { + "$id": "2163", + "createdBy": { + "$id": "2164", + "kind": "string", + "type": { + "$ref": "435" + }, + "value": "ssvaslsmudloholronopqyxjcu" + }, + "createdByType": { + "$id": "2165", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "createdAt": { + "$id": "2166", + "kind": "string", + "type": { + "$ref": "442" + }, + "value": "2024-08-09T18:13:29.389Z" + }, + "lastModifiedBy": { + "$id": "2167", + "kind": "string", + "type": { + "$ref": "447" + }, + "value": "gnicpuszwd" + }, + "lastModifiedByType": { + "$id": "2168", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "2169", + "kind": "string", + "type": { + "$ref": "454" + }, + "value": "2024-08-09T18:13:29.389Z" + } + } + } + } + } + ] + }, + "nextLink": { + "$id": "2170", + "kind": "string", + "type": { + "$ref": "595" + }, + "value": "https://microsoft.com/a" + } + } + } + } + ] + } + ] + } + ], + "parameters": [ + { + "$id": "2171", + "name": "endpoint", + "nameInRequest": "endpoint", + "doc": "Service host", + "type": { + "$id": "2172", + "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": "2173", + "type": { + "$id": "2174", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "https://management.azure.com" + } + } + ], + "decorators": [ + { + "$id": "2175", + "name": "Azure.ResourceManager.@armResourceOperations", + "arguments": { + "$id": "2176" + } + } + ], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.Instance", + "apiVersions": [ + "2024-11-01", + "2025-04-01" + ], + "parent": { + "$ref": "1692" + } + }, + { + "$id": "2177", + "kind": "client", + "name": "Broker", + "namespace": "Azure.ResourceManager.IotOperations", + "operations": [ + { + "$id": "2178", + "name": "get", + "resourceName": "BrokerResource", + "doc": "Get a BrokerResource", + "accessibility": "public", + "parameters": [ + { + "$id": "2179", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "2180", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "2181", + "type": { + "$id": "2182", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-04-01" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2183", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "2184", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "2185", + "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": "2186", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "2187", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2188", + "name": "instanceName", + "nameInRequest": "instanceName", + "doc": "Name of instance.", + "type": { + "$id": "2189", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2190", + "name": "brokerName", + "nameInRequest": "brokerName", + "doc": "Name of broker.", + "type": { + "$id": "2191", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2192", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "2193", + "kind": "constant", + "valueType": { + "$id": "2194", + "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": "2195", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "599" + }, + "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": "2196", + "kind": "http", + "name": "Broker_Get", + "description": "Broker_Get", + "filePath": "2025-04-01/Broker_Get_MaximumSet_Gen.json", + "parameters": [ + { + "$id": "2197", + "parameter": { + "$ref": "2179" + }, + "value": { + "$id": "2198", + "kind": "string", + "type": { + "$ref": "2180" + }, + "value": "2025-04-01" + } + }, + { + "$id": "2199", + "parameter": { + "$ref": "2183" + }, + "value": { + "$id": "2200", + "kind": "string", + "type": { + "$ref": "2184" + }, + "value": "F8C729F9-DF9C-4743-848F-96EE433D8E53" + } + }, + { + "$id": "2201", + "parameter": { + "$ref": "2186" + }, + "value": { + "$id": "2202", + "kind": "string", + "type": { + "$ref": "2187" + }, + "value": "rgiotoperations" + } + }, + { + "$id": "2203", + "parameter": { + "$ref": "2188" + }, + "value": { + "$id": "2204", + "kind": "string", + "type": { + "$ref": "2189" + }, + "value": "resource-name123" + } + }, + { + "$id": "2205", + "parameter": { + "$ref": "2190" + }, + "value": { + "$id": "2206", + "kind": "string", + "type": { + "$ref": "2191" + }, + "value": "resource-name123" + } + } + ], + "responses": [ + { + "$id": "2207", + "response": { + "$ref": "2195" + }, + "statusCode": 200, + "bodyValue": { + "$id": "2208", + "kind": "model", + "type": { + "$ref": "599" + }, + "value": { + "$id": "2209", + "properties": { + "$id": "2210", + "kind": "model", + "type": { + "$ref": "602" + }, + "value": { + "$id": "2211", + "advanced": { + "$id": "2212", + "kind": "model", + "type": { + "$ref": "604" + }, + "value": { + "$id": "2213", + "clients": { + "$id": "2214", + "kind": "model", + "type": { + "$ref": "606" + }, + "value": { + "$id": "2215", + "maxSessionExpirySeconds": { + "$id": "2216", + "kind": "number", + "type": { + "$ref": "608" + }, + "value": 3859 + }, + "maxMessageExpirySeconds": { + "$id": "2217", + "kind": "number", + "type": { + "$ref": "612" + }, + "value": 3263 + }, + "maxPacketSizeBytes": { + "$id": "2218", + "kind": "number", + "type": { + "$ref": "616" + }, + "value": 3029 + }, + "subscriberQueueLimit": { + "$id": "2219", + "kind": "model", + "type": { + "$ref": "620" + }, + "value": { + "$id": "2220", + "length": { + "$id": "2221", + "kind": "number", + "type": { + "$ref": "622" + }, + "value": 6 + }, + "strategy": { + "$id": "2222", + "kind": "string", + "type": { + "$ref": "76" + }, + "value": "None" + } + } + }, + "maxReceiveMaximum": { + "$id": "2223", + "kind": "number", + "type": { + "$ref": "631" + }, + "value": 2365 + }, + "maxKeepAliveSeconds": { + "$id": "2224", + "kind": "number", + "type": { + "$ref": "635" + }, + "value": 3744 + } + } + }, + "encryptInternalTraffic": { + "$id": "2225", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Enabled" + }, + "internalCerts": { + "$id": "2226", + "kind": "model", + "type": { + "$ref": "644" + }, + "value": { + "$id": "2227", + "duration": { + "$id": "2228", + "kind": "string", + "type": { + "$ref": "646" + }, + "value": "bchrc" + }, + "renewBefore": { + "$id": "2229", + "kind": "string", + "type": { + "$ref": "650" + }, + "value": "xkafmpgjfifkwwrhkswtopdnne" + }, + "privateKey": { + "$id": "2230", + "kind": "model", + "type": { + "$ref": "654" + }, + "value": { + "$id": "2231", + "algorithm": { + "$id": "2232", + "kind": "string", + "type": { + "$ref": "82" + }, + "value": "Ec256" + }, + "rotationPolicy": { + "$id": "2233", + "kind": "string", + "type": { + "$ref": "98" + }, + "value": "Always" + } + } + } + } + } + } + }, + "cardinality": { + "$id": "2234", + "kind": "model", + "type": { + "$ref": "668" + }, + "value": { + "$id": "2235", + "backendChain": { + "$id": "2236", + "kind": "model", + "type": { + "$ref": "670" + }, + "value": { + "$id": "2237", + "partitions": { + "$id": "2238", + "kind": "number", + "type": { + "$ref": "672" + }, + "value": 11 + }, + "redundancyFactor": { + "$id": "2239", + "kind": "number", + "type": { + "$ref": "676" + }, + "value": 5 + }, + "workers": { + "$id": "2240", + "kind": "number", + "type": { + "$ref": "680" + }, + "value": 15 + } + } + }, + "frontend": { + "$id": "2241", + "kind": "model", + "type": { + "$ref": "686" + }, + "value": { + "$id": "2242", + "replicas": { + "$id": "2243", + "kind": "number", + "type": { + "$ref": "688" + }, + "value": 2 + }, + "workers": { + "$id": "2244", + "kind": "number", + "type": { + "$ref": "692" + }, + "value": 6 + } + } + } + } + }, + "diagnostics": { + "$id": "2245", + "kind": "model", + "type": { + "$ref": "700" + }, + "value": { + "$id": "2246", + "logs": { + "$id": "2247", + "kind": "model", + "type": { + "$ref": "702" + }, + "value": { + "$id": "2248", + "level": { + "$id": "2249", + "kind": "string", + "type": { + "$ref": "704" + }, + "value": "rnmwokumdmebpmfxxxzvvjfdywotav" + } + } + }, + "metrics": { + "$id": "2250", + "kind": "model", + "type": { + "$ref": "710" + }, + "value": { + "$id": "2251", + "prometheusPort": { + "$id": "2252", + "kind": "number", + "type": { + "$ref": "712" + }, + "value": 7581 + } + } + }, + "selfCheck": { + "$id": "2253", + "kind": "model", + "type": { + "$ref": "718" + }, + "value": { + "$id": "2254", + "mode": { + "$id": "2255", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Enabled" + }, + "intervalSeconds": { + "$id": "2256", + "kind": "number", + "type": { + "$ref": "723" + }, + "value": 158 + }, + "timeoutSeconds": { + "$id": "2257", + "kind": "number", + "type": { + "$ref": "727" + }, + "value": 14 + } + } + }, + "traces": { + "$id": "2258", + "kind": "model", + "type": { + "$ref": "733" + }, + "value": { + "$id": "2259", + "mode": { + "$id": "2260", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Enabled" + }, + "cacheSizeMegabytes": { + "$id": "2261", + "kind": "number", + "type": { + "$ref": "738" + }, + "value": 28 + }, + "selfTracing": { + "$id": "2262", + "kind": "model", + "type": { + "$ref": "742" + }, + "value": { + "$id": "2263", + "mode": { + "$id": "2264", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Enabled" + }, + "intervalSeconds": { + "$id": "2265", + "kind": "number", + "type": { + "$ref": "747" + }, + "value": 22 + } + } + }, + "spanChannelCapacity": { + "$id": "2266", + "kind": "number", + "type": { + "$ref": "753" + }, + "value": 1000 + } + } + } + } + }, + "diskBackedMessageBuffer": { + "$id": "2267", + "kind": "model", + "type": { + "$ref": "761" + }, + "value": { + "$id": "2268", + "maxSize": { + "$id": "2269", + "kind": "string", + "type": { + "$ref": "763" + }, + "value": "500M" + }, + "ephemeralVolumeClaimSpec": { + "$id": "2270", + "kind": "model", + "type": { + "$ref": "767" + }, + "value": { + "$id": "2271", + "volumeName": { + "$id": "2272", + "kind": "string", + "type": { + "$ref": "769" + }, + "value": "c" + }, + "volumeMode": { + "$id": "2273", + "kind": "string", + "type": { + "$ref": "773" + }, + "value": "rxvpksjuuugqnqzeiprocknbn" + }, + "storageClassName": { + "$id": "2274", + "kind": "string", + "type": { + "$ref": "777" + }, + "value": "sseyhrjptkhrqvpdpjmornkqvon" + }, + "accessModes": { + "$id": "2275", + "kind": "array", + "type": { + "$ref": "781" + }, + "value": [ + { + "$id": "2276", + "kind": "string", + "type": { + "$ref": "782" + }, + "value": "nuluhigrbb" + } + ] + }, + "dataSource": { + "$id": "2277", + "kind": "model", + "type": { + "$ref": "786" + }, + "value": { + "$id": "2278", + "apiGroup": { + "$id": "2279", + "kind": "string", + "type": { + "$ref": "788" + }, + "value": "npqapyksvvpkohujx" + }, + "kind": { + "$id": "2280", + "kind": "string", + "type": { + "$ref": "792" + }, + "value": "wazgyb" + }, + "name": { + "$id": "2281", + "kind": "string", + "type": { + "$ref": "796" + }, + "value": "cwhsgxxcxsyppoefm" + } + } + }, + "dataSourceRef": { + "$id": "2282", + "kind": "model", + "type": { + "$ref": "802" + }, + "value": { + "$id": "2283", + "apiGroup": { + "$id": "2284", + "kind": "string", + "type": { + "$ref": "804" + }, + "value": "mnfnykznjjsoqpfsgdqioupt" + }, + "kind": { + "$id": "2285", + "kind": "string", + "type": { + "$ref": "808" + }, + "value": "odynqzekfzsnawrctaxg" + }, + "name": { + "$id": "2286", + "kind": "string", + "type": { + "$ref": "812" + }, + "value": "envszivbbmixbyddzg" + }, + "namespace": { + "$id": "2287", + "kind": "string", + "type": { + "$ref": "816" + }, + "value": "etcfzvxqd" + } + } + }, + "resources": { + "$id": "2288", + "kind": "model", + "type": { + "$ref": "822" + }, + "value": { + "$id": "2289", + "limits": { + "$id": "2290", + "kind": "dict", + "type": { + "$ref": "824" + }, + "value": { + "$id": "2291", + "key2719": { + "$id": "2292", + "kind": "string", + "type": { + "$ref": "826" + }, + "value": "hmphcrgctu" + } + } + }, + "requests": { + "$id": "2293", + "kind": "dict", + "type": { + "$ref": "830" + }, + "value": { + "$id": "2294", + "key2909": { + "$id": "2295", + "kind": "string", + "type": { + "$ref": "832" + }, + "value": "txocprnyrsgvhfrg" + } + } + } + } + }, + "selector": { + "$id": "2296", + "kind": "model", + "type": { + "$ref": "838" + }, + "value": { + "$id": "2297", + "matchExpressions": { + "$id": "2298", + "kind": "array", + "type": { + "$ref": "840" + }, + "value": [ + { + "$id": "2299", + "kind": "model", + "type": { + "$ref": "841" + }, + "value": { + "$id": "2300", + "key": { + "$id": "2301", + "kind": "string", + "type": { + "$ref": "843" + }, + "value": "e" + }, + "operator": { + "$id": "2302", + "kind": "string", + "type": { + "$ref": "104" + }, + "value": "In" + }, + "values": { + "$id": "2303", + "kind": "array", + "type": { + "$ref": "850" + }, + "value": [ + { + "$id": "2304", + "kind": "string", + "type": { + "$ref": "851" + }, + "value": "slmpajlywqvuyknipgztsonqyybt" + } + ] + } + } + } + ] + }, + "matchLabels": { + "$id": "2305", + "kind": "dict", + "type": { + "$ref": "857" + }, + "value": { + "$id": "2306", + "key6673": { + "$id": "2307", + "kind": "string", + "type": { + "$ref": "859" + }, + "value": "wlngfalznwxnurzpgxomcxhbqefpr" + } + } + } + } + } + } + }, + "persistentVolumeClaimSpec": { + "$id": "2308", + "kind": "model", + "type": { + "$ref": "767" + }, + "value": { + "$id": "2309", + "volumeName": { + "$id": "2310", + "kind": "string", + "type": { + "$ref": "769" + }, + "value": "c" + }, + "volumeMode": { + "$id": "2311", + "kind": "string", + "type": { + "$ref": "773" + }, + "value": "rxvpksjuuugqnqzeiprocknbn" + }, + "storageClassName": { + "$id": "2312", + "kind": "string", + "type": { + "$ref": "777" + }, + "value": "sseyhrjptkhrqvpdpjmornkqvon" + }, + "accessModes": { + "$id": "2313", + "kind": "array", + "type": { + "$ref": "781" + }, + "value": [ + { + "$id": "2314", + "kind": "string", + "type": { + "$ref": "782" + }, + "value": "nuluhigrbb" + } + ] + }, + "dataSource": { + "$id": "2315", + "kind": "model", + "type": { + "$ref": "786" + }, + "value": { + "$id": "2316", + "apiGroup": { + "$id": "2317", + "kind": "string", + "type": { + "$ref": "788" + }, + "value": "npqapyksvvpkohujx" + }, + "kind": { + "$id": "2318", + "kind": "string", + "type": { + "$ref": "792" + }, + "value": "wazgyb" + }, + "name": { + "$id": "2319", + "kind": "string", + "type": { + "$ref": "796" + }, + "value": "cwhsgxxcxsyppoefm" + } + } + }, + "dataSourceRef": { + "$id": "2320", + "kind": "model", + "type": { + "$ref": "802" + }, + "value": { + "$id": "2321", + "apiGroup": { + "$id": "2322", + "kind": "string", + "type": { + "$ref": "804" + }, + "value": "mnfnykznjjsoqpfsgdqioupt" + }, + "kind": { + "$id": "2323", + "kind": "string", + "type": { + "$ref": "808" + }, + "value": "odynqzekfzsnawrctaxg" + }, + "name": { + "$id": "2324", + "kind": "string", + "type": { + "$ref": "812" + }, + "value": "envszivbbmixbyddzg" + }, + "namespace": { + "$id": "2325", + "kind": "string", + "type": { + "$ref": "816" + }, + "value": "etcfzvxqd" + } + } + }, + "resources": { + "$id": "2326", + "kind": "model", + "type": { + "$ref": "822" + }, + "value": { + "$id": "2327", + "limits": { + "$id": "2328", + "kind": "dict", + "type": { + "$ref": "824" + }, + "value": { + "$id": "2329", + "key2719": { + "$id": "2330", + "kind": "string", + "type": { + "$ref": "826" + }, + "value": "hmphcrgctu" + } + } + }, + "requests": { + "$id": "2331", + "kind": "dict", + "type": { + "$ref": "830" + }, + "value": { + "$id": "2332", + "key2909": { + "$id": "2333", + "kind": "string", + "type": { + "$ref": "832" + }, + "value": "txocprnyrsgvhfrg" + } + } + } + } + }, + "selector": { + "$id": "2334", + "kind": "model", + "type": { + "$ref": "838" + }, + "value": { + "$id": "2335", + "matchExpressions": { + "$id": "2336", + "kind": "array", + "type": { + "$ref": "840" + }, + "value": [ + { + "$id": "2337", + "kind": "model", + "type": { + "$ref": "841" + }, + "value": { + "$id": "2338", + "key": { + "$id": "2339", + "kind": "string", + "type": { + "$ref": "843" + }, + "value": "e" + }, + "operator": { + "$id": "2340", + "kind": "string", + "type": { + "$ref": "104" + }, + "value": "In" + }, + "values": { + "$id": "2341", + "kind": "array", + "type": { + "$ref": "850" + }, + "value": [ + { + "$id": "2342", + "kind": "string", + "type": { + "$ref": "851" + }, + "value": "slmpajlywqvuyknipgztsonqyybt" + } + ] + } + } + } + ] + }, + "matchLabels": { + "$id": "2343", + "kind": "dict", + "type": { + "$ref": "857" + }, + "value": { + "$id": "2344", + "key6673": { + "$id": "2345", + "kind": "string", + "type": { + "$ref": "859" + }, + "value": "wlngfalznwxnurzpgxomcxhbqefpr" + } + } + } + } + } + } + } + } + }, + "generateResourceLimits": { + "$id": "2346", + "kind": "model", + "type": { + "$ref": "872" + }, + "value": { + "$id": "2347", + "cpu": { + "$id": "2348", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Enabled" + } + } + }, + "memoryProfile": { + "$id": "2349", + "kind": "string", + "type": { + "$ref": "114" + }, + "value": "Tiny" + }, + "provisioningState": { + "$id": "2350", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Succeeded" + } + } + }, + "extendedLocation": { + "$id": "2351", + "kind": "model", + "type": { + "$ref": "510" + }, + "value": { + "$id": "2352", + "name": { + "$id": "2353", + "kind": "string", + "type": { + "$ref": "512" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "2354", + "kind": "string", + "type": { + "$ref": "44" + }, + "value": "CustomLocation" + } + } + }, + "id": { + "$id": "2355", + "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": "2356", + "kind": "string", + "type": { + "$ref": "424" + }, + "value": "dowrkel" + }, + "type": { + "$id": "2357", + "kind": "string", + "type": { + "$ref": "428" + }, + "value": "xshjnsdgadygb" + }, + "systemData": { + "$id": "2358", + "kind": "model", + "type": { + "$ref": "433" + }, + "value": { + "$id": "2359", + "createdBy": { + "$id": "2360", + "kind": "string", + "type": { + "$ref": "435" + }, + "value": "ssvaslsmudloholronopqyxjcu" + }, + "createdByType": { + "$id": "2361", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "createdAt": { + "$id": "2362", + "kind": "string", + "type": { + "$ref": "442" + }, + "value": "2024-08-09T18:13:29.389Z" + }, + "lastModifiedBy": { + "$id": "2363", + "kind": "string", + "type": { + "$ref": "447" + }, + "value": "gnicpuszwd" + }, + "lastModifiedByType": { + "$id": "2364", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "2365", + "kind": "string", + "type": { + "$ref": "454" + }, + "value": "2024-08-09T18:13:29.389Z" + } + } + } + } + } + } + ] + } + ] + }, + { + "$id": "2366", + "name": "createOrUpdate", + "resourceName": "BrokerResource", + "doc": "Create a BrokerResource", + "accessibility": "public", + "parameters": [ + { + "$id": "2367", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "2368", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "2369", + "type": { + "$id": "2370", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-04-01" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2371", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "2372", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "2373", + "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": "2374", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "2375", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2376", + "name": "instanceName", + "nameInRequest": "instanceName", + "doc": "Name of instance.", + "type": { + "$id": "2377", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2378", + "name": "brokerName", + "nameInRequest": "brokerName", + "doc": "Name of broker.", + "type": { + "$id": "2379", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2380", + "name": "contentType", + "nameInRequest": "Content-Type", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$id": "2381", + "kind": "constant", + "valueType": { + "$id": "2382", + "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": "2383", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "2384", + "kind": "constant", + "valueType": { + "$id": "2385", + "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": "2386", + "name": "resource", + "nameInRequest": "resource", + "doc": "Resource create parameters.", + "type": { + "$ref": "599" + }, + "location": "Body", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "2387", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "599" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + }, + { + "$id": "2388", + "statusCodes": [ + 201 + ], + "bodyType": { + "$ref": "599" + }, + "headers": [ + { + "$id": "2389", + "name": "azureAsyncOperation", + "nameInResponse": "Azure-AsyncOperation", + "doc": "A link to the status monitor", + "type": { + "$id": "2390", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + { + "$id": "2391", + "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": "2392", + "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": "2393", + "finalStateVia": 0, + "finalResponse": { + "$id": "2394", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "599" + } + } + }, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.IoTOperations.Broker.createOrUpdate", + "decorators": [], + "examples": [ + { + "$id": "2395", + "kind": "http", + "name": "Broker_CreateOrUpdate_Complex", + "description": "Broker_CreateOrUpdate_Complex", + "filePath": "2025-04-01/Broker_CreateOrUpdate_Complex.json", + "parameters": [ + { + "$id": "2396", + "parameter": { + "$ref": "2367" + }, + "value": { + "$id": "2397", + "kind": "string", + "type": { + "$ref": "2368" + }, + "value": "2025-04-01" + } + }, + { + "$id": "2398", + "parameter": { + "$ref": "2371" + }, + "value": { + "$id": "2399", + "kind": "string", + "type": { + "$ref": "2372" + }, + "value": "F8C729F9-DF9C-4743-848F-96EE433D8E53" + } + }, + { + "$id": "2400", + "parameter": { + "$ref": "2374" + }, + "value": { + "$id": "2401", + "kind": "string", + "type": { + "$ref": "2375" + }, + "value": "rgiotoperations" + } + }, + { + "$id": "2402", + "parameter": { + "$ref": "2376" + }, + "value": { + "$id": "2403", + "kind": "string", + "type": { + "$ref": "2377" + }, + "value": "resource-name123" + } + }, + { + "$id": "2404", + "parameter": { + "$ref": "2378" + }, + "value": { + "$id": "2405", + "kind": "string", + "type": { + "$ref": "2379" + }, + "value": "resource-name123" + } + }, + { + "$id": "2406", + "parameter": { + "$ref": "2386" + }, + "value": { + "$id": "2407", + "kind": "model", + "type": { + "$ref": "599" + }, + "value": { + "$id": "2408", + "properties": { + "$id": "2409", + "kind": "model", + "type": { + "$ref": "602" + }, + "value": { + "$id": "2410", + "cardinality": { + "$id": "2411", + "kind": "model", + "type": { + "$ref": "668" + }, + "value": { + "$id": "2412", + "backendChain": { + "$id": "2413", + "kind": "model", + "type": { + "$ref": "670" + }, + "value": { + "$id": "2414", + "partitions": { + "$id": "2415", + "kind": "number", + "type": { + "$ref": "672" + }, + "value": 2 + }, + "redundancyFactor": { + "$id": "2416", + "kind": "number", + "type": { + "$ref": "676" + }, + "value": 2 + }, + "workers": { + "$id": "2417", + "kind": "number", + "type": { + "$ref": "680" + }, + "value": 2 + } + } + }, + "frontend": { + "$id": "2418", + "kind": "model", + "type": { + "$ref": "686" + }, + "value": { + "$id": "2419", + "replicas": { + "$id": "2420", + "kind": "number", + "type": { + "$ref": "688" + }, + "value": 2 + }, + "workers": { + "$id": "2421", + "kind": "number", + "type": { + "$ref": "692" + }, + "value": 2 + } + } + } + } + }, + "diskBackedMessageBuffer": { + "$id": "2422", + "kind": "model", + "type": { + "$ref": "761" + }, + "value": { + "$id": "2423", + "maxSize": { + "$id": "2424", + "kind": "string", + "type": { + "$ref": "763" + }, + "value": "50M" + } + } + }, + "generateResourceLimits": { + "$id": "2425", + "kind": "model", + "type": { + "$ref": "872" + }, + "value": { + "$id": "2426", + "cpu": { + "$id": "2427", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Enabled" + } + } + }, + "memoryProfile": { + "$id": "2428", + "kind": "string", + "type": { + "$ref": "114" + }, + "value": "Medium" + } + } + }, + "extendedLocation": { + "$id": "2429", + "kind": "model", + "type": { + "$ref": "510" + }, + "value": { + "$id": "2430", + "name": { + "$id": "2431", + "kind": "string", + "type": { + "$ref": "512" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "2432", + "kind": "string", + "type": { + "$ref": "44" + }, + "value": "CustomLocation" + } + } + } + } + } + } + ], + "responses": [ + { + "$id": "2433", + "response": { + "$ref": "2387" + }, + "statusCode": 200, + "bodyValue": { + "$id": "2434", + "kind": "model", + "type": { + "$ref": "599" + }, + "value": { + "$id": "2435", + "properties": { + "$id": "2436", + "kind": "model", + "type": { + "$ref": "602" + }, + "value": { + "$id": "2437", + "cardinality": { + "$id": "2438", + "kind": "model", + "type": { + "$ref": "668" + }, + "value": { + "$id": "2439", + "backendChain": { + "$id": "2440", + "kind": "model", + "type": { + "$ref": "670" + }, + "value": { + "$id": "2441", + "partitions": { + "$id": "2442", + "kind": "number", + "type": { + "$ref": "672" + }, + "value": 2 + }, + "redundancyFactor": { + "$id": "2443", + "kind": "number", + "type": { + "$ref": "676" + }, + "value": 2 + }, + "workers": { + "$id": "2444", + "kind": "number", + "type": { + "$ref": "680" + }, + "value": 2 + } + } + }, + "frontend": { + "$id": "2445", + "kind": "model", + "type": { + "$ref": "686" + }, + "value": { + "$id": "2446", + "replicas": { + "$id": "2447", + "kind": "number", + "type": { + "$ref": "688" + }, + "value": 2 + }, + "workers": { + "$id": "2448", + "kind": "number", + "type": { + "$ref": "692" + }, + "value": 2 + } + } + } + } + }, + "diskBackedMessageBuffer": { + "$id": "2449", + "kind": "model", + "type": { + "$ref": "761" + }, + "value": { + "$id": "2450", + "maxSize": { + "$id": "2451", + "kind": "string", + "type": { + "$ref": "763" + }, + "value": "50M" + } + } + }, + "generateResourceLimits": { + "$id": "2452", + "kind": "model", + "type": { + "$ref": "872" + }, + "value": { + "$id": "2453", + "cpu": { + "$id": "2454", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Enabled" + } + } + }, + "memoryProfile": { + "$id": "2455", + "kind": "string", + "type": { + "$ref": "114" + }, + "value": "Medium" + }, + "provisioningState": { + "$id": "2456", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Succeeded" + } + } + }, + "extendedLocation": { + "$id": "2457", + "kind": "model", + "type": { + "$ref": "510" + }, + "value": { + "$id": "2458", + "name": { + "$id": "2459", + "kind": "string", + "type": { + "$ref": "512" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "2460", + "kind": "string", + "type": { + "$ref": "44" + }, + "value": "CustomLocation" + } + } + }, + "id": { + "$id": "2461", + "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": "2462", + "kind": "string", + "type": { + "$ref": "424" + }, + "value": "llptmlifnqqwairx" + }, + "type": { + "$id": "2463", + "kind": "string", + "type": { + "$ref": "428" + }, + "value": "qwrfzxjfxvismlqvigot" + }, + "systemData": { + "$id": "2464", + "kind": "model", + "type": { + "$ref": "433" + }, + "value": { + "$id": "2465", + "createdBy": { + "$id": "2466", + "kind": "string", + "type": { + "$ref": "435" + }, + "value": "ssvaslsmudloholronopqyxjcu" + }, + "createdByType": { + "$id": "2467", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "createdAt": { + "$id": "2468", + "kind": "string", + "type": { + "$ref": "442" + }, + "value": "2024-08-09T18:13:29.389Z" + }, + "lastModifiedBy": { + "$id": "2469", + "kind": "string", + "type": { + "$ref": "447" + }, + "value": "gnicpuszwd" + }, + "lastModifiedByType": { + "$id": "2470", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "2471", + "kind": "string", + "type": { + "$ref": "454" + }, + "value": "2024-08-09T18:13:29.389Z" + } + } + } + } + } + }, + { + "$id": "2472", + "response": { + "$ref": "2388" + }, + "statusCode": 201, + "bodyValue": { + "$id": "2473", + "kind": "model", + "type": { + "$ref": "599" + }, + "value": { + "$id": "2474", + "properties": { + "$id": "2475", + "kind": "model", + "type": { + "$ref": "602" + }, + "value": { + "$id": "2476", + "cardinality": { + "$id": "2477", + "kind": "model", + "type": { + "$ref": "668" + }, + "value": { + "$id": "2478", + "backendChain": { + "$id": "2479", + "kind": "model", + "type": { + "$ref": "670" + }, + "value": { + "$id": "2480", + "partitions": { + "$id": "2481", + "kind": "number", + "type": { + "$ref": "672" + }, + "value": 2 + }, + "redundancyFactor": { + "$id": "2482", + "kind": "number", + "type": { + "$ref": "676" + }, + "value": 2 + }, + "workers": { + "$id": "2483", + "kind": "number", + "type": { + "$ref": "680" + }, + "value": 2 + } + } + }, + "frontend": { + "$id": "2484", + "kind": "model", + "type": { + "$ref": "686" + }, + "value": { + "$id": "2485", + "replicas": { + "$id": "2486", + "kind": "number", + "type": { + "$ref": "688" + }, + "value": 2 + }, + "workers": { + "$id": "2487", + "kind": "number", + "type": { + "$ref": "692" + }, + "value": 2 + } + } + } + } + }, + "diskBackedMessageBuffer": { + "$id": "2488", + "kind": "model", + "type": { + "$ref": "761" + }, + "value": { + "$id": "2489", + "maxSize": { + "$id": "2490", + "kind": "string", + "type": { + "$ref": "763" + }, + "value": "50M" + } + } + }, + "generateResourceLimits": { + "$id": "2491", + "kind": "model", + "type": { + "$ref": "872" + }, + "value": { + "$id": "2492", + "cpu": { + "$id": "2493", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Enabled" + } + } + }, + "memoryProfile": { + "$id": "2494", + "kind": "string", + "type": { + "$ref": "114" + }, + "value": "Medium" + }, + "provisioningState": { + "$id": "2495", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Accepted" + } + } + }, + "extendedLocation": { + "$id": "2496", + "kind": "model", + "type": { + "$ref": "510" + }, + "value": { + "$id": "2497", + "name": { + "$id": "2498", + "kind": "string", + "type": { + "$ref": "512" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "2499", + "kind": "string", + "type": { + "$ref": "44" + }, + "value": "CustomLocation" + } + } + }, + "id": { + "$id": "2500", + "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": "2501", + "kind": "string", + "type": { + "$ref": "424" + }, + "value": "llptmlifnqqwairx" + }, + "type": { + "$id": "2502", + "kind": "string", + "type": { + "$ref": "428" + }, + "value": "qwrfzxjfxvismlqvigot" + }, + "systemData": { + "$id": "2503", + "kind": "model", + "type": { + "$ref": "433" + }, + "value": { + "$id": "2504", + "createdBy": { + "$id": "2505", + "kind": "string", + "type": { + "$ref": "435" + }, + "value": "ssvaslsmudloholronopqyxjcu" + }, + "createdByType": { + "$id": "2506", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "createdAt": { + "$id": "2507", + "kind": "string", + "type": { + "$ref": "442" + }, + "value": "2024-08-09T18:13:29.389Z" + }, + "lastModifiedBy": { + "$id": "2508", + "kind": "string", + "type": { + "$ref": "447" + }, + "value": "gnicpuszwd" + }, + "lastModifiedByType": { + "$id": "2509", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "2510", + "kind": "string", + "type": { + "$ref": "454" + }, + "value": "2024-08-09T18:13:29.389Z" + } + } + } + } + } + } + ] + }, + { + "$id": "2511", + "kind": "http", + "name": "Broker_CreateOrUpdate", + "description": "Broker_CreateOrUpdate", + "filePath": "2025-04-01/Broker_CreateOrUpdate_MaximumSet_Gen.json", + "parameters": [ + { + "$id": "2512", + "parameter": { + "$ref": "2367" + }, + "value": { + "$id": "2513", + "kind": "string", + "type": { + "$ref": "2368" + }, + "value": "2025-04-01" + } + }, + { + "$id": "2514", + "parameter": { + "$ref": "2371" + }, + "value": { + "$id": "2515", + "kind": "string", + "type": { + "$ref": "2372" + }, + "value": "F8C729F9-DF9C-4743-848F-96EE433D8E53" + } + }, + { + "$id": "2516", + "parameter": { + "$ref": "2374" + }, + "value": { + "$id": "2517", + "kind": "string", + "type": { + "$ref": "2375" + }, + "value": "rgiotoperations" + } + }, + { + "$id": "2518", + "parameter": { + "$ref": "2376" + }, + "value": { + "$id": "2519", + "kind": "string", + "type": { + "$ref": "2377" + }, + "value": "resource-name123" + } + }, + { + "$id": "2520", + "parameter": { + "$ref": "2378" + }, + "value": { + "$id": "2521", + "kind": "string", + "type": { + "$ref": "2379" + }, + "value": "resource-name123" + } + }, + { + "$id": "2522", + "parameter": { + "$ref": "2386" + }, + "value": { + "$id": "2523", + "kind": "model", + "type": { + "$ref": "599" + }, + "value": { + "$id": "2524", + "properties": { + "$id": "2525", + "kind": "model", + "type": { + "$ref": "602" + }, + "value": { + "$id": "2526", + "advanced": { + "$id": "2527", + "kind": "model", + "type": { + "$ref": "604" + }, + "value": { + "$id": "2528", + "clients": { + "$id": "2529", + "kind": "model", + "type": { + "$ref": "606" + }, + "value": { + "$id": "2530", + "maxSessionExpirySeconds": { + "$id": "2531", + "kind": "number", + "type": { + "$ref": "608" + }, + "value": 3859 + }, + "maxMessageExpirySeconds": { + "$id": "2532", + "kind": "number", + "type": { + "$ref": "612" + }, + "value": 3263 + }, + "maxPacketSizeBytes": { + "$id": "2533", + "kind": "number", + "type": { + "$ref": "616" + }, + "value": 3029 + }, + "subscriberQueueLimit": { + "$id": "2534", + "kind": "model", + "type": { + "$ref": "620" + }, + "value": { + "$id": "2535", + "length": { + "$id": "2536", + "kind": "number", + "type": { + "$ref": "622" + }, + "value": 6 + }, + "strategy": { + "$id": "2537", + "kind": "string", + "type": { + "$ref": "76" + }, + "value": "None" + } + } + }, + "maxReceiveMaximum": { + "$id": "2538", + "kind": "number", + "type": { + "$ref": "631" + }, + "value": 2365 + }, + "maxKeepAliveSeconds": { + "$id": "2539", + "kind": "number", + "type": { + "$ref": "635" + }, + "value": 3744 + } + } + }, + "encryptInternalTraffic": { + "$id": "2540", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Enabled" + }, + "internalCerts": { + "$id": "2541", + "kind": "model", + "type": { + "$ref": "644" + }, + "value": { + "$id": "2542", + "duration": { + "$id": "2543", + "kind": "string", + "type": { + "$ref": "646" + }, + "value": "bchrc" + }, + "renewBefore": { + "$id": "2544", + "kind": "string", + "type": { + "$ref": "650" + }, + "value": "xkafmpgjfifkwwrhkswtopdnne" + }, + "privateKey": { + "$id": "2545", + "kind": "model", + "type": { + "$ref": "654" + }, + "value": { + "$id": "2546", + "algorithm": { + "$id": "2547", + "kind": "string", + "type": { + "$ref": "82" + }, + "value": "Ec256" + }, + "rotationPolicy": { + "$id": "2548", + "kind": "string", + "type": { + "$ref": "98" + }, + "value": "Always" + } + } + } + } + } + } + }, + "cardinality": { + "$id": "2549", + "kind": "model", + "type": { + "$ref": "668" + }, + "value": { + "$id": "2550", + "backendChain": { + "$id": "2551", + "kind": "model", + "type": { + "$ref": "670" + }, + "value": { + "$id": "2552", + "partitions": { + "$id": "2553", + "kind": "number", + "type": { + "$ref": "672" + }, + "value": 11 + }, + "redundancyFactor": { + "$id": "2554", + "kind": "number", + "type": { + "$ref": "676" + }, + "value": 5 + }, + "workers": { + "$id": "2555", + "kind": "number", + "type": { + "$ref": "680" + }, + "value": 15 + } + } + }, + "frontend": { + "$id": "2556", + "kind": "model", + "type": { + "$ref": "686" + }, + "value": { + "$id": "2557", + "replicas": { + "$id": "2558", + "kind": "number", + "type": { + "$ref": "688" + }, + "value": 2 + }, + "workers": { + "$id": "2559", + "kind": "number", + "type": { + "$ref": "692" + }, + "value": 6 + } + } + } + } + }, + "diagnostics": { + "$id": "2560", + "kind": "model", + "type": { + "$ref": "700" + }, + "value": { + "$id": "2561", + "logs": { + "$id": "2562", + "kind": "model", + "type": { + "$ref": "702" + }, + "value": { + "$id": "2563", + "level": { + "$id": "2564", + "kind": "string", + "type": { + "$ref": "704" + }, + "value": "rnmwokumdmebpmfxxxzvvjfdywotav" + } + } + }, + "metrics": { + "$id": "2565", + "kind": "model", + "type": { + "$ref": "710" + }, + "value": { + "$id": "2566", + "prometheusPort": { + "$id": "2567", + "kind": "number", + "type": { + "$ref": "712" + }, + "value": 7581 + } + } + }, + "selfCheck": { + "$id": "2568", + "kind": "model", + "type": { + "$ref": "718" + }, + "value": { + "$id": "2569", + "mode": { + "$id": "2570", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Enabled" + }, + "intervalSeconds": { + "$id": "2571", + "kind": "number", + "type": { + "$ref": "723" + }, + "value": 158 + }, + "timeoutSeconds": { + "$id": "2572", + "kind": "number", + "type": { + "$ref": "727" + }, + "value": 14 + } + } + }, + "traces": { + "$id": "2573", + "kind": "model", + "type": { + "$ref": "733" + }, + "value": { + "$id": "2574", + "mode": { + "$id": "2575", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Enabled" + }, + "cacheSizeMegabytes": { + "$id": "2576", + "kind": "number", + "type": { + "$ref": "738" + }, + "value": 28 + }, + "selfTracing": { + "$id": "2577", + "kind": "model", + "type": { + "$ref": "742" + }, + "value": { + "$id": "2578", + "mode": { + "$id": "2579", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Enabled" + }, + "intervalSeconds": { + "$id": "2580", + "kind": "number", + "type": { + "$ref": "747" + }, + "value": 22 + } + } + }, + "spanChannelCapacity": { + "$id": "2581", + "kind": "number", + "type": { + "$ref": "753" + }, + "value": 1000 + } + } + } + } + }, + "diskBackedMessageBuffer": { + "$id": "2582", + "kind": "model", + "type": { + "$ref": "761" + }, + "value": { + "$id": "2583", + "maxSize": { + "$id": "2584", + "kind": "string", + "type": { + "$ref": "763" + }, + "value": "500M" + }, + "ephemeralVolumeClaimSpec": { + "$id": "2585", + "kind": "model", + "type": { + "$ref": "767" + }, + "value": { + "$id": "2586", + "volumeName": { + "$id": "2587", + "kind": "string", + "type": { + "$ref": "769" + }, + "value": "c" + }, + "volumeMode": { + "$id": "2588", + "kind": "string", + "type": { + "$ref": "773" + }, + "value": "rxvpksjuuugqnqzeiprocknbn" + }, + "storageClassName": { + "$id": "2589", + "kind": "string", + "type": { + "$ref": "777" + }, + "value": "sseyhrjptkhrqvpdpjmornkqvon" + }, + "accessModes": { + "$id": "2590", + "kind": "array", + "type": { + "$ref": "781" + }, + "value": [ + { + "$id": "2591", + "kind": "string", + "type": { + "$ref": "782" + }, + "value": "nuluhigrbb" + } + ] + }, + "dataSource": { + "$id": "2592", + "kind": "model", + "type": { + "$ref": "786" + }, + "value": { + "$id": "2593", + "apiGroup": { + "$id": "2594", + "kind": "string", + "type": { + "$ref": "788" + }, + "value": "npqapyksvvpkohujx" + }, + "kind": { + "$id": "2595", + "kind": "string", + "type": { + "$ref": "792" + }, + "value": "wazgyb" + }, + "name": { + "$id": "2596", + "kind": "string", + "type": { + "$ref": "796" + }, + "value": "cwhsgxxcxsyppoefm" + } + } + }, + "dataSourceRef": { + "$id": "2597", + "kind": "model", + "type": { + "$ref": "802" + }, + "value": { + "$id": "2598", + "apiGroup": { + "$id": "2599", + "kind": "string", + "type": { + "$ref": "804" + }, + "value": "mnfnykznjjsoqpfsgdqioupt" + }, + "kind": { + "$id": "2600", + "kind": "string", + "type": { + "$ref": "808" + }, + "value": "odynqzekfzsnawrctaxg" + }, + "name": { + "$id": "2601", + "kind": "string", + "type": { + "$ref": "812" + }, + "value": "envszivbbmixbyddzg" + }, + "namespace": { + "$id": "2602", + "kind": "string", + "type": { + "$ref": "816" + }, + "value": "etcfzvxqd" + } + } + }, + "resources": { + "$id": "2603", + "kind": "model", + "type": { + "$ref": "822" + }, + "value": { + "$id": "2604", + "limits": { + "$id": "2605", + "kind": "dict", + "type": { + "$ref": "824" + }, + "value": { + "$id": "2606", + "key2719": { + "$id": "2607", + "kind": "string", + "type": { + "$ref": "826" + }, + "value": "hmphcrgctu" + } + } + }, + "requests": { + "$id": "2608", + "kind": "dict", + "type": { + "$ref": "830" + }, + "value": { + "$id": "2609", + "key2909": { + "$id": "2610", + "kind": "string", + "type": { + "$ref": "832" + }, + "value": "txocprnyrsgvhfrg" + } + } + } + } + }, + "selector": { + "$id": "2611", + "kind": "model", + "type": { + "$ref": "838" + }, + "value": { + "$id": "2612", + "matchExpressions": { + "$id": "2613", + "kind": "array", + "type": { + "$ref": "840" + }, + "value": [ + { + "$id": "2614", + "kind": "model", + "type": { + "$ref": "841" + }, + "value": { + "$id": "2615", + "key": { + "$id": "2616", + "kind": "string", + "type": { + "$ref": "843" + }, + "value": "e" + }, + "operator": { + "$id": "2617", + "kind": "string", + "type": { + "$ref": "104" + }, + "value": "In" + }, + "values": { + "$id": "2618", + "kind": "array", + "type": { + "$ref": "850" + }, + "value": [ + { + "$id": "2619", + "kind": "string", + "type": { + "$ref": "851" + }, + "value": "slmpajlywqvuyknipgztsonqyybt" + } + ] + } + } + } + ] + }, + "matchLabels": { + "$id": "2620", + "kind": "dict", + "type": { + "$ref": "857" + }, + "value": { + "$id": "2621", + "key6673": { + "$id": "2622", + "kind": "string", + "type": { + "$ref": "859" + }, + "value": "wlngfalznwxnurzpgxomcxhbqefpr" + } + } + } + } + } + } + }, + "persistentVolumeClaimSpec": { + "$id": "2623", + "kind": "model", + "type": { + "$ref": "767" + }, + "value": { + "$id": "2624", + "volumeName": { + "$id": "2625", + "kind": "string", + "type": { + "$ref": "769" + }, + "value": "c" + }, + "volumeMode": { + "$id": "2626", + "kind": "string", + "type": { + "$ref": "773" + }, + "value": "rxvpksjuuugqnqzeiprocknbn" + }, + "storageClassName": { + "$id": "2627", + "kind": "string", + "type": { + "$ref": "777" + }, + "value": "sseyhrjptkhrqvpdpjmornkqvon" + }, + "accessModes": { + "$id": "2628", + "kind": "array", + "type": { + "$ref": "781" + }, + "value": [ + { + "$id": "2629", + "kind": "string", + "type": { + "$ref": "782" + }, + "value": "nuluhigrbb" + } + ] + }, + "dataSource": { + "$id": "2630", + "kind": "model", + "type": { + "$ref": "786" + }, + "value": { + "$id": "2631", + "apiGroup": { + "$id": "2632", + "kind": "string", + "type": { + "$ref": "788" + }, + "value": "npqapyksvvpkohujx" + }, + "kind": { + "$id": "2633", + "kind": "string", + "type": { + "$ref": "792" + }, + "value": "wazgyb" + }, + "name": { + "$id": "2634", + "kind": "string", + "type": { + "$ref": "796" + }, + "value": "cwhsgxxcxsyppoefm" + } + } + }, + "dataSourceRef": { + "$id": "2635", + "kind": "model", + "type": { + "$ref": "802" + }, + "value": { + "$id": "2636", + "apiGroup": { + "$id": "2637", + "kind": "string", + "type": { + "$ref": "804" + }, + "value": "mnfnykznjjsoqpfsgdqioupt" + }, + "kind": { + "$id": "2638", + "kind": "string", + "type": { + "$ref": "808" + }, + "value": "odynqzekfzsnawrctaxg" + }, + "name": { + "$id": "2639", + "kind": "string", + "type": { + "$ref": "812" + }, + "value": "envszivbbmixbyddzg" + }, + "namespace": { + "$id": "2640", + "kind": "string", + "type": { + "$ref": "816" + }, + "value": "etcfzvxqd" + } + } + }, + "resources": { + "$id": "2641", + "kind": "model", + "type": { + "$ref": "822" + }, + "value": { + "$id": "2642", + "limits": { + "$id": "2643", + "kind": "dict", + "type": { + "$ref": "824" + }, + "value": { + "$id": "2644", + "key2719": { + "$id": "2645", + "kind": "string", + "type": { + "$ref": "826" + }, + "value": "hmphcrgctu" + } + } + }, + "requests": { + "$id": "2646", + "kind": "dict", + "type": { + "$ref": "830" + }, + "value": { + "$id": "2647", + "key2909": { + "$id": "2648", + "kind": "string", + "type": { + "$ref": "832" + }, + "value": "txocprnyrsgvhfrg" + } + } + } + } + }, + "selector": { + "$id": "2649", + "kind": "model", + "type": { + "$ref": "838" + }, + "value": { + "$id": "2650", + "matchExpressions": { + "$id": "2651", + "kind": "array", + "type": { + "$ref": "840" + }, + "value": [ + { + "$id": "2652", + "kind": "model", + "type": { + "$ref": "841" + }, + "value": { + "$id": "2653", + "key": { + "$id": "2654", + "kind": "string", + "type": { + "$ref": "843" + }, + "value": "e" + }, + "operator": { + "$id": "2655", + "kind": "string", + "type": { + "$ref": "104" + }, + "value": "In" + }, + "values": { + "$id": "2656", + "kind": "array", + "type": { + "$ref": "850" + }, + "value": [ + { + "$id": "2657", + "kind": "string", + "type": { + "$ref": "851" + }, + "value": "slmpajlywqvuyknipgztsonqyybt" + } + ] + } + } + } + ] + }, + "matchLabels": { + "$id": "2658", + "kind": "dict", + "type": { + "$ref": "857" + }, + "value": { + "$id": "2659", + "key6673": { + "$id": "2660", + "kind": "string", + "type": { + "$ref": "859" + }, + "value": "wlngfalznwxnurzpgxomcxhbqefpr" + } + } + } + } + } + } + } + } + }, + "generateResourceLimits": { + "$id": "2661", + "kind": "model", + "type": { + "$ref": "872" + }, + "value": { + "$id": "2662", + "cpu": { + "$id": "2663", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Enabled" + } + } + }, + "memoryProfile": { + "$id": "2664", + "kind": "string", + "type": { + "$ref": "114" + }, + "value": "Tiny" + } + } + }, + "extendedLocation": { + "$id": "2665", + "kind": "model", + "type": { + "$ref": "510" + }, + "value": { + "$id": "2666", + "name": { + "$id": "2667", + "kind": "string", + "type": { + "$ref": "512" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "2668", + "kind": "string", + "type": { + "$ref": "44" + }, + "value": "CustomLocation" + } + } + } + } + } + } + ], + "responses": [ + { + "$id": "2669", + "response": { + "$ref": "2387" + }, + "statusCode": 200, + "bodyValue": { + "$id": "2670", + "kind": "model", + "type": { + "$ref": "599" + }, + "value": { + "$id": "2671", + "properties": { + "$id": "2672", + "kind": "model", + "type": { + "$ref": "602" + }, + "value": { + "$id": "2673", + "advanced": { + "$id": "2674", + "kind": "model", + "type": { + "$ref": "604" + }, + "value": { + "$id": "2675", + "clients": { + "$id": "2676", + "kind": "model", + "type": { + "$ref": "606" + }, + "value": { + "$id": "2677", + "maxSessionExpirySeconds": { + "$id": "2678", + "kind": "number", + "type": { + "$ref": "608" + }, + "value": 3859 + }, + "maxMessageExpirySeconds": { + "$id": "2679", + "kind": "number", + "type": { + "$ref": "612" + }, + "value": 3263 + }, + "maxPacketSizeBytes": { + "$id": "2680", + "kind": "number", + "type": { + "$ref": "616" + }, + "value": 3029 + }, + "subscriberQueueLimit": { + "$id": "2681", + "kind": "model", + "type": { + "$ref": "620" + }, + "value": { + "$id": "2682", + "length": { + "$id": "2683", + "kind": "number", + "type": { + "$ref": "622" + }, + "value": 6 + }, + "strategy": { + "$id": "2684", + "kind": "string", + "type": { + "$ref": "76" + }, + "value": "None" + } + } + }, + "maxReceiveMaximum": { + "$id": "2685", + "kind": "number", + "type": { + "$ref": "631" + }, + "value": 2365 + }, + "maxKeepAliveSeconds": { + "$id": "2686", + "kind": "number", + "type": { + "$ref": "635" + }, + "value": 3744 + } + } + }, + "encryptInternalTraffic": { + "$id": "2687", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Enabled" + }, + "internalCerts": { + "$id": "2688", + "kind": "model", + "type": { + "$ref": "644" + }, + "value": { + "$id": "2689", + "duration": { + "$id": "2690", + "kind": "string", + "type": { + "$ref": "646" + }, + "value": "bchrc" + }, + "renewBefore": { + "$id": "2691", + "kind": "string", + "type": { + "$ref": "650" + }, + "value": "xkafmpgjfifkwwrhkswtopdnne" + }, + "privateKey": { + "$id": "2692", + "kind": "model", + "type": { + "$ref": "654" + }, + "value": { + "$id": "2693", + "algorithm": { + "$id": "2694", + "kind": "string", + "type": { + "$ref": "82" + }, + "value": "Ec256" + }, + "rotationPolicy": { + "$id": "2695", + "kind": "string", + "type": { + "$ref": "98" + }, + "value": "Always" + } + } + } + } + } + } + }, + "cardinality": { + "$id": "2696", + "kind": "model", + "type": { + "$ref": "668" + }, + "value": { + "$id": "2697", + "backendChain": { + "$id": "2698", + "kind": "model", + "type": { + "$ref": "670" + }, + "value": { + "$id": "2699", + "partitions": { + "$id": "2700", + "kind": "number", + "type": { + "$ref": "672" + }, + "value": 11 + }, + "redundancyFactor": { + "$id": "2701", + "kind": "number", + "type": { + "$ref": "676" + }, + "value": 5 + }, + "workers": { + "$id": "2702", + "kind": "number", + "type": { + "$ref": "680" + }, + "value": 15 + } + } + }, + "frontend": { + "$id": "2703", + "kind": "model", + "type": { + "$ref": "686" + }, + "value": { + "$id": "2704", + "replicas": { + "$id": "2705", + "kind": "number", + "type": { + "$ref": "688" + }, + "value": 2 + }, + "workers": { + "$id": "2706", + "kind": "number", + "type": { + "$ref": "692" + }, + "value": 6 + } + } + } + } + }, + "diagnostics": { + "$id": "2707", + "kind": "model", + "type": { + "$ref": "700" + }, + "value": { + "$id": "2708", + "logs": { + "$id": "2709", + "kind": "model", + "type": { + "$ref": "702" + }, + "value": { + "$id": "2710", + "level": { + "$id": "2711", + "kind": "string", + "type": { + "$ref": "704" + }, + "value": "rnmwokumdmebpmfxxxzvvjfdywotav" + } + } + }, + "metrics": { + "$id": "2712", + "kind": "model", + "type": { + "$ref": "710" + }, + "value": { + "$id": "2713", + "prometheusPort": { + "$id": "2714", + "kind": "number", + "type": { + "$ref": "712" + }, + "value": 7581 + } + } + }, + "selfCheck": { + "$id": "2715", + "kind": "model", + "type": { + "$ref": "718" + }, + "value": { + "$id": "2716", + "mode": { + "$id": "2717", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Enabled" + }, + "intervalSeconds": { + "$id": "2718", + "kind": "number", + "type": { + "$ref": "723" + }, + "value": 158 + }, + "timeoutSeconds": { + "$id": "2719", + "kind": "number", + "type": { + "$ref": "727" + }, + "value": 14 + } + } + }, + "traces": { + "$id": "2720", + "kind": "model", + "type": { + "$ref": "733" + }, + "value": { + "$id": "2721", + "mode": { + "$id": "2722", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Enabled" + }, + "cacheSizeMegabytes": { + "$id": "2723", + "kind": "number", + "type": { + "$ref": "738" + }, + "value": 28 + }, + "selfTracing": { + "$id": "2724", + "kind": "model", + "type": { + "$ref": "742" + }, + "value": { + "$id": "2725", + "mode": { + "$id": "2726", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Enabled" + }, + "intervalSeconds": { + "$id": "2727", + "kind": "number", + "type": { + "$ref": "747" + }, + "value": 22 + } + } + }, + "spanChannelCapacity": { + "$id": "2728", + "kind": "number", + "type": { + "$ref": "753" + }, + "value": 1000 + } + } + } + } + }, + "diskBackedMessageBuffer": { + "$id": "2729", + "kind": "model", + "type": { + "$ref": "761" + }, + "value": { + "$id": "2730", + "maxSize": { + "$id": "2731", + "kind": "string", + "type": { + "$ref": "763" + }, + "value": "500M" + }, + "ephemeralVolumeClaimSpec": { + "$id": "2732", + "kind": "model", + "type": { + "$ref": "767" + }, + "value": { + "$id": "2733", + "volumeName": { + "$id": "2734", + "kind": "string", + "type": { + "$ref": "769" + }, + "value": "c" + }, + "volumeMode": { + "$id": "2735", + "kind": "string", + "type": { + "$ref": "773" + }, + "value": "rxvpksjuuugqnqzeiprocknbn" + }, + "storageClassName": { + "$id": "2736", + "kind": "string", + "type": { + "$ref": "777" + }, + "value": "sseyhrjptkhrqvpdpjmornkqvon" + }, + "accessModes": { + "$id": "2737", + "kind": "array", + "type": { + "$ref": "781" + }, + "value": [ + { + "$id": "2738", + "kind": "string", + "type": { + "$ref": "782" + }, + "value": "nuluhigrbb" + } + ] + }, + "dataSource": { + "$id": "2739", + "kind": "model", + "type": { + "$ref": "786" + }, + "value": { + "$id": "2740", + "apiGroup": { + "$id": "2741", + "kind": "string", + "type": { + "$ref": "788" + }, + "value": "npqapyksvvpkohujx" + }, + "kind": { + "$id": "2742", + "kind": "string", + "type": { + "$ref": "792" + }, + "value": "wazgyb" + }, + "name": { + "$id": "2743", + "kind": "string", + "type": { + "$ref": "796" + }, + "value": "cwhsgxxcxsyppoefm" + } + } + }, + "dataSourceRef": { + "$id": "2744", + "kind": "model", + "type": { + "$ref": "802" + }, + "value": { + "$id": "2745", + "apiGroup": { + "$id": "2746", + "kind": "string", + "type": { + "$ref": "804" + }, + "value": "mnfnykznjjsoqpfsgdqioupt" + }, + "kind": { + "$id": "2747", + "kind": "string", + "type": { + "$ref": "808" + }, + "value": "odynqzekfzsnawrctaxg" + }, + "name": { + "$id": "2748", + "kind": "string", + "type": { + "$ref": "812" + }, + "value": "envszivbbmixbyddzg" + }, + "namespace": { + "$id": "2749", + "kind": "string", + "type": { + "$ref": "816" + }, + "value": "etcfzvxqd" + } + } + }, + "resources": { + "$id": "2750", + "kind": "model", + "type": { + "$ref": "822" + }, + "value": { + "$id": "2751", + "limits": { + "$id": "2752", + "kind": "dict", + "type": { + "$ref": "824" + }, + "value": { + "$id": "2753", + "key2719": { + "$id": "2754", + "kind": "string", + "type": { + "$ref": "826" + }, + "value": "hmphcrgctu" + } + } + }, + "requests": { + "$id": "2755", + "kind": "dict", + "type": { + "$ref": "830" + }, + "value": { + "$id": "2756", + "key2909": { + "$id": "2757", + "kind": "string", + "type": { + "$ref": "832" + }, + "value": "txocprnyrsgvhfrg" + } + } + } + } + }, + "selector": { + "$id": "2758", + "kind": "model", + "type": { + "$ref": "838" + }, + "value": { + "$id": "2759", + "matchExpressions": { + "$id": "2760", + "kind": "array", + "type": { + "$ref": "840" + }, + "value": [ + { + "$id": "2761", + "kind": "model", + "type": { + "$ref": "841" + }, + "value": { + "$id": "2762", + "key": { + "$id": "2763", + "kind": "string", + "type": { + "$ref": "843" + }, + "value": "e" + }, + "operator": { + "$id": "2764", + "kind": "string", + "type": { + "$ref": "104" + }, + "value": "In" + }, + "values": { + "$id": "2765", + "kind": "array", + "type": { + "$ref": "850" + }, + "value": [ + { + "$id": "2766", + "kind": "string", + "type": { + "$ref": "851" + }, + "value": "slmpajlywqvuyknipgztsonqyybt" + } + ] + } + } + } + ] + }, + "matchLabels": { + "$id": "2767", + "kind": "dict", + "type": { + "$ref": "857" + }, + "value": { + "$id": "2768", + "key6673": { + "$id": "2769", + "kind": "string", + "type": { + "$ref": "859" + }, + "value": "wlngfalznwxnurzpgxomcxhbqefpr" + } + } + } + } + } + } + }, + "persistentVolumeClaimSpec": { + "$id": "2770", + "kind": "model", + "type": { + "$ref": "767" + }, + "value": { + "$id": "2771", + "volumeName": { + "$id": "2772", + "kind": "string", + "type": { + "$ref": "769" + }, + "value": "c" + }, + "volumeMode": { + "$id": "2773", + "kind": "string", + "type": { + "$ref": "773" + }, + "value": "rxvpksjuuugqnqzeiprocknbn" + }, + "storageClassName": { + "$id": "2774", + "kind": "string", + "type": { + "$ref": "777" + }, + "value": "sseyhrjptkhrqvpdpjmornkqvon" + }, + "accessModes": { + "$id": "2775", + "kind": "array", + "type": { + "$ref": "781" + }, + "value": [ + { + "$id": "2776", + "kind": "string", + "type": { + "$ref": "782" + }, + "value": "nuluhigrbb" + } + ] + }, + "dataSource": { + "$id": "2777", + "kind": "model", + "type": { + "$ref": "786" + }, + "value": { + "$id": "2778", + "apiGroup": { + "$id": "2779", + "kind": "string", + "type": { + "$ref": "788" + }, + "value": "npqapyksvvpkohujx" + }, + "kind": { + "$id": "2780", + "kind": "string", + "type": { + "$ref": "792" + }, + "value": "wazgyb" + }, + "name": { + "$id": "2781", + "kind": "string", + "type": { + "$ref": "796" + }, + "value": "cwhsgxxcxsyppoefm" + } + } + }, + "dataSourceRef": { + "$id": "2782", + "kind": "model", + "type": { + "$ref": "802" + }, + "value": { + "$id": "2783", + "apiGroup": { + "$id": "2784", + "kind": "string", + "type": { + "$ref": "804" + }, + "value": "mnfnykznjjsoqpfsgdqioupt" + }, + "kind": { + "$id": "2785", + "kind": "string", + "type": { + "$ref": "808" + }, + "value": "odynqzekfzsnawrctaxg" + }, + "name": { + "$id": "2786", + "kind": "string", + "type": { + "$ref": "812" + }, + "value": "envszivbbmixbyddzg" + }, + "namespace": { + "$id": "2787", + "kind": "string", + "type": { + "$ref": "816" + }, + "value": "etcfzvxqd" + } + } + }, + "resources": { + "$id": "2788", + "kind": "model", + "type": { + "$ref": "822" + }, + "value": { + "$id": "2789", + "limits": { + "$id": "2790", + "kind": "dict", + "type": { + "$ref": "824" + }, + "value": { + "$id": "2791", + "key2719": { + "$id": "2792", + "kind": "string", + "type": { + "$ref": "826" + }, + "value": "hmphcrgctu" + } + } + }, + "requests": { + "$id": "2793", + "kind": "dict", + "type": { + "$ref": "830" + }, + "value": { + "$id": "2794", + "key2909": { + "$id": "2795", + "kind": "string", + "type": { + "$ref": "832" + }, + "value": "txocprnyrsgvhfrg" + } + } + } + } + }, + "selector": { + "$id": "2796", + "kind": "model", + "type": { + "$ref": "838" + }, + "value": { + "$id": "2797", + "matchExpressions": { + "$id": "2798", + "kind": "array", + "type": { + "$ref": "840" + }, + "value": [ + { + "$id": "2799", + "kind": "model", + "type": { + "$ref": "841" + }, + "value": { + "$id": "2800", + "key": { + "$id": "2801", + "kind": "string", + "type": { + "$ref": "843" + }, + "value": "e" + }, + "operator": { + "$id": "2802", + "kind": "string", + "type": { + "$ref": "104" + }, + "value": "In" + }, + "values": { + "$id": "2803", + "kind": "array", + "type": { + "$ref": "850" + }, + "value": [ + { + "$id": "2804", + "kind": "string", + "type": { + "$ref": "851" + }, + "value": "slmpajlywqvuyknipgztsonqyybt" + } + ] + } + } + } + ] + }, + "matchLabels": { + "$id": "2805", + "kind": "dict", + "type": { + "$ref": "857" + }, + "value": { + "$id": "2806", + "key6673": { + "$id": "2807", + "kind": "string", + "type": { + "$ref": "859" + }, + "value": "wlngfalznwxnurzpgxomcxhbqefpr" + } + } + } + } + } + } + } + } + }, + "generateResourceLimits": { + "$id": "2808", + "kind": "model", + "type": { + "$ref": "872" + }, + "value": { + "$id": "2809", + "cpu": { + "$id": "2810", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Enabled" + } + } + }, + "memoryProfile": { + "$id": "2811", + "kind": "string", + "type": { + "$ref": "114" + }, + "value": "Tiny" + }, + "provisioningState": { + "$id": "2812", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Succeeded" + } + } + }, + "extendedLocation": { + "$id": "2813", + "kind": "model", + "type": { + "$ref": "510" + }, + "value": { + "$id": "2814", + "name": { + "$id": "2815", + "kind": "string", + "type": { + "$ref": "512" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "2816", + "kind": "string", + "type": { + "$ref": "44" + }, + "value": "CustomLocation" + } + } + }, + "id": { + "$id": "2817", + "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": "2818", + "kind": "string", + "type": { + "$ref": "424" + }, + "value": "dowrkel" + }, + "type": { + "$id": "2819", + "kind": "string", + "type": { + "$ref": "428" + }, + "value": "xshjnsdgadygb" + }, + "systemData": { + "$id": "2820", + "kind": "model", + "type": { + "$ref": "433" + }, + "value": { + "$id": "2821", + "createdBy": { + "$id": "2822", + "kind": "string", + "type": { + "$ref": "435" + }, + "value": "ssvaslsmudloholronopqyxjcu" + }, + "createdByType": { + "$id": "2823", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "createdAt": { + "$id": "2824", + "kind": "string", + "type": { + "$ref": "442" + }, + "value": "2024-08-09T18:13:29.389Z" + }, + "lastModifiedBy": { + "$id": "2825", + "kind": "string", + "type": { + "$ref": "447" + }, + "value": "gnicpuszwd" + }, + "lastModifiedByType": { + "$id": "2826", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "2827", + "kind": "string", + "type": { + "$ref": "454" + }, + "value": "2024-08-09T18:13:29.389Z" + } + } + } + } + } + }, + { + "$id": "2828", + "response": { + "$ref": "2388" + }, + "statusCode": 201, + "bodyValue": { + "$id": "2829", + "kind": "model", + "type": { + "$ref": "599" + }, + "value": { + "$id": "2830", + "properties": { + "$id": "2831", + "kind": "model", + "type": { + "$ref": "602" + }, + "value": { + "$id": "2832", + "advanced": { + "$id": "2833", + "kind": "model", + "type": { + "$ref": "604" + }, + "value": { + "$id": "2834", + "clients": { + "$id": "2835", + "kind": "model", + "type": { + "$ref": "606" + }, + "value": { + "$id": "2836", + "maxSessionExpirySeconds": { + "$id": "2837", + "kind": "number", + "type": { + "$ref": "608" + }, + "value": 3859 + }, + "maxMessageExpirySeconds": { + "$id": "2838", + "kind": "number", + "type": { + "$ref": "612" + }, + "value": 3263 + }, + "maxPacketSizeBytes": { + "$id": "2839", + "kind": "number", + "type": { + "$ref": "616" + }, + "value": 3029 + }, + "subscriberQueueLimit": { + "$id": "2840", + "kind": "model", + "type": { + "$ref": "620" + }, + "value": { + "$id": "2841", + "length": { + "$id": "2842", + "kind": "number", + "type": { + "$ref": "622" + }, + "value": 6 + }, + "strategy": { + "$id": "2843", + "kind": "string", + "type": { + "$ref": "76" + }, + "value": "None" + } + } + }, + "maxReceiveMaximum": { + "$id": "2844", + "kind": "number", + "type": { + "$ref": "631" + }, + "value": 2365 + }, + "maxKeepAliveSeconds": { + "$id": "2845", + "kind": "number", + "type": { + "$ref": "635" + }, + "value": 3744 + } + } + }, + "encryptInternalTraffic": { + "$id": "2846", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Enabled" + }, + "internalCerts": { + "$id": "2847", + "kind": "model", + "type": { + "$ref": "644" + }, + "value": { + "$id": "2848", + "duration": { + "$id": "2849", + "kind": "string", + "type": { + "$ref": "646" + }, + "value": "bchrc" + }, + "renewBefore": { + "$id": "2850", + "kind": "string", + "type": { + "$ref": "650" + }, + "value": "xkafmpgjfifkwwrhkswtopdnne" + }, + "privateKey": { + "$id": "2851", + "kind": "model", + "type": { + "$ref": "654" + }, + "value": { + "$id": "2852", + "algorithm": { + "$id": "2853", + "kind": "string", + "type": { + "$ref": "82" + }, + "value": "Ec256" + }, + "rotationPolicy": { + "$id": "2854", + "kind": "string", + "type": { + "$ref": "98" + }, + "value": "Always" + } + } + } + } + } + } + }, + "cardinality": { + "$id": "2855", + "kind": "model", + "type": { + "$ref": "668" + }, + "value": { + "$id": "2856", + "backendChain": { + "$id": "2857", + "kind": "model", + "type": { + "$ref": "670" + }, + "value": { + "$id": "2858", + "partitions": { + "$id": "2859", + "kind": "number", + "type": { + "$ref": "672" + }, + "value": 11 + }, + "redundancyFactor": { + "$id": "2860", + "kind": "number", + "type": { + "$ref": "676" + }, + "value": 5 + }, + "workers": { + "$id": "2861", + "kind": "number", + "type": { + "$ref": "680" + }, + "value": 15 + } + } + }, + "frontend": { + "$id": "2862", + "kind": "model", + "type": { + "$ref": "686" + }, + "value": { + "$id": "2863", + "replicas": { + "$id": "2864", + "kind": "number", + "type": { + "$ref": "688" + }, + "value": 2 + }, + "workers": { + "$id": "2865", + "kind": "number", + "type": { + "$ref": "692" + }, + "value": 6 + } + } + } + } + }, + "diagnostics": { + "$id": "2866", + "kind": "model", + "type": { + "$ref": "700" + }, + "value": { + "$id": "2867", + "logs": { + "$id": "2868", + "kind": "model", + "type": { + "$ref": "702" + }, + "value": { + "$id": "2869", + "level": { + "$id": "2870", + "kind": "string", + "type": { + "$ref": "704" + }, + "value": "rnmwokumdmebpmfxxxzvvjfdywotav" + } + } + }, + "metrics": { + "$id": "2871", + "kind": "model", + "type": { + "$ref": "710" + }, + "value": { + "$id": "2872", + "prometheusPort": { + "$id": "2873", + "kind": "number", + "type": { + "$ref": "712" + }, + "value": 7581 + } + } + }, + "selfCheck": { + "$id": "2874", + "kind": "model", + "type": { + "$ref": "718" + }, + "value": { + "$id": "2875", + "mode": { + "$id": "2876", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Enabled" + }, + "intervalSeconds": { + "$id": "2877", + "kind": "number", + "type": { + "$ref": "723" + }, + "value": 158 + }, + "timeoutSeconds": { + "$id": "2878", + "kind": "number", + "type": { + "$ref": "727" + }, + "value": 14 + } + } + }, + "traces": { + "$id": "2879", + "kind": "model", + "type": { + "$ref": "733" + }, + "value": { + "$id": "2880", + "mode": { + "$id": "2881", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Enabled" + }, + "cacheSizeMegabytes": { + "$id": "2882", + "kind": "number", + "type": { + "$ref": "738" + }, + "value": 28 + }, + "selfTracing": { + "$id": "2883", + "kind": "model", + "type": { + "$ref": "742" + }, + "value": { + "$id": "2884", + "mode": { + "$id": "2885", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Enabled" + }, + "intervalSeconds": { + "$id": "2886", + "kind": "number", + "type": { + "$ref": "747" + }, + "value": 22 + } + } + }, + "spanChannelCapacity": { + "$id": "2887", + "kind": "number", + "type": { + "$ref": "753" + }, + "value": 1000 + } + } + } + } + }, + "diskBackedMessageBuffer": { + "$id": "2888", + "kind": "model", + "type": { + "$ref": "761" + }, + "value": { + "$id": "2889", + "maxSize": { + "$id": "2890", + "kind": "string", + "type": { + "$ref": "763" + }, + "value": "500M" + }, + "ephemeralVolumeClaimSpec": { + "$id": "2891", + "kind": "model", + "type": { + "$ref": "767" + }, + "value": { + "$id": "2892", + "volumeName": { + "$id": "2893", + "kind": "string", + "type": { + "$ref": "769" + }, + "value": "c" + }, + "volumeMode": { + "$id": "2894", + "kind": "string", + "type": { + "$ref": "773" + }, + "value": "rxvpksjuuugqnqzeiprocknbn" + }, + "storageClassName": { + "$id": "2895", + "kind": "string", + "type": { + "$ref": "777" + }, + "value": "sseyhrjptkhrqvpdpjmornkqvon" + }, + "accessModes": { + "$id": "2896", + "kind": "array", + "type": { + "$ref": "781" + }, + "value": [ + { + "$id": "2897", + "kind": "string", + "type": { + "$ref": "782" + }, + "value": "nuluhigrbb" + } + ] + }, + "dataSource": { + "$id": "2898", + "kind": "model", + "type": { + "$ref": "786" + }, + "value": { + "$id": "2899", + "apiGroup": { + "$id": "2900", + "kind": "string", + "type": { + "$ref": "788" + }, + "value": "npqapyksvvpkohujx" + }, + "kind": { + "$id": "2901", + "kind": "string", + "type": { + "$ref": "792" + }, + "value": "wazgyb" + }, + "name": { + "$id": "2902", + "kind": "string", + "type": { + "$ref": "796" + }, + "value": "cwhsgxxcxsyppoefm" + } + } + }, + "dataSourceRef": { + "$id": "2903", + "kind": "model", + "type": { + "$ref": "802" + }, + "value": { + "$id": "2904", + "apiGroup": { + "$id": "2905", + "kind": "string", + "type": { + "$ref": "804" + }, + "value": "mnfnykznjjsoqpfsgdqioupt" + }, + "kind": { + "$id": "2906", + "kind": "string", + "type": { + "$ref": "808" + }, + "value": "odynqzekfzsnawrctaxg" + }, + "name": { + "$id": "2907", + "kind": "string", + "type": { + "$ref": "812" + }, + "value": "envszivbbmixbyddzg" + }, + "namespace": { + "$id": "2908", + "kind": "string", + "type": { + "$ref": "816" + }, + "value": "etcfzvxqd" + } + } + }, + "resources": { + "$id": "2909", + "kind": "model", + "type": { + "$ref": "822" + }, + "value": { + "$id": "2910", + "limits": { + "$id": "2911", + "kind": "dict", + "type": { + "$ref": "824" + }, + "value": { + "$id": "2912", + "key2719": { + "$id": "2913", + "kind": "string", + "type": { + "$ref": "826" + }, + "value": "hmphcrgctu" + } + } + }, + "requests": { + "$id": "2914", + "kind": "dict", + "type": { + "$ref": "830" + }, + "value": { + "$id": "2915", + "key2909": { + "$id": "2916", + "kind": "string", + "type": { + "$ref": "832" + }, + "value": "txocprnyrsgvhfrg" + } + } + } + } + }, + "selector": { + "$id": "2917", + "kind": "model", + "type": { + "$ref": "838" + }, + "value": { + "$id": "2918", + "matchExpressions": { + "$id": "2919", + "kind": "array", + "type": { + "$ref": "840" + }, + "value": [ + { + "$id": "2920", + "kind": "model", + "type": { + "$ref": "841" + }, + "value": { + "$id": "2921", + "key": { + "$id": "2922", + "kind": "string", + "type": { + "$ref": "843" + }, + "value": "e" + }, + "operator": { + "$id": "2923", + "kind": "string", + "type": { + "$ref": "104" + }, + "value": "In" + }, + "values": { + "$id": "2924", + "kind": "array", + "type": { + "$ref": "850" + }, + "value": [ + { + "$id": "2925", + "kind": "string", + "type": { + "$ref": "851" + }, + "value": "slmpajlywqvuyknipgztsonqyybt" + } + ] + } + } + } + ] + }, + "matchLabels": { + "$id": "2926", + "kind": "dict", + "type": { + "$ref": "857" + }, + "value": { + "$id": "2927", + "key6673": { + "$id": "2928", + "kind": "string", + "type": { + "$ref": "859" + }, + "value": "wlngfalznwxnurzpgxomcxhbqefpr" + } + } + } + } + } + } + }, + "persistentVolumeClaimSpec": { + "$id": "2929", + "kind": "model", + "type": { + "$ref": "767" + }, + "value": { + "$id": "2930", + "volumeName": { + "$id": "2931", + "kind": "string", + "type": { + "$ref": "769" + }, + "value": "c" + }, + "volumeMode": { + "$id": "2932", + "kind": "string", + "type": { + "$ref": "773" + }, + "value": "rxvpksjuuugqnqzeiprocknbn" + }, + "storageClassName": { + "$id": "2933", + "kind": "string", + "type": { + "$ref": "777" + }, + "value": "sseyhrjptkhrqvpdpjmornkqvon" + }, + "accessModes": { + "$id": "2934", + "kind": "array", + "type": { + "$ref": "781" + }, + "value": [ + { + "$id": "2935", + "kind": "string", + "type": { + "$ref": "782" + }, + "value": "nuluhigrbb" + } + ] + }, + "dataSource": { + "$id": "2936", + "kind": "model", + "type": { + "$ref": "786" + }, + "value": { + "$id": "2937", + "apiGroup": { + "$id": "2938", + "kind": "string", + "type": { + "$ref": "788" + }, + "value": "npqapyksvvpkohujx" + }, + "kind": { + "$id": "2939", + "kind": "string", + "type": { + "$ref": "792" + }, + "value": "wazgyb" + }, + "name": { + "$id": "2940", + "kind": "string", + "type": { + "$ref": "796" + }, + "value": "cwhsgxxcxsyppoefm" + } + } + }, + "dataSourceRef": { + "$id": "2941", + "kind": "model", + "type": { + "$ref": "802" + }, + "value": { + "$id": "2942", + "apiGroup": { + "$id": "2943", + "kind": "string", + "type": { + "$ref": "804" + }, + "value": "mnfnykznjjsoqpfsgdqioupt" + }, + "kind": { + "$id": "2944", + "kind": "string", + "type": { + "$ref": "808" + }, + "value": "odynqzekfzsnawrctaxg" + }, + "name": { + "$id": "2945", + "kind": "string", + "type": { + "$ref": "812" + }, + "value": "envszivbbmixbyddzg" + }, + "namespace": { + "$id": "2946", + "kind": "string", + "type": { + "$ref": "816" + }, + "value": "etcfzvxqd" + } + } + }, + "resources": { + "$id": "2947", + "kind": "model", + "type": { + "$ref": "822" + }, + "value": { + "$id": "2948", + "limits": { + "$id": "2949", + "kind": "dict", + "type": { + "$ref": "824" + }, + "value": { + "$id": "2950", + "key2719": { + "$id": "2951", + "kind": "string", + "type": { + "$ref": "826" + }, + "value": "hmphcrgctu" + } + } + }, + "requests": { + "$id": "2952", + "kind": "dict", + "type": { + "$ref": "830" + }, + "value": { + "$id": "2953", + "key2909": { + "$id": "2954", + "kind": "string", + "type": { + "$ref": "832" + }, + "value": "txocprnyrsgvhfrg" + } + } + } + } + }, + "selector": { + "$id": "2955", + "kind": "model", + "type": { + "$ref": "838" + }, + "value": { + "$id": "2956", + "matchExpressions": { + "$id": "2957", + "kind": "array", + "type": { + "$ref": "840" + }, + "value": [ + { + "$id": "2958", + "kind": "model", + "type": { + "$ref": "841" + }, + "value": { + "$id": "2959", + "key": { + "$id": "2960", + "kind": "string", + "type": { + "$ref": "843" + }, + "value": "e" + }, + "operator": { + "$id": "2961", + "kind": "string", + "type": { + "$ref": "104" + }, + "value": "In" + }, + "values": { + "$id": "2962", + "kind": "array", + "type": { + "$ref": "850" + }, + "value": [ + { + "$id": "2963", + "kind": "string", + "type": { + "$ref": "851" + }, + "value": "slmpajlywqvuyknipgztsonqyybt" + } + ] + } + } + } + ] + }, + "matchLabels": { + "$id": "2964", + "kind": "dict", + "type": { + "$ref": "857" + }, + "value": { + "$id": "2965", + "key6673": { + "$id": "2966", + "kind": "string", + "type": { + "$ref": "859" + }, + "value": "wlngfalznwxnurzpgxomcxhbqefpr" + } + } + } + } + } + } + } + } + }, + "generateResourceLimits": { + "$id": "2967", + "kind": "model", + "type": { + "$ref": "872" + }, + "value": { + "$id": "2968", + "cpu": { + "$id": "2969", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Enabled" + } + } + }, + "memoryProfile": { + "$id": "2970", + "kind": "string", + "type": { + "$ref": "114" + }, + "value": "Tiny" + }, + "provisioningState": { + "$id": "2971", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Succeeded" + } + } + }, + "extendedLocation": { + "$id": "2972", + "kind": "model", + "type": { + "$ref": "510" + }, + "value": { + "$id": "2973", + "name": { + "$id": "2974", + "kind": "string", + "type": { + "$ref": "512" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "2975", + "kind": "string", + "type": { + "$ref": "44" + }, + "value": "CustomLocation" + } + } + }, + "id": { + "$id": "2976", + "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": "2977", + "kind": "string", + "type": { + "$ref": "424" + }, + "value": "dowrkel" + }, + "type": { + "$id": "2978", + "kind": "string", + "type": { + "$ref": "428" + }, + "value": "xshjnsdgadygb" + }, + "systemData": { + "$id": "2979", + "kind": "model", + "type": { + "$ref": "433" + }, + "value": { + "$id": "2980", + "createdBy": { + "$id": "2981", + "kind": "string", + "type": { + "$ref": "435" + }, + "value": "ssvaslsmudloholronopqyxjcu" + }, + "createdByType": { + "$id": "2982", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "createdAt": { + "$id": "2983", + "kind": "string", + "type": { + "$ref": "442" + }, + "value": "2024-08-09T18:13:29.389Z" + }, + "lastModifiedBy": { + "$id": "2984", + "kind": "string", + "type": { + "$ref": "447" + }, + "value": "gnicpuszwd" + }, + "lastModifiedByType": { + "$id": "2985", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "2986", + "kind": "string", + "type": { + "$ref": "454" + }, + "value": "2024-08-09T18:13:29.389Z" + } + } + } + } + } + } + ] + }, + { + "$id": "2987", + "kind": "http", + "name": "Broker_CreateOrUpdate_Minimal", + "description": "Broker_CreateOrUpdate_Minimal", + "filePath": "2025-04-01/Broker_CreateOrUpdate_Minimal.json", + "parameters": [ + { + "$id": "2988", + "parameter": { + "$ref": "2367" + }, + "value": { + "$id": "2989", + "kind": "string", + "type": { + "$ref": "2368" + }, + "value": "2025-04-01" + } + }, + { + "$id": "2990", + "parameter": { + "$ref": "2371" + }, + "value": { + "$id": "2991", + "kind": "string", + "type": { + "$ref": "2372" + }, + "value": "F8C729F9-DF9C-4743-848F-96EE433D8E53" + } + }, + { + "$id": "2992", + "parameter": { + "$ref": "2374" + }, + "value": { + "$id": "2993", + "kind": "string", + "type": { + "$ref": "2375" + }, + "value": "rgiotoperations" + } + }, + { + "$id": "2994", + "parameter": { + "$ref": "2376" + }, + "value": { + "$id": "2995", + "kind": "string", + "type": { + "$ref": "2377" + }, + "value": "resource-name123" + } + }, + { + "$id": "2996", + "parameter": { + "$ref": "2378" + }, + "value": { + "$id": "2997", + "kind": "string", + "type": { + "$ref": "2379" + }, + "value": "resource-name123" + } + }, + { + "$id": "2998", + "parameter": { + "$ref": "2386" + }, + "value": { + "$id": "2999", + "kind": "model", + "type": { + "$ref": "599" + }, + "value": { + "$id": "3000", + "properties": { + "$id": "3001", + "kind": "model", + "type": { + "$ref": "602" + }, + "value": { + "$id": "3002", + "memoryProfile": { + "$id": "3003", + "kind": "string", + "type": { + "$ref": "114" + }, + "value": "Tiny" + } + } + }, + "extendedLocation": { + "$id": "3004", + "kind": "model", + "type": { + "$ref": "510" + }, + "value": { + "$id": "3005", + "name": { + "$id": "3006", + "kind": "string", + "type": { + "$ref": "512" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "3007", + "kind": "string", + "type": { + "$ref": "44" + }, + "value": "CustomLocation" + } + } + } + } + } + } + ], + "responses": [ + { + "$id": "3008", + "response": { + "$ref": "2387" + }, + "statusCode": 200, + "bodyValue": { + "$id": "3009", + "kind": "model", + "type": { + "$ref": "599" + }, + "value": { + "$id": "3010", + "properties": { + "$id": "3011", + "kind": "model", + "type": { + "$ref": "602" + }, + "value": { + "$id": "3012", + "advanced": { + "$id": "3013", + "kind": "model", + "type": { + "$ref": "604" + }, + "value": { + "$id": "3014", + "clients": { + "$id": "3015", + "kind": "model", + "type": { + "$ref": "606" + }, + "value": { + "$id": "3016", + "maxSessionExpirySeconds": { + "$id": "3017", + "kind": "number", + "type": { + "$ref": "608" + }, + "value": 3859 + }, + "maxMessageExpirySeconds": { + "$id": "3018", + "kind": "number", + "type": { + "$ref": "612" + }, + "value": 3263 + }, + "maxPacketSizeBytes": { + "$id": "3019", + "kind": "number", + "type": { + "$ref": "616" + }, + "value": 3029 + }, + "subscriberQueueLimit": { + "$id": "3020", + "kind": "model", + "type": { + "$ref": "620" + }, + "value": { + "$id": "3021", + "length": { + "$id": "3022", + "kind": "number", + "type": { + "$ref": "622" + }, + "value": 6 + }, + "strategy": { + "$id": "3023", + "kind": "string", + "type": { + "$ref": "76" + }, + "value": "None" + } + } + }, + "maxReceiveMaximum": { + "$id": "3024", + "kind": "number", + "type": { + "$ref": "631" + }, + "value": 2365 + }, + "maxKeepAliveSeconds": { + "$id": "3025", + "kind": "number", + "type": { + "$ref": "635" + }, + "value": 3744 + } + } + }, + "encryptInternalTraffic": { + "$id": "3026", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Enabled" + }, + "internalCerts": { + "$id": "3027", + "kind": "model", + "type": { + "$ref": "644" + }, + "value": { + "$id": "3028", + "duration": { + "$id": "3029", + "kind": "string", + "type": { + "$ref": "646" + }, + "value": "bchrc" + }, + "renewBefore": { + "$id": "3030", + "kind": "string", + "type": { + "$ref": "650" + }, + "value": "xkafmpgjfifkwwrhkswtopdnne" + }, + "privateKey": { + "$id": "3031", + "kind": "model", + "type": { + "$ref": "654" + }, + "value": { + "$id": "3032", + "algorithm": { + "$id": "3033", + "kind": "string", + "type": { + "$ref": "82" + }, + "value": "Ec256" + }, + "rotationPolicy": { + "$id": "3034", + "kind": "string", + "type": { + "$ref": "98" + }, + "value": "Always" + } + } + } + } + } + } + }, + "cardinality": { + "$id": "3035", + "kind": "model", + "type": { + "$ref": "668" + }, + "value": { + "$id": "3036", + "backendChain": { + "$id": "3037", + "kind": "model", + "type": { + "$ref": "670" + }, + "value": { + "$id": "3038", + "partitions": { + "$id": "3039", + "kind": "number", + "type": { + "$ref": "672" + }, + "value": 11 + }, + "redundancyFactor": { + "$id": "3040", + "kind": "number", + "type": { + "$ref": "676" + }, + "value": 5 + }, + "workers": { + "$id": "3041", + "kind": "number", + "type": { + "$ref": "680" + }, + "value": 15 + } + } + }, + "frontend": { + "$id": "3042", + "kind": "model", + "type": { + "$ref": "686" + }, + "value": { + "$id": "3043", + "replicas": { + "$id": "3044", + "kind": "number", + "type": { + "$ref": "688" + }, + "value": 2 + }, + "workers": { + "$id": "3045", + "kind": "number", + "type": { + "$ref": "692" + }, + "value": 6 + } + } + } + } + }, + "diagnostics": { + "$id": "3046", + "kind": "model", + "type": { + "$ref": "700" + }, + "value": { + "$id": "3047", + "logs": { + "$id": "3048", + "kind": "model", + "type": { + "$ref": "702" + }, + "value": { + "$id": "3049", + "level": { + "$id": "3050", + "kind": "string", + "type": { + "$ref": "704" + }, + "value": "rnmwokumdmebpmfxxxzvvjfdywotav" + } + } + }, + "metrics": { + "$id": "3051", + "kind": "model", + "type": { + "$ref": "710" + }, + "value": { + "$id": "3052", + "prometheusPort": { + "$id": "3053", + "kind": "number", + "type": { + "$ref": "712" + }, + "value": 7581 + } + } + }, + "selfCheck": { + "$id": "3054", + "kind": "model", + "type": { + "$ref": "718" + }, + "value": { + "$id": "3055", + "mode": { + "$id": "3056", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Enabled" + }, + "intervalSeconds": { + "$id": "3057", + "kind": "number", + "type": { + "$ref": "723" + }, + "value": 158 + }, + "timeoutSeconds": { + "$id": "3058", + "kind": "number", + "type": { + "$ref": "727" + }, + "value": 14 + } + } + }, + "traces": { + "$id": "3059", + "kind": "model", + "type": { + "$ref": "733" + }, + "value": { + "$id": "3060", + "mode": { + "$id": "3061", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Enabled" + }, + "cacheSizeMegabytes": { + "$id": "3062", + "kind": "number", + "type": { + "$ref": "738" + }, + "value": 28 + }, + "selfTracing": { + "$id": "3063", + "kind": "model", + "type": { + "$ref": "742" + }, + "value": { + "$id": "3064", + "mode": { + "$id": "3065", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Enabled" + }, + "intervalSeconds": { + "$id": "3066", + "kind": "number", + "type": { + "$ref": "747" + }, + "value": 22 + } + } + }, + "spanChannelCapacity": { + "$id": "3067", + "kind": "number", + "type": { + "$ref": "753" + }, + "value": 1000 + } + } + } + } + }, + "diskBackedMessageBuffer": { + "$id": "3068", + "kind": "model", + "type": { + "$ref": "761" + }, + "value": { + "$id": "3069", + "maxSize": { + "$id": "3070", + "kind": "string", + "type": { + "$ref": "763" + }, + "value": "500M" + }, + "ephemeralVolumeClaimSpec": { + "$id": "3071", + "kind": "model", + "type": { + "$ref": "767" + }, + "value": { + "$id": "3072", + "volumeName": { + "$id": "3073", + "kind": "string", + "type": { + "$ref": "769" + }, + "value": "c" + }, + "volumeMode": { + "$id": "3074", + "kind": "string", + "type": { + "$ref": "773" + }, + "value": "rxvpksjuuugqnqzeiprocknbn" + }, + "storageClassName": { + "$id": "3075", + "kind": "string", + "type": { + "$ref": "777" + }, + "value": "sseyhrjptkhrqvpdpjmornkqvon" + }, + "accessModes": { + "$id": "3076", + "kind": "array", + "type": { + "$ref": "781" + }, + "value": [ + { + "$id": "3077", + "kind": "string", + "type": { + "$ref": "782" + }, + "value": "nuluhigrbb" + } + ] + }, + "dataSource": { + "$id": "3078", + "kind": "model", + "type": { + "$ref": "786" + }, + "value": { + "$id": "3079", + "apiGroup": { + "$id": "3080", + "kind": "string", + "type": { + "$ref": "788" + }, + "value": "npqapyksvvpkohujx" + }, + "kind": { + "$id": "3081", + "kind": "string", + "type": { + "$ref": "792" + }, + "value": "wazgyb" + }, + "name": { + "$id": "3082", + "kind": "string", + "type": { + "$ref": "796" + }, + "value": "cwhsgxxcxsyppoefm" + } + } + }, + "dataSourceRef": { + "$id": "3083", + "kind": "model", + "type": { + "$ref": "802" + }, + "value": { + "$id": "3084", + "apiGroup": { + "$id": "3085", + "kind": "string", + "type": { + "$ref": "804" + }, + "value": "mnfnykznjjsoqpfsgdqioupt" + }, + "kind": { + "$id": "3086", + "kind": "string", + "type": { + "$ref": "808" + }, + "value": "odynqzekfzsnawrctaxg" + }, + "name": { + "$id": "3087", + "kind": "string", + "type": { + "$ref": "812" + }, + "value": "envszivbbmixbyddzg" + }, + "namespace": { + "$id": "3088", + "kind": "string", + "type": { + "$ref": "816" + }, + "value": "etcfzvxqd" + } + } + }, + "resources": { + "$id": "3089", + "kind": "model", + "type": { + "$ref": "822" + }, + "value": { + "$id": "3090", + "limits": { + "$id": "3091", + "kind": "dict", + "type": { + "$ref": "824" + }, + "value": { + "$id": "3092", + "key2719": { + "$id": "3093", + "kind": "string", + "type": { + "$ref": "826" + }, + "value": "hmphcrgctu" + } + } + }, + "requests": { + "$id": "3094", + "kind": "dict", + "type": { + "$ref": "830" + }, + "value": { + "$id": "3095", + "key2909": { + "$id": "3096", + "kind": "string", + "type": { + "$ref": "832" + }, + "value": "txocprnyrsgvhfrg" + } + } + } + } + }, + "selector": { + "$id": "3097", + "kind": "model", + "type": { + "$ref": "838" + }, + "value": { + "$id": "3098", + "matchExpressions": { + "$id": "3099", + "kind": "array", + "type": { + "$ref": "840" + }, + "value": [ + { + "$id": "3100", + "kind": "model", + "type": { + "$ref": "841" + }, + "value": { + "$id": "3101", + "key": { + "$id": "3102", + "kind": "string", + "type": { + "$ref": "843" + }, + "value": "e" + }, + "operator": { + "$id": "3103", + "kind": "string", + "type": { + "$ref": "104" + }, + "value": "In" + }, + "values": { + "$id": "3104", + "kind": "array", + "type": { + "$ref": "850" + }, + "value": [ + { + "$id": "3105", + "kind": "string", + "type": { + "$ref": "851" + }, + "value": "slmpajlywqvuyknipgztsonqyybt" + } + ] + } + } + } + ] + }, + "matchLabels": { + "$id": "3106", + "kind": "dict", + "type": { + "$ref": "857" + }, + "value": { + "$id": "3107", + "key6673": { + "$id": "3108", + "kind": "string", + "type": { + "$ref": "859" + }, + "value": "wlngfalznwxnurzpgxomcxhbqefpr" + } + } + } + } + } + } + }, + "persistentVolumeClaimSpec": { + "$id": "3109", + "kind": "model", + "type": { + "$ref": "767" + }, + "value": { + "$id": "3110", + "volumeName": { + "$id": "3111", + "kind": "string", + "type": { + "$ref": "769" + }, + "value": "c" + }, + "volumeMode": { + "$id": "3112", + "kind": "string", + "type": { + "$ref": "773" + }, + "value": "rxvpksjuuugqnqzeiprocknbn" + }, + "storageClassName": { + "$id": "3113", + "kind": "string", + "type": { + "$ref": "777" + }, + "value": "sseyhrjptkhrqvpdpjmornkqvon" + }, + "accessModes": { + "$id": "3114", + "kind": "array", + "type": { + "$ref": "781" + }, + "value": [ + { + "$id": "3115", + "kind": "string", + "type": { + "$ref": "782" + }, + "value": "nuluhigrbb" + } + ] + }, + "dataSource": { + "$id": "3116", + "kind": "model", + "type": { + "$ref": "786" + }, + "value": { + "$id": "3117", + "apiGroup": { + "$id": "3118", + "kind": "string", + "type": { + "$ref": "788" + }, + "value": "npqapyksvvpkohujx" + }, + "kind": { + "$id": "3119", + "kind": "string", + "type": { + "$ref": "792" + }, + "value": "wazgyb" + }, + "name": { + "$id": "3120", + "kind": "string", + "type": { + "$ref": "796" + }, + "value": "cwhsgxxcxsyppoefm" + } + } + }, + "dataSourceRef": { + "$id": "3121", + "kind": "model", + "type": { + "$ref": "802" + }, + "value": { + "$id": "3122", + "apiGroup": { + "$id": "3123", + "kind": "string", + "type": { + "$ref": "804" + }, + "value": "mnfnykznjjsoqpfsgdqioupt" + }, + "kind": { + "$id": "3124", + "kind": "string", + "type": { + "$ref": "808" + }, + "value": "odynqzekfzsnawrctaxg" + }, + "name": { + "$id": "3125", + "kind": "string", + "type": { + "$ref": "812" + }, + "value": "envszivbbmixbyddzg" + }, + "namespace": { + "$id": "3126", + "kind": "string", + "type": { + "$ref": "816" + }, + "value": "etcfzvxqd" + } + } + }, + "resources": { + "$id": "3127", + "kind": "model", + "type": { + "$ref": "822" + }, + "value": { + "$id": "3128", + "limits": { + "$id": "3129", + "kind": "dict", + "type": { + "$ref": "824" + }, + "value": { + "$id": "3130", + "key2719": { + "$id": "3131", + "kind": "string", + "type": { + "$ref": "826" + }, + "value": "hmphcrgctu" + } + } + }, + "requests": { + "$id": "3132", + "kind": "dict", + "type": { + "$ref": "830" + }, + "value": { + "$id": "3133", + "key2909": { + "$id": "3134", + "kind": "string", + "type": { + "$ref": "832" + }, + "value": "txocprnyrsgvhfrg" + } + } + } + } + }, + "selector": { + "$id": "3135", + "kind": "model", + "type": { + "$ref": "838" + }, + "value": { + "$id": "3136", + "matchExpressions": { + "$id": "3137", + "kind": "array", + "type": { + "$ref": "840" + }, + "value": [ + { + "$id": "3138", + "kind": "model", + "type": { + "$ref": "841" + }, + "value": { + "$id": "3139", + "key": { + "$id": "3140", + "kind": "string", + "type": { + "$ref": "843" + }, + "value": "e" + }, + "operator": { + "$id": "3141", + "kind": "string", + "type": { + "$ref": "104" + }, + "value": "In" + }, + "values": { + "$id": "3142", + "kind": "array", + "type": { + "$ref": "850" + }, + "value": [ + { + "$id": "3143", + "kind": "string", + "type": { + "$ref": "851" + }, + "value": "slmpajlywqvuyknipgztsonqyybt" + } + ] + } + } + } + ] + }, + "matchLabels": { + "$id": "3144", + "kind": "dict", + "type": { + "$ref": "857" + }, + "value": { + "$id": "3145", + "key6673": { + "$id": "3146", + "kind": "string", + "type": { + "$ref": "859" + }, + "value": "wlngfalznwxnurzpgxomcxhbqefpr" + } + } + } + } + } + } + } + } + }, + "generateResourceLimits": { + "$id": "3147", + "kind": "model", + "type": { + "$ref": "872" + }, + "value": { + "$id": "3148", + "cpu": { + "$id": "3149", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Enabled" + } + } + }, + "memoryProfile": { + "$id": "3150", + "kind": "string", + "type": { + "$ref": "114" + }, + "value": "Tiny" + }, + "provisioningState": { + "$id": "3151", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Succeeded" + } + } + }, + "extendedLocation": { + "$id": "3152", + "kind": "model", + "type": { + "$ref": "510" + }, + "value": { + "$id": "3153", + "name": { + "$id": "3154", + "kind": "string", + "type": { + "$ref": "512" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "3155", + "kind": "string", + "type": { + "$ref": "44" + }, + "value": "CustomLocation" + } + } + }, + "id": { + "$id": "3156", + "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": "3157", + "kind": "string", + "type": { + "$ref": "424" + }, + "value": "dowrkel" + }, + "type": { + "$id": "3158", + "kind": "string", + "type": { + "$ref": "428" + }, + "value": "xshjnsdgadygb" + }, + "systemData": { + "$id": "3159", + "kind": "model", + "type": { + "$ref": "433" + }, + "value": { + "$id": "3160", + "createdBy": { + "$id": "3161", + "kind": "string", + "type": { + "$ref": "435" + }, + "value": "ssvaslsmudloholronopqyxjcu" + }, + "createdByType": { + "$id": "3162", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "createdAt": { + "$id": "3163", + "kind": "string", + "type": { + "$ref": "442" + }, + "value": "2024-08-09T18:13:29.389Z" + }, + "lastModifiedBy": { + "$id": "3164", + "kind": "string", + "type": { + "$ref": "447" + }, + "value": "gnicpuszwd" + }, + "lastModifiedByType": { + "$id": "3165", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "3166", + "kind": "string", + "type": { + "$ref": "454" + }, + "value": "2024-08-09T18:13:29.389Z" + } + } + } + } + } + }, + { + "$id": "3167", + "response": { + "$ref": "2388" + }, + "statusCode": 201, + "bodyValue": { + "$id": "3168", + "kind": "model", + "type": { + "$ref": "599" + }, + "value": { + "$id": "3169", + "properties": { + "$id": "3170", + "kind": "model", + "type": { + "$ref": "602" + }, + "value": { + "$id": "3171", + "advanced": { + "$id": "3172", + "kind": "model", + "type": { + "$ref": "604" + }, + "value": { + "$id": "3173", + "clients": { + "$id": "3174", + "kind": "model", + "type": { + "$ref": "606" + }, + "value": { + "$id": "3175", + "maxSessionExpirySeconds": { + "$id": "3176", + "kind": "number", + "type": { + "$ref": "608" + }, + "value": 3859 + }, + "maxMessageExpirySeconds": { + "$id": "3177", + "kind": "number", + "type": { + "$ref": "612" + }, + "value": 3263 + }, + "maxPacketSizeBytes": { + "$id": "3178", + "kind": "number", + "type": { + "$ref": "616" + }, + "value": 3029 + }, + "subscriberQueueLimit": { + "$id": "3179", + "kind": "model", + "type": { + "$ref": "620" + }, + "value": { + "$id": "3180", + "length": { + "$id": "3181", + "kind": "number", + "type": { + "$ref": "622" + }, + "value": 6 + }, + "strategy": { + "$id": "3182", + "kind": "string", + "type": { + "$ref": "76" + }, + "value": "None" + } + } + }, + "maxReceiveMaximum": { + "$id": "3183", + "kind": "number", + "type": { + "$ref": "631" + }, + "value": 2365 + }, + "maxKeepAliveSeconds": { + "$id": "3184", + "kind": "number", + "type": { + "$ref": "635" + }, + "value": 3744 + } + } + }, + "encryptInternalTraffic": { + "$id": "3185", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Enabled" + }, + "internalCerts": { + "$id": "3186", + "kind": "model", + "type": { + "$ref": "644" + }, + "value": { + "$id": "3187", + "duration": { + "$id": "3188", + "kind": "string", + "type": { + "$ref": "646" + }, + "value": "bchrc" + }, + "renewBefore": { + "$id": "3189", + "kind": "string", + "type": { + "$ref": "650" + }, + "value": "xkafmpgjfifkwwrhkswtopdnne" + }, + "privateKey": { + "$id": "3190", + "kind": "model", + "type": { + "$ref": "654" + }, + "value": { + "$id": "3191", + "algorithm": { + "$id": "3192", + "kind": "string", + "type": { + "$ref": "82" + }, + "value": "Ec256" + }, + "rotationPolicy": { + "$id": "3193", + "kind": "string", + "type": { + "$ref": "98" + }, + "value": "Always" + } + } + } + } + } + } + }, + "cardinality": { + "$id": "3194", + "kind": "model", + "type": { + "$ref": "668" + }, + "value": { + "$id": "3195", + "backendChain": { + "$id": "3196", + "kind": "model", + "type": { + "$ref": "670" + }, + "value": { + "$id": "3197", + "partitions": { + "$id": "3198", + "kind": "number", + "type": { + "$ref": "672" + }, + "value": 11 + }, + "redundancyFactor": { + "$id": "3199", + "kind": "number", + "type": { + "$ref": "676" + }, + "value": 5 + }, + "workers": { + "$id": "3200", + "kind": "number", + "type": { + "$ref": "680" + }, + "value": 15 + } + } + }, + "frontend": { + "$id": "3201", + "kind": "model", + "type": { + "$ref": "686" + }, + "value": { + "$id": "3202", + "replicas": { + "$id": "3203", + "kind": "number", + "type": { + "$ref": "688" + }, + "value": 2 + }, + "workers": { + "$id": "3204", + "kind": "number", + "type": { + "$ref": "692" + }, + "value": 6 + } + } + } + } + }, + "diagnostics": { + "$id": "3205", + "kind": "model", + "type": { + "$ref": "700" + }, + "value": { + "$id": "3206", + "logs": { + "$id": "3207", + "kind": "model", + "type": { + "$ref": "702" + }, + "value": { + "$id": "3208", + "level": { + "$id": "3209", + "kind": "string", + "type": { + "$ref": "704" + }, + "value": "rnmwokumdmebpmfxxxzvvjfdywotav" + } + } + }, + "metrics": { + "$id": "3210", + "kind": "model", + "type": { + "$ref": "710" + }, + "value": { + "$id": "3211", + "prometheusPort": { + "$id": "3212", + "kind": "number", + "type": { + "$ref": "712" + }, + "value": 7581 + } + } + }, + "selfCheck": { + "$id": "3213", + "kind": "model", + "type": { + "$ref": "718" + }, + "value": { + "$id": "3214", + "mode": { + "$id": "3215", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Enabled" + }, + "intervalSeconds": { + "$id": "3216", + "kind": "number", + "type": { + "$ref": "723" + }, + "value": 158 + }, + "timeoutSeconds": { + "$id": "3217", + "kind": "number", + "type": { + "$ref": "727" + }, + "value": 14 + } + } + }, + "traces": { + "$id": "3218", + "kind": "model", + "type": { + "$ref": "733" + }, + "value": { + "$id": "3219", + "mode": { + "$id": "3220", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Enabled" + }, + "cacheSizeMegabytes": { + "$id": "3221", + "kind": "number", + "type": { + "$ref": "738" + }, + "value": 28 + }, + "selfTracing": { + "$id": "3222", + "kind": "model", + "type": { + "$ref": "742" + }, + "value": { + "$id": "3223", + "mode": { + "$id": "3224", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Enabled" + }, + "intervalSeconds": { + "$id": "3225", + "kind": "number", + "type": { + "$ref": "747" + }, + "value": 22 + } + } + }, + "spanChannelCapacity": { + "$id": "3226", + "kind": "number", + "type": { + "$ref": "753" + }, + "value": 1000 + } + } + } + } + }, + "diskBackedMessageBuffer": { + "$id": "3227", + "kind": "model", + "type": { + "$ref": "761" + }, + "value": { + "$id": "3228", + "maxSize": { + "$id": "3229", + "kind": "string", + "type": { + "$ref": "763" + }, + "value": "500M" + }, + "ephemeralVolumeClaimSpec": { + "$id": "3230", + "kind": "model", + "type": { + "$ref": "767" + }, + "value": { + "$id": "3231", + "volumeName": { + "$id": "3232", + "kind": "string", + "type": { + "$ref": "769" + }, + "value": "c" + }, + "volumeMode": { + "$id": "3233", + "kind": "string", + "type": { + "$ref": "773" + }, + "value": "rxvpksjuuugqnqzeiprocknbn" + }, + "storageClassName": { + "$id": "3234", + "kind": "string", + "type": { + "$ref": "777" + }, + "value": "sseyhrjptkhrqvpdpjmornkqvon" + }, + "accessModes": { + "$id": "3235", + "kind": "array", + "type": { + "$ref": "781" + }, + "value": [ + { + "$id": "3236", + "kind": "string", + "type": { + "$ref": "782" + }, + "value": "nuluhigrbb" + } + ] + }, + "dataSource": { + "$id": "3237", + "kind": "model", + "type": { + "$ref": "786" + }, + "value": { + "$id": "3238", + "apiGroup": { + "$id": "3239", + "kind": "string", + "type": { + "$ref": "788" + }, + "value": "npqapyksvvpkohujx" + }, + "kind": { + "$id": "3240", + "kind": "string", + "type": { + "$ref": "792" + }, + "value": "wazgyb" + }, + "name": { + "$id": "3241", + "kind": "string", + "type": { + "$ref": "796" + }, + "value": "cwhsgxxcxsyppoefm" + } + } + }, + "dataSourceRef": { + "$id": "3242", + "kind": "model", + "type": { + "$ref": "802" + }, + "value": { + "$id": "3243", + "apiGroup": { + "$id": "3244", + "kind": "string", + "type": { + "$ref": "804" + }, + "value": "mnfnykznjjsoqpfsgdqioupt" + }, + "kind": { + "$id": "3245", + "kind": "string", + "type": { + "$ref": "808" + }, + "value": "odynqzekfzsnawrctaxg" + }, + "name": { + "$id": "3246", + "kind": "string", + "type": { + "$ref": "812" + }, + "value": "envszivbbmixbyddzg" + }, + "namespace": { + "$id": "3247", + "kind": "string", + "type": { + "$ref": "816" + }, + "value": "etcfzvxqd" + } + } + }, + "resources": { + "$id": "3248", + "kind": "model", + "type": { + "$ref": "822" + }, + "value": { + "$id": "3249", + "limits": { + "$id": "3250", + "kind": "dict", + "type": { + "$ref": "824" + }, + "value": { + "$id": "3251", + "key2719": { + "$id": "3252", + "kind": "string", + "type": { + "$ref": "826" + }, + "value": "hmphcrgctu" + } + } + }, + "requests": { + "$id": "3253", + "kind": "dict", + "type": { + "$ref": "830" + }, + "value": { + "$id": "3254", + "key2909": { + "$id": "3255", + "kind": "string", + "type": { + "$ref": "832" + }, + "value": "txocprnyrsgvhfrg" + } + } + } + } + }, + "selector": { + "$id": "3256", + "kind": "model", + "type": { + "$ref": "838" + }, + "value": { + "$id": "3257", + "matchExpressions": { + "$id": "3258", + "kind": "array", + "type": { + "$ref": "840" + }, + "value": [ + { + "$id": "3259", + "kind": "model", + "type": { + "$ref": "841" + }, + "value": { + "$id": "3260", + "key": { + "$id": "3261", + "kind": "string", + "type": { + "$ref": "843" + }, + "value": "e" + }, + "operator": { + "$id": "3262", + "kind": "string", + "type": { + "$ref": "104" + }, + "value": "In" + }, + "values": { + "$id": "3263", + "kind": "array", + "type": { + "$ref": "850" + }, + "value": [ + { + "$id": "3264", + "kind": "string", + "type": { + "$ref": "851" + }, + "value": "slmpajlywqvuyknipgztsonqyybt" + } + ] + } + } + } + ] + }, + "matchLabels": { + "$id": "3265", + "kind": "dict", + "type": { + "$ref": "857" + }, + "value": { + "$id": "3266", + "key6673": { + "$id": "3267", + "kind": "string", + "type": { + "$ref": "859" + }, + "value": "wlngfalznwxnurzpgxomcxhbqefpr" + } + } + } + } + } + } + }, + "persistentVolumeClaimSpec": { + "$id": "3268", + "kind": "model", + "type": { + "$ref": "767" + }, + "value": { + "$id": "3269", + "volumeName": { + "$id": "3270", + "kind": "string", + "type": { + "$ref": "769" + }, + "value": "c" + }, + "volumeMode": { + "$id": "3271", + "kind": "string", + "type": { + "$ref": "773" + }, + "value": "rxvpksjuuugqnqzeiprocknbn" + }, + "storageClassName": { + "$id": "3272", + "kind": "string", + "type": { + "$ref": "777" + }, + "value": "sseyhrjptkhrqvpdpjmornkqvon" + }, + "accessModes": { + "$id": "3273", + "kind": "array", + "type": { + "$ref": "781" + }, + "value": [ + { + "$id": "3274", + "kind": "string", + "type": { + "$ref": "782" + }, + "value": "nuluhigrbb" + } + ] + }, + "dataSource": { + "$id": "3275", + "kind": "model", + "type": { + "$ref": "786" + }, + "value": { + "$id": "3276", + "apiGroup": { + "$id": "3277", + "kind": "string", + "type": { + "$ref": "788" + }, + "value": "npqapyksvvpkohujx" + }, + "kind": { + "$id": "3278", + "kind": "string", + "type": { + "$ref": "792" + }, + "value": "wazgyb" + }, + "name": { + "$id": "3279", + "kind": "string", + "type": { + "$ref": "796" + }, + "value": "cwhsgxxcxsyppoefm" + } + } + }, + "dataSourceRef": { + "$id": "3280", + "kind": "model", + "type": { + "$ref": "802" + }, + "value": { + "$id": "3281", + "apiGroup": { + "$id": "3282", + "kind": "string", + "type": { + "$ref": "804" + }, + "value": "mnfnykznjjsoqpfsgdqioupt" + }, + "kind": { + "$id": "3283", + "kind": "string", + "type": { + "$ref": "808" + }, + "value": "odynqzekfzsnawrctaxg" + }, + "name": { + "$id": "3284", + "kind": "string", + "type": { + "$ref": "812" + }, + "value": "envszivbbmixbyddzg" + }, + "namespace": { + "$id": "3285", + "kind": "string", + "type": { + "$ref": "816" + }, + "value": "etcfzvxqd" + } + } + }, + "resources": { + "$id": "3286", + "kind": "model", + "type": { + "$ref": "822" + }, + "value": { + "$id": "3287", + "limits": { + "$id": "3288", + "kind": "dict", + "type": { + "$ref": "824" + }, + "value": { + "$id": "3289", + "key2719": { + "$id": "3290", + "kind": "string", + "type": { + "$ref": "826" + }, + "value": "hmphcrgctu" + } + } + }, + "requests": { + "$id": "3291", + "kind": "dict", + "type": { + "$ref": "830" + }, + "value": { + "$id": "3292", + "key2909": { + "$id": "3293", + "kind": "string", + "type": { + "$ref": "832" + }, + "value": "txocprnyrsgvhfrg" + } + } + } + } + }, + "selector": { + "$id": "3294", + "kind": "model", + "type": { + "$ref": "838" + }, + "value": { + "$id": "3295", + "matchExpressions": { + "$id": "3296", + "kind": "array", + "type": { + "$ref": "840" + }, + "value": [ + { + "$id": "3297", + "kind": "model", + "type": { + "$ref": "841" + }, + "value": { + "$id": "3298", + "key": { + "$id": "3299", + "kind": "string", + "type": { + "$ref": "843" + }, + "value": "e" + }, + "operator": { + "$id": "3300", + "kind": "string", + "type": { + "$ref": "104" + }, + "value": "In" + }, + "values": { + "$id": "3301", + "kind": "array", + "type": { + "$ref": "850" + }, + "value": [ + { + "$id": "3302", + "kind": "string", + "type": { + "$ref": "851" + }, + "value": "slmpajlywqvuyknipgztsonqyybt" + } + ] + } + } + } + ] + }, + "matchLabels": { + "$id": "3303", + "kind": "dict", + "type": { + "$ref": "857" + }, + "value": { + "$id": "3304", + "key6673": { + "$id": "3305", + "kind": "string", + "type": { + "$ref": "859" + }, + "value": "wlngfalznwxnurzpgxomcxhbqefpr" + } + } + } + } + } + } + } + } + }, + "generateResourceLimits": { + "$id": "3306", + "kind": "model", + "type": { + "$ref": "872" + }, + "value": { + "$id": "3307", + "cpu": { + "$id": "3308", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Enabled" + } + } + }, + "memoryProfile": { + "$id": "3309", + "kind": "string", + "type": { + "$ref": "114" + }, + "value": "Tiny" + }, + "provisioningState": { + "$id": "3310", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Succeeded" + } + } + }, + "extendedLocation": { + "$id": "3311", + "kind": "model", + "type": { + "$ref": "510" + }, + "value": { + "$id": "3312", + "name": { + "$id": "3313", + "kind": "string", + "type": { + "$ref": "512" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "3314", + "kind": "string", + "type": { + "$ref": "44" + }, + "value": "CustomLocation" + } + } + }, + "id": { + "$id": "3315", + "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": "3316", + "kind": "string", + "type": { + "$ref": "424" + }, + "value": "dowrkel" + }, + "type": { + "$id": "3317", + "kind": "string", + "type": { + "$ref": "428" + }, + "value": "xshjnsdgadygb" + }, + "systemData": { + "$id": "3318", + "kind": "model", + "type": { + "$ref": "433" + }, + "value": { + "$id": "3319", + "createdBy": { + "$id": "3320", + "kind": "string", + "type": { + "$ref": "435" + }, + "value": "ssvaslsmudloholronopqyxjcu" + }, + "createdByType": { + "$id": "3321", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "createdAt": { + "$id": "3322", + "kind": "string", + "type": { + "$ref": "442" + }, + "value": "2024-08-09T18:13:29.389Z" + }, + "lastModifiedBy": { + "$id": "3323", + "kind": "string", + "type": { + "$ref": "447" + }, + "value": "gnicpuszwd" + }, + "lastModifiedByType": { + "$id": "3324", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "3325", + "kind": "string", + "type": { + "$ref": "454" + }, + "value": "2024-08-09T18:13:29.389Z" + } + } + } + } + } + } + ] + }, + { + "$id": "3326", + "kind": "http", + "name": "Broker_CreateOrUpdate_Simple", + "description": "Broker_CreateOrUpdate_Simple", + "filePath": "2025-04-01/Broker_CreateOrUpdate_Simple.json", + "parameters": [ + { + "$id": "3327", + "parameter": { + "$ref": "2367" + }, + "value": { + "$id": "3328", + "kind": "string", + "type": { + "$ref": "2368" + }, + "value": "2025-04-01" + } + }, + { + "$id": "3329", + "parameter": { + "$ref": "2371" + }, + "value": { + "$id": "3330", + "kind": "string", + "type": { + "$ref": "2372" + }, + "value": "F8C729F9-DF9C-4743-848F-96EE433D8E53" + } + }, + { + "$id": "3331", + "parameter": { + "$ref": "2374" + }, + "value": { + "$id": "3332", + "kind": "string", + "type": { + "$ref": "2375" + }, + "value": "rgiotoperations" + } + }, + { + "$id": "3333", + "parameter": { + "$ref": "2376" + }, + "value": { + "$id": "3334", + "kind": "string", + "type": { + "$ref": "2377" + }, + "value": "resource-name123" + } + }, + { + "$id": "3335", + "parameter": { + "$ref": "2378" + }, + "value": { + "$id": "3336", + "kind": "string", + "type": { + "$ref": "2379" + }, + "value": "resource-name123" + } + }, + { + "$id": "3337", + "parameter": { + "$ref": "2386" + }, + "value": { + "$id": "3338", + "kind": "model", + "type": { + "$ref": "599" + }, + "value": { + "$id": "3339", + "properties": { + "$id": "3340", + "kind": "model", + "type": { + "$ref": "602" + }, + "value": { + "$id": "3341", + "cardinality": { + "$id": "3342", + "kind": "model", + "type": { + "$ref": "668" + }, + "value": { + "$id": "3343", + "backendChain": { + "$id": "3344", + "kind": "model", + "type": { + "$ref": "670" + }, + "value": { + "$id": "3345", + "partitions": { + "$id": "3346", + "kind": "number", + "type": { + "$ref": "672" + }, + "value": 2 + }, + "redundancyFactor": { + "$id": "3347", + "kind": "number", + "type": { + "$ref": "676" + }, + "value": 2 + }, + "workers": { + "$id": "3348", + "kind": "number", + "type": { + "$ref": "680" + }, + "value": 2 + } + } + }, + "frontend": { + "$id": "3349", + "kind": "model", + "type": { + "$ref": "686" + }, + "value": { + "$id": "3350", + "replicas": { + "$id": "3351", + "kind": "number", + "type": { + "$ref": "688" + }, + "value": 2 + }, + "workers": { + "$id": "3352", + "kind": "number", + "type": { + "$ref": "692" + }, + "value": 2 + } + } + } + } + }, + "generateResourceLimits": { + "$id": "3353", + "kind": "model", + "type": { + "$ref": "872" + }, + "value": { + "$id": "3354", + "cpu": { + "$id": "3355", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Enabled" + } + } + }, + "memoryProfile": { + "$id": "3356", + "kind": "string", + "type": { + "$ref": "114" + }, + "value": "Low" + } + } + }, + "extendedLocation": { + "$id": "3357", + "kind": "model", + "type": { + "$ref": "510" + }, + "value": { + "$id": "3358", + "name": { + "$id": "3359", + "kind": "string", + "type": { + "$ref": "512" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "3360", + "kind": "string", + "type": { + "$ref": "44" + }, + "value": "CustomLocation" + } + } + } + } + } + } + ], + "responses": [ + { + "$id": "3361", + "response": { + "$ref": "2387" + }, + "statusCode": 200, + "bodyValue": { + "$id": "3362", + "kind": "model", + "type": { + "$ref": "599" + }, + "value": { + "$id": "3363", + "properties": { + "$id": "3364", + "kind": "model", + "type": { + "$ref": "602" + }, + "value": { + "$id": "3365", + "advanced": { + "$id": "3366", + "kind": "model", + "type": { + "$ref": "604" + }, + "value": { + "$id": "3367", + "clients": { + "$id": "3368", + "kind": "model", + "type": { + "$ref": "606" + }, + "value": { + "$id": "3369", + "maxSessionExpirySeconds": { + "$id": "3370", + "kind": "number", + "type": { + "$ref": "608" + }, + "value": 3859 + }, + "maxMessageExpirySeconds": { + "$id": "3371", + "kind": "number", + "type": { + "$ref": "612" + }, + "value": 3263 + }, + "maxPacketSizeBytes": { + "$id": "3372", + "kind": "number", + "type": { + "$ref": "616" + }, + "value": 3029 + }, + "subscriberQueueLimit": { + "$id": "3373", + "kind": "model", + "type": { + "$ref": "620" + }, + "value": { + "$id": "3374", + "length": { + "$id": "3375", + "kind": "number", + "type": { + "$ref": "622" + }, + "value": 6 + }, + "strategy": { + "$id": "3376", + "kind": "string", + "type": { + "$ref": "76" + }, + "value": "None" + } + } + }, + "maxReceiveMaximum": { + "$id": "3377", + "kind": "number", + "type": { + "$ref": "631" + }, + "value": 2365 + }, + "maxKeepAliveSeconds": { + "$id": "3378", + "kind": "number", + "type": { + "$ref": "635" + }, + "value": 3744 + } + } + }, + "encryptInternalTraffic": { + "$id": "3379", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Enabled" + }, + "internalCerts": { + "$id": "3380", + "kind": "model", + "type": { + "$ref": "644" + }, + "value": { + "$id": "3381", + "duration": { + "$id": "3382", + "kind": "string", + "type": { + "$ref": "646" + }, + "value": "bchrc" + }, + "renewBefore": { + "$id": "3383", + "kind": "string", + "type": { + "$ref": "650" + }, + "value": "xkafmpgjfifkwwrhkswtopdnne" + }, + "privateKey": { + "$id": "3384", + "kind": "model", + "type": { + "$ref": "654" + }, + "value": { + "$id": "3385", + "algorithm": { + "$id": "3386", + "kind": "string", + "type": { + "$ref": "82" + }, + "value": "Ec256" + }, + "rotationPolicy": { + "$id": "3387", + "kind": "string", + "type": { + "$ref": "98" + }, + "value": "Always" + } + } + } + } + } + } + }, + "cardinality": { + "$id": "3388", + "kind": "model", + "type": { + "$ref": "668" + }, + "value": { + "$id": "3389", + "backendChain": { + "$id": "3390", + "kind": "model", + "type": { + "$ref": "670" + }, + "value": { + "$id": "3391", + "partitions": { + "$id": "3392", + "kind": "number", + "type": { + "$ref": "672" + }, + "value": 11 + }, + "redundancyFactor": { + "$id": "3393", + "kind": "number", + "type": { + "$ref": "676" + }, + "value": 5 + }, + "workers": { + "$id": "3394", + "kind": "number", + "type": { + "$ref": "680" + }, + "value": 15 + } + } + }, + "frontend": { + "$id": "3395", + "kind": "model", + "type": { + "$ref": "686" + }, + "value": { + "$id": "3396", + "replicas": { + "$id": "3397", + "kind": "number", + "type": { + "$ref": "688" + }, + "value": 2 + }, + "workers": { + "$id": "3398", + "kind": "number", + "type": { + "$ref": "692" + }, + "value": 6 + } + } + } + } + }, + "diagnostics": { + "$id": "3399", + "kind": "model", + "type": { + "$ref": "700" + }, + "value": { + "$id": "3400", + "logs": { + "$id": "3401", + "kind": "model", + "type": { + "$ref": "702" + }, + "value": { + "$id": "3402", + "level": { + "$id": "3403", + "kind": "string", + "type": { + "$ref": "704" + }, + "value": "rnmwokumdmebpmfxxxzvvjfdywotav" + } + } + }, + "metrics": { + "$id": "3404", + "kind": "model", + "type": { + "$ref": "710" + }, + "value": { + "$id": "3405", + "prometheusPort": { + "$id": "3406", + "kind": "number", + "type": { + "$ref": "712" + }, + "value": 7581 + } + } + }, + "selfCheck": { + "$id": "3407", + "kind": "model", + "type": { + "$ref": "718" + }, + "value": { + "$id": "3408", + "mode": { + "$id": "3409", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Enabled" + }, + "intervalSeconds": { + "$id": "3410", + "kind": "number", + "type": { + "$ref": "723" + }, + "value": 158 + }, + "timeoutSeconds": { + "$id": "3411", + "kind": "number", + "type": { + "$ref": "727" + }, + "value": 14 + } + } + }, + "traces": { + "$id": "3412", + "kind": "model", + "type": { + "$ref": "733" + }, + "value": { + "$id": "3413", + "mode": { + "$id": "3414", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Enabled" + }, + "cacheSizeMegabytes": { + "$id": "3415", + "kind": "number", + "type": { + "$ref": "738" + }, + "value": 28 + }, + "selfTracing": { + "$id": "3416", + "kind": "model", + "type": { + "$ref": "742" + }, + "value": { + "$id": "3417", + "mode": { + "$id": "3418", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Enabled" + }, + "intervalSeconds": { + "$id": "3419", + "kind": "number", + "type": { + "$ref": "747" + }, + "value": 22 + } + } + }, + "spanChannelCapacity": { + "$id": "3420", + "kind": "number", + "type": { + "$ref": "753" + }, + "value": 1000 + } + } + } + } + }, + "diskBackedMessageBuffer": { + "$id": "3421", + "kind": "model", + "type": { + "$ref": "761" + }, + "value": { + "$id": "3422", + "maxSize": { + "$id": "3423", + "kind": "string", + "type": { + "$ref": "763" + }, + "value": "500M" + }, + "ephemeralVolumeClaimSpec": { + "$id": "3424", + "kind": "model", + "type": { + "$ref": "767" + }, + "value": { + "$id": "3425", + "volumeName": { + "$id": "3426", + "kind": "string", + "type": { + "$ref": "769" + }, + "value": "c" + }, + "volumeMode": { + "$id": "3427", + "kind": "string", + "type": { + "$ref": "773" + }, + "value": "rxvpksjuuugqnqzeiprocknbn" + }, + "storageClassName": { + "$id": "3428", + "kind": "string", + "type": { + "$ref": "777" + }, + "value": "sseyhrjptkhrqvpdpjmornkqvon" + }, + "accessModes": { + "$id": "3429", + "kind": "array", + "type": { + "$ref": "781" + }, + "value": [ + { + "$id": "3430", + "kind": "string", + "type": { + "$ref": "782" + }, + "value": "nuluhigrbb" + } + ] + }, + "dataSource": { + "$id": "3431", + "kind": "model", + "type": { + "$ref": "786" + }, + "value": { + "$id": "3432", + "apiGroup": { + "$id": "3433", + "kind": "string", + "type": { + "$ref": "788" + }, + "value": "npqapyksvvpkohujx" + }, + "kind": { + "$id": "3434", + "kind": "string", + "type": { + "$ref": "792" + }, + "value": "wazgyb" + }, + "name": { + "$id": "3435", + "kind": "string", + "type": { + "$ref": "796" + }, + "value": "cwhsgxxcxsyppoefm" + } + } + }, + "dataSourceRef": { + "$id": "3436", + "kind": "model", + "type": { + "$ref": "802" + }, + "value": { + "$id": "3437", + "apiGroup": { + "$id": "3438", + "kind": "string", + "type": { + "$ref": "804" + }, + "value": "mnfnykznjjsoqpfsgdqioupt" + }, + "kind": { + "$id": "3439", + "kind": "string", + "type": { + "$ref": "808" + }, + "value": "odynqzekfzsnawrctaxg" + }, + "name": { + "$id": "3440", + "kind": "string", + "type": { + "$ref": "812" + }, + "value": "envszivbbmixbyddzg" + }, + "namespace": { + "$id": "3441", + "kind": "string", + "type": { + "$ref": "816" + }, + "value": "etcfzvxqd" + } + } + }, + "resources": { + "$id": "3442", + "kind": "model", + "type": { + "$ref": "822" + }, + "value": { + "$id": "3443", + "limits": { + "$id": "3444", + "kind": "dict", + "type": { + "$ref": "824" + }, + "value": { + "$id": "3445", + "key2719": { + "$id": "3446", + "kind": "string", + "type": { + "$ref": "826" + }, + "value": "hmphcrgctu" + } + } + }, + "requests": { + "$id": "3447", + "kind": "dict", + "type": { + "$ref": "830" + }, + "value": { + "$id": "3448", + "key2909": { + "$id": "3449", + "kind": "string", + "type": { + "$ref": "832" + }, + "value": "txocprnyrsgvhfrg" + } + } + } + } + }, + "selector": { + "$id": "3450", + "kind": "model", + "type": { + "$ref": "838" + }, + "value": { + "$id": "3451", + "matchExpressions": { + "$id": "3452", + "kind": "array", + "type": { + "$ref": "840" + }, + "value": [ + { + "$id": "3453", + "kind": "model", + "type": { + "$ref": "841" + }, + "value": { + "$id": "3454", + "key": { + "$id": "3455", + "kind": "string", + "type": { + "$ref": "843" + }, + "value": "e" + }, + "operator": { + "$id": "3456", + "kind": "string", + "type": { + "$ref": "104" + }, + "value": "In" + }, + "values": { + "$id": "3457", + "kind": "array", + "type": { + "$ref": "850" + }, + "value": [ + { + "$id": "3458", + "kind": "string", + "type": { + "$ref": "851" + }, + "value": "slmpajlywqvuyknipgztsonqyybt" + } + ] + } + } + } + ] + }, + "matchLabels": { + "$id": "3459", + "kind": "dict", + "type": { + "$ref": "857" + }, + "value": { + "$id": "3460", + "key6673": { + "$id": "3461", + "kind": "string", + "type": { + "$ref": "859" + }, + "value": "wlngfalznwxnurzpgxomcxhbqefpr" + } + } + } + } + } + } + }, + "persistentVolumeClaimSpec": { + "$id": "3462", + "kind": "model", + "type": { + "$ref": "767" + }, + "value": { + "$id": "3463", + "volumeName": { + "$id": "3464", + "kind": "string", + "type": { + "$ref": "769" + }, + "value": "c" + }, + "volumeMode": { + "$id": "3465", + "kind": "string", + "type": { + "$ref": "773" + }, + "value": "rxvpksjuuugqnqzeiprocknbn" + }, + "storageClassName": { + "$id": "3466", + "kind": "string", + "type": { + "$ref": "777" + }, + "value": "sseyhrjptkhrqvpdpjmornkqvon" + }, + "accessModes": { + "$id": "3467", + "kind": "array", + "type": { + "$ref": "781" + }, + "value": [ + { + "$id": "3468", + "kind": "string", + "type": { + "$ref": "782" + }, + "value": "nuluhigrbb" + } + ] + }, + "dataSource": { + "$id": "3469", + "kind": "model", + "type": { + "$ref": "786" + }, + "value": { + "$id": "3470", + "apiGroup": { + "$id": "3471", + "kind": "string", + "type": { + "$ref": "788" + }, + "value": "npqapyksvvpkohujx" + }, + "kind": { + "$id": "3472", + "kind": "string", + "type": { + "$ref": "792" + }, + "value": "wazgyb" + }, + "name": { + "$id": "3473", + "kind": "string", + "type": { + "$ref": "796" + }, + "value": "cwhsgxxcxsyppoefm" + } + } + }, + "dataSourceRef": { + "$id": "3474", + "kind": "model", + "type": { + "$ref": "802" + }, + "value": { + "$id": "3475", + "apiGroup": { + "$id": "3476", + "kind": "string", + "type": { + "$ref": "804" + }, + "value": "mnfnykznjjsoqpfsgdqioupt" + }, + "kind": { + "$id": "3477", + "kind": "string", + "type": { + "$ref": "808" + }, + "value": "odynqzekfzsnawrctaxg" + }, + "name": { + "$id": "3478", + "kind": "string", + "type": { + "$ref": "812" + }, + "value": "envszivbbmixbyddzg" + }, + "namespace": { + "$id": "3479", + "kind": "string", + "type": { + "$ref": "816" + }, + "value": "etcfzvxqd" + } + } + }, + "resources": { + "$id": "3480", + "kind": "model", + "type": { + "$ref": "822" + }, + "value": { + "$id": "3481", + "limits": { + "$id": "3482", + "kind": "dict", + "type": { + "$ref": "824" + }, + "value": { + "$id": "3483", + "key2719": { + "$id": "3484", + "kind": "string", + "type": { + "$ref": "826" + }, + "value": "hmphcrgctu" + } + } + }, + "requests": { + "$id": "3485", + "kind": "dict", + "type": { + "$ref": "830" + }, + "value": { + "$id": "3486", + "key2909": { + "$id": "3487", + "kind": "string", + "type": { + "$ref": "832" + }, + "value": "txocprnyrsgvhfrg" + } + } + } + } + }, + "selector": { + "$id": "3488", + "kind": "model", + "type": { + "$ref": "838" + }, + "value": { + "$id": "3489", + "matchExpressions": { + "$id": "3490", + "kind": "array", + "type": { + "$ref": "840" + }, + "value": [ + { + "$id": "3491", + "kind": "model", + "type": { + "$ref": "841" + }, + "value": { + "$id": "3492", + "key": { + "$id": "3493", + "kind": "string", + "type": { + "$ref": "843" + }, + "value": "e" + }, + "operator": { + "$id": "3494", + "kind": "string", + "type": { + "$ref": "104" + }, + "value": "In" + }, + "values": { + "$id": "3495", + "kind": "array", + "type": { + "$ref": "850" + }, + "value": [ + { + "$id": "3496", + "kind": "string", + "type": { + "$ref": "851" + }, + "value": "slmpajlywqvuyknipgztsonqyybt" + } + ] + } + } + } + ] + }, + "matchLabels": { + "$id": "3497", + "kind": "dict", + "type": { + "$ref": "857" + }, + "value": { + "$id": "3498", + "key6673": { + "$id": "3499", + "kind": "string", + "type": { + "$ref": "859" + }, + "value": "wlngfalznwxnurzpgxomcxhbqefpr" + } + } + } + } + } + } + } + } + }, + "generateResourceLimits": { + "$id": "3500", + "kind": "model", + "type": { + "$ref": "872" + }, + "value": { + "$id": "3501", + "cpu": { + "$id": "3502", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Enabled" + } + } + }, + "memoryProfile": { + "$id": "3503", + "kind": "string", + "type": { + "$ref": "114" + }, + "value": "Tiny" + }, + "provisioningState": { + "$id": "3504", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Succeeded" + } + } + }, + "extendedLocation": { + "$id": "3505", + "kind": "model", + "type": { + "$ref": "510" + }, + "value": { + "$id": "3506", + "name": { + "$id": "3507", + "kind": "string", + "type": { + "$ref": "512" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "3508", + "kind": "string", + "type": { + "$ref": "44" + }, + "value": "CustomLocation" + } + } + }, + "id": { + "$id": "3509", + "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": "3510", + "kind": "string", + "type": { + "$ref": "424" + }, + "value": "dowrkel" + }, + "type": { + "$id": "3511", + "kind": "string", + "type": { + "$ref": "428" + }, + "value": "xshjnsdgadygb" + }, + "systemData": { + "$id": "3512", + "kind": "model", + "type": { + "$ref": "433" + }, + "value": { + "$id": "3513", + "createdBy": { + "$id": "3514", + "kind": "string", + "type": { + "$ref": "435" + }, + "value": "ssvaslsmudloholronopqyxjcu" + }, + "createdByType": { + "$id": "3515", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "createdAt": { + "$id": "3516", + "kind": "string", + "type": { + "$ref": "442" + }, + "value": "2024-08-09T18:13:29.389Z" + }, + "lastModifiedBy": { + "$id": "3517", + "kind": "string", + "type": { + "$ref": "447" + }, + "value": "gnicpuszwd" + }, + "lastModifiedByType": { + "$id": "3518", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "3519", + "kind": "string", + "type": { + "$ref": "454" + }, + "value": "2024-08-09T18:13:29.389Z" + } + } + } + } + } + }, + { + "$id": "3520", + "response": { + "$ref": "2388" + }, + "statusCode": 201, + "bodyValue": { + "$id": "3521", + "kind": "model", + "type": { + "$ref": "599" + }, + "value": { + "$id": "3522", + "properties": { + "$id": "3523", + "kind": "model", + "type": { + "$ref": "602" + }, + "value": { + "$id": "3524", + "advanced": { + "$id": "3525", + "kind": "model", + "type": { + "$ref": "604" + }, + "value": { + "$id": "3526", + "clients": { + "$id": "3527", + "kind": "model", + "type": { + "$ref": "606" + }, + "value": { + "$id": "3528", + "maxSessionExpirySeconds": { + "$id": "3529", + "kind": "number", + "type": { + "$ref": "608" + }, + "value": 3859 + }, + "maxMessageExpirySeconds": { + "$id": "3530", + "kind": "number", + "type": { + "$ref": "612" + }, + "value": 3263 + }, + "maxPacketSizeBytes": { + "$id": "3531", + "kind": "number", + "type": { + "$ref": "616" + }, + "value": 3029 + }, + "subscriberQueueLimit": { + "$id": "3532", + "kind": "model", + "type": { + "$ref": "620" + }, + "value": { + "$id": "3533", + "length": { + "$id": "3534", + "kind": "number", + "type": { + "$ref": "622" + }, + "value": 6 + }, + "strategy": { + "$id": "3535", + "kind": "string", + "type": { + "$ref": "76" + }, + "value": "None" + } + } + }, + "maxReceiveMaximum": { + "$id": "3536", + "kind": "number", + "type": { + "$ref": "631" + }, + "value": 2365 + }, + "maxKeepAliveSeconds": { + "$id": "3537", + "kind": "number", + "type": { + "$ref": "635" + }, + "value": 3744 + } + } + }, + "encryptInternalTraffic": { + "$id": "3538", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Enabled" + }, + "internalCerts": { + "$id": "3539", + "kind": "model", + "type": { + "$ref": "644" + }, + "value": { + "$id": "3540", + "duration": { + "$id": "3541", + "kind": "string", + "type": { + "$ref": "646" + }, + "value": "bchrc" + }, + "renewBefore": { + "$id": "3542", + "kind": "string", + "type": { + "$ref": "650" + }, + "value": "xkafmpgjfifkwwrhkswtopdnne" + }, + "privateKey": { + "$id": "3543", + "kind": "model", + "type": { + "$ref": "654" + }, + "value": { + "$id": "3544", + "algorithm": { + "$id": "3545", + "kind": "string", + "type": { + "$ref": "82" + }, + "value": "Ec256" + }, + "rotationPolicy": { + "$id": "3546", + "kind": "string", + "type": { + "$ref": "98" + }, + "value": "Always" + } + } + } + } + } + } + }, + "cardinality": { + "$id": "3547", + "kind": "model", + "type": { + "$ref": "668" + }, + "value": { + "$id": "3548", + "backendChain": { + "$id": "3549", + "kind": "model", + "type": { + "$ref": "670" + }, + "value": { + "$id": "3550", + "partitions": { + "$id": "3551", + "kind": "number", + "type": { + "$ref": "672" + }, + "value": 11 + }, + "redundancyFactor": { + "$id": "3552", + "kind": "number", + "type": { + "$ref": "676" + }, + "value": 5 + }, + "workers": { + "$id": "3553", + "kind": "number", + "type": { + "$ref": "680" + }, + "value": 15 + } + } + }, + "frontend": { + "$id": "3554", + "kind": "model", + "type": { + "$ref": "686" + }, + "value": { + "$id": "3555", + "replicas": { + "$id": "3556", + "kind": "number", + "type": { + "$ref": "688" + }, + "value": 2 + }, + "workers": { + "$id": "3557", + "kind": "number", + "type": { + "$ref": "692" + }, + "value": 6 + } + } + } + } + }, + "diagnostics": { + "$id": "3558", + "kind": "model", + "type": { + "$ref": "700" + }, + "value": { + "$id": "3559", + "logs": { + "$id": "3560", + "kind": "model", + "type": { + "$ref": "702" + }, + "value": { + "$id": "3561", + "level": { + "$id": "3562", + "kind": "string", + "type": { + "$ref": "704" + }, + "value": "rnmwokumdmebpmfxxxzvvjfdywotav" + } + } + }, + "metrics": { + "$id": "3563", + "kind": "model", + "type": { + "$ref": "710" + }, + "value": { + "$id": "3564", + "prometheusPort": { + "$id": "3565", + "kind": "number", + "type": { + "$ref": "712" + }, + "value": 7581 + } + } + }, + "selfCheck": { + "$id": "3566", + "kind": "model", + "type": { + "$ref": "718" + }, + "value": { + "$id": "3567", + "mode": { + "$id": "3568", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Enabled" + }, + "intervalSeconds": { + "$id": "3569", + "kind": "number", + "type": { + "$ref": "723" + }, + "value": 158 + }, + "timeoutSeconds": { + "$id": "3570", + "kind": "number", + "type": { + "$ref": "727" + }, + "value": 14 + } + } + }, + "traces": { + "$id": "3571", + "kind": "model", + "type": { + "$ref": "733" + }, + "value": { + "$id": "3572", + "mode": { + "$id": "3573", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Enabled" + }, + "cacheSizeMegabytes": { + "$id": "3574", + "kind": "number", + "type": { + "$ref": "738" + }, + "value": 28 + }, + "selfTracing": { + "$id": "3575", + "kind": "model", + "type": { + "$ref": "742" + }, + "value": { + "$id": "3576", + "mode": { + "$id": "3577", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Enabled" + }, + "intervalSeconds": { + "$id": "3578", + "kind": "number", + "type": { + "$ref": "747" + }, + "value": 22 + } + } + }, + "spanChannelCapacity": { + "$id": "3579", + "kind": "number", + "type": { + "$ref": "753" + }, + "value": 1000 + } + } + } + } + }, + "diskBackedMessageBuffer": { + "$id": "3580", + "kind": "model", + "type": { + "$ref": "761" + }, + "value": { + "$id": "3581", + "maxSize": { + "$id": "3582", + "kind": "string", + "type": { + "$ref": "763" + }, + "value": "500M" + }, + "ephemeralVolumeClaimSpec": { + "$id": "3583", + "kind": "model", + "type": { + "$ref": "767" + }, + "value": { + "$id": "3584", + "volumeName": { + "$id": "3585", + "kind": "string", + "type": { + "$ref": "769" + }, + "value": "c" + }, + "volumeMode": { + "$id": "3586", + "kind": "string", + "type": { + "$ref": "773" + }, + "value": "rxvpksjuuugqnqzeiprocknbn" + }, + "storageClassName": { + "$id": "3587", + "kind": "string", + "type": { + "$ref": "777" + }, + "value": "sseyhrjptkhrqvpdpjmornkqvon" + }, + "accessModes": { + "$id": "3588", + "kind": "array", + "type": { + "$ref": "781" + }, + "value": [ + { + "$id": "3589", + "kind": "string", + "type": { + "$ref": "782" + }, + "value": "nuluhigrbb" + } + ] + }, + "dataSource": { + "$id": "3590", + "kind": "model", + "type": { + "$ref": "786" + }, + "value": { + "$id": "3591", + "apiGroup": { + "$id": "3592", + "kind": "string", + "type": { + "$ref": "788" + }, + "value": "npqapyksvvpkohujx" + }, + "kind": { + "$id": "3593", + "kind": "string", + "type": { + "$ref": "792" + }, + "value": "wazgyb" + }, + "name": { + "$id": "3594", + "kind": "string", + "type": { + "$ref": "796" + }, + "value": "cwhsgxxcxsyppoefm" + } + } + }, + "dataSourceRef": { + "$id": "3595", + "kind": "model", + "type": { + "$ref": "802" + }, + "value": { + "$id": "3596", + "apiGroup": { + "$id": "3597", + "kind": "string", + "type": { + "$ref": "804" + }, + "value": "mnfnykznjjsoqpfsgdqioupt" + }, + "kind": { + "$id": "3598", + "kind": "string", + "type": { + "$ref": "808" + }, + "value": "odynqzekfzsnawrctaxg" + }, + "name": { + "$id": "3599", + "kind": "string", + "type": { + "$ref": "812" + }, + "value": "envszivbbmixbyddzg" + }, + "namespace": { + "$id": "3600", + "kind": "string", + "type": { + "$ref": "816" + }, + "value": "etcfzvxqd" + } + } + }, + "resources": { + "$id": "3601", + "kind": "model", + "type": { + "$ref": "822" + }, + "value": { + "$id": "3602", + "limits": { + "$id": "3603", + "kind": "dict", + "type": { + "$ref": "824" + }, + "value": { + "$id": "3604", + "key2719": { + "$id": "3605", + "kind": "string", + "type": { + "$ref": "826" + }, + "value": "hmphcrgctu" + } + } + }, + "requests": { + "$id": "3606", + "kind": "dict", + "type": { + "$ref": "830" + }, + "value": { + "$id": "3607", + "key2909": { + "$id": "3608", + "kind": "string", + "type": { + "$ref": "832" + }, + "value": "txocprnyrsgvhfrg" + } + } + } + } + }, + "selector": { + "$id": "3609", + "kind": "model", + "type": { + "$ref": "838" + }, + "value": { + "$id": "3610", + "matchExpressions": { + "$id": "3611", + "kind": "array", + "type": { + "$ref": "840" + }, + "value": [ + { + "$id": "3612", + "kind": "model", + "type": { + "$ref": "841" + }, + "value": { + "$id": "3613", + "key": { + "$id": "3614", + "kind": "string", + "type": { + "$ref": "843" + }, + "value": "e" + }, + "operator": { + "$id": "3615", + "kind": "string", + "type": { + "$ref": "104" + }, + "value": "In" + }, + "values": { + "$id": "3616", + "kind": "array", + "type": { + "$ref": "850" + }, + "value": [ + { + "$id": "3617", + "kind": "string", + "type": { + "$ref": "851" + }, + "value": "slmpajlywqvuyknipgztsonqyybt" + } + ] + } + } + } + ] + }, + "matchLabels": { + "$id": "3618", + "kind": "dict", + "type": { + "$ref": "857" + }, + "value": { + "$id": "3619", + "key6673": { + "$id": "3620", + "kind": "string", + "type": { + "$ref": "859" + }, + "value": "wlngfalznwxnurzpgxomcxhbqefpr" + } + } + } + } + } + } + }, + "persistentVolumeClaimSpec": { + "$id": "3621", + "kind": "model", + "type": { + "$ref": "767" + }, + "value": { + "$id": "3622", + "volumeName": { + "$id": "3623", + "kind": "string", + "type": { + "$ref": "769" + }, + "value": "c" + }, + "volumeMode": { + "$id": "3624", + "kind": "string", + "type": { + "$ref": "773" + }, + "value": "rxvpksjuuugqnqzeiprocknbn" + }, + "storageClassName": { + "$id": "3625", + "kind": "string", + "type": { + "$ref": "777" + }, + "value": "sseyhrjptkhrqvpdpjmornkqvon" + }, + "accessModes": { + "$id": "3626", + "kind": "array", + "type": { + "$ref": "781" + }, + "value": [ + { + "$id": "3627", + "kind": "string", + "type": { + "$ref": "782" + }, + "value": "nuluhigrbb" + } + ] + }, + "dataSource": { + "$id": "3628", + "kind": "model", + "type": { + "$ref": "786" + }, + "value": { + "$id": "3629", + "apiGroup": { + "$id": "3630", + "kind": "string", + "type": { + "$ref": "788" + }, + "value": "npqapyksvvpkohujx" + }, + "kind": { + "$id": "3631", + "kind": "string", + "type": { + "$ref": "792" + }, + "value": "wazgyb" + }, + "name": { + "$id": "3632", + "kind": "string", + "type": { + "$ref": "796" + }, + "value": "cwhsgxxcxsyppoefm" + } + } + }, + "dataSourceRef": { + "$id": "3633", + "kind": "model", + "type": { + "$ref": "802" + }, + "value": { + "$id": "3634", + "apiGroup": { + "$id": "3635", + "kind": "string", + "type": { + "$ref": "804" + }, + "value": "mnfnykznjjsoqpfsgdqioupt" + }, + "kind": { + "$id": "3636", + "kind": "string", + "type": { + "$ref": "808" + }, + "value": "odynqzekfzsnawrctaxg" + }, + "name": { + "$id": "3637", + "kind": "string", + "type": { + "$ref": "812" + }, + "value": "envszivbbmixbyddzg" + }, + "namespace": { + "$id": "3638", + "kind": "string", + "type": { + "$ref": "816" + }, + "value": "etcfzvxqd" + } + } + }, + "resources": { + "$id": "3639", + "kind": "model", + "type": { + "$ref": "822" + }, + "value": { + "$id": "3640", + "limits": { + "$id": "3641", + "kind": "dict", + "type": { + "$ref": "824" + }, + "value": { + "$id": "3642", + "key2719": { + "$id": "3643", + "kind": "string", + "type": { + "$ref": "826" + }, + "value": "hmphcrgctu" + } + } + }, + "requests": { + "$id": "3644", + "kind": "dict", + "type": { + "$ref": "830" + }, + "value": { + "$id": "3645", + "key2909": { + "$id": "3646", + "kind": "string", + "type": { + "$ref": "832" + }, + "value": "txocprnyrsgvhfrg" + } + } + } + } + }, + "selector": { + "$id": "3647", + "kind": "model", + "type": { + "$ref": "838" + }, + "value": { + "$id": "3648", + "matchExpressions": { + "$id": "3649", + "kind": "array", + "type": { + "$ref": "840" + }, + "value": [ + { + "$id": "3650", + "kind": "model", + "type": { + "$ref": "841" + }, + "value": { + "$id": "3651", + "key": { + "$id": "3652", + "kind": "string", + "type": { + "$ref": "843" + }, + "value": "e" + }, + "operator": { + "$id": "3653", + "kind": "string", + "type": { + "$ref": "104" + }, + "value": "In" + }, + "values": { + "$id": "3654", + "kind": "array", + "type": { + "$ref": "850" + }, + "value": [ + { + "$id": "3655", + "kind": "string", + "type": { + "$ref": "851" + }, + "value": "slmpajlywqvuyknipgztsonqyybt" + } + ] + } + } + } + ] + }, + "matchLabels": { + "$id": "3656", + "kind": "dict", + "type": { + "$ref": "857" + }, + "value": { + "$id": "3657", + "key6673": { + "$id": "3658", + "kind": "string", + "type": { + "$ref": "859" + }, + "value": "wlngfalznwxnurzpgxomcxhbqefpr" + } + } + } + } + } + } + } + } + }, + "generateResourceLimits": { + "$id": "3659", + "kind": "model", + "type": { + "$ref": "872" + }, + "value": { + "$id": "3660", + "cpu": { + "$id": "3661", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Enabled" + } + } + }, + "memoryProfile": { + "$id": "3662", + "kind": "string", + "type": { + "$ref": "114" + }, + "value": "Tiny" + }, + "provisioningState": { + "$id": "3663", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Succeeded" + } + } + }, + "extendedLocation": { + "$id": "3664", + "kind": "model", + "type": { + "$ref": "510" + }, + "value": { + "$id": "3665", + "name": { + "$id": "3666", + "kind": "string", + "type": { + "$ref": "512" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "3667", + "kind": "string", + "type": { + "$ref": "44" + }, + "value": "CustomLocation" + } + } + }, + "id": { + "$id": "3668", + "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": "3669", + "kind": "string", + "type": { + "$ref": "424" + }, + "value": "dowrkel" + }, + "type": { + "$id": "3670", + "kind": "string", + "type": { + "$ref": "428" + }, + "value": "xshjnsdgadygb" + }, + "systemData": { + "$id": "3671", + "kind": "model", + "type": { + "$ref": "433" + }, + "value": { + "$id": "3672", + "createdBy": { + "$id": "3673", + "kind": "string", + "type": { + "$ref": "435" + }, + "value": "ssvaslsmudloholronopqyxjcu" + }, + "createdByType": { + "$id": "3674", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "createdAt": { + "$id": "3675", + "kind": "string", + "type": { + "$ref": "442" + }, + "value": "2024-08-09T18:13:29.389Z" + }, + "lastModifiedBy": { + "$id": "3676", + "kind": "string", + "type": { + "$ref": "447" + }, + "value": "gnicpuszwd" + }, + "lastModifiedByType": { + "$id": "3677", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "3678", + "kind": "string", + "type": { + "$ref": "454" + }, + "value": "2024-08-09T18:13:29.389Z" + } + } + } + } + } + } + ] + } + ] + }, + { + "$id": "3679", + "name": "delete", + "resourceName": "BrokerResource", + "doc": "Delete a BrokerResource", + "accessibility": "public", + "parameters": [ + { + "$id": "3680", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "3681", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "3682", + "type": { + "$id": "3683", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-04-01" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3684", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "3685", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "3686", + "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": "3687", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "3688", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3689", + "name": "instanceName", + "nameInRequest": "instanceName", + "doc": "Name of instance.", + "type": { + "$id": "3690", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3691", + "name": "brokerName", + "nameInRequest": "brokerName", + "doc": "Name of broker.", + "type": { + "$id": "3692", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3693", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "3694", + "kind": "constant", + "valueType": { + "$id": "3695", + "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": "3696", + "statusCodes": [ + 202 + ], + "headers": [ + { + "$id": "3697", + "name": "location", + "nameInResponse": "Location", + "doc": "The Location header contains the URL where the status of the long running operation can be checked.", + "type": { + "$id": "3698", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + { + "$id": "3699", + "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": "3700", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + } + } + ], + "isErrorResponse": false + }, + { + "$id": "3701", + "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": "3702", + "finalStateVia": 1, + "finalResponse": { + "$id": "3703", + "statusCodes": [ + 204 + ] + } + }, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.IoTOperations.Broker.delete", + "decorators": [], + "examples": [ + { + "$id": "3704", + "kind": "http", + "name": "Broker_Delete", + "description": "Broker_Delete", + "filePath": "2025-04-01/Broker_Delete_MaximumSet_Gen.json", + "parameters": [ + { + "$id": "3705", + "parameter": { + "$ref": "3680" + }, + "value": { + "$id": "3706", + "kind": "string", + "type": { + "$ref": "3681" + }, + "value": "2025-04-01" + } + }, + { + "$id": "3707", + "parameter": { + "$ref": "3684" + }, + "value": { + "$id": "3708", + "kind": "string", + "type": { + "$ref": "3685" + }, + "value": "F8C729F9-DF9C-4743-848F-96EE433D8E53" + } + }, + { + "$id": "3709", + "parameter": { + "$ref": "3687" + }, + "value": { + "$id": "3710", + "kind": "string", + "type": { + "$ref": "3688" + }, + "value": "rgiotoperations" + } + }, + { + "$id": "3711", + "parameter": { + "$ref": "3689" + }, + "value": { + "$id": "3712", + "kind": "string", + "type": { + "$ref": "3690" + }, + "value": "resource-name123" + } + }, + { + "$id": "3713", + "parameter": { + "$ref": "3691" + }, + "value": { + "$id": "3714", + "kind": "string", + "type": { + "$ref": "3692" + }, + "value": "resource-name123" + } + } + ], + "responses": [ + { + "$id": "3715", + "response": { + "$ref": "3696" + }, + "statusCode": 202 + }, + { + "$id": "3716", + "response": { + "$ref": "3701" + }, + "statusCode": 204 + } + ] + } + ] + }, + { + "$id": "3717", + "name": "listByResourceGroup", + "resourceName": "BrokerResource", + "doc": "List BrokerResource resources by InstanceResource", + "accessibility": "public", + "parameters": [ + { + "$id": "3718", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "3719", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "3720", + "type": { + "$id": "3721", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-04-01" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3722", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "3723", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "3724", + "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": "3725", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "3726", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3727", + "name": "instanceName", + "nameInRequest": "instanceName", + "doc": "Name of instance.", + "type": { + "$id": "3728", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3729", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "3730", + "kind": "constant", + "valueType": { + "$id": "3731", + "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": "3732", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "889" + }, + "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": "3733", + "itemPropertySegments": [ + "value" + ], + "nextLink": { + "$id": "3734", + "responseSegments": [ + "nextLink" + ], + "responseLocation": "Body" + } + }, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.IoTOperations.Broker.listByResourceGroup", + "decorators": [], + "examples": [ + { + "$id": "3735", + "kind": "http", + "name": "Broker_ListByResourceGroup", + "description": "Broker_ListByResourceGroup", + "filePath": "2025-04-01/Broker_ListByResourceGroup_MaximumSet_Gen.json", + "parameters": [ + { + "$id": "3736", + "parameter": { + "$ref": "3718" + }, + "value": { + "$id": "3737", + "kind": "string", + "type": { + "$ref": "3719" + }, + "value": "2025-04-01" + } + }, + { + "$id": "3738", + "parameter": { + "$ref": "3722" + }, + "value": { + "$id": "3739", + "kind": "string", + "type": { + "$ref": "3723" + }, + "value": "F8C729F9-DF9C-4743-848F-96EE433D8E53" + } + }, + { + "$id": "3740", + "parameter": { + "$ref": "3725" + }, + "value": { + "$id": "3741", + "kind": "string", + "type": { + "$ref": "3726" + }, + "value": "rgiotoperations" + } + }, + { + "$id": "3742", + "parameter": { + "$ref": "3727" + }, + "value": { + "$id": "3743", + "kind": "string", + "type": { + "$ref": "3728" + }, + "value": "resource-name123" + } + } + ], + "responses": [ + { + "$id": "3744", + "response": { + "$ref": "3732" + }, + "statusCode": 200, + "bodyValue": { + "$id": "3745", + "kind": "model", + "type": { + "$ref": "889" + }, + "value": { + "$id": "3746", + "value": { + "$id": "3747", + "kind": "array", + "type": { + "$ref": "891" + }, + "value": [ + { + "$id": "3748", + "kind": "model", + "type": { + "$ref": "599" + }, + "value": { + "$id": "3749", + "properties": { + "$id": "3750", + "kind": "model", + "type": { + "$ref": "602" + }, + "value": { + "$id": "3751", + "advanced": { + "$id": "3752", + "kind": "model", + "type": { + "$ref": "604" + }, + "value": { + "$id": "3753", + "clients": { + "$id": "3754", + "kind": "model", + "type": { + "$ref": "606" + }, + "value": { + "$id": "3755", + "maxSessionExpirySeconds": { + "$id": "3756", + "kind": "number", + "type": { + "$ref": "608" + }, + "value": 3859 + }, + "maxMessageExpirySeconds": { + "$id": "3757", + "kind": "number", + "type": { + "$ref": "612" + }, + "value": 3263 + }, + "maxPacketSizeBytes": { + "$id": "3758", + "kind": "number", + "type": { + "$ref": "616" + }, + "value": 3029 + }, + "subscriberQueueLimit": { + "$id": "3759", + "kind": "model", + "type": { + "$ref": "620" + }, + "value": { + "$id": "3760", + "length": { + "$id": "3761", + "kind": "number", + "type": { + "$ref": "622" + }, + "value": 6 + }, + "strategy": { + "$id": "3762", + "kind": "string", + "type": { + "$ref": "76" + }, + "value": "None" + } + } + }, + "maxReceiveMaximum": { + "$id": "3763", + "kind": "number", + "type": { + "$ref": "631" + }, + "value": 2365 + }, + "maxKeepAliveSeconds": { + "$id": "3764", + "kind": "number", + "type": { + "$ref": "635" + }, + "value": 3744 + } + } + }, + "encryptInternalTraffic": { + "$id": "3765", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Enabled" + }, + "internalCerts": { + "$id": "3766", + "kind": "model", + "type": { + "$ref": "644" + }, + "value": { + "$id": "3767", + "duration": { + "$id": "3768", + "kind": "string", + "type": { + "$ref": "646" + }, + "value": "bchrc" + }, + "renewBefore": { + "$id": "3769", + "kind": "string", + "type": { + "$ref": "650" + }, + "value": "xkafmpgjfifkwwrhkswtopdnne" + }, + "privateKey": { + "$id": "3770", + "kind": "model", + "type": { + "$ref": "654" + }, + "value": { + "$id": "3771", + "algorithm": { + "$id": "3772", + "kind": "string", + "type": { + "$ref": "82" + }, + "value": "Ec256" + }, + "rotationPolicy": { + "$id": "3773", + "kind": "string", + "type": { + "$ref": "98" + }, + "value": "Always" + } + } + } + } + } + } + }, + "cardinality": { + "$id": "3774", + "kind": "model", + "type": { + "$ref": "668" + }, + "value": { + "$id": "3775", + "backendChain": { + "$id": "3776", + "kind": "model", + "type": { + "$ref": "670" + }, + "value": { + "$id": "3777", + "partitions": { + "$id": "3778", + "kind": "number", + "type": { + "$ref": "672" + }, + "value": 11 + }, + "redundancyFactor": { + "$id": "3779", + "kind": "number", + "type": { + "$ref": "676" + }, + "value": 5 + }, + "workers": { + "$id": "3780", + "kind": "number", + "type": { + "$ref": "680" + }, + "value": 15 + } + } + }, + "frontend": { + "$id": "3781", + "kind": "model", + "type": { + "$ref": "686" + }, + "value": { + "$id": "3782", + "replicas": { + "$id": "3783", + "kind": "number", + "type": { + "$ref": "688" + }, + "value": 2 + }, + "workers": { + "$id": "3784", + "kind": "number", + "type": { + "$ref": "692" + }, + "value": 6 + } + } + } + } + }, + "diagnostics": { + "$id": "3785", + "kind": "model", + "type": { + "$ref": "700" + }, + "value": { + "$id": "3786", + "logs": { + "$id": "3787", + "kind": "model", + "type": { + "$ref": "702" + }, + "value": { + "$id": "3788", + "level": { + "$id": "3789", + "kind": "string", + "type": { + "$ref": "704" + }, + "value": "rnmwokumdmebpmfxxxzvvjfdywotav" + } + } + }, + "metrics": { + "$id": "3790", + "kind": "model", + "type": { + "$ref": "710" + }, + "value": { + "$id": "3791", + "prometheusPort": { + "$id": "3792", + "kind": "number", + "type": { + "$ref": "712" + }, + "value": 7581 + } + } + }, + "selfCheck": { + "$id": "3793", + "kind": "model", + "type": { + "$ref": "718" + }, + "value": { + "$id": "3794", + "mode": { + "$id": "3795", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Enabled" + }, + "intervalSeconds": { + "$id": "3796", + "kind": "number", + "type": { + "$ref": "723" + }, + "value": 158 + }, + "timeoutSeconds": { + "$id": "3797", + "kind": "number", + "type": { + "$ref": "727" + }, + "value": 14 + } + } + }, + "traces": { + "$id": "3798", + "kind": "model", + "type": { + "$ref": "733" + }, + "value": { + "$id": "3799", + "mode": { + "$id": "3800", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Enabled" + }, + "cacheSizeMegabytes": { + "$id": "3801", + "kind": "number", + "type": { + "$ref": "738" + }, + "value": 28 + }, + "selfTracing": { + "$id": "3802", + "kind": "model", + "type": { + "$ref": "742" + }, + "value": { + "$id": "3803", + "mode": { + "$id": "3804", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Enabled" + }, + "intervalSeconds": { + "$id": "3805", + "kind": "number", + "type": { + "$ref": "747" + }, + "value": 22 + } + } + }, + "spanChannelCapacity": { + "$id": "3806", + "kind": "number", + "type": { + "$ref": "753" + }, + "value": 1000 + } + } + } + } + }, + "diskBackedMessageBuffer": { + "$id": "3807", + "kind": "model", + "type": { + "$ref": "761" + }, + "value": { + "$id": "3808", + "maxSize": { + "$id": "3809", + "kind": "string", + "type": { + "$ref": "763" + }, + "value": "500M" + }, + "ephemeralVolumeClaimSpec": { + "$id": "3810", + "kind": "model", + "type": { + "$ref": "767" + }, + "value": { + "$id": "3811", + "volumeName": { + "$id": "3812", + "kind": "string", + "type": { + "$ref": "769" + }, + "value": "c" + }, + "volumeMode": { + "$id": "3813", + "kind": "string", + "type": { + "$ref": "773" + }, + "value": "rxvpksjuuugqnqzeiprocknbn" + }, + "storageClassName": { + "$id": "3814", + "kind": "string", + "type": { + "$ref": "777" + }, + "value": "sseyhrjptkhrqvpdpjmornkqvon" + }, + "accessModes": { + "$id": "3815", + "kind": "array", + "type": { + "$ref": "781" + }, + "value": [ + { + "$id": "3816", + "kind": "string", + "type": { + "$ref": "782" + }, + "value": "nuluhigrbb" + } + ] + }, + "dataSource": { + "$id": "3817", + "kind": "model", + "type": { + "$ref": "786" + }, + "value": { + "$id": "3818", + "apiGroup": { + "$id": "3819", + "kind": "string", + "type": { + "$ref": "788" + }, + "value": "npqapyksvvpkohujx" + }, + "kind": { + "$id": "3820", + "kind": "string", + "type": { + "$ref": "792" + }, + "value": "wazgyb" + }, + "name": { + "$id": "3821", + "kind": "string", + "type": { + "$ref": "796" + }, + "value": "cwhsgxxcxsyppoefm" + } + } + }, + "dataSourceRef": { + "$id": "3822", + "kind": "model", + "type": { + "$ref": "802" + }, + "value": { + "$id": "3823", + "apiGroup": { + "$id": "3824", + "kind": "string", + "type": { + "$ref": "804" + }, + "value": "mnfnykznjjsoqpfsgdqioupt" + }, + "kind": { + "$id": "3825", + "kind": "string", + "type": { + "$ref": "808" + }, + "value": "odynqzekfzsnawrctaxg" + }, + "name": { + "$id": "3826", + "kind": "string", + "type": { + "$ref": "812" + }, + "value": "envszivbbmixbyddzg" + }, + "namespace": { + "$id": "3827", + "kind": "string", + "type": { + "$ref": "816" + }, + "value": "etcfzvxqd" + } + } + }, + "resources": { + "$id": "3828", + "kind": "model", + "type": { + "$ref": "822" + }, + "value": { + "$id": "3829", + "limits": { + "$id": "3830", + "kind": "dict", + "type": { + "$ref": "824" + }, + "value": { + "$id": "3831", + "key2719": { + "$id": "3832", + "kind": "string", + "type": { + "$ref": "826" + }, + "value": "hmphcrgctu" + } + } + }, + "requests": { + "$id": "3833", + "kind": "dict", + "type": { + "$ref": "830" + }, + "value": { + "$id": "3834", + "key2909": { + "$id": "3835", + "kind": "string", + "type": { + "$ref": "832" + }, + "value": "txocprnyrsgvhfrg" + } + } + } + } + }, + "selector": { + "$id": "3836", + "kind": "model", + "type": { + "$ref": "838" + }, + "value": { + "$id": "3837", + "matchExpressions": { + "$id": "3838", + "kind": "array", + "type": { + "$ref": "840" + }, + "value": [ + { + "$id": "3839", + "kind": "model", + "type": { + "$ref": "841" + }, + "value": { + "$id": "3840", + "key": { + "$id": "3841", + "kind": "string", + "type": { + "$ref": "843" + }, + "value": "e" + }, + "operator": { + "$id": "3842", + "kind": "string", + "type": { + "$ref": "104" + }, + "value": "In" + }, + "values": { + "$id": "3843", + "kind": "array", + "type": { + "$ref": "850" + }, + "value": [ + { + "$id": "3844", + "kind": "string", + "type": { + "$ref": "851" + }, + "value": "slmpajlywqvuyknipgztsonqyybt" + } + ] + } + } + } + ] + }, + "matchLabels": { + "$id": "3845", + "kind": "dict", + "type": { + "$ref": "857" + }, + "value": { + "$id": "3846", + "key6673": { + "$id": "3847", + "kind": "string", + "type": { + "$ref": "859" + }, + "value": "wlngfalznwxnurzpgxomcxhbqefpr" + } + } + } + } + } + } + }, + "persistentVolumeClaimSpec": { + "$id": "3848", + "kind": "model", + "type": { + "$ref": "767" + }, + "value": { + "$id": "3849", + "volumeName": { + "$id": "3850", + "kind": "string", + "type": { + "$ref": "769" + }, + "value": "c" + }, + "volumeMode": { + "$id": "3851", + "kind": "string", + "type": { + "$ref": "773" + }, + "value": "rxvpksjuuugqnqzeiprocknbn" + }, + "storageClassName": { + "$id": "3852", + "kind": "string", + "type": { + "$ref": "777" + }, + "value": "sseyhrjptkhrqvpdpjmornkqvon" + }, + "accessModes": { + "$id": "3853", + "kind": "array", + "type": { + "$ref": "781" + }, + "value": [ + { + "$id": "3854", + "kind": "string", + "type": { + "$ref": "782" + }, + "value": "nuluhigrbb" + } + ] + }, + "dataSource": { + "$id": "3855", + "kind": "model", + "type": { + "$ref": "786" + }, + "value": { + "$id": "3856", + "apiGroup": { + "$id": "3857", + "kind": "string", + "type": { + "$ref": "788" + }, + "value": "npqapyksvvpkohujx" + }, + "kind": { + "$id": "3858", + "kind": "string", + "type": { + "$ref": "792" + }, + "value": "wazgyb" + }, + "name": { + "$id": "3859", + "kind": "string", + "type": { + "$ref": "796" + }, + "value": "cwhsgxxcxsyppoefm" + } + } + }, + "dataSourceRef": { + "$id": "3860", + "kind": "model", + "type": { + "$ref": "802" + }, + "value": { + "$id": "3861", + "apiGroup": { + "$id": "3862", + "kind": "string", + "type": { + "$ref": "804" + }, + "value": "mnfnykznjjsoqpfsgdqioupt" + }, + "kind": { + "$id": "3863", + "kind": "string", + "type": { + "$ref": "808" + }, + "value": "odynqzekfzsnawrctaxg" + }, + "name": { + "$id": "3864", + "kind": "string", + "type": { + "$ref": "812" + }, + "value": "envszivbbmixbyddzg" + }, + "namespace": { + "$id": "3865", + "kind": "string", + "type": { + "$ref": "816" + }, + "value": "etcfzvxqd" + } + } + }, + "resources": { + "$id": "3866", + "kind": "model", + "type": { + "$ref": "822" + }, + "value": { + "$id": "3867", + "limits": { + "$id": "3868", + "kind": "dict", + "type": { + "$ref": "824" + }, + "value": { + "$id": "3869", + "key2719": { + "$id": "3870", + "kind": "string", + "type": { + "$ref": "826" + }, + "value": "hmphcrgctu" + } + } + }, + "requests": { + "$id": "3871", + "kind": "dict", + "type": { + "$ref": "830" + }, + "value": { + "$id": "3872", + "key2909": { + "$id": "3873", + "kind": "string", + "type": { + "$ref": "832" + }, + "value": "txocprnyrsgvhfrg" + } + } + } + } + }, + "selector": { + "$id": "3874", + "kind": "model", + "type": { + "$ref": "838" + }, + "value": { + "$id": "3875", + "matchExpressions": { + "$id": "3876", + "kind": "array", + "type": { + "$ref": "840" + }, + "value": [ + { + "$id": "3877", + "kind": "model", + "type": { + "$ref": "841" + }, + "value": { + "$id": "3878", + "key": { + "$id": "3879", + "kind": "string", + "type": { + "$ref": "843" + }, + "value": "e" + }, + "operator": { + "$id": "3880", + "kind": "string", + "type": { + "$ref": "104" + }, + "value": "In" + }, + "values": { + "$id": "3881", + "kind": "array", + "type": { + "$ref": "850" + }, + "value": [ + { + "$id": "3882", + "kind": "string", + "type": { + "$ref": "851" + }, + "value": "slmpajlywqvuyknipgztsonqyybt" + } + ] + } + } + } + ] + }, + "matchLabels": { + "$id": "3883", + "kind": "dict", + "type": { + "$ref": "857" + }, + "value": { + "$id": "3884", + "key6673": { + "$id": "3885", + "kind": "string", + "type": { + "$ref": "859" + }, + "value": "wlngfalznwxnurzpgxomcxhbqefpr" + } + } + } + } + } + } + } + } + }, + "generateResourceLimits": { + "$id": "3886", + "kind": "model", + "type": { + "$ref": "872" + }, + "value": { + "$id": "3887", + "cpu": { + "$id": "3888", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Enabled" + } + } + }, + "memoryProfile": { + "$id": "3889", + "kind": "string", + "type": { + "$ref": "114" + }, + "value": "Tiny" + }, + "provisioningState": { + "$id": "3890", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Succeeded" + } + } + }, + "extendedLocation": { + "$id": "3891", + "kind": "model", + "type": { + "$ref": "510" + }, + "value": { + "$id": "3892", + "name": { + "$id": "3893", + "kind": "string", + "type": { + "$ref": "512" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "3894", + "kind": "string", + "type": { + "$ref": "44" + }, + "value": "CustomLocation" + } + } + }, + "id": { + "$id": "3895", + "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": "3896", + "kind": "string", + "type": { + "$ref": "424" + }, + "value": "dowrkel" + }, + "type": { + "$id": "3897", + "kind": "string", + "type": { + "$ref": "428" + }, + "value": "xshjnsdgadygb" + }, + "systemData": { + "$id": "3898", + "kind": "model", + "type": { + "$ref": "433" + }, + "value": { + "$id": "3899", + "createdBy": { + "$id": "3900", + "kind": "string", + "type": { + "$ref": "435" + }, + "value": "ssvaslsmudloholronopqyxjcu" + }, + "createdByType": { + "$id": "3901", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "createdAt": { + "$id": "3902", + "kind": "string", + "type": { + "$ref": "442" + }, + "value": "2024-08-09T18:13:29.389Z" + }, + "lastModifiedBy": { + "$id": "3903", + "kind": "string", + "type": { + "$ref": "447" + }, + "value": "gnicpuszwd" + }, + "lastModifiedByType": { + "$id": "3904", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "3905", + "kind": "string", + "type": { + "$ref": "454" + }, + "value": "2024-08-09T18:13:29.389Z" + } + } + } + } + } + ] + }, + "nextLink": { + "$id": "3906", + "kind": "string", + "type": { + "$ref": "895" + }, + "value": "https://microsoft.com/a" + } + } + } + } + ] + } + ] + } + ], + "parameters": [ + { + "$id": "3907", + "name": "endpoint", + "nameInRequest": "endpoint", + "doc": "Service host", + "type": { + "$id": "3908", + "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": "3909", + "type": { + "$id": "3910", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "https://management.azure.com" + } + } + ], + "decorators": [ + { + "$id": "3911", + "name": "Azure.ResourceManager.@armResourceOperations", + "arguments": { + "$id": "3912" + } + } + ], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.Broker", + "apiVersions": [ + "2024-11-01", + "2025-04-01" + ], + "parent": { + "$ref": "1692" + } + }, + { + "$id": "3913", + "kind": "client", + "name": "BrokerListener", + "namespace": "Azure.ResourceManager.IotOperations", + "operations": [ + { + "$id": "3914", + "name": "get", + "resourceName": "BrokerListenerResource", + "doc": "Get a BrokerListenerResource", + "accessibility": "public", + "parameters": [ + { + "$id": "3915", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "3916", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "3917", + "type": { + "$id": "3918", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-04-01" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3919", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "3920", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "3921", + "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": "3922", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "3923", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3924", + "name": "instanceName", + "nameInRequest": "instanceName", + "doc": "Name of instance.", + "type": { + "$id": "3925", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3926", + "name": "brokerName", + "nameInRequest": "brokerName", + "doc": "Name of broker.", + "type": { + "$id": "3927", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3928", + "name": "listenerName", + "nameInRequest": "listenerName", + "doc": "Name of Instance broker listener resource", + "type": { + "$id": "3929", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3930", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "3931", + "kind": "constant", + "valueType": { + "$id": "3932", + "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": "3933", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "899" + }, + "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": "3934", + "kind": "http", + "name": "BrokerListener_Get", + "description": "BrokerListener_Get", + "filePath": "2025-04-01/BrokerListener_Get_MaximumSet_Gen.json", + "parameters": [ + { + "$id": "3935", + "parameter": { + "$ref": "3915" + }, + "value": { + "$id": "3936", + "kind": "string", + "type": { + "$ref": "3916" + }, + "value": "2025-04-01" + } + }, + { + "$id": "3937", + "parameter": { + "$ref": "3919" + }, + "value": { + "$id": "3938", + "kind": "string", + "type": { + "$ref": "3920" + }, + "value": "F8C729F9-DF9C-4743-848F-96EE433D8E53" + } + }, + { + "$id": "3939", + "parameter": { + "$ref": "3922" + }, + "value": { + "$id": "3940", + "kind": "string", + "type": { + "$ref": "3923" + }, + "value": "rgiotoperations" + } + }, + { + "$id": "3941", + "parameter": { + "$ref": "3924" + }, + "value": { + "$id": "3942", + "kind": "string", + "type": { + "$ref": "3925" + }, + "value": "resource-name123" + } + }, + { + "$id": "3943", + "parameter": { + "$ref": "3926" + }, + "value": { + "$id": "3944", + "kind": "string", + "type": { + "$ref": "3927" + }, + "value": "resource-name123" + } + }, + { + "$id": "3945", + "parameter": { + "$ref": "3928" + }, + "value": { + "$id": "3946", + "kind": "string", + "type": { + "$ref": "3929" + }, + "value": "resource-name123" + } + } + ], + "responses": [ + { + "$id": "3947", + "response": { + "$ref": "3933" + }, + "statusCode": 200, + "bodyValue": { + "$id": "3948", + "kind": "model", + "type": { + "$ref": "899" + }, + "value": { + "$id": "3949", + "properties": { + "$id": "3950", + "kind": "model", + "type": { + "$ref": "901" + }, + "value": { + "$id": "3951", + "serviceName": { + "$id": "3952", + "kind": "string", + "type": { + "$ref": "903" + }, + "value": "tpfiszlapdpxktx" + }, + "ports": { + "$id": "3953", + "kind": "array", + "type": { + "$ref": "907" + }, + "value": [ + { + "$id": "3954", + "kind": "model", + "type": { + "$ref": "908" + }, + "value": { + "$id": "3955", + "authenticationRef": { + "$id": "3956", + "kind": "string", + "type": { + "$ref": "910" + }, + "value": "tjvdroaqqy" + }, + "authorizationRef": { + "$id": "3957", + "kind": "string", + "type": { + "$ref": "914" + }, + "value": "inxhvxnwswyrvt" + }, + "nodePort": { + "$id": "3958", + "kind": "number", + "type": { + "$ref": "918" + }, + "value": 7281 + }, + "port": { + "$id": "3959", + "kind": "number", + "type": { + "$ref": "922" + }, + "value": 1268 + }, + "protocol": { + "$id": "3960", + "kind": "string", + "type": { + "$ref": "124" + }, + "value": "Mqtt" + }, + "tls": { + "$id": "3961", + "kind": "model", + "type": { + "$ref": "929" + }, + "value": { + "$id": "3962", + "mode": { + "$id": "3963", + "kind": "string", + "type": { + "$ref": "130" + }, + "value": "Automatic" + }, + "certManagerCertificateSpec": { + "$id": "3964", + "kind": "model", + "type": { + "$ref": "934" + }, + "value": { + "$id": "3965", + "duration": { + "$id": "3966", + "kind": "string", + "type": { + "$ref": "936" + }, + "value": "qmpeffoksron" + }, + "secretName": { + "$id": "3967", + "kind": "string", + "type": { + "$ref": "940" + }, + "value": "oagi" + }, + "renewBefore": { + "$id": "3968", + "kind": "string", + "type": { + "$ref": "944" + }, + "value": "hutno" + }, + "issuerRef": { + "$id": "3969", + "kind": "model", + "type": { + "$ref": "948" + }, + "value": { + "$id": "3970", + "group": { + "$id": "3971", + "kind": "string", + "type": { + "$ref": "950" + }, + "value": "jtmuladdkpasfpoyvewekmiy" + }, + "kind": { + "$id": "3972", + "kind": "string", + "type": { + "$ref": "136" + }, + "value": "Issuer" + }, + "name": { + "$id": "3973", + "kind": "string", + "type": { + "$ref": "957" + }, + "value": "ocwoqpgucvjrsuudtjhb" + } + } + }, + "privateKey": { + "$id": "3974", + "kind": "model", + "type": { + "$ref": "654" + }, + "value": { + "$id": "3975", + "algorithm": { + "$id": "3976", + "kind": "string", + "type": { + "$ref": "82" + }, + "value": "Ec256" + }, + "rotationPolicy": { + "$id": "3977", + "kind": "string", + "type": { + "$ref": "98" + }, + "value": "Always" + } + } + }, + "san": { + "$id": "3978", + "kind": "model", + "type": { + "$ref": "966" + }, + "value": { + "$id": "3979", + "dns": { + "$id": "3980", + "kind": "array", + "type": { + "$ref": "968" + }, + "value": [ + { + "$id": "3981", + "kind": "string", + "type": { + "$ref": "969" + }, + "value": "xhvmhrrhgfsapocjeebqtnzarlj" + } + ] + }, + "ip": { + "$id": "3982", + "kind": "array", + "type": { + "$ref": "973" + }, + "value": [ + { + "$id": "3983", + "kind": "string", + "type": { + "$ref": "974" + }, + "value": "zbgugfzcgsmegevzktsnibyuyp" + } + ] + } + } + } + } + }, + "manual": { + "$id": "3984", + "kind": "model", + "type": { + "$ref": "982" + }, + "value": { + "$id": "3985", + "secretRef": { + "$id": "3986", + "kind": "string", + "type": { + "$ref": "984" + }, + "value": "secret-name" + } + } + } + } + } + } + } + ] + }, + "serviceType": { + "$id": "3987", + "kind": "string", + "type": { + "$ref": "142" + }, + "value": "ClusterIp" + }, + "provisioningState": { + "$id": "3988", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Succeeded" + } + } + }, + "extendedLocation": { + "$id": "3989", + "kind": "model", + "type": { + "$ref": "510" + }, + "value": { + "$id": "3990", + "name": { + "$id": "3991", + "kind": "string", + "type": { + "$ref": "512" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "3992", + "kind": "string", + "type": { + "$ref": "44" + }, + "value": "CustomLocation" + } + } + }, + "id": { + "$id": "3993", + "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": "3994", + "kind": "string", + "type": { + "$ref": "424" + }, + "value": "hoqjaachratt" + }, + "type": { + "$id": "3995", + "kind": "string", + "type": { + "$ref": "428" + }, + "value": "hizbknwegcdaeh" + }, + "systemData": { + "$id": "3996", + "kind": "model", + "type": { + "$ref": "433" + }, + "value": { + "$id": "3997", + "createdBy": { + "$id": "3998", + "kind": "string", + "type": { + "$ref": "435" + }, + "value": "ssvaslsmudloholronopqyxjcu" + }, + "createdByType": { + "$id": "3999", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "createdAt": { + "$id": "4000", + "kind": "string", + "type": { + "$ref": "442" + }, + "value": "2024-08-09T18:13:29.389Z" + }, + "lastModifiedBy": { + "$id": "4001", + "kind": "string", + "type": { + "$ref": "447" + }, + "value": "gnicpuszwd" + }, + "lastModifiedByType": { + "$id": "4002", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "4003", + "kind": "string", + "type": { + "$ref": "454" + }, + "value": "2024-08-09T18:13:29.389Z" + } + } + } + } + } + } + ] + } + ] + }, + { + "$id": "4004", + "name": "createOrUpdate", + "resourceName": "BrokerListenerResource", + "doc": "Create a BrokerListenerResource", + "accessibility": "public", + "parameters": [ + { + "$id": "4005", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "4006", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "4007", + "type": { + "$id": "4008", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-04-01" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4009", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "4010", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "4011", + "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": "4012", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "4013", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4014", + "name": "instanceName", + "nameInRequest": "instanceName", + "doc": "Name of instance.", + "type": { + "$id": "4015", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4016", + "name": "brokerName", + "nameInRequest": "brokerName", + "doc": "Name of broker.", + "type": { + "$id": "4017", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4018", + "name": "listenerName", + "nameInRequest": "listenerName", + "doc": "Name of Instance broker listener resource", + "type": { + "$id": "4019", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4020", + "name": "contentType", + "nameInRequest": "Content-Type", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$id": "4021", + "kind": "constant", + "valueType": { + "$id": "4022", + "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": "4023", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "4024", + "kind": "constant", + "valueType": { + "$id": "4025", + "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": "4026", + "name": "resource", + "nameInRequest": "resource", + "doc": "Resource create parameters.", + "type": { + "$ref": "899" + }, + "location": "Body", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "4027", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "899" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + }, + { + "$id": "4028", + "statusCodes": [ + 201 + ], + "bodyType": { + "$ref": "899" + }, + "headers": [ + { + "$id": "4029", + "name": "azureAsyncOperation", + "nameInResponse": "Azure-AsyncOperation", + "doc": "A link to the status monitor", + "type": { + "$id": "4030", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + { + "$id": "4031", + "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": "4032", + "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": "4033", + "finalStateVia": 0, + "finalResponse": { + "$id": "4034", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "899" + } + } + }, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.IoTOperations.BrokerListener.createOrUpdate", + "decorators": [], + "examples": [ + { + "$id": "4035", + "kind": "http", + "name": "BrokerListener_CreateOrUpdate_Complex", + "description": "BrokerListener_CreateOrUpdate_Complex", + "filePath": "2025-04-01/BrokerListener_CreateOrUpdate_Complex.json", + "parameters": [ + { + "$id": "4036", + "parameter": { + "$ref": "4005" + }, + "value": { + "$id": "4037", + "kind": "string", + "type": { + "$ref": "4006" + }, + "value": "2025-04-01" + } + }, + { + "$id": "4038", + "parameter": { + "$ref": "4009" + }, + "value": { + "$id": "4039", + "kind": "string", + "type": { + "$ref": "4010" + }, + "value": "F8C729F9-DF9C-4743-848F-96EE433D8E53" + } + }, + { + "$id": "4040", + "parameter": { + "$ref": "4012" + }, + "value": { + "$id": "4041", + "kind": "string", + "type": { + "$ref": "4013" + }, + "value": "rgiotoperations" + } + }, + { + "$id": "4042", + "parameter": { + "$ref": "4014" + }, + "value": { + "$id": "4043", + "kind": "string", + "type": { + "$ref": "4015" + }, + "value": "resource-name123" + } + }, + { + "$id": "4044", + "parameter": { + "$ref": "4016" + }, + "value": { + "$id": "4045", + "kind": "string", + "type": { + "$ref": "4017" + }, + "value": "resource-name123" + } + }, + { + "$id": "4046", + "parameter": { + "$ref": "4018" + }, + "value": { + "$id": "4047", + "kind": "string", + "type": { + "$ref": "4019" + }, + "value": "resource-name123" + } + }, + { + "$id": "4048", + "parameter": { + "$ref": "4026" + }, + "value": { + "$id": "4049", + "kind": "model", + "type": { + "$ref": "899" + }, + "value": { + "$id": "4050", + "properties": { + "$id": "4051", + "kind": "model", + "type": { + "$ref": "901" + }, + "value": { + "$id": "4052", + "serviceType": { + "$id": "4053", + "kind": "string", + "type": { + "$ref": "142" + }, + "value": "LoadBalancer" + }, + "ports": { + "$id": "4054", + "kind": "array", + "type": { + "$ref": "907" + }, + "value": [ + { + "$id": "4055", + "kind": "model", + "type": { + "$ref": "908" + }, + "value": { + "$id": "4056", + "port": { + "$id": "4057", + "kind": "number", + "type": { + "$ref": "922" + }, + "value": 8080 + }, + "authenticationRef": { + "$id": "4058", + "kind": "string", + "type": { + "$ref": "910" + }, + "value": "example-authentication" + }, + "protocol": { + "$id": "4059", + "kind": "string", + "type": { + "$ref": "124" + }, + "value": "WebSockets" + } + } + }, + { + "$id": "4060", + "kind": "model", + "type": { + "$ref": "908" + }, + "value": { + "$id": "4061", + "port": { + "$id": "4062", + "kind": "number", + "type": { + "$ref": "922" + }, + "value": 8443 + }, + "authenticationRef": { + "$id": "4063", + "kind": "string", + "type": { + "$ref": "910" + }, + "value": "example-authentication" + }, + "protocol": { + "$id": "4064", + "kind": "string", + "type": { + "$ref": "124" + }, + "value": "WebSockets" + }, + "tls": { + "$id": "4065", + "kind": "model", + "type": { + "$ref": "929" + }, + "value": { + "$id": "4066", + "mode": { + "$id": "4067", + "kind": "string", + "type": { + "$ref": "130" + }, + "value": "Automatic" + }, + "certManagerCertificateSpec": { + "$id": "4068", + "kind": "model", + "type": { + "$ref": "934" + }, + "value": { + "$id": "4069", + "issuerRef": { + "$id": "4070", + "kind": "model", + "type": { + "$ref": "948" + }, + "value": { + "$id": "4071", + "group": { + "$id": "4072", + "kind": "string", + "type": { + "$ref": "950" + }, + "value": "jtmuladdkpasfpoyvewekmiy" + }, + "name": { + "$id": "4073", + "kind": "string", + "type": { + "$ref": "957" + }, + "value": "example-issuer" + }, + "kind": { + "$id": "4074", + "kind": "string", + "type": { + "$ref": "136" + }, + "value": "Issuer" + } + } + } + } + } + } + } + } + }, + { + "$id": "4075", + "kind": "model", + "type": { + "$ref": "908" + }, + "value": { + "$id": "4076", + "port": { + "$id": "4077", + "kind": "number", + "type": { + "$ref": "922" + }, + "value": 1883 + }, + "authenticationRef": { + "$id": "4078", + "kind": "string", + "type": { + "$ref": "910" + }, + "value": "example-authentication" + } + } + }, + { + "$id": "4079", + "kind": "model", + "type": { + "$ref": "908" + }, + "value": { + "$id": "4080", + "port": { + "$id": "4081", + "kind": "number", + "type": { + "$ref": "922" + }, + "value": 8883 + }, + "authenticationRef": { + "$id": "4082", + "kind": "string", + "type": { + "$ref": "910" + }, + "value": "example-authentication" + }, + "tls": { + "$id": "4083", + "kind": "model", + "type": { + "$ref": "929" + }, + "value": { + "$id": "4084", + "mode": { + "$id": "4085", + "kind": "string", + "type": { + "$ref": "130" + }, + "value": "Manual" + }, + "manual": { + "$id": "4086", + "kind": "model", + "type": { + "$ref": "982" + }, + "value": { + "$id": "4087", + "secretRef": { + "$id": "4088", + "kind": "string", + "type": { + "$ref": "984" + }, + "value": "example-secret" + } + } + } + } + } + } + } + ] + } + } + }, + "extendedLocation": { + "$id": "4089", + "kind": "model", + "type": { + "$ref": "510" + }, + "value": { + "$id": "4090", + "name": { + "$id": "4091", + "kind": "string", + "type": { + "$ref": "512" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "4092", + "kind": "string", + "type": { + "$ref": "44" + }, + "value": "CustomLocation" + } + } + } + } + } + } + ], + "responses": [ + { + "$id": "4093", + "response": { + "$ref": "4027" + }, + "statusCode": 200, + "bodyValue": { + "$id": "4094", + "kind": "model", + "type": { + "$ref": "899" + }, + "value": { + "$id": "4095", + "properties": { + "$id": "4096", + "kind": "model", + "type": { + "$ref": "901" + }, + "value": { + "$id": "4097", + "serviceName": { + "$id": "4098", + "kind": "string", + "type": { + "$ref": "903" + }, + "value": "tpfiszlapdpxktx" + }, + "serviceType": { + "$id": "4099", + "kind": "string", + "type": { + "$ref": "142" + }, + "value": "LoadBalancer" + }, + "ports": { + "$id": "4100", + "kind": "array", + "type": { + "$ref": "907" + }, + "value": [ + { + "$id": "4101", + "kind": "model", + "type": { + "$ref": "908" + }, + "value": { + "$id": "4102", + "port": { + "$id": "4103", + "kind": "number", + "type": { + "$ref": "922" + }, + "value": 8080 + }, + "authenticationRef": { + "$id": "4104", + "kind": "string", + "type": { + "$ref": "910" + }, + "value": "example-authentication" + }, + "protocol": { + "$id": "4105", + "kind": "string", + "type": { + "$ref": "124" + }, + "value": "WebSockets" + } + } + }, + { + "$id": "4106", + "kind": "model", + "type": { + "$ref": "908" + }, + "value": { + "$id": "4107", + "port": { + "$id": "4108", + "kind": "number", + "type": { + "$ref": "922" + }, + "value": 8443 + }, + "authenticationRef": { + "$id": "4109", + "kind": "string", + "type": { + "$ref": "910" + }, + "value": "example-authentication" + }, + "protocol": { + "$id": "4110", + "kind": "string", + "type": { + "$ref": "124" + }, + "value": "WebSockets" + }, + "tls": { + "$id": "4111", + "kind": "model", + "type": { + "$ref": "929" + }, + "value": { + "$id": "4112", + "mode": { + "$id": "4113", + "kind": "string", + "type": { + "$ref": "130" + }, + "value": "Automatic" + }, + "certManagerCertificateSpec": { + "$id": "4114", + "kind": "model", + "type": { + "$ref": "934" + }, + "value": { + "$id": "4115", + "issuerRef": { + "$id": "4116", + "kind": "model", + "type": { + "$ref": "948" + }, + "value": { + "$id": "4117", + "group": { + "$id": "4118", + "kind": "string", + "type": { + "$ref": "950" + }, + "value": "jtmuladdkpasfpoyvewekmiy" + }, + "name": { + "$id": "4119", + "kind": "string", + "type": { + "$ref": "957" + }, + "value": "example-issuer" + }, + "kind": { + "$id": "4120", + "kind": "string", + "type": { + "$ref": "136" + }, + "value": "Issuer" + } + } + } + } + } + } + } + } + }, + { + "$id": "4121", + "kind": "model", + "type": { + "$ref": "908" + }, + "value": { + "$id": "4122", + "port": { + "$id": "4123", + "kind": "number", + "type": { + "$ref": "922" + }, + "value": 1883 + }, + "authenticationRef": { + "$id": "4124", + "kind": "string", + "type": { + "$ref": "910" + }, + "value": "example-authentication" + } + } + }, + { + "$id": "4125", + "kind": "model", + "type": { + "$ref": "908" + }, + "value": { + "$id": "4126", + "port": { + "$id": "4127", + "kind": "number", + "type": { + "$ref": "922" + }, + "value": 8883 + }, + "authenticationRef": { + "$id": "4128", + "kind": "string", + "type": { + "$ref": "910" + }, + "value": "example-authentication" + }, + "tls": { + "$id": "4129", + "kind": "model", + "type": { + "$ref": "929" + }, + "value": { + "$id": "4130", + "mode": { + "$id": "4131", + "kind": "string", + "type": { + "$ref": "130" + }, + "value": "Manual" + }, + "manual": { + "$id": "4132", + "kind": "model", + "type": { + "$ref": "982" + }, + "value": { + "$id": "4133", + "secretRef": { + "$id": "4134", + "kind": "string", + "type": { + "$ref": "984" + }, + "value": "example-secret" + } + } + } + } + } + } + } + ] + }, + "provisioningState": { + "$id": "4135", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Succeeded" + } + } + }, + "extendedLocation": { + "$id": "4136", + "kind": "model", + "type": { + "$ref": "510" + }, + "value": { + "$id": "4137", + "name": { + "$id": "4138", + "kind": "string", + "type": { + "$ref": "512" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "4139", + "kind": "string", + "type": { + "$ref": "44" + }, + "value": "CustomLocation" + } + } + }, + "id": { + "$id": "4140", + "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": "4141", + "kind": "string", + "type": { + "$ref": "424" + }, + "value": "hoqjaachratt" + }, + "type": { + "$id": "4142", + "kind": "string", + "type": { + "$ref": "428" + }, + "value": "hizbknwegcdaeh" + }, + "systemData": { + "$id": "4143", + "kind": "model", + "type": { + "$ref": "433" + }, + "value": { + "$id": "4144", + "createdBy": { + "$id": "4145", + "kind": "string", + "type": { + "$ref": "435" + }, + "value": "ssvaslsmudloholronopqyxjcu" + }, + "createdByType": { + "$id": "4146", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "createdAt": { + "$id": "4147", + "kind": "string", + "type": { + "$ref": "442" + }, + "value": "2024-08-09T18:13:29.389Z" + }, + "lastModifiedBy": { + "$id": "4148", + "kind": "string", + "type": { + "$ref": "447" + }, + "value": "gnicpuszwd" + }, + "lastModifiedByType": { + "$id": "4149", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "4150", + "kind": "string", + "type": { + "$ref": "454" + }, + "value": "2024-08-09T18:13:29.389Z" + } + } + } + } + } + }, + { + "$id": "4151", + "response": { + "$ref": "4028" + }, + "statusCode": 201, + "bodyValue": { + "$id": "4152", + "kind": "model", + "type": { + "$ref": "899" + }, + "value": { + "$id": "4153", + "properties": { + "$id": "4154", + "kind": "model", + "type": { + "$ref": "901" + }, + "value": { + "$id": "4155", + "serviceName": { + "$id": "4156", + "kind": "string", + "type": { + "$ref": "903" + }, + "value": "tpfiszlapdpxktx" + }, + "serviceType": { + "$id": "4157", + "kind": "string", + "type": { + "$ref": "142" + }, + "value": "LoadBalancer" + }, + "ports": { + "$id": "4158", + "kind": "array", + "type": { + "$ref": "907" + }, + "value": [ + { + "$id": "4159", + "kind": "model", + "type": { + "$ref": "908" + }, + "value": { + "$id": "4160", + "port": { + "$id": "4161", + "kind": "number", + "type": { + "$ref": "922" + }, + "value": 8080 + }, + "authenticationRef": { + "$id": "4162", + "kind": "string", + "type": { + "$ref": "910" + }, + "value": "example-authentication" + }, + "protocol": { + "$id": "4163", + "kind": "string", + "type": { + "$ref": "124" + }, + "value": "WebSockets" + } + } + }, + { + "$id": "4164", + "kind": "model", + "type": { + "$ref": "908" + }, + "value": { + "$id": "4165", + "port": { + "$id": "4166", + "kind": "number", + "type": { + "$ref": "922" + }, + "value": 8443 + }, + "authenticationRef": { + "$id": "4167", + "kind": "string", + "type": { + "$ref": "910" + }, + "value": "example-authentication" + }, + "protocol": { + "$id": "4168", + "kind": "string", + "type": { + "$ref": "124" + }, + "value": "WebSockets" + }, + "tls": { + "$id": "4169", + "kind": "model", + "type": { + "$ref": "929" + }, + "value": { + "$id": "4170", + "mode": { + "$id": "4171", + "kind": "string", + "type": { + "$ref": "130" + }, + "value": "Automatic" + }, + "certManagerCertificateSpec": { + "$id": "4172", + "kind": "model", + "type": { + "$ref": "934" + }, + "value": { + "$id": "4173", + "issuerRef": { + "$id": "4174", + "kind": "model", + "type": { + "$ref": "948" + }, + "value": { + "$id": "4175", + "group": { + "$id": "4176", + "kind": "string", + "type": { + "$ref": "950" + }, + "value": "jtmuladdkpasfpoyvewekmiy" + }, + "name": { + "$id": "4177", + "kind": "string", + "type": { + "$ref": "957" + }, + "value": "example-issuer" + }, + "kind": { + "$id": "4178", + "kind": "string", + "type": { + "$ref": "136" + }, + "value": "Issuer" + } + } + } + } + } + } + } + } + }, + { + "$id": "4179", + "kind": "model", + "type": { + "$ref": "908" + }, + "value": { + "$id": "4180", + "port": { + "$id": "4181", + "kind": "number", + "type": { + "$ref": "922" + }, + "value": 1883 + }, + "authenticationRef": { + "$id": "4182", + "kind": "string", + "type": { + "$ref": "910" + }, + "value": "example-authentication" + } + } + }, + { + "$id": "4183", + "kind": "model", + "type": { + "$ref": "908" + }, + "value": { + "$id": "4184", + "port": { + "$id": "4185", + "kind": "number", + "type": { + "$ref": "922" + }, + "value": 8883 + }, + "authenticationRef": { + "$id": "4186", + "kind": "string", + "type": { + "$ref": "910" + }, + "value": "example-authentication" + }, + "tls": { + "$id": "4187", + "kind": "model", + "type": { + "$ref": "929" + }, + "value": { + "$id": "4188", + "mode": { + "$id": "4189", + "kind": "string", + "type": { + "$ref": "130" + }, + "value": "Manual" + }, + "manual": { + "$id": "4190", + "kind": "model", + "type": { + "$ref": "982" + }, + "value": { + "$id": "4191", + "secretRef": { + "$id": "4192", + "kind": "string", + "type": { + "$ref": "984" + }, + "value": "example-secret" + } + } + } + } + } + } + } + ] + }, + "provisioningState": { + "$id": "4193", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Succeeded" + } + } + }, + "extendedLocation": { + "$id": "4194", + "kind": "model", + "type": { + "$ref": "510" + }, + "value": { + "$id": "4195", + "name": { + "$id": "4196", + "kind": "string", + "type": { + "$ref": "512" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "4197", + "kind": "string", + "type": { + "$ref": "44" + }, + "value": "CustomLocation" + } + } + }, + "id": { + "$id": "4198", + "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": "4199", + "kind": "string", + "type": { + "$ref": "424" + }, + "value": "hoqjaachratt" + }, + "type": { + "$id": "4200", + "kind": "string", + "type": { + "$ref": "428" + }, + "value": "hizbknwegcdaeh" + }, + "systemData": { + "$id": "4201", + "kind": "model", + "type": { + "$ref": "433" + }, + "value": { + "$id": "4202", + "createdBy": { + "$id": "4203", + "kind": "string", + "type": { + "$ref": "435" + }, + "value": "ssvaslsmudloholronopqyxjcu" + }, + "createdByType": { + "$id": "4204", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "createdAt": { + "$id": "4205", + "kind": "string", + "type": { + "$ref": "442" + }, + "value": "2024-08-09T18:13:29.389Z" + }, + "lastModifiedBy": { + "$id": "4206", + "kind": "string", + "type": { + "$ref": "447" + }, + "value": "gnicpuszwd" + }, + "lastModifiedByType": { + "$id": "4207", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "4208", + "kind": "string", + "type": { + "$ref": "454" + }, + "value": "2024-08-09T18:13:29.389Z" + } + } + } + } + } + } + ] + }, + { + "$id": "4209", + "kind": "http", + "name": "BrokerListener_CreateOrUpdate", + "description": "BrokerListener_CreateOrUpdate", + "filePath": "2025-04-01/BrokerListener_CreateOrUpdate_MaximumSet_Gen.json", + "parameters": [ + { + "$id": "4210", + "parameter": { + "$ref": "4005" + }, + "value": { + "$id": "4211", + "kind": "string", + "type": { + "$ref": "4006" + }, + "value": "2025-04-01" + } + }, + { + "$id": "4212", + "parameter": { + "$ref": "4009" + }, + "value": { + "$id": "4213", + "kind": "string", + "type": { + "$ref": "4010" + }, + "value": "F8C729F9-DF9C-4743-848F-96EE433D8E53" + } + }, + { + "$id": "4214", + "parameter": { + "$ref": "4012" + }, + "value": { + "$id": "4215", + "kind": "string", + "type": { + "$ref": "4013" + }, + "value": "rgiotoperations" + } + }, + { + "$id": "4216", + "parameter": { + "$ref": "4014" + }, + "value": { + "$id": "4217", + "kind": "string", + "type": { + "$ref": "4015" + }, + "value": "resource-name123" + } + }, + { + "$id": "4218", + "parameter": { + "$ref": "4016" + }, + "value": { + "$id": "4219", + "kind": "string", + "type": { + "$ref": "4017" + }, + "value": "resource-name123" + } + }, + { + "$id": "4220", + "parameter": { + "$ref": "4018" + }, + "value": { + "$id": "4221", + "kind": "string", + "type": { + "$ref": "4019" + }, + "value": "resource-name123" + } + }, + { + "$id": "4222", + "parameter": { + "$ref": "4026" + }, + "value": { + "$id": "4223", + "kind": "model", + "type": { + "$ref": "899" + }, + "value": { + "$id": "4224", + "properties": { + "$id": "4225", + "kind": "model", + "type": { + "$ref": "901" + }, + "value": { + "$id": "4226", + "serviceName": { + "$id": "4227", + "kind": "string", + "type": { + "$ref": "903" + }, + "value": "tpfiszlapdpxktx" + }, + "ports": { + "$id": "4228", + "kind": "array", + "type": { + "$ref": "907" + }, + "value": [ + { + "$id": "4229", + "kind": "model", + "type": { + "$ref": "908" + }, + "value": { + "$id": "4230", + "authenticationRef": { + "$id": "4231", + "kind": "string", + "type": { + "$ref": "910" + }, + "value": "tjvdroaqqy" + }, + "authorizationRef": { + "$id": "4232", + "kind": "string", + "type": { + "$ref": "914" + }, + "value": "inxhvxnwswyrvt" + }, + "nodePort": { + "$id": "4233", + "kind": "number", + "type": { + "$ref": "918" + }, + "value": 7281 + }, + "port": { + "$id": "4234", + "kind": "number", + "type": { + "$ref": "922" + }, + "value": 1268 + }, + "protocol": { + "$id": "4235", + "kind": "string", + "type": { + "$ref": "124" + }, + "value": "Mqtt" + }, + "tls": { + "$id": "4236", + "kind": "model", + "type": { + "$ref": "929" + }, + "value": { + "$id": "4237", + "mode": { + "$id": "4238", + "kind": "string", + "type": { + "$ref": "130" + }, + "value": "Automatic" + }, + "certManagerCertificateSpec": { + "$id": "4239", + "kind": "model", + "type": { + "$ref": "934" + }, + "value": { + "$id": "4240", + "duration": { + "$id": "4241", + "kind": "string", + "type": { + "$ref": "936" + }, + "value": "qmpeffoksron" + }, + "secretName": { + "$id": "4242", + "kind": "string", + "type": { + "$ref": "940" + }, + "value": "oagi" + }, + "renewBefore": { + "$id": "4243", + "kind": "string", + "type": { + "$ref": "944" + }, + "value": "hutno" + }, + "issuerRef": { + "$id": "4244", + "kind": "model", + "type": { + "$ref": "948" + }, + "value": { + "$id": "4245", + "group": { + "$id": "4246", + "kind": "string", + "type": { + "$ref": "950" + }, + "value": "jtmuladdkpasfpoyvewekmiy" + }, + "kind": { + "$id": "4247", + "kind": "string", + "type": { + "$ref": "136" + }, + "value": "Issuer" + }, + "name": { + "$id": "4248", + "kind": "string", + "type": { + "$ref": "957" + }, + "value": "ocwoqpgucvjrsuudtjhb" + } + } + }, + "privateKey": { + "$id": "4249", + "kind": "model", + "type": { + "$ref": "654" + }, + "value": { + "$id": "4250", + "algorithm": { + "$id": "4251", + "kind": "string", + "type": { + "$ref": "82" + }, + "value": "Ec256" + }, + "rotationPolicy": { + "$id": "4252", + "kind": "string", + "type": { + "$ref": "98" + }, + "value": "Always" + } + } + }, + "san": { + "$id": "4253", + "kind": "model", + "type": { + "$ref": "966" + }, + "value": { + "$id": "4254", + "dns": { + "$id": "4255", + "kind": "array", + "type": { + "$ref": "968" + }, + "value": [ + { + "$id": "4256", + "kind": "string", + "type": { + "$ref": "969" + }, + "value": "xhvmhrrhgfsapocjeebqtnzarlj" + } + ] + }, + "ip": { + "$id": "4257", + "kind": "array", + "type": { + "$ref": "973" + }, + "value": [ + { + "$id": "4258", + "kind": "string", + "type": { + "$ref": "974" + }, + "value": "zbgugfzcgsmegevzktsnibyuyp" + } + ] + } + } + } + } + }, + "manual": { + "$id": "4259", + "kind": "model", + "type": { + "$ref": "982" + }, + "value": { + "$id": "4260", + "secretRef": { + "$id": "4261", + "kind": "string", + "type": { + "$ref": "984" + }, + "value": "secret-name" + } + } + } + } + } + } + } + ] + }, + "serviceType": { + "$id": "4262", + "kind": "string", + "type": { + "$ref": "142" + }, + "value": "ClusterIp" + } + } + }, + "extendedLocation": { + "$id": "4263", + "kind": "model", + "type": { + "$ref": "510" + }, + "value": { + "$id": "4264", + "name": { + "$id": "4265", + "kind": "string", + "type": { + "$ref": "512" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "4266", + "kind": "string", + "type": { + "$ref": "44" + }, + "value": "CustomLocation" + } + } + } + } + } + } + ], + "responses": [ + { + "$id": "4267", + "response": { + "$ref": "4027" + }, + "statusCode": 200, + "bodyValue": { + "$id": "4268", + "kind": "model", + "type": { + "$ref": "899" + }, + "value": { + "$id": "4269", + "properties": { + "$id": "4270", + "kind": "model", + "type": { + "$ref": "901" + }, + "value": { + "$id": "4271", + "serviceName": { + "$id": "4272", + "kind": "string", + "type": { + "$ref": "903" + }, + "value": "tpfiszlapdpxktx" + }, + "ports": { + "$id": "4273", + "kind": "array", + "type": { + "$ref": "907" + }, + "value": [ + { + "$id": "4274", + "kind": "model", + "type": { + "$ref": "908" + }, + "value": { + "$id": "4275", + "authenticationRef": { + "$id": "4276", + "kind": "string", + "type": { + "$ref": "910" + }, + "value": "tjvdroaqqy" + }, + "authorizationRef": { + "$id": "4277", + "kind": "string", + "type": { + "$ref": "914" + }, + "value": "inxhvxnwswyrvt" + }, + "nodePort": { + "$id": "4278", + "kind": "number", + "type": { + "$ref": "918" + }, + "value": 7281 + }, + "port": { + "$id": "4279", + "kind": "number", + "type": { + "$ref": "922" + }, + "value": 1268 + }, + "protocol": { + "$id": "4280", + "kind": "string", + "type": { + "$ref": "124" + }, + "value": "Mqtt" + }, + "tls": { + "$id": "4281", + "kind": "model", + "type": { + "$ref": "929" + }, + "value": { + "$id": "4282", + "mode": { + "$id": "4283", + "kind": "string", + "type": { + "$ref": "130" + }, + "value": "Automatic" + }, + "certManagerCertificateSpec": { + "$id": "4284", + "kind": "model", + "type": { + "$ref": "934" + }, + "value": { + "$id": "4285", + "duration": { + "$id": "4286", + "kind": "string", + "type": { + "$ref": "936" + }, + "value": "qmpeffoksron" + }, + "secretName": { + "$id": "4287", + "kind": "string", + "type": { + "$ref": "940" + }, + "value": "oagi" + }, + "renewBefore": { + "$id": "4288", + "kind": "string", + "type": { + "$ref": "944" + }, + "value": "hutno" + }, + "issuerRef": { + "$id": "4289", + "kind": "model", + "type": { + "$ref": "948" + }, + "value": { + "$id": "4290", + "group": { + "$id": "4291", + "kind": "string", + "type": { + "$ref": "950" + }, + "value": "jtmuladdkpasfpoyvewekmiy" + }, + "kind": { + "$id": "4292", + "kind": "string", + "type": { + "$ref": "136" + }, + "value": "Issuer" + }, + "name": { + "$id": "4293", + "kind": "string", + "type": { + "$ref": "957" + }, + "value": "ocwoqpgucvjrsuudtjhb" + } + } + }, + "privateKey": { + "$id": "4294", + "kind": "model", + "type": { + "$ref": "654" + }, + "value": { + "$id": "4295", + "algorithm": { + "$id": "4296", + "kind": "string", + "type": { + "$ref": "82" + }, + "value": "Ec256" + }, + "rotationPolicy": { + "$id": "4297", + "kind": "string", + "type": { + "$ref": "98" + }, + "value": "Always" + } + } + }, + "san": { + "$id": "4298", + "kind": "model", + "type": { + "$ref": "966" + }, + "value": { + "$id": "4299", + "dns": { + "$id": "4300", + "kind": "array", + "type": { + "$ref": "968" + }, + "value": [ + { + "$id": "4301", + "kind": "string", + "type": { + "$ref": "969" + }, + "value": "xhvmhrrhgfsapocjeebqtnzarlj" + } + ] + }, + "ip": { + "$id": "4302", + "kind": "array", + "type": { + "$ref": "973" + }, + "value": [ + { + "$id": "4303", + "kind": "string", + "type": { + "$ref": "974" + }, + "value": "zbgugfzcgsmegevzktsnibyuyp" + } + ] + } + } + } + } + }, + "manual": { + "$id": "4304", + "kind": "model", + "type": { + "$ref": "982" + }, + "value": { + "$id": "4305", + "secretRef": { + "$id": "4306", + "kind": "string", + "type": { + "$ref": "984" + }, + "value": "secret-name" + } + } + } + } + } + } + } + ] + }, + "serviceType": { + "$id": "4307", + "kind": "string", + "type": { + "$ref": "142" + }, + "value": "ClusterIp" + }, + "provisioningState": { + "$id": "4308", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Succeeded" + } + } + }, + "extendedLocation": { + "$id": "4309", + "kind": "model", + "type": { + "$ref": "510" + }, + "value": { + "$id": "4310", + "name": { + "$id": "4311", + "kind": "string", + "type": { + "$ref": "512" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "4312", + "kind": "string", + "type": { + "$ref": "44" + }, + "value": "CustomLocation" + } + } + }, + "id": { + "$id": "4313", + "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": "4314", + "kind": "string", + "type": { + "$ref": "424" + }, + "value": "hoqjaachratt" + }, + "type": { + "$id": "4315", + "kind": "string", + "type": { + "$ref": "428" + }, + "value": "hizbknwegcdaeh" + }, + "systemData": { + "$id": "4316", + "kind": "model", + "type": { + "$ref": "433" + }, + "value": { + "$id": "4317", + "createdBy": { + "$id": "4318", + "kind": "string", + "type": { + "$ref": "435" + }, + "value": "ssvaslsmudloholronopqyxjcu" + }, + "createdByType": { + "$id": "4319", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "createdAt": { + "$id": "4320", + "kind": "string", + "type": { + "$ref": "442" + }, + "value": "2024-08-09T18:13:29.389Z" + }, + "lastModifiedBy": { + "$id": "4321", + "kind": "string", + "type": { + "$ref": "447" + }, + "value": "gnicpuszwd" + }, + "lastModifiedByType": { + "$id": "4322", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "4323", + "kind": "string", + "type": { + "$ref": "454" + }, + "value": "2024-08-09T18:13:29.389Z" + } + } + } + } + } + }, + { + "$id": "4324", + "response": { + "$ref": "4028" + }, + "statusCode": 201, + "bodyValue": { + "$id": "4325", + "kind": "model", + "type": { + "$ref": "899" + }, + "value": { + "$id": "4326", + "properties": { + "$id": "4327", + "kind": "model", + "type": { + "$ref": "901" + }, + "value": { + "$id": "4328", + "serviceName": { + "$id": "4329", + "kind": "string", + "type": { + "$ref": "903" + }, + "value": "tpfiszlapdpxktx" + }, + "ports": { + "$id": "4330", + "kind": "array", + "type": { + "$ref": "907" + }, + "value": [ + { + "$id": "4331", + "kind": "model", + "type": { + "$ref": "908" + }, + "value": { + "$id": "4332", + "authenticationRef": { + "$id": "4333", + "kind": "string", + "type": { + "$ref": "910" + }, + "value": "tjvdroaqqy" + }, + "authorizationRef": { + "$id": "4334", + "kind": "string", + "type": { + "$ref": "914" + }, + "value": "inxhvxnwswyrvt" + }, + "nodePort": { + "$id": "4335", + "kind": "number", + "type": { + "$ref": "918" + }, + "value": 7281 + }, + "port": { + "$id": "4336", + "kind": "number", + "type": { + "$ref": "922" + }, + "value": 1268 + }, + "protocol": { + "$id": "4337", + "kind": "string", + "type": { + "$ref": "124" + }, + "value": "Mqtt" + }, + "tls": { + "$id": "4338", + "kind": "model", + "type": { + "$ref": "929" + }, + "value": { + "$id": "4339", + "mode": { + "$id": "4340", + "kind": "string", + "type": { + "$ref": "130" + }, + "value": "Automatic" + }, + "certManagerCertificateSpec": { + "$id": "4341", + "kind": "model", + "type": { + "$ref": "934" + }, + "value": { + "$id": "4342", + "duration": { + "$id": "4343", + "kind": "string", + "type": { + "$ref": "936" + }, + "value": "qmpeffoksron" + }, + "secretName": { + "$id": "4344", + "kind": "string", + "type": { + "$ref": "940" + }, + "value": "oagi" + }, + "renewBefore": { + "$id": "4345", + "kind": "string", + "type": { + "$ref": "944" + }, + "value": "hutno" + }, + "issuerRef": { + "$id": "4346", + "kind": "model", + "type": { + "$ref": "948" + }, + "value": { + "$id": "4347", + "group": { + "$id": "4348", + "kind": "string", + "type": { + "$ref": "950" + }, + "value": "jtmuladdkpasfpoyvewekmiy" + }, + "kind": { + "$id": "4349", + "kind": "string", + "type": { + "$ref": "136" + }, + "value": "Issuer" + }, + "name": { + "$id": "4350", + "kind": "string", + "type": { + "$ref": "957" + }, + "value": "ocwoqpgucvjrsuudtjhb" + } + } + }, + "privateKey": { + "$id": "4351", + "kind": "model", + "type": { + "$ref": "654" + }, + "value": { + "$id": "4352", + "algorithm": { + "$id": "4353", + "kind": "string", + "type": { + "$ref": "82" + }, + "value": "Ec256" + }, + "rotationPolicy": { + "$id": "4354", + "kind": "string", + "type": { + "$ref": "98" + }, + "value": "Always" + } + } + }, + "san": { + "$id": "4355", + "kind": "model", + "type": { + "$ref": "966" + }, + "value": { + "$id": "4356", + "dns": { + "$id": "4357", + "kind": "array", + "type": { + "$ref": "968" + }, + "value": [ + { + "$id": "4358", + "kind": "string", + "type": { + "$ref": "969" + }, + "value": "xhvmhrrhgfsapocjeebqtnzarlj" + } + ] + }, + "ip": { + "$id": "4359", + "kind": "array", + "type": { + "$ref": "973" + }, + "value": [ + { + "$id": "4360", + "kind": "string", + "type": { + "$ref": "974" + }, + "value": "zbgugfzcgsmegevzktsnibyuyp" + } + ] + } + } + } + } + }, + "manual": { + "$id": "4361", + "kind": "model", + "type": { + "$ref": "982" + }, + "value": { + "$id": "4362", + "secretRef": { + "$id": "4363", + "kind": "string", + "type": { + "$ref": "984" + }, + "value": "secret-name" + } + } + } + } + } + } + } + ] + }, + "serviceType": { + "$id": "4364", + "kind": "string", + "type": { + "$ref": "142" + }, + "value": "ClusterIp" + }, + "provisioningState": { + "$id": "4365", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Succeeded" + } + } + }, + "extendedLocation": { + "$id": "4366", + "kind": "model", + "type": { + "$ref": "510" + }, + "value": { + "$id": "4367", + "name": { + "$id": "4368", + "kind": "string", + "type": { + "$ref": "512" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "4369", + "kind": "string", + "type": { + "$ref": "44" + }, + "value": "CustomLocation" + } + } + }, + "id": { + "$id": "4370", + "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": "4371", + "kind": "string", + "type": { + "$ref": "424" + }, + "value": "hoqjaachratt" + }, + "type": { + "$id": "4372", + "kind": "string", + "type": { + "$ref": "428" + }, + "value": "hizbknwegcdaeh" + }, + "systemData": { + "$id": "4373", + "kind": "model", + "type": { + "$ref": "433" + }, + "value": { + "$id": "4374", + "createdBy": { + "$id": "4375", + "kind": "string", + "type": { + "$ref": "435" + }, + "value": "ssvaslsmudloholronopqyxjcu" + }, + "createdByType": { + "$id": "4376", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "createdAt": { + "$id": "4377", + "kind": "string", + "type": { + "$ref": "442" + }, + "value": "2024-08-09T18:13:29.389Z" + }, + "lastModifiedBy": { + "$id": "4378", + "kind": "string", + "type": { + "$ref": "447" + }, + "value": "gnicpuszwd" + }, + "lastModifiedByType": { + "$id": "4379", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "4380", + "kind": "string", + "type": { + "$ref": "454" + }, + "value": "2024-08-09T18:13:29.389Z" + } + } + } + } + } + } + ] + }, + { + "$id": "4381", + "kind": "http", + "name": "BrokerListener_CreateOrUpdate_Simple", + "description": "BrokerListener_CreateOrUpdate_Simple", + "filePath": "2025-04-01/BrokerListener_CreateOrUpdate_Simple.json", + "parameters": [ + { + "$id": "4382", + "parameter": { + "$ref": "4005" + }, + "value": { + "$id": "4383", + "kind": "string", + "type": { + "$ref": "4006" + }, + "value": "2025-04-01" + } + }, + { + "$id": "4384", + "parameter": { + "$ref": "4009" + }, + "value": { + "$id": "4385", + "kind": "string", + "type": { + "$ref": "4010" + }, + "value": "F8C729F9-DF9C-4743-848F-96EE433D8E53" + } + }, + { + "$id": "4386", + "parameter": { + "$ref": "4012" + }, + "value": { + "$id": "4387", + "kind": "string", + "type": { + "$ref": "4013" + }, + "value": "rgiotoperations" + } + }, + { + "$id": "4388", + "parameter": { + "$ref": "4014" + }, + "value": { + "$id": "4389", + "kind": "string", + "type": { + "$ref": "4015" + }, + "value": "resource-name123" + } + }, + { + "$id": "4390", + "parameter": { + "$ref": "4016" + }, + "value": { + "$id": "4391", + "kind": "string", + "type": { + "$ref": "4017" + }, + "value": "resource-name123" + } + }, + { + "$id": "4392", + "parameter": { + "$ref": "4018" + }, + "value": { + "$id": "4393", + "kind": "string", + "type": { + "$ref": "4019" + }, + "value": "resource-name123" + } + }, + { + "$id": "4394", + "parameter": { + "$ref": "4026" + }, + "value": { + "$id": "4395", + "kind": "model", + "type": { + "$ref": "899" + }, + "value": { + "$id": "4396", + "properties": { + "$id": "4397", + "kind": "model", + "type": { + "$ref": "901" + }, + "value": { + "$id": "4398", + "ports": { + "$id": "4399", + "kind": "array", + "type": { + "$ref": "907" + }, + "value": [ + { + "$id": "4400", + "kind": "model", + "type": { + "$ref": "908" + }, + "value": { + "$id": "4401", + "port": { + "$id": "4402", + "kind": "number", + "type": { + "$ref": "922" + }, + "value": 1883 + } + } + } + ] + } + } + }, + "extendedLocation": { + "$id": "4403", + "kind": "model", + "type": { + "$ref": "510" + }, + "value": { + "$id": "4404", + "name": { + "$id": "4405", + "kind": "string", + "type": { + "$ref": "512" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "4406", + "kind": "string", + "type": { + "$ref": "44" + }, + "value": "CustomLocation" + } + } + } + } + } + } + ], + "responses": [ + { + "$id": "4407", + "response": { + "$ref": "4027" + }, + "statusCode": 200, + "bodyValue": { + "$id": "4408", + "kind": "model", + "type": { + "$ref": "899" + }, + "value": { + "$id": "4409", + "properties": { + "$id": "4410", + "kind": "model", + "type": { + "$ref": "901" + }, + "value": { + "$id": "4411", + "serviceName": { + "$id": "4412", + "kind": "string", + "type": { + "$ref": "903" + }, + "value": "tpfiszlapdpxktx" + }, + "serviceType": { + "$id": "4413", + "kind": "string", + "type": { + "$ref": "142" + }, + "value": "LoadBalancer" + }, + "ports": { + "$id": "4414", + "kind": "array", + "type": { + "$ref": "907" + }, + "value": [ + { + "$id": "4415", + "kind": "model", + "type": { + "$ref": "908" + }, + "value": { + "$id": "4416", + "port": { + "$id": "4417", + "kind": "number", + "type": { + "$ref": "922" + }, + "value": 1883 + } + } + } + ] + }, + "provisioningState": { + "$id": "4418", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Succeeded" + } + } + }, + "extendedLocation": { + "$id": "4419", + "kind": "model", + "type": { + "$ref": "510" + }, + "value": { + "$id": "4420", + "name": { + "$id": "4421", + "kind": "string", + "type": { + "$ref": "512" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "4422", + "kind": "string", + "type": { + "$ref": "44" + }, + "value": "CustomLocation" + } + } + }, + "id": { + "$id": "4423", + "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": "4424", + "kind": "string", + "type": { + "$ref": "424" + }, + "value": "hoqjaachratt" + }, + "type": { + "$id": "4425", + "kind": "string", + "type": { + "$ref": "428" + }, + "value": "hizbknwegcdaeh" + }, + "systemData": { + "$id": "4426", + "kind": "model", + "type": { + "$ref": "433" + }, + "value": { + "$id": "4427", + "createdBy": { + "$id": "4428", + "kind": "string", + "type": { + "$ref": "435" + }, + "value": "ssvaslsmudloholronopqyxjcu" + }, + "createdByType": { + "$id": "4429", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "createdAt": { + "$id": "4430", + "kind": "string", + "type": { + "$ref": "442" + }, + "value": "2024-08-09T18:13:29.389Z" + }, + "lastModifiedBy": { + "$id": "4431", + "kind": "string", + "type": { + "$ref": "447" + }, + "value": "gnicpuszwd" + }, + "lastModifiedByType": { + "$id": "4432", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "4433", + "kind": "string", + "type": { + "$ref": "454" + }, + "value": "2024-08-09T18:13:29.389Z" + } + } + } + } + } + }, + { + "$id": "4434", + "response": { + "$ref": "4028" + }, + "statusCode": 201, + "bodyValue": { + "$id": "4435", + "kind": "model", + "type": { + "$ref": "899" + }, + "value": { + "$id": "4436", + "properties": { + "$id": "4437", + "kind": "model", + "type": { + "$ref": "901" + }, + "value": { + "$id": "4438", + "serviceName": { + "$id": "4439", + "kind": "string", + "type": { + "$ref": "903" + }, + "value": "tpfiszlapdpxktx" + }, + "serviceType": { + "$id": "4440", + "kind": "string", + "type": { + "$ref": "142" + }, + "value": "LoadBalancer" + }, + "ports": { + "$id": "4441", + "kind": "array", + "type": { + "$ref": "907" + }, + "value": [ + { + "$id": "4442", + "kind": "model", + "type": { + "$ref": "908" + }, + "value": { + "$id": "4443", + "port": { + "$id": "4444", + "kind": "number", + "type": { + "$ref": "922" + }, + "value": 1883 + } + } + } + ] + }, + "provisioningState": { + "$id": "4445", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Succeeded" + } + } + }, + "extendedLocation": { + "$id": "4446", + "kind": "model", + "type": { + "$ref": "510" + }, + "value": { + "$id": "4447", + "name": { + "$id": "4448", + "kind": "string", + "type": { + "$ref": "512" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "4449", + "kind": "string", + "type": { + "$ref": "44" + }, + "value": "CustomLocation" + } + } + }, + "id": { + "$id": "4450", + "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": "4451", + "kind": "string", + "type": { + "$ref": "424" + }, + "value": "hoqjaachratt" + }, + "type": { + "$id": "4452", + "kind": "string", + "type": { + "$ref": "428" + }, + "value": "hizbknwegcdaeh" + }, + "systemData": { + "$id": "4453", + "kind": "model", + "type": { + "$ref": "433" + }, + "value": { + "$id": "4454", + "createdBy": { + "$id": "4455", + "kind": "string", + "type": { + "$ref": "435" + }, + "value": "ssvaslsmudloholronopqyxjcu" + }, + "createdByType": { + "$id": "4456", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "createdAt": { + "$id": "4457", + "kind": "string", + "type": { + "$ref": "442" + }, + "value": "2024-08-09T18:13:29.389Z" + }, + "lastModifiedBy": { + "$id": "4458", + "kind": "string", + "type": { + "$ref": "447" + }, + "value": "gnicpuszwd" + }, + "lastModifiedByType": { + "$id": "4459", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "4460", + "kind": "string", + "type": { + "$ref": "454" + }, + "value": "2024-08-09T18:13:29.389Z" + } + } + } + } + } + } + ] + } + ] + }, + { + "$id": "4461", + "name": "delete", + "resourceName": "BrokerListenerResource", + "doc": "Delete a BrokerListenerResource", + "accessibility": "public", + "parameters": [ + { + "$id": "4462", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "4463", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "4464", + "type": { + "$id": "4465", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-04-01" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4466", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "4467", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "4468", + "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": "4469", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "4470", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4471", + "name": "instanceName", + "nameInRequest": "instanceName", + "doc": "Name of instance.", + "type": { + "$id": "4472", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4473", + "name": "brokerName", + "nameInRequest": "brokerName", + "doc": "Name of broker.", + "type": { + "$id": "4474", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4475", + "name": "listenerName", + "nameInRequest": "listenerName", + "doc": "Name of Instance broker listener resource", + "type": { + "$id": "4476", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4477", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "4478", + "kind": "constant", + "valueType": { + "$id": "4479", + "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": "4480", + "statusCodes": [ + 202 + ], + "headers": [ + { + "$id": "4481", + "name": "location", + "nameInResponse": "Location", + "doc": "The Location header contains the URL where the status of the long running operation can be checked.", + "type": { + "$id": "4482", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + { + "$id": "4483", + "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": "4484", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + } + } + ], + "isErrorResponse": false + }, + { + "$id": "4485", + "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": "4486", + "finalStateVia": 1, + "finalResponse": { + "$id": "4487", + "statusCodes": [ + 204 + ] + } + }, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.IoTOperations.BrokerListener.delete", + "decorators": [], + "examples": [ + { + "$id": "4488", + "kind": "http", + "name": "BrokerListener_Delete", + "description": "BrokerListener_Delete", + "filePath": "2025-04-01/BrokerListener_Delete_MaximumSet_Gen.json", + "parameters": [ + { + "$id": "4489", + "parameter": { + "$ref": "4462" + }, + "value": { + "$id": "4490", + "kind": "string", + "type": { + "$ref": "4463" + }, + "value": "2025-04-01" + } + }, + { + "$id": "4491", + "parameter": { + "$ref": "4466" + }, + "value": { + "$id": "4492", + "kind": "string", + "type": { + "$ref": "4467" + }, + "value": "F8C729F9-DF9C-4743-848F-96EE433D8E53" + } + }, + { + "$id": "4493", + "parameter": { + "$ref": "4469" + }, + "value": { + "$id": "4494", + "kind": "string", + "type": { + "$ref": "4470" + }, + "value": "rgiotoperations" + } + }, + { + "$id": "4495", + "parameter": { + "$ref": "4471" + }, + "value": { + "$id": "4496", + "kind": "string", + "type": { + "$ref": "4472" + }, + "value": "resource-name123" + } + }, + { + "$id": "4497", + "parameter": { + "$ref": "4473" + }, + "value": { + "$id": "4498", + "kind": "string", + "type": { + "$ref": "4474" + }, + "value": "resource-name123" + } + }, + { + "$id": "4499", + "parameter": { + "$ref": "4475" + }, + "value": { + "$id": "4500", + "kind": "string", + "type": { + "$ref": "4476" + }, + "value": "resource-name123" + } + } + ], + "responses": [ + { + "$id": "4501", + "response": { + "$ref": "4480" + }, + "statusCode": 202 + }, + { + "$id": "4502", + "response": { + "$ref": "4485" + }, + "statusCode": 204 + } + ] + } + ] + }, + { + "$id": "4503", + "name": "listByResourceGroup", + "resourceName": "BrokerListenerResource", + "doc": "List BrokerListenerResource resources by BrokerResource", + "accessibility": "public", + "parameters": [ + { + "$id": "4504", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "4505", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "4506", + "type": { + "$id": "4507", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-04-01" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4508", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "4509", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "4510", + "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": "4511", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "4512", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4513", + "name": "instanceName", + "nameInRequest": "instanceName", + "doc": "Name of instance.", + "type": { + "$id": "4514", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4515", + "name": "brokerName", + "nameInRequest": "brokerName", + "doc": "Name of broker.", + "type": { + "$id": "4516", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4517", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "4518", + "kind": "constant", + "valueType": { + "$id": "4519", + "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": "4520", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "1004" + }, + "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": "4521", + "itemPropertySegments": [ + "value" + ], + "nextLink": { + "$id": "4522", + "responseSegments": [ + "nextLink" + ], + "responseLocation": "Body" + } + }, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.IoTOperations.BrokerListener.listByResourceGroup", + "decorators": [], + "examples": [ + { + "$id": "4523", + "kind": "http", + "name": "BrokerListener_ListByResourceGroup", + "description": "BrokerListener_ListByResourceGroup", + "filePath": "2025-04-01/BrokerListener_ListByResourceGroup_MaximumSet_Gen.json", + "parameters": [ + { + "$id": "4524", + "parameter": { + "$ref": "4504" + }, + "value": { + "$id": "4525", + "kind": "string", + "type": { + "$ref": "4505" + }, + "value": "2025-04-01" + } + }, + { + "$id": "4526", + "parameter": { + "$ref": "4508" + }, + "value": { + "$id": "4527", + "kind": "string", + "type": { + "$ref": "4509" + }, + "value": "F8C729F9-DF9C-4743-848F-96EE433D8E53" + } + }, + { + "$id": "4528", + "parameter": { + "$ref": "4511" + }, + "value": { + "$id": "4529", + "kind": "string", + "type": { + "$ref": "4512" + }, + "value": "rgiotoperations" + } + }, + { + "$id": "4530", + "parameter": { + "$ref": "4513" + }, + "value": { + "$id": "4531", + "kind": "string", + "type": { + "$ref": "4514" + }, + "value": "resource-name123" + } + }, + { + "$id": "4532", + "parameter": { + "$ref": "4515" + }, + "value": { + "$id": "4533", + "kind": "string", + "type": { + "$ref": "4516" + }, + "value": "resource-name123" + } + } + ], + "responses": [ + { + "$id": "4534", + "response": { + "$ref": "4520" + }, + "statusCode": 200, + "bodyValue": { + "$id": "4535", + "kind": "model", + "type": { + "$ref": "1004" + }, + "value": { + "$id": "4536", + "value": { + "$id": "4537", + "kind": "array", + "type": { + "$ref": "1006" + }, + "value": [ + { + "$id": "4538", + "kind": "model", + "type": { + "$ref": "899" + }, + "value": { + "$id": "4539", + "properties": { + "$id": "4540", + "kind": "model", + "type": { + "$ref": "901" + }, + "value": { + "$id": "4541", + "serviceName": { + "$id": "4542", + "kind": "string", + "type": { + "$ref": "903" + }, + "value": "tpfiszlapdpxktx" + }, + "ports": { + "$id": "4543", + "kind": "array", + "type": { + "$ref": "907" + }, + "value": [ + { + "$id": "4544", + "kind": "model", + "type": { + "$ref": "908" + }, + "value": { + "$id": "4545", + "authenticationRef": { + "$id": "4546", + "kind": "string", + "type": { + "$ref": "910" + }, + "value": "tjvdroaqqy" + }, + "authorizationRef": { + "$id": "4547", + "kind": "string", + "type": { + "$ref": "914" + }, + "value": "inxhvxnwswyrvt" + }, + "nodePort": { + "$id": "4548", + "kind": "number", + "type": { + "$ref": "918" + }, + "value": 7281 + }, + "port": { + "$id": "4549", + "kind": "number", + "type": { + "$ref": "922" + }, + "value": 1268 + }, + "protocol": { + "$id": "4550", + "kind": "string", + "type": { + "$ref": "124" + }, + "value": "Mqtt" + }, + "tls": { + "$id": "4551", + "kind": "model", + "type": { + "$ref": "929" + }, + "value": { + "$id": "4552", + "mode": { + "$id": "4553", + "kind": "string", + "type": { + "$ref": "130" + }, + "value": "Automatic" + }, + "certManagerCertificateSpec": { + "$id": "4554", + "kind": "model", + "type": { + "$ref": "934" + }, + "value": { + "$id": "4555", + "duration": { + "$id": "4556", + "kind": "string", + "type": { + "$ref": "936" + }, + "value": "qmpeffoksron" + }, + "secretName": { + "$id": "4557", + "kind": "string", + "type": { + "$ref": "940" + }, + "value": "oagi" + }, + "renewBefore": { + "$id": "4558", + "kind": "string", + "type": { + "$ref": "944" + }, + "value": "hutno" + }, + "issuerRef": { + "$id": "4559", + "kind": "model", + "type": { + "$ref": "948" + }, + "value": { + "$id": "4560", + "group": { + "$id": "4561", + "kind": "string", + "type": { + "$ref": "950" + }, + "value": "jtmuladdkpasfpoyvewekmiy" + }, + "kind": { + "$id": "4562", + "kind": "string", + "type": { + "$ref": "136" + }, + "value": "Issuer" + }, + "name": { + "$id": "4563", + "kind": "string", + "type": { + "$ref": "957" + }, + "value": "ocwoqpgucvjrsuudtjhb" + } + } + }, + "privateKey": { + "$id": "4564", + "kind": "model", + "type": { + "$ref": "654" + }, + "value": { + "$id": "4565", + "algorithm": { + "$id": "4566", + "kind": "string", + "type": { + "$ref": "82" + }, + "value": "Ec256" + }, + "rotationPolicy": { + "$id": "4567", + "kind": "string", + "type": { + "$ref": "98" + }, + "value": "Always" + } + } + }, + "san": { + "$id": "4568", + "kind": "model", + "type": { + "$ref": "966" + }, + "value": { + "$id": "4569", + "dns": { + "$id": "4570", + "kind": "array", + "type": { + "$ref": "968" + }, + "value": [ + { + "$id": "4571", + "kind": "string", + "type": { + "$ref": "969" + }, + "value": "xhvmhrrhgfsapocjeebqtnzarlj" + } + ] + }, + "ip": { + "$id": "4572", + "kind": "array", + "type": { + "$ref": "973" + }, + "value": [ + { + "$id": "4573", + "kind": "string", + "type": { + "$ref": "974" + }, + "value": "zbgugfzcgsmegevzktsnibyuyp" + } + ] + } + } + } + } + }, + "manual": { + "$id": "4574", + "kind": "model", + "type": { + "$ref": "982" + }, + "value": { + "$id": "4575", + "secretRef": { + "$id": "4576", + "kind": "string", + "type": { + "$ref": "984" + }, + "value": "secret-name" + } + } + } + } + } + } + } + ] + }, + "serviceType": { + "$id": "4577", + "kind": "string", + "type": { + "$ref": "142" + }, + "value": "ClusterIp" + }, + "provisioningState": { + "$id": "4578", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Succeeded" + } + } + }, + "extendedLocation": { + "$id": "4579", + "kind": "model", + "type": { + "$ref": "510" + }, + "value": { + "$id": "4580", + "name": { + "$id": "4581", + "kind": "string", + "type": { + "$ref": "512" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "4582", + "kind": "string", + "type": { + "$ref": "44" + }, + "value": "CustomLocation" + } + } + }, + "id": { + "$id": "4583", + "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": "4584", + "kind": "string", + "type": { + "$ref": "424" + }, + "value": "hoqjaachratt" + }, + "type": { + "$id": "4585", + "kind": "string", + "type": { + "$ref": "428" + }, + "value": "hizbknwegcdaeh" + }, + "systemData": { + "$id": "4586", + "kind": "model", + "type": { + "$ref": "433" + }, + "value": { + "$id": "4587", + "createdBy": { + "$id": "4588", + "kind": "string", + "type": { + "$ref": "435" + }, + "value": "ssvaslsmudloholronopqyxjcu" + }, + "createdByType": { + "$id": "4589", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "createdAt": { + "$id": "4590", + "kind": "string", + "type": { + "$ref": "442" + }, + "value": "2024-08-09T18:13:29.389Z" + }, + "lastModifiedBy": { + "$id": "4591", + "kind": "string", + "type": { + "$ref": "447" + }, + "value": "gnicpuszwd" + }, + "lastModifiedByType": { + "$id": "4592", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "4593", + "kind": "string", + "type": { + "$ref": "454" + }, + "value": "2024-08-09T18:13:29.389Z" + } + } + } + } + } + ] + }, + "nextLink": { + "$id": "4594", + "kind": "string", + "type": { + "$ref": "1010" + }, + "value": "https://microsoft.com/a" + } + } + } + } + ] + } + ] + } + ], + "parameters": [ + { + "$id": "4595", + "name": "endpoint", + "nameInRequest": "endpoint", + "doc": "Service host", + "type": { + "$id": "4596", + "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": "4597", + "type": { + "$id": "4598", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "https://management.azure.com" + } + } + ], + "decorators": [ + { + "$id": "4599", + "name": "Azure.ResourceManager.@armResourceOperations", + "arguments": { + "$id": "4600" + } + } + ], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.BrokerListener", + "apiVersions": [ + "2024-11-01", + "2025-04-01" + ], + "parent": { + "$ref": "1692" + } + }, + { + "$id": "4601", + "kind": "client", + "name": "BrokerAuthentication", + "namespace": "Azure.ResourceManager.IotOperations", + "operations": [ + { + "$id": "4602", + "name": "get", + "resourceName": "BrokerAuthenticationResource", + "doc": "Get a BrokerAuthenticationResource", + "accessibility": "public", + "parameters": [ + { + "$id": "4603", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "4604", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "4605", + "type": { + "$id": "4606", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-04-01" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4607", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "4608", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "4609", + "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": "4610", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "4611", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4612", + "name": "instanceName", + "nameInRequest": "instanceName", + "doc": "Name of instance.", + "type": { + "$id": "4613", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4614", + "name": "brokerName", + "nameInRequest": "brokerName", + "doc": "Name of broker.", + "type": { + "$id": "4615", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4616", + "name": "authenticationName", + "nameInRequest": "authenticationName", + "doc": "Name of Instance broker authentication resource", + "type": { + "$id": "4617", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4618", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "4619", + "kind": "constant", + "valueType": { + "$id": "4620", + "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": "4621", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "1014" + }, + "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": "4622", + "kind": "http", + "name": "BrokerAuthentication_Get", + "description": "BrokerAuthentication_Get", + "filePath": "2025-04-01/BrokerAuthentication_Get_MaximumSet_Gen.json", + "parameters": [ + { + "$id": "4623", + "parameter": { + "$ref": "4603" + }, + "value": { + "$id": "4624", + "kind": "string", + "type": { + "$ref": "4604" + }, + "value": "2025-04-01" + } + }, + { + "$id": "4625", + "parameter": { + "$ref": "4607" + }, + "value": { + "$id": "4626", + "kind": "string", + "type": { + "$ref": "4608" + }, + "value": "F8C729F9-DF9C-4743-848F-96EE433D8E53" + } + }, + { + "$id": "4627", + "parameter": { + "$ref": "4610" + }, + "value": { + "$id": "4628", + "kind": "string", + "type": { + "$ref": "4611" + }, + "value": "rgiotoperations" + } + }, + { + "$id": "4629", + "parameter": { + "$ref": "4612" + }, + "value": { + "$id": "4630", + "kind": "string", + "type": { + "$ref": "4613" + }, + "value": "resource-name123" + } + }, + { + "$id": "4631", + "parameter": { + "$ref": "4614" + }, + "value": { + "$id": "4632", + "kind": "string", + "type": { + "$ref": "4615" + }, + "value": "resource-name123" + } + }, + { + "$id": "4633", + "parameter": { + "$ref": "4616" + }, + "value": { + "$id": "4634", + "kind": "string", + "type": { + "$ref": "4617" + }, + "value": "resource-name123" + } + } + ], + "responses": [ + { + "$id": "4635", + "response": { + "$ref": "4621" + }, + "statusCode": 200, + "bodyValue": { + "$id": "4636", + "kind": "model", + "type": { + "$ref": "1014" + }, + "value": { + "$id": "4637", + "properties": { + "$id": "4638", + "kind": "model", + "type": { + "$ref": "1016" + }, + "value": { + "$id": "4639", + "authenticationMethods": { + "$id": "4640", + "kind": "array", + "type": { + "$ref": "1018" + }, + "value": [ + { + "$id": "4641", + "kind": "model", + "type": { + "$ref": "1019" + }, + "value": { + "$id": "4642", + "method": { + "$id": "4643", + "kind": "string", + "type": { + "$ref": "150" + }, + "value": "Custom" + }, + "customSettings": { + "$id": "4644", + "kind": "model", + "type": { + "$ref": "1024" + }, + "value": { + "$id": "4645", + "auth": { + "$id": "4646", + "kind": "model", + "type": { + "$ref": "1026" + }, + "value": { + "$id": "4647", + "x509": { + "$id": "4648", + "kind": "model", + "type": { + "$ref": "982" + }, + "value": { + "$id": "4649", + "secretRef": { + "$id": "4650", + "kind": "string", + "type": { + "$ref": "984" + }, + "value": "secret-name" + } + } + } + } + }, + "caCertConfigMap": { + "$id": "4651", + "kind": "string", + "type": { + "$ref": "1033" + }, + "value": "pdecudefqyolvncbus" + }, + "endpoint": { + "$id": "4652", + "kind": "string", + "type": { + "$ref": "1037" + }, + "value": "https://www.example.com" + }, + "headers": { + "$id": "4653", + "kind": "dict", + "type": { + "$ref": "1041" + }, + "value": { + "$id": "4654", + "key8518": { + "$id": "4655", + "kind": "string", + "type": { + "$ref": "1043" + }, + "value": "bwityjy" + } + } + } + } + }, + "serviceAccountTokenSettings": { + "$id": "4656", + "kind": "model", + "type": { + "$ref": "1049" + }, + "value": { + "$id": "4657", + "audiences": { + "$id": "4658", + "kind": "array", + "type": { + "$ref": "1051" + }, + "value": [ + { + "$id": "4659", + "kind": "string", + "type": { + "$ref": "1052" + }, + "value": "jqyhyqatuydg" + } + ] + } + } + }, + "x509Settings": { + "$id": "4660", + "kind": "model", + "type": { + "$ref": "1058" + }, + "value": { + "$id": "4661", + "authorizationAttributes": { + "$id": "4662", + "kind": "dict", + "type": { + "$ref": "1060" + }, + "value": { + "$id": "4663", + "key3384": { + "$id": "4664", + "kind": "model", + "type": { + "$ref": "1062" + }, + "value": { + "$id": "4665", + "attributes": { + "$id": "4666", + "kind": "dict", + "type": { + "$ref": "1064" + }, + "value": { + "$id": "4667", + "key186": { + "$id": "4668", + "kind": "string", + "type": { + "$ref": "1066" + }, + "value": "ucpajramsz" + } + } + }, + "subject": { + "$id": "4669", + "kind": "string", + "type": { + "$ref": "1070" + }, + "value": "jpgwctfeixitptfgfnqhua" + } + } + } + } + }, + "trustedClientCaCert": { + "$id": "4670", + "kind": "string", + "type": { + "$ref": "1076" + }, + "value": "vlctsqddl" + } + } + } + } + } + ] + }, + "provisioningState": { + "$id": "4671", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Succeeded" + } + } + }, + "extendedLocation": { + "$id": "4672", + "kind": "model", + "type": { + "$ref": "510" + }, + "value": { + "$id": "4673", + "name": { + "$id": "4674", + "kind": "string", + "type": { + "$ref": "512" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "4675", + "kind": "string", + "type": { + "$ref": "44" + }, + "value": "CustomLocation" + } + } + }, + "id": { + "$id": "4676", + "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": "4677", + "kind": "string", + "type": { + "$ref": "424" + }, + "value": "lwucizfvtsdpx" + }, + "type": { + "$id": "4678", + "kind": "string", + "type": { + "$ref": "428" + }, + "value": "kvtilkgcxanlfozrd" + }, + "systemData": { + "$id": "4679", + "kind": "model", + "type": { + "$ref": "433" + }, + "value": { + "$id": "4680", + "createdBy": { + "$id": "4681", + "kind": "string", + "type": { + "$ref": "435" + }, + "value": "ssvaslsmudloholronopqyxjcu" + }, + "createdByType": { + "$id": "4682", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "createdAt": { + "$id": "4683", + "kind": "string", + "type": { + "$ref": "442" + }, + "value": "2024-08-09T18:13:29.389Z" + }, + "lastModifiedBy": { + "$id": "4684", + "kind": "string", + "type": { + "$ref": "447" + }, + "value": "gnicpuszwd" + }, + "lastModifiedByType": { + "$id": "4685", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "4686", + "kind": "string", + "type": { + "$ref": "454" + }, + "value": "2024-08-09T18:13:29.389Z" + } + } + } + } + } + } + ] + } + ] + }, + { + "$id": "4687", + "name": "createOrUpdate", + "resourceName": "BrokerAuthenticationResource", + "doc": "Create a BrokerAuthenticationResource", + "accessibility": "public", + "parameters": [ + { + "$id": "4688", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "4689", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "4690", + "type": { + "$id": "4691", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-04-01" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4692", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "4693", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "4694", + "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": "4695", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "4696", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4697", + "name": "instanceName", + "nameInRequest": "instanceName", + "doc": "Name of instance.", + "type": { + "$id": "4698", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4699", + "name": "brokerName", + "nameInRequest": "brokerName", + "doc": "Name of broker.", + "type": { + "$id": "4700", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4701", + "name": "authenticationName", + "nameInRequest": "authenticationName", + "doc": "Name of Instance broker authentication resource", + "type": { + "$id": "4702", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4703", + "name": "contentType", + "nameInRequest": "Content-Type", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$id": "4704", + "kind": "constant", + "valueType": { + "$id": "4705", + "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": "4706", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "4707", + "kind": "constant", + "valueType": { + "$id": "4708", + "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": "4709", + "name": "resource", + "nameInRequest": "resource", + "doc": "Resource create parameters.", + "type": { + "$ref": "1014" + }, + "location": "Body", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "4710", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "1014" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + }, + { + "$id": "4711", + "statusCodes": [ + 201 + ], + "bodyType": { + "$ref": "1014" + }, + "headers": [ + { + "$id": "4712", + "name": "azureAsyncOperation", + "nameInResponse": "Azure-AsyncOperation", + "doc": "A link to the status monitor", + "type": { + "$id": "4713", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + { + "$id": "4714", + "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": "4715", + "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": "4716", + "finalStateVia": 0, + "finalResponse": { + "$id": "4717", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "1014" + } + } + }, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.IoTOperations.BrokerAuthentication.createOrUpdate", + "decorators": [], + "examples": [ + { + "$id": "4718", + "kind": "http", + "name": "BrokerAuthentication_CreateOrUpdate_Complex", + "description": "BrokerAuthentication_CreateOrUpdate_Complex", + "filePath": "2025-04-01/BrokerAuthentication_CreateOrUpdate_Complex.json", + "parameters": [ + { + "$id": "4719", + "parameter": { + "$ref": "4688" + }, + "value": { + "$id": "4720", + "kind": "string", + "type": { + "$ref": "4689" + }, + "value": "2025-04-01" + } + }, + { + "$id": "4721", + "parameter": { + "$ref": "4692" + }, + "value": { + "$id": "4722", + "kind": "string", + "type": { + "$ref": "4693" + }, + "value": "F8C729F9-DF9C-4743-848F-96EE433D8E53" + } + }, + { + "$id": "4723", + "parameter": { + "$ref": "4695" + }, + "value": { + "$id": "4724", + "kind": "string", + "type": { + "$ref": "4696" + }, + "value": "rgiotoperations" + } + }, + { + "$id": "4725", + "parameter": { + "$ref": "4697" + }, + "value": { + "$id": "4726", + "kind": "string", + "type": { + "$ref": "4698" + }, + "value": "resource-name123" + } + }, + { + "$id": "4727", + "parameter": { + "$ref": "4699" + }, + "value": { + "$id": "4728", + "kind": "string", + "type": { + "$ref": "4700" + }, + "value": "resource-name123" + } + }, + { + "$id": "4729", + "parameter": { + "$ref": "4701" + }, + "value": { + "$id": "4730", + "kind": "string", + "type": { + "$ref": "4702" + }, + "value": "resource-name123" + } + }, + { + "$id": "4731", + "parameter": { + "$ref": "4709" + }, + "value": { + "$id": "4732", + "kind": "model", + "type": { + "$ref": "1014" + }, + "value": { + "$id": "4733", + "properties": { + "$id": "4734", + "kind": "model", + "type": { + "$ref": "1016" + }, + "value": { + "$id": "4735", + "authenticationMethods": { + "$id": "4736", + "kind": "array", + "type": { + "$ref": "1018" + }, + "value": [ + { + "$id": "4737", + "kind": "model", + "type": { + "$ref": "1019" + }, + "value": { + "$id": "4738", + "method": { + "$id": "4739", + "kind": "string", + "type": { + "$ref": "150" + }, + "value": "ServiceAccountToken" + }, + "serviceAccountTokenSettings": { + "$id": "4740", + "kind": "model", + "type": { + "$ref": "1049" + }, + "value": { + "$id": "4741", + "audiences": { + "$id": "4742", + "kind": "array", + "type": { + "$ref": "1051" + }, + "value": [ + { + "$id": "4743", + "kind": "string", + "type": { + "$ref": "1052" + }, + "value": "aio-internal" + } + ] + } + } + } + } + }, + { + "$id": "4744", + "kind": "model", + "type": { + "$ref": "1019" + }, + "value": { + "$id": "4745", + "method": { + "$id": "4746", + "kind": "string", + "type": { + "$ref": "150" + }, + "value": "X509" + }, + "x509Settings": { + "$id": "4747", + "kind": "model", + "type": { + "$ref": "1058" + }, + "value": { + "$id": "4748", + "trustedClientCaCert": { + "$id": "4749", + "kind": "string", + "type": { + "$ref": "1076" + }, + "value": "my-ca" + }, + "authorizationAttributes": { + "$id": "4750", + "kind": "dict", + "type": { + "$ref": "1060" + }, + "value": { + "$id": "4751", + "root": { + "$id": "4752", + "kind": "model", + "type": { + "$ref": "1062" + }, + "value": { + "$id": "4753", + "subject": { + "$id": "4754", + "kind": "string", + "type": { + "$ref": "1070" + }, + "value": "CN = Contoso Root CA Cert, OU = Engineering, C = US" + }, + "attributes": { + "$id": "4755", + "kind": "dict", + "type": { + "$ref": "1064" + }, + "value": { + "$id": "4756", + "organization": { + "$id": "4757", + "kind": "string", + "type": { + "$ref": "1066" + }, + "value": "contoso" + } + } + } + } + }, + "intermediate": { + "$id": "4758", + "kind": "model", + "type": { + "$ref": "1062" + }, + "value": { + "$id": "4759", + "subject": { + "$id": "4760", + "kind": "string", + "type": { + "$ref": "1070" + }, + "value": "CN = Contoso Intermediate CA" + }, + "attributes": { + "$id": "4761", + "kind": "dict", + "type": { + "$ref": "1064" + }, + "value": { + "$id": "4762", + "city": { + "$id": "4763", + "kind": "string", + "type": { + "$ref": "1066" + }, + "value": "seattle" + }, + "foo": { + "$id": "4764", + "kind": "string", + "type": { + "$ref": "1066" + }, + "value": "bar" + } + } + } + } + }, + "smart-fan": { + "$id": "4765", + "kind": "model", + "type": { + "$ref": "1062" + }, + "value": { + "$id": "4766", + "subject": { + "$id": "4767", + "kind": "string", + "type": { + "$ref": "1070" + }, + "value": "CN = smart-fan" + }, + "attributes": { + "$id": "4768", + "kind": "dict", + "type": { + "$ref": "1064" + }, + "value": { + "$id": "4769", + "building": { + "$id": "4770", + "kind": "string", + "type": { + "$ref": "1066" + }, + "value": "17" + } + } + } + } + } + } + } + } + } + } + } + ] + } + } + }, + "extendedLocation": { + "$id": "4771", + "kind": "model", + "type": { + "$ref": "510" + }, + "value": { + "$id": "4772", + "name": { + "$id": "4773", + "kind": "string", + "type": { + "$ref": "512" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "4774", + "kind": "string", + "type": { + "$ref": "44" + }, + "value": "CustomLocation" + } + } + } + } + } + } + ], + "responses": [ + { + "$id": "4775", + "response": { + "$ref": "4710" + }, + "statusCode": 200, + "bodyValue": { + "$id": "4776", + "kind": "model", + "type": { + "$ref": "1014" + }, + "value": { + "$id": "4777", + "properties": { + "$id": "4778", + "kind": "model", + "type": { + "$ref": "1016" + }, + "value": { + "$id": "4779", + "authenticationMethods": { + "$id": "4780", + "kind": "array", + "type": { + "$ref": "1018" + }, + "value": [ + { + "$id": "4781", + "kind": "model", + "type": { + "$ref": "1019" + }, + "value": { + "$id": "4782", + "method": { + "$id": "4783", + "kind": "string", + "type": { + "$ref": "150" + }, + "value": "ServiceAccountToken" + }, + "serviceAccountTokenSettings": { + "$id": "4784", + "kind": "model", + "type": { + "$ref": "1049" + }, + "value": { + "$id": "4785", + "audiences": { + "$id": "4786", + "kind": "array", + "type": { + "$ref": "1051" + }, + "value": [ + { + "$id": "4787", + "kind": "string", + "type": { + "$ref": "1052" + }, + "value": "aio-internal" + } + ] + } + } + } + } + }, + { + "$id": "4788", + "kind": "model", + "type": { + "$ref": "1019" + }, + "value": { + "$id": "4789", + "method": { + "$id": "4790", + "kind": "string", + "type": { + "$ref": "150" + }, + "value": "X509" + }, + "x509Settings": { + "$id": "4791", + "kind": "model", + "type": { + "$ref": "1058" + }, + "value": { + "$id": "4792", + "trustedClientCaCert": { + "$id": "4793", + "kind": "string", + "type": { + "$ref": "1076" + }, + "value": "my-ca" + }, + "authorizationAttributes": { + "$id": "4794", + "kind": "dict", + "type": { + "$ref": "1060" + }, + "value": { + "$id": "4795", + "root": { + "$id": "4796", + "kind": "model", + "type": { + "$ref": "1062" + }, + "value": { + "$id": "4797", + "subject": { + "$id": "4798", + "kind": "string", + "type": { + "$ref": "1070" + }, + "value": "CN = Contoso Root CA Cert, OU = Engineering, C = US" + }, + "attributes": { + "$id": "4799", + "kind": "dict", + "type": { + "$ref": "1064" + }, + "value": { + "$id": "4800", + "organization": { + "$id": "4801", + "kind": "string", + "type": { + "$ref": "1066" + }, + "value": "contoso" + } + } + } + } + }, + "intermediate": { + "$id": "4802", + "kind": "model", + "type": { + "$ref": "1062" + }, + "value": { + "$id": "4803", + "subject": { + "$id": "4804", + "kind": "string", + "type": { + "$ref": "1070" + }, + "value": "CN = Contoso Intermediate CA" + }, + "attributes": { + "$id": "4805", + "kind": "dict", + "type": { + "$ref": "1064" + }, + "value": { + "$id": "4806", + "city": { + "$id": "4807", + "kind": "string", + "type": { + "$ref": "1066" + }, + "value": "seattle" + }, + "foo": { + "$id": "4808", + "kind": "string", + "type": { + "$ref": "1066" + }, + "value": "bar" + } + } + } + } + }, + "smart-fan": { + "$id": "4809", + "kind": "model", + "type": { + "$ref": "1062" + }, + "value": { + "$id": "4810", + "subject": { + "$id": "4811", + "kind": "string", + "type": { + "$ref": "1070" + }, + "value": "CN = smart-fan" + }, + "attributes": { + "$id": "4812", + "kind": "dict", + "type": { + "$ref": "1064" + }, + "value": { + "$id": "4813", + "building": { + "$id": "4814", + "kind": "string", + "type": { + "$ref": "1066" + }, + "value": "17" + } + } + } + } + } + } + } + } + } + } + } + ] + }, + "provisioningState": { + "$id": "4815", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Succeeded" + } + } + }, + "extendedLocation": { + "$id": "4816", + "kind": "model", + "type": { + "$ref": "510" + }, + "value": { + "$id": "4817", + "name": { + "$id": "4818", + "kind": "string", + "type": { + "$ref": "512" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "4819", + "kind": "string", + "type": { + "$ref": "44" + }, + "value": "CustomLocation" + } + } + }, + "id": { + "$id": "4820", + "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": "4821", + "kind": "string", + "type": { + "$ref": "424" + }, + "value": "lwucizfvtsdpx" + }, + "type": { + "$id": "4822", + "kind": "string", + "type": { + "$ref": "428" + }, + "value": "kvtilkgcxanlfozrd" + }, + "systemData": { + "$id": "4823", + "kind": "model", + "type": { + "$ref": "433" + }, + "value": { + "$id": "4824", + "createdBy": { + "$id": "4825", + "kind": "string", + "type": { + "$ref": "435" + }, + "value": "ssvaslsmudloholronopqyxjcu" + }, + "createdByType": { + "$id": "4826", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "createdAt": { + "$id": "4827", + "kind": "string", + "type": { + "$ref": "442" + }, + "value": "2024-08-09T18:13:29.389Z" + }, + "lastModifiedBy": { + "$id": "4828", + "kind": "string", + "type": { + "$ref": "447" + }, + "value": "gnicpuszwd" + }, + "lastModifiedByType": { + "$id": "4829", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "4830", + "kind": "string", + "type": { + "$ref": "454" + }, + "value": "2024-08-09T18:13:29.389Z" + } + } + } + } + } + }, + { + "$id": "4831", + "response": { + "$ref": "4711" + }, + "statusCode": 201, + "bodyValue": { + "$id": "4832", + "kind": "model", + "type": { + "$ref": "1014" + }, + "value": { + "$id": "4833", + "properties": { + "$id": "4834", + "kind": "model", + "type": { + "$ref": "1016" + }, + "value": { + "$id": "4835", + "authenticationMethods": { + "$id": "4836", + "kind": "array", + "type": { + "$ref": "1018" + }, + "value": [ + { + "$id": "4837", + "kind": "model", + "type": { + "$ref": "1019" + }, + "value": { + "$id": "4838", + "method": { + "$id": "4839", + "kind": "string", + "type": { + "$ref": "150" + }, + "value": "ServiceAccountToken" + }, + "serviceAccountTokenSettings": { + "$id": "4840", + "kind": "model", + "type": { + "$ref": "1049" + }, + "value": { + "$id": "4841", + "audiences": { + "$id": "4842", + "kind": "array", + "type": { + "$ref": "1051" + }, + "value": [ + { + "$id": "4843", + "kind": "string", + "type": { + "$ref": "1052" + }, + "value": "aio-internal" + } + ] + } + } + } + } + }, + { + "$id": "4844", + "kind": "model", + "type": { + "$ref": "1019" + }, + "value": { + "$id": "4845", + "method": { + "$id": "4846", + "kind": "string", + "type": { + "$ref": "150" + }, + "value": "X509" + }, + "x509Settings": { + "$id": "4847", + "kind": "model", + "type": { + "$ref": "1058" + }, + "value": { + "$id": "4848", + "trustedClientCaCert": { + "$id": "4849", + "kind": "string", + "type": { + "$ref": "1076" + }, + "value": "my-ca" + }, + "authorizationAttributes": { + "$id": "4850", + "kind": "dict", + "type": { + "$ref": "1060" + }, + "value": { + "$id": "4851", + "root": { + "$id": "4852", + "kind": "model", + "type": { + "$ref": "1062" + }, + "value": { + "$id": "4853", + "subject": { + "$id": "4854", + "kind": "string", + "type": { + "$ref": "1070" + }, + "value": "CN = Contoso Root CA Cert, OU = Engineering, C = US" + }, + "attributes": { + "$id": "4855", + "kind": "dict", + "type": { + "$ref": "1064" + }, + "value": { + "$id": "4856", + "organization": { + "$id": "4857", + "kind": "string", + "type": { + "$ref": "1066" + }, + "value": "contoso" + } + } + } + } + }, + "intermediate": { + "$id": "4858", + "kind": "model", + "type": { + "$ref": "1062" + }, + "value": { + "$id": "4859", + "subject": { + "$id": "4860", + "kind": "string", + "type": { + "$ref": "1070" + }, + "value": "CN = Contoso Intermediate CA" + }, + "attributes": { + "$id": "4861", + "kind": "dict", + "type": { + "$ref": "1064" + }, + "value": { + "$id": "4862", + "city": { + "$id": "4863", + "kind": "string", + "type": { + "$ref": "1066" + }, + "value": "seattle" + }, + "foo": { + "$id": "4864", + "kind": "string", + "type": { + "$ref": "1066" + }, + "value": "bar" + } + } + } + } + }, + "smart-fan": { + "$id": "4865", + "kind": "model", + "type": { + "$ref": "1062" + }, + "value": { + "$id": "4866", + "subject": { + "$id": "4867", + "kind": "string", + "type": { + "$ref": "1070" + }, + "value": "CN = smart-fan" + }, + "attributes": { + "$id": "4868", + "kind": "dict", + "type": { + "$ref": "1064" + }, + "value": { + "$id": "4869", + "building": { + "$id": "4870", + "kind": "string", + "type": { + "$ref": "1066" + }, + "value": "17" + } + } + } + } + } + } + } + } + } + } + } + ] + }, + "provisioningState": { + "$id": "4871", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Succeeded" + } + } + }, + "extendedLocation": { + "$id": "4872", + "kind": "model", + "type": { + "$ref": "510" + }, + "value": { + "$id": "4873", + "name": { + "$id": "4874", + "kind": "string", + "type": { + "$ref": "512" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "4875", + "kind": "string", + "type": { + "$ref": "44" + }, + "value": "CustomLocation" + } + } + }, + "id": { + "$id": "4876", + "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": "4877", + "kind": "string", + "type": { + "$ref": "424" + }, + "value": "lwucizfvtsdpx" + }, + "type": { + "$id": "4878", + "kind": "string", + "type": { + "$ref": "428" + }, + "value": "kvtilkgcxanlfozrd" + }, + "systemData": { + "$id": "4879", + "kind": "model", + "type": { + "$ref": "433" + }, + "value": { + "$id": "4880", + "createdBy": { + "$id": "4881", + "kind": "string", + "type": { + "$ref": "435" + }, + "value": "ssvaslsmudloholronopqyxjcu" + }, + "createdByType": { + "$id": "4882", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "createdAt": { + "$id": "4883", + "kind": "string", + "type": { + "$ref": "442" + }, + "value": "2024-08-09T18:13:29.389Z" + }, + "lastModifiedBy": { + "$id": "4884", + "kind": "string", + "type": { + "$ref": "447" + }, + "value": "gnicpuszwd" + }, + "lastModifiedByType": { + "$id": "4885", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "4886", + "kind": "string", + "type": { + "$ref": "454" + }, + "value": "2024-08-09T18:13:29.389Z" + } + } + } + } + } + } + ] + }, + { + "$id": "4887", + "kind": "http", + "name": "BrokerAuthentication_CreateOrUpdate", + "description": "BrokerAuthentication_CreateOrUpdate", + "filePath": "2025-04-01/BrokerAuthentication_CreateOrUpdate_MaximumSet_Gen.json", + "parameters": [ + { + "$id": "4888", + "parameter": { + "$ref": "4688" + }, + "value": { + "$id": "4889", + "kind": "string", + "type": { + "$ref": "4689" + }, + "value": "2025-04-01" + } + }, + { + "$id": "4890", + "parameter": { + "$ref": "4692" + }, + "value": { + "$id": "4891", + "kind": "string", + "type": { + "$ref": "4693" + }, + "value": "F8C729F9-DF9C-4743-848F-96EE433D8E53" + } + }, + { + "$id": "4892", + "parameter": { + "$ref": "4695" + }, + "value": { + "$id": "4893", + "kind": "string", + "type": { + "$ref": "4696" + }, + "value": "rgiotoperations" + } + }, + { + "$id": "4894", + "parameter": { + "$ref": "4697" + }, + "value": { + "$id": "4895", + "kind": "string", + "type": { + "$ref": "4698" + }, + "value": "resource-name123" + } + }, + { + "$id": "4896", + "parameter": { + "$ref": "4699" + }, + "value": { + "$id": "4897", + "kind": "string", + "type": { + "$ref": "4700" + }, + "value": "resource-name123" + } + }, + { + "$id": "4898", + "parameter": { + "$ref": "4701" + }, + "value": { + "$id": "4899", + "kind": "string", + "type": { + "$ref": "4702" + }, + "value": "resource-name123" + } + }, + { + "$id": "4900", + "parameter": { + "$ref": "4709" + }, + "value": { + "$id": "4901", + "kind": "model", + "type": { + "$ref": "1014" + }, + "value": { + "$id": "4902", + "properties": { + "$id": "4903", + "kind": "model", + "type": { + "$ref": "1016" + }, + "value": { + "$id": "4904", + "authenticationMethods": { + "$id": "4905", + "kind": "array", + "type": { + "$ref": "1018" + }, + "value": [ + { + "$id": "4906", + "kind": "model", + "type": { + "$ref": "1019" + }, + "value": { + "$id": "4907", + "method": { + "$id": "4908", + "kind": "string", + "type": { + "$ref": "150" + }, + "value": "Custom" + }, + "customSettings": { + "$id": "4909", + "kind": "model", + "type": { + "$ref": "1024" + }, + "value": { + "$id": "4910", + "auth": { + "$id": "4911", + "kind": "model", + "type": { + "$ref": "1026" + }, + "value": { + "$id": "4912", + "x509": { + "$id": "4913", + "kind": "model", + "type": { + "$ref": "982" + }, + "value": { + "$id": "4914", + "secretRef": { + "$id": "4915", + "kind": "string", + "type": { + "$ref": "984" + }, + "value": "secret-name" + } + } + } + } + }, + "caCertConfigMap": { + "$id": "4916", + "kind": "string", + "type": { + "$ref": "1033" + }, + "value": "pdecudefqyolvncbus" + }, + "endpoint": { + "$id": "4917", + "kind": "string", + "type": { + "$ref": "1037" + }, + "value": "https://www.example.com" + }, + "headers": { + "$id": "4918", + "kind": "dict", + "type": { + "$ref": "1041" + }, + "value": { + "$id": "4919", + "key8518": { + "$id": "4920", + "kind": "string", + "type": { + "$ref": "1043" + }, + "value": "bwityjy" + } + } + } + } + }, + "serviceAccountTokenSettings": { + "$id": "4921", + "kind": "model", + "type": { + "$ref": "1049" + }, + "value": { + "$id": "4922", + "audiences": { + "$id": "4923", + "kind": "array", + "type": { + "$ref": "1051" + }, + "value": [ + { + "$id": "4924", + "kind": "string", + "type": { + "$ref": "1052" + }, + "value": "jqyhyqatuydg" + } + ] + } + } + }, + "x509Settings": { + "$id": "4925", + "kind": "model", + "type": { + "$ref": "1058" + }, + "value": { + "$id": "4926", + "authorizationAttributes": { + "$id": "4927", + "kind": "dict", + "type": { + "$ref": "1060" + }, + "value": { + "$id": "4928", + "key3384": { + "$id": "4929", + "kind": "model", + "type": { + "$ref": "1062" + }, + "value": { + "$id": "4930", + "attributes": { + "$id": "4931", + "kind": "dict", + "type": { + "$ref": "1064" + }, + "value": { + "$id": "4932", + "key186": { + "$id": "4933", + "kind": "string", + "type": { + "$ref": "1066" + }, + "value": "ucpajramsz" + } + } + }, + "subject": { + "$id": "4934", + "kind": "string", + "type": { + "$ref": "1070" + }, + "value": "jpgwctfeixitptfgfnqhua" + } + } + } + } + }, + "trustedClientCaCert": { + "$id": "4935", + "kind": "string", + "type": { + "$ref": "1076" + }, + "value": "vlctsqddl" + } + } + } + } + } + ] + } + } + }, + "extendedLocation": { + "$id": "4936", + "kind": "model", + "type": { + "$ref": "510" + }, + "value": { + "$id": "4937", + "name": { + "$id": "4938", + "kind": "string", + "type": { + "$ref": "512" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "4939", + "kind": "string", + "type": { + "$ref": "44" + }, + "value": "CustomLocation" + } + } + } + } + } + } + ], + "responses": [ + { + "$id": "4940", + "response": { + "$ref": "4710" + }, + "statusCode": 200, + "bodyValue": { + "$id": "4941", + "kind": "model", + "type": { + "$ref": "1014" + }, + "value": { + "$id": "4942", + "properties": { + "$id": "4943", + "kind": "model", + "type": { + "$ref": "1016" + }, + "value": { + "$id": "4944", + "authenticationMethods": { + "$id": "4945", + "kind": "array", + "type": { + "$ref": "1018" + }, + "value": [ + { + "$id": "4946", + "kind": "model", + "type": { + "$ref": "1019" + }, + "value": { + "$id": "4947", + "method": { + "$id": "4948", + "kind": "string", + "type": { + "$ref": "150" + }, + "value": "Custom" + }, + "customSettings": { + "$id": "4949", + "kind": "model", + "type": { + "$ref": "1024" + }, + "value": { + "$id": "4950", + "auth": { + "$id": "4951", + "kind": "model", + "type": { + "$ref": "1026" + }, + "value": { + "$id": "4952", + "x509": { + "$id": "4953", + "kind": "model", + "type": { + "$ref": "982" + }, + "value": { + "$id": "4954", + "secretRef": { + "$id": "4955", + "kind": "string", + "type": { + "$ref": "984" + }, + "value": "secret-name" + } + } + } + } + }, + "caCertConfigMap": { + "$id": "4956", + "kind": "string", + "type": { + "$ref": "1033" + }, + "value": "pdecudefqyolvncbus" + }, + "endpoint": { + "$id": "4957", + "kind": "string", + "type": { + "$ref": "1037" + }, + "value": "https://www.example.com" + }, + "headers": { + "$id": "4958", + "kind": "dict", + "type": { + "$ref": "1041" + }, + "value": { + "$id": "4959", + "key8518": { + "$id": "4960", + "kind": "string", + "type": { + "$ref": "1043" + }, + "value": "bwityjy" + } + } + } + } + }, + "serviceAccountTokenSettings": { + "$id": "4961", + "kind": "model", + "type": { + "$ref": "1049" + }, + "value": { + "$id": "4962", + "audiences": { + "$id": "4963", + "kind": "array", + "type": { + "$ref": "1051" + }, + "value": [ + { + "$id": "4964", + "kind": "string", + "type": { + "$ref": "1052" + }, + "value": "jqyhyqatuydg" + } + ] + } + } + }, + "x509Settings": { + "$id": "4965", + "kind": "model", + "type": { + "$ref": "1058" + }, + "value": { + "$id": "4966", + "authorizationAttributes": { + "$id": "4967", + "kind": "dict", + "type": { + "$ref": "1060" + }, + "value": { + "$id": "4968", + "key3384": { + "$id": "4969", + "kind": "model", + "type": { + "$ref": "1062" + }, + "value": { + "$id": "4970", + "attributes": { + "$id": "4971", + "kind": "dict", + "type": { + "$ref": "1064" + }, + "value": { + "$id": "4972", + "key186": { + "$id": "4973", + "kind": "string", + "type": { + "$ref": "1066" + }, + "value": "ucpajramsz" + } + } + }, + "subject": { + "$id": "4974", + "kind": "string", + "type": { + "$ref": "1070" + }, + "value": "jpgwctfeixitptfgfnqhua" + } + } + } + } + }, + "trustedClientCaCert": { + "$id": "4975", + "kind": "string", + "type": { + "$ref": "1076" + }, + "value": "vlctsqddl" + } + } + } + } + } + ] + }, + "provisioningState": { + "$id": "4976", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Succeeded" + } + } + }, + "extendedLocation": { + "$id": "4977", + "kind": "model", + "type": { + "$ref": "510" + }, + "value": { + "$id": "4978", + "name": { + "$id": "4979", + "kind": "string", + "type": { + "$ref": "512" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "4980", + "kind": "string", + "type": { + "$ref": "44" + }, + "value": "CustomLocation" + } + } + }, + "id": { + "$id": "4981", + "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": "4982", + "kind": "string", + "type": { + "$ref": "424" + }, + "value": "lwucizfvtsdpx" + }, + "type": { + "$id": "4983", + "kind": "string", + "type": { + "$ref": "428" + }, + "value": "kvtilkgcxanlfozrd" + }, + "systemData": { + "$id": "4984", + "kind": "model", + "type": { + "$ref": "433" + }, + "value": { + "$id": "4985", + "createdBy": { + "$id": "4986", + "kind": "string", + "type": { + "$ref": "435" + }, + "value": "ssvaslsmudloholronopqyxjcu" + }, + "createdByType": { + "$id": "4987", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "createdAt": { + "$id": "4988", + "kind": "string", + "type": { + "$ref": "442" + }, + "value": "2024-08-09T18:13:29.389Z" + }, + "lastModifiedBy": { + "$id": "4989", + "kind": "string", + "type": { + "$ref": "447" + }, + "value": "gnicpuszwd" + }, + "lastModifiedByType": { + "$id": "4990", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "4991", + "kind": "string", + "type": { + "$ref": "454" + }, + "value": "2024-08-09T18:13:29.389Z" + } + } + } + } + } + }, + { + "$id": "4992", + "response": { + "$ref": "4711" + }, + "statusCode": 201, + "bodyValue": { + "$id": "4993", + "kind": "model", + "type": { + "$ref": "1014" + }, + "value": { + "$id": "4994", + "properties": { + "$id": "4995", + "kind": "model", + "type": { + "$ref": "1016" + }, + "value": { + "$id": "4996", + "authenticationMethods": { + "$id": "4997", + "kind": "array", + "type": { + "$ref": "1018" + }, + "value": [ + { + "$id": "4998", + "kind": "model", + "type": { + "$ref": "1019" + }, + "value": { + "$id": "4999", + "method": { + "$id": "5000", + "kind": "string", + "type": { + "$ref": "150" + }, + "value": "Custom" + }, + "customSettings": { + "$id": "5001", + "kind": "model", + "type": { + "$ref": "1024" + }, + "value": { + "$id": "5002", + "auth": { + "$id": "5003", + "kind": "model", + "type": { + "$ref": "1026" + }, + "value": { + "$id": "5004", + "x509": { + "$id": "5005", + "kind": "model", + "type": { + "$ref": "982" + }, + "value": { + "$id": "5006", + "secretRef": { + "$id": "5007", + "kind": "string", + "type": { + "$ref": "984" + }, + "value": "secret-name" + } + } + } + } + }, + "caCertConfigMap": { + "$id": "5008", + "kind": "string", + "type": { + "$ref": "1033" + }, + "value": "pdecudefqyolvncbus" + }, + "endpoint": { + "$id": "5009", + "kind": "string", + "type": { + "$ref": "1037" + }, + "value": "https://www.example.com" + }, + "headers": { + "$id": "5010", + "kind": "dict", + "type": { + "$ref": "1041" + }, + "value": { + "$id": "5011", + "key8518": { + "$id": "5012", + "kind": "string", + "type": { + "$ref": "1043" + }, + "value": "bwityjy" + } + } + } + } + }, + "serviceAccountTokenSettings": { + "$id": "5013", + "kind": "model", + "type": { + "$ref": "1049" + }, + "value": { + "$id": "5014", + "audiences": { + "$id": "5015", + "kind": "array", + "type": { + "$ref": "1051" + }, + "value": [ + { + "$id": "5016", + "kind": "string", + "type": { + "$ref": "1052" + }, + "value": "jqyhyqatuydg" + } + ] + } + } + }, + "x509Settings": { + "$id": "5017", + "kind": "model", + "type": { + "$ref": "1058" + }, + "value": { + "$id": "5018", + "authorizationAttributes": { + "$id": "5019", + "kind": "dict", + "type": { + "$ref": "1060" + }, + "value": { + "$id": "5020", + "key3384": { + "$id": "5021", + "kind": "model", + "type": { + "$ref": "1062" + }, + "value": { + "$id": "5022", + "attributes": { + "$id": "5023", + "kind": "dict", + "type": { + "$ref": "1064" + }, + "value": { + "$id": "5024", + "key186": { + "$id": "5025", + "kind": "string", + "type": { + "$ref": "1066" + }, + "value": "ucpajramsz" + } + } + }, + "subject": { + "$id": "5026", + "kind": "string", + "type": { + "$ref": "1070" + }, + "value": "jpgwctfeixitptfgfnqhua" + } + } + } + } + }, + "trustedClientCaCert": { + "$id": "5027", + "kind": "string", + "type": { + "$ref": "1076" + }, + "value": "vlctsqddl" + } + } + } + } + } + ] + }, + "provisioningState": { + "$id": "5028", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Succeeded" + } + } + }, + "extendedLocation": { + "$id": "5029", + "kind": "model", + "type": { + "$ref": "510" + }, + "value": { + "$id": "5030", + "name": { + "$id": "5031", + "kind": "string", + "type": { + "$ref": "512" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "5032", + "kind": "string", + "type": { + "$ref": "44" + }, + "value": "CustomLocation" + } + } + }, + "id": { + "$id": "5033", + "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": "5034", + "kind": "string", + "type": { + "$ref": "424" + }, + "value": "lwucizfvtsdpx" + }, + "type": { + "$id": "5035", + "kind": "string", + "type": { + "$ref": "428" + }, + "value": "kvtilkgcxanlfozrd" + }, + "systemData": { + "$id": "5036", + "kind": "model", + "type": { + "$ref": "433" + }, + "value": { + "$id": "5037", + "createdBy": { + "$id": "5038", + "kind": "string", + "type": { + "$ref": "435" + }, + "value": "ssvaslsmudloholronopqyxjcu" + }, + "createdByType": { + "$id": "5039", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "createdAt": { + "$id": "5040", + "kind": "string", + "type": { + "$ref": "442" + }, + "value": "2024-08-09T18:13:29.389Z" + }, + "lastModifiedBy": { + "$id": "5041", + "kind": "string", + "type": { + "$ref": "447" + }, + "value": "gnicpuszwd" + }, + "lastModifiedByType": { + "$id": "5042", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "5043", + "kind": "string", + "type": { + "$ref": "454" + }, + "value": "2024-08-09T18:13:29.389Z" + } + } + } + } + } + } + ] + } + ] + }, + { + "$id": "5044", + "name": "delete", + "resourceName": "BrokerAuthenticationResource", + "doc": "Delete a BrokerAuthenticationResource", + "accessibility": "public", + "parameters": [ + { + "$id": "5045", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "5046", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "5047", + "type": { + "$id": "5048", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-04-01" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5049", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "5050", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "5051", + "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": "5052", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "5053", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5054", + "name": "instanceName", + "nameInRequest": "instanceName", + "doc": "Name of instance.", + "type": { + "$id": "5055", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5056", + "name": "brokerName", + "nameInRequest": "brokerName", + "doc": "Name of broker.", + "type": { + "$id": "5057", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5058", + "name": "authenticationName", + "nameInRequest": "authenticationName", + "doc": "Name of Instance broker authentication resource", + "type": { + "$id": "5059", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5060", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "5061", + "kind": "constant", + "valueType": { + "$id": "5062", + "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": "5063", + "statusCodes": [ + 202 + ], + "headers": [ + { + "$id": "5064", + "name": "location", + "nameInResponse": "Location", + "doc": "The Location header contains the URL where the status of the long running operation can be checked.", + "type": { + "$id": "5065", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + { + "$id": "5066", + "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": "5067", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + } + } + ], + "isErrorResponse": false + }, + { + "$id": "5068", + "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": "5069", + "finalStateVia": 1, + "finalResponse": { + "$id": "5070", + "statusCodes": [ + 204 + ] + } + }, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.IoTOperations.BrokerAuthentication.delete", + "decorators": [], + "examples": [ + { + "$id": "5071", + "kind": "http", + "name": "BrokerAuthentication_Delete", + "description": "BrokerAuthentication_Delete", + "filePath": "2025-04-01/BrokerAuthentication_Delete_MaximumSet_Gen.json", + "parameters": [ + { + "$id": "5072", + "parameter": { + "$ref": "5045" + }, + "value": { + "$id": "5073", + "kind": "string", + "type": { + "$ref": "5046" + }, + "value": "2025-04-01" + } + }, + { + "$id": "5074", + "parameter": { + "$ref": "5049" + }, + "value": { + "$id": "5075", + "kind": "string", + "type": { + "$ref": "5050" + }, + "value": "F8C729F9-DF9C-4743-848F-96EE433D8E53" + } + }, + { + "$id": "5076", + "parameter": { + "$ref": "5052" + }, + "value": { + "$id": "5077", + "kind": "string", + "type": { + "$ref": "5053" + }, + "value": "rgiotoperations" + } + }, + { + "$id": "5078", + "parameter": { + "$ref": "5054" + }, + "value": { + "$id": "5079", + "kind": "string", + "type": { + "$ref": "5055" + }, + "value": "resource-name123" + } + }, + { + "$id": "5080", + "parameter": { + "$ref": "5056" + }, + "value": { + "$id": "5081", + "kind": "string", + "type": { + "$ref": "5057" + }, + "value": "resource-name123" + } + }, + { + "$id": "5082", + "parameter": { + "$ref": "5058" + }, + "value": { + "$id": "5083", + "kind": "string", + "type": { + "$ref": "5059" + }, + "value": "resource-name123" + } + } + ], + "responses": [ + { + "$id": "5084", + "response": { + "$ref": "5063" + }, + "statusCode": 202 + }, + { + "$id": "5085", + "response": { + "$ref": "5068" + }, + "statusCode": 204 + } + ] + } + ] + }, + { + "$id": "5086", + "name": "listByResourceGroup", + "resourceName": "BrokerAuthenticationResource", + "doc": "List BrokerAuthenticationResource resources by BrokerResource", + "accessibility": "public", + "parameters": [ + { + "$id": "5087", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "5088", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "5089", + "type": { + "$id": "5090", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-04-01" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5091", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "5092", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "5093", + "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": "5094", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "5095", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5096", + "name": "instanceName", + "nameInRequest": "instanceName", + "doc": "Name of instance.", + "type": { + "$id": "5097", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5098", + "name": "brokerName", + "nameInRequest": "brokerName", + "doc": "Name of broker.", + "type": { + "$id": "5099", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5100", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "5101", + "kind": "constant", + "valueType": { + "$id": "5102", + "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": "5103", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "1091" + }, + "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": "5104", + "itemPropertySegments": [ + "value" + ], + "nextLink": { + "$id": "5105", + "responseSegments": [ + "nextLink" + ], + "responseLocation": "Body" + } + }, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.IoTOperations.BrokerAuthentication.listByResourceGroup", + "decorators": [], + "examples": [ + { + "$id": "5106", + "kind": "http", + "name": "BrokerAuthentication_ListByResourceGroup", + "description": "BrokerAuthentication_ListByResourceGroup", + "filePath": "2025-04-01/BrokerAuthentication_ListByResourceGroup_MaximumSet_Gen.json", + "parameters": [ + { + "$id": "5107", + "parameter": { + "$ref": "5087" + }, + "value": { + "$id": "5108", + "kind": "string", + "type": { + "$ref": "5088" + }, + "value": "2025-04-01" + } + }, + { + "$id": "5109", + "parameter": { + "$ref": "5091" + }, + "value": { + "$id": "5110", + "kind": "string", + "type": { + "$ref": "5092" + }, + "value": "F8C729F9-DF9C-4743-848F-96EE433D8E53" + } + }, + { + "$id": "5111", + "parameter": { + "$ref": "5094" + }, + "value": { + "$id": "5112", + "kind": "string", + "type": { + "$ref": "5095" + }, + "value": "rgiotoperations" + } + }, + { + "$id": "5113", + "parameter": { + "$ref": "5096" + }, + "value": { + "$id": "5114", + "kind": "string", + "type": { + "$ref": "5097" + }, + "value": "resource-name123" + } + }, + { + "$id": "5115", + "parameter": { + "$ref": "5098" + }, + "value": { + "$id": "5116", + "kind": "string", + "type": { + "$ref": "5099" + }, + "value": "resource-name123" + } + } + ], + "responses": [ + { + "$id": "5117", + "response": { + "$ref": "5103" + }, + "statusCode": 200, + "bodyValue": { + "$id": "5118", + "kind": "model", + "type": { + "$ref": "1091" + }, + "value": { + "$id": "5119", + "value": { + "$id": "5120", + "kind": "array", + "type": { + "$ref": "1093" + }, + "value": [ + { + "$id": "5121", + "kind": "model", + "type": { + "$ref": "1014" + }, + "value": { + "$id": "5122", + "properties": { + "$id": "5123", + "kind": "model", + "type": { + "$ref": "1016" + }, + "value": { + "$id": "5124", + "authenticationMethods": { + "$id": "5125", + "kind": "array", + "type": { + "$ref": "1018" + }, + "value": [ + { + "$id": "5126", + "kind": "model", + "type": { + "$ref": "1019" + }, + "value": { + "$id": "5127", + "method": { + "$id": "5128", + "kind": "string", + "type": { + "$ref": "150" + }, + "value": "Custom" + }, + "customSettings": { + "$id": "5129", + "kind": "model", + "type": { + "$ref": "1024" + }, + "value": { + "$id": "5130", + "auth": { + "$id": "5131", + "kind": "model", + "type": { + "$ref": "1026" + }, + "value": { + "$id": "5132", + "x509": { + "$id": "5133", + "kind": "model", + "type": { + "$ref": "982" + }, + "value": { + "$id": "5134", + "secretRef": { + "$id": "5135", + "kind": "string", + "type": { + "$ref": "984" + }, + "value": "secret-name" + } + } + } + } + }, + "caCertConfigMap": { + "$id": "5136", + "kind": "string", + "type": { + "$ref": "1033" + }, + "value": "pdecudefqyolvncbus" + }, + "endpoint": { + "$id": "5137", + "kind": "string", + "type": { + "$ref": "1037" + }, + "value": "https://www.example.com" + }, + "headers": { + "$id": "5138", + "kind": "dict", + "type": { + "$ref": "1041" + }, + "value": { + "$id": "5139", + "key8518": { + "$id": "5140", + "kind": "string", + "type": { + "$ref": "1043" + }, + "value": "bwityjy" + } + } + } + } + }, + "serviceAccountTokenSettings": { + "$id": "5141", + "kind": "model", + "type": { + "$ref": "1049" + }, + "value": { + "$id": "5142", + "audiences": { + "$id": "5143", + "kind": "array", + "type": { + "$ref": "1051" + }, + "value": [ + { + "$id": "5144", + "kind": "string", + "type": { + "$ref": "1052" + }, + "value": "jqyhyqatuydg" + } + ] + } + } + }, + "x509Settings": { + "$id": "5145", + "kind": "model", + "type": { + "$ref": "1058" + }, + "value": { + "$id": "5146", + "authorizationAttributes": { + "$id": "5147", + "kind": "dict", + "type": { + "$ref": "1060" + }, + "value": { + "$id": "5148", + "key3384": { + "$id": "5149", + "kind": "model", + "type": { + "$ref": "1062" + }, + "value": { + "$id": "5150", + "attributes": { + "$id": "5151", + "kind": "dict", + "type": { + "$ref": "1064" + }, + "value": { + "$id": "5152", + "key186": { + "$id": "5153", + "kind": "string", + "type": { + "$ref": "1066" + }, + "value": "ucpajramsz" + } + } + }, + "subject": { + "$id": "5154", + "kind": "string", + "type": { + "$ref": "1070" + }, + "value": "jpgwctfeixitptfgfnqhua" + } + } + } + } + }, + "trustedClientCaCert": { + "$id": "5155", + "kind": "string", + "type": { + "$ref": "1076" + }, + "value": "vlctsqddl" + } + } + } + } + } + ] + }, + "provisioningState": { + "$id": "5156", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Succeeded" + } + } + }, + "extendedLocation": { + "$id": "5157", + "kind": "model", + "type": { + "$ref": "510" + }, + "value": { + "$id": "5158", + "name": { + "$id": "5159", + "kind": "string", + "type": { + "$ref": "512" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "5160", + "kind": "string", + "type": { + "$ref": "44" + }, + "value": "CustomLocation" + } + } + }, + "id": { + "$id": "5161", + "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": "5162", + "kind": "string", + "type": { + "$ref": "424" + }, + "value": "lwucizfvtsdpx" + }, + "type": { + "$id": "5163", + "kind": "string", + "type": { + "$ref": "428" + }, + "value": "kvtilkgcxanlfozrd" + }, + "systemData": { + "$id": "5164", + "kind": "model", + "type": { + "$ref": "433" + }, + "value": { + "$id": "5165", + "createdBy": { + "$id": "5166", + "kind": "string", + "type": { + "$ref": "435" + }, + "value": "ssvaslsmudloholronopqyxjcu" + }, + "createdByType": { + "$id": "5167", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "createdAt": { + "$id": "5168", + "kind": "string", + "type": { + "$ref": "442" + }, + "value": "2024-08-09T18:13:29.389Z" + }, + "lastModifiedBy": { + "$id": "5169", + "kind": "string", + "type": { + "$ref": "447" + }, + "value": "gnicpuszwd" + }, + "lastModifiedByType": { + "$id": "5170", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "5171", + "kind": "string", + "type": { + "$ref": "454" + }, + "value": "2024-08-09T18:13:29.389Z" + } + } + } + } + } + ] + }, + "nextLink": { + "$id": "5172", + "kind": "string", + "type": { + "$ref": "1097" + }, + "value": "https://microsoft.com/a" + } + } + } + } + ] + } + ] + } + ], + "parameters": [ + { + "$id": "5173", + "name": "endpoint", + "nameInRequest": "endpoint", + "doc": "Service host", + "type": { + "$id": "5174", + "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": "5175", + "type": { + "$id": "5176", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "https://management.azure.com" + } + } + ], + "decorators": [ + { + "$id": "5177", + "name": "Azure.ResourceManager.@armResourceOperations", + "arguments": { + "$id": "5178" + } + } + ], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.BrokerAuthentication", + "apiVersions": [ + "2024-11-01", + "2025-04-01" + ], + "parent": { + "$ref": "1692" + } + }, + { + "$id": "5179", + "kind": "client", + "name": "BrokerAuthorization", + "namespace": "Azure.ResourceManager.IotOperations", + "operations": [ + { + "$id": "5180", + "name": "get", + "resourceName": "BrokerAuthorizationResource", + "doc": "Get a BrokerAuthorizationResource", + "accessibility": "public", + "parameters": [ + { + "$id": "5181", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "5182", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "5183", + "type": { + "$id": "5184", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-04-01" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5185", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "5186", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "5187", + "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": "5188", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "5189", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5190", + "name": "instanceName", + "nameInRequest": "instanceName", + "doc": "Name of instance.", + "type": { + "$id": "5191", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5192", + "name": "brokerName", + "nameInRequest": "brokerName", + "doc": "Name of broker.", + "type": { + "$id": "5193", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5194", + "name": "authorizationName", + "nameInRequest": "authorizationName", + "doc": "Name of Instance broker authorization resource", + "type": { + "$id": "5195", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5196", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "5197", + "kind": "constant", + "valueType": { + "$id": "5198", + "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": "5199", + "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}/authorizations/{authorizationName}", + "bufferResponse": true, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.IoTOperations.BrokerAuthorization.get", + "decorators": [], + "examples": [ + { + "$id": "5200", + "kind": "http", + "name": "BrokerAuthorization_Get", + "description": "BrokerAuthorization_Get", + "filePath": "2025-04-01/BrokerAuthorization_Get_MaximumSet_Gen.json", + "parameters": [ + { + "$id": "5201", + "parameter": { + "$ref": "5181" + }, + "value": { + "$id": "5202", + "kind": "string", + "type": { + "$ref": "5182" + }, + "value": "2025-04-01" + } + }, + { + "$id": "5203", + "parameter": { + "$ref": "5185" + }, + "value": { + "$id": "5204", + "kind": "string", + "type": { + "$ref": "5186" + }, + "value": "F8C729F9-DF9C-4743-848F-96EE433D8E53" + } + }, + { + "$id": "5205", + "parameter": { + "$ref": "5188" + }, + "value": { + "$id": "5206", + "kind": "string", + "type": { + "$ref": "5189" + }, + "value": "rgiotoperations" + } + }, + { + "$id": "5207", + "parameter": { + "$ref": "5190" + }, + "value": { + "$id": "5208", + "kind": "string", + "type": { + "$ref": "5191" + }, + "value": "resource-name123" + } + }, + { + "$id": "5209", + "parameter": { + "$ref": "5192" + }, + "value": { + "$id": "5210", + "kind": "string", + "type": { + "$ref": "5193" + }, + "value": "resource-name123" + } + }, + { + "$id": "5211", + "parameter": { + "$ref": "5194" + }, + "value": { + "$id": "5212", + "kind": "string", + "type": { + "$ref": "5195" + }, + "value": "resource-name123" + } + } + ], + "responses": [ + { + "$id": "5213", + "response": { + "$ref": "5199" + }, + "statusCode": 200, + "bodyValue": { + "$id": "5214", + "kind": "model", + "type": { + "$ref": "1101" + }, + "value": { + "$id": "5215", + "properties": { + "$id": "5216", + "kind": "model", + "type": { + "$ref": "1103" + }, + "value": { + "$id": "5217", + "authorizationPolicies": { + "$id": "5218", + "kind": "model", + "type": { + "$ref": "1105" + }, + "value": { + "$id": "5219", + "cache": { + "$id": "5220", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Enabled" + }, + "rules": { + "$id": "5221", + "kind": "array", + "type": { + "$ref": "1110" + }, + "value": [ + { + "$id": "5222", + "kind": "model", + "type": { + "$ref": "1111" + }, + "value": { + "$id": "5223", + "brokerResources": { + "$id": "5224", + "kind": "array", + "type": { + "$ref": "1113" + }, + "value": [ + { + "$id": "5225", + "kind": "model", + "type": { + "$ref": "1114" + }, + "value": { + "$id": "5226", + "method": { + "$id": "5227", + "kind": "string", + "type": { + "$ref": "158" + }, + "value": "Connect" + }, + "clientIds": { + "$id": "5228", + "kind": "array", + "type": { + "$ref": "1119" + }, + "value": [ + { + "$id": "5229", + "kind": "string", + "type": { + "$ref": "1120" + }, + "value": "nlc" + } + ] + }, + "topics": { + "$id": "5230", + "kind": "array", + "type": { + "$ref": "1124" + }, + "value": [ + { + "$id": "5231", + "kind": "string", + "type": { + "$ref": "1125" + }, + "value": "wvuca" + } + ] + } + } + } + ] + }, + "principals": { + "$id": "5232", + "kind": "model", + "type": { + "$ref": "1131" + }, + "value": { + "$id": "5233", + "attributes": { + "$id": "5234", + "kind": "array", + "type": { + "$ref": "1133" + }, + "value": [ + { + "$id": "5235", + "kind": "dict", + "type": { + "$ref": "1134" + }, + "value": { + "$id": "5236", + "key5526": { + "$id": "5237", + "kind": "string", + "type": { + "$ref": "1136" + }, + "value": "nydhzdhbldygqcn" + } + } + } + ] + }, + "clientIds": { + "$id": "5238", + "kind": "array", + "type": { + "$ref": "1140" + }, + "value": [ + { + "$id": "5239", + "kind": "string", + "type": { + "$ref": "1141" + }, + "value": "smopeaeddsygz" + } + ] + }, + "usernames": { + "$id": "5240", + "kind": "array", + "type": { + "$ref": "1145" + }, + "value": [ + { + "$id": "5241", + "kind": "string", + "type": { + "$ref": "1146" + }, + "value": "iozngyqndrteikszkbasinzdjtm" + } + ] + } + } + }, + "stateStoreResources": { + "$id": "5242", + "kind": "array", + "type": { + "$ref": "1152" + }, + "value": [ + { + "$id": "5243", + "kind": "model", + "type": { + "$ref": "1153" + }, + "value": { + "$id": "5244", + "keyType": { + "$id": "5245", + "kind": "string", + "type": { + "$ref": "166" + }, + "value": "Pattern" + }, + "keys": { + "$id": "5246", + "kind": "array", + "type": { + "$ref": "1158" + }, + "value": [ + { + "$id": "5247", + "kind": "string", + "type": { + "$ref": "1159" + }, + "value": "tkounsqtwvzyaklxjqoerpu" + } + ] + }, + "method": { + "$id": "5248", + "kind": "string", + "type": { + "$ref": "174" + }, + "value": "Read" + } + } + } + ] + } + } + } + ] + } + } + }, + "provisioningState": { + "$id": "5249", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Succeeded" + } + } + }, + "extendedLocation": { + "$id": "5250", + "kind": "model", + "type": { + "$ref": "510" + }, + "value": { + "$id": "5251", + "name": { + "$id": "5252", + "kind": "string", + "type": { + "$ref": "512" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "5253", + "kind": "string", + "type": { + "$ref": "44" + }, + "value": "CustomLocation" + } + } + }, + "id": { + "$id": "5254", + "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": "5255", + "kind": "string", + "type": { + "$ref": "424" + }, + "value": "anqrqsvrjmlvzkrbuav" + }, + "type": { + "$id": "5256", + "kind": "string", + "type": { + "$ref": "428" + }, + "value": "yjlsfarshqoxojvgmy" + }, + "systemData": { + "$id": "5257", + "kind": "model", + "type": { + "$ref": "433" + }, + "value": { + "$id": "5258", + "createdBy": { + "$id": "5259", + "kind": "string", + "type": { + "$ref": "435" + }, + "value": "ssvaslsmudloholronopqyxjcu" + }, + "createdByType": { + "$id": "5260", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "createdAt": { + "$id": "5261", + "kind": "string", + "type": { + "$ref": "442" + }, + "value": "2024-08-09T18:13:29.389Z" + }, + "lastModifiedBy": { + "$id": "5262", + "kind": "string", + "type": { + "$ref": "447" + }, + "value": "gnicpuszwd" + }, + "lastModifiedByType": { + "$id": "5263", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "5264", + "kind": "string", + "type": { + "$ref": "454" + }, + "value": "2024-08-09T18:13:29.389Z" + } + } + } + } + } + } + ] + } + ] + }, + { + "$id": "5265", + "name": "createOrUpdate", + "resourceName": "BrokerAuthorizationResource", + "doc": "Create a BrokerAuthorizationResource", + "accessibility": "public", + "parameters": [ + { + "$id": "5266", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "5267", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "5268", + "type": { + "$id": "5269", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-04-01" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5270", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "5271", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "5272", + "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": "5273", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "5274", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5275", + "name": "instanceName", + "nameInRequest": "instanceName", + "doc": "Name of instance.", + "type": { + "$id": "5276", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5277", + "name": "brokerName", + "nameInRequest": "brokerName", + "doc": "Name of broker.", + "type": { + "$id": "5278", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5279", + "name": "authorizationName", + "nameInRequest": "authorizationName", + "doc": "Name of Instance broker authorization resource", + "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": "contentType", + "nameInRequest": "Content-Type", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$id": "5282", + "kind": "constant", + "valueType": { + "$id": "5283", + "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": "5284", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "5285", + "kind": "constant", + "valueType": { + "$id": "5286", + "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": "5287", + "name": "resource", + "nameInRequest": "resource", + "doc": "Resource create parameters.", + "type": { + "$ref": "1101" + }, + "location": "Body", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "5288", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "1101" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + }, + { + "$id": "5289", + "statusCodes": [ + 201 + ], + "bodyType": { + "$ref": "1101" + }, + "headers": [ + { + "$id": "5290", + "name": "azureAsyncOperation", + "nameInResponse": "Azure-AsyncOperation", + "doc": "A link to the status monitor", + "type": { + "$id": "5291", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + { + "$id": "5292", + "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": "5293", + "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": "5294", + "finalStateVia": 0, + "finalResponse": { + "$id": "5295", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "1101" + } + } + }, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.IoTOperations.BrokerAuthorization.createOrUpdate", + "decorators": [], + "examples": [ + { + "$id": "5296", + "kind": "http", + "name": "BrokerAuthorization_CreateOrUpdate_Complex", + "description": "BrokerAuthorization_CreateOrUpdate_Complex", + "filePath": "2025-04-01/BrokerAuthorization_CreateOrUpdate_Complex.json", + "parameters": [ + { + "$id": "5297", + "parameter": { + "$ref": "5266" + }, + "value": { + "$id": "5298", + "kind": "string", + "type": { + "$ref": "5267" + }, + "value": "2025-04-01" + } + }, + { + "$id": "5299", + "parameter": { + "$ref": "5270" + }, + "value": { + "$id": "5300", + "kind": "string", + "type": { + "$ref": "5271" + }, + "value": "F8C729F9-DF9C-4743-848F-96EE433D8E53" + } + }, + { + "$id": "5301", + "parameter": { + "$ref": "5273" + }, + "value": { + "$id": "5302", + "kind": "string", + "type": { + "$ref": "5274" + }, + "value": "rgiotoperations" + } + }, + { + "$id": "5303", + "parameter": { + "$ref": "5275" + }, + "value": { + "$id": "5304", + "kind": "string", + "type": { + "$ref": "5276" + }, + "value": "resource-name123" + } + }, + { + "$id": "5305", + "parameter": { + "$ref": "5277" + }, + "value": { + "$id": "5306", + "kind": "string", + "type": { + "$ref": "5278" + }, + "value": "resource-name123" + } + }, + { + "$id": "5307", + "parameter": { + "$ref": "5279" + }, + "value": { + "$id": "5308", + "kind": "string", + "type": { + "$ref": "5280" + }, + "value": "resource-name123" + } + }, + { + "$id": "5309", + "parameter": { + "$ref": "5287" + }, + "value": { + "$id": "5310", + "kind": "model", + "type": { + "$ref": "1101" + }, + "value": { + "$id": "5311", + "properties": { + "$id": "5312", + "kind": "model", + "type": { + "$ref": "1103" + }, + "value": { + "$id": "5313", + "authorizationPolicies": { + "$id": "5314", + "kind": "model", + "type": { + "$ref": "1105" + }, + "value": { + "$id": "5315", + "cache": { + "$id": "5316", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Enabled" + }, + "rules": { + "$id": "5317", + "kind": "array", + "type": { + "$ref": "1110" + }, + "value": [ + { + "$id": "5318", + "kind": "model", + "type": { + "$ref": "1111" + }, + "value": { + "$id": "5319", + "principals": { + "$id": "5320", + "kind": "model", + "type": { + "$ref": "1131" + }, + "value": { + "$id": "5321", + "usernames": { + "$id": "5322", + "kind": "array", + "type": { + "$ref": "1145" + }, + "value": [ + { + "$id": "5323", + "kind": "string", + "type": { + "$ref": "1146" + }, + "value": "temperature-sensor" + }, + { + "$id": "5324", + "kind": "string", + "type": { + "$ref": "1146" + }, + "value": "humidity-sensor" + } + ] + }, + "attributes": { + "$id": "5325", + "kind": "array", + "type": { + "$ref": "1133" + }, + "value": [ + { + "$id": "5326", + "kind": "dict", + "type": { + "$ref": "1134" + }, + "value": { + "$id": "5327", + "building": { + "$id": "5328", + "kind": "string", + "type": { + "$ref": "1136" + }, + "value": "17" + }, + "organization": { + "$id": "5329", + "kind": "string", + "type": { + "$ref": "1136" + }, + "value": "contoso" + } + } + } + ] + } + } + }, + "brokerResources": { + "$id": "5330", + "kind": "array", + "type": { + "$ref": "1113" + }, + "value": [ + { + "$id": "5331", + "kind": "model", + "type": { + "$ref": "1114" + }, + "value": { + "$id": "5332", + "method": { + "$id": "5333", + "kind": "string", + "type": { + "$ref": "158" + }, + "value": "Connect" + }, + "clientIds": { + "$id": "5334", + "kind": "array", + "type": { + "$ref": "1119" + }, + "value": [ + { + "$id": "5335", + "kind": "string", + "type": { + "$ref": "1120" + }, + "value": "{principal.attributes.building}*" + } + ] + } + } + }, + { + "$id": "5336", + "kind": "model", + "type": { + "$ref": "1114" + }, + "value": { + "$id": "5337", + "method": { + "$id": "5338", + "kind": "string", + "type": { + "$ref": "158" + }, + "value": "Publish" + }, + "topics": { + "$id": "5339", + "kind": "array", + "type": { + "$ref": "1124" + }, + "value": [ + { + "$id": "5340", + "kind": "string", + "type": { + "$ref": "1125" + }, + "value": "sensors/{principal.attributes.building}/{principal.clientId}/telemetry/*" + } + ] + } + } + }, + { + "$id": "5341", + "kind": "model", + "type": { + "$ref": "1114" + }, + "value": { + "$id": "5342", + "method": { + "$id": "5343", + "kind": "string", + "type": { + "$ref": "158" + }, + "value": "Subscribe" + }, + "topics": { + "$id": "5344", + "kind": "array", + "type": { + "$ref": "1124" + }, + "value": [ + { + "$id": "5345", + "kind": "string", + "type": { + "$ref": "1125" + }, + "value": "commands/{principal.attributes.organization}" + } + ] + } + } + } + ] + }, + "stateStoreResources": { + "$id": "5346", + "kind": "array", + "type": { + "$ref": "1152" + }, + "value": [ + { + "$id": "5347", + "kind": "model", + "type": { + "$ref": "1153" + }, + "value": { + "$id": "5348", + "method": { + "$id": "5349", + "kind": "string", + "type": { + "$ref": "174" + }, + "value": "Read" + }, + "keyType": { + "$id": "5350", + "kind": "string", + "type": { + "$ref": "166" + }, + "value": "Pattern" + }, + "keys": { + "$id": "5351", + "kind": "array", + "type": { + "$ref": "1158" + }, + "value": [ + { + "$id": "5352", + "kind": "string", + "type": { + "$ref": "1159" + }, + "value": "myreadkey" + }, + { + "$id": "5353", + "kind": "string", + "type": { + "$ref": "1159" + }, + "value": "myotherkey?" + }, + { + "$id": "5354", + "kind": "string", + "type": { + "$ref": "1159" + }, + "value": "mynumerickeysuffix[0-9]" + }, + { + "$id": "5355", + "kind": "string", + "type": { + "$ref": "1159" + }, + "value": "clients:{principal.clientId}:*" + } + ] + } + } + }, + { + "$id": "5356", + "kind": "model", + "type": { + "$ref": "1153" + }, + "value": { + "$id": "5357", + "method": { + "$id": "5358", + "kind": "string", + "type": { + "$ref": "174" + }, + "value": "ReadWrite" + }, + "keyType": { + "$id": "5359", + "kind": "string", + "type": { + "$ref": "166" + }, + "value": "Binary" + }, + "keys": { + "$id": "5360", + "kind": "array", + "type": { + "$ref": "1158" + }, + "value": [ + { + "$id": "5361", + "kind": "string", + "type": { + "$ref": "1159" + }, + "value": "MTE2IDEwMSAxMTUgMTE2" + } + ] + } + } + } + ] + } + } + } + ] + } + } + } + } + }, + "extendedLocation": { + "$id": "5362", + "kind": "model", + "type": { + "$ref": "510" + }, + "value": { + "$id": "5363", + "name": { + "$id": "5364", + "kind": "string", + "type": { + "$ref": "512" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "5365", + "kind": "string", + "type": { + "$ref": "44" + }, + "value": "CustomLocation" + } + } + } + } + } + } + ], + "responses": [ + { + "$id": "5366", + "response": { + "$ref": "5288" + }, + "statusCode": 200, + "bodyValue": { + "$id": "5367", + "kind": "model", + "type": { + "$ref": "1101" + }, + "value": { + "$id": "5368", + "properties": { + "$id": "5369", + "kind": "model", + "type": { + "$ref": "1103" + }, + "value": { + "$id": "5370", + "authorizationPolicies": { + "$id": "5371", + "kind": "model", + "type": { + "$ref": "1105" + }, + "value": { + "$id": "5372", + "cache": { + "$id": "5373", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Enabled" + }, + "rules": { + "$id": "5374", + "kind": "array", + "type": { + "$ref": "1110" + }, + "value": [ + { + "$id": "5375", + "kind": "model", + "type": { + "$ref": "1111" + }, + "value": { + "$id": "5376", + "principals": { + "$id": "5377", + "kind": "model", + "type": { + "$ref": "1131" + }, + "value": { + "$id": "5378", + "usernames": { + "$id": "5379", + "kind": "array", + "type": { + "$ref": "1145" + }, + "value": [ + { + "$id": "5380", + "kind": "string", + "type": { + "$ref": "1146" + }, + "value": "temperature-sensor" + }, + { + "$id": "5381", + "kind": "string", + "type": { + "$ref": "1146" + }, + "value": "humidity-sensor" + } + ] + }, + "attributes": { + "$id": "5382", + "kind": "array", + "type": { + "$ref": "1133" + }, + "value": [ + { + "$id": "5383", + "kind": "dict", + "type": { + "$ref": "1134" + }, + "value": { + "$id": "5384", + "building": { + "$id": "5385", + "kind": "string", + "type": { + "$ref": "1136" + }, + "value": "17" + }, + "organization": { + "$id": "5386", + "kind": "string", + "type": { + "$ref": "1136" + }, + "value": "contoso" + } + } + } + ] + } + } + }, + "brokerResources": { + "$id": "5387", + "kind": "array", + "type": { + "$ref": "1113" + }, + "value": [ + { + "$id": "5388", + "kind": "model", + "type": { + "$ref": "1114" + }, + "value": { + "$id": "5389", + "method": { + "$id": "5390", + "kind": "string", + "type": { + "$ref": "158" + }, + "value": "Connect" + }, + "clientIds": { + "$id": "5391", + "kind": "array", + "type": { + "$ref": "1119" + }, + "value": [ + { + "$id": "5392", + "kind": "string", + "type": { + "$ref": "1120" + }, + "value": "{principal.attributes.building}*" + } + ] + } + } + }, + { + "$id": "5393", + "kind": "model", + "type": { + "$ref": "1114" + }, + "value": { + "$id": "5394", + "method": { + "$id": "5395", + "kind": "string", + "type": { + "$ref": "158" + }, + "value": "Publish" + }, + "topics": { + "$id": "5396", + "kind": "array", + "type": { + "$ref": "1124" + }, + "value": [ + { + "$id": "5397", + "kind": "string", + "type": { + "$ref": "1125" + }, + "value": "sensors/{principal.attributes.building}/{principal.clientId}/telemetry/*" + } + ] + } + } + }, + { + "$id": "5398", + "kind": "model", + "type": { + "$ref": "1114" + }, + "value": { + "$id": "5399", + "method": { + "$id": "5400", + "kind": "string", + "type": { + "$ref": "158" + }, + "value": "Subscribe" + }, + "topics": { + "$id": "5401", + "kind": "array", + "type": { + "$ref": "1124" + }, + "value": [ + { + "$id": "5402", + "kind": "string", + "type": { + "$ref": "1125" + }, + "value": "commands/{principal.attributes.organization}" + } + ] + } + } + } + ] + }, + "stateStoreResources": { + "$id": "5403", + "kind": "array", + "type": { + "$ref": "1152" + }, + "value": [ + { + "$id": "5404", + "kind": "model", + "type": { + "$ref": "1153" + }, + "value": { + "$id": "5405", + "method": { + "$id": "5406", + "kind": "string", + "type": { + "$ref": "174" + }, + "value": "Read" + }, + "keyType": { + "$id": "5407", + "kind": "string", + "type": { + "$ref": "166" + }, + "value": "Pattern" + }, + "keys": { + "$id": "5408", + "kind": "array", + "type": { + "$ref": "1158" + }, + "value": [ + { + "$id": "5409", + "kind": "string", + "type": { + "$ref": "1159" + }, + "value": "myreadkey" + }, + { + "$id": "5410", + "kind": "string", + "type": { + "$ref": "1159" + }, + "value": "myotherkey?" + }, + { + "$id": "5411", + "kind": "string", + "type": { + "$ref": "1159" + }, + "value": "mynumerickeysuffix[0-9]" + }, + { + "$id": "5412", + "kind": "string", + "type": { + "$ref": "1159" + }, + "value": "clients:{principal.clientId}:*" + } + ] + } + } + }, + { + "$id": "5413", + "kind": "model", + "type": { + "$ref": "1153" + }, + "value": { + "$id": "5414", + "method": { + "$id": "5415", + "kind": "string", + "type": { + "$ref": "174" + }, + "value": "ReadWrite" + }, + "keyType": { + "$id": "5416", + "kind": "string", + "type": { + "$ref": "166" + }, + "value": "Binary" + }, + "keys": { + "$id": "5417", + "kind": "array", + "type": { + "$ref": "1158" + }, + "value": [ + { + "$id": "5418", + "kind": "string", + "type": { + "$ref": "1159" + }, + "value": "MTE2IDEwMSAxMTUgMTE2" + } + ] + } + } + } + ] + } + } + } + ] + } + } + }, + "provisioningState": { + "$id": "5419", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Succeeded" + } + } + }, + "extendedLocation": { + "$id": "5420", + "kind": "model", + "type": { + "$ref": "510" + }, + "value": { + "$id": "5421", + "name": { + "$id": "5422", + "kind": "string", + "type": { + "$ref": "512" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "5423", + "kind": "string", + "type": { + "$ref": "44" + }, + "value": "CustomLocation" + } + } + }, + "id": { + "$id": "5424", + "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": "5425", + "kind": "string", + "type": { + "$ref": "424" + }, + "value": "anqrqsvrjmlvzkrbuav" + }, + "type": { + "$id": "5426", + "kind": "string", + "type": { + "$ref": "428" + }, + "value": "yjlsfarshqoxojvgmy" + }, + "systemData": { + "$id": "5427", + "kind": "model", + "type": { + "$ref": "433" + }, + "value": { + "$id": "5428", + "createdBy": { + "$id": "5429", + "kind": "string", + "type": { + "$ref": "435" + }, + "value": "ssvaslsmudloholronopqyxjcu" + }, + "createdByType": { + "$id": "5430", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "createdAt": { + "$id": "5431", + "kind": "string", + "type": { + "$ref": "442" + }, + "value": "2024-08-09T18:13:29.389Z" + }, + "lastModifiedBy": { + "$id": "5432", + "kind": "string", + "type": { + "$ref": "447" + }, + "value": "gnicpuszwd" + }, + "lastModifiedByType": { + "$id": "5433", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "5434", + "kind": "string", + "type": { + "$ref": "454" + }, + "value": "2024-08-09T18:13:29.389Z" + } + } + } + } + } + }, + { + "$id": "5435", + "response": { + "$ref": "5289" + }, + "statusCode": 201, + "bodyValue": { + "$id": "5436", + "kind": "model", + "type": { + "$ref": "1101" + }, + "value": { + "$id": "5437", + "properties": { + "$id": "5438", + "kind": "model", + "type": { + "$ref": "1103" + }, + "value": { + "$id": "5439", + "authorizationPolicies": { + "$id": "5440", + "kind": "model", + "type": { + "$ref": "1105" + }, + "value": { + "$id": "5441", + "cache": { + "$id": "5442", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Enabled" + }, + "rules": { + "$id": "5443", + "kind": "array", + "type": { + "$ref": "1110" + }, + "value": [ + { + "$id": "5444", + "kind": "model", + "type": { + "$ref": "1111" + }, + "value": { + "$id": "5445", + "principals": { + "$id": "5446", + "kind": "model", + "type": { + "$ref": "1131" + }, + "value": { + "$id": "5447", + "usernames": { + "$id": "5448", + "kind": "array", + "type": { + "$ref": "1145" + }, + "value": [ + { + "$id": "5449", + "kind": "string", + "type": { + "$ref": "1146" + }, + "value": "temperature-sensor" + }, + { + "$id": "5450", + "kind": "string", + "type": { + "$ref": "1146" + }, + "value": "humidity-sensor" + } + ] + }, + "attributes": { + "$id": "5451", + "kind": "array", + "type": { + "$ref": "1133" + }, + "value": [ + { + "$id": "5452", + "kind": "dict", + "type": { + "$ref": "1134" + }, + "value": { + "$id": "5453", + "building": { + "$id": "5454", + "kind": "string", + "type": { + "$ref": "1136" + }, + "value": "17" + }, + "organization": { + "$id": "5455", + "kind": "string", + "type": { + "$ref": "1136" + }, + "value": "contoso" + } + } + } + ] + } + } + }, + "brokerResources": { + "$id": "5456", + "kind": "array", + "type": { + "$ref": "1113" + }, + "value": [ + { + "$id": "5457", + "kind": "model", + "type": { + "$ref": "1114" + }, + "value": { + "$id": "5458", + "method": { + "$id": "5459", + "kind": "string", + "type": { + "$ref": "158" + }, + "value": "Connect" + }, + "clientIds": { + "$id": "5460", + "kind": "array", + "type": { + "$ref": "1119" + }, + "value": [ + { + "$id": "5461", + "kind": "string", + "type": { + "$ref": "1120" + }, + "value": "{principal.attributes.building}*" + } + ] + } + } + }, + { + "$id": "5462", + "kind": "model", + "type": { + "$ref": "1114" + }, + "value": { + "$id": "5463", + "method": { + "$id": "5464", + "kind": "string", + "type": { + "$ref": "158" + }, + "value": "Publish" + }, + "topics": { + "$id": "5465", + "kind": "array", + "type": { + "$ref": "1124" + }, + "value": [ + { + "$id": "5466", + "kind": "string", + "type": { + "$ref": "1125" + }, + "value": "sensors/{principal.attributes.building}/{principal.clientId}/telemetry/*" + } + ] + } + } + }, + { + "$id": "5467", + "kind": "model", + "type": { + "$ref": "1114" + }, + "value": { + "$id": "5468", + "method": { + "$id": "5469", + "kind": "string", + "type": { + "$ref": "158" + }, + "value": "Subscribe" + }, + "topics": { + "$id": "5470", + "kind": "array", + "type": { + "$ref": "1124" + }, + "value": [ + { + "$id": "5471", + "kind": "string", + "type": { + "$ref": "1125" + }, + "value": "commands/{principal.attributes.organization}" + } + ] + } + } + } + ] + }, + "stateStoreResources": { + "$id": "5472", + "kind": "array", + "type": { + "$ref": "1152" + }, + "value": [ + { + "$id": "5473", + "kind": "model", + "type": { + "$ref": "1153" + }, + "value": { + "$id": "5474", + "method": { + "$id": "5475", + "kind": "string", + "type": { + "$ref": "174" + }, + "value": "Read" + }, + "keyType": { + "$id": "5476", + "kind": "string", + "type": { + "$ref": "166" + }, + "value": "Pattern" + }, + "keys": { + "$id": "5477", + "kind": "array", + "type": { + "$ref": "1158" + }, + "value": [ + { + "$id": "5478", + "kind": "string", + "type": { + "$ref": "1159" + }, + "value": "myreadkey" + }, + { + "$id": "5479", + "kind": "string", + "type": { + "$ref": "1159" + }, + "value": "myotherkey?" + }, + { + "$id": "5480", + "kind": "string", + "type": { + "$ref": "1159" + }, + "value": "mynumerickeysuffix[0-9]" + }, + { + "$id": "5481", + "kind": "string", + "type": { + "$ref": "1159" + }, + "value": "clients:{principal.clientId}:*" + } + ] + } + } + }, + { + "$id": "5482", + "kind": "model", + "type": { + "$ref": "1153" + }, + "value": { + "$id": "5483", + "method": { + "$id": "5484", + "kind": "string", + "type": { + "$ref": "174" + }, + "value": "ReadWrite" + }, + "keyType": { + "$id": "5485", + "kind": "string", + "type": { + "$ref": "166" + }, + "value": "Binary" + }, + "keys": { + "$id": "5486", + "kind": "array", + "type": { + "$ref": "1158" + }, + "value": [ + { + "$id": "5487", + "kind": "string", + "type": { + "$ref": "1159" + }, + "value": "MTE2IDEwMSAxMTUgMTE2" + } + ] + } + } + } + ] + } + } + } + ] + } + } + }, + "provisioningState": { + "$id": "5488", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Succeeded" + } + } + }, + "extendedLocation": { + "$id": "5489", + "kind": "model", + "type": { + "$ref": "510" + }, + "value": { + "$id": "5490", + "name": { + "$id": "5491", + "kind": "string", + "type": { + "$ref": "512" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "5492", + "kind": "string", + "type": { + "$ref": "44" + }, + "value": "CustomLocation" + } + } + }, + "id": { + "$id": "5493", + "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": "5494", + "kind": "string", + "type": { + "$ref": "424" + }, + "value": "anqrqsvrjmlvzkrbuav" + }, + "type": { + "$id": "5495", + "kind": "string", + "type": { + "$ref": "428" + }, + "value": "yjlsfarshqoxojvgmy" + }, + "systemData": { + "$id": "5496", + "kind": "model", + "type": { + "$ref": "433" + }, + "value": { + "$id": "5497", + "createdBy": { + "$id": "5498", + "kind": "string", + "type": { + "$ref": "435" + }, + "value": "ssvaslsmudloholronopqyxjcu" + }, + "createdByType": { + "$id": "5499", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "createdAt": { + "$id": "5500", + "kind": "string", + "type": { + "$ref": "442" + }, + "value": "2024-08-09T18:13:29.389Z" + }, + "lastModifiedBy": { + "$id": "5501", + "kind": "string", + "type": { + "$ref": "447" + }, + "value": "gnicpuszwd" + }, + "lastModifiedByType": { + "$id": "5502", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "5503", + "kind": "string", + "type": { + "$ref": "454" + }, + "value": "2024-08-09T18:13:29.389Z" + } + } + } + } + } + } + ] + }, + { + "$id": "5504", + "kind": "http", + "name": "BrokerAuthorization_CreateOrUpdate", + "description": "BrokerAuthorization_CreateOrUpdate", + "filePath": "2025-04-01/BrokerAuthorization_CreateOrUpdate_MaximumSet_Gen.json", + "parameters": [ + { + "$id": "5505", + "parameter": { + "$ref": "5266" + }, + "value": { + "$id": "5506", + "kind": "string", + "type": { + "$ref": "5267" + }, + "value": "2025-04-01" + } + }, + { + "$id": "5507", + "parameter": { + "$ref": "5270" + }, + "value": { + "$id": "5508", + "kind": "string", + "type": { + "$ref": "5271" + }, + "value": "F8C729F9-DF9C-4743-848F-96EE433D8E53" + } + }, + { + "$id": "5509", + "parameter": { + "$ref": "5273" + }, + "value": { + "$id": "5510", + "kind": "string", + "type": { + "$ref": "5274" + }, + "value": "rgiotoperations" + } + }, + { + "$id": "5511", + "parameter": { + "$ref": "5275" + }, + "value": { + "$id": "5512", + "kind": "string", + "type": { + "$ref": "5276" + }, + "value": "resource-name123" + } + }, + { + "$id": "5513", + "parameter": { + "$ref": "5277" + }, + "value": { + "$id": "5514", + "kind": "string", + "type": { + "$ref": "5278" + }, + "value": "resource-name123" + } + }, + { + "$id": "5515", + "parameter": { + "$ref": "5279" + }, + "value": { + "$id": "5516", + "kind": "string", + "type": { + "$ref": "5280" + }, + "value": "resource-name123" + } + }, + { + "$id": "5517", + "parameter": { + "$ref": "5287" + }, + "value": { + "$id": "5518", + "kind": "model", + "type": { + "$ref": "1101" + }, + "value": { + "$id": "5519", + "properties": { + "$id": "5520", + "kind": "model", + "type": { + "$ref": "1103" + }, + "value": { + "$id": "5521", + "authorizationPolicies": { + "$id": "5522", + "kind": "model", + "type": { + "$ref": "1105" + }, + "value": { + "$id": "5523", + "cache": { + "$id": "5524", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Enabled" + }, + "rules": { + "$id": "5525", + "kind": "array", + "type": { + "$ref": "1110" + }, + "value": [ + { + "$id": "5526", + "kind": "model", + "type": { + "$ref": "1111" + }, + "value": { + "$id": "5527", + "brokerResources": { + "$id": "5528", + "kind": "array", + "type": { + "$ref": "1113" + }, + "value": [ + { + "$id": "5529", + "kind": "model", + "type": { + "$ref": "1114" + }, + "value": { + "$id": "5530", + "method": { + "$id": "5531", + "kind": "string", + "type": { + "$ref": "158" + }, + "value": "Connect" + }, + "clientIds": { + "$id": "5532", + "kind": "array", + "type": { + "$ref": "1119" + }, + "value": [ + { + "$id": "5533", + "kind": "string", + "type": { + "$ref": "1120" + }, + "value": "nlc" + } + ] + }, + "topics": { + "$id": "5534", + "kind": "array", + "type": { + "$ref": "1124" + }, + "value": [ + { + "$id": "5535", + "kind": "string", + "type": { + "$ref": "1125" + }, + "value": "wvuca" + } + ] + } + } + } + ] + }, + "principals": { + "$id": "5536", + "kind": "model", + "type": { + "$ref": "1131" + }, + "value": { + "$id": "5537", + "attributes": { + "$id": "5538", + "kind": "array", + "type": { + "$ref": "1133" + }, + "value": [ + { + "$id": "5539", + "kind": "dict", + "type": { + "$ref": "1134" + }, + "value": { + "$id": "5540", + "key5526": { + "$id": "5541", + "kind": "string", + "type": { + "$ref": "1136" + }, + "value": "nydhzdhbldygqcn" + } + } + } + ] + }, + "clientIds": { + "$id": "5542", + "kind": "array", + "type": { + "$ref": "1140" + }, + "value": [ + { + "$id": "5543", + "kind": "string", + "type": { + "$ref": "1141" + }, + "value": "smopeaeddsygz" + } + ] + }, + "usernames": { + "$id": "5544", + "kind": "array", + "type": { + "$ref": "1145" + }, + "value": [ + { + "$id": "5545", + "kind": "string", + "type": { + "$ref": "1146" + }, + "value": "iozngyqndrteikszkbasinzdjtm" + } + ] + } + } + }, + "stateStoreResources": { + "$id": "5546", + "kind": "array", + "type": { + "$ref": "1152" + }, + "value": [ + { + "$id": "5547", + "kind": "model", + "type": { + "$ref": "1153" + }, + "value": { + "$id": "5548", + "keyType": { + "$id": "5549", + "kind": "string", + "type": { + "$ref": "166" + }, + "value": "Pattern" + }, + "keys": { + "$id": "5550", + "kind": "array", + "type": { + "$ref": "1158" + }, + "value": [ + { + "$id": "5551", + "kind": "string", + "type": { + "$ref": "1159" + }, + "value": "tkounsqtwvzyaklxjqoerpu" + } + ] + }, + "method": { + "$id": "5552", + "kind": "string", + "type": { + "$ref": "174" + }, + "value": "Read" + } + } + } + ] + } + } + } + ] + } + } + } + } + }, + "extendedLocation": { + "$id": "5553", + "kind": "model", + "type": { + "$ref": "510" + }, + "value": { + "$id": "5554", + "name": { + "$id": "5555", + "kind": "string", + "type": { + "$ref": "512" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "5556", + "kind": "string", + "type": { + "$ref": "44" + }, + "value": "CustomLocation" + } + } + } + } + } + } + ], + "responses": [ + { + "$id": "5557", + "response": { + "$ref": "5288" + }, + "statusCode": 200, + "bodyValue": { + "$id": "5558", + "kind": "model", + "type": { + "$ref": "1101" + }, + "value": { + "$id": "5559", + "properties": { + "$id": "5560", + "kind": "model", + "type": { + "$ref": "1103" + }, + "value": { + "$id": "5561", + "authorizationPolicies": { + "$id": "5562", + "kind": "model", + "type": { + "$ref": "1105" + }, + "value": { + "$id": "5563", + "cache": { + "$id": "5564", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Enabled" + }, + "rules": { + "$id": "5565", + "kind": "array", + "type": { + "$ref": "1110" + }, + "value": [ + { + "$id": "5566", + "kind": "model", + "type": { + "$ref": "1111" + }, + "value": { + "$id": "5567", + "brokerResources": { + "$id": "5568", + "kind": "array", + "type": { + "$ref": "1113" + }, + "value": [ + { + "$id": "5569", + "kind": "model", + "type": { + "$ref": "1114" + }, + "value": { + "$id": "5570", + "method": { + "$id": "5571", + "kind": "string", + "type": { + "$ref": "158" + }, + "value": "Connect" + }, + "clientIds": { + "$id": "5572", + "kind": "array", + "type": { + "$ref": "1119" + }, + "value": [ + { + "$id": "5573", + "kind": "string", + "type": { + "$ref": "1120" + }, + "value": "nlc" + } + ] + }, + "topics": { + "$id": "5574", + "kind": "array", + "type": { + "$ref": "1124" + }, + "value": [ + { + "$id": "5575", + "kind": "string", + "type": { + "$ref": "1125" + }, + "value": "wvuca" + } + ] + } + } + } + ] + }, + "principals": { + "$id": "5576", + "kind": "model", + "type": { + "$ref": "1131" + }, + "value": { + "$id": "5577", + "attributes": { + "$id": "5578", + "kind": "array", + "type": { + "$ref": "1133" + }, + "value": [ + { + "$id": "5579", + "kind": "dict", + "type": { + "$ref": "1134" + }, + "value": { + "$id": "5580", + "key5526": { + "$id": "5581", + "kind": "string", + "type": { + "$ref": "1136" + }, + "value": "nydhzdhbldygqcn" + } + } + } + ] + }, + "clientIds": { + "$id": "5582", + "kind": "array", + "type": { + "$ref": "1140" + }, + "value": [ + { + "$id": "5583", + "kind": "string", + "type": { + "$ref": "1141" + }, + "value": "smopeaeddsygz" + } + ] + }, + "usernames": { + "$id": "5584", + "kind": "array", + "type": { + "$ref": "1145" + }, + "value": [ + { + "$id": "5585", + "kind": "string", + "type": { + "$ref": "1146" + }, + "value": "iozngyqndrteikszkbasinzdjtm" + } + ] + } + } + }, + "stateStoreResources": { + "$id": "5586", + "kind": "array", + "type": { + "$ref": "1152" + }, + "value": [ + { + "$id": "5587", + "kind": "model", + "type": { + "$ref": "1153" + }, + "value": { + "$id": "5588", + "keyType": { + "$id": "5589", + "kind": "string", + "type": { + "$ref": "166" + }, + "value": "Pattern" + }, + "keys": { + "$id": "5590", + "kind": "array", + "type": { + "$ref": "1158" + }, + "value": [ + { + "$id": "5591", + "kind": "string", + "type": { + "$ref": "1159" + }, + "value": "tkounsqtwvzyaklxjqoerpu" + } + ] + }, + "method": { + "$id": "5592", + "kind": "string", + "type": { + "$ref": "174" + }, + "value": "Read" + } + } + } + ] + } + } + } + ] + } + } + }, + "provisioningState": { + "$id": "5593", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Succeeded" + } + } + }, + "extendedLocation": { + "$id": "5594", + "kind": "model", + "type": { + "$ref": "510" + }, + "value": { + "$id": "5595", + "name": { + "$id": "5596", + "kind": "string", + "type": { + "$ref": "512" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "5597", + "kind": "string", + "type": { + "$ref": "44" + }, + "value": "CustomLocation" + } + } + }, + "id": { + "$id": "5598", + "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": "5599", + "kind": "string", + "type": { + "$ref": "424" + }, + "value": "anqrqsvrjmlvzkrbuav" + }, + "type": { + "$id": "5600", + "kind": "string", + "type": { + "$ref": "428" + }, + "value": "yjlsfarshqoxojvgmy" + }, + "systemData": { + "$id": "5601", + "kind": "model", + "type": { + "$ref": "433" + }, + "value": { + "$id": "5602", + "createdBy": { + "$id": "5603", + "kind": "string", + "type": { + "$ref": "435" + }, + "value": "ssvaslsmudloholronopqyxjcu" + }, + "createdByType": { + "$id": "5604", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "createdAt": { + "$id": "5605", + "kind": "string", + "type": { + "$ref": "442" + }, + "value": "2024-08-09T18:13:29.389Z" + }, + "lastModifiedBy": { + "$id": "5606", + "kind": "string", + "type": { + "$ref": "447" + }, + "value": "gnicpuszwd" + }, + "lastModifiedByType": { + "$id": "5607", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "5608", + "kind": "string", + "type": { + "$ref": "454" + }, + "value": "2024-08-09T18:13:29.389Z" + } + } + } + } + } + }, + { + "$id": "5609", + "response": { + "$ref": "5289" + }, + "statusCode": 201, + "bodyValue": { + "$id": "5610", + "kind": "model", + "type": { + "$ref": "1101" + }, + "value": { + "$id": "5611", + "properties": { + "$id": "5612", + "kind": "model", + "type": { + "$ref": "1103" + }, + "value": { + "$id": "5613", + "authorizationPolicies": { + "$id": "5614", + "kind": "model", + "type": { + "$ref": "1105" + }, + "value": { + "$id": "5615", + "cache": { + "$id": "5616", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Enabled" + }, + "rules": { + "$id": "5617", + "kind": "array", + "type": { + "$ref": "1110" + }, + "value": [ + { + "$id": "5618", + "kind": "model", + "type": { + "$ref": "1111" + }, + "value": { + "$id": "5619", + "brokerResources": { + "$id": "5620", + "kind": "array", + "type": { + "$ref": "1113" + }, + "value": [ + { + "$id": "5621", + "kind": "model", + "type": { + "$ref": "1114" + }, + "value": { + "$id": "5622", + "method": { + "$id": "5623", + "kind": "string", + "type": { + "$ref": "158" + }, + "value": "Connect" + }, + "clientIds": { + "$id": "5624", + "kind": "array", + "type": { + "$ref": "1119" + }, + "value": [ + { + "$id": "5625", + "kind": "string", + "type": { + "$ref": "1120" + }, + "value": "nlc" + } + ] + }, + "topics": { + "$id": "5626", + "kind": "array", + "type": { + "$ref": "1124" + }, + "value": [ + { + "$id": "5627", + "kind": "string", + "type": { + "$ref": "1125" + }, + "value": "wvuca" + } + ] + } + } + } + ] + }, + "principals": { + "$id": "5628", + "kind": "model", + "type": { + "$ref": "1131" + }, + "value": { + "$id": "5629", + "attributes": { + "$id": "5630", + "kind": "array", + "type": { + "$ref": "1133" + }, + "value": [ + { + "$id": "5631", + "kind": "dict", + "type": { + "$ref": "1134" + }, + "value": { + "$id": "5632", + "key5526": { + "$id": "5633", + "kind": "string", + "type": { + "$ref": "1136" + }, + "value": "nydhzdhbldygqcn" + } + } + } + ] + }, + "clientIds": { + "$id": "5634", + "kind": "array", + "type": { + "$ref": "1140" + }, + "value": [ + { + "$id": "5635", + "kind": "string", + "type": { + "$ref": "1141" + }, + "value": "smopeaeddsygz" + } + ] + }, + "usernames": { + "$id": "5636", + "kind": "array", + "type": { + "$ref": "1145" + }, + "value": [ + { + "$id": "5637", + "kind": "string", + "type": { + "$ref": "1146" + }, + "value": "iozngyqndrteikszkbasinzdjtm" + } + ] + } + } + }, + "stateStoreResources": { + "$id": "5638", + "kind": "array", + "type": { + "$ref": "1152" + }, + "value": [ + { + "$id": "5639", + "kind": "model", + "type": { + "$ref": "1153" + }, + "value": { + "$id": "5640", + "keyType": { + "$id": "5641", + "kind": "string", + "type": { + "$ref": "166" + }, + "value": "Pattern" + }, + "keys": { + "$id": "5642", + "kind": "array", + "type": { + "$ref": "1158" + }, + "value": [ + { + "$id": "5643", + "kind": "string", + "type": { + "$ref": "1159" + }, + "value": "tkounsqtwvzyaklxjqoerpu" + } + ] + }, + "method": { + "$id": "5644", + "kind": "string", + "type": { + "$ref": "174" + }, + "value": "Read" + } + } + } + ] + } + } + } + ] + } + } + }, + "provisioningState": { + "$id": "5645", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Succeeded" + } + } + }, + "extendedLocation": { + "$id": "5646", + "kind": "model", + "type": { + "$ref": "510" + }, + "value": { + "$id": "5647", + "name": { + "$id": "5648", + "kind": "string", + "type": { + "$ref": "512" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "5649", + "kind": "string", + "type": { + "$ref": "44" + }, + "value": "CustomLocation" + } + } + }, + "id": { + "$id": "5650", + "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": "5651", + "kind": "string", + "type": { + "$ref": "424" + }, + "value": "anqrqsvrjmlvzkrbuav" + }, + "type": { + "$id": "5652", + "kind": "string", + "type": { + "$ref": "428" + }, + "value": "yjlsfarshqoxojvgmy" + }, + "systemData": { + "$id": "5653", + "kind": "model", + "type": { + "$ref": "433" + }, + "value": { + "$id": "5654", + "createdBy": { + "$id": "5655", + "kind": "string", + "type": { + "$ref": "435" + }, + "value": "ssvaslsmudloholronopqyxjcu" + }, + "createdByType": { + "$id": "5656", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "createdAt": { + "$id": "5657", + "kind": "string", + "type": { + "$ref": "442" + }, + "value": "2024-08-09T18:13:29.389Z" + }, + "lastModifiedBy": { + "$id": "5658", + "kind": "string", + "type": { + "$ref": "447" + }, + "value": "gnicpuszwd" + }, + "lastModifiedByType": { + "$id": "5659", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "5660", + "kind": "string", + "type": { + "$ref": "454" + }, + "value": "2024-08-09T18:13:29.389Z" + } + } + } + } + } + } + ] + }, + { + "$id": "5661", + "kind": "http", + "name": "BrokerAuthorization_CreateOrUpdate_Simple", + "description": "BrokerAuthorization_CreateOrUpdate_Simple", + "filePath": "2025-04-01/BrokerAuthorization_CreateOrUpdate_Simple.json", + "parameters": [ + { + "$id": "5662", + "parameter": { + "$ref": "5266" + }, + "value": { + "$id": "5663", + "kind": "string", + "type": { + "$ref": "5267" + }, + "value": "2025-04-01" + } + }, + { + "$id": "5664", + "parameter": { + "$ref": "5270" + }, + "value": { + "$id": "5665", + "kind": "string", + "type": { + "$ref": "5271" + }, + "value": "F8C729F9-DF9C-4743-848F-96EE433D8E53" + } + }, + { + "$id": "5666", + "parameter": { + "$ref": "5273" + }, + "value": { + "$id": "5667", + "kind": "string", + "type": { + "$ref": "5274" + }, + "value": "rgiotoperations" + } + }, + { + "$id": "5668", + "parameter": { + "$ref": "5275" + }, + "value": { + "$id": "5669", + "kind": "string", + "type": { + "$ref": "5276" + }, + "value": "resource-name123" + } + }, + { + "$id": "5670", + "parameter": { + "$ref": "5277" + }, + "value": { + "$id": "5671", + "kind": "string", + "type": { + "$ref": "5278" + }, + "value": "resource-name123" + } + }, + { + "$id": "5672", + "parameter": { + "$ref": "5279" + }, + "value": { + "$id": "5673", + "kind": "string", + "type": { + "$ref": "5280" + }, + "value": "resource-name123" + } + }, + { + "$id": "5674", + "parameter": { + "$ref": "5287" + }, + "value": { + "$id": "5675", + "kind": "model", + "type": { + "$ref": "1101" + }, + "value": { + "$id": "5676", + "properties": { + "$id": "5677", + "kind": "model", + "type": { + "$ref": "1103" + }, + "value": { + "$id": "5678", + "authorizationPolicies": { + "$id": "5679", + "kind": "model", + "type": { + "$ref": "1105" + }, + "value": { + "$id": "5680", + "cache": { + "$id": "5681", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Enabled" + }, + "rules": { + "$id": "5682", + "kind": "array", + "type": { + "$ref": "1110" + }, + "value": [ + { + "$id": "5683", + "kind": "model", + "type": { + "$ref": "1111" + }, + "value": { + "$id": "5684", + "principals": { + "$id": "5685", + "kind": "model", + "type": { + "$ref": "1131" + }, + "value": { + "$id": "5686", + "clientIds": { + "$id": "5687", + "kind": "array", + "type": { + "$ref": "1140" + }, + "value": [ + { + "$id": "5688", + "kind": "string", + "type": { + "$ref": "1141" + }, + "value": "my-client-id" + } + ] + }, + "attributes": { + "$id": "5689", + "kind": "array", + "type": { + "$ref": "1133" + }, + "value": [ + { + "$id": "5690", + "kind": "dict", + "type": { + "$ref": "1134" + }, + "value": { + "$id": "5691", + "floor": { + "$id": "5692", + "kind": "string", + "type": { + "$ref": "1136" + }, + "value": "floor1" + }, + "site": { + "$id": "5693", + "kind": "string", + "type": { + "$ref": "1136" + }, + "value": "site1" + } + } + } + ] + } + } + }, + "brokerResources": { + "$id": "5694", + "kind": "array", + "type": { + "$ref": "1113" + }, + "value": [ + { + "$id": "5695", + "kind": "model", + "type": { + "$ref": "1114" + }, + "value": { + "$id": "5696", + "method": { + "$id": "5697", + "kind": "string", + "type": { + "$ref": "158" + }, + "value": "Connect" + } + } + }, + { + "$id": "5698", + "kind": "model", + "type": { + "$ref": "1114" + }, + "value": { + "$id": "5699", + "method": { + "$id": "5700", + "kind": "string", + "type": { + "$ref": "158" + }, + "value": "Subscribe" + }, + "topics": { + "$id": "5701", + "kind": "array", + "type": { + "$ref": "1124" + }, + "value": [ + { + "$id": "5702", + "kind": "string", + "type": { + "$ref": "1125" + }, + "value": "topic" + }, + { + "$id": "5703", + "kind": "string", + "type": { + "$ref": "1125" + }, + "value": "topic/with/wildcard/#" + } + ] + } + } + } + ] + }, + "stateStoreResources": { + "$id": "5704", + "kind": "array", + "type": { + "$ref": "1152" + }, + "value": [ + { + "$id": "5705", + "kind": "model", + "type": { + "$ref": "1153" + }, + "value": { + "$id": "5706", + "method": { + "$id": "5707", + "kind": "string", + "type": { + "$ref": "174" + }, + "value": "ReadWrite" + }, + "keyType": { + "$id": "5708", + "kind": "string", + "type": { + "$ref": "166" + }, + "value": "Pattern" + }, + "keys": { + "$id": "5709", + "kind": "array", + "type": { + "$ref": "1158" + }, + "value": [ + { + "$id": "5710", + "kind": "string", + "type": { + "$ref": "1159" + }, + "value": "*" + } + ] + } + } + } + ] + } + } + } + ] + } + } + } + } + }, + "extendedLocation": { + "$id": "5711", + "kind": "model", + "type": { + "$ref": "510" + }, + "value": { + "$id": "5712", + "name": { + "$id": "5713", + "kind": "string", + "type": { + "$ref": "512" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "5714", + "kind": "string", + "type": { + "$ref": "44" + }, + "value": "CustomLocation" + } + } + } + } + } + } + ], + "responses": [ + { + "$id": "5715", + "response": { + "$ref": "5288" + }, + "statusCode": 200, + "bodyValue": { + "$id": "5716", + "kind": "model", + "type": { + "$ref": "1101" + }, + "value": { + "$id": "5717", + "properties": { + "$id": "5718", + "kind": "model", + "type": { + "$ref": "1103" + }, + "value": { + "$id": "5719", + "authorizationPolicies": { + "$id": "5720", + "kind": "model", + "type": { + "$ref": "1105" + }, + "value": { + "$id": "5721", + "cache": { + "$id": "5722", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Enabled" + }, + "rules": { + "$id": "5723", + "kind": "array", + "type": { + "$ref": "1110" + }, + "value": [ + { + "$id": "5724", + "kind": "model", + "type": { + "$ref": "1111" + }, + "value": { + "$id": "5725", + "principals": { + "$id": "5726", + "kind": "model", + "type": { + "$ref": "1131" + }, + "value": { + "$id": "5727", + "clientIds": { + "$id": "5728", + "kind": "array", + "type": { + "$ref": "1140" + }, + "value": [ + { + "$id": "5729", + "kind": "string", + "type": { + "$ref": "1141" + }, + "value": "my-client-id" + } + ] + }, + "attributes": { + "$id": "5730", + "kind": "array", + "type": { + "$ref": "1133" + }, + "value": [ + { + "$id": "5731", + "kind": "dict", + "type": { + "$ref": "1134" + }, + "value": { + "$id": "5732", + "floor": { + "$id": "5733", + "kind": "string", + "type": { + "$ref": "1136" + }, + "value": "floor1" + }, + "site": { + "$id": "5734", + "kind": "string", + "type": { + "$ref": "1136" + }, + "value": "site1" + } + } + } + ] + } + } + }, + "brokerResources": { + "$id": "5735", + "kind": "array", + "type": { + "$ref": "1113" + }, + "value": [ + { + "$id": "5736", + "kind": "model", + "type": { + "$ref": "1114" + }, + "value": { + "$id": "5737", + "method": { + "$id": "5738", + "kind": "string", + "type": { + "$ref": "158" + }, + "value": "Connect" + } + } + }, + { + "$id": "5739", + "kind": "model", + "type": { + "$ref": "1114" + }, + "value": { + "$id": "5740", + "method": { + "$id": "5741", + "kind": "string", + "type": { + "$ref": "158" + }, + "value": "Subscribe" + }, + "topics": { + "$id": "5742", + "kind": "array", + "type": { + "$ref": "1124" + }, + "value": [ + { + "$id": "5743", + "kind": "string", + "type": { + "$ref": "1125" + }, + "value": "topic" + }, + { + "$id": "5744", + "kind": "string", + "type": { + "$ref": "1125" + }, + "value": "topic/with/wildcard/#" + } + ] + } + } + } + ] + }, + "stateStoreResources": { + "$id": "5745", + "kind": "array", + "type": { + "$ref": "1152" + }, + "value": [ + { + "$id": "5746", + "kind": "model", + "type": { + "$ref": "1153" + }, + "value": { + "$id": "5747", + "method": { + "$id": "5748", + "kind": "string", + "type": { + "$ref": "174" + }, + "value": "ReadWrite" + }, + "keyType": { + "$id": "5749", + "kind": "string", + "type": { + "$ref": "166" + }, + "value": "Pattern" + }, + "keys": { + "$id": "5750", + "kind": "array", + "type": { + "$ref": "1158" + }, + "value": [ + { + "$id": "5751", + "kind": "string", + "type": { + "$ref": "1159" + }, + "value": "*" + } + ] + } + } + } + ] + } + } + } + ] + } + } + }, + "provisioningState": { + "$id": "5752", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Succeeded" + } + } + }, + "extendedLocation": { + "$id": "5753", + "kind": "model", + "type": { + "$ref": "510" + }, + "value": { + "$id": "5754", + "name": { + "$id": "5755", + "kind": "string", + "type": { + "$ref": "512" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "5756", + "kind": "string", + "type": { + "$ref": "44" + }, + "value": "CustomLocation" + } + } + }, + "id": { + "$id": "5757", + "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": "5758", + "kind": "string", + "type": { + "$ref": "424" + }, + "value": "anqrqsvrjmlvzkrbuav" + }, + "type": { + "$id": "5759", + "kind": "string", + "type": { + "$ref": "428" + }, + "value": "yjlsfarshqoxojvgmy" + }, + "systemData": { + "$id": "5760", + "kind": "model", + "type": { + "$ref": "433" + }, + "value": { + "$id": "5761", + "createdBy": { + "$id": "5762", + "kind": "string", + "type": { + "$ref": "435" + }, + "value": "ssvaslsmudloholronopqyxjcu" + }, + "createdByType": { + "$id": "5763", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "createdAt": { + "$id": "5764", + "kind": "string", + "type": { + "$ref": "442" + }, + "value": "2024-08-09T18:13:29.389Z" + }, + "lastModifiedBy": { + "$id": "5765", + "kind": "string", + "type": { + "$ref": "447" + }, + "value": "gnicpuszwd" + }, + "lastModifiedByType": { + "$id": "5766", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "5767", + "kind": "string", + "type": { + "$ref": "454" + }, + "value": "2024-08-09T18:13:29.389Z" + } + } + } + } + } + }, + { + "$id": "5768", + "response": { + "$ref": "5289" + }, + "statusCode": 201, + "bodyValue": { + "$id": "5769", + "kind": "model", + "type": { + "$ref": "1101" + }, + "value": { + "$id": "5770", + "properties": { + "$id": "5771", + "kind": "model", + "type": { + "$ref": "1103" + }, + "value": { + "$id": "5772", + "authorizationPolicies": { + "$id": "5773", + "kind": "model", + "type": { + "$ref": "1105" + }, + "value": { + "$id": "5774", + "cache": { + "$id": "5775", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Enabled" + }, + "rules": { + "$id": "5776", + "kind": "array", + "type": { + "$ref": "1110" + }, + "value": [ + { + "$id": "5777", + "kind": "model", + "type": { + "$ref": "1111" + }, + "value": { + "$id": "5778", + "principals": { + "$id": "5779", + "kind": "model", + "type": { + "$ref": "1131" + }, + "value": { + "$id": "5780", + "clientIds": { + "$id": "5781", + "kind": "array", + "type": { + "$ref": "1140" + }, + "value": [ + { + "$id": "5782", + "kind": "string", + "type": { + "$ref": "1141" + }, + "value": "my-client-id" + } + ] + }, + "attributes": { + "$id": "5783", + "kind": "array", + "type": { + "$ref": "1133" + }, + "value": [ + { + "$id": "5784", + "kind": "dict", + "type": { + "$ref": "1134" + }, + "value": { + "$id": "5785", + "floor": { + "$id": "5786", + "kind": "string", + "type": { + "$ref": "1136" + }, + "value": "floor1" + }, + "site": { + "$id": "5787", + "kind": "string", + "type": { + "$ref": "1136" + }, + "value": "site1" + } + } + } + ] + } + } + }, + "brokerResources": { + "$id": "5788", + "kind": "array", + "type": { + "$ref": "1113" + }, + "value": [ + { + "$id": "5789", + "kind": "model", + "type": { + "$ref": "1114" + }, + "value": { + "$id": "5790", + "method": { + "$id": "5791", + "kind": "string", + "type": { + "$ref": "158" + }, + "value": "Connect" + } + } + }, + { + "$id": "5792", + "kind": "model", + "type": { + "$ref": "1114" + }, + "value": { + "$id": "5793", + "method": { + "$id": "5794", + "kind": "string", + "type": { + "$ref": "158" + }, + "value": "Subscribe" + }, + "topics": { + "$id": "5795", + "kind": "array", + "type": { + "$ref": "1124" + }, + "value": [ + { + "$id": "5796", + "kind": "string", + "type": { + "$ref": "1125" + }, + "value": "topic" + }, + { + "$id": "5797", + "kind": "string", + "type": { + "$ref": "1125" + }, + "value": "topic/with/wildcard/#" + } + ] + } + } + } + ] + }, + "stateStoreResources": { + "$id": "5798", + "kind": "array", + "type": { + "$ref": "1152" + }, + "value": [ + { + "$id": "5799", + "kind": "model", + "type": { + "$ref": "1153" + }, + "value": { + "$id": "5800", + "method": { + "$id": "5801", + "kind": "string", + "type": { + "$ref": "174" + }, + "value": "ReadWrite" + }, + "keyType": { + "$id": "5802", + "kind": "string", + "type": { + "$ref": "166" + }, + "value": "Pattern" + }, + "keys": { + "$id": "5803", + "kind": "array", + "type": { + "$ref": "1158" + }, + "value": [ + { + "$id": "5804", + "kind": "string", + "type": { + "$ref": "1159" + }, + "value": "*" + } + ] + } + } + } + ] + } + } + } + ] + } + } + }, + "provisioningState": { + "$id": "5805", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Succeeded" + } + } + }, + "extendedLocation": { + "$id": "5806", + "kind": "model", + "type": { + "$ref": "510" + }, + "value": { + "$id": "5807", + "name": { + "$id": "5808", + "kind": "string", + "type": { + "$ref": "512" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "5809", + "kind": "string", + "type": { + "$ref": "44" + }, + "value": "CustomLocation" + } + } + }, + "id": { + "$id": "5810", + "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": "5811", + "kind": "string", + "type": { + "$ref": "424" + }, + "value": "anqrqsvrjmlvzkrbuav" + }, + "type": { + "$id": "5812", + "kind": "string", + "type": { + "$ref": "428" + }, + "value": "yjlsfarshqoxojvgmy" + }, + "systemData": { + "$id": "5813", + "kind": "model", + "type": { + "$ref": "433" + }, + "value": { + "$id": "5814", + "createdBy": { + "$id": "5815", + "kind": "string", + "type": { + "$ref": "435" + }, + "value": "ssvaslsmudloholronopqyxjcu" + }, + "createdByType": { + "$id": "5816", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "createdAt": { + "$id": "5817", + "kind": "string", + "type": { + "$ref": "442" + }, + "value": "2024-08-09T18:13:29.389Z" + }, + "lastModifiedBy": { + "$id": "5818", + "kind": "string", + "type": { + "$ref": "447" + }, + "value": "gnicpuszwd" + }, + "lastModifiedByType": { + "$id": "5819", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "5820", + "kind": "string", + "type": { + "$ref": "454" + }, + "value": "2024-08-09T18:13:29.389Z" + } + } + } + } + } + } + ] + } + ] + }, + { + "$id": "5821", + "name": "delete", + "resourceName": "BrokerAuthorizationResource", + "doc": "Delete a BrokerAuthorizationResource", + "accessibility": "public", + "parameters": [ + { + "$id": "5822", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "5823", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "5824", + "type": { + "$id": "5825", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-04-01" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5826", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "5827", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "5828", + "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": "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": "instanceName", + "nameInRequest": "instanceName", + "doc": "Name of instance.", + "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": "brokerName", + "nameInRequest": "brokerName", + "doc": "Name of broker.", + "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": "authorizationName", + "nameInRequest": "authorizationName", + "doc": "Name of Instance broker authorization resource", + "type": { + "$id": "5836", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5837", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "5838", + "kind": "constant", + "valueType": { + "$id": "5839", + "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": "5840", + "statusCodes": [ + 202 + ], + "headers": [ + { + "$id": "5841", + "name": "location", + "nameInResponse": "Location", + "doc": "The Location header contains the URL where the status of the long running operation can be checked.", + "type": { + "$id": "5842", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + { + "$id": "5843", + "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": "5844", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + } + } + ], + "isErrorResponse": false + }, + { + "$id": "5845", + "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": "5846", + "finalStateVia": 1, + "finalResponse": { + "$id": "5847", + "statusCodes": [ + 204 + ] + } + }, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.IoTOperations.BrokerAuthorization.delete", + "decorators": [], + "examples": [ + { + "$id": "5848", + "kind": "http", + "name": "BrokerAuthorization_Delete", + "description": "BrokerAuthorization_Delete", + "filePath": "2025-04-01/BrokerAuthorization_Delete_MaximumSet_Gen.json", + "parameters": [ + { + "$id": "5849", + "parameter": { + "$ref": "5822" + }, + "value": { + "$id": "5850", + "kind": "string", + "type": { + "$ref": "5823" + }, + "value": "2025-04-01" + } + }, + { + "$id": "5851", + "parameter": { + "$ref": "5826" + }, + "value": { + "$id": "5852", + "kind": "string", + "type": { + "$ref": "5827" + }, + "value": "F8C729F9-DF9C-4743-848F-96EE433D8E53" + } + }, + { + "$id": "5853", + "parameter": { + "$ref": "5829" + }, + "value": { + "$id": "5854", + "kind": "string", + "type": { + "$ref": "5830" + }, + "value": "rgiotoperations" + } + }, + { + "$id": "5855", + "parameter": { + "$ref": "5831" + }, + "value": { + "$id": "5856", + "kind": "string", + "type": { + "$ref": "5832" + }, + "value": "resource-name123" + } + }, + { + "$id": "5857", + "parameter": { + "$ref": "5833" + }, + "value": { + "$id": "5858", + "kind": "string", + "type": { + "$ref": "5834" + }, + "value": "resource-name123" + } + }, + { + "$id": "5859", + "parameter": { + "$ref": "5835" + }, + "value": { + "$id": "5860", + "kind": "string", + "type": { + "$ref": "5836" + }, + "value": "resource-name123" + } + } + ], + "responses": [ + { + "$id": "5861", + "response": { + "$ref": "5840" + }, + "statusCode": 202 + }, + { + "$id": "5862", + "response": { + "$ref": "5845" + }, + "statusCode": 204 + } + ] + } + ] + }, + { + "$id": "5863", + "name": "listByResourceGroup", + "resourceName": "BrokerAuthorizationResource", + "doc": "List BrokerAuthorizationResource resources by BrokerResource", + "accessibility": "public", + "parameters": [ + { + "$id": "5864", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "5865", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "5866", + "type": { + "$id": "5867", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-04-01" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5868", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "5869", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "5870", + "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": "5871", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "5872", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5873", + "name": "instanceName", + "nameInRequest": "instanceName", + "doc": "Name of instance.", + "type": { + "$id": "5874", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5875", + "name": "brokerName", + "nameInRequest": "brokerName", + "doc": "Name of broker.", + "type": { + "$id": "5876", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5877", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "5878", + "kind": "constant", + "valueType": { + "$id": "5879", + "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": "5880", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "1179" + }, + "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": "5881", + "itemPropertySegments": [ + "value" + ], + "nextLink": { + "$id": "5882", + "responseSegments": [ + "nextLink" + ], + "responseLocation": "Body" + } + }, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.IoTOperations.BrokerAuthorization.listByResourceGroup", + "decorators": [], + "examples": [ + { + "$id": "5883", + "kind": "http", + "name": "BrokerAuthorization_ListByResourceGroup", + "description": "BrokerAuthorization_ListByResourceGroup", + "filePath": "2025-04-01/BrokerAuthorization_ListByResourceGroup_MaximumSet_Gen.json", + "parameters": [ + { + "$id": "5884", + "parameter": { + "$ref": "5864" + }, + "value": { + "$id": "5885", + "kind": "string", + "type": { + "$ref": "5865" + }, + "value": "2025-04-01" + } + }, + { + "$id": "5886", + "parameter": { + "$ref": "5868" + }, + "value": { + "$id": "5887", + "kind": "string", + "type": { + "$ref": "5869" + }, + "value": "F8C729F9-DF9C-4743-848F-96EE433D8E53" + } + }, + { + "$id": "5888", + "parameter": { + "$ref": "5871" + }, + "value": { + "$id": "5889", + "kind": "string", + "type": { + "$ref": "5872" + }, + "value": "rgiotoperations" + } + }, + { + "$id": "5890", + "parameter": { + "$ref": "5873" + }, + "value": { + "$id": "5891", + "kind": "string", + "type": { + "$ref": "5874" + }, + "value": "resource-name123" + } + }, + { + "$id": "5892", + "parameter": { + "$ref": "5875" + }, + "value": { + "$id": "5893", + "kind": "string", + "type": { + "$ref": "5876" + }, + "value": "resource-name123" + } + } + ], + "responses": [ + { + "$id": "5894", + "response": { + "$ref": "5880" + }, + "statusCode": 200, + "bodyValue": { + "$id": "5895", + "kind": "model", + "type": { + "$ref": "1179" + }, + "value": { + "$id": "5896", + "value": { + "$id": "5897", + "kind": "array", + "type": { + "$ref": "1181" + }, + "value": [ + { + "$id": "5898", + "kind": "model", + "type": { + "$ref": "1101" + }, + "value": { + "$id": "5899", + "properties": { + "$id": "5900", + "kind": "model", + "type": { + "$ref": "1103" + }, + "value": { + "$id": "5901", + "authorizationPolicies": { + "$id": "5902", + "kind": "model", + "type": { + "$ref": "1105" + }, + "value": { + "$id": "5903", + "cache": { + "$id": "5904", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Enabled" + }, + "rules": { + "$id": "5905", + "kind": "array", + "type": { + "$ref": "1110" + }, + "value": [ + { + "$id": "5906", + "kind": "model", + "type": { + "$ref": "1111" + }, + "value": { + "$id": "5907", + "brokerResources": { + "$id": "5908", + "kind": "array", + "type": { + "$ref": "1113" + }, + "value": [ + { + "$id": "5909", + "kind": "model", + "type": { + "$ref": "1114" + }, + "value": { + "$id": "5910", + "method": { + "$id": "5911", + "kind": "string", + "type": { + "$ref": "158" + }, + "value": "Connect" + }, + "clientIds": { + "$id": "5912", + "kind": "array", + "type": { + "$ref": "1119" + }, + "value": [ + { + "$id": "5913", + "kind": "string", + "type": { + "$ref": "1120" + }, + "value": "nlc" + } + ] + }, + "topics": { + "$id": "5914", + "kind": "array", + "type": { + "$ref": "1124" + }, + "value": [ + { + "$id": "5915", + "kind": "string", + "type": { + "$ref": "1125" + }, + "value": "wvuca" + } + ] + } + } + } + ] + }, + "principals": { + "$id": "5916", + "kind": "model", + "type": { + "$ref": "1131" + }, + "value": { + "$id": "5917", + "attributes": { + "$id": "5918", + "kind": "array", + "type": { + "$ref": "1133" + }, + "value": [ + { + "$id": "5919", + "kind": "dict", + "type": { + "$ref": "1134" + }, + "value": { + "$id": "5920", + "key5526": { + "$id": "5921", + "kind": "string", + "type": { + "$ref": "1136" + }, + "value": "nydhzdhbldygqcn" + } + } + } + ] + }, + "clientIds": { + "$id": "5922", + "kind": "array", + "type": { + "$ref": "1140" + }, + "value": [ + { + "$id": "5923", + "kind": "string", + "type": { + "$ref": "1141" + }, + "value": "smopeaeddsygz" + } + ] + }, + "usernames": { + "$id": "5924", + "kind": "array", + "type": { + "$ref": "1145" + }, + "value": [ + { + "$id": "5925", + "kind": "string", + "type": { + "$ref": "1146" + }, + "value": "iozngyqndrteikszkbasinzdjtm" + } + ] + } + } + }, + "stateStoreResources": { + "$id": "5926", + "kind": "array", + "type": { + "$ref": "1152" + }, + "value": [ + { + "$id": "5927", + "kind": "model", + "type": { + "$ref": "1153" + }, + "value": { + "$id": "5928", + "keyType": { + "$id": "5929", + "kind": "string", + "type": { + "$ref": "166" + }, + "value": "Pattern" + }, + "keys": { + "$id": "5930", + "kind": "array", + "type": { + "$ref": "1158" + }, + "value": [ + { + "$id": "5931", + "kind": "string", + "type": { + "$ref": "1159" + }, + "value": "tkounsqtwvzyaklxjqoerpu" + } + ] + }, + "method": { + "$id": "5932", + "kind": "string", + "type": { + "$ref": "174" + }, + "value": "Read" + } + } + } + ] + } + } + } + ] + } + } + }, + "provisioningState": { + "$id": "5933", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Succeeded" + } + } + }, + "extendedLocation": { + "$id": "5934", + "kind": "model", + "type": { + "$ref": "510" + }, + "value": { + "$id": "5935", + "name": { + "$id": "5936", + "kind": "string", + "type": { + "$ref": "512" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "5937", + "kind": "string", + "type": { + "$ref": "44" + }, + "value": "CustomLocation" + } + } + }, + "id": { + "$id": "5938", + "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": "5939", + "kind": "string", + "type": { + "$ref": "424" + }, + "value": "anqrqsvrjmlvzkrbuav" + }, + "type": { + "$id": "5940", + "kind": "string", + "type": { + "$ref": "428" + }, + "value": "yjlsfarshqoxojvgmy" + }, + "systemData": { + "$id": "5941", + "kind": "model", + "type": { + "$ref": "433" + }, + "value": { + "$id": "5942", + "createdBy": { + "$id": "5943", + "kind": "string", + "type": { + "$ref": "435" + }, + "value": "ssvaslsmudloholronopqyxjcu" + }, + "createdByType": { + "$id": "5944", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "createdAt": { + "$id": "5945", + "kind": "string", + "type": { + "$ref": "442" + }, + "value": "2024-08-09T18:13:29.389Z" + }, + "lastModifiedBy": { + "$id": "5946", + "kind": "string", + "type": { + "$ref": "447" + }, + "value": "gnicpuszwd" + }, + "lastModifiedByType": { + "$id": "5947", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "5948", + "kind": "string", + "type": { + "$ref": "454" + }, + "value": "2024-08-09T18:13:29.389Z" + } + } + } + } + } + ] + }, + "nextLink": { + "$id": "5949", + "kind": "string", + "type": { + "$ref": "1185" + }, + "value": "https://microsoft.com/a" + } + } + } + } + ] + } + ] + } + ], + "parameters": [ + { + "$id": "5950", + "name": "endpoint", + "nameInRequest": "endpoint", + "doc": "Service host", + "type": { + "$id": "5951", + "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": "5952", + "type": { + "$id": "5953", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "https://management.azure.com" + } + } + ], + "decorators": [ + { + "$id": "5954", + "name": "Azure.ResourceManager.@armResourceOperations", + "arguments": { + "$id": "5955" + } + } + ], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.BrokerAuthorization", + "apiVersions": [ + "2024-11-01", + "2025-04-01" + ], + "parent": { + "$ref": "1692" + } + }, + { + "$id": "5956", + "kind": "client", + "name": "DataflowProfile", + "namespace": "Azure.ResourceManager.IotOperations", + "operations": [ + { + "$id": "5957", + "name": "get", + "resourceName": "DataflowProfileResource", + "doc": "Get a DataflowProfileResource", + "accessibility": "public", + "parameters": [ + { + "$id": "5958", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "5959", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "5960", + "type": { + "$id": "5961", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-04-01" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5962", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "5963", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "5964", + "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": "5965", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "5966", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5967", + "name": "instanceName", + "nameInRequest": "instanceName", + "doc": "Name of instance.", + "type": { + "$id": "5968", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5969", + "name": "dataflowProfileName", + "nameInRequest": "dataflowProfileName", + "doc": "Name of Instance dataflowProfile resource", + "type": { + "$id": "5970", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5971", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "5972", + "kind": "constant", + "valueType": { + "$id": "5973", + "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": "5974", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "1189" + }, + "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": "5975", + "kind": "http", + "name": "DataflowProfile_Get", + "description": "DataflowProfile_Get", + "filePath": "2025-04-01/DataflowProfile_Get_MaximumSet_Gen.json", + "parameters": [ + { + "$id": "5976", + "parameter": { + "$ref": "5958" + }, + "value": { + "$id": "5977", + "kind": "string", + "type": { + "$ref": "5959" + }, + "value": "2025-04-01" + } + }, + { + "$id": "5978", + "parameter": { + "$ref": "5962" + }, + "value": { + "$id": "5979", + "kind": "string", + "type": { + "$ref": "5963" + }, + "value": "F8C729F9-DF9C-4743-848F-96EE433D8E53" + } + }, + { + "$id": "5980", + "parameter": { + "$ref": "5965" + }, + "value": { + "$id": "5981", + "kind": "string", + "type": { + "$ref": "5966" + }, + "value": "rgiotoperations" + } + }, + { + "$id": "5982", + "parameter": { + "$ref": "5967" + }, + "value": { + "$id": "5983", + "kind": "string", + "type": { + "$ref": "5968" + }, + "value": "resource-name123" + } + }, + { + "$id": "5984", + "parameter": { + "$ref": "5969" + }, + "value": { + "$id": "5985", + "kind": "string", + "type": { + "$ref": "5970" + }, + "value": "resource-name123" + } + } + ], + "responses": [ + { + "$id": "5986", + "response": { + "$ref": "5974" + }, + "statusCode": 200, + "bodyValue": { + "$id": "5987", + "kind": "model", + "type": { + "$ref": "1189" + }, + "value": { + "$id": "5988", + "properties": { + "$id": "5989", + "kind": "model", + "type": { + "$ref": "1191" + }, + "value": { + "$id": "5990", + "diagnostics": { + "$id": "5991", + "kind": "model", + "type": { + "$ref": "1193" + }, + "value": { + "$id": "5992", + "logs": { + "$id": "5993", + "kind": "model", + "type": { + "$ref": "702" + }, + "value": { + "$id": "5994", + "level": { + "$id": "5995", + "kind": "string", + "type": { + "$ref": "704" + }, + "value": "rnmwokumdmebpmfxxxzvvjfdywotav" + } + } + }, + "metrics": { + "$id": "5996", + "kind": "model", + "type": { + "$ref": "710" + }, + "value": { + "$id": "5997", + "prometheusPort": { + "$id": "5998", + "kind": "number", + "type": { + "$ref": "712" + }, + "value": 7581 + } + } + } + } + }, + "instanceCount": { + "$id": "5999", + "kind": "number", + "type": { + "$ref": "1203" + }, + "value": 14 + }, + "provisioningState": { + "$id": "6000", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Succeeded" + } + } + }, + "extendedLocation": { + "$id": "6001", + "kind": "model", + "type": { + "$ref": "510" + }, + "value": { + "$id": "6002", + "name": { + "$id": "6003", + "kind": "string", + "type": { + "$ref": "512" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "6004", + "kind": "string", + "type": { + "$ref": "44" + }, + "value": "CustomLocation" + } + } + }, + "id": { + "$id": "6005", + "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": "6006", + "kind": "string", + "type": { + "$ref": "424" + }, + "value": "bwhcjsnnfnrmbixamyxjau" + }, + "type": { + "$id": "6007", + "kind": "string", + "type": { + "$ref": "428" + }, + "value": "ejvancsomtbapgztnerhlvx" + }, + "systemData": { + "$id": "6008", + "kind": "model", + "type": { + "$ref": "433" + }, + "value": { + "$id": "6009", + "createdBy": { + "$id": "6010", + "kind": "string", + "type": { + "$ref": "435" + }, + "value": "ssvaslsmudloholronopqyxjcu" + }, + "createdByType": { + "$id": "6011", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "createdAt": { + "$id": "6012", + "kind": "string", + "type": { + "$ref": "442" + }, + "value": "2024-08-09T18:13:29.389Z" + }, + "lastModifiedBy": { + "$id": "6013", + "kind": "string", + "type": { + "$ref": "447" + }, + "value": "gnicpuszwd" + }, + "lastModifiedByType": { + "$id": "6014", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "6015", + "kind": "string", + "type": { + "$ref": "454" + }, + "value": "2024-08-09T18:13:29.389Z" + } + } + } + } + } + } + ] + } + ] + }, + { + "$id": "6016", + "name": "createOrUpdate", + "resourceName": "DataflowProfileResource", + "doc": "Create a DataflowProfileResource", + "accessibility": "public", + "parameters": [ + { + "$id": "6017", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "6018", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "6019", + "type": { + "$id": "6020", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-04-01" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "6021", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "6022", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "6023", + "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": "6024", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "6025", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "6026", + "name": "instanceName", + "nameInRequest": "instanceName", + "doc": "Name of instance.", + "type": { + "$id": "6027", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "6028", + "name": "dataflowProfileName", + "nameInRequest": "dataflowProfileName", + "doc": "Name of Instance dataflowProfile resource", + "type": { + "$id": "6029", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "6030", + "name": "contentType", + "nameInRequest": "Content-Type", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$id": "6031", + "kind": "constant", + "valueType": { + "$id": "6032", + "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": "6033", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "6034", + "kind": "constant", + "valueType": { + "$id": "6035", + "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": "6036", + "name": "resource", + "nameInRequest": "resource", + "doc": "Resource create parameters.", + "type": { + "$ref": "1189" + }, + "location": "Body", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "6037", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "1189" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + }, + { + "$id": "6038", + "statusCodes": [ + 201 + ], + "bodyType": { + "$ref": "1189" + }, + "headers": [ + { + "$id": "6039", + "name": "azureAsyncOperation", + "nameInResponse": "Azure-AsyncOperation", + "doc": "A link to the status monitor", + "type": { + "$id": "6040", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + { + "$id": "6041", + "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": "6042", + "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": "6043", + "finalStateVia": 0, + "finalResponse": { + "$id": "6044", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "1189" + } + } + }, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowProfile.createOrUpdate", + "decorators": [], + "examples": [ + { + "$id": "6045", + "kind": "http", + "name": "DataflowProfile_CreateOrUpdate", + "description": "DataflowProfile_CreateOrUpdate", + "filePath": "2025-04-01/DataflowProfile_CreateOrUpdate_MaximumSet_Gen.json", + "parameters": [ + { + "$id": "6046", + "parameter": { + "$ref": "6017" + }, + "value": { + "$id": "6047", + "kind": "string", + "type": { + "$ref": "6018" + }, + "value": "2025-04-01" + } + }, + { + "$id": "6048", + "parameter": { + "$ref": "6021" + }, + "value": { + "$id": "6049", + "kind": "string", + "type": { + "$ref": "6022" + }, + "value": "F8C729F9-DF9C-4743-848F-96EE433D8E53" + } + }, + { + "$id": "6050", + "parameter": { + "$ref": "6024" + }, + "value": { + "$id": "6051", + "kind": "string", + "type": { + "$ref": "6025" + }, + "value": "rgiotoperations" + } + }, + { + "$id": "6052", + "parameter": { + "$ref": "6026" + }, + "value": { + "$id": "6053", + "kind": "string", + "type": { + "$ref": "6027" + }, + "value": "resource-name123" + } + }, + { + "$id": "6054", + "parameter": { + "$ref": "6028" + }, + "value": { + "$id": "6055", + "kind": "string", + "type": { + "$ref": "6029" + }, + "value": "resource-name123" + } + }, + { + "$id": "6056", + "parameter": { + "$ref": "6036" + }, + "value": { + "$id": "6057", + "kind": "model", + "type": { + "$ref": "1189" + }, + "value": { + "$id": "6058", + "properties": { + "$id": "6059", + "kind": "model", + "type": { + "$ref": "1191" + }, + "value": { + "$id": "6060", + "diagnostics": { + "$id": "6061", + "kind": "model", + "type": { + "$ref": "1193" + }, + "value": { + "$id": "6062", + "logs": { + "$id": "6063", + "kind": "model", + "type": { + "$ref": "702" + }, + "value": { + "$id": "6064", + "level": { + "$id": "6065", + "kind": "string", + "type": { + "$ref": "704" + }, + "value": "rnmwokumdmebpmfxxxzvvjfdywotav" + } + } + }, + "metrics": { + "$id": "6066", + "kind": "model", + "type": { + "$ref": "710" + }, + "value": { + "$id": "6067", + "prometheusPort": { + "$id": "6068", + "kind": "number", + "type": { + "$ref": "712" + }, + "value": 7581 + } + } + } + } + }, + "instanceCount": { + "$id": "6069", + "kind": "number", + "type": { + "$ref": "1203" + }, + "value": 14 + } + } + }, + "extendedLocation": { + "$id": "6070", + "kind": "model", + "type": { + "$ref": "510" + }, + "value": { + "$id": "6071", + "name": { + "$id": "6072", + "kind": "string", + "type": { + "$ref": "512" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "6073", + "kind": "string", + "type": { + "$ref": "44" + }, + "value": "CustomLocation" + } + } + } + } + } + } + ], + "responses": [ + { + "$id": "6074", + "response": { + "$ref": "6037" + }, + "statusCode": 200, + "bodyValue": { + "$id": "6075", + "kind": "model", + "type": { + "$ref": "1189" + }, + "value": { + "$id": "6076", + "properties": { + "$id": "6077", + "kind": "model", + "type": { + "$ref": "1191" + }, + "value": { + "$id": "6078", + "diagnostics": { + "$id": "6079", + "kind": "model", + "type": { + "$ref": "1193" + }, + "value": { + "$id": "6080", + "logs": { + "$id": "6081", + "kind": "model", + "type": { + "$ref": "702" + }, + "value": { + "$id": "6082", + "level": { + "$id": "6083", + "kind": "string", + "type": { + "$ref": "704" + }, + "value": "rnmwokumdmebpmfxxxzvvjfdywotav" + } + } + }, + "metrics": { + "$id": "6084", + "kind": "model", + "type": { + "$ref": "710" + }, + "value": { + "$id": "6085", + "prometheusPort": { + "$id": "6086", + "kind": "number", + "type": { + "$ref": "712" + }, + "value": 7581 + } + } + } + } + }, + "instanceCount": { + "$id": "6087", + "kind": "number", + "type": { + "$ref": "1203" + }, + "value": 14 + }, + "provisioningState": { + "$id": "6088", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Succeeded" + } + } + }, + "extendedLocation": { + "$id": "6089", + "kind": "model", + "type": { + "$ref": "510" + }, + "value": { + "$id": "6090", + "name": { + "$id": "6091", + "kind": "string", + "type": { + "$ref": "512" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "6092", + "kind": "string", + "type": { + "$ref": "44" + }, + "value": "CustomLocation" + } + } + }, + "id": { + "$id": "6093", + "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": "6094", + "kind": "string", + "type": { + "$ref": "424" + }, + "value": "bwhcjsnnfnrmbixamyxjau" + }, + "type": { + "$id": "6095", + "kind": "string", + "type": { + "$ref": "428" + }, + "value": "ejvancsomtbapgztnerhlvx" + }, + "systemData": { + "$id": "6096", + "kind": "model", + "type": { + "$ref": "433" + }, + "value": { + "$id": "6097", + "createdBy": { + "$id": "6098", + "kind": "string", + "type": { + "$ref": "435" + }, + "value": "ssvaslsmudloholronopqyxjcu" + }, + "createdByType": { + "$id": "6099", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "createdAt": { + "$id": "6100", + "kind": "string", + "type": { + "$ref": "442" + }, + "value": "2024-08-09T18:13:29.389Z" + }, + "lastModifiedBy": { + "$id": "6101", + "kind": "string", + "type": { + "$ref": "447" + }, + "value": "gnicpuszwd" + }, + "lastModifiedByType": { + "$id": "6102", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "6103", + "kind": "string", + "type": { + "$ref": "454" + }, + "value": "2024-08-09T18:13:29.389Z" + } + } + } + } + } + }, + { + "$id": "6104", + "response": { + "$ref": "6038" + }, + "statusCode": 201, + "bodyValue": { + "$id": "6105", + "kind": "model", + "type": { + "$ref": "1189" + }, + "value": { + "$id": "6106", + "properties": { + "$id": "6107", + "kind": "model", + "type": { + "$ref": "1191" + }, + "value": { + "$id": "6108", + "diagnostics": { + "$id": "6109", + "kind": "model", + "type": { + "$ref": "1193" + }, + "value": { + "$id": "6110", + "logs": { + "$id": "6111", + "kind": "model", + "type": { + "$ref": "702" + }, + "value": { + "$id": "6112", + "level": { + "$id": "6113", + "kind": "string", + "type": { + "$ref": "704" + }, + "value": "rnmwokumdmebpmfxxxzvvjfdywotav" + } + } + }, + "metrics": { + "$id": "6114", + "kind": "model", + "type": { + "$ref": "710" + }, + "value": { + "$id": "6115", + "prometheusPort": { + "$id": "6116", + "kind": "number", + "type": { + "$ref": "712" + }, + "value": 7581 + } + } + } + } + }, + "instanceCount": { + "$id": "6117", + "kind": "number", + "type": { + "$ref": "1203" + }, + "value": 14 + }, + "provisioningState": { + "$id": "6118", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Succeeded" + } + } + }, + "extendedLocation": { + "$id": "6119", + "kind": "model", + "type": { + "$ref": "510" + }, + "value": { + "$id": "6120", + "name": { + "$id": "6121", + "kind": "string", + "type": { + "$ref": "512" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "6122", + "kind": "string", + "type": { + "$ref": "44" + }, + "value": "CustomLocation" + } + } + }, + "id": { + "$id": "6123", + "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": "6124", + "kind": "string", + "type": { + "$ref": "424" + }, + "value": "bwhcjsnnfnrmbixamyxjau" + }, + "type": { + "$id": "6125", + "kind": "string", + "type": { + "$ref": "428" + }, + "value": "ejvancsomtbapgztnerhlvx" + }, + "systemData": { + "$id": "6126", + "kind": "model", + "type": { + "$ref": "433" + }, + "value": { + "$id": "6127", + "createdBy": { + "$id": "6128", + "kind": "string", + "type": { + "$ref": "435" + }, + "value": "ssvaslsmudloholronopqyxjcu" + }, + "createdByType": { + "$id": "6129", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "createdAt": { + "$id": "6130", + "kind": "string", + "type": { + "$ref": "442" + }, + "value": "2024-08-09T18:13:29.389Z" + }, + "lastModifiedBy": { + "$id": "6131", + "kind": "string", + "type": { + "$ref": "447" + }, + "value": "gnicpuszwd" + }, + "lastModifiedByType": { + "$id": "6132", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "6133", + "kind": "string", + "type": { + "$ref": "454" + }, + "value": "2024-08-09T18:13:29.389Z" + } + } + } + } + } + } + ] + }, + { + "$id": "6134", + "kind": "http", + "name": "DataflowProfile_CreateOrUpdate_Minimal", + "description": "DataflowProfile_CreateOrUpdate_Minimal", + "filePath": "2025-04-01/DataflowProfile_CreateOrUpdate_Minimal.json", + "parameters": [ + { + "$id": "6135", + "parameter": { + "$ref": "6017" + }, + "value": { + "$id": "6136", + "kind": "string", + "type": { + "$ref": "6018" + }, + "value": "2025-04-01" + } + }, + { + "$id": "6137", + "parameter": { + "$ref": "6021" + }, + "value": { + "$id": "6138", + "kind": "string", + "type": { + "$ref": "6022" + }, + "value": "F8C729F9-DF9C-4743-848F-96EE433D8E53" + } + }, + { + "$id": "6139", + "parameter": { + "$ref": "6024" + }, + "value": { + "$id": "6140", + "kind": "string", + "type": { + "$ref": "6025" + }, + "value": "rgiotoperations" + } + }, + { + "$id": "6141", + "parameter": { + "$ref": "6026" + }, + "value": { + "$id": "6142", + "kind": "string", + "type": { + "$ref": "6027" + }, + "value": "resource-name123" + } + }, + { + "$id": "6143", + "parameter": { + "$ref": "6028" + }, + "value": { + "$id": "6144", + "kind": "string", + "type": { + "$ref": "6029" + }, + "value": "aio-dataflowprofile" + } + }, + { + "$id": "6145", + "parameter": { + "$ref": "6036" + }, + "value": { + "$id": "6146", + "kind": "model", + "type": { + "$ref": "1189" + }, + "value": { + "$id": "6147", + "properties": { + "$id": "6148", + "kind": "model", + "type": { + "$ref": "1191" + }, + "value": { + "$id": "6149", + "instanceCount": { + "$id": "6150", + "kind": "number", + "type": { + "$ref": "1203" + }, + "value": 1 + } + } + }, + "extendedLocation": { + "$id": "6151", + "kind": "model", + "type": { + "$ref": "510" + }, + "value": { + "$id": "6152", + "name": { + "$id": "6153", + "kind": "string", + "type": { + "$ref": "512" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "6154", + "kind": "string", + "type": { + "$ref": "44" + }, + "value": "CustomLocation" + } + } + } + } + } + } + ], + "responses": [ + { + "$id": "6155", + "response": { + "$ref": "6037" + }, + "statusCode": 200, + "bodyValue": { + "$id": "6156", + "kind": "model", + "type": { + "$ref": "1189" + }, + "value": { + "$id": "6157", + "properties": { + "$id": "6158", + "kind": "model", + "type": { + "$ref": "1191" + }, + "value": { + "$id": "6159", + "instanceCount": { + "$id": "6160", + "kind": "number", + "type": { + "$ref": "1203" + }, + "value": 1 + }, + "provisioningState": { + "$id": "6161", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Succeeded" + } + } + }, + "extendedLocation": { + "$id": "6162", + "kind": "model", + "type": { + "$ref": "510" + }, + "value": { + "$id": "6163", + "name": { + "$id": "6164", + "kind": "string", + "type": { + "$ref": "512" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "6165", + "kind": "string", + "type": { + "$ref": "44" + }, + "value": "CustomLocation" + } + } + }, + "id": { + "$id": "6166", + "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": "6167", + "kind": "string", + "type": { + "$ref": "424" + }, + "value": "bwhcjsnnfnrmbixamyxjau" + }, + "type": { + "$id": "6168", + "kind": "string", + "type": { + "$ref": "428" + }, + "value": "ejvancsomtbapgztnerhlvx" + }, + "systemData": { + "$id": "6169", + "kind": "model", + "type": { + "$ref": "433" + }, + "value": { + "$id": "6170", + "createdBy": { + "$id": "6171", + "kind": "string", + "type": { + "$ref": "435" + }, + "value": "ssvaslsmudloholronopqyxjcu" + }, + "createdByType": { + "$id": "6172", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "createdAt": { + "$id": "6173", + "kind": "string", + "type": { + "$ref": "442" + }, + "value": "2024-08-09T18:13:29.389Z" + }, + "lastModifiedBy": { + "$id": "6174", + "kind": "string", + "type": { + "$ref": "447" + }, + "value": "gnicpuszwd" + }, + "lastModifiedByType": { + "$id": "6175", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "6176", + "kind": "string", + "type": { + "$ref": "454" + }, + "value": "2024-08-09T18:13:29.389Z" + } + } + } + } + } + }, + { + "$id": "6177", + "response": { + "$ref": "6038" + }, + "statusCode": 201, + "bodyValue": { + "$id": "6178", + "kind": "model", + "type": { + "$ref": "1189" + }, + "value": { + "$id": "6179", + "properties": { + "$id": "6180", + "kind": "model", + "type": { + "$ref": "1191" + }, + "value": { + "$id": "6181", + "instanceCount": { + "$id": "6182", + "kind": "number", + "type": { + "$ref": "1203" + }, + "value": 1 + }, + "provisioningState": { + "$id": "6183", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Succeeded" + } + } + }, + "extendedLocation": { + "$id": "6184", + "kind": "model", + "type": { + "$ref": "510" + }, + "value": { + "$id": "6185", + "name": { + "$id": "6186", + "kind": "string", + "type": { + "$ref": "512" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "6187", + "kind": "string", + "type": { + "$ref": "44" + }, + "value": "CustomLocation" + } + } + }, + "id": { + "$id": "6188", + "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": "6189", + "kind": "string", + "type": { + "$ref": "424" + }, + "value": "bwhcjsnnfnrmbixamyxjau" + }, + "type": { + "$id": "6190", + "kind": "string", + "type": { + "$ref": "428" + }, + "value": "ejvancsomtbapgztnerhlvx" + }, + "systemData": { + "$id": "6191", + "kind": "model", + "type": { + "$ref": "433" + }, + "value": { + "$id": "6192", + "createdBy": { + "$id": "6193", + "kind": "string", + "type": { + "$ref": "435" + }, + "value": "ssvaslsmudloholronopqyxjcu" + }, + "createdByType": { + "$id": "6194", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "createdAt": { + "$id": "6195", + "kind": "string", + "type": { + "$ref": "442" + }, + "value": "2024-08-09T18:13:29.389Z" + }, + "lastModifiedBy": { + "$id": "6196", + "kind": "string", + "type": { + "$ref": "447" + }, + "value": "gnicpuszwd" + }, + "lastModifiedByType": { + "$id": "6197", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "6198", + "kind": "string", + "type": { + "$ref": "454" + }, + "value": "2024-08-09T18:13:29.389Z" + } + } + } + } + } + } + ] + }, + { + "$id": "6199", + "kind": "http", + "name": "DataflowProfile_CreateOrUpdate_Multi", + "description": "DataflowProfile_CreateOrUpdate_Multi", + "filePath": "2025-04-01/DataflowProfile_CreateOrUpdate_Multi.json", + "parameters": [ + { + "$id": "6200", + "parameter": { + "$ref": "6017" + }, + "value": { + "$id": "6201", + "kind": "string", + "type": { + "$ref": "6018" + }, + "value": "2025-04-01" + } + }, + { + "$id": "6202", + "parameter": { + "$ref": "6021" + }, + "value": { + "$id": "6203", + "kind": "string", + "type": { + "$ref": "6022" + }, + "value": "F8C729F9-DF9C-4743-848F-96EE433D8E53" + } + }, + { + "$id": "6204", + "parameter": { + "$ref": "6024" + }, + "value": { + "$id": "6205", + "kind": "string", + "type": { + "$ref": "6025" + }, + "value": "rgiotoperations" + } + }, + { + "$id": "6206", + "parameter": { + "$ref": "6026" + }, + "value": { + "$id": "6207", + "kind": "string", + "type": { + "$ref": "6027" + }, + "value": "resource-name123" + } + }, + { + "$id": "6208", + "parameter": { + "$ref": "6028" + }, + "value": { + "$id": "6209", + "kind": "string", + "type": { + "$ref": "6029" + }, + "value": "aio-dataflowprofile" + } + }, + { + "$id": "6210", + "parameter": { + "$ref": "6036" + }, + "value": { + "$id": "6211", + "kind": "model", + "type": { + "$ref": "1189" + }, + "value": { + "$id": "6212", + "properties": { + "$id": "6213", + "kind": "model", + "type": { + "$ref": "1191" + }, + "value": { + "$id": "6214", + "instanceCount": { + "$id": "6215", + "kind": "number", + "type": { + "$ref": "1203" + }, + "value": 3 + } + } + }, + "extendedLocation": { + "$id": "6216", + "kind": "model", + "type": { + "$ref": "510" + }, + "value": { + "$id": "6217", + "name": { + "$id": "6218", + "kind": "string", + "type": { + "$ref": "512" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "6219", + "kind": "string", + "type": { + "$ref": "44" + }, + "value": "CustomLocation" + } + } + } + } + } + } + ], + "responses": [ + { + "$id": "6220", + "response": { + "$ref": "6037" + }, + "statusCode": 200, + "bodyValue": { + "$id": "6221", + "kind": "model", + "type": { + "$ref": "1189" + }, + "value": { + "$id": "6222", + "properties": { + "$id": "6223", + "kind": "model", + "type": { + "$ref": "1191" + }, + "value": { + "$id": "6224", + "instanceCount": { + "$id": "6225", + "kind": "number", + "type": { + "$ref": "1203" + }, + "value": 3 + }, + "provisioningState": { + "$id": "6226", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Succeeded" + } + } + }, + "extendedLocation": { + "$id": "6227", + "kind": "model", + "type": { + "$ref": "510" + }, + "value": { + "$id": "6228", + "name": { + "$id": "6229", + "kind": "string", + "type": { + "$ref": "512" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "6230", + "kind": "string", + "type": { + "$ref": "44" + }, + "value": "CustomLocation" + } + } + }, + "id": { + "$id": "6231", + "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": "6232", + "kind": "string", + "type": { + "$ref": "424" + }, + "value": "bwhcjsnnfnrmbixamyxjau" + }, + "type": { + "$id": "6233", + "kind": "string", + "type": { + "$ref": "428" + }, + "value": "ejvancsomtbapgztnerhlvx" + }, + "systemData": { + "$id": "6234", + "kind": "model", + "type": { + "$ref": "433" + }, + "value": { + "$id": "6235", + "createdBy": { + "$id": "6236", + "kind": "string", + "type": { + "$ref": "435" + }, + "value": "ssvaslsmudloholronopqyxjcu" + }, + "createdByType": { + "$id": "6237", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "createdAt": { + "$id": "6238", + "kind": "string", + "type": { + "$ref": "442" + }, + "value": "2024-08-09T18:13:29.389Z" + }, + "lastModifiedBy": { + "$id": "6239", + "kind": "string", + "type": { + "$ref": "447" + }, + "value": "gnicpuszwd" + }, + "lastModifiedByType": { + "$id": "6240", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "6241", + "kind": "string", + "type": { + "$ref": "454" + }, + "value": "2024-08-09T18:13:29.389Z" + } + } + } + } + } + }, + { + "$id": "6242", + "response": { + "$ref": "6038" + }, + "statusCode": 201, + "bodyValue": { + "$id": "6243", + "kind": "model", + "type": { + "$ref": "1189" + }, + "value": { + "$id": "6244", + "properties": { + "$id": "6245", + "kind": "model", + "type": { + "$ref": "1191" + }, + "value": { + "$id": "6246", + "instanceCount": { + "$id": "6247", + "kind": "number", + "type": { + "$ref": "1203" + }, + "value": 3 + }, + "provisioningState": { + "$id": "6248", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Succeeded" + } + } + }, + "extendedLocation": { + "$id": "6249", + "kind": "model", + "type": { + "$ref": "510" + }, + "value": { + "$id": "6250", + "name": { + "$id": "6251", + "kind": "string", + "type": { + "$ref": "512" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "6252", + "kind": "string", + "type": { + "$ref": "44" + }, + "value": "CustomLocation" + } + } + }, + "id": { + "$id": "6253", + "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": "6254", + "kind": "string", + "type": { + "$ref": "424" + }, + "value": "bwhcjsnnfnrmbixamyxjau" + }, + "type": { + "$id": "6255", + "kind": "string", + "type": { + "$ref": "428" + }, + "value": "ejvancsomtbapgztnerhlvx" + }, + "systemData": { + "$id": "6256", + "kind": "model", + "type": { + "$ref": "433" + }, + "value": { + "$id": "6257", + "createdBy": { + "$id": "6258", + "kind": "string", + "type": { + "$ref": "435" + }, + "value": "ssvaslsmudloholronopqyxjcu" + }, + "createdByType": { + "$id": "6259", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "createdAt": { + "$id": "6260", + "kind": "string", + "type": { + "$ref": "442" + }, + "value": "2024-08-09T18:13:29.389Z" + }, + "lastModifiedBy": { + "$id": "6261", + "kind": "string", + "type": { + "$ref": "447" + }, + "value": "gnicpuszwd" + }, + "lastModifiedByType": { + "$id": "6262", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "6263", + "kind": "string", + "type": { + "$ref": "454" + }, + "value": "2024-08-09T18:13:29.389Z" + } + } + } + } + } + } + ] + } + ] + }, + { + "$id": "6264", + "name": "delete", + "resourceName": "DataflowProfileResource", + "doc": "Delete a DataflowProfileResource", + "accessibility": "public", + "parameters": [ + { + "$id": "6265", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "6266", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "6267", + "type": { + "$id": "6268", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-04-01" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "6269", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "6270", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "6271", + "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": "6272", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "6273", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "6274", + "name": "instanceName", + "nameInRequest": "instanceName", + "doc": "Name of instance.", + "type": { + "$id": "6275", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "6276", + "name": "dataflowProfileName", + "nameInRequest": "dataflowProfileName", + "doc": "Name of Instance dataflowProfile resource", + "type": { + "$id": "6277", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "6278", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "6279", + "kind": "constant", + "valueType": { + "$id": "6280", + "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": "6281", + "statusCodes": [ + 202 + ], + "headers": [ + { + "$id": "6282", + "name": "location", + "nameInResponse": "Location", + "doc": "The Location header contains the URL where the status of the long running operation can be checked.", + "type": { + "$id": "6283", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + { + "$id": "6284", + "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": "6285", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + } + } + ], + "isErrorResponse": false + }, + { + "$id": "6286", + "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": "6287", + "finalStateVia": 1, + "finalResponse": { + "$id": "6288", + "statusCodes": [ + 204 + ] + } + }, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowProfile.delete", + "decorators": [], + "examples": [ + { + "$id": "6289", + "kind": "http", + "name": "DataflowProfile_Delete", + "description": "DataflowProfile_Delete", + "filePath": "2025-04-01/DataflowProfile_Delete_MaximumSet_Gen.json", + "parameters": [ + { + "$id": "6290", + "parameter": { + "$ref": "6265" + }, + "value": { + "$id": "6291", + "kind": "string", + "type": { + "$ref": "6266" + }, + "value": "2025-04-01" + } + }, + { + "$id": "6292", + "parameter": { + "$ref": "6269" + }, + "value": { + "$id": "6293", + "kind": "string", + "type": { + "$ref": "6270" + }, + "value": "F8C729F9-DF9C-4743-848F-96EE433D8E53" + } + }, + { + "$id": "6294", + "parameter": { + "$ref": "6272" + }, + "value": { + "$id": "6295", + "kind": "string", + "type": { + "$ref": "6273" + }, + "value": "rgiotoperations" + } + }, + { + "$id": "6296", + "parameter": { + "$ref": "6274" + }, + "value": { + "$id": "6297", + "kind": "string", + "type": { + "$ref": "6275" + }, + "value": "resource-name123" + } + }, + { + "$id": "6298", + "parameter": { + "$ref": "6276" + }, + "value": { + "$id": "6299", + "kind": "string", + "type": { + "$ref": "6277" + }, + "value": "resource-name123" + } + } + ], + "responses": [ + { + "$id": "6300", + "response": { + "$ref": "6281" + }, + "statusCode": 202 + }, + { + "$id": "6301", + "response": { + "$ref": "6286" + }, + "statusCode": 204 + } + ] + } + ] + }, + { + "$id": "6302", + "name": "listByResourceGroup", + "resourceName": "DataflowProfileResource", + "doc": "List DataflowProfileResource resources by InstanceResource", + "accessibility": "public", + "parameters": [ + { + "$id": "6303", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "6304", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "6305", + "type": { + "$id": "6306", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-04-01" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "6307", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "6308", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "6309", + "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": "6310", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "6311", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "6312", + "name": "instanceName", + "nameInRequest": "instanceName", + "doc": "Name of instance.", + "type": { + "$id": "6313", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "6314", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "6315", + "kind": "constant", + "valueType": { + "$id": "6316", + "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": "6317", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "1214" + }, + "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": "6318", + "itemPropertySegments": [ + "value" + ], + "nextLink": { + "$id": "6319", + "responseSegments": [ + "nextLink" + ], + "responseLocation": "Body" + } + }, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowProfile.listByResourceGroup", + "decorators": [], + "examples": [ + { + "$id": "6320", + "kind": "http", + "name": "DataflowProfile_ListByResourceGroup", + "description": "DataflowProfile_ListByResourceGroup", + "filePath": "2025-04-01/DataflowProfile_ListByResourceGroup_MaximumSet_Gen.json", + "parameters": [ + { + "$id": "6321", + "parameter": { + "$ref": "6303" + }, + "value": { + "$id": "6322", + "kind": "string", + "type": { + "$ref": "6304" + }, + "value": "2025-04-01" + } + }, + { + "$id": "6323", + "parameter": { + "$ref": "6307" + }, + "value": { + "$id": "6324", + "kind": "string", + "type": { + "$ref": "6308" + }, + "value": "F8C729F9-DF9C-4743-848F-96EE433D8E53" + } + }, + { + "$id": "6325", + "parameter": { + "$ref": "6310" + }, + "value": { + "$id": "6326", + "kind": "string", + "type": { + "$ref": "6311" + }, + "value": "rgiotoperations" + } + }, + { + "$id": "6327", + "parameter": { + "$ref": "6312" + }, + "value": { + "$id": "6328", + "kind": "string", + "type": { + "$ref": "6313" + }, + "value": "resource-name123" + } + } + ], + "responses": [ + { + "$id": "6329", + "response": { + "$ref": "6317" + }, + "statusCode": 200, + "bodyValue": { + "$id": "6330", + "kind": "model", + "type": { + "$ref": "1214" + }, + "value": { + "$id": "6331", + "value": { + "$id": "6332", + "kind": "array", + "type": { + "$ref": "1216" + }, + "value": [ + { + "$id": "6333", + "kind": "model", + "type": { + "$ref": "1189" + }, + "value": { + "$id": "6334", + "properties": { + "$id": "6335", + "kind": "model", + "type": { + "$ref": "1191" + }, + "value": { + "$id": "6336", + "diagnostics": { + "$id": "6337", + "kind": "model", + "type": { + "$ref": "1193" + }, + "value": { + "$id": "6338", + "logs": { + "$id": "6339", + "kind": "model", + "type": { + "$ref": "702" + }, + "value": { + "$id": "6340", + "level": { + "$id": "6341", + "kind": "string", + "type": { + "$ref": "704" + }, + "value": "rnmwokumdmebpmfxxxzvvjfdywotav" + } + } + }, + "metrics": { + "$id": "6342", + "kind": "model", + "type": { + "$ref": "710" + }, + "value": { + "$id": "6343", + "prometheusPort": { + "$id": "6344", + "kind": "number", + "type": { + "$ref": "712" + }, + "value": 7581 + } + } + } + } + }, + "instanceCount": { + "$id": "6345", + "kind": "number", + "type": { + "$ref": "1203" + }, + "value": 14 + }, + "provisioningState": { + "$id": "6346", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Succeeded" + } + } + }, + "extendedLocation": { + "$id": "6347", + "kind": "model", + "type": { + "$ref": "510" + }, + "value": { + "$id": "6348", + "name": { + "$id": "6349", + "kind": "string", + "type": { + "$ref": "512" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "6350", + "kind": "string", + "type": { + "$ref": "44" + }, + "value": "CustomLocation" + } + } + }, + "id": { + "$id": "6351", + "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": "6352", + "kind": "string", + "type": { + "$ref": "424" + }, + "value": "bwhcjsnnfnrmbixamyxjau" + }, + "type": { + "$id": "6353", + "kind": "string", + "type": { + "$ref": "428" + }, + "value": "ejvancsomtbapgztnerhlvx" + }, + "systemData": { + "$id": "6354", + "kind": "model", + "type": { + "$ref": "433" + }, + "value": { + "$id": "6355", + "createdBy": { + "$id": "6356", + "kind": "string", + "type": { + "$ref": "435" + }, + "value": "ssvaslsmudloholronopqyxjcu" + }, + "createdByType": { + "$id": "6357", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "createdAt": { + "$id": "6358", + "kind": "string", + "type": { + "$ref": "442" + }, + "value": "2024-08-09T18:13:29.389Z" + }, + "lastModifiedBy": { + "$id": "6359", + "kind": "string", + "type": { + "$ref": "447" + }, + "value": "gnicpuszwd" + }, + "lastModifiedByType": { + "$id": "6360", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "6361", + "kind": "string", + "type": { + "$ref": "454" + }, + "value": "2024-08-09T18:13:29.389Z" + } + } + } + } + } + ] + }, + "nextLink": { + "$id": "6362", + "kind": "string", + "type": { + "$ref": "1220" + }, + "value": "https://microsoft.com/a" + } + } + } + } + ] + } + ] + } + ], + "parameters": [ + { + "$id": "6363", + "name": "endpoint", + "nameInRequest": "endpoint", + "doc": "Service host", + "type": { + "$id": "6364", + "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": "6365", + "type": { + "$id": "6366", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "https://management.azure.com" + } + } + ], + "decorators": [ + { + "$id": "6367", + "name": "Azure.ResourceManager.@armResourceOperations", + "arguments": { + "$id": "6368" + } + } + ], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowProfile", + "apiVersions": [ + "2024-11-01", + "2025-04-01" + ], + "parent": { + "$ref": "1692" + } + }, + { + "$id": "6369", + "kind": "client", + "name": "Dataflow", + "namespace": "Azure.ResourceManager.IotOperations", + "operations": [ + { + "$id": "6370", + "name": "get", + "resourceName": "DataflowResource", + "doc": "Get a DataflowResource", + "accessibility": "public", + "parameters": [ + { + "$id": "6371", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "6372", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "6373", + "type": { + "$id": "6374", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-04-01" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "6375", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "6376", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "6377", + "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": "6378", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "6379", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "6380", + "name": "instanceName", + "nameInRequest": "instanceName", + "doc": "Name of instance.", + "type": { + "$id": "6381", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "6382", + "name": "dataflowProfileName", + "nameInRequest": "dataflowProfileName", + "doc": "Name of Instance dataflowProfile resource", + "type": { + "$id": "6383", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "6384", + "name": "dataflowName", + "nameInRequest": "dataflowName", + "doc": "Name of Instance dataflowProfile dataflow resource", + "type": { + "$id": "6385", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "6386", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "6387", + "kind": "constant", + "valueType": { + "$id": "6388", + "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": "6389", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "1224" + }, + "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": "6390", + "kind": "http", + "name": "Dataflow_Get", + "description": "Dataflow_Get", + "filePath": "2025-04-01/Dataflow_Get_MaximumSet_Gen.json", + "parameters": [ + { + "$id": "6391", + "parameter": { + "$ref": "6371" + }, + "value": { + "$id": "6392", + "kind": "string", + "type": { + "$ref": "6372" + }, + "value": "2025-04-01" + } + }, + { + "$id": "6393", + "parameter": { + "$ref": "6375" + }, + "value": { + "$id": "6394", + "kind": "string", + "type": { + "$ref": "6376" + }, + "value": "F8C729F9-DF9C-4743-848F-96EE433D8E53" + } + }, + { + "$id": "6395", + "parameter": { + "$ref": "6378" + }, + "value": { + "$id": "6396", + "kind": "string", + "type": { + "$ref": "6379" + }, + "value": "rgiotoperations" + } + }, + { + "$id": "6397", + "parameter": { + "$ref": "6380" + }, + "value": { + "$id": "6398", + "kind": "string", + "type": { + "$ref": "6381" + }, + "value": "resource-name123" + } + }, + { + "$id": "6399", + "parameter": { + "$ref": "6382" + }, + "value": { + "$id": "6400", + "kind": "string", + "type": { + "$ref": "6383" + }, + "value": "resource-name123" + } + }, + { + "$id": "6401", + "parameter": { + "$ref": "6384" + }, + "value": { + "$id": "6402", + "kind": "string", + "type": { + "$ref": "6385" + }, + "value": "resource-name123" + } + } + ], + "responses": [ + { + "$id": "6403", + "response": { + "$ref": "6389" + }, + "statusCode": 200, + "bodyValue": { + "$id": "6404", + "kind": "model", + "type": { + "$ref": "1224" + }, + "value": { + "$id": "6405", + "properties": { + "$id": "6406", + "kind": "model", + "type": { + "$ref": "1226" + }, + "value": { + "$id": "6407", + "mode": { + "$id": "6408", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Enabled" + }, + "operations": { + "$id": "6409", + "kind": "array", + "type": { + "$ref": "1231" + }, + "value": [ + { + "$id": "6410", + "kind": "model", + "type": { + "$ref": "1232" + }, + "value": { + "$id": "6411", + "operationType": { + "$id": "6412", + "kind": "string", + "type": { + "$ref": "182" + }, + "value": "Source" + }, + "name": { + "$id": "6413", + "kind": "string", + "type": { + "$ref": "1237" + }, + "value": "knnafvkwoeakm" + }, + "sourceSettings": { + "$id": "6414", + "kind": "model", + "type": { + "$ref": "1241" + }, + "value": { + "$id": "6415", + "endpointRef": { + "$id": "6416", + "kind": "string", + "type": { + "$ref": "1243" + }, + "value": "iixotodhvhkkfcfyrkoveslqig" + }, + "assetRef": { + "$id": "6417", + "kind": "string", + "type": { + "$ref": "1247" + }, + "value": "zayyykwmckaocywdkohmu" + }, + "serializationFormat": { + "$id": "6418", + "kind": "string", + "type": { + "$ref": "190" + }, + "value": "Json" + }, + "schemaRef": { + "$id": "6419", + "kind": "string", + "type": { + "$ref": "1254" + }, + "value": "pknmdzqll" + }, + "dataSources": { + "$id": "6420", + "kind": "array", + "type": { + "$ref": "1258" + }, + "value": [ + { + "$id": "6421", + "kind": "string", + "type": { + "$ref": "1259" + }, + "value": "chkkpymxhp" + } + ] + } + } + }, + "builtInTransformationSettings": { + "$id": "6422", + "kind": "model", + "type": { + "$ref": "1266" + }, + "value": { + "$id": "6423", + "serializationFormat": { + "$id": "6424", + "kind": "string", + "type": { + "$ref": "194" + }, + "value": "Delta" + }, + "schemaRef": { + "$id": "6425", + "kind": "string", + "type": { + "$ref": "1271" + }, + "value": "mcdc" + }, + "datasets": { + "$id": "6426", + "kind": "array", + "type": { + "$ref": "1275" + }, + "value": [ + { + "$id": "6427", + "kind": "model", + "type": { + "$ref": "1276" + }, + "value": { + "$id": "6428", + "key": { + "$id": "6429", + "kind": "string", + "type": { + "$ref": "1278" + }, + "value": "qsfqcgxaxnhfumrsdsokwyv" + }, + "description": { + "$id": "6430", + "kind": "string", + "type": { + "$ref": "1282" + }, + "value": "Lorem ipsum odor amet, consectetuer adipiscing elit." + }, + "schemaRef": { + "$id": "6431", + "kind": "string", + "type": { + "$ref": "1286" + }, + "value": "n" + }, + "inputs": { + "$id": "6432", + "kind": "array", + "type": { + "$ref": "1290" + }, + "value": [ + { + "$id": "6433", + "kind": "string", + "type": { + "$ref": "1291" + }, + "value": "mosffpsslifkq" + } + ] + }, + "expression": { + "$id": "6434", + "kind": "string", + "type": { + "$ref": "1295" + }, + "value": "aatbwomvflemsxialv" + } + } + } + ] + }, + "filter": { + "$id": "6435", + "kind": "array", + "type": { + "$ref": "1301" + }, + "value": [ + { + "$id": "6436", + "kind": "model", + "type": { + "$ref": "1302" + }, + "value": { + "$id": "6437", + "type": { + "$id": "6438", + "kind": "string", + "type": { + "$ref": "202" + }, + "value": "Filter" + }, + "description": { + "$id": "6439", + "kind": "string", + "type": { + "$ref": "1307" + }, + "value": "Lorem ipsum odor amet, consectetuer adipiscing elit." + }, + "inputs": { + "$id": "6440", + "kind": "array", + "type": { + "$ref": "1311" + }, + "value": [ + { + "$id": "6441", + "kind": "string", + "type": { + "$ref": "1312" + }, + "value": "sxmjkbntgb" + } + ] + }, + "expression": { + "$id": "6442", + "kind": "string", + "type": { + "$ref": "1316" + }, + "value": "n" + } + } + } + ] + }, + "map": { + "$id": "6443", + "kind": "array", + "type": { + "$ref": "1322" + }, + "value": [ + { + "$id": "6444", + "kind": "model", + "type": { + "$ref": "1323" + }, + "value": { + "$id": "6445", + "type": { + "$id": "6446", + "kind": "string", + "type": { + "$ref": "206" + }, + "value": "NewProperties" + }, + "description": { + "$id": "6447", + "kind": "string", + "type": { + "$ref": "1328" + }, + "value": "Lorem ipsum odor amet, consectetuer adipiscing elit." + }, + "inputs": { + "$id": "6448", + "kind": "array", + "type": { + "$ref": "1332" + }, + "value": [ + { + "$id": "6449", + "kind": "string", + "type": { + "$ref": "1333" + }, + "value": "xsbxuk" + } + ] + }, + "expression": { + "$id": "6450", + "kind": "string", + "type": { + "$ref": "1337" + }, + "value": "txoiltogsarwkzalsphvlmt" + }, + "output": { + "$id": "6451", + "kind": "string", + "type": { + "$ref": "1341" + }, + "value": "nvgtmkfl" + } + } + } + ] + } + } + }, + "destinationSettings": { + "$id": "6452", + "kind": "model", + "type": { + "$ref": "1349" + }, + "value": { + "$id": "6453", + "endpointRef": { + "$id": "6454", + "kind": "string", + "type": { + "$ref": "1351" + }, + "value": "kybkchnzimerguekuvqlqiqdvvrt" + }, + "dataDestination": { + "$id": "6455", + "kind": "string", + "type": { + "$ref": "1355" + }, + "value": "cbrh" + } + } + } + } + } + ] + }, + "provisioningState": { + "$id": "6456", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Succeeded" + } + } + }, + "extendedLocation": { + "$id": "6457", + "kind": "model", + "type": { + "$ref": "510" + }, + "value": { + "$id": "6458", + "name": { + "$id": "6459", + "kind": "string", + "type": { + "$ref": "512" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "6460", + "kind": "string", + "type": { + "$ref": "44" + }, + "value": "CustomLocation" + } + } + }, + "id": { + "$id": "6461", + "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": "6462", + "kind": "string", + "type": { + "$ref": "424" + }, + "value": "jxhcpwgfkxqasbexkookvxk" + }, + "type": { + "$id": "6463", + "kind": "string", + "type": { + "$ref": "428" + }, + "value": "zkuozvgjseokfchkscoswthzjdry" + }, + "systemData": { + "$id": "6464", + "kind": "model", + "type": { + "$ref": "433" + }, + "value": { + "$id": "6465", + "createdBy": { + "$id": "6466", + "kind": "string", + "type": { + "$ref": "435" + }, + "value": "ssvaslsmudloholronopqyxjcu" + }, + "createdByType": { + "$id": "6467", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "createdAt": { + "$id": "6468", + "kind": "string", + "type": { + "$ref": "442" + }, + "value": "2024-08-09T18:13:29.389Z" + }, + "lastModifiedBy": { + "$id": "6469", + "kind": "string", + "type": { + "$ref": "447" + }, + "value": "gnicpuszwd" + }, + "lastModifiedByType": { + "$id": "6470", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "6471", + "kind": "string", + "type": { + "$ref": "454" + }, + "value": "2024-08-09T18:13:29.389Z" + } + } + } + } + } + } + ] + } + ] + }, + { + "$id": "6472", + "name": "createOrUpdate", + "resourceName": "DataflowResource", + "doc": "Create a DataflowResource", + "accessibility": "public", + "parameters": [ + { + "$id": "6473", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "6474", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "6475", + "type": { + "$id": "6476", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-04-01" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "6477", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "6478", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "6479", + "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": "6480", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "6481", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "6482", + "name": "instanceName", + "nameInRequest": "instanceName", + "doc": "Name of instance.", + "type": { + "$id": "6483", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "6484", + "name": "dataflowProfileName", + "nameInRequest": "dataflowProfileName", + "doc": "Name of Instance dataflowProfile resource", + "type": { + "$id": "6485", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "6486", + "name": "dataflowName", + "nameInRequest": "dataflowName", + "doc": "Name of Instance dataflowProfile dataflow resource", + "type": { + "$id": "6487", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "6488", + "name": "contentType", + "nameInRequest": "Content-Type", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$id": "6489", + "kind": "constant", + "valueType": { + "$id": "6490", + "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": "6491", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "6492", + "kind": "constant", + "valueType": { + "$id": "6493", + "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": "6494", + "name": "resource", + "nameInRequest": "resource", + "doc": "Resource create parameters.", + "type": { + "$ref": "1224" + }, + "location": "Body", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "6495", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "1224" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + }, + { + "$id": "6496", + "statusCodes": [ + 201 + ], + "bodyType": { + "$ref": "1224" + }, + "headers": [ + { + "$id": "6497", + "name": "azureAsyncOperation", + "nameInResponse": "Azure-AsyncOperation", + "doc": "A link to the status monitor", + "type": { + "$id": "6498", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + { + "$id": "6499", + "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": "6500", + "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": "6501", + "finalStateVia": 0, + "finalResponse": { + "$id": "6502", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "1224" + } + } + }, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.IoTOperations.Dataflow.createOrUpdate", + "decorators": [], + "examples": [ + { + "$id": "6503", + "kind": "http", + "name": "Dataflow_CreateOrUpdate_ComplexContextualization", + "description": "Dataflow_CreateOrUpdate_ComplexContextualization", + "filePath": "2025-04-01/Dataflow_CreateOrUpdate_ComplexContextualization.json", + "parameters": [ + { + "$id": "6504", + "parameter": { + "$ref": "6473" + }, + "value": { + "$id": "6505", + "kind": "string", + "type": { + "$ref": "6474" + }, + "value": "2025-04-01" + } + }, + { + "$id": "6506", + "parameter": { + "$ref": "6477" + }, + "value": { + "$id": "6507", + "kind": "string", + "type": { + "$ref": "6478" + }, + "value": "F8C729F9-DF9C-4743-848F-96EE433D8E53" + } + }, + { + "$id": "6508", + "parameter": { + "$ref": "6480" + }, + "value": { + "$id": "6509", + "kind": "string", + "type": { + "$ref": "6481" + }, + "value": "rgiotoperations" + } + }, + { + "$id": "6510", + "parameter": { + "$ref": "6482" + }, + "value": { + "$id": "6511", + "kind": "string", + "type": { + "$ref": "6483" + }, + "value": "resource-name123" + } + }, + { + "$id": "6512", + "parameter": { + "$ref": "6484" + }, + "value": { + "$id": "6513", + "kind": "string", + "type": { + "$ref": "6485" + }, + "value": "resource-name123" + } + }, + { + "$id": "6514", + "parameter": { + "$ref": "6486" + }, + "value": { + "$id": "6515", + "kind": "string", + "type": { + "$ref": "6487" + }, + "value": "aio-to-adx-contexualized" + } + }, + { + "$id": "6516", + "parameter": { + "$ref": "6494" + }, + "value": { + "$id": "6517", + "kind": "model", + "type": { + "$ref": "1224" + }, + "value": { + "$id": "6518", + "properties": { + "$id": "6519", + "kind": "model", + "type": { + "$ref": "1226" + }, + "value": { + "$id": "6520", + "mode": { + "$id": "6521", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Enabled" + }, + "operations": { + "$id": "6522", + "kind": "array", + "type": { + "$ref": "1231" + }, + "value": [ + { + "$id": "6523", + "kind": "model", + "type": { + "$ref": "1232" + }, + "value": { + "$id": "6524", + "operationType": { + "$id": "6525", + "kind": "string", + "type": { + "$ref": "182" + }, + "value": "Source" + }, + "name": { + "$id": "6526", + "kind": "string", + "type": { + "$ref": "1237" + }, + "value": "source1" + }, + "sourceSettings": { + "$id": "6527", + "kind": "model", + "type": { + "$ref": "1241" + }, + "value": { + "$id": "6528", + "endpointRef": { + "$id": "6529", + "kind": "string", + "type": { + "$ref": "1243" + }, + "value": "aio-builtin-broker-endpoint" + }, + "dataSources": { + "$id": "6530", + "kind": "array", + "type": { + "$ref": "1258" + }, + "value": [ + { + "$id": "6531", + "kind": "string", + "type": { + "$ref": "1259" + }, + "value": "azure-iot-operations/data/thermostat" + } + ] + } + } + } + } + }, + { + "$id": "6532", + "kind": "model", + "type": { + "$ref": "1232" + }, + "value": { + "$id": "6533", + "operationType": { + "$id": "6534", + "kind": "string", + "type": { + "$ref": "182" + }, + "value": "BuiltInTransformation" + }, + "name": { + "$id": "6535", + "kind": "string", + "type": { + "$ref": "1237" + }, + "value": "transformation1" + }, + "builtInTransformationSettings": { + "$id": "6536", + "kind": "model", + "type": { + "$ref": "1266" + }, + "value": { + "$id": "6537", + "map": { + "$id": "6538", + "kind": "array", + "type": { + "$ref": "1322" + }, + "value": [ + { + "$id": "6539", + "kind": "model", + "type": { + "$ref": "1323" + }, + "value": { + "$id": "6540", + "inputs": { + "$id": "6541", + "kind": "array", + "type": { + "$ref": "1332" + }, + "value": [ + { + "$id": "6542", + "kind": "string", + "type": { + "$ref": "1333" + }, + "value": "*" + } + ] + }, + "output": { + "$id": "6543", + "kind": "string", + "type": { + "$ref": "1341" + }, + "value": "*" + } + } + }, + { + "$id": "6544", + "kind": "model", + "type": { + "$ref": "1323" + }, + "value": { + "$id": "6545", + "inputs": { + "$id": "6546", + "kind": "array", + "type": { + "$ref": "1332" + }, + "value": [ + { + "$id": "6547", + "kind": "string", + "type": { + "$ref": "1333" + }, + "value": "$context(quality).*" + } + ] + }, + "output": { + "$id": "6548", + "kind": "string", + "type": { + "$ref": "1341" + }, + "value": "enriched.*" + } + } + } + ] + }, + "datasets": { + "$id": "6549", + "kind": "array", + "type": { + "$ref": "1275" + }, + "value": [ + { + "$id": "6550", + "kind": "model", + "type": { + "$ref": "1276" + }, + "value": { + "$id": "6551", + "key": { + "$id": "6552", + "kind": "string", + "type": { + "$ref": "1278" + }, + "value": "quality" + }, + "inputs": { + "$id": "6553", + "kind": "array", + "type": { + "$ref": "1290" + }, + "value": [ + { + "$id": "6554", + "kind": "string", + "type": { + "$ref": "1291" + }, + "value": "$source.country" + }, + { + "$id": "6555", + "kind": "string", + "type": { + "$ref": "1291" + }, + "value": "$context.country" + } + ] + }, + "expression": { + "$id": "6556", + "kind": "string", + "type": { + "$ref": "1295" + }, + "value": "$1 == $2" + } + } + } + ] + } + } + } + } + }, + { + "$id": "6557", + "kind": "model", + "type": { + "$ref": "1232" + }, + "value": { + "$id": "6558", + "operationType": { + "$id": "6559", + "kind": "string", + "type": { + "$ref": "182" + }, + "value": "Destination" + }, + "name": { + "$id": "6560", + "kind": "string", + "type": { + "$ref": "1237" + }, + "value": "destination1" + }, + "destinationSettings": { + "$id": "6561", + "kind": "model", + "type": { + "$ref": "1349" + }, + "value": { + "$id": "6562", + "endpointRef": { + "$id": "6563", + "kind": "string", + "type": { + "$ref": "1351" + }, + "value": "adx-endpoint" + }, + "dataDestination": { + "$id": "6564", + "kind": "string", + "type": { + "$ref": "1355" + }, + "value": "mytable" + } + } + } + } + } + ] + } + } + }, + "extendedLocation": { + "$id": "6565", + "kind": "model", + "type": { + "$ref": "510" + }, + "value": { + "$id": "6566", + "name": { + "$id": "6567", + "kind": "string", + "type": { + "$ref": "512" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "6568", + "kind": "string", + "type": { + "$ref": "44" + }, + "value": "CustomLocation" + } + } + } + } + } + } + ], + "responses": [ + { + "$id": "6569", + "response": { + "$ref": "6495" + }, + "statusCode": 200, + "bodyValue": { + "$id": "6570", + "kind": "model", + "type": { + "$ref": "1224" + }, + "value": { + "$id": "6571", + "properties": { + "$id": "6572", + "kind": "model", + "type": { + "$ref": "1226" + }, + "value": { + "$id": "6573", + "mode": { + "$id": "6574", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Enabled" + }, + "operations": { + "$id": "6575", + "kind": "array", + "type": { + "$ref": "1231" + }, + "value": [ + { + "$id": "6576", + "kind": "model", + "type": { + "$ref": "1232" + }, + "value": { + "$id": "6577", + "operationType": { + "$id": "6578", + "kind": "string", + "type": { + "$ref": "182" + }, + "value": "Source" + }, + "name": { + "$id": "6579", + "kind": "string", + "type": { + "$ref": "1237" + }, + "value": "source1" + }, + "sourceSettings": { + "$id": "6580", + "kind": "model", + "type": { + "$ref": "1241" + }, + "value": { + "$id": "6581", + "endpointRef": { + "$id": "6582", + "kind": "string", + "type": { + "$ref": "1243" + }, + "value": "aio-builtin-broker-endpoint" + }, + "dataSources": { + "$id": "6583", + "kind": "array", + "type": { + "$ref": "1258" + }, + "value": [ + { + "$id": "6584", + "kind": "string", + "type": { + "$ref": "1259" + }, + "value": "azure-iot-operations/data/thermostat" + } + ] + } + } + } + } + }, + { + "$id": "6585", + "kind": "model", + "type": { + "$ref": "1232" + }, + "value": { + "$id": "6586", + "operationType": { + "$id": "6587", + "kind": "string", + "type": { + "$ref": "182" + }, + "value": "BuiltInTransformation" + }, + "name": { + "$id": "6588", + "kind": "string", + "type": { + "$ref": "1237" + }, + "value": "transformation1" + }, + "builtInTransformationSettings": { + "$id": "6589", + "kind": "model", + "type": { + "$ref": "1266" + }, + "value": { + "$id": "6590", + "map": { + "$id": "6591", + "kind": "array", + "type": { + "$ref": "1322" + }, + "value": [ + { + "$id": "6592", + "kind": "model", + "type": { + "$ref": "1323" + }, + "value": { + "$id": "6593", + "inputs": { + "$id": "6594", + "kind": "array", + "type": { + "$ref": "1332" + }, + "value": [ + { + "$id": "6595", + "kind": "string", + "type": { + "$ref": "1333" + }, + "value": "*" + } + ] + }, + "output": { + "$id": "6596", + "kind": "string", + "type": { + "$ref": "1341" + }, + "value": "*" + } + } + }, + { + "$id": "6597", + "kind": "model", + "type": { + "$ref": "1323" + }, + "value": { + "$id": "6598", + "inputs": { + "$id": "6599", + "kind": "array", + "type": { + "$ref": "1332" + }, + "value": [ + { + "$id": "6600", + "kind": "string", + "type": { + "$ref": "1333" + }, + "value": "$context(quality).*" + } + ] + }, + "output": { + "$id": "6601", + "kind": "string", + "type": { + "$ref": "1341" + }, + "value": "enriched.*" + } + } + } + ] + }, + "datasets": { + "$id": "6602", + "kind": "array", + "type": { + "$ref": "1275" + }, + "value": [ + { + "$id": "6603", + "kind": "model", + "type": { + "$ref": "1276" + }, + "value": { + "$id": "6604", + "key": { + "$id": "6605", + "kind": "string", + "type": { + "$ref": "1278" + }, + "value": "quality" + }, + "inputs": { + "$id": "6606", + "kind": "array", + "type": { + "$ref": "1290" + }, + "value": [ + { + "$id": "6607", + "kind": "string", + "type": { + "$ref": "1291" + }, + "value": "$source.country" + }, + { + "$id": "6608", + "kind": "string", + "type": { + "$ref": "1291" + }, + "value": "$context.country" + } + ] + }, + "expression": { + "$id": "6609", + "kind": "string", + "type": { + "$ref": "1295" + }, + "value": "$1 == $2" + } + } + } + ] + } + } + } + } + }, + { + "$id": "6610", + "kind": "model", + "type": { + "$ref": "1232" + }, + "value": { + "$id": "6611", + "operationType": { + "$id": "6612", + "kind": "string", + "type": { + "$ref": "182" + }, + "value": "Destination" + }, + "name": { + "$id": "6613", + "kind": "string", + "type": { + "$ref": "1237" + }, + "value": "destination1" + }, + "destinationSettings": { + "$id": "6614", + "kind": "model", + "type": { + "$ref": "1349" + }, + "value": { + "$id": "6615", + "endpointRef": { + "$id": "6616", + "kind": "string", + "type": { + "$ref": "1351" + }, + "value": "adx-endpoint" + }, + "dataDestination": { + "$id": "6617", + "kind": "string", + "type": { + "$ref": "1355" + }, + "value": "mytable" + } + } + } + } + } + ] + }, + "provisioningState": { + "$id": "6618", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Succeeded" + } + } + }, + "extendedLocation": { + "$id": "6619", + "kind": "model", + "type": { + "$ref": "510" + }, + "value": { + "$id": "6620", + "name": { + "$id": "6621", + "kind": "string", + "type": { + "$ref": "512" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "6622", + "kind": "string", + "type": { + "$ref": "44" + }, + "value": "CustomLocation" + } + } + }, + "id": { + "$id": "6623", + "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": "6624", + "kind": "string", + "type": { + "$ref": "424" + }, + "value": "jxhcpwgfkxqasbexkookvxk" + }, + "type": { + "$id": "6625", + "kind": "string", + "type": { + "$ref": "428" + }, + "value": "zkuozvgjseokfchkscoswthzjdry" + }, + "systemData": { + "$id": "6626", + "kind": "model", + "type": { + "$ref": "433" + }, + "value": { + "$id": "6627", + "createdBy": { + "$id": "6628", + "kind": "string", + "type": { + "$ref": "435" + }, + "value": "ssvaslsmudloholronopqyxjcu" + }, + "createdByType": { + "$id": "6629", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "createdAt": { + "$id": "6630", + "kind": "string", + "type": { + "$ref": "442" + }, + "value": "2024-08-09T18:13:29.389Z" + }, + "lastModifiedBy": { + "$id": "6631", + "kind": "string", + "type": { + "$ref": "447" + }, + "value": "gnicpuszwd" + }, + "lastModifiedByType": { + "$id": "6632", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "6633", + "kind": "string", + "type": { + "$ref": "454" + }, + "value": "2024-08-09T18:13:29.389Z" + } + } + } + } + } + }, + { + "$id": "6634", + "response": { + "$ref": "6496" + }, + "statusCode": 201, + "bodyValue": { + "$id": "6635", + "kind": "model", + "type": { + "$ref": "1224" + }, + "value": { + "$id": "6636", + "properties": { + "$id": "6637", + "kind": "model", + "type": { + "$ref": "1226" + }, + "value": { + "$id": "6638", + "mode": { + "$id": "6639", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Enabled" + }, + "operations": { + "$id": "6640", + "kind": "array", + "type": { + "$ref": "1231" + }, + "value": [ + { + "$id": "6641", + "kind": "model", + "type": { + "$ref": "1232" + }, + "value": { + "$id": "6642", + "operationType": { + "$id": "6643", + "kind": "string", + "type": { + "$ref": "182" + }, + "value": "Source" + }, + "name": { + "$id": "6644", + "kind": "string", + "type": { + "$ref": "1237" + }, + "value": "source1" + }, + "sourceSettings": { + "$id": "6645", + "kind": "model", + "type": { + "$ref": "1241" + }, + "value": { + "$id": "6646", + "endpointRef": { + "$id": "6647", + "kind": "string", + "type": { + "$ref": "1243" + }, + "value": "aio-builtin-broker-endpoint" + }, + "dataSources": { + "$id": "6648", + "kind": "array", + "type": { + "$ref": "1258" + }, + "value": [ + { + "$id": "6649", + "kind": "string", + "type": { + "$ref": "1259" + }, + "value": "azure-iot-operations/data/thermostat" + } + ] + } + } + } + } + }, + { + "$id": "6650", + "kind": "model", + "type": { + "$ref": "1232" + }, + "value": { + "$id": "6651", + "operationType": { + "$id": "6652", + "kind": "string", + "type": { + "$ref": "182" + }, + "value": "BuiltInTransformation" + }, + "name": { + "$id": "6653", + "kind": "string", + "type": { + "$ref": "1237" + }, + "value": "transformation1" + }, + "builtInTransformationSettings": { + "$id": "6654", + "kind": "model", + "type": { + "$ref": "1266" + }, + "value": { + "$id": "6655", + "map": { + "$id": "6656", + "kind": "array", + "type": { + "$ref": "1322" + }, + "value": [ + { + "$id": "6657", + "kind": "model", + "type": { + "$ref": "1323" + }, + "value": { + "$id": "6658", + "inputs": { + "$id": "6659", + "kind": "array", + "type": { + "$ref": "1332" + }, + "value": [ + { + "$id": "6660", + "kind": "string", + "type": { + "$ref": "1333" + }, + "value": "*" + } + ] + }, + "output": { + "$id": "6661", + "kind": "string", + "type": { + "$ref": "1341" + }, + "value": "*" + } + } + }, + { + "$id": "6662", + "kind": "model", + "type": { + "$ref": "1323" + }, + "value": { + "$id": "6663", + "inputs": { + "$id": "6664", + "kind": "array", + "type": { + "$ref": "1332" + }, + "value": [ + { + "$id": "6665", + "kind": "string", + "type": { + "$ref": "1333" + }, + "value": "$context(quality).*" + } + ] + }, + "output": { + "$id": "6666", + "kind": "string", + "type": { + "$ref": "1341" + }, + "value": "enriched.*" + } + } + } + ] + }, + "datasets": { + "$id": "6667", + "kind": "array", + "type": { + "$ref": "1275" + }, + "value": [ + { + "$id": "6668", + "kind": "model", + "type": { + "$ref": "1276" + }, + "value": { + "$id": "6669", + "key": { + "$id": "6670", + "kind": "string", + "type": { + "$ref": "1278" + }, + "value": "quality" + }, + "inputs": { + "$id": "6671", + "kind": "array", + "type": { + "$ref": "1290" + }, + "value": [ + { + "$id": "6672", + "kind": "string", + "type": { + "$ref": "1291" + }, + "value": "$source.country" + }, + { + "$id": "6673", + "kind": "string", + "type": { + "$ref": "1291" + }, + "value": "$context.country" + } + ] + }, + "expression": { + "$id": "6674", + "kind": "string", + "type": { + "$ref": "1295" + }, + "value": "$1 == $2" + } + } + } + ] + } + } + } + } + }, + { + "$id": "6675", + "kind": "model", + "type": { + "$ref": "1232" + }, + "value": { + "$id": "6676", + "operationType": { + "$id": "6677", + "kind": "string", + "type": { + "$ref": "182" + }, + "value": "Destination" + }, + "name": { + "$id": "6678", + "kind": "string", + "type": { + "$ref": "1237" + }, + "value": "destination1" + }, + "destinationSettings": { + "$id": "6679", + "kind": "model", + "type": { + "$ref": "1349" + }, + "value": { + "$id": "6680", + "endpointRef": { + "$id": "6681", + "kind": "string", + "type": { + "$ref": "1351" + }, + "value": "adx-endpoint" + }, + "dataDestination": { + "$id": "6682", + "kind": "string", + "type": { + "$ref": "1355" + }, + "value": "mytable" + } + } + } + } + } + ] + }, + "provisioningState": { + "$id": "6683", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Succeeded" + } + } + }, + "extendedLocation": { + "$id": "6684", + "kind": "model", + "type": { + "$ref": "510" + }, + "value": { + "$id": "6685", + "name": { + "$id": "6686", + "kind": "string", + "type": { + "$ref": "512" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "6687", + "kind": "string", + "type": { + "$ref": "44" + }, + "value": "CustomLocation" + } + } + }, + "id": { + "$id": "6688", + "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": "6689", + "kind": "string", + "type": { + "$ref": "424" + }, + "value": "jxhcpwgfkxqasbexkookvxk" + }, + "type": { + "$id": "6690", + "kind": "string", + "type": { + "$ref": "428" + }, + "value": "zkuozvgjseokfchkscoswthzjdry" + }, + "systemData": { + "$id": "6691", + "kind": "model", + "type": { + "$ref": "433" + }, + "value": { + "$id": "6692", + "createdBy": { + "$id": "6693", + "kind": "string", + "type": { + "$ref": "435" + }, + "value": "ssvaslsmudloholronopqyxjcu" + }, + "createdByType": { + "$id": "6694", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "createdAt": { + "$id": "6695", + "kind": "string", + "type": { + "$ref": "442" + }, + "value": "2024-08-09T18:13:29.389Z" + }, + "lastModifiedBy": { + "$id": "6696", + "kind": "string", + "type": { + "$ref": "447" + }, + "value": "gnicpuszwd" + }, + "lastModifiedByType": { + "$id": "6697", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "6698", + "kind": "string", + "type": { + "$ref": "454" + }, + "value": "2024-08-09T18:13:29.389Z" + } + } + } + } + } + } + ] + }, + { + "$id": "6699", + "kind": "http", + "name": "Dataflow_CreateOrUpdate_ComplexEventHub", + "description": "Dataflow_CreateOrUpdate_ComplexEventHub", + "filePath": "2025-04-01/Dataflow_CreateOrUpdate_ComplexEventHub.json", + "parameters": [ + { + "$id": "6700", + "parameter": { + "$ref": "6473" + }, + "value": { + "$id": "6701", + "kind": "string", + "type": { + "$ref": "6474" + }, + "value": "2025-04-01" + } + }, + { + "$id": "6702", + "parameter": { + "$ref": "6477" + }, + "value": { + "$id": "6703", + "kind": "string", + "type": { + "$ref": "6478" + }, + "value": "F8C729F9-DF9C-4743-848F-96EE433D8E53" + } + }, + { + "$id": "6704", + "parameter": { + "$ref": "6480" + }, + "value": { + "$id": "6705", + "kind": "string", + "type": { + "$ref": "6481" + }, + "value": "rgiotoperations" + } + }, + { + "$id": "6706", + "parameter": { + "$ref": "6482" + }, + "value": { + "$id": "6707", + "kind": "string", + "type": { + "$ref": "6483" + }, + "value": "resource-name123" + } + }, + { + "$id": "6708", + "parameter": { + "$ref": "6484" + }, + "value": { + "$id": "6709", + "kind": "string", + "type": { + "$ref": "6485" + }, + "value": "resource-name123" + } + }, + { + "$id": "6710", + "parameter": { + "$ref": "6486" + }, + "value": { + "$id": "6711", + "kind": "string", + "type": { + "$ref": "6487" + }, + "value": "aio-to-event-hub-transformed" + } + }, + { + "$id": "6712", + "parameter": { + "$ref": "6494" + }, + "value": { + "$id": "6713", + "kind": "model", + "type": { + "$ref": "1224" + }, + "value": { + "$id": "6714", + "properties": { + "$id": "6715", + "kind": "model", + "type": { + "$ref": "1226" + }, + "value": { + "$id": "6716", + "mode": { + "$id": "6717", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Enabled" + }, + "operations": { + "$id": "6718", + "kind": "array", + "type": { + "$ref": "1231" + }, + "value": [ + { + "$id": "6719", + "kind": "model", + "type": { + "$ref": "1232" + }, + "value": { + "$id": "6720", + "operationType": { + "$id": "6721", + "kind": "string", + "type": { + "$ref": "182" + }, + "value": "Source" + }, + "name": { + "$id": "6722", + "kind": "string", + "type": { + "$ref": "1237" + }, + "value": "source1" + }, + "sourceSettings": { + "$id": "6723", + "kind": "model", + "type": { + "$ref": "1241" + }, + "value": { + "$id": "6724", + "endpointRef": { + "$id": "6725", + "kind": "string", + "type": { + "$ref": "1243" + }, + "value": "aio-builtin-broker-endpoint" + }, + "dataSources": { + "$id": "6726", + "kind": "array", + "type": { + "$ref": "1258" + }, + "value": [ + { + "$id": "6727", + "kind": "string", + "type": { + "$ref": "1259" + }, + "value": "azure-iot-operations/data/thermostat" + } + ] + } + } + } + } + }, + { + "$id": "6728", + "kind": "model", + "type": { + "$ref": "1232" + }, + "value": { + "$id": "6729", + "operationType": { + "$id": "6730", + "kind": "string", + "type": { + "$ref": "182" + }, + "value": "BuiltInTransformation" + }, + "builtInTransformationSettings": { + "$id": "6731", + "kind": "model", + "type": { + "$ref": "1266" + }, + "value": { + "$id": "6732", + "filter": { + "$id": "6733", + "kind": "array", + "type": { + "$ref": "1301" + }, + "value": [ + { + "$id": "6734", + "kind": "model", + "type": { + "$ref": "1302" + }, + "value": { + "$id": "6735", + "inputs": { + "$id": "6736", + "kind": "array", + "type": { + "$ref": "1311" + }, + "value": [ + { + "$id": "6737", + "kind": "string", + "type": { + "$ref": "1312" + }, + "value": "temperature.Value" + }, + { + "$id": "6738", + "kind": "string", + "type": { + "$ref": "1312" + }, + "value": "\"Tag 10\".Value" + } + ] + }, + "expression": { + "$id": "6739", + "kind": "string", + "type": { + "$ref": "1316" + }, + "value": "$1 > 9000 && $2 >= 8000" + } + } + } + ] + }, + "map": { + "$id": "6740", + "kind": "array", + "type": { + "$ref": "1322" + }, + "value": [ + { + "$id": "6741", + "kind": "model", + "type": { + "$ref": "1323" + }, + "value": { + "$id": "6742", + "inputs": { + "$id": "6743", + "kind": "array", + "type": { + "$ref": "1332" + }, + "value": [ + { + "$id": "6744", + "kind": "string", + "type": { + "$ref": "1333" + }, + "value": "*" + } + ] + }, + "output": { + "$id": "6745", + "kind": "string", + "type": { + "$ref": "1341" + }, + "value": "*" + } + } + }, + { + "$id": "6746", + "kind": "model", + "type": { + "$ref": "1323" + }, + "value": { + "$id": "6747", + "inputs": { + "$id": "6748", + "kind": "array", + "type": { + "$ref": "1332" + }, + "value": [ + { + "$id": "6749", + "kind": "string", + "type": { + "$ref": "1333" + }, + "value": "temperature.Value" + }, + { + "$id": "6750", + "kind": "string", + "type": { + "$ref": "1333" + }, + "value": "\"Tag 10\".Value" + } + ] + }, + "expression": { + "$id": "6751", + "kind": "string", + "type": { + "$ref": "1337" + }, + "value": "($1+$2)/2" + }, + "output": { + "$id": "6752", + "kind": "string", + "type": { + "$ref": "1341" + }, + "value": "AvgTemp.Value" + } + } + }, + { + "$id": "6753", + "kind": "model", + "type": { + "$ref": "1323" + }, + "value": { + "$id": "6754", + "inputs": { + "$id": "6755", + "kind": "array", + "type": { + "$ref": "1332" + }, + "value": [] + }, + "expression": { + "$id": "6756", + "kind": "string", + "type": { + "$ref": "1337" + }, + "value": "true" + }, + "output": { + "$id": "6757", + "kind": "string", + "type": { + "$ref": "1341" + }, + "value": "dataflow-processed" + } + } + }, + { + "$id": "6758", + "kind": "model", + "type": { + "$ref": "1323" + }, + "value": { + "$id": "6759", + "inputs": { + "$id": "6760", + "kind": "array", + "type": { + "$ref": "1332" + }, + "value": [ + { + "$id": "6761", + "kind": "string", + "type": { + "$ref": "1333" + }, + "value": "temperature.SourceTimestamp" + } + ] + }, + "expression": { + "$id": "6762", + "kind": "string", + "type": { + "$ref": "1337" + }, + "value": "" + }, + "output": { + "$id": "6763", + "kind": "string", + "type": { + "$ref": "1341" + }, + "value": "" + } + } + }, + { + "$id": "6764", + "kind": "model", + "type": { + "$ref": "1323" + }, + "value": { + "$id": "6765", + "inputs": { + "$id": "6766", + "kind": "array", + "type": { + "$ref": "1332" + }, + "value": [ + { + "$id": "6767", + "kind": "string", + "type": { + "$ref": "1333" + }, + "value": "\"Tag 10\"" + } + ] + }, + "expression": { + "$id": "6768", + "kind": "string", + "type": { + "$ref": "1337" + }, + "value": "" + }, + "output": { + "$id": "6769", + "kind": "string", + "type": { + "$ref": "1341" + }, + "value": "pressure" + } + } + }, + { + "$id": "6770", + "kind": "model", + "type": { + "$ref": "1323" + }, + "value": { + "$id": "6771", + "inputs": { + "$id": "6772", + "kind": "array", + "type": { + "$ref": "1332" + }, + "value": [ + { + "$id": "6773", + "kind": "string", + "type": { + "$ref": "1333" + }, + "value": "temperature.Value" + } + ] + }, + "expression": { + "$id": "6774", + "kind": "string", + "type": { + "$ref": "1337" + }, + "value": "cToF($1)" + }, + "output": { + "$id": "6775", + "kind": "string", + "type": { + "$ref": "1341" + }, + "value": "temperatureF.Value" + } + } + }, + { + "$id": "6776", + "kind": "model", + "type": { + "$ref": "1323" + }, + "value": { + "$id": "6777", + "inputs": { + "$id": "6778", + "kind": "array", + "type": { + "$ref": "1332" + }, + "value": [ + { + "$id": "6779", + "kind": "string", + "type": { + "$ref": "1333" + }, + "value": "\"Tag 10\".Value" + } + ] + }, + "expression": { + "$id": "6780", + "kind": "string", + "type": { + "$ref": "1337" + }, + "value": "scale ($1,0,10,0,100)" + }, + "output": { + "$id": "6781", + "kind": "string", + "type": { + "$ref": "1341" + }, + "value": "\"Scale Tag 10\".Value" + } + } + } + ] + } + } + } + } + }, + { + "$id": "6782", + "kind": "model", + "type": { + "$ref": "1232" + }, + "value": { + "$id": "6783", + "operationType": { + "$id": "6784", + "kind": "string", + "type": { + "$ref": "182" + }, + "value": "Destination" + }, + "name": { + "$id": "6785", + "kind": "string", + "type": { + "$ref": "1237" + }, + "value": "destination1" + }, + "destinationSettings": { + "$id": "6786", + "kind": "model", + "type": { + "$ref": "1349" + }, + "value": { + "$id": "6787", + "endpointRef": { + "$id": "6788", + "kind": "string", + "type": { + "$ref": "1351" + }, + "value": "event-hub-endpoint" + }, + "dataDestination": { + "$id": "6789", + "kind": "string", + "type": { + "$ref": "1355" + }, + "value": "myuniqueeventhub" + } + } + } + } + } + ] + } + } + }, + "extendedLocation": { + "$id": "6790", + "kind": "model", + "type": { + "$ref": "510" + }, + "value": { + "$id": "6791", + "name": { + "$id": "6792", + "kind": "string", + "type": { + "$ref": "512" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "6793", + "kind": "string", + "type": { + "$ref": "44" + }, + "value": "CustomLocation" + } + } + } + } + } + } + ], + "responses": [ + { + "$id": "6794", + "response": { + "$ref": "6495" + }, + "statusCode": 200, + "bodyValue": { + "$id": "6795", + "kind": "model", + "type": { + "$ref": "1224" + }, + "value": { + "$id": "6796", + "properties": { + "$id": "6797", + "kind": "model", + "type": { + "$ref": "1226" + }, + "value": { + "$id": "6798", + "mode": { + "$id": "6799", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Enabled" + }, + "operations": { + "$id": "6800", + "kind": "array", + "type": { + "$ref": "1231" + }, + "value": [ + { + "$id": "6801", + "kind": "model", + "type": { + "$ref": "1232" + }, + "value": { + "$id": "6802", + "operationType": { + "$id": "6803", + "kind": "string", + "type": { + "$ref": "182" + }, + "value": "Source" + }, + "name": { + "$id": "6804", + "kind": "string", + "type": { + "$ref": "1237" + }, + "value": "source1" + }, + "sourceSettings": { + "$id": "6805", + "kind": "model", + "type": { + "$ref": "1241" + }, + "value": { + "$id": "6806", + "endpointRef": { + "$id": "6807", + "kind": "string", + "type": { + "$ref": "1243" + }, + "value": "aio-builtin-broker-endpoint" + }, + "dataSources": { + "$id": "6808", + "kind": "array", + "type": { + "$ref": "1258" + }, + "value": [ + { + "$id": "6809", + "kind": "string", + "type": { + "$ref": "1259" + }, + "value": "azure-iot-operations/data/thermostat" + } + ] + } + } + } + } + }, + { + "$id": "6810", + "kind": "model", + "type": { + "$ref": "1232" + }, + "value": { + "$id": "6811", + "operationType": { + "$id": "6812", + "kind": "string", + "type": { + "$ref": "182" + }, + "value": "BuiltInTransformation" + }, + "name": { + "$id": "6813", + "kind": "string", + "type": { + "$ref": "1237" + }, + "value": "transformation1" + }, + "builtInTransformationSettings": { + "$id": "6814", + "kind": "model", + "type": { + "$ref": "1266" + }, + "value": { + "$id": "6815", + "map": { + "$id": "6816", + "kind": "array", + "type": { + "$ref": "1322" + }, + "value": [ + { + "$id": "6817", + "kind": "model", + "type": { + "$ref": "1323" + }, + "value": { + "$id": "6818", + "inputs": { + "$id": "6819", + "kind": "array", + "type": { + "$ref": "1332" + }, + "value": [ + { + "$id": "6820", + "kind": "string", + "type": { + "$ref": "1333" + }, + "value": "*" + } + ] + }, + "output": { + "$id": "6821", + "kind": "string", + "type": { + "$ref": "1341" + }, + "value": "*" + } + } + }, + { + "$id": "6822", + "kind": "model", + "type": { + "$ref": "1323" + }, + "value": { + "$id": "6823", + "inputs": { + "$id": "6824", + "kind": "array", + "type": { + "$ref": "1332" + }, + "value": [ + { + "$id": "6825", + "kind": "string", + "type": { + "$ref": "1333" + }, + "value": "$context(quality).*" + } + ] + }, + "output": { + "$id": "6826", + "kind": "string", + "type": { + "$ref": "1341" + }, + "value": "enriched.*" + } + } + } + ] + }, + "datasets": { + "$id": "6827", + "kind": "array", + "type": { + "$ref": "1275" + }, + "value": [ + { + "$id": "6828", + "kind": "model", + "type": { + "$ref": "1276" + }, + "value": { + "$id": "6829", + "key": { + "$id": "6830", + "kind": "string", + "type": { + "$ref": "1278" + }, + "value": "quality" + }, + "inputs": { + "$id": "6831", + "kind": "array", + "type": { + "$ref": "1290" + }, + "value": [ + { + "$id": "6832", + "kind": "string", + "type": { + "$ref": "1291" + }, + "value": "$source.country" + }, + { + "$id": "6833", + "kind": "string", + "type": { + "$ref": "1291" + }, + "value": "$context.country" + } + ] + }, + "expression": { + "$id": "6834", + "kind": "string", + "type": { + "$ref": "1295" + }, + "value": "$1 == $2" + } + } + } + ] + } + } + } + } + }, + { + "$id": "6835", + "kind": "model", + "type": { + "$ref": "1232" + }, + "value": { + "$id": "6836", + "operationType": { + "$id": "6837", + "kind": "string", + "type": { + "$ref": "182" + }, + "value": "Destination" + }, + "name": { + "$id": "6838", + "kind": "string", + "type": { + "$ref": "1237" + }, + "value": "destination1" + }, + "destinationSettings": { + "$id": "6839", + "kind": "model", + "type": { + "$ref": "1349" + }, + "value": { + "$id": "6840", + "endpointRef": { + "$id": "6841", + "kind": "string", + "type": { + "$ref": "1351" + }, + "value": "adx-endpoint" + }, + "dataDestination": { + "$id": "6842", + "kind": "string", + "type": { + "$ref": "1355" + }, + "value": "mytable" + } + } + } + } + } + ] + }, + "provisioningState": { + "$id": "6843", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Succeeded" + } + } + }, + "extendedLocation": { + "$id": "6844", + "kind": "model", + "type": { + "$ref": "510" + }, + "value": { + "$id": "6845", + "name": { + "$id": "6846", + "kind": "string", + "type": { + "$ref": "512" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "6847", + "kind": "string", + "type": { + "$ref": "44" + }, + "value": "CustomLocation" + } + } + }, + "id": { + "$id": "6848", + "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": "6849", + "kind": "string", + "type": { + "$ref": "424" + }, + "value": "jxhcpwgfkxqasbexkookvxk" + }, + "type": { + "$id": "6850", + "kind": "string", + "type": { + "$ref": "428" + }, + "value": "zkuozvgjseokfchkscoswthzjdry" + }, + "systemData": { + "$id": "6851", + "kind": "model", + "type": { + "$ref": "433" + }, + "value": { + "$id": "6852", + "createdBy": { + "$id": "6853", + "kind": "string", + "type": { + "$ref": "435" + }, + "value": "ssvaslsmudloholronopqyxjcu" + }, + "createdByType": { + "$id": "6854", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "createdAt": { + "$id": "6855", + "kind": "string", + "type": { + "$ref": "442" + }, + "value": "2024-08-09T18:13:29.389Z" + }, + "lastModifiedBy": { + "$id": "6856", + "kind": "string", + "type": { + "$ref": "447" + }, + "value": "gnicpuszwd" + }, + "lastModifiedByType": { + "$id": "6857", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "6858", + "kind": "string", + "type": { + "$ref": "454" + }, + "value": "2024-08-09T18:13:29.389Z" + } + } + } + } + } + }, + { + "$id": "6859", + "response": { + "$ref": "6496" + }, + "statusCode": 201, + "bodyValue": { + "$id": "6860", + "kind": "model", + "type": { + "$ref": "1224" + }, + "value": { + "$id": "6861", + "properties": { + "$id": "6862", + "kind": "model", + "type": { + "$ref": "1226" + }, + "value": { + "$id": "6863", + "mode": { + "$id": "6864", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Enabled" + }, + "operations": { + "$id": "6865", + "kind": "array", + "type": { + "$ref": "1231" + }, + "value": [ + { + "$id": "6866", + "kind": "model", + "type": { + "$ref": "1232" + }, + "value": { + "$id": "6867", + "operationType": { + "$id": "6868", + "kind": "string", + "type": { + "$ref": "182" + }, + "value": "Source" + }, + "name": { + "$id": "6869", + "kind": "string", + "type": { + "$ref": "1237" + }, + "value": "source1" + }, + "sourceSettings": { + "$id": "6870", + "kind": "model", + "type": { + "$ref": "1241" + }, + "value": { + "$id": "6871", + "endpointRef": { + "$id": "6872", + "kind": "string", + "type": { + "$ref": "1243" + }, + "value": "aio-builtin-broker-endpoint" + }, + "dataSources": { + "$id": "6873", + "kind": "array", + "type": { + "$ref": "1258" + }, + "value": [ + { + "$id": "6874", + "kind": "string", + "type": { + "$ref": "1259" + }, + "value": "azure-iot-operations/data/thermostat" + } + ] + } + } + } + } + }, + { + "$id": "6875", + "kind": "model", + "type": { + "$ref": "1232" + }, + "value": { + "$id": "6876", + "operationType": { + "$id": "6877", + "kind": "string", + "type": { + "$ref": "182" + }, + "value": "BuiltInTransformation" + }, + "name": { + "$id": "6878", + "kind": "string", + "type": { + "$ref": "1237" + }, + "value": "transformation1" + }, + "builtInTransformationSettings": { + "$id": "6879", + "kind": "model", + "type": { + "$ref": "1266" + }, + "value": { + "$id": "6880", + "map": { + "$id": "6881", + "kind": "array", + "type": { + "$ref": "1322" + }, + "value": [ + { + "$id": "6882", + "kind": "model", + "type": { + "$ref": "1323" + }, + "value": { + "$id": "6883", + "inputs": { + "$id": "6884", + "kind": "array", + "type": { + "$ref": "1332" + }, + "value": [ + { + "$id": "6885", + "kind": "string", + "type": { + "$ref": "1333" + }, + "value": "*" + } + ] + }, + "output": { + "$id": "6886", + "kind": "string", + "type": { + "$ref": "1341" + }, + "value": "*" + } + } + }, + { + "$id": "6887", + "kind": "model", + "type": { + "$ref": "1323" + }, + "value": { + "$id": "6888", + "inputs": { + "$id": "6889", + "kind": "array", + "type": { + "$ref": "1332" + }, + "value": [ + { + "$id": "6890", + "kind": "string", + "type": { + "$ref": "1333" + }, + "value": "$context(quality).*" + } + ] + }, + "output": { + "$id": "6891", + "kind": "string", + "type": { + "$ref": "1341" + }, + "value": "enriched.*" + } + } + } + ] + }, + "datasets": { + "$id": "6892", + "kind": "array", + "type": { + "$ref": "1275" + }, + "value": [ + { + "$id": "6893", + "kind": "model", + "type": { + "$ref": "1276" + }, + "value": { + "$id": "6894", + "key": { + "$id": "6895", + "kind": "string", + "type": { + "$ref": "1278" + }, + "value": "quality" + }, + "inputs": { + "$id": "6896", + "kind": "array", + "type": { + "$ref": "1290" + }, + "value": [ + { + "$id": "6897", + "kind": "string", + "type": { + "$ref": "1291" + }, + "value": "$source.country" + }, + { + "$id": "6898", + "kind": "string", + "type": { + "$ref": "1291" + }, + "value": "$context.country" + } + ] + }, + "expression": { + "$id": "6899", + "kind": "string", + "type": { + "$ref": "1295" + }, + "value": "$1 == $2" + } + } + } + ] + } + } + } + } + }, + { + "$id": "6900", + "kind": "model", + "type": { + "$ref": "1232" + }, + "value": { + "$id": "6901", + "operationType": { + "$id": "6902", + "kind": "string", + "type": { + "$ref": "182" + }, + "value": "Destination" + }, + "name": { + "$id": "6903", + "kind": "string", + "type": { + "$ref": "1237" + }, + "value": "destination1" + }, + "destinationSettings": { + "$id": "6904", + "kind": "model", + "type": { + "$ref": "1349" + }, + "value": { + "$id": "6905", + "endpointRef": { + "$id": "6906", + "kind": "string", + "type": { + "$ref": "1351" + }, + "value": "adx-endpoint" + }, + "dataDestination": { + "$id": "6907", + "kind": "string", + "type": { + "$ref": "1355" + }, + "value": "mytable" + } + } + } + } + } + ] + }, + "provisioningState": { + "$id": "6908", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Succeeded" + } + } + }, + "extendedLocation": { + "$id": "6909", + "kind": "model", + "type": { + "$ref": "510" + }, + "value": { + "$id": "6910", + "name": { + "$id": "6911", + "kind": "string", + "type": { + "$ref": "512" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "6912", + "kind": "string", + "type": { + "$ref": "44" + }, + "value": "CustomLocation" + } + } + }, + "id": { + "$id": "6913", + "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": "6914", + "kind": "string", + "type": { + "$ref": "424" + }, + "value": "jxhcpwgfkxqasbexkookvxk" + }, + "type": { + "$id": "6915", + "kind": "string", + "type": { + "$ref": "428" + }, + "value": "zkuozvgjseokfchkscoswthzjdry" + }, + "systemData": { + "$id": "6916", + "kind": "model", + "type": { + "$ref": "433" + }, + "value": { + "$id": "6917", + "createdBy": { + "$id": "6918", + "kind": "string", + "type": { + "$ref": "435" + }, + "value": "ssvaslsmudloholronopqyxjcu" + }, + "createdByType": { + "$id": "6919", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "createdAt": { + "$id": "6920", + "kind": "string", + "type": { + "$ref": "442" + }, + "value": "2024-08-09T18:13:29.389Z" + }, + "lastModifiedBy": { + "$id": "6921", + "kind": "string", + "type": { + "$ref": "447" + }, + "value": "gnicpuszwd" + }, + "lastModifiedByType": { + "$id": "6922", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "6923", + "kind": "string", + "type": { + "$ref": "454" + }, + "value": "2024-08-09T18:13:29.389Z" + } + } + } + } + } + } + ] + }, + { + "$id": "6924", + "kind": "http", + "name": "Dataflow_CreateOrUpdate_FilterToTopic", + "description": "Dataflow_CreateOrUpdate_FilterToTopic", + "filePath": "2025-04-01/Dataflow_CreateOrUpdate_FilterToTopic.json", + "parameters": [ + { + "$id": "6925", + "parameter": { + "$ref": "6473" + }, + "value": { + "$id": "6926", + "kind": "string", + "type": { + "$ref": "6474" + }, + "value": "2025-04-01" + } + }, + { + "$id": "6927", + "parameter": { + "$ref": "6477" + }, + "value": { + "$id": "6928", + "kind": "string", + "type": { + "$ref": "6478" + }, + "value": "F8C729F9-DF9C-4743-848F-96EE433D8E53" + } + }, + { + "$id": "6929", + "parameter": { + "$ref": "6480" + }, + "value": { + "$id": "6930", + "kind": "string", + "type": { + "$ref": "6481" + }, + "value": "rgiotoperations" + } + }, + { + "$id": "6931", + "parameter": { + "$ref": "6482" + }, + "value": { + "$id": "6932", + "kind": "string", + "type": { + "$ref": "6483" + }, + "value": "resource-name123" + } + }, + { + "$id": "6933", + "parameter": { + "$ref": "6484" + }, + "value": { + "$id": "6934", + "kind": "string", + "type": { + "$ref": "6485" + }, + "value": "resource-name123" + } + }, + { + "$id": "6935", + "parameter": { + "$ref": "6486" + }, + "value": { + "$id": "6936", + "kind": "string", + "type": { + "$ref": "6487" + }, + "value": "mqtt-filter-to-topic" + } + }, + { + "$id": "6937", + "parameter": { + "$ref": "6494" + }, + "value": { + "$id": "6938", + "kind": "model", + "type": { + "$ref": "1224" + }, + "value": { + "$id": "6939", + "properties": { + "$id": "6940", + "kind": "model", + "type": { + "$ref": "1226" + }, + "value": { + "$id": "6941", + "mode": { + "$id": "6942", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Enabled" + }, + "operations": { + "$id": "6943", + "kind": "array", + "type": { + "$ref": "1231" + }, + "value": [ + { + "$id": "6944", + "kind": "model", + "type": { + "$ref": "1232" + }, + "value": { + "$id": "6945", + "operationType": { + "$id": "6946", + "kind": "string", + "type": { + "$ref": "182" + }, + "value": "Source" + }, + "name": { + "$id": "6947", + "kind": "string", + "type": { + "$ref": "1237" + }, + "value": "source1" + }, + "sourceSettings": { + "$id": "6948", + "kind": "model", + "type": { + "$ref": "1241" + }, + "value": { + "$id": "6949", + "endpointRef": { + "$id": "6950", + "kind": "string", + "type": { + "$ref": "1243" + }, + "value": "aio-builtin-broker-endpoint" + }, + "dataSources": { + "$id": "6951", + "kind": "array", + "type": { + "$ref": "1258" + }, + "value": [ + { + "$id": "6952", + "kind": "string", + "type": { + "$ref": "1259" + }, + "value": "azure-iot-operations/data/thermostat" + } + ] + } + } + } + } + }, + { + "$id": "6953", + "kind": "model", + "type": { + "$ref": "1232" + }, + "value": { + "$id": "6954", + "operationType": { + "$id": "6955", + "kind": "string", + "type": { + "$ref": "182" + }, + "value": "BuiltInTransformation" + }, + "name": { + "$id": "6956", + "kind": "string", + "type": { + "$ref": "1237" + }, + "value": "transformation1" + }, + "builtInTransformationSettings": { + "$id": "6957", + "kind": "model", + "type": { + "$ref": "1266" + }, + "value": { + "$id": "6958", + "filter": { + "$id": "6959", + "kind": "array", + "type": { + "$ref": "1301" + }, + "value": [ + { + "$id": "6960", + "kind": "model", + "type": { + "$ref": "1302" + }, + "value": { + "$id": "6961", + "type": { + "$id": "6962", + "kind": "string", + "type": { + "$ref": "202" + }, + "value": "Filter" + }, + "description": { + "$id": "6963", + "kind": "string", + "type": { + "$ref": "1307" + }, + "value": "filter-datapoint" + }, + "inputs": { + "$id": "6964", + "kind": "array", + "type": { + "$ref": "1311" + }, + "value": [ + { + "$id": "6965", + "kind": "string", + "type": { + "$ref": "1312" + }, + "value": "temperature.Value" + }, + { + "$id": "6966", + "kind": "string", + "type": { + "$ref": "1312" + }, + "value": "\"Tag 10\".Value" + } + ] + }, + "expression": { + "$id": "6967", + "kind": "string", + "type": { + "$ref": "1316" + }, + "value": "$1 > 9000 && $2 >= 8000" + } + } + } + ] + }, + "map": { + "$id": "6968", + "kind": "array", + "type": { + "$ref": "1322" + }, + "value": [ + { + "$id": "6969", + "kind": "model", + "type": { + "$ref": "1323" + }, + "value": { + "$id": "6970", + "type": { + "$id": "6971", + "kind": "string", + "type": { + "$ref": "206" + }, + "value": "PassThrough" + }, + "inputs": { + "$id": "6972", + "kind": "array", + "type": { + "$ref": "1332" + }, + "value": [ + { + "$id": "6973", + "kind": "string", + "type": { + "$ref": "1333" + }, + "value": "*" + } + ] + }, + "output": { + "$id": "6974", + "kind": "string", + "type": { + "$ref": "1341" + }, + "value": "*" + } + } + } + ] + } + } + } + } + }, + { + "$id": "6975", + "kind": "model", + "type": { + "$ref": "1232" + }, + "value": { + "$id": "6976", + "operationType": { + "$id": "6977", + "kind": "string", + "type": { + "$ref": "182" + }, + "value": "Destination" + }, + "name": { + "$id": "6978", + "kind": "string", + "type": { + "$ref": "1237" + }, + "value": "destination1" + }, + "destinationSettings": { + "$id": "6979", + "kind": "model", + "type": { + "$ref": "1349" + }, + "value": { + "$id": "6980", + "endpointRef": { + "$id": "6981", + "kind": "string", + "type": { + "$ref": "1351" + }, + "value": "aio-builtin-broker-endpoint" + }, + "dataDestination": { + "$id": "6982", + "kind": "string", + "type": { + "$ref": "1355" + }, + "value": "data/filtered/thermostat" + } + } + } + } + } + ] + } + } + }, + "extendedLocation": { + "$id": "6983", + "kind": "model", + "type": { + "$ref": "510" + }, + "value": { + "$id": "6984", + "name": { + "$id": "6985", + "kind": "string", + "type": { + "$ref": "512" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "6986", + "kind": "string", + "type": { + "$ref": "44" + }, + "value": "CustomLocation" + } + } + } + } + } + } + ], + "responses": [ + { + "$id": "6987", + "response": { + "$ref": "6495" + }, + "statusCode": 200, + "bodyValue": { + "$id": "6988", + "kind": "model", + "type": { + "$ref": "1224" + }, + "value": { + "$id": "6989", + "properties": { + "$id": "6990", + "kind": "model", + "type": { + "$ref": "1226" + }, + "value": { + "$id": "6991", + "mode": { + "$id": "6992", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Enabled" + }, + "operations": { + "$id": "6993", + "kind": "array", + "type": { + "$ref": "1231" + }, + "value": [ + { + "$id": "6994", + "kind": "model", + "type": { + "$ref": "1232" + }, + "value": { + "$id": "6995", + "operationType": { + "$id": "6996", + "kind": "string", + "type": { + "$ref": "182" + }, + "value": "Source" + }, + "name": { + "$id": "6997", + "kind": "string", + "type": { + "$ref": "1237" + }, + "value": "source1" + }, + "sourceSettings": { + "$id": "6998", + "kind": "model", + "type": { + "$ref": "1241" + }, + "value": { + "$id": "6999", + "endpointRef": { + "$id": "7000", + "kind": "string", + "type": { + "$ref": "1243" + }, + "value": "aio-builtin-broker-endpoint" + }, + "dataSources": { + "$id": "7001", + "kind": "array", + "type": { + "$ref": "1258" + }, + "value": [ + { + "$id": "7002", + "kind": "string", + "type": { + "$ref": "1259" + }, + "value": "azure-iot-operations/data/thermostat" + } + ] + } + } + } + } + }, + { + "$id": "7003", + "kind": "model", + "type": { + "$ref": "1232" + }, + "value": { + "$id": "7004", + "operationType": { + "$id": "7005", + "kind": "string", + "type": { + "$ref": "182" + }, + "value": "BuiltInTransformation" + }, + "name": { + "$id": "7006", + "kind": "string", + "type": { + "$ref": "1237" + }, + "value": "transformation1" + }, + "builtInTransformationSettings": { + "$id": "7007", + "kind": "model", + "type": { + "$ref": "1266" + }, + "value": { + "$id": "7008", + "filter": { + "$id": "7009", + "kind": "array", + "type": { + "$ref": "1301" + }, + "value": [ + { + "$id": "7010", + "kind": "model", + "type": { + "$ref": "1302" + }, + "value": { + "$id": "7011", + "type": { + "$id": "7012", + "kind": "string", + "type": { + "$ref": "202" + }, + "value": "Filter" + }, + "description": { + "$id": "7013", + "kind": "string", + "type": { + "$ref": "1307" + }, + "value": "filter-datapoint" + }, + "inputs": { + "$id": "7014", + "kind": "array", + "type": { + "$ref": "1311" + }, + "value": [ + { + "$id": "7015", + "kind": "string", + "type": { + "$ref": "1312" + }, + "value": "temperature.Value" + }, + { + "$id": "7016", + "kind": "string", + "type": { + "$ref": "1312" + }, + "value": "\"Tag 10\".Value" + } + ] + }, + "expression": { + "$id": "7017", + "kind": "string", + "type": { + "$ref": "1316" + }, + "value": "$1 > 9000 && $2 >= 8000" + } + } + } + ] + }, + "map": { + "$id": "7018", + "kind": "array", + "type": { + "$ref": "1322" + }, + "value": [ + { + "$id": "7019", + "kind": "model", + "type": { + "$ref": "1323" + }, + "value": { + "$id": "7020", + "type": { + "$id": "7021", + "kind": "string", + "type": { + "$ref": "206" + }, + "value": "PassThrough" + }, + "inputs": { + "$id": "7022", + "kind": "array", + "type": { + "$ref": "1332" + }, + "value": [ + { + "$id": "7023", + "kind": "string", + "type": { + "$ref": "1333" + }, + "value": "*" + } + ] + }, + "output": { + "$id": "7024", + "kind": "string", + "type": { + "$ref": "1341" + }, + "value": "*" + } + } + } + ] + } + } + } + } + }, + { + "$id": "7025", + "kind": "model", + "type": { + "$ref": "1232" + }, + "value": { + "$id": "7026", + "operationType": { + "$id": "7027", + "kind": "string", + "type": { + "$ref": "182" + }, + "value": "Destination" + }, + "name": { + "$id": "7028", + "kind": "string", + "type": { + "$ref": "1237" + }, + "value": "destination1" + }, + "destinationSettings": { + "$id": "7029", + "kind": "model", + "type": { + "$ref": "1349" + }, + "value": { + "$id": "7030", + "endpointRef": { + "$id": "7031", + "kind": "string", + "type": { + "$ref": "1351" + }, + "value": "aio-builtin-broker-endpoint" + }, + "dataDestination": { + "$id": "7032", + "kind": "string", + "type": { + "$ref": "1355" + }, + "value": "data/filtered/thermostat" + } + } + } + } + } + ] + }, + "provisioningState": { + "$id": "7033", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Succeeded" + } + } + }, + "extendedLocation": { + "$id": "7034", + "kind": "model", + "type": { + "$ref": "510" + }, + "value": { + "$id": "7035", + "name": { + "$id": "7036", + "kind": "string", + "type": { + "$ref": "512" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "7037", + "kind": "string", + "type": { + "$ref": "44" + }, + "value": "CustomLocation" + } + } + }, + "id": { + "$id": "7038", + "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": "7039", + "kind": "string", + "type": { + "$ref": "424" + }, + "value": "jxhcpwgfkxqasbexkookvxk" + }, + "type": { + "$id": "7040", + "kind": "string", + "type": { + "$ref": "428" + }, + "value": "zkuozvgjseokfchkscoswthzjdry" + }, + "systemData": { + "$id": "7041", + "kind": "model", + "type": { + "$ref": "433" + }, + "value": { + "$id": "7042", + "createdBy": { + "$id": "7043", + "kind": "string", + "type": { + "$ref": "435" + }, + "value": "ssvaslsmudloholronopqyxjcu" + }, + "createdByType": { + "$id": "7044", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "createdAt": { + "$id": "7045", + "kind": "string", + "type": { + "$ref": "442" + }, + "value": "2024-08-09T18:13:29.389Z" + }, + "lastModifiedBy": { + "$id": "7046", + "kind": "string", + "type": { + "$ref": "447" + }, + "value": "gnicpuszwd" + }, + "lastModifiedByType": { + "$id": "7047", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "7048", + "kind": "string", + "type": { + "$ref": "454" + }, + "value": "2024-08-09T18:13:29.389Z" + } + } + } + } + } + }, + { + "$id": "7049", + "response": { + "$ref": "6496" + }, + "statusCode": 201, + "bodyValue": { + "$id": "7050", + "kind": "model", + "type": { + "$ref": "1224" + }, + "value": { + "$id": "7051", + "properties": { + "$id": "7052", + "kind": "model", + "type": { + "$ref": "1226" + }, + "value": { + "$id": "7053", + "mode": { + "$id": "7054", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Enabled" + }, + "operations": { + "$id": "7055", + "kind": "array", + "type": { + "$ref": "1231" + }, + "value": [ + { + "$id": "7056", + "kind": "model", + "type": { + "$ref": "1232" + }, + "value": { + "$id": "7057", + "operationType": { + "$id": "7058", + "kind": "string", + "type": { + "$ref": "182" + }, + "value": "Source" + }, + "name": { + "$id": "7059", + "kind": "string", + "type": { + "$ref": "1237" + }, + "value": "source1" + }, + "sourceSettings": { + "$id": "7060", + "kind": "model", + "type": { + "$ref": "1241" + }, + "value": { + "$id": "7061", + "endpointRef": { + "$id": "7062", + "kind": "string", + "type": { + "$ref": "1243" + }, + "value": "aio-builtin-broker-endpoint" + }, + "dataSources": { + "$id": "7063", + "kind": "array", + "type": { + "$ref": "1258" + }, + "value": [ + { + "$id": "7064", + "kind": "string", + "type": { + "$ref": "1259" + }, + "value": "azure-iot-operations/data/thermostat" + } + ] + } + } + } + } + }, + { + "$id": "7065", + "kind": "model", + "type": { + "$ref": "1232" + }, + "value": { + "$id": "7066", + "operationType": { + "$id": "7067", + "kind": "string", + "type": { + "$ref": "182" + }, + "value": "BuiltInTransformation" + }, + "name": { + "$id": "7068", + "kind": "string", + "type": { + "$ref": "1237" + }, + "value": "transformation1" + }, + "builtInTransformationSettings": { + "$id": "7069", + "kind": "model", + "type": { + "$ref": "1266" + }, + "value": { + "$id": "7070", + "filter": { + "$id": "7071", + "kind": "array", + "type": { + "$ref": "1301" + }, + "value": [ + { + "$id": "7072", + "kind": "model", + "type": { + "$ref": "1302" + }, + "value": { + "$id": "7073", + "type": { + "$id": "7074", + "kind": "string", + "type": { + "$ref": "202" + }, + "value": "Filter" + }, + "description": { + "$id": "7075", + "kind": "string", + "type": { + "$ref": "1307" + }, + "value": "filter-datapoint" + }, + "inputs": { + "$id": "7076", + "kind": "array", + "type": { + "$ref": "1311" + }, + "value": [ + { + "$id": "7077", + "kind": "string", + "type": { + "$ref": "1312" + }, + "value": "temperature.Value" + }, + { + "$id": "7078", + "kind": "string", + "type": { + "$ref": "1312" + }, + "value": "\"Tag 10\".Value" + } + ] + }, + "expression": { + "$id": "7079", + "kind": "string", + "type": { + "$ref": "1316" + }, + "value": "$1 > 9000 && $2 >= 8000" + } + } + } + ] + }, + "map": { + "$id": "7080", + "kind": "array", + "type": { + "$ref": "1322" + }, + "value": [ + { + "$id": "7081", + "kind": "model", + "type": { + "$ref": "1323" + }, + "value": { + "$id": "7082", + "type": { + "$id": "7083", + "kind": "string", + "type": { + "$ref": "206" + }, + "value": "PassThrough" + }, + "inputs": { + "$id": "7084", + "kind": "array", + "type": { + "$ref": "1332" + }, + "value": [ + { + "$id": "7085", + "kind": "string", + "type": { + "$ref": "1333" + }, + "value": "*" + } + ] + }, + "output": { + "$id": "7086", + "kind": "string", + "type": { + "$ref": "1341" + }, + "value": "*" + } + } + } + ] + } + } + } + } + }, + { + "$id": "7087", + "kind": "model", + "type": { + "$ref": "1232" + }, + "value": { + "$id": "7088", + "operationType": { + "$id": "7089", + "kind": "string", + "type": { + "$ref": "182" + }, + "value": "Destination" + }, + "name": { + "$id": "7090", + "kind": "string", + "type": { + "$ref": "1237" + }, + "value": "destination1" + }, + "destinationSettings": { + "$id": "7091", + "kind": "model", + "type": { + "$ref": "1349" + }, + "value": { + "$id": "7092", + "endpointRef": { + "$id": "7093", + "kind": "string", + "type": { + "$ref": "1351" + }, + "value": "aio-builtin-broker-endpoint" + }, + "dataDestination": { + "$id": "7094", + "kind": "string", + "type": { + "$ref": "1355" + }, + "value": "data/filtered/thermostat" + } + } + } + } + } + ] + }, + "provisioningState": { + "$id": "7095", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Succeeded" + } + } + }, + "extendedLocation": { + "$id": "7096", + "kind": "model", + "type": { + "$ref": "510" + }, + "value": { + "$id": "7097", + "name": { + "$id": "7098", + "kind": "string", + "type": { + "$ref": "512" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "7099", + "kind": "string", + "type": { + "$ref": "44" + }, + "value": "CustomLocation" + } + } + }, + "id": { + "$id": "7100", + "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": "7101", + "kind": "string", + "type": { + "$ref": "424" + }, + "value": "jxhcpwgfkxqasbexkookvxk" + }, + "type": { + "$id": "7102", + "kind": "string", + "type": { + "$ref": "428" + }, + "value": "zkuozvgjseokfchkscoswthzjdry" + }, + "systemData": { + "$id": "7103", + "kind": "model", + "type": { + "$ref": "433" + }, + "value": { + "$id": "7104", + "createdBy": { + "$id": "7105", + "kind": "string", + "type": { + "$ref": "435" + }, + "value": "ssvaslsmudloholronopqyxjcu" + }, + "createdByType": { + "$id": "7106", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "createdAt": { + "$id": "7107", + "kind": "string", + "type": { + "$ref": "442" + }, + "value": "2024-08-09T18:13:29.389Z" + }, + "lastModifiedBy": { + "$id": "7108", + "kind": "string", + "type": { + "$ref": "447" + }, + "value": "gnicpuszwd" + }, + "lastModifiedByType": { + "$id": "7109", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "7110", + "kind": "string", + "type": { + "$ref": "454" + }, + "value": "2024-08-09T18:13:29.389Z" + } + } + } + } + } + } + ] + }, + { + "$id": "7111", + "kind": "http", + "name": "Dataflow_CreateOrUpdate", + "description": "Dataflow_CreateOrUpdate", + "filePath": "2025-04-01/Dataflow_CreateOrUpdate_MaximumSet_Gen.json", + "parameters": [ + { + "$id": "7112", + "parameter": { + "$ref": "6473" + }, + "value": { + "$id": "7113", + "kind": "string", + "type": { + "$ref": "6474" + }, + "value": "2025-04-01" + } + }, + { + "$id": "7114", + "parameter": { + "$ref": "6477" + }, + "value": { + "$id": "7115", + "kind": "string", + "type": { + "$ref": "6478" + }, + "value": "F8C729F9-DF9C-4743-848F-96EE433D8E53" + } + }, + { + "$id": "7116", + "parameter": { + "$ref": "6480" + }, + "value": { + "$id": "7117", + "kind": "string", + "type": { + "$ref": "6481" + }, + "value": "rgiotoperations" + } + }, + { + "$id": "7118", + "parameter": { + "$ref": "6482" + }, + "value": { + "$id": "7119", + "kind": "string", + "type": { + "$ref": "6483" + }, + "value": "resource-name123" + } + }, + { + "$id": "7120", + "parameter": { + "$ref": "6484" + }, + "value": { + "$id": "7121", + "kind": "string", + "type": { + "$ref": "6485" + }, + "value": "resource-name123" + } + }, + { + "$id": "7122", + "parameter": { + "$ref": "6486" + }, + "value": { + "$id": "7123", + "kind": "string", + "type": { + "$ref": "6487" + }, + "value": "resource-name123" + } + }, + { + "$id": "7124", + "parameter": { + "$ref": "6494" + }, + "value": { + "$id": "7125", + "kind": "model", + "type": { + "$ref": "1224" + }, + "value": { + "$id": "7126", + "properties": { + "$id": "7127", + "kind": "model", + "type": { + "$ref": "1226" + }, + "value": { + "$id": "7128", + "mode": { + "$id": "7129", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Enabled" + }, + "operations": { + "$id": "7130", + "kind": "array", + "type": { + "$ref": "1231" + }, + "value": [ + { + "$id": "7131", + "kind": "model", + "type": { + "$ref": "1232" + }, + "value": { + "$id": "7132", + "operationType": { + "$id": "7133", + "kind": "string", + "type": { + "$ref": "182" + }, + "value": "Source" + }, + "name": { + "$id": "7134", + "kind": "string", + "type": { + "$ref": "1237" + }, + "value": "knnafvkwoeakm" + }, + "sourceSettings": { + "$id": "7135", + "kind": "model", + "type": { + "$ref": "1241" + }, + "value": { + "$id": "7136", + "endpointRef": { + "$id": "7137", + "kind": "string", + "type": { + "$ref": "1243" + }, + "value": "iixotodhvhkkfcfyrkoveslqig" + }, + "assetRef": { + "$id": "7138", + "kind": "string", + "type": { + "$ref": "1247" + }, + "value": "zayyykwmckaocywdkohmu" + }, + "serializationFormat": { + "$id": "7139", + "kind": "string", + "type": { + "$ref": "190" + }, + "value": "Json" + }, + "schemaRef": { + "$id": "7140", + "kind": "string", + "type": { + "$ref": "1254" + }, + "value": "pknmdzqll" + }, + "dataSources": { + "$id": "7141", + "kind": "array", + "type": { + "$ref": "1258" + }, + "value": [ + { + "$id": "7142", + "kind": "string", + "type": { + "$ref": "1259" + }, + "value": "chkkpymxhp" + } + ] + } + } + }, + "builtInTransformationSettings": { + "$id": "7143", + "kind": "model", + "type": { + "$ref": "1266" + }, + "value": { + "$id": "7144", + "serializationFormat": { + "$id": "7145", + "kind": "string", + "type": { + "$ref": "194" + }, + "value": "Delta" + }, + "schemaRef": { + "$id": "7146", + "kind": "string", + "type": { + "$ref": "1271" + }, + "value": "mcdc" + }, + "datasets": { + "$id": "7147", + "kind": "array", + "type": { + "$ref": "1275" + }, + "value": [ + { + "$id": "7148", + "kind": "model", + "type": { + "$ref": "1276" + }, + "value": { + "$id": "7149", + "key": { + "$id": "7150", + "kind": "string", + "type": { + "$ref": "1278" + }, + "value": "qsfqcgxaxnhfumrsdsokwyv" + }, + "description": { + "$id": "7151", + "kind": "string", + "type": { + "$ref": "1282" + }, + "value": "Lorem ipsum odor amet, consectetuer adipiscing elit." + }, + "schemaRef": { + "$id": "7152", + "kind": "string", + "type": { + "$ref": "1286" + }, + "value": "n" + }, + "inputs": { + "$id": "7153", + "kind": "array", + "type": { + "$ref": "1290" + }, + "value": [ + { + "$id": "7154", + "kind": "string", + "type": { + "$ref": "1291" + }, + "value": "mosffpsslifkq" + } + ] + }, + "expression": { + "$id": "7155", + "kind": "string", + "type": { + "$ref": "1295" + }, + "value": "aatbwomvflemsxialv" + } + } + } + ] + }, + "filter": { + "$id": "7156", + "kind": "array", + "type": { + "$ref": "1301" + }, + "value": [ + { + "$id": "7157", + "kind": "model", + "type": { + "$ref": "1302" + }, + "value": { + "$id": "7158", + "type": { + "$id": "7159", + "kind": "string", + "type": { + "$ref": "202" + }, + "value": "Filter" + }, + "description": { + "$id": "7160", + "kind": "string", + "type": { + "$ref": "1307" + }, + "value": "Lorem ipsum odor amet, consectetuer adipiscing elit." + }, + "inputs": { + "$id": "7161", + "kind": "array", + "type": { + "$ref": "1311" + }, + "value": [ + { + "$id": "7162", + "kind": "string", + "type": { + "$ref": "1312" + }, + "value": "sxmjkbntgb" + } + ] + }, + "expression": { + "$id": "7163", + "kind": "string", + "type": { + "$ref": "1316" + }, + "value": "n" + } + } + } + ] + }, + "map": { + "$id": "7164", + "kind": "array", + "type": { + "$ref": "1322" + }, + "value": [ + { + "$id": "7165", + "kind": "model", + "type": { + "$ref": "1323" + }, + "value": { + "$id": "7166", + "type": { + "$id": "7167", + "kind": "string", + "type": { + "$ref": "206" + }, + "value": "NewProperties" + }, + "description": { + "$id": "7168", + "kind": "string", + "type": { + "$ref": "1328" + }, + "value": "Lorem ipsum odor amet, consectetuer adipiscing elit." + }, + "inputs": { + "$id": "7169", + "kind": "array", + "type": { + "$ref": "1332" + }, + "value": [ + { + "$id": "7170", + "kind": "string", + "type": { + "$ref": "1333" + }, + "value": "xsbxuk" + } + ] + }, + "expression": { + "$id": "7171", + "kind": "string", + "type": { + "$ref": "1337" + }, + "value": "txoiltogsarwkzalsphvlmt" + }, + "output": { + "$id": "7172", + "kind": "string", + "type": { + "$ref": "1341" + }, + "value": "nvgtmkfl" + } + } + } + ] + } + } + }, + "destinationSettings": { + "$id": "7173", + "kind": "model", + "type": { + "$ref": "1349" + }, + "value": { + "$id": "7174", + "endpointRef": { + "$id": "7175", + "kind": "string", + "type": { + "$ref": "1351" + }, + "value": "kybkchnzimerguekuvqlqiqdvvrt" + }, + "dataDestination": { + "$id": "7176", + "kind": "string", + "type": { + "$ref": "1355" + }, + "value": "cbrh" + } + } + } + } + } + ] + } + } + }, + "extendedLocation": { + "$id": "7177", + "kind": "model", + "type": { + "$ref": "510" + }, + "value": { + "$id": "7178", + "name": { + "$id": "7179", + "kind": "string", + "type": { + "$ref": "512" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "7180", + "kind": "string", + "type": { + "$ref": "44" + }, + "value": "CustomLocation" + } + } + } + } + } + } + ], + "responses": [ + { + "$id": "7181", + "response": { + "$ref": "6495" + }, + "statusCode": 200, + "bodyValue": { + "$id": "7182", + "kind": "model", + "type": { + "$ref": "1224" + }, + "value": { + "$id": "7183", + "properties": { + "$id": "7184", + "kind": "model", + "type": { + "$ref": "1226" + }, + "value": { + "$id": "7185", + "mode": { + "$id": "7186", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Enabled" + }, + "operations": { + "$id": "7187", + "kind": "array", + "type": { + "$ref": "1231" + }, + "value": [ + { + "$id": "7188", + "kind": "model", + "type": { + "$ref": "1232" + }, + "value": { + "$id": "7189", + "operationType": { + "$id": "7190", + "kind": "string", + "type": { + "$ref": "182" + }, + "value": "Source" + }, + "name": { + "$id": "7191", + "kind": "string", + "type": { + "$ref": "1237" + }, + "value": "knnafvkwoeakm" + }, + "sourceSettings": { + "$id": "7192", + "kind": "model", + "type": { + "$ref": "1241" + }, + "value": { + "$id": "7193", + "endpointRef": { + "$id": "7194", + "kind": "string", + "type": { + "$ref": "1243" + }, + "value": "iixotodhvhkkfcfyrkoveslqig" + }, + "assetRef": { + "$id": "7195", + "kind": "string", + "type": { + "$ref": "1247" + }, + "value": "zayyykwmckaocywdkohmu" + }, + "serializationFormat": { + "$id": "7196", + "kind": "string", + "type": { + "$ref": "190" + }, + "value": "Json" + }, + "schemaRef": { + "$id": "7197", + "kind": "string", + "type": { + "$ref": "1254" + }, + "value": "pknmdzqll" + }, + "dataSources": { + "$id": "7198", + "kind": "array", + "type": { + "$ref": "1258" + }, + "value": [ + { + "$id": "7199", + "kind": "string", + "type": { + "$ref": "1259" + }, + "value": "chkkpymxhp" + } + ] + } + } + }, + "builtInTransformationSettings": { + "$id": "7200", + "kind": "model", + "type": { + "$ref": "1266" + }, + "value": { + "$id": "7201", + "serializationFormat": { + "$id": "7202", + "kind": "string", + "type": { + "$ref": "194" + }, + "value": "Delta" + }, + "schemaRef": { + "$id": "7203", + "kind": "string", + "type": { + "$ref": "1271" + }, + "value": "mcdc" + }, + "datasets": { + "$id": "7204", + "kind": "array", + "type": { + "$ref": "1275" + }, + "value": [ + { + "$id": "7205", + "kind": "model", + "type": { + "$ref": "1276" + }, + "value": { + "$id": "7206", + "key": { + "$id": "7207", + "kind": "string", + "type": { + "$ref": "1278" + }, + "value": "qsfqcgxaxnhfumrsdsokwyv" + }, + "description": { + "$id": "7208", + "kind": "string", + "type": { + "$ref": "1282" + }, + "value": "Lorem ipsum odor amet, consectetuer adipiscing elit." + }, + "schemaRef": { + "$id": "7209", + "kind": "string", + "type": { + "$ref": "1286" + }, + "value": "n" + }, + "inputs": { + "$id": "7210", + "kind": "array", + "type": { + "$ref": "1290" + }, + "value": [ + { + "$id": "7211", + "kind": "string", + "type": { + "$ref": "1291" + }, + "value": "mosffpsslifkq" + } + ] + }, + "expression": { + "$id": "7212", + "kind": "string", + "type": { + "$ref": "1295" + }, + "value": "aatbwomvflemsxialv" + } + } + } + ] + }, + "filter": { + "$id": "7213", + "kind": "array", + "type": { + "$ref": "1301" + }, + "value": [ + { + "$id": "7214", + "kind": "model", + "type": { + "$ref": "1302" + }, + "value": { + "$id": "7215", + "type": { + "$id": "7216", + "kind": "string", + "type": { + "$ref": "202" + }, + "value": "Filter" + }, + "description": { + "$id": "7217", + "kind": "string", + "type": { + "$ref": "1307" + }, + "value": "Lorem ipsum odor amet, consectetuer adipiscing elit." + }, + "inputs": { + "$id": "7218", + "kind": "array", + "type": { + "$ref": "1311" + }, + "value": [ + { + "$id": "7219", + "kind": "string", + "type": { + "$ref": "1312" + }, + "value": "sxmjkbntgb" + } + ] + }, + "expression": { + "$id": "7220", + "kind": "string", + "type": { + "$ref": "1316" + }, + "value": "n" + } + } + } + ] + }, + "map": { + "$id": "7221", + "kind": "array", + "type": { + "$ref": "1322" + }, + "value": [ + { + "$id": "7222", + "kind": "model", + "type": { + "$ref": "1323" + }, + "value": { + "$id": "7223", + "type": { + "$id": "7224", + "kind": "string", + "type": { + "$ref": "206" + }, + "value": "NewProperties" + }, + "description": { + "$id": "7225", + "kind": "string", + "type": { + "$ref": "1328" + }, + "value": "Lorem ipsum odor amet, consectetuer adipiscing elit." + }, + "inputs": { + "$id": "7226", + "kind": "array", + "type": { + "$ref": "1332" + }, + "value": [ + { + "$id": "7227", + "kind": "string", + "type": { + "$ref": "1333" + }, + "value": "xsbxuk" + } + ] + }, + "expression": { + "$id": "7228", + "kind": "string", + "type": { + "$ref": "1337" + }, + "value": "txoiltogsarwkzalsphvlmt" + }, + "output": { + "$id": "7229", + "kind": "string", + "type": { + "$ref": "1341" + }, + "value": "nvgtmkfl" + } + } + } + ] + } + } + }, + "destinationSettings": { + "$id": "7230", + "kind": "model", + "type": { + "$ref": "1349" + }, + "value": { + "$id": "7231", + "endpointRef": { + "$id": "7232", + "kind": "string", + "type": { + "$ref": "1351" + }, + "value": "kybkchnzimerguekuvqlqiqdvvrt" + }, + "dataDestination": { + "$id": "7233", + "kind": "string", + "type": { + "$ref": "1355" + }, + "value": "cbrh" + } + } + } + } + } + ] + }, + "provisioningState": { + "$id": "7234", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Succeeded" + } + } + }, + "extendedLocation": { + "$id": "7235", + "kind": "model", + "type": { + "$ref": "510" + }, + "value": { + "$id": "7236", + "name": { + "$id": "7237", + "kind": "string", + "type": { + "$ref": "512" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "7238", + "kind": "string", + "type": { + "$ref": "44" + }, + "value": "CustomLocation" + } + } + }, + "id": { + "$id": "7239", + "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": "7240", + "kind": "string", + "type": { + "$ref": "424" + }, + "value": "jxhcpwgfkxqasbexkookvxk" + }, + "type": { + "$id": "7241", + "kind": "string", + "type": { + "$ref": "428" + }, + "value": "zkuozvgjseokfchkscoswthzjdry" + }, + "systemData": { + "$id": "7242", + "kind": "model", + "type": { + "$ref": "433" + }, + "value": { + "$id": "7243", + "createdBy": { + "$id": "7244", + "kind": "string", + "type": { + "$ref": "435" + }, + "value": "ssvaslsmudloholronopqyxjcu" + }, + "createdByType": { + "$id": "7245", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "createdAt": { + "$id": "7246", + "kind": "string", + "type": { + "$ref": "442" + }, + "value": "2024-08-09T18:13:29.389Z" + }, + "lastModifiedBy": { + "$id": "7247", + "kind": "string", + "type": { + "$ref": "447" + }, + "value": "gnicpuszwd" + }, + "lastModifiedByType": { + "$id": "7248", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "7249", + "kind": "string", + "type": { + "$ref": "454" + }, + "value": "2024-08-09T18:13:29.389Z" + } + } + } + } + } + }, + { + "$id": "7250", + "response": { + "$ref": "6496" + }, + "statusCode": 201, + "bodyValue": { + "$id": "7251", + "kind": "model", + "type": { + "$ref": "1224" + }, + "value": { + "$id": "7252", + "properties": { + "$id": "7253", + "kind": "model", + "type": { + "$ref": "1226" + }, + "value": { + "$id": "7254", + "mode": { + "$id": "7255", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Enabled" + }, + "operations": { + "$id": "7256", + "kind": "array", + "type": { + "$ref": "1231" + }, + "value": [ + { + "$id": "7257", + "kind": "model", + "type": { + "$ref": "1232" + }, + "value": { + "$id": "7258", + "operationType": { + "$id": "7259", + "kind": "string", + "type": { + "$ref": "182" + }, + "value": "Source" + }, + "name": { + "$id": "7260", + "kind": "string", + "type": { + "$ref": "1237" + }, + "value": "knnafvkwoeakm" + }, + "sourceSettings": { + "$id": "7261", + "kind": "model", + "type": { + "$ref": "1241" + }, + "value": { + "$id": "7262", + "endpointRef": { + "$id": "7263", + "kind": "string", + "type": { + "$ref": "1243" + }, + "value": "iixotodhvhkkfcfyrkoveslqig" + }, + "assetRef": { + "$id": "7264", + "kind": "string", + "type": { + "$ref": "1247" + }, + "value": "zayyykwmckaocywdkohmu" + }, + "serializationFormat": { + "$id": "7265", + "kind": "string", + "type": { + "$ref": "190" + }, + "value": "Json" + }, + "schemaRef": { + "$id": "7266", + "kind": "string", + "type": { + "$ref": "1254" + }, + "value": "pknmdzqll" + }, + "dataSources": { + "$id": "7267", + "kind": "array", + "type": { + "$ref": "1258" + }, + "value": [ + { + "$id": "7268", + "kind": "string", + "type": { + "$ref": "1259" + }, + "value": "chkkpymxhp" + } + ] + } + } + }, + "builtInTransformationSettings": { + "$id": "7269", + "kind": "model", + "type": { + "$ref": "1266" + }, + "value": { + "$id": "7270", + "serializationFormat": { + "$id": "7271", + "kind": "string", + "type": { + "$ref": "194" + }, + "value": "Delta" + }, + "schemaRef": { + "$id": "7272", + "kind": "string", + "type": { + "$ref": "1271" + }, + "value": "mcdc" + }, + "datasets": { + "$id": "7273", + "kind": "array", + "type": { + "$ref": "1275" + }, + "value": [ + { + "$id": "7274", + "kind": "model", + "type": { + "$ref": "1276" + }, + "value": { + "$id": "7275", + "key": { + "$id": "7276", + "kind": "string", + "type": { + "$ref": "1278" + }, + "value": "qsfqcgxaxnhfumrsdsokwyv" + }, + "description": { + "$id": "7277", + "kind": "string", + "type": { + "$ref": "1282" + }, + "value": "Lorem ipsum odor amet, consectetuer adipiscing elit." + }, + "schemaRef": { + "$id": "7278", + "kind": "string", + "type": { + "$ref": "1286" + }, + "value": "n" + }, + "inputs": { + "$id": "7279", + "kind": "array", + "type": { + "$ref": "1290" + }, + "value": [ + { + "$id": "7280", + "kind": "string", + "type": { + "$ref": "1291" + }, + "value": "mosffpsslifkq" + } + ] + }, + "expression": { + "$id": "7281", + "kind": "string", + "type": { + "$ref": "1295" + }, + "value": "aatbwomvflemsxialv" + } + } + } + ] + }, + "filter": { + "$id": "7282", + "kind": "array", + "type": { + "$ref": "1301" + }, + "value": [ + { + "$id": "7283", + "kind": "model", + "type": { + "$ref": "1302" + }, + "value": { + "$id": "7284", + "type": { + "$id": "7285", + "kind": "string", + "type": { + "$ref": "202" + }, + "value": "Filter" + }, + "description": { + "$id": "7286", + "kind": "string", + "type": { + "$ref": "1307" + }, + "value": "Lorem ipsum odor amet, consectetuer adipiscing elit." + }, + "inputs": { + "$id": "7287", + "kind": "array", + "type": { + "$ref": "1311" + }, + "value": [ + { + "$id": "7288", + "kind": "string", + "type": { + "$ref": "1312" + }, + "value": "sxmjkbntgb" + } + ] + }, + "expression": { + "$id": "7289", + "kind": "string", + "type": { + "$ref": "1316" + }, + "value": "n" + } + } + } + ] + }, + "map": { + "$id": "7290", + "kind": "array", + "type": { + "$ref": "1322" + }, + "value": [ + { + "$id": "7291", + "kind": "model", + "type": { + "$ref": "1323" + }, + "value": { + "$id": "7292", + "type": { + "$id": "7293", + "kind": "string", + "type": { + "$ref": "206" + }, + "value": "NewProperties" + }, + "description": { + "$id": "7294", + "kind": "string", + "type": { + "$ref": "1328" + }, + "value": "Lorem ipsum odor amet, consectetuer adipiscing elit." + }, + "inputs": { + "$id": "7295", + "kind": "array", + "type": { + "$ref": "1332" + }, + "value": [ + { + "$id": "7296", + "kind": "string", + "type": { + "$ref": "1333" + }, + "value": "xsbxuk" + } + ] + }, + "expression": { + "$id": "7297", + "kind": "string", + "type": { + "$ref": "1337" + }, + "value": "txoiltogsarwkzalsphvlmt" + }, + "output": { + "$id": "7298", + "kind": "string", + "type": { + "$ref": "1341" + }, + "value": "nvgtmkfl" + } + } + } + ] + } + } + }, + "destinationSettings": { + "$id": "7299", + "kind": "model", + "type": { + "$ref": "1349" + }, + "value": { + "$id": "7300", + "endpointRef": { + "$id": "7301", + "kind": "string", + "type": { + "$ref": "1351" + }, + "value": "kybkchnzimerguekuvqlqiqdvvrt" + }, + "dataDestination": { + "$id": "7302", + "kind": "string", + "type": { + "$ref": "1355" + }, + "value": "cbrh" + } + } + } + } + } + ] + }, + "provisioningState": { + "$id": "7303", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Succeeded" + } + } + }, + "extendedLocation": { + "$id": "7304", + "kind": "model", + "type": { + "$ref": "510" + }, + "value": { + "$id": "7305", + "name": { + "$id": "7306", + "kind": "string", + "type": { + "$ref": "512" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "7307", + "kind": "string", + "type": { + "$ref": "44" + }, + "value": "CustomLocation" + } + } + }, + "id": { + "$id": "7308", + "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": "7309", + "kind": "string", + "type": { + "$ref": "424" + }, + "value": "jxhcpwgfkxqasbexkookvxk" + }, + "type": { + "$id": "7310", + "kind": "string", + "type": { + "$ref": "428" + }, + "value": "zkuozvgjseokfchkscoswthzjdry" + }, + "systemData": { + "$id": "7311", + "kind": "model", + "type": { + "$ref": "433" + }, + "value": { + "$id": "7312", + "createdBy": { + "$id": "7313", + "kind": "string", + "type": { + "$ref": "435" + }, + "value": "ssvaslsmudloholronopqyxjcu" + }, + "createdByType": { + "$id": "7314", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "createdAt": { + "$id": "7315", + "kind": "string", + "type": { + "$ref": "442" + }, + "value": "2024-08-09T18:13:29.389Z" + }, + "lastModifiedBy": { + "$id": "7316", + "kind": "string", + "type": { + "$ref": "447" + }, + "value": "gnicpuszwd" + }, + "lastModifiedByType": { + "$id": "7317", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "7318", + "kind": "string", + "type": { + "$ref": "454" + }, + "value": "2024-08-09T18:13:29.389Z" + } + } + } + } + } + } + ] + }, + { + "$id": "7319", + "kind": "http", + "name": "Dataflow_CreateOrUpdate_SimpleEventGrid", + "description": "Dataflow_CreateOrUpdate_SimpleEventGrid", + "filePath": "2025-04-01/Dataflow_CreateOrUpdate_SimpleEventGrid.json", + "parameters": [ + { + "$id": "7320", + "parameter": { + "$ref": "6473" + }, + "value": { + "$id": "7321", + "kind": "string", + "type": { + "$ref": "6474" + }, + "value": "2025-04-01" + } + }, + { + "$id": "7322", + "parameter": { + "$ref": "6477" + }, + "value": { + "$id": "7323", + "kind": "string", + "type": { + "$ref": "6478" + }, + "value": "F8C729F9-DF9C-4743-848F-96EE433D8E53" + } + }, + { + "$id": "7324", + "parameter": { + "$ref": "6480" + }, + "value": { + "$id": "7325", + "kind": "string", + "type": { + "$ref": "6481" + }, + "value": "rgiotoperations" + } + }, + { + "$id": "7326", + "parameter": { + "$ref": "6482" + }, + "value": { + "$id": "7327", + "kind": "string", + "type": { + "$ref": "6483" + }, + "value": "resource-name123" + } + }, + { + "$id": "7328", + "parameter": { + "$ref": "6484" + }, + "value": { + "$id": "7329", + "kind": "string", + "type": { + "$ref": "6485" + }, + "value": "resource-name123" + } + }, + { + "$id": "7330", + "parameter": { + "$ref": "6486" + }, + "value": { + "$id": "7331", + "kind": "string", + "type": { + "$ref": "6487" + }, + "value": "aio-to-event-grid" + } + }, + { + "$id": "7332", + "parameter": { + "$ref": "6494" + }, + "value": { + "$id": "7333", + "kind": "model", + "type": { + "$ref": "1224" + }, + "value": { + "$id": "7334", + "properties": { + "$id": "7335", + "kind": "model", + "type": { + "$ref": "1226" + }, + "value": { + "$id": "7336", + "mode": { + "$id": "7337", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Enabled" + }, + "operations": { + "$id": "7338", + "kind": "array", + "type": { + "$ref": "1231" + }, + "value": [ + { + "$id": "7339", + "kind": "model", + "type": { + "$ref": "1232" + }, + "value": { + "$id": "7340", + "operationType": { + "$id": "7341", + "kind": "string", + "type": { + "$ref": "182" + }, + "value": "Source" + }, + "name": { + "$id": "7342", + "kind": "string", + "type": { + "$ref": "1237" + }, + "value": "source1" + }, + "sourceSettings": { + "$id": "7343", + "kind": "model", + "type": { + "$ref": "1241" + }, + "value": { + "$id": "7344", + "endpointRef": { + "$id": "7345", + "kind": "string", + "type": { + "$ref": "1243" + }, + "value": "aio-builtin-broker-endpoint" + }, + "dataSources": { + "$id": "7346", + "kind": "array", + "type": { + "$ref": "1258" + }, + "value": [ + { + "$id": "7347", + "kind": "string", + "type": { + "$ref": "1259" + }, + "value": "thermostats/+/telemetry/temperature/#" + } + ] + } + } + } + } + }, + { + "$id": "7348", + "kind": "model", + "type": { + "$ref": "1232" + }, + "value": { + "$id": "7349", + "operationType": { + "$id": "7350", + "kind": "string", + "type": { + "$ref": "182" + }, + "value": "Destination" + }, + "name": { + "$id": "7351", + "kind": "string", + "type": { + "$ref": "1237" + }, + "value": "destination1" + }, + "destinationSettings": { + "$id": "7352", + "kind": "model", + "type": { + "$ref": "1349" + }, + "value": { + "$id": "7353", + "endpointRef": { + "$id": "7354", + "kind": "string", + "type": { + "$ref": "1351" + }, + "value": "event-grid-endpoint" + }, + "dataDestination": { + "$id": "7355", + "kind": "string", + "type": { + "$ref": "1355" + }, + "value": "factory/telemetry" + } + } + } + } + } + ] + } + } + }, + "extendedLocation": { + "$id": "7356", + "kind": "model", + "type": { + "$ref": "510" + }, + "value": { + "$id": "7357", + "name": { + "$id": "7358", + "kind": "string", + "type": { + "$ref": "512" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "7359", + "kind": "string", + "type": { + "$ref": "44" + }, + "value": "CustomLocation" + } + } + } + } + } + } + ], + "responses": [ + { + "$id": "7360", + "response": { + "$ref": "6495" + }, + "statusCode": 200, + "bodyValue": { + "$id": "7361", + "kind": "model", + "type": { + "$ref": "1224" + }, + "value": { + "$id": "7362", + "properties": { + "$id": "7363", + "kind": "model", + "type": { + "$ref": "1226" + }, + "value": { + "$id": "7364", + "mode": { + "$id": "7365", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Enabled" + }, + "operations": { + "$id": "7366", + "kind": "array", + "type": { + "$ref": "1231" + }, + "value": [ + { + "$id": "7367", + "kind": "model", + "type": { + "$ref": "1232" + }, + "value": { + "$id": "7368", + "operationType": { + "$id": "7369", + "kind": "string", + "type": { + "$ref": "182" + }, + "value": "Source" + }, + "name": { + "$id": "7370", + "kind": "string", + "type": { + "$ref": "1237" + }, + "value": "source1" + }, + "sourceSettings": { + "$id": "7371", + "kind": "model", + "type": { + "$ref": "1241" + }, + "value": { + "$id": "7372", + "endpointRef": { + "$id": "7373", + "kind": "string", + "type": { + "$ref": "1243" + }, + "value": "aio-builtin-broker-endpoint" + }, + "dataSources": { + "$id": "7374", + "kind": "array", + "type": { + "$ref": "1258" + }, + "value": [ + { + "$id": "7375", + "kind": "string", + "type": { + "$ref": "1259" + }, + "value": "thermostats/+/telemetry/temperature/#" + } + ] + } + } + } + } + }, + { + "$id": "7376", + "kind": "model", + "type": { + "$ref": "1232" + }, + "value": { + "$id": "7377", + "operationType": { + "$id": "7378", + "kind": "string", + "type": { + "$ref": "182" + }, + "value": "Destination" + }, + "name": { + "$id": "7379", + "kind": "string", + "type": { + "$ref": "1237" + }, + "value": "destination1" + }, + "destinationSettings": { + "$id": "7380", + "kind": "model", + "type": { + "$ref": "1349" + }, + "value": { + "$id": "7381", + "endpointRef": { + "$id": "7382", + "kind": "string", + "type": { + "$ref": "1351" + }, + "value": "event-grid-endpoint" + }, + "dataDestination": { + "$id": "7383", + "kind": "string", + "type": { + "$ref": "1355" + }, + "value": "factory/telemetry" + } + } + } + } + } + ] + }, + "provisioningState": { + "$id": "7384", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Succeeded" + } + } + }, + "extendedLocation": { + "$id": "7385", + "kind": "model", + "type": { + "$ref": "510" + }, + "value": { + "$id": "7386", + "name": { + "$id": "7387", + "kind": "string", + "type": { + "$ref": "512" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "7388", + "kind": "string", + "type": { + "$ref": "44" + }, + "value": "CustomLocation" + } + } + }, + "id": { + "$id": "7389", + "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": "7390", + "kind": "string", + "type": { + "$ref": "424" + }, + "value": "jxhcpwgfkxqasbexkookvxk" + }, + "type": { + "$id": "7391", + "kind": "string", + "type": { + "$ref": "428" + }, + "value": "zkuozvgjseokfchkscoswthzjdry" + }, + "systemData": { + "$id": "7392", + "kind": "model", + "type": { + "$ref": "433" + }, + "value": { + "$id": "7393", + "createdBy": { + "$id": "7394", + "kind": "string", + "type": { + "$ref": "435" + }, + "value": "ssvaslsmudloholronopqyxjcu" + }, + "createdByType": { + "$id": "7395", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "createdAt": { + "$id": "7396", + "kind": "string", + "type": { + "$ref": "442" + }, + "value": "2024-08-09T18:13:29.389Z" + }, + "lastModifiedBy": { + "$id": "7397", + "kind": "string", + "type": { + "$ref": "447" + }, + "value": "gnicpuszwd" + }, + "lastModifiedByType": { + "$id": "7398", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "7399", + "kind": "string", + "type": { + "$ref": "454" + }, + "value": "2024-08-09T18:13:29.389Z" + } + } + } + } + } + }, + { + "$id": "7400", + "response": { + "$ref": "6496" + }, + "statusCode": 201, + "bodyValue": { + "$id": "7401", + "kind": "model", + "type": { + "$ref": "1224" + }, + "value": { + "$id": "7402", + "properties": { + "$id": "7403", + "kind": "model", + "type": { + "$ref": "1226" + }, + "value": { + "$id": "7404", + "mode": { + "$id": "7405", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Enabled" + }, + "operations": { + "$id": "7406", + "kind": "array", + "type": { + "$ref": "1231" + }, + "value": [ + { + "$id": "7407", + "kind": "model", + "type": { + "$ref": "1232" + }, + "value": { + "$id": "7408", + "operationType": { + "$id": "7409", + "kind": "string", + "type": { + "$ref": "182" + }, + "value": "Source" + }, + "name": { + "$id": "7410", + "kind": "string", + "type": { + "$ref": "1237" + }, + "value": "source1" + }, + "sourceSettings": { + "$id": "7411", + "kind": "model", + "type": { + "$ref": "1241" + }, + "value": { + "$id": "7412", + "endpointRef": { + "$id": "7413", + "kind": "string", + "type": { + "$ref": "1243" + }, + "value": "aio-builtin-broker-endpoint" + }, + "dataSources": { + "$id": "7414", + "kind": "array", + "type": { + "$ref": "1258" + }, + "value": [ + { + "$id": "7415", + "kind": "string", + "type": { + "$ref": "1259" + }, + "value": "thermostats/+/telemetry/temperature/#" + } + ] + } + } + } + } + }, + { + "$id": "7416", + "kind": "model", + "type": { + "$ref": "1232" + }, + "value": { + "$id": "7417", + "operationType": { + "$id": "7418", + "kind": "string", + "type": { + "$ref": "182" + }, + "value": "Destination" + }, + "name": { + "$id": "7419", + "kind": "string", + "type": { + "$ref": "1237" + }, + "value": "destination1" + }, + "destinationSettings": { + "$id": "7420", + "kind": "model", + "type": { + "$ref": "1349" + }, + "value": { + "$id": "7421", + "endpointRef": { + "$id": "7422", + "kind": "string", + "type": { + "$ref": "1351" + }, + "value": "event-grid-endpoint" + }, + "dataDestination": { + "$id": "7423", + "kind": "string", + "type": { + "$ref": "1355" + }, + "value": "factory/telemetry" + } + } + } + } + } + ] + }, + "provisioningState": { + "$id": "7424", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Succeeded" + } + } + }, + "extendedLocation": { + "$id": "7425", + "kind": "model", + "type": { + "$ref": "510" + }, + "value": { + "$id": "7426", + "name": { + "$id": "7427", + "kind": "string", + "type": { + "$ref": "512" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "7428", + "kind": "string", + "type": { + "$ref": "44" + }, + "value": "CustomLocation" + } + } + }, + "id": { + "$id": "7429", + "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": "7430", + "kind": "string", + "type": { + "$ref": "424" + }, + "value": "jxhcpwgfkxqasbexkookvxk" + }, + "type": { + "$id": "7431", + "kind": "string", + "type": { + "$ref": "428" + }, + "value": "zkuozvgjseokfchkscoswthzjdry" + }, + "systemData": { + "$id": "7432", + "kind": "model", + "type": { + "$ref": "433" + }, + "value": { + "$id": "7433", + "createdBy": { + "$id": "7434", + "kind": "string", + "type": { + "$ref": "435" + }, + "value": "ssvaslsmudloholronopqyxjcu" + }, + "createdByType": { + "$id": "7435", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "createdAt": { + "$id": "7436", + "kind": "string", + "type": { + "$ref": "442" + }, + "value": "2024-08-09T18:13:29.389Z" + }, + "lastModifiedBy": { + "$id": "7437", + "kind": "string", + "type": { + "$ref": "447" + }, + "value": "gnicpuszwd" + }, + "lastModifiedByType": { + "$id": "7438", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "7439", + "kind": "string", + "type": { + "$ref": "454" + }, + "value": "2024-08-09T18:13:29.389Z" + } + } + } + } + } + } + ] + }, + { + "$id": "7440", + "kind": "http", + "name": "Dataflow_CreateOrUpdate_SimpleFabric", + "description": "Dataflow_CreateOrUpdate_SimpleFabric", + "filePath": "2025-04-01/Dataflow_CreateOrUpdate_SimpleFabric.json", + "parameters": [ + { + "$id": "7441", + "parameter": { + "$ref": "6473" + }, + "value": { + "$id": "7442", + "kind": "string", + "type": { + "$ref": "6474" + }, + "value": "2025-04-01" + } + }, + { + "$id": "7443", + "parameter": { + "$ref": "6477" + }, + "value": { + "$id": "7444", + "kind": "string", + "type": { + "$ref": "6478" + }, + "value": "F8C729F9-DF9C-4743-848F-96EE433D8E53" + } + }, + { + "$id": "7445", + "parameter": { + "$ref": "6480" + }, + "value": { + "$id": "7446", + "kind": "string", + "type": { + "$ref": "6481" + }, + "value": "rgiotoperations" + } + }, + { + "$id": "7447", + "parameter": { + "$ref": "6482" + }, + "value": { + "$id": "7448", + "kind": "string", + "type": { + "$ref": "6483" + }, + "value": "resource-name123" + } + }, + { + "$id": "7449", + "parameter": { + "$ref": "6484" + }, + "value": { + "$id": "7450", + "kind": "string", + "type": { + "$ref": "6485" + }, + "value": "resource-name123" + } + }, + { + "$id": "7451", + "parameter": { + "$ref": "6486" + }, + "value": { + "$id": "7452", + "kind": "string", + "type": { + "$ref": "6487" + }, + "value": "aio-to-fabric" + } + }, + { + "$id": "7453", + "parameter": { + "$ref": "6494" + }, + "value": { + "$id": "7454", + "kind": "model", + "type": { + "$ref": "1224" + }, + "value": { + "$id": "7455", + "properties": { + "$id": "7456", + "kind": "model", + "type": { + "$ref": "1226" + }, + "value": { + "$id": "7457", + "mode": { + "$id": "7458", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Enabled" + }, + "operations": { + "$id": "7459", + "kind": "array", + "type": { + "$ref": "1231" + }, + "value": [ + { + "$id": "7460", + "kind": "model", + "type": { + "$ref": "1232" + }, + "value": { + "$id": "7461", + "operationType": { + "$id": "7462", + "kind": "string", + "type": { + "$ref": "182" + }, + "value": "Source" + }, + "name": { + "$id": "7463", + "kind": "string", + "type": { + "$ref": "1237" + }, + "value": "source1" + }, + "sourceSettings": { + "$id": "7464", + "kind": "model", + "type": { + "$ref": "1241" + }, + "value": { + "$id": "7465", + "endpointRef": { + "$id": "7466", + "kind": "string", + "type": { + "$ref": "1243" + }, + "value": "aio-builtin-broker-endpoint" + }, + "dataSources": { + "$id": "7467", + "kind": "array", + "type": { + "$ref": "1258" + }, + "value": [ + { + "$id": "7468", + "kind": "string", + "type": { + "$ref": "1259" + }, + "value": "azure-iot-operations/data/thermostat" + } + ] + } + } + } + } + }, + { + "$id": "7469", + "kind": "model", + "type": { + "$ref": "1232" + }, + "value": { + "$id": "7470", + "operationType": { + "$id": "7471", + "kind": "string", + "type": { + "$ref": "182" + }, + "value": "BuiltInTransformation" + }, + "builtInTransformationSettings": { + "$id": "7472", + "kind": "model", + "type": { + "$ref": "1266" + }, + "value": { + "$id": "7473", + "serializationFormat": { + "$id": "7474", + "kind": "string", + "type": { + "$ref": "194" + }, + "value": "Parquet" + }, + "schemaRef": { + "$id": "7475", + "kind": "string", + "type": { + "$ref": "1271" + }, + "value": "aio-sr://exampleNamespace/exmapleParquetSchema:1.0.0" + } + } + } + } + }, + { + "$id": "7476", + "kind": "model", + "type": { + "$ref": "1232" + }, + "value": { + "$id": "7477", + "operationType": { + "$id": "7478", + "kind": "string", + "type": { + "$ref": "182" + }, + "value": "Destination" + }, + "name": { + "$id": "7479", + "kind": "string", + "type": { + "$ref": "1237" + }, + "value": "destination1" + }, + "destinationSettings": { + "$id": "7480", + "kind": "model", + "type": { + "$ref": "1349" + }, + "value": { + "$id": "7481", + "endpointRef": { + "$id": "7482", + "kind": "string", + "type": { + "$ref": "1351" + }, + "value": "fabric-endpoint" + }, + "dataDestination": { + "$id": "7483", + "kind": "string", + "type": { + "$ref": "1355" + }, + "value": "telemetryTable" + } + } + } + } + } + ] + } + } + }, + "extendedLocation": { + "$id": "7484", + "kind": "model", + "type": { + "$ref": "510" + }, + "value": { + "$id": "7485", + "name": { + "$id": "7486", + "kind": "string", + "type": { + "$ref": "512" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "7487", + "kind": "string", + "type": { + "$ref": "44" + }, + "value": "CustomLocation" + } + } + } + } + } + } + ], + "responses": [ + { + "$id": "7488", + "response": { + "$ref": "6495" + }, + "statusCode": 200, + "bodyValue": { + "$id": "7489", + "kind": "model", + "type": { + "$ref": "1224" + }, + "value": { + "$id": "7490", + "properties": { + "$id": "7491", + "kind": "model", + "type": { + "$ref": "1226" + }, + "value": { + "$id": "7492", + "mode": { + "$id": "7493", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Enabled" + }, + "operations": { + "$id": "7494", + "kind": "array", + "type": { + "$ref": "1231" + }, + "value": [ + { + "$id": "7495", + "kind": "model", + "type": { + "$ref": "1232" + }, + "value": { + "$id": "7496", + "operationType": { + "$id": "7497", + "kind": "string", + "type": { + "$ref": "182" + }, + "value": "Source" + }, + "name": { + "$id": "7498", + "kind": "string", + "type": { + "$ref": "1237" + }, + "value": "source1" + }, + "sourceSettings": { + "$id": "7499", + "kind": "model", + "type": { + "$ref": "1241" + }, + "value": { + "$id": "7500", + "endpointRef": { + "$id": "7501", + "kind": "string", + "type": { + "$ref": "1243" + }, + "value": "aio-builtin-broker-endpoint" + }, + "dataSources": { + "$id": "7502", + "kind": "array", + "type": { + "$ref": "1258" + }, + "value": [ + { + "$id": "7503", + "kind": "string", + "type": { + "$ref": "1259" + }, + "value": "azure-iot-operations/data/thermostat" + } + ] + } + } + } + } + }, + { + "$id": "7504", + "kind": "model", + "type": { + "$ref": "1232" + }, + "value": { + "$id": "7505", + "operationType": { + "$id": "7506", + "kind": "string", + "type": { + "$ref": "182" + }, + "value": "BuiltInTransformation" + }, + "builtInTransformationSettings": { + "$id": "7507", + "kind": "model", + "type": { + "$ref": "1266" + }, + "value": { + "$id": "7508", + "serializationFormat": { + "$id": "7509", + "kind": "string", + "type": { + "$ref": "194" + }, + "value": "Parquet" + }, + "schemaRef": { + "$id": "7510", + "kind": "string", + "type": { + "$ref": "1271" + }, + "value": "aio-sr://exampleNamespace/exmapleParquetSchema:1.0.0" + } + } + } + } + }, + { + "$id": "7511", + "kind": "model", + "type": { + "$ref": "1232" + }, + "value": { + "$id": "7512", + "operationType": { + "$id": "7513", + "kind": "string", + "type": { + "$ref": "182" + }, + "value": "Destination" + }, + "name": { + "$id": "7514", + "kind": "string", + "type": { + "$ref": "1237" + }, + "value": "destination1" + }, + "destinationSettings": { + "$id": "7515", + "kind": "model", + "type": { + "$ref": "1349" + }, + "value": { + "$id": "7516", + "endpointRef": { + "$id": "7517", + "kind": "string", + "type": { + "$ref": "1351" + }, + "value": "fabric-endpoint" + }, + "dataDestination": { + "$id": "7518", + "kind": "string", + "type": { + "$ref": "1355" + }, + "value": "telemetryTable" + } + } + } + } + } + ] + }, + "provisioningState": { + "$id": "7519", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Succeeded" + } + } + }, + "extendedLocation": { + "$id": "7520", + "kind": "model", + "type": { + "$ref": "510" + }, + "value": { + "$id": "7521", + "name": { + "$id": "7522", + "kind": "string", + "type": { + "$ref": "512" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "7523", + "kind": "string", + "type": { + "$ref": "44" + }, + "value": "CustomLocation" + } + } + }, + "id": { + "$id": "7524", + "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": "7525", + "kind": "string", + "type": { + "$ref": "424" + }, + "value": "jxhcpwgfkxqasbexkookvxk" + }, + "type": { + "$id": "7526", + "kind": "string", + "type": { + "$ref": "428" + }, + "value": "zkuozvgjseokfchkscoswthzjdry" + }, + "systemData": { + "$id": "7527", + "kind": "model", + "type": { + "$ref": "433" + }, + "value": { + "$id": "7528", + "createdBy": { + "$id": "7529", + "kind": "string", + "type": { + "$ref": "435" + }, + "value": "ssvaslsmudloholronopqyxjcu" + }, + "createdByType": { + "$id": "7530", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "createdAt": { + "$id": "7531", + "kind": "string", + "type": { + "$ref": "442" + }, + "value": "2024-08-09T18:13:29.389Z" + }, + "lastModifiedBy": { + "$id": "7532", + "kind": "string", + "type": { + "$ref": "447" + }, + "value": "gnicpuszwd" + }, + "lastModifiedByType": { + "$id": "7533", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "7534", + "kind": "string", + "type": { + "$ref": "454" + }, + "value": "2024-08-09T18:13:29.389Z" + } + } + } + } + } + }, + { + "$id": "7535", + "response": { + "$ref": "6496" + }, + "statusCode": 201, + "bodyValue": { + "$id": "7536", + "kind": "model", + "type": { + "$ref": "1224" + }, + "value": { + "$id": "7537", + "properties": { + "$id": "7538", + "kind": "model", + "type": { + "$ref": "1226" + }, + "value": { + "$id": "7539", + "mode": { + "$id": "7540", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Enabled" + }, + "operations": { + "$id": "7541", + "kind": "array", + "type": { + "$ref": "1231" + }, + "value": [ + { + "$id": "7542", + "kind": "model", + "type": { + "$ref": "1232" + }, + "value": { + "$id": "7543", + "operationType": { + "$id": "7544", + "kind": "string", + "type": { + "$ref": "182" + }, + "value": "Source" + }, + "name": { + "$id": "7545", + "kind": "string", + "type": { + "$ref": "1237" + }, + "value": "source1" + }, + "sourceSettings": { + "$id": "7546", + "kind": "model", + "type": { + "$ref": "1241" + }, + "value": { + "$id": "7547", + "endpointRef": { + "$id": "7548", + "kind": "string", + "type": { + "$ref": "1243" + }, + "value": "aio-builtin-broker-endpoint" + }, + "dataSources": { + "$id": "7549", + "kind": "array", + "type": { + "$ref": "1258" + }, + "value": [ + { + "$id": "7550", + "kind": "string", + "type": { + "$ref": "1259" + }, + "value": "azure-iot-operations/data/thermostat" + } + ] + } + } + } + } + }, + { + "$id": "7551", + "kind": "model", + "type": { + "$ref": "1232" + }, + "value": { + "$id": "7552", + "operationType": { + "$id": "7553", + "kind": "string", + "type": { + "$ref": "182" + }, + "value": "BuiltInTransformation" + }, + "builtInTransformationSettings": { + "$id": "7554", + "kind": "model", + "type": { + "$ref": "1266" + }, + "value": { + "$id": "7555", + "serializationFormat": { + "$id": "7556", + "kind": "string", + "type": { + "$ref": "194" + }, + "value": "Parquet" + }, + "schemaRef": { + "$id": "7557", + "kind": "string", + "type": { + "$ref": "1271" + }, + "value": "aio-sr://exampleNamespace/exmapleParquetSchema:1.0.0" + } + } + } + } + }, + { + "$id": "7558", + "kind": "model", + "type": { + "$ref": "1232" + }, + "value": { + "$id": "7559", + "operationType": { + "$id": "7560", + "kind": "string", + "type": { + "$ref": "182" + }, + "value": "Destination" + }, + "name": { + "$id": "7561", + "kind": "string", + "type": { + "$ref": "1237" + }, + "value": "destination1" + }, + "destinationSettings": { + "$id": "7562", + "kind": "model", + "type": { + "$ref": "1349" + }, + "value": { + "$id": "7563", + "endpointRef": { + "$id": "7564", + "kind": "string", + "type": { + "$ref": "1351" + }, + "value": "fabric-endpoint" + }, + "dataDestination": { + "$id": "7565", + "kind": "string", + "type": { + "$ref": "1355" + }, + "value": "telemetryTable" + } + } + } + } + } + ] + }, + "provisioningState": { + "$id": "7566", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Succeeded" + } + } + }, + "extendedLocation": { + "$id": "7567", + "kind": "model", + "type": { + "$ref": "510" + }, + "value": { + "$id": "7568", + "name": { + "$id": "7569", + "kind": "string", + "type": { + "$ref": "512" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "7570", + "kind": "string", + "type": { + "$ref": "44" + }, + "value": "CustomLocation" + } + } + }, + "id": { + "$id": "7571", + "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": "7572", + "kind": "string", + "type": { + "$ref": "424" + }, + "value": "jxhcpwgfkxqasbexkookvxk" + }, + "type": { + "$id": "7573", + "kind": "string", + "type": { + "$ref": "428" + }, + "value": "zkuozvgjseokfchkscoswthzjdry" + }, + "systemData": { + "$id": "7574", + "kind": "model", + "type": { + "$ref": "433" + }, + "value": { + "$id": "7575", + "createdBy": { + "$id": "7576", + "kind": "string", + "type": { + "$ref": "435" + }, + "value": "ssvaslsmudloholronopqyxjcu" + }, + "createdByType": { + "$id": "7577", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "createdAt": { + "$id": "7578", + "kind": "string", + "type": { + "$ref": "442" + }, + "value": "2024-08-09T18:13:29.389Z" + }, + "lastModifiedBy": { + "$id": "7579", + "kind": "string", + "type": { + "$ref": "447" + }, + "value": "gnicpuszwd" + }, + "lastModifiedByType": { + "$id": "7580", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "7581", + "kind": "string", + "type": { + "$ref": "454" + }, + "value": "2024-08-09T18:13:29.389Z" + } + } + } + } + } + } + ] + } + ] + }, + { + "$id": "7582", + "name": "delete", + "resourceName": "DataflowResource", + "doc": "Delete a DataflowResource", + "accessibility": "public", + "parameters": [ + { + "$id": "7583", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "7584", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "7585", + "type": { + "$id": "7586", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-04-01" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7587", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "7588", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "7589", + "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": "7590", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "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": "instanceName", + "nameInRequest": "instanceName", + "doc": "Name of instance.", + "type": { + "$id": "7593", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7594", + "name": "dataflowProfileName", + "nameInRequest": "dataflowProfileName", + "doc": "Name of Instance dataflowProfile resource", + "type": { + "$id": "7595", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7596", + "name": "dataflowName", + "nameInRequest": "dataflowName", + "doc": "Name of Instance dataflowProfile dataflow resource", + "type": { + "$id": "7597", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7598", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "7599", + "kind": "constant", + "valueType": { + "$id": "7600", + "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": "7601", + "statusCodes": [ + 202 + ], + "headers": [ + { + "$id": "7602", + "name": "location", + "nameInResponse": "Location", + "doc": "The Location header contains the URL where the status of the long running operation can be checked.", + "type": { + "$id": "7603", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + { + "$id": "7604", + "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": "7605", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + } + } + ], + "isErrorResponse": false + }, + { + "$id": "7606", + "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": "7607", + "finalStateVia": 1, + "finalResponse": { + "$id": "7608", + "statusCodes": [ + 204 + ] + } + }, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.IoTOperations.Dataflow.delete", + "decorators": [], + "examples": [ + { + "$id": "7609", + "kind": "http", + "name": "Dataflow_Delete", + "description": "Dataflow_Delete", + "filePath": "2025-04-01/Dataflow_Delete_MaximumSet_Gen.json", + "parameters": [ + { + "$id": "7610", + "parameter": { + "$ref": "7583" + }, + "value": { + "$id": "7611", + "kind": "string", + "type": { + "$ref": "7584" + }, + "value": "2025-04-01" + } + }, + { + "$id": "7612", + "parameter": { + "$ref": "7587" + }, + "value": { + "$id": "7613", + "kind": "string", + "type": { + "$ref": "7588" + }, + "value": "F8C729F9-DF9C-4743-848F-96EE433D8E53" + } + }, + { + "$id": "7614", + "parameter": { + "$ref": "7590" + }, + "value": { + "$id": "7615", + "kind": "string", + "type": { + "$ref": "7591" + }, + "value": "rgiotoperations" + } + }, + { + "$id": "7616", + "parameter": { + "$ref": "7592" + }, + "value": { + "$id": "7617", + "kind": "string", + "type": { + "$ref": "7593" + }, + "value": "resource-name123" + } + }, + { + "$id": "7618", + "parameter": { + "$ref": "7594" + }, + "value": { + "$id": "7619", + "kind": "string", + "type": { + "$ref": "7595" + }, + "value": "resource-name123" + } + }, + { + "$id": "7620", + "parameter": { + "$ref": "7596" + }, + "value": { + "$id": "7621", + "kind": "string", + "type": { + "$ref": "7597" + }, + "value": "resource-name123" + } + } + ], + "responses": [ + { + "$id": "7622", + "response": { + "$ref": "7601" + }, + "statusCode": 202 + }, + { + "$id": "7623", + "response": { + "$ref": "7606" + }, + "statusCode": 204 + } + ] + } + ] + }, + { + "$id": "7624", + "name": "listByResourceGroup", + "resourceName": "DataflowResource", + "doc": "List DataflowResource resources by DataflowProfileResource", + "accessibility": "public", + "parameters": [ + { + "$id": "7625", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "7626", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "7627", + "type": { + "$id": "7628", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-04-01" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7629", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "7630", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "7631", + "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": "7632", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "7633", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7634", + "name": "instanceName", + "nameInRequest": "instanceName", + "doc": "Name of instance.", + "type": { + "$id": "7635", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7636", + "name": "dataflowProfileName", + "nameInRequest": "dataflowProfileName", + "doc": "Name of Instance dataflowProfile resource", + "type": { + "$id": "7637", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7638", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "7639", + "kind": "constant", + "valueType": { + "$id": "7640", + "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": "7641", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "1371" + }, + "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": "7642", + "itemPropertySegments": [ + "value" + ], + "nextLink": { + "$id": "7643", + "responseSegments": [ + "nextLink" + ], + "responseLocation": "Body" + } + }, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.IoTOperations.Dataflow.listByResourceGroup", + "decorators": [], + "examples": [ + { + "$id": "7644", + "kind": "http", + "name": "Dataflow_ListByProfileResource", + "description": "Dataflow_ListByProfileResource", + "filePath": "2025-04-01/Dataflow_ListByProfileResource_MaximumSet_Gen.json", + "parameters": [ + { + "$id": "7645", + "parameter": { + "$ref": "7625" + }, + "value": { + "$id": "7646", + "kind": "string", + "type": { + "$ref": "7626" + }, + "value": "2025-04-01" + } + }, + { + "$id": "7647", + "parameter": { + "$ref": "7629" + }, + "value": { + "$id": "7648", + "kind": "string", + "type": { + "$ref": "7630" + }, + "value": "F8C729F9-DF9C-4743-848F-96EE433D8E53" + } + }, + { + "$id": "7649", + "parameter": { + "$ref": "7632" + }, + "value": { + "$id": "7650", + "kind": "string", + "type": { + "$ref": "7633" + }, + "value": "rgiotoperations" + } + }, + { + "$id": "7651", + "parameter": { + "$ref": "7634" + }, + "value": { + "$id": "7652", + "kind": "string", + "type": { + "$ref": "7635" + }, + "value": "resource-name123" + } + }, + { + "$id": "7653", + "parameter": { + "$ref": "7636" + }, + "value": { + "$id": "7654", + "kind": "string", + "type": { + "$ref": "7637" + }, + "value": "resource-name123" + } + } + ], + "responses": [ + { + "$id": "7655", + "response": { + "$ref": "7641" + }, + "statusCode": 200, + "bodyValue": { + "$id": "7656", + "kind": "model", + "type": { + "$ref": "1371" + }, + "value": { + "$id": "7657", + "value": { + "$id": "7658", + "kind": "array", + "type": { + "$ref": "1373" + }, + "value": [ + { + "$id": "7659", + "kind": "model", + "type": { + "$ref": "1224" + }, + "value": { + "$id": "7660", + "properties": { + "$id": "7661", + "kind": "model", + "type": { + "$ref": "1226" + }, + "value": { + "$id": "7662", + "mode": { + "$id": "7663", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Enabled" + }, + "operations": { + "$id": "7664", + "kind": "array", + "type": { + "$ref": "1231" + }, + "value": [ + { + "$id": "7665", + "kind": "model", + "type": { + "$ref": "1232" + }, + "value": { + "$id": "7666", + "operationType": { + "$id": "7667", + "kind": "string", + "type": { + "$ref": "182" + }, + "value": "Source" + }, + "name": { + "$id": "7668", + "kind": "string", + "type": { + "$ref": "1237" + }, + "value": "knnafvkwoeakm" + }, + "sourceSettings": { + "$id": "7669", + "kind": "model", + "type": { + "$ref": "1241" + }, + "value": { + "$id": "7670", + "endpointRef": { + "$id": "7671", + "kind": "string", + "type": { + "$ref": "1243" + }, + "value": "iixotodhvhkkfcfyrkoveslqig" + }, + "assetRef": { + "$id": "7672", + "kind": "string", + "type": { + "$ref": "1247" + }, + "value": "zayyykwmckaocywdkohmu" + }, + "serializationFormat": { + "$id": "7673", + "kind": "string", + "type": { + "$ref": "190" + }, + "value": "Json" + }, + "schemaRef": { + "$id": "7674", + "kind": "string", + "type": { + "$ref": "1254" + }, + "value": "pknmdzqll" + }, + "dataSources": { + "$id": "7675", + "kind": "array", + "type": { + "$ref": "1258" + }, + "value": [ + { + "$id": "7676", + "kind": "string", + "type": { + "$ref": "1259" + }, + "value": "chkkpymxhp" + } + ] + } + } + }, + "builtInTransformationSettings": { + "$id": "7677", + "kind": "model", + "type": { + "$ref": "1266" + }, + "value": { + "$id": "7678", + "serializationFormat": { + "$id": "7679", + "kind": "string", + "type": { + "$ref": "194" + }, + "value": "Delta" + }, + "schemaRef": { + "$id": "7680", + "kind": "string", + "type": { + "$ref": "1271" + }, + "value": "mcdc" + }, + "datasets": { + "$id": "7681", + "kind": "array", + "type": { + "$ref": "1275" + }, + "value": [ + { + "$id": "7682", + "kind": "model", + "type": { + "$ref": "1276" + }, + "value": { + "$id": "7683", + "key": { + "$id": "7684", + "kind": "string", + "type": { + "$ref": "1278" + }, + "value": "qsfqcgxaxnhfumrsdsokwyv" + }, + "description": { + "$id": "7685", + "kind": "string", + "type": { + "$ref": "1282" + }, + "value": "Lorem ipsum odor amet, consectetuer adipiscing elit." + }, + "schemaRef": { + "$id": "7686", + "kind": "string", + "type": { + "$ref": "1286" + }, + "value": "n" + }, + "inputs": { + "$id": "7687", + "kind": "array", + "type": { + "$ref": "1290" + }, + "value": [ + { + "$id": "7688", + "kind": "string", + "type": { + "$ref": "1291" + }, + "value": "mosffpsslifkq" + } + ] + }, + "expression": { + "$id": "7689", + "kind": "string", + "type": { + "$ref": "1295" + }, + "value": "aatbwomvflemsxialv" + } + } + } + ] + }, + "filter": { + "$id": "7690", + "kind": "array", + "type": { + "$ref": "1301" + }, + "value": [ + { + "$id": "7691", + "kind": "model", + "type": { + "$ref": "1302" + }, + "value": { + "$id": "7692", + "type": { + "$id": "7693", + "kind": "string", + "type": { + "$ref": "202" + }, + "value": "Filter" + }, + "description": { + "$id": "7694", + "kind": "string", + "type": { + "$ref": "1307" + }, + "value": "Lorem ipsum odor amet, consectetuer adipiscing elit." + }, + "inputs": { + "$id": "7695", + "kind": "array", + "type": { + "$ref": "1311" + }, + "value": [ + { + "$id": "7696", + "kind": "string", + "type": { + "$ref": "1312" + }, + "value": "sxmjkbntgb" + } + ] + }, + "expression": { + "$id": "7697", + "kind": "string", + "type": { + "$ref": "1316" + }, + "value": "n" + } + } + } + ] + }, + "map": { + "$id": "7698", + "kind": "array", + "type": { + "$ref": "1322" + }, + "value": [ + { + "$id": "7699", + "kind": "model", + "type": { + "$ref": "1323" + }, + "value": { + "$id": "7700", + "type": { + "$id": "7701", + "kind": "string", + "type": { + "$ref": "206" + }, + "value": "NewProperties" + }, + "description": { + "$id": "7702", + "kind": "string", + "type": { + "$ref": "1328" + }, + "value": "Lorem ipsum odor amet, consectetuer adipiscing elit." + }, + "inputs": { + "$id": "7703", + "kind": "array", + "type": { + "$ref": "1332" + }, + "value": [ + { + "$id": "7704", + "kind": "string", + "type": { + "$ref": "1333" + }, + "value": "xsbxuk" + } + ] + }, + "expression": { + "$id": "7705", + "kind": "string", + "type": { + "$ref": "1337" + }, + "value": "txoiltogsarwkzalsphvlmt" + }, + "output": { + "$id": "7706", + "kind": "string", + "type": { + "$ref": "1341" + }, + "value": "nvgtmkfl" + } + } + } + ] + } + } + }, + "destinationSettings": { + "$id": "7707", + "kind": "model", + "type": { + "$ref": "1349" + }, + "value": { + "$id": "7708", + "endpointRef": { + "$id": "7709", + "kind": "string", + "type": { + "$ref": "1351" + }, + "value": "kybkchnzimerguekuvqlqiqdvvrt" + }, + "dataDestination": { + "$id": "7710", + "kind": "string", + "type": { + "$ref": "1355" + }, + "value": "cbrh" + } + } + } + } + } + ] + }, + "provisioningState": { + "$id": "7711", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Succeeded" + } + } + }, + "extendedLocation": { + "$id": "7712", + "kind": "model", + "type": { + "$ref": "510" + }, + "value": { + "$id": "7713", + "name": { + "$id": "7714", + "kind": "string", + "type": { + "$ref": "512" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "7715", + "kind": "string", + "type": { + "$ref": "44" + }, + "value": "CustomLocation" + } + } + }, + "id": { + "$id": "7716", + "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": "7717", + "kind": "string", + "type": { + "$ref": "424" + }, + "value": "jxhcpwgfkxqasbexkookvxk" + }, + "type": { + "$id": "7718", + "kind": "string", + "type": { + "$ref": "428" + }, + "value": "zkuozvgjseokfchkscoswthzjdry" + }, + "systemData": { + "$id": "7719", + "kind": "model", + "type": { + "$ref": "433" + }, + "value": { + "$id": "7720", + "createdBy": { + "$id": "7721", + "kind": "string", + "type": { + "$ref": "435" + }, + "value": "ssvaslsmudloholronopqyxjcu" + }, + "createdByType": { + "$id": "7722", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "createdAt": { + "$id": "7723", + "kind": "string", + "type": { + "$ref": "442" + }, + "value": "2024-08-09T18:13:29.389Z" + }, + "lastModifiedBy": { + "$id": "7724", + "kind": "string", + "type": { + "$ref": "447" + }, + "value": "gnicpuszwd" + }, + "lastModifiedByType": { + "$id": "7725", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "7726", + "kind": "string", + "type": { + "$ref": "454" + }, + "value": "2024-08-09T18:13:29.389Z" + } + } + } + } + } + ] + }, + "nextLink": { + "$id": "7727", + "kind": "string", + "type": { + "$ref": "1377" + }, + "value": "https://microsoft.com/a" + } + } + } + } + ] + } + ] + } + ], + "parameters": [ + { + "$id": "7728", + "name": "endpoint", + "nameInRequest": "endpoint", + "doc": "Service host", + "type": { + "$id": "7729", + "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": "7730", + "type": { + "$id": "7731", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "https://management.azure.com" + } + } + ], + "decorators": [ + { + "$id": "7732", + "name": "Azure.ResourceManager.@armResourceOperations", + "arguments": { + "$id": "7733" + } + } + ], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.Dataflow", + "apiVersions": [ + "2024-11-01", + "2025-04-01" + ], + "parent": { + "$ref": "1692" + } + }, + { + "$id": "7734", + "kind": "client", + "name": "DataflowEndpoint", + "namespace": "Azure.ResourceManager.IotOperations", + "operations": [ + { + "$id": "7735", + "name": "get", + "resourceName": "DataflowEndpointResource", + "doc": "Get a DataflowEndpointResource", + "accessibility": "public", + "parameters": [ + { + "$id": "7736", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "7737", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "7738", + "type": { + "$id": "7739", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-04-01" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7740", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "7741", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "7742", + "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": "7743", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "7744", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7745", + "name": "instanceName", + "nameInRequest": "instanceName", + "doc": "Name of instance.", + "type": { + "$id": "7746", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7747", + "name": "dataflowEndpointName", + "nameInRequest": "dataflowEndpointName", + "doc": "Name of Instance dataflowEndpoint resource", + "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 + ], + "bodyType": { + "$ref": "1381" + }, + "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": "7753", + "kind": "http", + "name": "DataflowEndpoint_Get", + "description": "DataflowEndpoint_Get", + "filePath": "2025-04-01/DataflowEndpoint_Get_MaximumSet_Gen.json", + "parameters": [ + { + "$id": "7754", + "parameter": { + "$ref": "7736" + }, + "value": { + "$id": "7755", + "kind": "string", + "type": { + "$ref": "7737" + }, + "value": "2025-04-01" + } + }, + { + "$id": "7756", + "parameter": { + "$ref": "7740" + }, + "value": { + "$id": "7757", + "kind": "string", + "type": { + "$ref": "7741" + }, + "value": "F8C729F9-DF9C-4743-848F-96EE433D8E53" + } + }, + { + "$id": "7758", + "parameter": { + "$ref": "7743" + }, + "value": { + "$id": "7759", + "kind": "string", + "type": { + "$ref": "7744" + }, + "value": "rgiotoperations" + } + }, + { + "$id": "7760", + "parameter": { + "$ref": "7745" + }, + "value": { + "$id": "7761", + "kind": "string", + "type": { + "$ref": "7746" + }, + "value": "resource-name123" + } + }, + { + "$id": "7762", + "parameter": { + "$ref": "7747" + }, + "value": { + "$id": "7763", + "kind": "string", + "type": { + "$ref": "7748" + }, + "value": "resource-name123" + } + } + ], + "responses": [ + { + "$id": "7764", + "response": { + "$ref": "7752" + }, + "statusCode": 200, + "bodyValue": { + "$id": "7765", + "kind": "model", + "type": { + "$ref": "1381" + }, + "value": { + "$id": "7766", + "properties": { + "$id": "7767", + "kind": "model", + "type": { + "$ref": "1383" + }, + "value": { + "$id": "7768", + "endpointType": { + "$id": "7769", + "kind": "string", + "type": { + "$ref": "218" + }, + "value": "DataExplorer" + }, + "dataExplorerSettings": { + "$id": "7770", + "kind": "model", + "type": { + "$ref": "1388" + }, + "value": { + "$id": "7771", + "authentication": { + "$id": "7772", + "kind": "model", + "type": { + "$ref": "1390" + }, + "value": { + "$id": "7773", + "method": { + "$id": "7774", + "kind": "string", + "type": { + "$ref": "232" + }, + "value": "SystemAssignedManagedIdentity" + }, + "systemAssignedManagedIdentitySettings": { + "$id": "7775", + "kind": "model", + "type": { + "$ref": "1395" + }, + "value": { + "$id": "7776", + "audience": { + "$id": "7777", + "kind": "string", + "type": { + "$ref": "1397" + }, + "value": "psxomrfbhoflycm" + } + } + }, + "userAssignedManagedIdentitySettings": { + "$id": "7778", + "kind": "model", + "type": { + "$ref": "1403" + }, + "value": { + "$id": "7779", + "clientId": { + "$id": "7780", + "kind": "string", + "type": { + "$ref": "1405" + }, + "value": "fb90f267-8872-431a-a76a-a1cec5d3c4d2" + }, + "scope": { + "$id": "7781", + "kind": "string", + "type": { + "$ref": "1409" + }, + "value": "zop" + }, + "tenantId": { + "$id": "7782", + "kind": "string", + "type": { + "$ref": "1413" + }, + "value": "ed060aa2-71ff-4d3f-99c4-a9138356fdec" + } + } + } + } + }, + "database": { + "$id": "7783", + "kind": "string", + "type": { + "$ref": "1421" + }, + "value": "yqcdpjsifm" + }, + "host": { + "$id": "7784", + "kind": "string", + "type": { + "$ref": "1425" + }, + "value": "..kusto.windows.net" + }, + "batching": { + "$id": "7785", + "kind": "model", + "type": { + "$ref": "1429" + }, + "value": { + "$id": "7786", + "latencySeconds": { + "$id": "7787", + "kind": "number", + "type": { + "$ref": "1431" + }, + "value": 1228 + }, + "maxMessages": { + "$id": "7788", + "kind": "number", + "type": { + "$ref": "1435" + }, + "value": 171 + } + } + } + } + }, + "dataLakeStorageSettings": { + "$id": "7789", + "kind": "model", + "type": { + "$ref": "1443" + }, + "value": { + "$id": "7790", + "authentication": { + "$id": "7791", + "kind": "model", + "type": { + "$ref": "1445" + }, + "value": { + "$id": "7792", + "method": { + "$id": "7793", + "kind": "string", + "type": { + "$ref": "238" + }, + "value": "SystemAssignedManagedIdentity" + }, + "accessTokenSettings": { + "$id": "7794", + "kind": "model", + "type": { + "$ref": "1450" + }, + "value": { + "$id": "7795", + "secretRef": { + "$id": "7796", + "kind": "string", + "type": { + "$ref": "1452" + }, + "value": "sevriyphcvnlrnfudqzejecwa" + } + } + }, + "systemAssignedManagedIdentitySettings": { + "$id": "7797", + "kind": "model", + "type": { + "$ref": "1395" + }, + "value": { + "$id": "7798", + "audience": { + "$id": "7799", + "kind": "string", + "type": { + "$ref": "1397" + }, + "value": "psxomrfbhoflycm" + } + } + }, + "userAssignedManagedIdentitySettings": { + "$id": "7800", + "kind": "model", + "type": { + "$ref": "1403" + }, + "value": { + "$id": "7801", + "clientId": { + "$id": "7802", + "kind": "string", + "type": { + "$ref": "1405" + }, + "value": "fb90f267-8872-431a-a76a-a1cec5d3c4d2" + }, + "scope": { + "$id": "7803", + "kind": "string", + "type": { + "$ref": "1409" + }, + "value": "zop" + }, + "tenantId": { + "$id": "7804", + "kind": "string", + "type": { + "$ref": "1413" + }, + "value": "ed060aa2-71ff-4d3f-99c4-a9138356fdec" + } + } + } + } + }, + "host": { + "$id": "7805", + "kind": "string", + "type": { + "$ref": "1466" + }, + "value": ".blob.core.windows.net" + }, + "batching": { + "$id": "7806", + "kind": "model", + "type": { + "$ref": "1429" + }, + "value": { + "$id": "7807", + "latencySeconds": { + "$id": "7808", + "kind": "number", + "type": { + "$ref": "1431" + }, + "value": 1228 + }, + "maxMessages": { + "$id": "7809", + "kind": "number", + "type": { + "$ref": "1435" + }, + "value": 171 + } + } + } + } + }, + "fabricOneLakeSettings": { + "$id": "7810", + "kind": "model", + "type": { + "$ref": "1475" + }, + "value": { + "$id": "7811", + "authentication": { + "$id": "7812", + "kind": "model", + "type": { + "$ref": "1477" + }, + "value": { + "$id": "7813", + "method": { + "$id": "7814", + "kind": "string", + "type": { + "$ref": "246" + }, + "value": "SystemAssignedManagedIdentity" + }, + "systemAssignedManagedIdentitySettings": { + "$id": "7815", + "kind": "model", + "type": { + "$ref": "1395" + }, + "value": { + "$id": "7816", + "audience": { + "$id": "7817", + "kind": "string", + "type": { + "$ref": "1397" + }, + "value": "psxomrfbhoflycm" + } + } + }, + "userAssignedManagedIdentitySettings": { + "$id": "7818", + "kind": "model", + "type": { + "$ref": "1403" + }, + "value": { + "$id": "7819", + "clientId": { + "$id": "7820", + "kind": "string", + "type": { + "$ref": "1405" + }, + "value": "fb90f267-8872-431a-a76a-a1cec5d3c4d2" + }, + "scope": { + "$id": "7821", + "kind": "string", + "type": { + "$ref": "1409" + }, + "value": "zop" + }, + "tenantId": { + "$id": "7822", + "kind": "string", + "type": { + "$ref": "1413" + }, + "value": "ed060aa2-71ff-4d3f-99c4-a9138356fdec" + } + } + } + } + }, + "names": { + "$id": "7823", + "kind": "model", + "type": { + "$ref": "1490" + }, + "value": { + "$id": "7824", + "lakehouseName": { + "$id": "7825", + "kind": "string", + "type": { + "$ref": "1492" + }, + "value": "wpeathi" + }, + "workspaceName": { + "$id": "7826", + "kind": "string", + "type": { + "$ref": "1496" + }, + "value": "nwgmitkbljztgms" + } + } + }, + "oneLakePathType": { + "$id": "7827", + "kind": "string", + "type": { + "$ref": "252" + }, + "value": "Files" + }, + "host": { + "$id": "7828", + "kind": "string", + "type": { + "$ref": "1505" + }, + "value": "https://.fabric.microsoft.com" + }, + "batching": { + "$id": "7829", + "kind": "model", + "type": { + "$ref": "1429" + }, + "value": { + "$id": "7830", + "latencySeconds": { + "$id": "7831", + "kind": "number", + "type": { + "$ref": "1431" + }, + "value": 1228 + }, + "maxMessages": { + "$id": "7832", + "kind": "number", + "type": { + "$ref": "1435" + }, + "value": 171 + } + } + } + } + }, + "kafkaSettings": { + "$id": "7833", + "kind": "model", + "type": { + "$ref": "1514" + }, + "value": { + "$id": "7834", + "authentication": { + "$id": "7835", + "kind": "model", + "type": { + "$ref": "1516" + }, + "value": { + "$id": "7836", + "method": { + "$id": "7837", + "kind": "string", + "type": { + "$ref": "258" + }, + "value": "SystemAssignedManagedIdentity" + }, + "systemAssignedManagedIdentitySettings": { + "$id": "7838", + "kind": "model", + "type": { + "$ref": "1395" + }, + "value": { + "$id": "7839", + "audience": { + "$id": "7840", + "kind": "string", + "type": { + "$ref": "1397" + }, + "value": "psxomrfbhoflycm" + } + } + }, + "userAssignedManagedIdentitySettings": { + "$id": "7841", + "kind": "model", + "type": { + "$ref": "1403" + }, + "value": { + "$id": "7842", + "clientId": { + "$id": "7843", + "kind": "string", + "type": { + "$ref": "1405" + }, + "value": "fb90f267-8872-431a-a76a-a1cec5d3c4d2" + }, + "scope": { + "$id": "7844", + "kind": "string", + "type": { + "$ref": "1409" + }, + "value": "zop" + }, + "tenantId": { + "$id": "7845", + "kind": "string", + "type": { + "$ref": "1413" + }, + "value": "ed060aa2-71ff-4d3f-99c4-a9138356fdec" + } + } + }, + "saslSettings": { + "$id": "7846", + "kind": "model", + "type": { + "$ref": "1527" + }, + "value": { + "$id": "7847", + "saslType": { + "$id": "7848", + "kind": "string", + "type": { + "$ref": "270" + }, + "value": "Plain" + }, + "secretRef": { + "$id": "7849", + "kind": "string", + "type": { + "$ref": "1532" + }, + "value": "visyxoztqnylvbyokhtmpdkwes" + } + } + }, + "x509CertificateSettings": { + "$id": "7850", + "kind": "model", + "type": { + "$ref": "1538" + }, + "value": { + "$id": "7851", + "secretRef": { + "$id": "7852", + "kind": "string", + "type": { + "$ref": "1540" + }, + "value": "afwizrystfslkfqd" + } + } + } + } + }, + "consumerGroupId": { + "$id": "7853", + "kind": "string", + "type": { + "$ref": "1548" + }, + "value": "ukkzcjiyenhxokat" + }, + "host": { + "$id": "7854", + "kind": "string", + "type": { + "$ref": "1552" + }, + "value": "pwcqfiqclcgneolpewnyavoulbip" + }, + "batching": { + "$id": "7855", + "kind": "model", + "type": { + "$ref": "1556" + }, + "value": { + "$id": "7856", + "mode": { + "$id": "7857", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Enabled" + }, + "latencyMs": { + "$id": "7858", + "kind": "number", + "type": { + "$ref": "1561" + }, + "value": 3679 + }, + "maxBytes": { + "$id": "7859", + "kind": "number", + "type": { + "$ref": "1565" + }, + "value": 8887 + }, + "maxMessages": { + "$id": "7860", + "kind": "number", + "type": { + "$ref": "1569" + }, + "value": 2174 + } + } + }, + "copyMqttProperties": { + "$id": "7861", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Enabled" + }, + "compression": { + "$id": "7862", + "kind": "string", + "type": { + "$ref": "278" + }, + "value": "None" + }, + "kafkaAcks": { + "$id": "7863", + "kind": "string", + "type": { + "$ref": "288" + }, + "value": "Zero" + }, + "partitionStrategy": { + "$id": "7864", + "kind": "string", + "type": { + "$ref": "296" + }, + "value": "Default" + }, + "tls": { + "$id": "7865", + "kind": "model", + "type": { + "$ref": "1587" + }, + "value": { + "$id": "7866", + "mode": { + "$id": "7867", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Enabled" + }, + "trustedCaCertificateConfigMapRef": { + "$id": "7868", + "kind": "string", + "type": { + "$ref": "1592" + }, + "value": "tectjjvukvelsreihwadh" + } + } + }, + "cloudEventAttributes": { + "$id": "7869", + "kind": "string", + "type": { + "$ref": "306" + }, + "value": "PassThrough" + } + } + }, + "localStorageSettings": { + "$id": "7870", + "kind": "model", + "type": { + "$ref": "1603" + }, + "value": { + "$id": "7871", + "persistentVolumeClaimRef": { + "$id": "7872", + "kind": "string", + "type": { + "$ref": "1605" + }, + "value": "jjwqwvd" + } + } + }, + "mqttSettings": { + "$id": "7873", + "kind": "model", + "type": { + "$ref": "1611" + }, + "value": { + "$id": "7874", + "authentication": { + "$id": "7875", + "kind": "model", + "type": { + "$ref": "1613" + }, + "value": { + "$id": "7876", + "method": { + "$id": "7877", + "kind": "string", + "type": { + "$ref": "312" + }, + "value": "SystemAssignedManagedIdentity" + }, + "systemAssignedManagedIdentitySettings": { + "$id": "7878", + "kind": "model", + "type": { + "$ref": "1395" + }, + "value": { + "$id": "7879", + "audience": { + "$id": "7880", + "kind": "string", + "type": { + "$ref": "1397" + }, + "value": "psxomrfbhoflycm" + } + } + }, + "userAssignedManagedIdentitySettings": { + "$id": "7881", + "kind": "model", + "type": { + "$ref": "1403" + }, + "value": { + "$id": "7882", + "clientId": { + "$id": "7883", + "kind": "string", + "type": { + "$ref": "1405" + }, + "value": "fb90f267-8872-431a-a76a-a1cec5d3c4d2" + }, + "scope": { + "$id": "7884", + "kind": "string", + "type": { + "$ref": "1409" + }, + "value": "zop" + }, + "tenantId": { + "$id": "7885", + "kind": "string", + "type": { + "$ref": "1413" + }, + "value": "ed060aa2-71ff-4d3f-99c4-a9138356fdec" + } + } + }, + "serviceAccountTokenSettings": { + "$id": "7886", + "kind": "model", + "type": { + "$ref": "1624" + }, + "value": { + "$id": "7887", + "audience": { + "$id": "7888", + "kind": "string", + "type": { + "$ref": "1626" + }, + "value": "ejbklrbxgjaqleoycgpje" + } + } + }, + "x509CertificateSettings": { + "$id": "7889", + "kind": "model", + "type": { + "$ref": "1538" + }, + "value": { + "$id": "7890", + "secretRef": { + "$id": "7891", + "kind": "string", + "type": { + "$ref": "1540" + }, + "value": "afwizrystfslkfqd" + } + } + } + } + }, + "clientIdPrefix": { + "$id": "7892", + "kind": "string", + "type": { + "$ref": "1637" + }, + "value": "kkljsdxdirfhwxtkavldekeqhv" + }, + "host": { + "$id": "7893", + "kind": "string", + "type": { + "$ref": "1641" + }, + "value": "nyhnxqnbspstctl" + }, + "protocol": { + "$id": "7894", + "kind": "string", + "type": { + "$ref": "124" + }, + "value": "Mqtt" + }, + "keepAliveSeconds": { + "$id": "7895", + "kind": "number", + "type": { + "$ref": "1648" + }, + "value": 0 + }, + "retain": { + "$id": "7896", + "kind": "string", + "type": { + "$ref": "324" + }, + "value": "Keep" + }, + "maxInflightMessages": { + "$id": "7897", + "kind": "number", + "type": { + "$ref": "1655" + }, + "value": 0 + }, + "qos": { + "$id": "7898", + "kind": "number", + "type": { + "$ref": "1659" + }, + "value": 1 + }, + "sessionExpirySeconds": { + "$id": "7899", + "kind": "number", + "type": { + "$ref": "1663" + }, + "value": 0 + }, + "tls": { + "$id": "7900", + "kind": "model", + "type": { + "$ref": "1587" + }, + "value": { + "$id": "7901", + "mode": { + "$id": "7902", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Enabled" + }, + "trustedCaCertificateConfigMapRef": { + "$id": "7903", + "kind": "string", + "type": { + "$ref": "1592" + }, + "value": "tectjjvukvelsreihwadh" + } + } + }, + "cloudEventAttributes": { + "$id": "7904", + "kind": "string", + "type": { + "$ref": "306" + }, + "value": "PassThrough" + } + } + }, + "provisioningState": { + "$id": "7905", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Succeeded" + } + } + }, + "extendedLocation": { + "$id": "7906", + "kind": "model", + "type": { + "$ref": "510" + }, + "value": { + "$id": "7907", + "name": { + "$id": "7908", + "kind": "string", + "type": { + "$ref": "512" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "7909", + "kind": "string", + "type": { + "$ref": "44" + }, + "value": "CustomLocation" + } + } + }, + "id": { + "$id": "7910", + "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": "7911", + "kind": "string", + "type": { + "$ref": "424" + }, + "value": "zyhxscudobzfacetvgyjiav" + }, + "type": { + "$id": "7912", + "kind": "string", + "type": { + "$ref": "428" + }, + "value": "iay" + }, + "systemData": { + "$id": "7913", + "kind": "model", + "type": { + "$ref": "433" + }, + "value": { + "$id": "7914", + "createdBy": { + "$id": "7915", + "kind": "string", + "type": { + "$ref": "435" + }, + "value": "ssvaslsmudloholronopqyxjcu" + }, + "createdByType": { + "$id": "7916", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "createdAt": { + "$id": "7917", + "kind": "string", + "type": { + "$ref": "442" + }, + "value": "2024-08-09T18:13:29.389Z" + }, + "lastModifiedBy": { + "$id": "7918", + "kind": "string", + "type": { + "$ref": "447" + }, + "value": "gnicpuszwd" + }, + "lastModifiedByType": { + "$id": "7919", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "7920", + "kind": "string", + "type": { + "$ref": "454" + }, + "value": "2024-08-09T18:13:29.389Z" + } + } + } + } + } + } + ] + } + ] + }, + { + "$id": "7921", + "name": "createOrUpdate", + "resourceName": "DataflowEndpointResource", + "doc": "Create a DataflowEndpointResource", + "accessibility": "public", + "parameters": [ + { + "$id": "7922", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "7923", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "7924", + "type": { + "$id": "7925", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-04-01" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7926", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "7927", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "7928", + "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": "7929", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "7930", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7931", + "name": "instanceName", + "nameInRequest": "instanceName", + "doc": "Name of instance.", + "type": { + "$id": "7932", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7933", + "name": "dataflowEndpointName", + "nameInRequest": "dataflowEndpointName", + "doc": "Name of Instance dataflowEndpoint resource", + "type": { + "$id": "7934", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7935", + "name": "contentType", + "nameInRequest": "Content-Type", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$id": "7936", + "kind": "constant", + "valueType": { + "$id": "7937", + "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": "7938", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "7939", + "kind": "constant", + "valueType": { + "$id": "7940", + "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": "7941", + "name": "resource", + "nameInRequest": "resource", + "doc": "Resource create parameters.", + "type": { + "$ref": "1381" + }, + "location": "Body", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "7942", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "1381" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + }, + { + "$id": "7943", + "statusCodes": [ + 201 + ], + "bodyType": { + "$ref": "1381" + }, + "headers": [ + { + "$id": "7944", + "name": "azureAsyncOperation", + "nameInResponse": "Azure-AsyncOperation", + "doc": "A link to the status monitor", + "type": { + "$id": "7945", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + { + "$id": "7946", + "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": "7947", + "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": "7948", + "finalStateVia": 0, + "finalResponse": { + "$id": "7949", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "1381" + } + } + }, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpoint.createOrUpdate", + "decorators": [], + "examples": [ + { + "$id": "7950", + "kind": "http", + "name": "DataflowEndpoint_CreateOrUpdate_ADLSv2", + "description": "DataflowEndpoint_CreateOrUpdate_ADLSv2", + "filePath": "2025-04-01/DataflowEndpoint_CreateOrUpdate_ADLSv2.json", + "parameters": [ + { + "$id": "7951", + "parameter": { + "$ref": "7922" + }, + "value": { + "$id": "7952", + "kind": "string", + "type": { + "$ref": "7923" + }, + "value": "2025-04-01" + } + }, + { + "$id": "7953", + "parameter": { + "$ref": "7926" + }, + "value": { + "$id": "7954", + "kind": "string", + "type": { + "$ref": "7927" + }, + "value": "F8C729F9-DF9C-4743-848F-96EE433D8E53" + } + }, + { + "$id": "7955", + "parameter": { + "$ref": "7929" + }, + "value": { + "$id": "7956", + "kind": "string", + "type": { + "$ref": "7930" + }, + "value": "rgiotoperations" + } + }, + { + "$id": "7957", + "parameter": { + "$ref": "7931" + }, + "value": { + "$id": "7958", + "kind": "string", + "type": { + "$ref": "7932" + }, + "value": "resource-name123" + } + }, + { + "$id": "7959", + "parameter": { + "$ref": "7933" + }, + "value": { + "$id": "7960", + "kind": "string", + "type": { + "$ref": "7934" + }, + "value": "adlsv2-endpoint" + } + }, + { + "$id": "7961", + "parameter": { + "$ref": "7941" + }, + "value": { + "$id": "7962", + "kind": "model", + "type": { + "$ref": "1381" + }, + "value": { + "$id": "7963", + "properties": { + "$id": "7964", + "kind": "model", + "type": { + "$ref": "1383" + }, + "value": { + "$id": "7965", + "endpointType": { + "$id": "7966", + "kind": "string", + "type": { + "$ref": "218" + }, + "value": "DataLakeStorage" + }, + "dataLakeStorageSettings": { + "$id": "7967", + "kind": "model", + "type": { + "$ref": "1443" + }, + "value": { + "$id": "7968", + "host": { + "$id": "7969", + "kind": "string", + "type": { + "$ref": "1466" + }, + "value": "example.blob.core.windows.net" + }, + "authentication": { + "$id": "7970", + "kind": "model", + "type": { + "$ref": "1445" + }, + "value": { + "$id": "7971", + "method": { + "$id": "7972", + "kind": "string", + "type": { + "$ref": "238" + }, + "value": "AccessToken" + }, + "accessTokenSettings": { + "$id": "7973", + "kind": "model", + "type": { + "$ref": "1450" + }, + "value": { + "$id": "7974", + "secretRef": { + "$id": "7975", + "kind": "string", + "type": { + "$ref": "1452" + }, + "value": "my-secret" + } + } + } + } + } + } + } + } + }, + "extendedLocation": { + "$id": "7976", + "kind": "model", + "type": { + "$ref": "510" + }, + "value": { + "$id": "7977", + "name": { + "$id": "7978", + "kind": "string", + "type": { + "$ref": "512" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "7979", + "kind": "string", + "type": { + "$ref": "44" + }, + "value": "CustomLocation" + } + } + } + } + } + } + ], + "responses": [ + { + "$id": "7980", + "response": { + "$ref": "7942" + }, + "statusCode": 200, + "bodyValue": { + "$id": "7981", + "kind": "model", + "type": { + "$ref": "1381" + }, + "value": { + "$id": "7982", + "properties": { + "$id": "7983", + "kind": "model", + "type": { + "$ref": "1383" + }, + "value": { + "$id": "7984", + "endpointType": { + "$id": "7985", + "kind": "string", + "type": { + "$ref": "218" + }, + "value": "DataLakeStorage" + }, + "dataLakeStorageSettings": { + "$id": "7986", + "kind": "model", + "type": { + "$ref": "1443" + }, + "value": { + "$id": "7987", + "host": { + "$id": "7988", + "kind": "string", + "type": { + "$ref": "1466" + }, + "value": "example.blob.core.windows.net" + }, + "authentication": { + "$id": "7989", + "kind": "model", + "type": { + "$ref": "1445" + }, + "value": { + "$id": "7990", + "method": { + "$id": "7991", + "kind": "string", + "type": { + "$ref": "238" + }, + "value": "AccessToken" + }, + "accessTokenSettings": { + "$id": "7992", + "kind": "model", + "type": { + "$ref": "1450" + }, + "value": { + "$id": "7993", + "secretRef": { + "$id": "7994", + "kind": "string", + "type": { + "$ref": "1452" + }, + "value": "my-secret" + } + } + } + } + } + } + }, + "provisioningState": { + "$id": "7995", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Succeeded" + } + } + }, + "extendedLocation": { + "$id": "7996", + "kind": "model", + "type": { + "$ref": "510" + }, + "value": { + "$id": "7997", + "name": { + "$id": "7998", + "kind": "string", + "type": { + "$ref": "512" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "7999", + "kind": "string", + "type": { + "$ref": "44" + }, + "value": "CustomLocation" + } + } + }, + "id": { + "$id": "8000", + "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": "8001", + "kind": "string", + "type": { + "$ref": "424" + }, + "value": "zyhxscudobzfacetvgyjiav" + }, + "type": { + "$id": "8002", + "kind": "string", + "type": { + "$ref": "428" + }, + "value": "iay" + }, + "systemData": { + "$id": "8003", + "kind": "model", + "type": { + "$ref": "433" + }, + "value": { + "$id": "8004", + "createdBy": { + "$id": "8005", + "kind": "string", + "type": { + "$ref": "435" + }, + "value": "ssvaslsmudloholronopqyxjcu" + }, + "createdByType": { + "$id": "8006", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "createdAt": { + "$id": "8007", + "kind": "string", + "type": { + "$ref": "442" + }, + "value": "2024-08-09T18:13:29.389Z" + }, + "lastModifiedBy": { + "$id": "8008", + "kind": "string", + "type": { + "$ref": "447" + }, + "value": "gnicpuszwd" + }, + "lastModifiedByType": { + "$id": "8009", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "8010", + "kind": "string", + "type": { + "$ref": "454" + }, + "value": "2024-08-09T18:13:29.389Z" + } + } + } + } + } + }, + { + "$id": "8011", + "response": { + "$ref": "7943" + }, + "statusCode": 201, + "bodyValue": { + "$id": "8012", + "kind": "model", + "type": { + "$ref": "1381" + }, + "value": { + "$id": "8013", + "properties": { + "$id": "8014", + "kind": "model", + "type": { + "$ref": "1383" + }, + "value": { + "$id": "8015", + "endpointType": { + "$id": "8016", + "kind": "string", + "type": { + "$ref": "218" + }, + "value": "DataLakeStorage" + }, + "dataLakeStorageSettings": { + "$id": "8017", + "kind": "model", + "type": { + "$ref": "1443" + }, + "value": { + "$id": "8018", + "host": { + "$id": "8019", + "kind": "string", + "type": { + "$ref": "1466" + }, + "value": "example.blob.core.windows.net" + }, + "authentication": { + "$id": "8020", + "kind": "model", + "type": { + "$ref": "1445" + }, + "value": { + "$id": "8021", + "method": { + "$id": "8022", + "kind": "string", + "type": { + "$ref": "238" + }, + "value": "AccessToken" + }, + "accessTokenSettings": { + "$id": "8023", + "kind": "model", + "type": { + "$ref": "1450" + }, + "value": { + "$id": "8024", + "secretRef": { + "$id": "8025", + "kind": "string", + "type": { + "$ref": "1452" + }, + "value": "my-secret" + } + } + } + } + } + } + }, + "provisioningState": { + "$id": "8026", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Succeeded" + } + } + }, + "extendedLocation": { + "$id": "8027", + "kind": "model", + "type": { + "$ref": "510" + }, + "value": { + "$id": "8028", + "name": { + "$id": "8029", + "kind": "string", + "type": { + "$ref": "512" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "8030", + "kind": "string", + "type": { + "$ref": "44" + }, + "value": "CustomLocation" + } + } + }, + "id": { + "$id": "8031", + "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": "8032", + "kind": "string", + "type": { + "$ref": "424" + }, + "value": "zyhxscudobzfacetvgyjiav" + }, + "type": { + "$id": "8033", + "kind": "string", + "type": { + "$ref": "428" + }, + "value": "iay" + }, + "systemData": { + "$id": "8034", + "kind": "model", + "type": { + "$ref": "433" + }, + "value": { + "$id": "8035", + "createdBy": { + "$id": "8036", + "kind": "string", + "type": { + "$ref": "435" + }, + "value": "ssvaslsmudloholronopqyxjcu" + }, + "createdByType": { + "$id": "8037", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "createdAt": { + "$id": "8038", + "kind": "string", + "type": { + "$ref": "442" + }, + "value": "2024-08-09T18:13:29.389Z" + }, + "lastModifiedBy": { + "$id": "8039", + "kind": "string", + "type": { + "$ref": "447" + }, + "value": "gnicpuszwd" + }, + "lastModifiedByType": { + "$id": "8040", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "8041", + "kind": "string", + "type": { + "$ref": "454" + }, + "value": "2024-08-09T18:13:29.389Z" + } + } + } + } + } + } + ] + }, + { + "$id": "8042", + "kind": "http", + "name": "DataflowEndpoint_CreateOrUpdate_ADX", + "description": "DataflowEndpoint_CreateOrUpdate_ADX", + "filePath": "2025-04-01/DataflowEndpoint_CreateOrUpdate_ADX.json", + "parameters": [ + { + "$id": "8043", + "parameter": { + "$ref": "7922" + }, + "value": { + "$id": "8044", + "kind": "string", + "type": { + "$ref": "7923" + }, + "value": "2025-04-01" + } + }, + { + "$id": "8045", + "parameter": { + "$ref": "7926" + }, + "value": { + "$id": "8046", + "kind": "string", + "type": { + "$ref": "7927" + }, + "value": "F8C729F9-DF9C-4743-848F-96EE433D8E53" + } + }, + { + "$id": "8047", + "parameter": { + "$ref": "7929" + }, + "value": { + "$id": "8048", + "kind": "string", + "type": { + "$ref": "7930" + }, + "value": "rgiotoperations" + } + }, + { + "$id": "8049", + "parameter": { + "$ref": "7931" + }, + "value": { + "$id": "8050", + "kind": "string", + "type": { + "$ref": "7932" + }, + "value": "resource-name123" + } + }, + { + "$id": "8051", + "parameter": { + "$ref": "7933" + }, + "value": { + "$id": "8052", + "kind": "string", + "type": { + "$ref": "7934" + }, + "value": "adx-endpoint" + } + }, + { + "$id": "8053", + "parameter": { + "$ref": "7941" + }, + "value": { + "$id": "8054", + "kind": "model", + "type": { + "$ref": "1381" + }, + "value": { + "$id": "8055", + "properties": { + "$id": "8056", + "kind": "model", + "type": { + "$ref": "1383" + }, + "value": { + "$id": "8057", + "endpointType": { + "$id": "8058", + "kind": "string", + "type": { + "$ref": "218" + }, + "value": "DataExplorer" + }, + "dataExplorerSettings": { + "$id": "8059", + "kind": "model", + "type": { + "$ref": "1388" + }, + "value": { + "$id": "8060", + "host": { + "$id": "8061", + "kind": "string", + "type": { + "$ref": "1425" + }, + "value": "example.westeurope.kusto.windows.net" + }, + "authentication": { + "$id": "8062", + "kind": "model", + "type": { + "$ref": "1390" + }, + "value": { + "$id": "8063", + "method": { + "$id": "8064", + "kind": "string", + "type": { + "$ref": "232" + }, + "value": "SystemAssignedManagedIdentity" + }, + "systemAssignedManagedIdentitySettings": { + "$id": "8065", + "kind": "model", + "type": { + "$ref": "1395" + }, + "value": { + "$id": "8066" + } + } + } + }, + "database": { + "$id": "8067", + "kind": "string", + "type": { + "$ref": "1421" + }, + "value": "example-database" + }, + "batching": { + "$id": "8068", + "kind": "model", + "type": { + "$ref": "1429" + }, + "value": { + "$id": "8069", + "latencySeconds": { + "$id": "8070", + "kind": "number", + "type": { + "$ref": "1431" + }, + "value": 9312 + }, + "maxMessages": { + "$id": "8071", + "kind": "number", + "type": { + "$ref": "1435" + }, + "value": 9028 + } + } + } + } + } + } + }, + "extendedLocation": { + "$id": "8072", + "kind": "model", + "type": { + "$ref": "510" + }, + "value": { + "$id": "8073", + "name": { + "$id": "8074", + "kind": "string", + "type": { + "$ref": "512" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "8075", + "kind": "string", + "type": { + "$ref": "44" + }, + "value": "CustomLocation" + } + } + } + } + } + } + ], + "responses": [ + { + "$id": "8076", + "response": { + "$ref": "7942" + }, + "statusCode": 200, + "bodyValue": { + "$id": "8077", + "kind": "model", + "type": { + "$ref": "1381" + }, + "value": { + "$id": "8078", + "properties": { + "$id": "8079", + "kind": "model", + "type": { + "$ref": "1383" + }, + "value": { + "$id": "8080", + "endpointType": { + "$id": "8081", + "kind": "string", + "type": { + "$ref": "218" + }, + "value": "DataExplorer" + }, + "dataExplorerSettings": { + "$id": "8082", + "kind": "model", + "type": { + "$ref": "1388" + }, + "value": { + "$id": "8083", + "host": { + "$id": "8084", + "kind": "string", + "type": { + "$ref": "1425" + }, + "value": "example.westeurope.kusto.windows.net" + }, + "authentication": { + "$id": "8085", + "kind": "model", + "type": { + "$ref": "1390" + }, + "value": { + "$id": "8086", + "method": { + "$id": "8087", + "kind": "string", + "type": { + "$ref": "232" + }, + "value": "SystemAssignedManagedIdentity" + }, + "systemAssignedManagedIdentitySettings": { + "$id": "8088", + "kind": "model", + "type": { + "$ref": "1395" + }, + "value": { + "$id": "8089" + } + } + } + }, + "database": { + "$id": "8090", + "kind": "string", + "type": { + "$ref": "1421" + }, + "value": "example-database" + }, + "batching": { + "$id": "8091", + "kind": "model", + "type": { + "$ref": "1429" + }, + "value": { + "$id": "8092", + "latencySeconds": { + "$id": "8093", + "kind": "number", + "type": { + "$ref": "1431" + }, + "value": 9312 + }, + "maxMessages": { + "$id": "8094", + "kind": "number", + "type": { + "$ref": "1435" + }, + "value": 9028 + } + } + } + } + }, + "provisioningState": { + "$id": "8095", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Succeeded" + } + } + }, + "extendedLocation": { + "$id": "8096", + "kind": "model", + "type": { + "$ref": "510" + }, + "value": { + "$id": "8097", + "name": { + "$id": "8098", + "kind": "string", + "type": { + "$ref": "512" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "8099", + "kind": "string", + "type": { + "$ref": "44" + }, + "value": "CustomLocation" + } + } + }, + "id": { + "$id": "8100", + "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": "8101", + "kind": "string", + "type": { + "$ref": "424" + }, + "value": "zyhxscudobzfacetvgyjiav" + }, + "type": { + "$id": "8102", + "kind": "string", + "type": { + "$ref": "428" + }, + "value": "iay" + }, + "systemData": { + "$id": "8103", + "kind": "model", + "type": { + "$ref": "433" + }, + "value": { + "$id": "8104", + "createdBy": { + "$id": "8105", + "kind": "string", + "type": { + "$ref": "435" + }, + "value": "ssvaslsmudloholronopqyxjcu" + }, + "createdByType": { + "$id": "8106", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "createdAt": { + "$id": "8107", + "kind": "string", + "type": { + "$ref": "442" + }, + "value": "2024-08-09T18:13:29.389Z" + }, + "lastModifiedBy": { + "$id": "8108", + "kind": "string", + "type": { + "$ref": "447" + }, + "value": "gnicpuszwd" + }, + "lastModifiedByType": { + "$id": "8109", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "8110", + "kind": "string", + "type": { + "$ref": "454" + }, + "value": "2024-08-09T18:13:29.389Z" + } + } + } + } + } + }, + { + "$id": "8111", + "response": { + "$ref": "7943" + }, + "statusCode": 201, + "bodyValue": { + "$id": "8112", + "kind": "model", + "type": { + "$ref": "1381" + }, + "value": { + "$id": "8113", + "properties": { + "$id": "8114", + "kind": "model", + "type": { + "$ref": "1383" + }, + "value": { + "$id": "8115", + "endpointType": { + "$id": "8116", + "kind": "string", + "type": { + "$ref": "218" + }, + "value": "DataExplorer" + }, + "dataExplorerSettings": { + "$id": "8117", + "kind": "model", + "type": { + "$ref": "1388" + }, + "value": { + "$id": "8118", + "host": { + "$id": "8119", + "kind": "string", + "type": { + "$ref": "1425" + }, + "value": "example.westeurope.kusto.windows.net" + }, + "authentication": { + "$id": "8120", + "kind": "model", + "type": { + "$ref": "1390" + }, + "value": { + "$id": "8121", + "method": { + "$id": "8122", + "kind": "string", + "type": { + "$ref": "232" + }, + "value": "SystemAssignedManagedIdentity" + }, + "systemAssignedManagedIdentitySettings": { + "$id": "8123", + "kind": "model", + "type": { + "$ref": "1395" + }, + "value": { + "$id": "8124" + } + } + } + }, + "database": { + "$id": "8125", + "kind": "string", + "type": { + "$ref": "1421" + }, + "value": "example-database" + }, + "batching": { + "$id": "8126", + "kind": "model", + "type": { + "$ref": "1429" + }, + "value": { + "$id": "8127", + "latencySeconds": { + "$id": "8128", + "kind": "number", + "type": { + "$ref": "1431" + }, + "value": 9312 + }, + "maxMessages": { + "$id": "8129", + "kind": "number", + "type": { + "$ref": "1435" + }, + "value": 9028 + } + } + } + } + }, + "provisioningState": { + "$id": "8130", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Succeeded" + } + } + }, + "extendedLocation": { + "$id": "8131", + "kind": "model", + "type": { + "$ref": "510" + }, + "value": { + "$id": "8132", + "name": { + "$id": "8133", + "kind": "string", + "type": { + "$ref": "512" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "8134", + "kind": "string", + "type": { + "$ref": "44" + }, + "value": "CustomLocation" + } + } + }, + "id": { + "$id": "8135", + "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": "8136", + "kind": "string", + "type": { + "$ref": "424" + }, + "value": "zyhxscudobzfacetvgyjiav" + }, + "type": { + "$id": "8137", + "kind": "string", + "type": { + "$ref": "428" + }, + "value": "iay" + }, + "systemData": { + "$id": "8138", + "kind": "model", + "type": { + "$ref": "433" + }, + "value": { + "$id": "8139", + "createdBy": { + "$id": "8140", + "kind": "string", + "type": { + "$ref": "435" + }, + "value": "ssvaslsmudloholronopqyxjcu" + }, + "createdByType": { + "$id": "8141", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "createdAt": { + "$id": "8142", + "kind": "string", + "type": { + "$ref": "442" + }, + "value": "2024-08-09T18:13:29.389Z" + }, + "lastModifiedBy": { + "$id": "8143", + "kind": "string", + "type": { + "$ref": "447" + }, + "value": "gnicpuszwd" + }, + "lastModifiedByType": { + "$id": "8144", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "8145", + "kind": "string", + "type": { + "$ref": "454" + }, + "value": "2024-08-09T18:13:29.389Z" + } + } + } + } + } + } + ] + }, + { + "$id": "8146", + "kind": "http", + "name": "DataflowEndpoint_CreateOrUpdate_AIO", + "description": "DataflowEndpoint_CreateOrUpdate_AIO", + "filePath": "2025-04-01/DataflowEndpoint_CreateOrUpdate_AIO.json", + "parameters": [ + { + "$id": "8147", + "parameter": { + "$ref": "7922" + }, + "value": { + "$id": "8148", + "kind": "string", + "type": { + "$ref": "7923" + }, + "value": "2025-04-01" + } + }, + { + "$id": "8149", + "parameter": { + "$ref": "7926" + }, + "value": { + "$id": "8150", + "kind": "string", + "type": { + "$ref": "7927" + }, + "value": "F8C729F9-DF9C-4743-848F-96EE433D8E53" + } + }, + { + "$id": "8151", + "parameter": { + "$ref": "7929" + }, + "value": { + "$id": "8152", + "kind": "string", + "type": { + "$ref": "7930" + }, + "value": "rgiotoperations" + } + }, + { + "$id": "8153", + "parameter": { + "$ref": "7931" + }, + "value": { + "$id": "8154", + "kind": "string", + "type": { + "$ref": "7932" + }, + "value": "resource-name123" + } + }, + { + "$id": "8155", + "parameter": { + "$ref": "7933" + }, + "value": { + "$id": "8156", + "kind": "string", + "type": { + "$ref": "7934" + }, + "value": "aio-builtin-broker-endpoint" + } + }, + { + "$id": "8157", + "parameter": { + "$ref": "7941" + }, + "value": { + "$id": "8158", + "kind": "model", + "type": { + "$ref": "1381" + }, + "value": { + "$id": "8159", + "properties": { + "$id": "8160", + "kind": "model", + "type": { + "$ref": "1383" + }, + "value": { + "$id": "8161", + "endpointType": { + "$id": "8162", + "kind": "string", + "type": { + "$ref": "218" + }, + "value": "Mqtt" + }, + "mqttSettings": { + "$id": "8163", + "kind": "model", + "type": { + "$ref": "1611" + }, + "value": { + "$id": "8164", + "host": { + "$id": "8165", + "kind": "string", + "type": { + "$ref": "1641" + }, + "value": "aio-broker:18883" + }, + "authentication": { + "$id": "8166", + "kind": "model", + "type": { + "$ref": "1613" + }, + "value": { + "$id": "8167", + "method": { + "$id": "8168", + "kind": "string", + "type": { + "$ref": "312" + }, + "value": "Kubernetes" + }, + "serviceAccountTokenSettings": { + "$id": "8169", + "kind": "model", + "type": { + "$ref": "1624" + }, + "value": { + "$id": "8170", + "audience": { + "$id": "8171", + "kind": "string", + "type": { + "$ref": "1626" + }, + "value": "aio-internal" + } + } + } + } + }, + "tls": { + "$id": "8172", + "kind": "model", + "type": { + "$ref": "1587" + }, + "value": { + "$id": "8173", + "mode": { + "$id": "8174", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Enabled" + }, + "trustedCaCertificateConfigMapRef": { + "$id": "8175", + "kind": "string", + "type": { + "$ref": "1592" + }, + "value": "aio-ca-trust-bundle-test-only" + } + } + } + } + } + } + }, + "extendedLocation": { + "$id": "8176", + "kind": "model", + "type": { + "$ref": "510" + }, + "value": { + "$id": "8177", + "name": { + "$id": "8178", + "kind": "string", + "type": { + "$ref": "512" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "8179", + "kind": "string", + "type": { + "$ref": "44" + }, + "value": "CustomLocation" + } + } + } + } + } + } + ], + "responses": [ + { + "$id": "8180", + "response": { + "$ref": "7942" + }, + "statusCode": 200, + "bodyValue": { + "$id": "8181", + "kind": "model", + "type": { + "$ref": "1381" + }, + "value": { + "$id": "8182", + "properties": { + "$id": "8183", + "kind": "model", + "type": { + "$ref": "1383" + }, + "value": { + "$id": "8184", + "endpointType": { + "$id": "8185", + "kind": "string", + "type": { + "$ref": "218" + }, + "value": "Mqtt" + }, + "mqttSettings": { + "$id": "8186", + "kind": "model", + "type": { + "$ref": "1611" + }, + "value": { + "$id": "8187", + "host": { + "$id": "8188", + "kind": "string", + "type": { + "$ref": "1641" + }, + "value": "aio-broker:18883" + }, + "authentication": { + "$id": "8189", + "kind": "model", + "type": { + "$ref": "1613" + }, + "value": { + "$id": "8190", + "method": { + "$id": "8191", + "kind": "string", + "type": { + "$ref": "312" + }, + "value": "Kubernetes" + }, + "serviceAccountTokenSettings": { + "$id": "8192", + "kind": "model", + "type": { + "$ref": "1624" + }, + "value": { + "$id": "8193", + "audience": { + "$id": "8194", + "kind": "string", + "type": { + "$ref": "1626" + }, + "value": "aio-internal" + } + } + } + } + }, + "tls": { + "$id": "8195", + "kind": "model", + "type": { + "$ref": "1587" + }, + "value": { + "$id": "8196", + "mode": { + "$id": "8197", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Enabled" + }, + "trustedCaCertificateConfigMapRef": { + "$id": "8198", + "kind": "string", + "type": { + "$ref": "1592" + }, + "value": "aio-ca-trust-bundle-test-only" + } + } + } + } + }, + "provisioningState": { + "$id": "8199", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Succeeded" + } + } + }, + "extendedLocation": { + "$id": "8200", + "kind": "model", + "type": { + "$ref": "510" + }, + "value": { + "$id": "8201", + "name": { + "$id": "8202", + "kind": "string", + "type": { + "$ref": "512" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "8203", + "kind": "string", + "type": { + "$ref": "44" + }, + "value": "CustomLocation" + } + } + }, + "id": { + "$id": "8204", + "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": "8205", + "kind": "string", + "type": { + "$ref": "424" + }, + "value": "zyhxscudobzfacetvgyjiav" + }, + "type": { + "$id": "8206", + "kind": "string", + "type": { + "$ref": "428" + }, + "value": "iay" + }, + "systemData": { + "$id": "8207", + "kind": "model", + "type": { + "$ref": "433" + }, + "value": { + "$id": "8208", + "createdBy": { + "$id": "8209", + "kind": "string", + "type": { + "$ref": "435" + }, + "value": "ssvaslsmudloholronopqyxjcu" + }, + "createdByType": { + "$id": "8210", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "createdAt": { + "$id": "8211", + "kind": "string", + "type": { + "$ref": "442" + }, + "value": "2024-08-09T18:13:29.389Z" + }, + "lastModifiedBy": { + "$id": "8212", + "kind": "string", + "type": { + "$ref": "447" + }, + "value": "gnicpuszwd" + }, + "lastModifiedByType": { + "$id": "8213", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "8214", + "kind": "string", + "type": { + "$ref": "454" + }, + "value": "2024-08-09T18:13:29.389Z" + } + } + } + } + } + }, + { + "$id": "8215", + "response": { + "$ref": "7943" + }, + "statusCode": 201, + "bodyValue": { + "$id": "8216", + "kind": "model", + "type": { + "$ref": "1381" + }, + "value": { + "$id": "8217", + "properties": { + "$id": "8218", + "kind": "model", + "type": { + "$ref": "1383" + }, + "value": { + "$id": "8219", + "endpointType": { + "$id": "8220", + "kind": "string", + "type": { + "$ref": "218" + }, + "value": "Mqtt" + }, + "mqttSettings": { + "$id": "8221", + "kind": "model", + "type": { + "$ref": "1611" + }, + "value": { + "$id": "8222", + "host": { + "$id": "8223", + "kind": "string", + "type": { + "$ref": "1641" + }, + "value": "aio-broker:18883" + }, + "authentication": { + "$id": "8224", + "kind": "model", + "type": { + "$ref": "1613" + }, + "value": { + "$id": "8225", + "method": { + "$id": "8226", + "kind": "string", + "type": { + "$ref": "312" + }, + "value": "Kubernetes" + }, + "serviceAccountTokenSettings": { + "$id": "8227", + "kind": "model", + "type": { + "$ref": "1624" + }, + "value": { + "$id": "8228", + "audience": { + "$id": "8229", + "kind": "string", + "type": { + "$ref": "1626" + }, + "value": "aio-internal" + } + } + } + } + }, + "tls": { + "$id": "8230", + "kind": "model", + "type": { + "$ref": "1587" + }, + "value": { + "$id": "8231", + "mode": { + "$id": "8232", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Enabled" + }, + "trustedCaCertificateConfigMapRef": { + "$id": "8233", + "kind": "string", + "type": { + "$ref": "1592" + }, + "value": "aio-ca-trust-bundle-test-only" + } + } + } + } + }, + "provisioningState": { + "$id": "8234", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Succeeded" + } + } + }, + "extendedLocation": { + "$id": "8235", + "kind": "model", + "type": { + "$ref": "510" + }, + "value": { + "$id": "8236", + "name": { + "$id": "8237", + "kind": "string", + "type": { + "$ref": "512" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "8238", + "kind": "string", + "type": { + "$ref": "44" + }, + "value": "CustomLocation" + } + } + }, + "id": { + "$id": "8239", + "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": "8240", + "kind": "string", + "type": { + "$ref": "424" + }, + "value": "zyhxscudobzfacetvgyjiav" + }, + "type": { + "$id": "8241", + "kind": "string", + "type": { + "$ref": "428" + }, + "value": "iay" + }, + "systemData": { + "$id": "8242", + "kind": "model", + "type": { + "$ref": "433" + }, + "value": { + "$id": "8243", + "createdBy": { + "$id": "8244", + "kind": "string", + "type": { + "$ref": "435" + }, + "value": "ssvaslsmudloholronopqyxjcu" + }, + "createdByType": { + "$id": "8245", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "createdAt": { + "$id": "8246", + "kind": "string", + "type": { + "$ref": "442" + }, + "value": "2024-08-09T18:13:29.389Z" + }, + "lastModifiedBy": { + "$id": "8247", + "kind": "string", + "type": { + "$ref": "447" + }, + "value": "gnicpuszwd" + }, + "lastModifiedByType": { + "$id": "8248", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "8249", + "kind": "string", + "type": { + "$ref": "454" + }, + "value": "2024-08-09T18:13:29.389Z" + } + } + } + } + } + } + ] + }, + { + "$id": "8250", + "kind": "http", + "name": "DataflowEndpoint_CreateOrUpdate_EventGrid", + "description": "DataflowEndpoint_CreateOrUpdate_EventGrid", + "filePath": "2025-04-01/DataflowEndpoint_CreateOrUpdate_EventGrid.json", + "parameters": [ + { + "$id": "8251", + "parameter": { + "$ref": "7922" + }, + "value": { + "$id": "8252", + "kind": "string", + "type": { + "$ref": "7923" + }, + "value": "2025-04-01" + } + }, + { + "$id": "8253", + "parameter": { + "$ref": "7926" + }, + "value": { + "$id": "8254", + "kind": "string", + "type": { + "$ref": "7927" + }, + "value": "F8C729F9-DF9C-4743-848F-96EE433D8E53" + } + }, + { + "$id": "8255", + "parameter": { + "$ref": "7929" + }, + "value": { + "$id": "8256", + "kind": "string", + "type": { + "$ref": "7930" + }, + "value": "rgiotoperations" + } + }, + { + "$id": "8257", + "parameter": { + "$ref": "7931" + }, + "value": { + "$id": "8258", + "kind": "string", + "type": { + "$ref": "7932" + }, + "value": "resource-name123" + } + }, + { + "$id": "8259", + "parameter": { + "$ref": "7933" + }, + "value": { + "$id": "8260", + "kind": "string", + "type": { + "$ref": "7934" + }, + "value": "event-grid-endpoint" + } + }, + { + "$id": "8261", + "parameter": { + "$ref": "7941" + }, + "value": { + "$id": "8262", + "kind": "model", + "type": { + "$ref": "1381" + }, + "value": { + "$id": "8263", + "properties": { + "$id": "8264", + "kind": "model", + "type": { + "$ref": "1383" + }, + "value": { + "$id": "8265", + "endpointType": { + "$id": "8266", + "kind": "string", + "type": { + "$ref": "218" + }, + "value": "Mqtt" + }, + "mqttSettings": { + "$id": "8267", + "kind": "model", + "type": { + "$ref": "1611" + }, + "value": { + "$id": "8268", + "host": { + "$id": "8269", + "kind": "string", + "type": { + "$ref": "1641" + }, + "value": "example.westeurope-1.ts.eventgrid.azure.net:8883" + }, + "authentication": { + "$id": "8270", + "kind": "model", + "type": { + "$ref": "1613" + }, + "value": { + "$id": "8271", + "method": { + "$id": "8272", + "kind": "string", + "type": { + "$ref": "312" + }, + "value": "SystemAssignedManagedIdentity" + }, + "systemAssignedManagedIdentitySettings": { + "$id": "8273", + "kind": "model", + "type": { + "$ref": "1395" + }, + "value": { + "$id": "8274" + } + } + } + }, + "tls": { + "$id": "8275", + "kind": "model", + "type": { + "$ref": "1587" + }, + "value": { + "$id": "8276", + "mode": { + "$id": "8277", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Enabled" + } + } + } + } + } + } + }, + "extendedLocation": { + "$id": "8278", + "kind": "model", + "type": { + "$ref": "510" + }, + "value": { + "$id": "8279", + "name": { + "$id": "8280", + "kind": "string", + "type": { + "$ref": "512" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "8281", + "kind": "string", + "type": { + "$ref": "44" + }, + "value": "CustomLocation" + } + } + } + } + } + } + ], + "responses": [ + { + "$id": "8282", + "response": { + "$ref": "7942" + }, + "statusCode": 200, + "bodyValue": { + "$id": "8283", + "kind": "model", + "type": { + "$ref": "1381" + }, + "value": { + "$id": "8284", + "properties": { + "$id": "8285", + "kind": "model", + "type": { + "$ref": "1383" + }, + "value": { + "$id": "8286", + "endpointType": { + "$id": "8287", + "kind": "string", + "type": { + "$ref": "218" + }, + "value": "Mqtt" + }, + "mqttSettings": { + "$id": "8288", + "kind": "model", + "type": { + "$ref": "1611" + }, + "value": { + "$id": "8289", + "host": { + "$id": "8290", + "kind": "string", + "type": { + "$ref": "1641" + }, + "value": "example.westeurope-1.ts.eventgrid.azure.net:8883" + }, + "authentication": { + "$id": "8291", + "kind": "model", + "type": { + "$ref": "1613" + }, + "value": { + "$id": "8292", + "method": { + "$id": "8293", + "kind": "string", + "type": { + "$ref": "312" + }, + "value": "SystemAssignedManagedIdentity" + }, + "systemAssignedManagedIdentitySettings": { + "$id": "8294", + "kind": "model", + "type": { + "$ref": "1395" + }, + "value": { + "$id": "8295" + } + } + } + }, + "tls": { + "$id": "8296", + "kind": "model", + "type": { + "$ref": "1587" + }, + "value": { + "$id": "8297", + "mode": { + "$id": "8298", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Enabled" + } + } + } + } + }, + "provisioningState": { + "$id": "8299", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Succeeded" + } + } + }, + "extendedLocation": { + "$id": "8300", + "kind": "model", + "type": { + "$ref": "510" + }, + "value": { + "$id": "8301", + "name": { + "$id": "8302", + "kind": "string", + "type": { + "$ref": "512" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "8303", + "kind": "string", + "type": { + "$ref": "44" + }, + "value": "CustomLocation" + } + } + }, + "id": { + "$id": "8304", + "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": "8305", + "kind": "string", + "type": { + "$ref": "424" + }, + "value": "zyhxscudobzfacetvgyjiav" + }, + "type": { + "$id": "8306", + "kind": "string", + "type": { + "$ref": "428" + }, + "value": "iay" + }, + "systemData": { + "$id": "8307", + "kind": "model", + "type": { + "$ref": "433" + }, + "value": { + "$id": "8308", + "createdBy": { + "$id": "8309", + "kind": "string", + "type": { + "$ref": "435" + }, + "value": "ssvaslsmudloholronopqyxjcu" + }, + "createdByType": { + "$id": "8310", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "createdAt": { + "$id": "8311", + "kind": "string", + "type": { + "$ref": "442" + }, + "value": "2024-08-09T18:13:29.389Z" + }, + "lastModifiedBy": { + "$id": "8312", + "kind": "string", + "type": { + "$ref": "447" + }, + "value": "gnicpuszwd" + }, + "lastModifiedByType": { + "$id": "8313", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "8314", + "kind": "string", + "type": { + "$ref": "454" + }, + "value": "2024-08-09T18:13:29.389Z" + } + } + } + } + } + }, + { + "$id": "8315", + "response": { + "$ref": "7943" + }, + "statusCode": 201, + "bodyValue": { + "$id": "8316", + "kind": "model", + "type": { + "$ref": "1381" + }, + "value": { + "$id": "8317", + "properties": { + "$id": "8318", + "kind": "model", + "type": { + "$ref": "1383" + }, + "value": { + "$id": "8319", + "endpointType": { + "$id": "8320", + "kind": "string", + "type": { + "$ref": "218" + }, + "value": "Mqtt" + }, + "mqttSettings": { + "$id": "8321", + "kind": "model", + "type": { + "$ref": "1611" + }, + "value": { + "$id": "8322", + "host": { + "$id": "8323", + "kind": "string", + "type": { + "$ref": "1641" + }, + "value": "example.westeurope-1.ts.eventgrid.azure.net:8883" + }, + "authentication": { + "$id": "8324", + "kind": "model", + "type": { + "$ref": "1613" + }, + "value": { + "$id": "8325", + "method": { + "$id": "8326", + "kind": "string", + "type": { + "$ref": "312" + }, + "value": "SystemAssignedManagedIdentity" + }, + "systemAssignedManagedIdentitySettings": { + "$id": "8327", + "kind": "model", + "type": { + "$ref": "1395" + }, + "value": { + "$id": "8328" + } + } + } + }, + "tls": { + "$id": "8329", + "kind": "model", + "type": { + "$ref": "1587" + }, + "value": { + "$id": "8330", + "mode": { + "$id": "8331", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Enabled" + } + } + } + } + }, + "provisioningState": { + "$id": "8332", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Succeeded" + } + } + }, + "extendedLocation": { + "$id": "8333", + "kind": "model", + "type": { + "$ref": "510" + }, + "value": { + "$id": "8334", + "name": { + "$id": "8335", + "kind": "string", + "type": { + "$ref": "512" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "8336", + "kind": "string", + "type": { + "$ref": "44" + }, + "value": "CustomLocation" + } + } + }, + "id": { + "$id": "8337", + "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": "8338", + "kind": "string", + "type": { + "$ref": "424" + }, + "value": "zyhxscudobzfacetvgyjiav" + }, + "type": { + "$id": "8339", + "kind": "string", + "type": { + "$ref": "428" + }, + "value": "iay" + }, + "systemData": { + "$id": "8340", + "kind": "model", + "type": { + "$ref": "433" + }, + "value": { + "$id": "8341", + "createdBy": { + "$id": "8342", + "kind": "string", + "type": { + "$ref": "435" + }, + "value": "ssvaslsmudloholronopqyxjcu" + }, + "createdByType": { + "$id": "8343", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "createdAt": { + "$id": "8344", + "kind": "string", + "type": { + "$ref": "442" + }, + "value": "2024-08-09T18:13:29.389Z" + }, + "lastModifiedBy": { + "$id": "8345", + "kind": "string", + "type": { + "$ref": "447" + }, + "value": "gnicpuszwd" + }, + "lastModifiedByType": { + "$id": "8346", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "8347", + "kind": "string", + "type": { + "$ref": "454" + }, + "value": "2024-08-09T18:13:29.389Z" + } + } + } + } + } + } + ] + }, + { + "$id": "8348", + "kind": "http", + "name": "DataflowEndpoint_CreateOrUpdate_EventHub", + "description": "DataflowEndpoint_CreateOrUpdate_EventHub", + "filePath": "2025-04-01/DataflowEndpoint_CreateOrUpdate_EventHub.json", + "parameters": [ + { + "$id": "8349", + "parameter": { + "$ref": "7922" + }, + "value": { + "$id": "8350", + "kind": "string", + "type": { + "$ref": "7923" + }, + "value": "2025-04-01" + } + }, + { + "$id": "8351", + "parameter": { + "$ref": "7926" + }, + "value": { + "$id": "8352", + "kind": "string", + "type": { + "$ref": "7927" + }, + "value": "F8C729F9-DF9C-4743-848F-96EE433D8E53" + } + }, + { + "$id": "8353", + "parameter": { + "$ref": "7929" + }, + "value": { + "$id": "8354", + "kind": "string", + "type": { + "$ref": "7930" + }, + "value": "rgiotoperations" + } + }, + { + "$id": "8355", + "parameter": { + "$ref": "7931" + }, + "value": { + "$id": "8356", + "kind": "string", + "type": { + "$ref": "7932" + }, + "value": "resource-name123" + } + }, + { + "$id": "8357", + "parameter": { + "$ref": "7933" + }, + "value": { + "$id": "8358", + "kind": "string", + "type": { + "$ref": "7934" + }, + "value": "event-hub-endpoint" + } + }, + { + "$id": "8359", + "parameter": { + "$ref": "7941" + }, + "value": { + "$id": "8360", + "kind": "model", + "type": { + "$ref": "1381" + }, + "value": { + "$id": "8361", + "properties": { + "$id": "8362", + "kind": "model", + "type": { + "$ref": "1383" + }, + "value": { + "$id": "8363", + "endpointType": { + "$id": "8364", + "kind": "string", + "type": { + "$ref": "218" + }, + "value": "Kafka" + }, + "kafkaSettings": { + "$id": "8365", + "kind": "model", + "type": { + "$ref": "1514" + }, + "value": { + "$id": "8366", + "host": { + "$id": "8367", + "kind": "string", + "type": { + "$ref": "1552" + }, + "value": "example.servicebus.windows.net:9093" + }, + "authentication": { + "$id": "8368", + "kind": "model", + "type": { + "$ref": "1516" + }, + "value": { + "$id": "8369", + "method": { + "$id": "8370", + "kind": "string", + "type": { + "$ref": "258" + }, + "value": "SystemAssignedManagedIdentity" + }, + "systemAssignedManagedIdentitySettings": { + "$id": "8371", + "kind": "model", + "type": { + "$ref": "1395" + }, + "value": { + "$id": "8372" + } + } + } + }, + "tls": { + "$id": "8373", + "kind": "model", + "type": { + "$ref": "1587" + }, + "value": { + "$id": "8374", + "mode": { + "$id": "8375", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Enabled" + } + } + }, + "consumerGroupId": { + "$id": "8376", + "kind": "string", + "type": { + "$ref": "1548" + }, + "value": "aiodataflows" + } + } + } + } + }, + "extendedLocation": { + "$id": "8377", + "kind": "model", + "type": { + "$ref": "510" + }, + "value": { + "$id": "8378", + "name": { + "$id": "8379", + "kind": "string", + "type": { + "$ref": "512" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "8380", + "kind": "string", + "type": { + "$ref": "44" + }, + "value": "CustomLocation" + } + } + } + } + } + } + ], + "responses": [ + { + "$id": "8381", + "response": { + "$ref": "7942" + }, + "statusCode": 200, + "bodyValue": { + "$id": "8382", + "kind": "model", + "type": { + "$ref": "1381" + }, + "value": { + "$id": "8383", + "properties": { + "$id": "8384", + "kind": "model", + "type": { + "$ref": "1383" + }, + "value": { + "$id": "8385", + "endpointType": { + "$id": "8386", + "kind": "string", + "type": { + "$ref": "218" + }, + "value": "Kafka" + }, + "kafkaSettings": { + "$id": "8387", + "kind": "model", + "type": { + "$ref": "1514" + }, + "value": { + "$id": "8388", + "host": { + "$id": "8389", + "kind": "string", + "type": { + "$ref": "1552" + }, + "value": "example.servicebus.windows.net:9093" + }, + "authentication": { + "$id": "8390", + "kind": "model", + "type": { + "$ref": "1516" + }, + "value": { + "$id": "8391", + "method": { + "$id": "8392", + "kind": "string", + "type": { + "$ref": "258" + }, + "value": "SystemAssignedManagedIdentity" + }, + "systemAssignedManagedIdentitySettings": { + "$id": "8393", + "kind": "model", + "type": { + "$ref": "1395" + }, + "value": { + "$id": "8394" + } + } + } + }, + "tls": { + "$id": "8395", + "kind": "model", + "type": { + "$ref": "1587" + }, + "value": { + "$id": "8396", + "mode": { + "$id": "8397", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Enabled" + } + } + }, + "consumerGroupId": { + "$id": "8398", + "kind": "string", + "type": { + "$ref": "1548" + }, + "value": "aiodataflows" + } + } + }, + "provisioningState": { + "$id": "8399", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Succeeded" + } + } + }, + "extendedLocation": { + "$id": "8400", + "kind": "model", + "type": { + "$ref": "510" + }, + "value": { + "$id": "8401", + "name": { + "$id": "8402", + "kind": "string", + "type": { + "$ref": "512" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "8403", + "kind": "string", + "type": { + "$ref": "44" + }, + "value": "CustomLocation" + } + } + }, + "id": { + "$id": "8404", + "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": "8405", + "kind": "string", + "type": { + "$ref": "424" + }, + "value": "zyhxscudobzfacetvgyjiav" + }, + "type": { + "$id": "8406", + "kind": "string", + "type": { + "$ref": "428" + }, + "value": "iay" + }, + "systemData": { + "$id": "8407", + "kind": "model", + "type": { + "$ref": "433" + }, + "value": { + "$id": "8408", + "createdBy": { + "$id": "8409", + "kind": "string", + "type": { + "$ref": "435" + }, + "value": "ssvaslsmudloholronopqyxjcu" + }, + "createdByType": { + "$id": "8410", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "createdAt": { + "$id": "8411", + "kind": "string", + "type": { + "$ref": "442" + }, + "value": "2024-08-09T18:13:29.389Z" + }, + "lastModifiedBy": { + "$id": "8412", + "kind": "string", + "type": { + "$ref": "447" + }, + "value": "gnicpuszwd" + }, + "lastModifiedByType": { + "$id": "8413", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "8414", + "kind": "string", + "type": { + "$ref": "454" + }, + "value": "2024-08-09T18:13:29.389Z" + } + } + } + } + } + }, + { + "$id": "8415", + "response": { + "$ref": "7943" + }, + "statusCode": 201, + "bodyValue": { + "$id": "8416", + "kind": "model", + "type": { + "$ref": "1381" + }, + "value": { + "$id": "8417", + "properties": { + "$id": "8418", + "kind": "model", + "type": { + "$ref": "1383" + }, + "value": { + "$id": "8419", + "endpointType": { + "$id": "8420", + "kind": "string", + "type": { + "$ref": "218" + }, + "value": "Kafka" + }, + "kafkaSettings": { + "$id": "8421", + "kind": "model", + "type": { + "$ref": "1514" + }, + "value": { + "$id": "8422", + "host": { + "$id": "8423", + "kind": "string", + "type": { + "$ref": "1552" + }, + "value": "example.servicebus.windows.net:9093" + }, + "authentication": { + "$id": "8424", + "kind": "model", + "type": { + "$ref": "1516" + }, + "value": { + "$id": "8425", + "method": { + "$id": "8426", + "kind": "string", + "type": { + "$ref": "258" + }, + "value": "SystemAssignedManagedIdentity" + }, + "systemAssignedManagedIdentitySettings": { + "$id": "8427", + "kind": "model", + "type": { + "$ref": "1395" + }, + "value": { + "$id": "8428" + } + } + } + }, + "tls": { + "$id": "8429", + "kind": "model", + "type": { + "$ref": "1587" + }, + "value": { + "$id": "8430", + "mode": { + "$id": "8431", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Enabled" + } + } + }, + "consumerGroupId": { + "$id": "8432", + "kind": "string", + "type": { + "$ref": "1548" + }, + "value": "aiodataflows" + } + } + }, + "provisioningState": { + "$id": "8433", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Succeeded" + } + } + }, + "extendedLocation": { + "$id": "8434", + "kind": "model", + "type": { + "$ref": "510" + }, + "value": { + "$id": "8435", + "name": { + "$id": "8436", + "kind": "string", + "type": { + "$ref": "512" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "8437", + "kind": "string", + "type": { + "$ref": "44" + }, + "value": "CustomLocation" + } + } + }, + "id": { + "$id": "8438", + "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": "8439", + "kind": "string", + "type": { + "$ref": "424" + }, + "value": "zyhxscudobzfacetvgyjiav" + }, + "type": { + "$id": "8440", + "kind": "string", + "type": { + "$ref": "428" + }, + "value": "iay" + }, + "systemData": { + "$id": "8441", + "kind": "model", + "type": { + "$ref": "433" + }, + "value": { + "$id": "8442", + "createdBy": { + "$id": "8443", + "kind": "string", + "type": { + "$ref": "435" + }, + "value": "ssvaslsmudloholronopqyxjcu" + }, + "createdByType": { + "$id": "8444", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "createdAt": { + "$id": "8445", + "kind": "string", + "type": { + "$ref": "442" + }, + "value": "2024-08-09T18:13:29.389Z" + }, + "lastModifiedBy": { + "$id": "8446", + "kind": "string", + "type": { + "$ref": "447" + }, + "value": "gnicpuszwd" + }, + "lastModifiedByType": { + "$id": "8447", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "8448", + "kind": "string", + "type": { + "$ref": "454" + }, + "value": "2024-08-09T18:13:29.389Z" + } + } + } + } + } + } + ] + }, + { + "$id": "8449", + "kind": "http", + "name": "DataflowEndpoint_CreateOrUpdate_Fabric", + "description": "DataflowEndpoint_CreateOrUpdate_Fabric", + "filePath": "2025-04-01/DataflowEndpoint_CreateOrUpdate_Fabric.json", + "parameters": [ + { + "$id": "8450", + "parameter": { + "$ref": "7922" + }, + "value": { + "$id": "8451", + "kind": "string", + "type": { + "$ref": "7923" + }, + "value": "2025-04-01" + } + }, + { + "$id": "8452", + "parameter": { + "$ref": "7926" + }, + "value": { + "$id": "8453", + "kind": "string", + "type": { + "$ref": "7927" + }, + "value": "F8C729F9-DF9C-4743-848F-96EE433D8E53" + } + }, + { + "$id": "8454", + "parameter": { + "$ref": "7929" + }, + "value": { + "$id": "8455", + "kind": "string", + "type": { + "$ref": "7930" + }, + "value": "rgiotoperations" + } + }, + { + "$id": "8456", + "parameter": { + "$ref": "7931" + }, + "value": { + "$id": "8457", + "kind": "string", + "type": { + "$ref": "7932" + }, + "value": "resource-name123" + } + }, + { + "$id": "8458", + "parameter": { + "$ref": "7933" + }, + "value": { + "$id": "8459", + "kind": "string", + "type": { + "$ref": "7934" + }, + "value": "fabric-endpoint" + } + }, + { + "$id": "8460", + "parameter": { + "$ref": "7941" + }, + "value": { + "$id": "8461", + "kind": "model", + "type": { + "$ref": "1381" + }, + "value": { + "$id": "8462", + "properties": { + "$id": "8463", + "kind": "model", + "type": { + "$ref": "1383" + }, + "value": { + "$id": "8464", + "endpointType": { + "$id": "8465", + "kind": "string", + "type": { + "$ref": "218" + }, + "value": "FabricOneLake" + }, + "fabricOneLakeSettings": { + "$id": "8466", + "kind": "model", + "type": { + "$ref": "1475" + }, + "value": { + "$id": "8467", + "host": { + "$id": "8468", + "kind": "string", + "type": { + "$ref": "1505" + }, + "value": "onelake.dfs.fabric.microsoft.com" + }, + "authentication": { + "$id": "8469", + "kind": "model", + "type": { + "$ref": "1477" + }, + "value": { + "$id": "8470", + "method": { + "$id": "8471", + "kind": "string", + "type": { + "$ref": "246" + }, + "value": "SystemAssignedManagedIdentity" + }, + "systemAssignedManagedIdentitySettings": { + "$id": "8472", + "kind": "model", + "type": { + "$ref": "1395" + }, + "value": { + "$id": "8473" + } + } + } + }, + "names": { + "$id": "8474", + "kind": "model", + "type": { + "$ref": "1490" + }, + "value": { + "$id": "8475", + "workspaceName": { + "$id": "8476", + "kind": "string", + "type": { + "$ref": "1496" + }, + "value": "example-workspace" + }, + "lakehouseName": { + "$id": "8477", + "kind": "string", + "type": { + "$ref": "1492" + }, + "value": "example-lakehouse" + } + } + }, + "oneLakePathType": { + "$id": "8478", + "kind": "string", + "type": { + "$ref": "252" + }, + "value": "Tables" + } + } + } + } + }, + "extendedLocation": { + "$id": "8479", + "kind": "model", + "type": { + "$ref": "510" + }, + "value": { + "$id": "8480", + "name": { + "$id": "8481", + "kind": "string", + "type": { + "$ref": "512" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "8482", + "kind": "string", + "type": { + "$ref": "44" + }, + "value": "CustomLocation" + } + } + } + } + } + } + ], + "responses": [ + { + "$id": "8483", + "response": { + "$ref": "7942" + }, + "statusCode": 200, + "bodyValue": { + "$id": "8484", + "kind": "model", + "type": { + "$ref": "1381" + }, + "value": { + "$id": "8485", + "properties": { + "$id": "8486", + "kind": "model", + "type": { + "$ref": "1383" + }, + "value": { + "$id": "8487", + "endpointType": { + "$id": "8488", + "kind": "string", + "type": { + "$ref": "218" + }, + "value": "FabricOneLake" + }, + "fabricOneLakeSettings": { + "$id": "8489", + "kind": "model", + "type": { + "$ref": "1475" + }, + "value": { + "$id": "8490", + "host": { + "$id": "8491", + "kind": "string", + "type": { + "$ref": "1505" + }, + "value": "onelake.dfs.fabric.microsoft.com" + }, + "authentication": { + "$id": "8492", + "kind": "model", + "type": { + "$ref": "1477" + }, + "value": { + "$id": "8493", + "method": { + "$id": "8494", + "kind": "string", + "type": { + "$ref": "246" + }, + "value": "SystemAssignedManagedIdentity" + }, + "systemAssignedManagedIdentitySettings": { + "$id": "8495", + "kind": "model", + "type": { + "$ref": "1395" + }, + "value": { + "$id": "8496" + } + } + } + }, + "names": { + "$id": "8497", + "kind": "model", + "type": { + "$ref": "1490" + }, + "value": { + "$id": "8498", + "workspaceName": { + "$id": "8499", + "kind": "string", + "type": { + "$ref": "1496" + }, + "value": "example-workspace" + }, + "lakehouseName": { + "$id": "8500", + "kind": "string", + "type": { + "$ref": "1492" + }, + "value": "example-lakehouse" + } + } + }, + "oneLakePathType": { + "$id": "8501", + "kind": "string", + "type": { + "$ref": "252" + }, + "value": "Tables" + } + } + }, + "provisioningState": { + "$id": "8502", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Succeeded" + } + } + }, + "extendedLocation": { + "$id": "8503", + "kind": "model", + "type": { + "$ref": "510" + }, + "value": { + "$id": "8504", + "name": { + "$id": "8505", + "kind": "string", + "type": { + "$ref": "512" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "8506", + "kind": "string", + "type": { + "$ref": "44" + }, + "value": "CustomLocation" + } + } + }, + "id": { + "$id": "8507", + "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": "8508", + "kind": "string", + "type": { + "$ref": "424" + }, + "value": "zyhxscudobzfacetvgyjiav" + }, + "type": { + "$id": "8509", + "kind": "string", + "type": { + "$ref": "428" + }, + "value": "iay" + }, + "systemData": { + "$id": "8510", + "kind": "model", + "type": { + "$ref": "433" + }, + "value": { + "$id": "8511", + "createdBy": { + "$id": "8512", + "kind": "string", + "type": { + "$ref": "435" + }, + "value": "ssvaslsmudloholronopqyxjcu" + }, + "createdByType": { + "$id": "8513", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "createdAt": { + "$id": "8514", + "kind": "string", + "type": { + "$ref": "442" + }, + "value": "2024-08-09T18:13:29.389Z" + }, + "lastModifiedBy": { + "$id": "8515", + "kind": "string", + "type": { + "$ref": "447" + }, + "value": "gnicpuszwd" + }, + "lastModifiedByType": { + "$id": "8516", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "8517", + "kind": "string", + "type": { + "$ref": "454" + }, + "value": "2024-08-09T18:13:29.389Z" + } + } + } + } + } + }, + { + "$id": "8518", + "response": { + "$ref": "7943" + }, + "statusCode": 201, + "bodyValue": { + "$id": "8519", + "kind": "model", + "type": { + "$ref": "1381" + }, + "value": { + "$id": "8520", + "properties": { + "$id": "8521", + "kind": "model", + "type": { + "$ref": "1383" + }, + "value": { + "$id": "8522", + "endpointType": { + "$id": "8523", + "kind": "string", + "type": { + "$ref": "218" + }, + "value": "FabricOneLake" + }, + "fabricOneLakeSettings": { + "$id": "8524", + "kind": "model", + "type": { + "$ref": "1475" + }, + "value": { + "$id": "8525", + "host": { + "$id": "8526", + "kind": "string", + "type": { + "$ref": "1505" + }, + "value": "onelake.dfs.fabric.microsoft.com" + }, + "authentication": { + "$id": "8527", + "kind": "model", + "type": { + "$ref": "1477" + }, + "value": { + "$id": "8528", + "method": { + "$id": "8529", + "kind": "string", + "type": { + "$ref": "246" + }, + "value": "SystemAssignedManagedIdentity" + }, + "systemAssignedManagedIdentitySettings": { + "$id": "8530", + "kind": "model", + "type": { + "$ref": "1395" + }, + "value": { + "$id": "8531" + } + } + } + }, + "names": { + "$id": "8532", + "kind": "model", + "type": { + "$ref": "1490" + }, + "value": { + "$id": "8533", + "workspaceName": { + "$id": "8534", + "kind": "string", + "type": { + "$ref": "1496" + }, + "value": "example-workspace" + }, + "lakehouseName": { + "$id": "8535", + "kind": "string", + "type": { + "$ref": "1492" + }, + "value": "example-lakehouse" + } + } + }, + "oneLakePathType": { + "$id": "8536", + "kind": "string", + "type": { + "$ref": "252" + }, + "value": "Tables" + } + } + }, + "provisioningState": { + "$id": "8537", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Succeeded" + } + } + }, + "extendedLocation": { + "$id": "8538", + "kind": "model", + "type": { + "$ref": "510" + }, + "value": { + "$id": "8539", + "name": { + "$id": "8540", + "kind": "string", + "type": { + "$ref": "512" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "8541", + "kind": "string", + "type": { + "$ref": "44" + }, + "value": "CustomLocation" + } + } + }, + "id": { + "$id": "8542", + "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": "8543", + "kind": "string", + "type": { + "$ref": "424" + }, + "value": "zyhxscudobzfacetvgyjiav" + }, + "type": { + "$id": "8544", + "kind": "string", + "type": { + "$ref": "428" + }, + "value": "iay" + }, + "systemData": { + "$id": "8545", + "kind": "model", + "type": { + "$ref": "433" + }, + "value": { + "$id": "8546", + "createdBy": { + "$id": "8547", + "kind": "string", + "type": { + "$ref": "435" + }, + "value": "ssvaslsmudloholronopqyxjcu" + }, + "createdByType": { + "$id": "8548", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "createdAt": { + "$id": "8549", + "kind": "string", + "type": { + "$ref": "442" + }, + "value": "2024-08-09T18:13:29.389Z" + }, + "lastModifiedBy": { + "$id": "8550", + "kind": "string", + "type": { + "$ref": "447" + }, + "value": "gnicpuszwd" + }, + "lastModifiedByType": { + "$id": "8551", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "8552", + "kind": "string", + "type": { + "$ref": "454" + }, + "value": "2024-08-09T18:13:29.389Z" + } + } + } + } + } + } + ] + }, + { + "$id": "8553", + "kind": "http", + "name": "DataflowEndpoint_CreateOrUpdate_Kafka", + "description": "DataflowEndpoint_CreateOrUpdate_Kafka", + "filePath": "2025-04-01/DataflowEndpoint_CreateOrUpdate_Kafka.json", + "parameters": [ + { + "$id": "8554", + "parameter": { + "$ref": "7922" + }, + "value": { + "$id": "8555", + "kind": "string", + "type": { + "$ref": "7923" + }, + "value": "2025-04-01" + } + }, + { + "$id": "8556", + "parameter": { + "$ref": "7926" + }, + "value": { + "$id": "8557", + "kind": "string", + "type": { + "$ref": "7927" + }, + "value": "F8C729F9-DF9C-4743-848F-96EE433D8E53" + } + }, + { + "$id": "8558", + "parameter": { + "$ref": "7929" + }, + "value": { + "$id": "8559", + "kind": "string", + "type": { + "$ref": "7930" + }, + "value": "rgiotoperations" + } + }, + { + "$id": "8560", + "parameter": { + "$ref": "7931" + }, + "value": { + "$id": "8561", + "kind": "string", + "type": { + "$ref": "7932" + }, + "value": "resource-name123" + } + }, + { + "$id": "8562", + "parameter": { + "$ref": "7933" + }, + "value": { + "$id": "8563", + "kind": "string", + "type": { + "$ref": "7934" + }, + "value": "generic-kafka-endpoint" + } + }, + { + "$id": "8564", + "parameter": { + "$ref": "7941" + }, + "value": { + "$id": "8565", + "kind": "model", + "type": { + "$ref": "1381" + }, + "value": { + "$id": "8566", + "properties": { + "$id": "8567", + "kind": "model", + "type": { + "$ref": "1383" + }, + "value": { + "$id": "8568", + "endpointType": { + "$id": "8569", + "kind": "string", + "type": { + "$ref": "218" + }, + "value": "Kafka" + }, + "kafkaSettings": { + "$id": "8570", + "kind": "model", + "type": { + "$ref": "1514" + }, + "value": { + "$id": "8571", + "host": { + "$id": "8572", + "kind": "string", + "type": { + "$ref": "1552" + }, + "value": "example.kafka.local:9093" + }, + "authentication": { + "$id": "8573", + "kind": "model", + "type": { + "$ref": "1516" + }, + "value": { + "$id": "8574", + "method": { + "$id": "8575", + "kind": "string", + "type": { + "$ref": "258" + }, + "value": "Sasl" + }, + "saslSettings": { + "$id": "8576", + "kind": "model", + "type": { + "$ref": "1527" + }, + "value": { + "$id": "8577", + "saslType": { + "$id": "8578", + "kind": "string", + "type": { + "$ref": "270" + }, + "value": "Plain" + }, + "secretRef": { + "$id": "8579", + "kind": "string", + "type": { + "$ref": "1532" + }, + "value": "my-secret" + } + } + } + } + }, + "tls": { + "$id": "8580", + "kind": "model", + "type": { + "$ref": "1587" + }, + "value": { + "$id": "8581", + "mode": { + "$id": "8582", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Enabled" + }, + "trustedCaCertificateConfigMapRef": { + "$id": "8583", + "kind": "string", + "type": { + "$ref": "1592" + }, + "value": "ca-certificates" + } + } + }, + "consumerGroupId": { + "$id": "8584", + "kind": "string", + "type": { + "$ref": "1548" + }, + "value": "dataflows" + }, + "compression": { + "$id": "8585", + "kind": "string", + "type": { + "$ref": "278" + }, + "value": "Gzip" + }, + "batching": { + "$id": "8586", + "kind": "model", + "type": { + "$ref": "1556" + }, + "value": { + "$id": "8587", + "mode": { + "$id": "8588", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Enabled" + }, + "latencyMs": { + "$id": "8589", + "kind": "number", + "type": { + "$ref": "1561" + }, + "value": 5 + }, + "maxBytes": { + "$id": "8590", + "kind": "number", + "type": { + "$ref": "1565" + }, + "value": 1000000 + }, + "maxMessages": { + "$id": "8591", + "kind": "number", + "type": { + "$ref": "1569" + }, + "value": 100000 + } + } + }, + "partitionStrategy": { + "$id": "8592", + "kind": "string", + "type": { + "$ref": "296" + }, + "value": "Default" + }, + "kafkaAcks": { + "$id": "8593", + "kind": "string", + "type": { + "$ref": "288" + }, + "value": "All" + }, + "copyMqttProperties": { + "$id": "8594", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Enabled" + }, + "cloudEventAttributes": { + "$id": "8595", + "kind": "string", + "type": { + "$ref": "306" + }, + "value": "Propagate" + } + } + } + } + }, + "extendedLocation": { + "$id": "8596", + "kind": "model", + "type": { + "$ref": "510" + }, + "value": { + "$id": "8597", + "name": { + "$id": "8598", + "kind": "string", + "type": { + "$ref": "512" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "8599", + "kind": "string", + "type": { + "$ref": "44" + }, + "value": "CustomLocation" + } + } + } + } + } + } + ], + "responses": [ + { + "$id": "8600", + "response": { + "$ref": "7942" + }, + "statusCode": 200, + "bodyValue": { + "$id": "8601", + "kind": "model", + "type": { + "$ref": "1381" + }, + "value": { + "$id": "8602", + "properties": { + "$id": "8603", + "kind": "model", + "type": { + "$ref": "1383" + }, + "value": { + "$id": "8604", + "endpointType": { + "$id": "8605", + "kind": "string", + "type": { + "$ref": "218" + }, + "value": "Kafka" + }, + "kafkaSettings": { + "$id": "8606", + "kind": "model", + "type": { + "$ref": "1514" + }, + "value": { + "$id": "8607", + "host": { + "$id": "8608", + "kind": "string", + "type": { + "$ref": "1552" + }, + "value": "example.kafka.local:9093" + }, + "authentication": { + "$id": "8609", + "kind": "model", + "type": { + "$ref": "1516" + }, + "value": { + "$id": "8610", + "method": { + "$id": "8611", + "kind": "string", + "type": { + "$ref": "258" + }, + "value": "Sasl" + }, + "saslSettings": { + "$id": "8612", + "kind": "model", + "type": { + "$ref": "1527" + }, + "value": { + "$id": "8613", + "saslType": { + "$id": "8614", + "kind": "string", + "type": { + "$ref": "270" + }, + "value": "Plain" + }, + "secretRef": { + "$id": "8615", + "kind": "string", + "type": { + "$ref": "1532" + }, + "value": "my-secret" + } + } + } + } + }, + "tls": { + "$id": "8616", + "kind": "model", + "type": { + "$ref": "1587" + }, + "value": { + "$id": "8617", + "mode": { + "$id": "8618", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Enabled" + }, + "trustedCaCertificateConfigMapRef": { + "$id": "8619", + "kind": "string", + "type": { + "$ref": "1592" + }, + "value": "ca-certificates" + } + } + }, + "consumerGroupId": { + "$id": "8620", + "kind": "string", + "type": { + "$ref": "1548" + }, + "value": "dataflows" + }, + "compression": { + "$id": "8621", + "kind": "string", + "type": { + "$ref": "278" + }, + "value": "Gzip" + }, + "batching": { + "$id": "8622", + "kind": "model", + "type": { + "$ref": "1556" + }, + "value": { + "$id": "8623", + "mode": { + "$id": "8624", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Enabled" + }, + "latencyMs": { + "$id": "8625", + "kind": "number", + "type": { + "$ref": "1561" + }, + "value": 5 + }, + "maxBytes": { + "$id": "8626", + "kind": "number", + "type": { + "$ref": "1565" + }, + "value": 1000000 + }, + "maxMessages": { + "$id": "8627", + "kind": "number", + "type": { + "$ref": "1569" + }, + "value": 100000 + } + } + }, + "partitionStrategy": { + "$id": "8628", + "kind": "string", + "type": { + "$ref": "296" + }, + "value": "Default" + }, + "kafkaAcks": { + "$id": "8629", + "kind": "string", + "type": { + "$ref": "288" + }, + "value": "All" + }, + "copyMqttProperties": { + "$id": "8630", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Enabled" + }, + "cloudEventAttributes": { + "$id": "8631", + "kind": "string", + "type": { + "$ref": "306" + }, + "value": "Propagate" + } + } + }, + "provisioningState": { + "$id": "8632", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Succeeded" + } + } + }, + "extendedLocation": { + "$id": "8633", + "kind": "model", + "type": { + "$ref": "510" + }, + "value": { + "$id": "8634", + "name": { + "$id": "8635", + "kind": "string", + "type": { + "$ref": "512" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "8636", + "kind": "string", + "type": { + "$ref": "44" + }, + "value": "CustomLocation" + } + } + }, + "id": { + "$id": "8637", + "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": "8638", + "kind": "string", + "type": { + "$ref": "424" + }, + "value": "zyhxscudobzfacetvgyjiav" + }, + "type": { + "$id": "8639", + "kind": "string", + "type": { + "$ref": "428" + }, + "value": "iay" + }, + "systemData": { + "$id": "8640", + "kind": "model", + "type": { + "$ref": "433" + }, + "value": { + "$id": "8641", + "createdBy": { + "$id": "8642", + "kind": "string", + "type": { + "$ref": "435" + }, + "value": "ssvaslsmudloholronopqyxjcu" + }, + "createdByType": { + "$id": "8643", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "createdAt": { + "$id": "8644", + "kind": "string", + "type": { + "$ref": "442" + }, + "value": "2024-08-09T18:13:29.389Z" + }, + "lastModifiedBy": { + "$id": "8645", + "kind": "string", + "type": { + "$ref": "447" + }, + "value": "gnicpuszwd" + }, + "lastModifiedByType": { + "$id": "8646", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "8647", + "kind": "string", + "type": { + "$ref": "454" + }, + "value": "2024-08-09T18:13:29.389Z" + } + } + } + } + } + }, + { + "$id": "8648", + "response": { + "$ref": "7943" + }, + "statusCode": 201, + "bodyValue": { + "$id": "8649", + "kind": "model", + "type": { + "$ref": "1381" + }, + "value": { + "$id": "8650", + "properties": { + "$id": "8651", + "kind": "model", + "type": { + "$ref": "1383" + }, + "value": { + "$id": "8652", + "endpointType": { + "$id": "8653", + "kind": "string", + "type": { + "$ref": "218" + }, + "value": "Kafka" + }, + "kafkaSettings": { + "$id": "8654", + "kind": "model", + "type": { + "$ref": "1514" + }, + "value": { + "$id": "8655", + "host": { + "$id": "8656", + "kind": "string", + "type": { + "$ref": "1552" + }, + "value": "example.kafka.local:9093" + }, + "authentication": { + "$id": "8657", + "kind": "model", + "type": { + "$ref": "1516" + }, + "value": { + "$id": "8658", + "method": { + "$id": "8659", + "kind": "string", + "type": { + "$ref": "258" + }, + "value": "Sasl" + }, + "saslSettings": { + "$id": "8660", + "kind": "model", + "type": { + "$ref": "1527" + }, + "value": { + "$id": "8661", + "saslType": { + "$id": "8662", + "kind": "string", + "type": { + "$ref": "270" + }, + "value": "Plain" + }, + "secretRef": { + "$id": "8663", + "kind": "string", + "type": { + "$ref": "1532" + }, + "value": "my-secret" + } + } + } + } + }, + "tls": { + "$id": "8664", + "kind": "model", + "type": { + "$ref": "1587" + }, + "value": { + "$id": "8665", + "mode": { + "$id": "8666", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Enabled" + }, + "trustedCaCertificateConfigMapRef": { + "$id": "8667", + "kind": "string", + "type": { + "$ref": "1592" + }, + "value": "ca-certificates" + } + } + }, + "consumerGroupId": { + "$id": "8668", + "kind": "string", + "type": { + "$ref": "1548" + }, + "value": "dataflows" + }, + "compression": { + "$id": "8669", + "kind": "string", + "type": { + "$ref": "278" + }, + "value": "Gzip" + }, + "batching": { + "$id": "8670", + "kind": "model", + "type": { + "$ref": "1556" + }, + "value": { + "$id": "8671", + "mode": { + "$id": "8672", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Enabled" + }, + "latencyMs": { + "$id": "8673", + "kind": "number", + "type": { + "$ref": "1561" + }, + "value": 5 + }, + "maxBytes": { + "$id": "8674", + "kind": "number", + "type": { + "$ref": "1565" + }, + "value": 1000000 + }, + "maxMessages": { + "$id": "8675", + "kind": "number", + "type": { + "$ref": "1569" + }, + "value": 100000 + } + } + }, + "partitionStrategy": { + "$id": "8676", + "kind": "string", + "type": { + "$ref": "296" + }, + "value": "Default" + }, + "kafkaAcks": { + "$id": "8677", + "kind": "string", + "type": { + "$ref": "288" + }, + "value": "All" + }, + "copyMqttProperties": { + "$id": "8678", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Enabled" + }, + "cloudEventAttributes": { + "$id": "8679", + "kind": "string", + "type": { + "$ref": "306" + }, + "value": "Propagate" + } + } + }, + "provisioningState": { + "$id": "8680", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Succeeded" + } + } + }, + "extendedLocation": { + "$id": "8681", + "kind": "model", + "type": { + "$ref": "510" + }, + "value": { + "$id": "8682", + "name": { + "$id": "8683", + "kind": "string", + "type": { + "$ref": "512" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "8684", + "kind": "string", + "type": { + "$ref": "44" + }, + "value": "CustomLocation" + } + } + }, + "id": { + "$id": "8685", + "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": "8686", + "kind": "string", + "type": { + "$ref": "424" + }, + "value": "zyhxscudobzfacetvgyjiav" + }, + "type": { + "$id": "8687", + "kind": "string", + "type": { + "$ref": "428" + }, + "value": "iay" + }, + "systemData": { + "$id": "8688", + "kind": "model", + "type": { + "$ref": "433" + }, + "value": { + "$id": "8689", + "createdBy": { + "$id": "8690", + "kind": "string", + "type": { + "$ref": "435" + }, + "value": "ssvaslsmudloholronopqyxjcu" + }, + "createdByType": { + "$id": "8691", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "createdAt": { + "$id": "8692", + "kind": "string", + "type": { + "$ref": "442" + }, + "value": "2024-08-09T18:13:29.389Z" + }, + "lastModifiedBy": { + "$id": "8693", + "kind": "string", + "type": { + "$ref": "447" + }, + "value": "gnicpuszwd" + }, + "lastModifiedByType": { + "$id": "8694", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "8695", + "kind": "string", + "type": { + "$ref": "454" + }, + "value": "2024-08-09T18:13:29.389Z" + } + } + } + } + } + } + ] + }, + { + "$id": "8696", + "kind": "http", + "name": "DataflowEndpoint_CreateOrUpdate_LocalStorage", + "description": "DataflowEndpoint_CreateOrUpdate_LocalStorage", + "filePath": "2025-04-01/DataflowEndpoint_CreateOrUpdate_LocalStorage.json", + "parameters": [ + { + "$id": "8697", + "parameter": { + "$ref": "7922" + }, + "value": { + "$id": "8698", + "kind": "string", + "type": { + "$ref": "7923" + }, + "value": "2025-04-01" + } + }, + { + "$id": "8699", + "parameter": { + "$ref": "7926" + }, + "value": { + "$id": "8700", + "kind": "string", + "type": { + "$ref": "7927" + }, + "value": "F8C729F9-DF9C-4743-848F-96EE433D8E53" + } + }, + { + "$id": "8701", + "parameter": { + "$ref": "7929" + }, + "value": { + "$id": "8702", + "kind": "string", + "type": { + "$ref": "7930" + }, + "value": "rgiotoperations" + } + }, + { + "$id": "8703", + "parameter": { + "$ref": "7931" + }, + "value": { + "$id": "8704", + "kind": "string", + "type": { + "$ref": "7932" + }, + "value": "resource-name123" + } + }, + { + "$id": "8705", + "parameter": { + "$ref": "7933" + }, + "value": { + "$id": "8706", + "kind": "string", + "type": { + "$ref": "7934" + }, + "value": "local-storage-endpoint" + } + }, + { + "$id": "8707", + "parameter": { + "$ref": "7941" + }, + "value": { + "$id": "8708", + "kind": "model", + "type": { + "$ref": "1381" + }, + "value": { + "$id": "8709", + "properties": { + "$id": "8710", + "kind": "model", + "type": { + "$ref": "1383" + }, + "value": { + "$id": "8711", + "endpointType": { + "$id": "8712", + "kind": "string", + "type": { + "$ref": "218" + }, + "value": "LocalStorage" + }, + "localStorageSettings": { + "$id": "8713", + "kind": "model", + "type": { + "$ref": "1603" + }, + "value": { + "$id": "8714", + "persistentVolumeClaimRef": { + "$id": "8715", + "kind": "string", + "type": { + "$ref": "1605" + }, + "value": "example-pvc" + } + } + } + } + }, + "extendedLocation": { + "$id": "8716", + "kind": "model", + "type": { + "$ref": "510" + }, + "value": { + "$id": "8717", + "name": { + "$id": "8718", + "kind": "string", + "type": { + "$ref": "512" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "8719", + "kind": "string", + "type": { + "$ref": "44" + }, + "value": "CustomLocation" + } + } + } + } + } + } + ], + "responses": [ + { + "$id": "8720", + "response": { + "$ref": "7942" + }, + "statusCode": 200, + "bodyValue": { + "$id": "8721", + "kind": "model", + "type": { + "$ref": "1381" + }, + "value": { + "$id": "8722", + "properties": { + "$id": "8723", + "kind": "model", + "type": { + "$ref": "1383" + }, + "value": { + "$id": "8724", + "endpointType": { + "$id": "8725", + "kind": "string", + "type": { + "$ref": "218" + }, + "value": "LocalStorage" + }, + "localStorageSettings": { + "$id": "8726", + "kind": "model", + "type": { + "$ref": "1603" + }, + "value": { + "$id": "8727", + "persistentVolumeClaimRef": { + "$id": "8728", + "kind": "string", + "type": { + "$ref": "1605" + }, + "value": "example-pvc" + } + } + }, + "provisioningState": { + "$id": "8729", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Succeeded" + } + } + }, + "extendedLocation": { + "$id": "8730", + "kind": "model", + "type": { + "$ref": "510" + }, + "value": { + "$id": "8731", + "name": { + "$id": "8732", + "kind": "string", + "type": { + "$ref": "512" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "8733", + "kind": "string", + "type": { + "$ref": "44" + }, + "value": "CustomLocation" + } + } + }, + "id": { + "$id": "8734", + "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": "8735", + "kind": "string", + "type": { + "$ref": "424" + }, + "value": "zyhxscudobzfacetvgyjiav" + }, + "type": { + "$id": "8736", + "kind": "string", + "type": { + "$ref": "428" + }, + "value": "iay" + }, + "systemData": { + "$id": "8737", + "kind": "model", + "type": { + "$ref": "433" + }, + "value": { + "$id": "8738", + "createdBy": { + "$id": "8739", + "kind": "string", + "type": { + "$ref": "435" + }, + "value": "ssvaslsmudloholronopqyxjcu" + }, + "createdByType": { + "$id": "8740", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "createdAt": { + "$id": "8741", + "kind": "string", + "type": { + "$ref": "442" + }, + "value": "2024-08-09T18:13:29.389Z" + }, + "lastModifiedBy": { + "$id": "8742", + "kind": "string", + "type": { + "$ref": "447" + }, + "value": "gnicpuszwd" + }, + "lastModifiedByType": { + "$id": "8743", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "8744", + "kind": "string", + "type": { + "$ref": "454" + }, + "value": "2024-08-09T18:13:29.389Z" + } + } + } + } + } + }, + { + "$id": "8745", + "response": { + "$ref": "7943" + }, + "statusCode": 201, + "bodyValue": { + "$id": "8746", + "kind": "model", + "type": { + "$ref": "1381" + }, + "value": { + "$id": "8747", + "properties": { + "$id": "8748", + "kind": "model", + "type": { + "$ref": "1383" + }, + "value": { + "$id": "8749", + "endpointType": { + "$id": "8750", + "kind": "string", + "type": { + "$ref": "218" + }, + "value": "LocalStorage" + }, + "localStorageSettings": { + "$id": "8751", + "kind": "model", + "type": { + "$ref": "1603" + }, + "value": { + "$id": "8752", + "persistentVolumeClaimRef": { + "$id": "8753", + "kind": "string", + "type": { + "$ref": "1605" + }, + "value": "example-pvc" + } + } + }, + "provisioningState": { + "$id": "8754", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Succeeded" + } + } + }, + "extendedLocation": { + "$id": "8755", + "kind": "model", + "type": { + "$ref": "510" + }, + "value": { + "$id": "8756", + "name": { + "$id": "8757", + "kind": "string", + "type": { + "$ref": "512" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "8758", + "kind": "string", + "type": { + "$ref": "44" + }, + "value": "CustomLocation" + } + } + }, + "id": { + "$id": "8759", + "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": "8760", + "kind": "string", + "type": { + "$ref": "424" + }, + "value": "zyhxscudobzfacetvgyjiav" + }, + "type": { + "$id": "8761", + "kind": "string", + "type": { + "$ref": "428" + }, + "value": "iay" + }, + "systemData": { + "$id": "8762", + "kind": "model", + "type": { + "$ref": "433" + }, + "value": { + "$id": "8763", + "createdBy": { + "$id": "8764", + "kind": "string", + "type": { + "$ref": "435" + }, + "value": "ssvaslsmudloholronopqyxjcu" + }, + "createdByType": { + "$id": "8765", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "createdAt": { + "$id": "8766", + "kind": "string", + "type": { + "$ref": "442" + }, + "value": "2024-08-09T18:13:29.389Z" + }, + "lastModifiedBy": { + "$id": "8767", + "kind": "string", + "type": { + "$ref": "447" + }, + "value": "gnicpuszwd" + }, + "lastModifiedByType": { + "$id": "8768", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "8769", + "kind": "string", + "type": { + "$ref": "454" + }, + "value": "2024-08-09T18:13:29.389Z" + } + } + } + } + } + } + ] + }, + { + "$id": "8770", + "kind": "http", + "name": "DataflowEndpoint_CreateOrUpdate_MQTT", + "description": "DataflowEndpoint_CreateOrUpdate_MQTT", + "filePath": "2025-04-01/DataflowEndpoint_CreateOrUpdate_MQTT.json", + "parameters": [ + { + "$id": "8771", + "parameter": { + "$ref": "7922" + }, + "value": { + "$id": "8772", + "kind": "string", + "type": { + "$ref": "7923" + }, + "value": "2025-04-01" + } + }, + { + "$id": "8773", + "parameter": { + "$ref": "7926" + }, + "value": { + "$id": "8774", + "kind": "string", + "type": { + "$ref": "7927" + }, + "value": "F8C729F9-DF9C-4743-848F-96EE433D8E53" + } + }, + { + "$id": "8775", + "parameter": { + "$ref": "7929" + }, + "value": { + "$id": "8776", + "kind": "string", + "type": { + "$ref": "7930" + }, + "value": "rgiotoperations" + } + }, + { + "$id": "8777", + "parameter": { + "$ref": "7931" + }, + "value": { + "$id": "8778", + "kind": "string", + "type": { + "$ref": "7932" + }, + "value": "resource-name123" + } + }, + { + "$id": "8779", + "parameter": { + "$ref": "7933" + }, + "value": { + "$id": "8780", + "kind": "string", + "type": { + "$ref": "7934" + }, + "value": "generic-mqtt-broker-endpoint" + } + }, + { + "$id": "8781", + "parameter": { + "$ref": "7941" + }, + "value": { + "$id": "8782", + "kind": "model", + "type": { + "$ref": "1381" + }, + "value": { + "$id": "8783", + "properties": { + "$id": "8784", + "kind": "model", + "type": { + "$ref": "1383" + }, + "value": { + "$id": "8785", + "endpointType": { + "$id": "8786", + "kind": "string", + "type": { + "$ref": "218" + }, + "value": "Mqtt" + }, + "mqttSettings": { + "$id": "8787", + "kind": "model", + "type": { + "$ref": "1611" + }, + "value": { + "$id": "8788", + "host": { + "$id": "8789", + "kind": "string", + "type": { + "$ref": "1641" + }, + "value": "example.broker.local:1883" + }, + "authentication": { + "$id": "8790", + "kind": "model", + "type": { + "$ref": "1613" + }, + "value": { + "$id": "8791", + "method": { + "$id": "8792", + "kind": "string", + "type": { + "$ref": "312" + }, + "value": "X509Certificate" + }, + "x509CertificateSettings": { + "$id": "8793", + "kind": "model", + "type": { + "$ref": "1538" + }, + "value": { + "$id": "8794", + "secretRef": { + "$id": "8795", + "kind": "string", + "type": { + "$ref": "1540" + }, + "value": "example-secret" + } + } + } + } + }, + "tls": { + "$id": "8796", + "kind": "model", + "type": { + "$ref": "1587" + }, + "value": { + "$id": "8797", + "mode": { + "$id": "8798", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Disabled" + } + } + }, + "clientIdPrefix": { + "$id": "8799", + "kind": "string", + "type": { + "$ref": "1637" + }, + "value": "factory-gateway" + }, + "retain": { + "$id": "8800", + "kind": "string", + "type": { + "$ref": "324" + }, + "value": "Keep" + }, + "sessionExpirySeconds": { + "$id": "8801", + "kind": "number", + "type": { + "$ref": "1663" + }, + "value": 3600 + }, + "qos": { + "$id": "8802", + "kind": "number", + "type": { + "$ref": "1659" + }, + "value": 1 + }, + "protocol": { + "$id": "8803", + "kind": "string", + "type": { + "$ref": "124" + }, + "value": "WebSockets" + }, + "maxInflightMessages": { + "$id": "8804", + "kind": "number", + "type": { + "$ref": "1655" + }, + "value": 100 + }, + "keepAliveSeconds": { + "$id": "8805", + "kind": "number", + "type": { + "$ref": "1648" + }, + "value": 60 + } + } + } + } + }, + "extendedLocation": { + "$id": "8806", + "kind": "model", + "type": { + "$ref": "510" + }, + "value": { + "$id": "8807", + "name": { + "$id": "8808", + "kind": "string", + "type": { + "$ref": "512" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "8809", + "kind": "string", + "type": { + "$ref": "44" + }, + "value": "CustomLocation" + } + } + } + } + } + } + ], + "responses": [ + { + "$id": "8810", + "response": { + "$ref": "7942" + }, + "statusCode": 200, + "bodyValue": { + "$id": "8811", + "kind": "model", + "type": { + "$ref": "1381" + }, + "value": { + "$id": "8812", + "properties": { + "$id": "8813", + "kind": "model", + "type": { + "$ref": "1383" + }, + "value": { + "$id": "8814", + "endpointType": { + "$id": "8815", + "kind": "string", + "type": { + "$ref": "218" + }, + "value": "Mqtt" + }, + "mqttSettings": { + "$id": "8816", + "kind": "model", + "type": { + "$ref": "1611" + }, + "value": { + "$id": "8817", + "host": { + "$id": "8818", + "kind": "string", + "type": { + "$ref": "1641" + }, + "value": "example.broker.local:1883" + }, + "authentication": { + "$id": "8819", + "kind": "model", + "type": { + "$ref": "1613" + }, + "value": { + "$id": "8820", + "method": { + "$id": "8821", + "kind": "string", + "type": { + "$ref": "312" + }, + "value": "X509Certificate" + }, + "x509CertificateSettings": { + "$id": "8822", + "kind": "model", + "type": { + "$ref": "1538" + }, + "value": { + "$id": "8823", + "secretRef": { + "$id": "8824", + "kind": "string", + "type": { + "$ref": "1540" + }, + "value": "example-secret" + } + } + } + } + }, + "tls": { + "$id": "8825", + "kind": "model", + "type": { + "$ref": "1587" + }, + "value": { + "$id": "8826", + "mode": { + "$id": "8827", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Disabled" + } + } + }, + "clientIdPrefix": { + "$id": "8828", + "kind": "string", + "type": { + "$ref": "1637" + }, + "value": "factory-gateway" + }, + "retain": { + "$id": "8829", + "kind": "string", + "type": { + "$ref": "324" + }, + "value": "Keep" + }, + "sessionExpirySeconds": { + "$id": "8830", + "kind": "number", + "type": { + "$ref": "1663" + }, + "value": 3600 + }, + "qos": { + "$id": "8831", + "kind": "number", + "type": { + "$ref": "1659" + }, + "value": 1 + }, + "protocol": { + "$id": "8832", + "kind": "string", + "type": { + "$ref": "124" + }, + "value": "WebSockets" + }, + "maxInflightMessages": { + "$id": "8833", + "kind": "number", + "type": { + "$ref": "1655" + }, + "value": 100 + }, + "keepAliveSeconds": { + "$id": "8834", + "kind": "number", + "type": { + "$ref": "1648" + }, + "value": 60 + } + } + }, + "provisioningState": { + "$id": "8835", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Succeeded" + } + } + }, + "extendedLocation": { + "$id": "8836", + "kind": "model", + "type": { + "$ref": "510" + }, + "value": { + "$id": "8837", + "name": { + "$id": "8838", + "kind": "string", + "type": { + "$ref": "512" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "8839", + "kind": "string", + "type": { + "$ref": "44" + }, + "value": "CustomLocation" + } + } + }, + "id": { + "$id": "8840", + "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": "8841", + "kind": "string", + "type": { + "$ref": "424" + }, + "value": "zyhxscudobzfacetvgyjiav" + }, + "type": { + "$id": "8842", + "kind": "string", + "type": { + "$ref": "428" + }, + "value": "iay" + }, + "systemData": { + "$id": "8843", + "kind": "model", + "type": { + "$ref": "433" + }, + "value": { + "$id": "8844", + "createdBy": { + "$id": "8845", + "kind": "string", + "type": { + "$ref": "435" + }, + "value": "ssvaslsmudloholronopqyxjcu" + }, + "createdByType": { + "$id": "8846", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "createdAt": { + "$id": "8847", + "kind": "string", + "type": { + "$ref": "442" + }, + "value": "2024-08-09T18:13:29.389Z" + }, + "lastModifiedBy": { + "$id": "8848", + "kind": "string", + "type": { + "$ref": "447" + }, + "value": "gnicpuszwd" + }, + "lastModifiedByType": { + "$id": "8849", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "8850", + "kind": "string", + "type": { + "$ref": "454" + }, + "value": "2024-08-09T18:13:29.389Z" + } + } + } + } + } + }, + { + "$id": "8851", + "response": { + "$ref": "7943" + }, + "statusCode": 201, + "bodyValue": { + "$id": "8852", + "kind": "model", + "type": { + "$ref": "1381" + }, + "value": { + "$id": "8853", + "properties": { + "$id": "8854", + "kind": "model", + "type": { + "$ref": "1383" + }, + "value": { + "$id": "8855", + "endpointType": { + "$id": "8856", + "kind": "string", + "type": { + "$ref": "218" + }, + "value": "Mqtt" + }, + "mqttSettings": { + "$id": "8857", + "kind": "model", + "type": { + "$ref": "1611" + }, + "value": { + "$id": "8858", + "host": { + "$id": "8859", + "kind": "string", + "type": { + "$ref": "1641" + }, + "value": "example.broker.local:1883" + }, + "authentication": { + "$id": "8860", + "kind": "model", + "type": { + "$ref": "1613" + }, + "value": { + "$id": "8861", + "method": { + "$id": "8862", + "kind": "string", + "type": { + "$ref": "312" + }, + "value": "X509Certificate" + }, + "x509CertificateSettings": { + "$id": "8863", + "kind": "model", + "type": { + "$ref": "1538" + }, + "value": { + "$id": "8864", + "secretRef": { + "$id": "8865", + "kind": "string", + "type": { + "$ref": "1540" + }, + "value": "example-secret" + } + } + } + } + }, + "tls": { + "$id": "8866", + "kind": "model", + "type": { + "$ref": "1587" + }, + "value": { + "$id": "8867", + "mode": { + "$id": "8868", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Disabled" + } + } + }, + "clientIdPrefix": { + "$id": "8869", + "kind": "string", + "type": { + "$ref": "1637" + }, + "value": "factory-gateway" + }, + "retain": { + "$id": "8870", + "kind": "string", + "type": { + "$ref": "324" + }, + "value": "Keep" + }, + "sessionExpirySeconds": { + "$id": "8871", + "kind": "number", + "type": { + "$ref": "1663" + }, + "value": 3600 + }, + "qos": { + "$id": "8872", + "kind": "number", + "type": { + "$ref": "1659" + }, + "value": 1 + }, + "protocol": { + "$id": "8873", + "kind": "string", + "type": { + "$ref": "124" + }, + "value": "WebSockets" + }, + "maxInflightMessages": { + "$id": "8874", + "kind": "number", + "type": { + "$ref": "1655" + }, + "value": 100 + }, + "keepAliveSeconds": { + "$id": "8875", + "kind": "number", + "type": { + "$ref": "1648" + }, + "value": 60 + } + } + }, + "provisioningState": { + "$id": "8876", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Succeeded" + } + } + }, + "extendedLocation": { + "$id": "8877", + "kind": "model", + "type": { + "$ref": "510" + }, + "value": { + "$id": "8878", + "name": { + "$id": "8879", + "kind": "string", + "type": { + "$ref": "512" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "8880", + "kind": "string", + "type": { + "$ref": "44" + }, + "value": "CustomLocation" + } + } + }, + "id": { + "$id": "8881", + "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": "8882", + "kind": "string", + "type": { + "$ref": "424" + }, + "value": "zyhxscudobzfacetvgyjiav" + }, + "type": { + "$id": "8883", + "kind": "string", + "type": { + "$ref": "428" + }, + "value": "iay" + }, + "systemData": { + "$id": "8884", + "kind": "model", + "type": { + "$ref": "433" + }, + "value": { + "$id": "8885", + "createdBy": { + "$id": "8886", + "kind": "string", + "type": { + "$ref": "435" + }, + "value": "ssvaslsmudloholronopqyxjcu" + }, + "createdByType": { + "$id": "8887", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "createdAt": { + "$id": "8888", + "kind": "string", + "type": { + "$ref": "442" + }, + "value": "2024-08-09T18:13:29.389Z" + }, + "lastModifiedBy": { + "$id": "8889", + "kind": "string", + "type": { + "$ref": "447" + }, + "value": "gnicpuszwd" + }, + "lastModifiedByType": { + "$id": "8890", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "8891", + "kind": "string", + "type": { + "$ref": "454" + }, + "value": "2024-08-09T18:13:29.389Z" + } + } + } + } + } + } + ] + }, + { + "$id": "8892", + "kind": "http", + "name": "DataflowEndpoint_CreateOrUpdate", + "description": "DataflowEndpoint_CreateOrUpdate", + "filePath": "2025-04-01/DataflowEndpoint_CreateOrUpdate_MaximumSet_Gen.json", + "parameters": [ + { + "$id": "8893", + "parameter": { + "$ref": "7922" + }, + "value": { + "$id": "8894", + "kind": "string", + "type": { + "$ref": "7923" + }, + "value": "2025-04-01" + } + }, + { + "$id": "8895", + "parameter": { + "$ref": "7926" + }, + "value": { + "$id": "8896", + "kind": "string", + "type": { + "$ref": "7927" + }, + "value": "F8C729F9-DF9C-4743-848F-96EE433D8E53" + } + }, + { + "$id": "8897", + "parameter": { + "$ref": "7929" + }, + "value": { + "$id": "8898", + "kind": "string", + "type": { + "$ref": "7930" + }, + "value": "rgiotoperations" + } + }, + { + "$id": "8899", + "parameter": { + "$ref": "7931" + }, + "value": { + "$id": "8900", + "kind": "string", + "type": { + "$ref": "7932" + }, + "value": "resource-name123" + } + }, + { + "$id": "8901", + "parameter": { + "$ref": "7933" + }, + "value": { + "$id": "8902", + "kind": "string", + "type": { + "$ref": "7934" + }, + "value": "resource-name123" + } + }, + { + "$id": "8903", + "parameter": { + "$ref": "7941" + }, + "value": { + "$id": "8904", + "kind": "model", + "type": { + "$ref": "1381" + }, + "value": { + "$id": "8905", + "properties": { + "$id": "8906", + "kind": "model", + "type": { + "$ref": "1383" + }, + "value": { + "$id": "8907", + "endpointType": { + "$id": "8908", + "kind": "string", + "type": { + "$ref": "218" + }, + "value": "DataExplorer" + }, + "dataExplorerSettings": { + "$id": "8909", + "kind": "model", + "type": { + "$ref": "1388" + }, + "value": { + "$id": "8910", + "authentication": { + "$id": "8911", + "kind": "model", + "type": { + "$ref": "1390" + }, + "value": { + "$id": "8912", + "method": { + "$id": "8913", + "kind": "string", + "type": { + "$ref": "232" + }, + "value": "SystemAssignedManagedIdentity" + }, + "systemAssignedManagedIdentitySettings": { + "$id": "8914", + "kind": "model", + "type": { + "$ref": "1395" + }, + "value": { + "$id": "8915", + "audience": { + "$id": "8916", + "kind": "string", + "type": { + "$ref": "1397" + }, + "value": "psxomrfbhoflycm" + } + } + }, + "userAssignedManagedIdentitySettings": { + "$id": "8917", + "kind": "model", + "type": { + "$ref": "1403" + }, + "value": { + "$id": "8918", + "clientId": { + "$id": "8919", + "kind": "string", + "type": { + "$ref": "1405" + }, + "value": "fb90f267-8872-431a-a76a-a1cec5d3c4d2" + }, + "scope": { + "$id": "8920", + "kind": "string", + "type": { + "$ref": "1409" + }, + "value": "zop" + }, + "tenantId": { + "$id": "8921", + "kind": "string", + "type": { + "$ref": "1413" + }, + "value": "ed060aa2-71ff-4d3f-99c4-a9138356fdec" + } + } + } + } + }, + "database": { + "$id": "8922", + "kind": "string", + "type": { + "$ref": "1421" + }, + "value": "yqcdpjsifm" + }, + "host": { + "$id": "8923", + "kind": "string", + "type": { + "$ref": "1425" + }, + "value": "..kusto.windows.net" + }, + "batching": { + "$id": "8924", + "kind": "model", + "type": { + "$ref": "1429" + }, + "value": { + "$id": "8925", + "latencySeconds": { + "$id": "8926", + "kind": "number", + "type": { + "$ref": "1431" + }, + "value": 9312 + }, + "maxMessages": { + "$id": "8927", + "kind": "number", + "type": { + "$ref": "1435" + }, + "value": 9028 + } + } + } + } + }, + "dataLakeStorageSettings": { + "$id": "8928", + "kind": "model", + "type": { + "$ref": "1443" + }, + "value": { + "$id": "8929", + "authentication": { + "$id": "8930", + "kind": "model", + "type": { + "$ref": "1445" + }, + "value": { + "$id": "8931", + "method": { + "$id": "8932", + "kind": "string", + "type": { + "$ref": "238" + }, + "value": "SystemAssignedManagedIdentity" + }, + "accessTokenSettings": { + "$id": "8933", + "kind": "model", + "type": { + "$ref": "1450" + }, + "value": { + "$id": "8934", + "secretRef": { + "$id": "8935", + "kind": "string", + "type": { + "$ref": "1452" + }, + "value": "sevriyphcvnlrnfudqzejecwa" + } + } + }, + "systemAssignedManagedIdentitySettings": { + "$id": "8936", + "kind": "model", + "type": { + "$ref": "1395" + }, + "value": { + "$id": "8937", + "audience": { + "$id": "8938", + "kind": "string", + "type": { + "$ref": "1397" + }, + "value": "psxomrfbhoflycm" + } + } + }, + "userAssignedManagedIdentitySettings": { + "$id": "8939", + "kind": "model", + "type": { + "$ref": "1403" + }, + "value": { + "$id": "8940", + "clientId": { + "$id": "8941", + "kind": "string", + "type": { + "$ref": "1405" + }, + "value": "fb90f267-8872-431a-a76a-a1cec5d3c4d2" + }, + "scope": { + "$id": "8942", + "kind": "string", + "type": { + "$ref": "1409" + }, + "value": "zop" + }, + "tenantId": { + "$id": "8943", + "kind": "string", + "type": { + "$ref": "1413" + }, + "value": "ed060aa2-71ff-4d3f-99c4-a9138356fdec" + } + } + } + } + }, + "host": { + "$id": "8944", + "kind": "string", + "type": { + "$ref": "1466" + }, + "value": ".blob.core.windows.net" + }, + "batching": { + "$id": "8945", + "kind": "model", + "type": { + "$ref": "1429" + }, + "value": { + "$id": "8946", + "latencySeconds": { + "$id": "8947", + "kind": "number", + "type": { + "$ref": "1431" + }, + "value": 9312 + }, + "maxMessages": { + "$id": "8948", + "kind": "number", + "type": { + "$ref": "1435" + }, + "value": 9028 + } + } + } + } + }, + "fabricOneLakeSettings": { + "$id": "8949", + "kind": "model", + "type": { + "$ref": "1475" + }, + "value": { + "$id": "8950", + "authentication": { + "$id": "8951", + "kind": "model", + "type": { + "$ref": "1477" + }, + "value": { + "$id": "8952", + "method": { + "$id": "8953", + "kind": "string", + "type": { + "$ref": "246" + }, + "value": "SystemAssignedManagedIdentity" + }, + "systemAssignedManagedIdentitySettings": { + "$id": "8954", + "kind": "model", + "type": { + "$ref": "1395" + }, + "value": { + "$id": "8955", + "audience": { + "$id": "8956", + "kind": "string", + "type": { + "$ref": "1397" + }, + "value": "psxomrfbhoflycm" + } + } + }, + "userAssignedManagedIdentitySettings": { + "$id": "8957", + "kind": "model", + "type": { + "$ref": "1403" + }, + "value": { + "$id": "8958", + "clientId": { + "$id": "8959", + "kind": "string", + "type": { + "$ref": "1405" + }, + "value": "fb90f267-8872-431a-a76a-a1cec5d3c4d2" + }, + "scope": { + "$id": "8960", + "kind": "string", + "type": { + "$ref": "1409" + }, + "value": "zop" + }, + "tenantId": { + "$id": "8961", + "kind": "string", + "type": { + "$ref": "1413" + }, + "value": "ed060aa2-71ff-4d3f-99c4-a9138356fdec" + } + } + } + } + }, + "names": { + "$id": "8962", + "kind": "model", + "type": { + "$ref": "1490" + }, + "value": { + "$id": "8963", + "lakehouseName": { + "$id": "8964", + "kind": "string", + "type": { + "$ref": "1492" + }, + "value": "wpeathi" + }, + "workspaceName": { + "$id": "8965", + "kind": "string", + "type": { + "$ref": "1496" + }, + "value": "nwgmitkbljztgms" + } + } + }, + "oneLakePathType": { + "$id": "8966", + "kind": "string", + "type": { + "$ref": "252" + }, + "value": "Files" + }, + "host": { + "$id": "8967", + "kind": "string", + "type": { + "$ref": "1505" + }, + "value": "https://.fabric.microsoft.com" + }, + "batching": { + "$id": "8968", + "kind": "model", + "type": { + "$ref": "1429" + }, + "value": { + "$id": "8969", + "latencySeconds": { + "$id": "8970", + "kind": "number", + "type": { + "$ref": "1431" + }, + "value": 9312 + }, + "maxMessages": { + "$id": "8971", + "kind": "number", + "type": { + "$ref": "1435" + }, + "value": 9028 + } + } + } + } + }, + "kafkaSettings": { + "$id": "8972", + "kind": "model", + "type": { + "$ref": "1514" + }, + "value": { + "$id": "8973", + "authentication": { + "$id": "8974", + "kind": "model", + "type": { + "$ref": "1516" + }, + "value": { + "$id": "8975", + "method": { + "$id": "8976", + "kind": "string", + "type": { + "$ref": "258" + }, + "value": "SystemAssignedManagedIdentity" + }, + "systemAssignedManagedIdentitySettings": { + "$id": "8977", + "kind": "model", + "type": { + "$ref": "1395" + }, + "value": { + "$id": "8978", + "audience": { + "$id": "8979", + "kind": "string", + "type": { + "$ref": "1397" + }, + "value": "psxomrfbhoflycm" + } + } + }, + "userAssignedManagedIdentitySettings": { + "$id": "8980", + "kind": "model", + "type": { + "$ref": "1403" + }, + "value": { + "$id": "8981", + "clientId": { + "$id": "8982", + "kind": "string", + "type": { + "$ref": "1405" + }, + "value": "fb90f267-8872-431a-a76a-a1cec5d3c4d2" + }, + "scope": { + "$id": "8983", + "kind": "string", + "type": { + "$ref": "1409" + }, + "value": "zop" + }, + "tenantId": { + "$id": "8984", + "kind": "string", + "type": { + "$ref": "1413" + }, + "value": "ed060aa2-71ff-4d3f-99c4-a9138356fdec" + } + } + }, + "saslSettings": { + "$id": "8985", + "kind": "model", + "type": { + "$ref": "1527" + }, + "value": { + "$id": "8986", + "saslType": { + "$id": "8987", + "kind": "string", + "type": { + "$ref": "270" + }, + "value": "Plain" + }, + "secretRef": { + "$id": "8988", + "kind": "string", + "type": { + "$ref": "1532" + }, + "value": "visyxoztqnylvbyokhtmpdkwes" + } + } + }, + "x509CertificateSettings": { + "$id": "8989", + "kind": "model", + "type": { + "$ref": "1538" + }, + "value": { + "$id": "8990", + "secretRef": { + "$id": "8991", + "kind": "string", + "type": { + "$ref": "1540" + }, + "value": "afwizrystfslkfqd" + } + } + } + } + }, + "consumerGroupId": { + "$id": "8992", + "kind": "string", + "type": { + "$ref": "1548" + }, + "value": "ukkzcjiyenhxokat" + }, + "host": { + "$id": "8993", + "kind": "string", + "type": { + "$ref": "1552" + }, + "value": "pwcqfiqclcgneolpewnyavoulbip" + }, + "batching": { + "$id": "8994", + "kind": "model", + "type": { + "$ref": "1556" + }, + "value": { + "$id": "8995", + "mode": { + "$id": "8996", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Enabled" + }, + "latencyMs": { + "$id": "8997", + "kind": "number", + "type": { + "$ref": "1561" + }, + "value": 3679 + }, + "maxBytes": { + "$id": "8998", + "kind": "number", + "type": { + "$ref": "1565" + }, + "value": 8887 + }, + "maxMessages": { + "$id": "8999", + "kind": "number", + "type": { + "$ref": "1569" + }, + "value": 2174 + } + } + }, + "copyMqttProperties": { + "$id": "9000", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Enabled" + }, + "compression": { + "$id": "9001", + "kind": "string", + "type": { + "$ref": "278" + }, + "value": "None" + }, + "kafkaAcks": { + "$id": "9002", + "kind": "string", + "type": { + "$ref": "288" + }, + "value": "Zero" + }, + "partitionStrategy": { + "$id": "9003", + "kind": "string", + "type": { + "$ref": "296" + }, + "value": "Default" + }, + "tls": { + "$id": "9004", + "kind": "model", + "type": { + "$ref": "1587" + }, + "value": { + "$id": "9005", + "mode": { + "$id": "9006", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Enabled" + }, + "trustedCaCertificateConfigMapRef": { + "$id": "9007", + "kind": "string", + "type": { + "$ref": "1592" + }, + "value": "tectjjvukvelsreihwadh" + } + } + }, + "cloudEventAttributes": { + "$id": "9008", + "kind": "string", + "type": { + "$ref": "306" + }, + "value": "PassThrough" + } + } + }, + "localStorageSettings": { + "$id": "9009", + "kind": "model", + "type": { + "$ref": "1603" + }, + "value": { + "$id": "9010", + "persistentVolumeClaimRef": { + "$id": "9011", + "kind": "string", + "type": { + "$ref": "1605" + }, + "value": "jjwqwvd" + } + } + }, + "mqttSettings": { + "$id": "9012", + "kind": "model", + "type": { + "$ref": "1611" + }, + "value": { + "$id": "9013", + "authentication": { + "$id": "9014", + "kind": "model", + "type": { + "$ref": "1613" + }, + "value": { + "$id": "9015", + "method": { + "$id": "9016", + "kind": "string", + "type": { + "$ref": "312" + }, + "value": "SystemAssignedManagedIdentity" + }, + "systemAssignedManagedIdentitySettings": { + "$id": "9017", + "kind": "model", + "type": { + "$ref": "1395" + }, + "value": { + "$id": "9018", + "audience": { + "$id": "9019", + "kind": "string", + "type": { + "$ref": "1397" + }, + "value": "psxomrfbhoflycm" + } + } + }, + "userAssignedManagedIdentitySettings": { + "$id": "9020", + "kind": "model", + "type": { + "$ref": "1403" + }, + "value": { + "$id": "9021", + "clientId": { + "$id": "9022", + "kind": "string", + "type": { + "$ref": "1405" + }, + "value": "fb90f267-8872-431a-a76a-a1cec5d3c4d2" + }, + "scope": { + "$id": "9023", + "kind": "string", + "type": { + "$ref": "1409" + }, + "value": "zop" + }, + "tenantId": { + "$id": "9024", + "kind": "string", + "type": { + "$ref": "1413" + }, + "value": "ed060aa2-71ff-4d3f-99c4-a9138356fdec" + } + } + }, + "serviceAccountTokenSettings": { + "$id": "9025", + "kind": "model", + "type": { + "$ref": "1624" + }, + "value": { + "$id": "9026", + "audience": { + "$id": "9027", + "kind": "string", + "type": { + "$ref": "1626" + }, + "value": "ejbklrbxgjaqleoycgpje" + } + } + }, + "x509CertificateSettings": { + "$id": "9028", + "kind": "model", + "type": { + "$ref": "1538" + }, + "value": { + "$id": "9029", + "secretRef": { + "$id": "9030", + "kind": "string", + "type": { + "$ref": "1540" + }, + "value": "afwizrystfslkfqd" + } + } + } + } + }, + "clientIdPrefix": { + "$id": "9031", + "kind": "string", + "type": { + "$ref": "1637" + }, + "value": "kkljsdxdirfhwxtkavldekeqhv" + }, + "host": { + "$id": "9032", + "kind": "string", + "type": { + "$ref": "1641" + }, + "value": "nyhnxqnbspstctl" + }, + "protocol": { + "$id": "9033", + "kind": "string", + "type": { + "$ref": "124" + }, + "value": "Mqtt" + }, + "keepAliveSeconds": { + "$id": "9034", + "kind": "number", + "type": { + "$ref": "1648" + }, + "value": 0 + }, + "retain": { + "$id": "9035", + "kind": "string", + "type": { + "$ref": "324" + }, + "value": "Keep" + }, + "maxInflightMessages": { + "$id": "9036", + "kind": "number", + "type": { + "$ref": "1655" + }, + "value": 0 + }, + "qos": { + "$id": "9037", + "kind": "number", + "type": { + "$ref": "1659" + }, + "value": 1 + }, + "sessionExpirySeconds": { + "$id": "9038", + "kind": "number", + "type": { + "$ref": "1663" + }, + "value": 0 + }, + "tls": { + "$id": "9039", + "kind": "model", + "type": { + "$ref": "1587" + }, + "value": { + "$id": "9040", + "mode": { + "$id": "9041", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Enabled" + }, + "trustedCaCertificateConfigMapRef": { + "$id": "9042", + "kind": "string", + "type": { + "$ref": "1592" + }, + "value": "tectjjvukvelsreihwadh" + } + } + }, + "cloudEventAttributes": { + "$id": "9043", + "kind": "string", + "type": { + "$ref": "306" + }, + "value": "PassThrough" + } + } + } + } + }, + "extendedLocation": { + "$id": "9044", + "kind": "model", + "type": { + "$ref": "510" + }, + "value": { + "$id": "9045", + "name": { + "$id": "9046", + "kind": "string", + "type": { + "$ref": "512" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "9047", + "kind": "string", + "type": { + "$ref": "44" + }, + "value": "CustomLocation" + } + } + } + } + } + } + ], + "responses": [ + { + "$id": "9048", + "response": { + "$ref": "7942" + }, + "statusCode": 200, + "bodyValue": { + "$id": "9049", + "kind": "model", + "type": { + "$ref": "1381" + }, + "value": { + "$id": "9050", + "properties": { + "$id": "9051", + "kind": "model", + "type": { + "$ref": "1383" + }, + "value": { + "$id": "9052", + "endpointType": { + "$id": "9053", + "kind": "string", + "type": { + "$ref": "218" + }, + "value": "DataExplorer" + }, + "dataExplorerSettings": { + "$id": "9054", + "kind": "model", + "type": { + "$ref": "1388" + }, + "value": { + "$id": "9055", + "authentication": { + "$id": "9056", + "kind": "model", + "type": { + "$ref": "1390" + }, + "value": { + "$id": "9057", + "method": { + "$id": "9058", + "kind": "string", + "type": { + "$ref": "232" + }, + "value": "SystemAssignedManagedIdentity" + }, + "systemAssignedManagedIdentitySettings": { + "$id": "9059", + "kind": "model", + "type": { + "$ref": "1395" + }, + "value": { + "$id": "9060", + "audience": { + "$id": "9061", + "kind": "string", + "type": { + "$ref": "1397" + }, + "value": "psxomrfbhoflycm" + } + } + }, + "userAssignedManagedIdentitySettings": { + "$id": "9062", + "kind": "model", + "type": { + "$ref": "1403" + }, + "value": { + "$id": "9063", + "clientId": { + "$id": "9064", + "kind": "string", + "type": { + "$ref": "1405" + }, + "value": "fb90f267-8872-431a-a76a-a1cec5d3c4d2" + }, + "scope": { + "$id": "9065", + "kind": "string", + "type": { + "$ref": "1409" + }, + "value": "zop" + }, + "tenantId": { + "$id": "9066", + "kind": "string", + "type": { + "$ref": "1413" + }, + "value": "ed060aa2-71ff-4d3f-99c4-a9138356fdec" + } + } + } + } + }, + "database": { + "$id": "9067", + "kind": "string", + "type": { + "$ref": "1421" + }, + "value": "yqcdpjsifm" + }, + "host": { + "$id": "9068", + "kind": "string", + "type": { + "$ref": "1425" + }, + "value": "..kusto.windows.net" + }, + "batching": { + "$id": "9069", + "kind": "model", + "type": { + "$ref": "1429" + }, + "value": { + "$id": "9070", + "latencySeconds": { + "$id": "9071", + "kind": "number", + "type": { + "$ref": "1431" + }, + "value": 1228 + }, + "maxMessages": { + "$id": "9072", + "kind": "number", + "type": { + "$ref": "1435" + }, + "value": 171 + } + } + } + } + }, + "dataLakeStorageSettings": { + "$id": "9073", + "kind": "model", + "type": { + "$ref": "1443" + }, + "value": { + "$id": "9074", + "authentication": { + "$id": "9075", + "kind": "model", + "type": { + "$ref": "1445" + }, + "value": { + "$id": "9076", + "method": { + "$id": "9077", + "kind": "string", + "type": { + "$ref": "238" + }, + "value": "SystemAssignedManagedIdentity" + }, + "accessTokenSettings": { + "$id": "9078", + "kind": "model", + "type": { + "$ref": "1450" + }, + "value": { + "$id": "9079", + "secretRef": { + "$id": "9080", + "kind": "string", + "type": { + "$ref": "1452" + }, + "value": "sevriyphcvnlrnfudqzejecwa" + } + } + }, + "systemAssignedManagedIdentitySettings": { + "$id": "9081", + "kind": "model", + "type": { + "$ref": "1395" + }, + "value": { + "$id": "9082", + "audience": { + "$id": "9083", + "kind": "string", + "type": { + "$ref": "1397" + }, + "value": "psxomrfbhoflycm" + } + } + }, + "userAssignedManagedIdentitySettings": { + "$id": "9084", + "kind": "model", + "type": { + "$ref": "1403" + }, + "value": { + "$id": "9085", + "clientId": { + "$id": "9086", + "kind": "string", + "type": { + "$ref": "1405" + }, + "value": "fb90f267-8872-431a-a76a-a1cec5d3c4d2" + }, + "scope": { + "$id": "9087", + "kind": "string", + "type": { + "$ref": "1409" + }, + "value": "zop" + }, + "tenantId": { + "$id": "9088", + "kind": "string", + "type": { + "$ref": "1413" + }, + "value": "ed060aa2-71ff-4d3f-99c4-a9138356fdec" + } + } + } + } + }, + "host": { + "$id": "9089", + "kind": "string", + "type": { + "$ref": "1466" + }, + "value": ".blob.core.windows.net" + }, + "batching": { + "$id": "9090", + "kind": "model", + "type": { + "$ref": "1429" + }, + "value": { + "$id": "9091", + "latencySeconds": { + "$id": "9092", + "kind": "number", + "type": { + "$ref": "1431" + }, + "value": 1228 + }, + "maxMessages": { + "$id": "9093", + "kind": "number", + "type": { + "$ref": "1435" + }, + "value": 171 + } + } + } + } + }, + "fabricOneLakeSettings": { + "$id": "9094", + "kind": "model", + "type": { + "$ref": "1475" + }, + "value": { + "$id": "9095", + "authentication": { + "$id": "9096", + "kind": "model", + "type": { + "$ref": "1477" + }, + "value": { + "$id": "9097", + "method": { + "$id": "9098", + "kind": "string", + "type": { + "$ref": "246" + }, + "value": "SystemAssignedManagedIdentity" + }, + "systemAssignedManagedIdentitySettings": { + "$id": "9099", + "kind": "model", + "type": { + "$ref": "1395" + }, + "value": { + "$id": "9100", + "audience": { + "$id": "9101", + "kind": "string", + "type": { + "$ref": "1397" + }, + "value": "psxomrfbhoflycm" + } + } + }, + "userAssignedManagedIdentitySettings": { + "$id": "9102", + "kind": "model", + "type": { + "$ref": "1403" + }, + "value": { + "$id": "9103", + "clientId": { + "$id": "9104", + "kind": "string", + "type": { + "$ref": "1405" + }, + "value": "fb90f267-8872-431a-a76a-a1cec5d3c4d2" + }, + "scope": { + "$id": "9105", + "kind": "string", + "type": { + "$ref": "1409" + }, + "value": "zop" + }, + "tenantId": { + "$id": "9106", + "kind": "string", + "type": { + "$ref": "1413" + }, + "value": "ed060aa2-71ff-4d3f-99c4-a9138356fdec" + } + } + } + } + }, + "names": { + "$id": "9107", + "kind": "model", + "type": { + "$ref": "1490" + }, + "value": { + "$id": "9108", + "lakehouseName": { + "$id": "9109", + "kind": "string", + "type": { + "$ref": "1492" + }, + "value": "wpeathi" + }, + "workspaceName": { + "$id": "9110", + "kind": "string", + "type": { + "$ref": "1496" + }, + "value": "nwgmitkbljztgms" + } + } + }, + "oneLakePathType": { + "$id": "9111", + "kind": "string", + "type": { + "$ref": "252" + }, + "value": "Files" + }, + "host": { + "$id": "9112", + "kind": "string", + "type": { + "$ref": "1505" + }, + "value": "https://.fabric.microsoft.com" + }, + "batching": { + "$id": "9113", + "kind": "model", + "type": { + "$ref": "1429" + }, + "value": { + "$id": "9114", + "latencySeconds": { + "$id": "9115", + "kind": "number", + "type": { + "$ref": "1431" + }, + "value": 1228 + }, + "maxMessages": { + "$id": "9116", + "kind": "number", + "type": { + "$ref": "1435" + }, + "value": 171 + } + } + } + } + }, + "kafkaSettings": { + "$id": "9117", + "kind": "model", + "type": { + "$ref": "1514" + }, + "value": { + "$id": "9118", + "authentication": { + "$id": "9119", + "kind": "model", + "type": { + "$ref": "1516" + }, + "value": { + "$id": "9120", + "method": { + "$id": "9121", + "kind": "string", + "type": { + "$ref": "258" + }, + "value": "SystemAssignedManagedIdentity" + }, + "systemAssignedManagedIdentitySettings": { + "$id": "9122", + "kind": "model", + "type": { + "$ref": "1395" + }, + "value": { + "$id": "9123", + "audience": { + "$id": "9124", + "kind": "string", + "type": { + "$ref": "1397" + }, + "value": "psxomrfbhoflycm" + } + } + }, + "userAssignedManagedIdentitySettings": { + "$id": "9125", + "kind": "model", + "type": { + "$ref": "1403" + }, + "value": { + "$id": "9126", + "clientId": { + "$id": "9127", + "kind": "string", + "type": { + "$ref": "1405" + }, + "value": "fb90f267-8872-431a-a76a-a1cec5d3c4d2" + }, + "scope": { + "$id": "9128", + "kind": "string", + "type": { + "$ref": "1409" + }, + "value": "zop" + }, + "tenantId": { + "$id": "9129", + "kind": "string", + "type": { + "$ref": "1413" + }, + "value": "ed060aa2-71ff-4d3f-99c4-a9138356fdec" + } + } + }, + "saslSettings": { + "$id": "9130", + "kind": "model", + "type": { + "$ref": "1527" + }, + "value": { + "$id": "9131", + "saslType": { + "$id": "9132", + "kind": "string", + "type": { + "$ref": "270" + }, + "value": "Plain" + }, + "secretRef": { + "$id": "9133", + "kind": "string", + "type": { + "$ref": "1532" + }, + "value": "visyxoztqnylvbyokhtmpdkwes" + } + } + }, + "x509CertificateSettings": { + "$id": "9134", + "kind": "model", + "type": { + "$ref": "1538" + }, + "value": { + "$id": "9135", + "secretRef": { + "$id": "9136", + "kind": "string", + "type": { + "$ref": "1540" + }, + "value": "afwizrystfslkfqd" + } + } + } + } + }, + "consumerGroupId": { + "$id": "9137", + "kind": "string", + "type": { + "$ref": "1548" + }, + "value": "ukkzcjiyenhxokat" + }, + "host": { + "$id": "9138", + "kind": "string", + "type": { + "$ref": "1552" + }, + "value": "pwcqfiqclcgneolpewnyavoulbip" + }, + "batching": { + "$id": "9139", + "kind": "model", + "type": { + "$ref": "1556" + }, + "value": { + "$id": "9140", + "mode": { + "$id": "9141", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Enabled" + }, + "latencyMs": { + "$id": "9142", + "kind": "number", + "type": { + "$ref": "1561" + }, + "value": 3679 + }, + "maxBytes": { + "$id": "9143", + "kind": "number", + "type": { + "$ref": "1565" + }, + "value": 8887 + }, + "maxMessages": { + "$id": "9144", + "kind": "number", + "type": { + "$ref": "1569" + }, + "value": 2174 + } + } + }, + "copyMqttProperties": { + "$id": "9145", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Enabled" + }, + "compression": { + "$id": "9146", + "kind": "string", + "type": { + "$ref": "278" + }, + "value": "None" + }, + "kafkaAcks": { + "$id": "9147", + "kind": "string", + "type": { + "$ref": "288" + }, + "value": "Zero" + }, + "partitionStrategy": { + "$id": "9148", + "kind": "string", + "type": { + "$ref": "296" + }, + "value": "Default" + }, + "tls": { + "$id": "9149", + "kind": "model", + "type": { + "$ref": "1587" + }, + "value": { + "$id": "9150", + "mode": { + "$id": "9151", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Enabled" + }, + "trustedCaCertificateConfigMapRef": { + "$id": "9152", + "kind": "string", + "type": { + "$ref": "1592" + }, + "value": "tectjjvukvelsreihwadh" + } + } + }, + "cloudEventAttributes": { + "$id": "9153", + "kind": "string", + "type": { + "$ref": "306" + }, + "value": "PassThrough" + } + } + }, + "localStorageSettings": { + "$id": "9154", + "kind": "model", + "type": { + "$ref": "1603" + }, + "value": { + "$id": "9155", + "persistentVolumeClaimRef": { + "$id": "9156", + "kind": "string", + "type": { + "$ref": "1605" + }, + "value": "jjwqwvd" + } + } + }, + "mqttSettings": { + "$id": "9157", + "kind": "model", + "type": { + "$ref": "1611" + }, + "value": { + "$id": "9158", + "authentication": { + "$id": "9159", + "kind": "model", + "type": { + "$ref": "1613" + }, + "value": { + "$id": "9160", + "method": { + "$id": "9161", + "kind": "string", + "type": { + "$ref": "312" + }, + "value": "SystemAssignedManagedIdentity" + }, + "systemAssignedManagedIdentitySettings": { + "$id": "9162", + "kind": "model", + "type": { + "$ref": "1395" + }, + "value": { + "$id": "9163", + "audience": { + "$id": "9164", + "kind": "string", + "type": { + "$ref": "1397" + }, + "value": "psxomrfbhoflycm" + } + } + }, + "userAssignedManagedIdentitySettings": { + "$id": "9165", + "kind": "model", + "type": { + "$ref": "1403" + }, + "value": { + "$id": "9166", + "clientId": { + "$id": "9167", + "kind": "string", + "type": { + "$ref": "1405" + }, + "value": "fb90f267-8872-431a-a76a-a1cec5d3c4d2" + }, + "scope": { + "$id": "9168", + "kind": "string", + "type": { + "$ref": "1409" + }, + "value": "zop" + }, + "tenantId": { + "$id": "9169", + "kind": "string", + "type": { + "$ref": "1413" + }, + "value": "ed060aa2-71ff-4d3f-99c4-a9138356fdec" + } + } + }, + "serviceAccountTokenSettings": { + "$id": "9170", + "kind": "model", + "type": { + "$ref": "1624" + }, + "value": { + "$id": "9171", + "audience": { + "$id": "9172", + "kind": "string", + "type": { + "$ref": "1626" + }, + "value": "ejbklrbxgjaqleoycgpje" + } + } + }, + "x509CertificateSettings": { + "$id": "9173", + "kind": "model", + "type": { + "$ref": "1538" + }, + "value": { + "$id": "9174", + "secretRef": { + "$id": "9175", + "kind": "string", + "type": { + "$ref": "1540" + }, + "value": "afwizrystfslkfqd" + } + } + } + } + }, + "clientIdPrefix": { + "$id": "9176", + "kind": "string", + "type": { + "$ref": "1637" + }, + "value": "kkljsdxdirfhwxtkavldekeqhv" + }, + "host": { + "$id": "9177", + "kind": "string", + "type": { + "$ref": "1641" + }, + "value": "nyhnxqnbspstctl" + }, + "protocol": { + "$id": "9178", + "kind": "string", + "type": { + "$ref": "124" + }, + "value": "Mqtt" + }, + "keepAliveSeconds": { + "$id": "9179", + "kind": "number", + "type": { + "$ref": "1648" + }, + "value": 0 + }, + "retain": { + "$id": "9180", + "kind": "string", + "type": { + "$ref": "324" + }, + "value": "Keep" + }, + "maxInflightMessages": { + "$id": "9181", + "kind": "number", + "type": { + "$ref": "1655" + }, + "value": 0 + }, + "qos": { + "$id": "9182", + "kind": "number", + "type": { + "$ref": "1659" + }, + "value": 1 + }, + "sessionExpirySeconds": { + "$id": "9183", + "kind": "number", + "type": { + "$ref": "1663" + }, + "value": 0 + }, + "tls": { + "$id": "9184", + "kind": "model", + "type": { + "$ref": "1587" + }, + "value": { + "$id": "9185", + "mode": { + "$id": "9186", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Enabled" + }, + "trustedCaCertificateConfigMapRef": { + "$id": "9187", + "kind": "string", + "type": { + "$ref": "1592" + }, + "value": "tectjjvukvelsreihwadh" + } + } + }, + "cloudEventAttributes": { + "$id": "9188", + "kind": "string", + "type": { + "$ref": "306" + }, + "value": "PassThrough" + } + } + }, + "provisioningState": { + "$id": "9189", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Succeeded" + } + } + }, + "extendedLocation": { + "$id": "9190", + "kind": "model", + "type": { + "$ref": "510" + }, + "value": { + "$id": "9191", + "name": { + "$id": "9192", + "kind": "string", + "type": { + "$ref": "512" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "9193", + "kind": "string", + "type": { + "$ref": "44" + }, + "value": "CustomLocation" + } + } + }, + "id": { + "$id": "9194", + "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": "9195", + "kind": "string", + "type": { + "$ref": "424" + }, + "value": "zyhxscudobzfacetvgyjiav" + }, + "type": { + "$id": "9196", + "kind": "string", + "type": { + "$ref": "428" + }, + "value": "iay" + }, + "systemData": { + "$id": "9197", + "kind": "model", + "type": { + "$ref": "433" + }, + "value": { + "$id": "9198", + "createdBy": { + "$id": "9199", + "kind": "string", + "type": { + "$ref": "435" + }, + "value": "ssvaslsmudloholronopqyxjcu" + }, + "createdByType": { + "$id": "9200", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "createdAt": { + "$id": "9201", + "kind": "string", + "type": { + "$ref": "442" + }, + "value": "2024-08-09T18:13:29.389Z" + }, + "lastModifiedBy": { + "$id": "9202", + "kind": "string", + "type": { + "$ref": "447" + }, + "value": "gnicpuszwd" + }, + "lastModifiedByType": { + "$id": "9203", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "9204", + "kind": "string", + "type": { + "$ref": "454" + }, + "value": "2024-08-09T18:13:29.389Z" + } + } + } + } + } + }, + { + "$id": "9205", + "response": { + "$ref": "7943" + }, + "statusCode": 201, + "bodyValue": { + "$id": "9206", + "kind": "model", + "type": { + "$ref": "1381" + }, + "value": { + "$id": "9207", + "properties": { + "$id": "9208", + "kind": "model", + "type": { + "$ref": "1383" + }, + "value": { + "$id": "9209", + "endpointType": { + "$id": "9210", + "kind": "string", + "type": { + "$ref": "218" + }, + "value": "DataExplorer" + }, + "dataExplorerSettings": { + "$id": "9211", + "kind": "model", + "type": { + "$ref": "1388" + }, + "value": { + "$id": "9212", + "authentication": { + "$id": "9213", + "kind": "model", + "type": { + "$ref": "1390" + }, + "value": { + "$id": "9214", + "method": { + "$id": "9215", + "kind": "string", + "type": { + "$ref": "232" + }, + "value": "SystemAssignedManagedIdentity" + }, + "systemAssignedManagedIdentitySettings": { + "$id": "9216", + "kind": "model", + "type": { + "$ref": "1395" + }, + "value": { + "$id": "9217", + "audience": { + "$id": "9218", + "kind": "string", + "type": { + "$ref": "1397" + }, + "value": "psxomrfbhoflycm" + } + } + }, + "userAssignedManagedIdentitySettings": { + "$id": "9219", + "kind": "model", + "type": { + "$ref": "1403" + }, + "value": { + "$id": "9220", + "clientId": { + "$id": "9221", + "kind": "string", + "type": { + "$ref": "1405" + }, + "value": "fb90f267-8872-431a-a76a-a1cec5d3c4d2" + }, + "scope": { + "$id": "9222", + "kind": "string", + "type": { + "$ref": "1409" + }, + "value": "zop" + }, + "tenantId": { + "$id": "9223", + "kind": "string", + "type": { + "$ref": "1413" + }, + "value": "ed060aa2-71ff-4d3f-99c4-a9138356fdec" + } + } + } + } + }, + "database": { + "$id": "9224", + "kind": "string", + "type": { + "$ref": "1421" + }, + "value": "yqcdpjsifm" + }, + "host": { + "$id": "9225", + "kind": "string", + "type": { + "$ref": "1425" + }, + "value": "..kusto.windows.net" + }, + "batching": { + "$id": "9226", + "kind": "model", + "type": { + "$ref": "1429" + }, + "value": { + "$id": "9227", + "latencySeconds": { + "$id": "9228", + "kind": "number", + "type": { + "$ref": "1431" + }, + "value": 1228 + }, + "maxMessages": { + "$id": "9229", + "kind": "number", + "type": { + "$ref": "1435" + }, + "value": 171 + } + } + } + } + }, + "dataLakeStorageSettings": { + "$id": "9230", + "kind": "model", + "type": { + "$ref": "1443" + }, + "value": { + "$id": "9231", + "authentication": { + "$id": "9232", + "kind": "model", + "type": { + "$ref": "1445" + }, + "value": { + "$id": "9233", + "method": { + "$id": "9234", + "kind": "string", + "type": { + "$ref": "238" + }, + "value": "SystemAssignedManagedIdentity" + }, + "accessTokenSettings": { + "$id": "9235", + "kind": "model", + "type": { + "$ref": "1450" + }, + "value": { + "$id": "9236", + "secretRef": { + "$id": "9237", + "kind": "string", + "type": { + "$ref": "1452" + }, + "value": "sevriyphcvnlrnfudqzejecwa" + } + } + }, + "systemAssignedManagedIdentitySettings": { + "$id": "9238", + "kind": "model", + "type": { + "$ref": "1395" + }, + "value": { + "$id": "9239", + "audience": { + "$id": "9240", + "kind": "string", + "type": { + "$ref": "1397" + }, + "value": "psxomrfbhoflycm" + } + } + }, + "userAssignedManagedIdentitySettings": { + "$id": "9241", + "kind": "model", + "type": { + "$ref": "1403" + }, + "value": { + "$id": "9242", + "clientId": { + "$id": "9243", + "kind": "string", + "type": { + "$ref": "1405" + }, + "value": "fb90f267-8872-431a-a76a-a1cec5d3c4d2" + }, + "scope": { + "$id": "9244", + "kind": "string", + "type": { + "$ref": "1409" + }, + "value": "zop" + }, + "tenantId": { + "$id": "9245", + "kind": "string", + "type": { + "$ref": "1413" + }, + "value": "ed060aa2-71ff-4d3f-99c4-a9138356fdec" + } + } + } + } + }, + "host": { + "$id": "9246", + "kind": "string", + "type": { + "$ref": "1466" + }, + "value": ".blob.core.windows.net" + }, + "batching": { + "$id": "9247", + "kind": "model", + "type": { + "$ref": "1429" + }, + "value": { + "$id": "9248", + "latencySeconds": { + "$id": "9249", + "kind": "number", + "type": { + "$ref": "1431" + }, + "value": 1228 + }, + "maxMessages": { + "$id": "9250", + "kind": "number", + "type": { + "$ref": "1435" + }, + "value": 171 + } + } + } + } + }, + "fabricOneLakeSettings": { + "$id": "9251", + "kind": "model", + "type": { + "$ref": "1475" + }, + "value": { + "$id": "9252", + "authentication": { + "$id": "9253", + "kind": "model", + "type": { + "$ref": "1477" + }, + "value": { + "$id": "9254", + "method": { + "$id": "9255", + "kind": "string", + "type": { + "$ref": "246" + }, + "value": "SystemAssignedManagedIdentity" + }, + "systemAssignedManagedIdentitySettings": { + "$id": "9256", + "kind": "model", + "type": { + "$ref": "1395" + }, + "value": { + "$id": "9257", + "audience": { + "$id": "9258", + "kind": "string", + "type": { + "$ref": "1397" + }, + "value": "psxomrfbhoflycm" + } + } + }, + "userAssignedManagedIdentitySettings": { + "$id": "9259", + "kind": "model", + "type": { + "$ref": "1403" + }, + "value": { + "$id": "9260", + "clientId": { + "$id": "9261", + "kind": "string", + "type": { + "$ref": "1405" + }, + "value": "fb90f267-8872-431a-a76a-a1cec5d3c4d2" + }, + "scope": { + "$id": "9262", + "kind": "string", + "type": { + "$ref": "1409" + }, + "value": "zop" + }, + "tenantId": { + "$id": "9263", + "kind": "string", + "type": { + "$ref": "1413" + }, + "value": "ed060aa2-71ff-4d3f-99c4-a9138356fdec" + } + } + } + } + }, + "names": { + "$id": "9264", + "kind": "model", + "type": { + "$ref": "1490" + }, + "value": { + "$id": "9265", + "lakehouseName": { + "$id": "9266", + "kind": "string", + "type": { + "$ref": "1492" + }, + "value": "wpeathi" + }, + "workspaceName": { + "$id": "9267", + "kind": "string", + "type": { + "$ref": "1496" + }, + "value": "nwgmitkbljztgms" + } + } + }, + "oneLakePathType": { + "$id": "9268", + "kind": "string", + "type": { + "$ref": "252" + }, + "value": "Files" + }, + "host": { + "$id": "9269", + "kind": "string", + "type": { + "$ref": "1505" + }, + "value": "https://.fabric.microsoft.com" + }, + "batching": { + "$id": "9270", + "kind": "model", + "type": { + "$ref": "1429" + }, + "value": { + "$id": "9271", + "latencySeconds": { + "$id": "9272", + "kind": "number", + "type": { + "$ref": "1431" + }, + "value": 1228 + }, + "maxMessages": { + "$id": "9273", + "kind": "number", + "type": { + "$ref": "1435" + }, + "value": 171 + } + } + } + } + }, + "kafkaSettings": { + "$id": "9274", + "kind": "model", + "type": { + "$ref": "1514" + }, + "value": { + "$id": "9275", + "authentication": { + "$id": "9276", + "kind": "model", + "type": { + "$ref": "1516" + }, + "value": { + "$id": "9277", + "method": { + "$id": "9278", + "kind": "string", + "type": { + "$ref": "258" + }, + "value": "SystemAssignedManagedIdentity" + }, + "systemAssignedManagedIdentitySettings": { + "$id": "9279", + "kind": "model", + "type": { + "$ref": "1395" + }, + "value": { + "$id": "9280", + "audience": { + "$id": "9281", + "kind": "string", + "type": { + "$ref": "1397" + }, + "value": "psxomrfbhoflycm" + } + } + }, + "userAssignedManagedIdentitySettings": { + "$id": "9282", + "kind": "model", + "type": { + "$ref": "1403" + }, + "value": { + "$id": "9283", + "clientId": { + "$id": "9284", + "kind": "string", + "type": { + "$ref": "1405" + }, + "value": "fb90f267-8872-431a-a76a-a1cec5d3c4d2" + }, + "scope": { + "$id": "9285", + "kind": "string", + "type": { + "$ref": "1409" + }, + "value": "zop" + }, + "tenantId": { + "$id": "9286", + "kind": "string", + "type": { + "$ref": "1413" + }, + "value": "ed060aa2-71ff-4d3f-99c4-a9138356fdec" + } + } + }, + "saslSettings": { + "$id": "9287", + "kind": "model", + "type": { + "$ref": "1527" + }, + "value": { + "$id": "9288", + "saslType": { + "$id": "9289", + "kind": "string", + "type": { + "$ref": "270" + }, + "value": "Plain" + }, + "secretRef": { + "$id": "9290", + "kind": "string", + "type": { + "$ref": "1532" + }, + "value": "visyxoztqnylvbyokhtmpdkwes" + } + } + }, + "x509CertificateSettings": { + "$id": "9291", + "kind": "model", + "type": { + "$ref": "1538" + }, + "value": { + "$id": "9292", + "secretRef": { + "$id": "9293", + "kind": "string", + "type": { + "$ref": "1540" + }, + "value": "afwizrystfslkfqd" + } + } + } + } + }, + "consumerGroupId": { + "$id": "9294", + "kind": "string", + "type": { + "$ref": "1548" + }, + "value": "ukkzcjiyenhxokat" + }, + "host": { + "$id": "9295", + "kind": "string", + "type": { + "$ref": "1552" + }, + "value": "pwcqfiqclcgneolpewnyavoulbip" + }, + "batching": { + "$id": "9296", + "kind": "model", + "type": { + "$ref": "1556" + }, + "value": { + "$id": "9297", + "mode": { + "$id": "9298", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Enabled" + }, + "latencyMs": { + "$id": "9299", + "kind": "number", + "type": { + "$ref": "1561" + }, + "value": 3679 + }, + "maxBytes": { + "$id": "9300", + "kind": "number", + "type": { + "$ref": "1565" + }, + "value": 8887 + }, + "maxMessages": { + "$id": "9301", + "kind": "number", + "type": { + "$ref": "1569" + }, + "value": 2174 + } + } + }, + "copyMqttProperties": { + "$id": "9302", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Enabled" + }, + "compression": { + "$id": "9303", + "kind": "string", + "type": { + "$ref": "278" + }, + "value": "None" + }, + "kafkaAcks": { + "$id": "9304", + "kind": "string", + "type": { + "$ref": "288" + }, + "value": "Zero" + }, + "partitionStrategy": { + "$id": "9305", + "kind": "string", + "type": { + "$ref": "296" + }, + "value": "Default" + }, + "tls": { + "$id": "9306", + "kind": "model", + "type": { + "$ref": "1587" + }, + "value": { + "$id": "9307", + "mode": { + "$id": "9308", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Enabled" + }, + "trustedCaCertificateConfigMapRef": { + "$id": "9309", + "kind": "string", + "type": { + "$ref": "1592" + }, + "value": "tectjjvukvelsreihwadh" + } + } + }, + "cloudEventAttributes": { + "$id": "9310", + "kind": "string", + "type": { + "$ref": "306" + }, + "value": "PassThrough" + } + } + }, + "localStorageSettings": { + "$id": "9311", + "kind": "model", + "type": { + "$ref": "1603" + }, + "value": { + "$id": "9312", + "persistentVolumeClaimRef": { + "$id": "9313", + "kind": "string", + "type": { + "$ref": "1605" + }, + "value": "jjwqwvd" + } + } + }, + "mqttSettings": { + "$id": "9314", + "kind": "model", + "type": { + "$ref": "1611" + }, + "value": { + "$id": "9315", + "authentication": { + "$id": "9316", + "kind": "model", + "type": { + "$ref": "1613" + }, + "value": { + "$id": "9317", + "method": { + "$id": "9318", + "kind": "string", + "type": { + "$ref": "312" + }, + "value": "SystemAssignedManagedIdentity" + }, + "systemAssignedManagedIdentitySettings": { + "$id": "9319", + "kind": "model", + "type": { + "$ref": "1395" + }, + "value": { + "$id": "9320", + "audience": { + "$id": "9321", + "kind": "string", + "type": { + "$ref": "1397" + }, + "value": "psxomrfbhoflycm" + } + } + }, + "userAssignedManagedIdentitySettings": { + "$id": "9322", + "kind": "model", + "type": { + "$ref": "1403" + }, + "value": { + "$id": "9323", + "clientId": { + "$id": "9324", + "kind": "string", + "type": { + "$ref": "1405" + }, + "value": "fb90f267-8872-431a-a76a-a1cec5d3c4d2" + }, + "scope": { + "$id": "9325", + "kind": "string", + "type": { + "$ref": "1409" + }, + "value": "zop" + }, + "tenantId": { + "$id": "9326", + "kind": "string", + "type": { + "$ref": "1413" + }, + "value": "ed060aa2-71ff-4d3f-99c4-a9138356fdec" + } + } + }, + "serviceAccountTokenSettings": { + "$id": "9327", + "kind": "model", + "type": { + "$ref": "1624" + }, + "value": { + "$id": "9328", + "audience": { + "$id": "9329", + "kind": "string", + "type": { + "$ref": "1626" + }, + "value": "ejbklrbxgjaqleoycgpje" + } + } + }, + "x509CertificateSettings": { + "$id": "9330", + "kind": "model", + "type": { + "$ref": "1538" + }, + "value": { + "$id": "9331", + "secretRef": { + "$id": "9332", + "kind": "string", + "type": { + "$ref": "1540" + }, + "value": "afwizrystfslkfqd" + } + } + } + } + }, + "clientIdPrefix": { + "$id": "9333", + "kind": "string", + "type": { + "$ref": "1637" + }, + "value": "kkljsdxdirfhwxtkavldekeqhv" + }, + "host": { + "$id": "9334", + "kind": "string", + "type": { + "$ref": "1641" + }, + "value": "nyhnxqnbspstctl" + }, + "protocol": { + "$id": "9335", + "kind": "string", + "type": { + "$ref": "124" + }, + "value": "Mqtt" + }, + "keepAliveSeconds": { + "$id": "9336", + "kind": "number", + "type": { + "$ref": "1648" + }, + "value": 0 + }, + "retain": { + "$id": "9337", + "kind": "string", + "type": { + "$ref": "324" + }, + "value": "Keep" + }, + "maxInflightMessages": { + "$id": "9338", + "kind": "number", + "type": { + "$ref": "1655" + }, + "value": 0 + }, + "qos": { + "$id": "9339", + "kind": "number", + "type": { + "$ref": "1659" + }, + "value": 1 + }, + "sessionExpirySeconds": { + "$id": "9340", + "kind": "number", + "type": { + "$ref": "1663" + }, + "value": 0 + }, + "tls": { + "$id": "9341", + "kind": "model", + "type": { + "$ref": "1587" + }, + "value": { + "$id": "9342", + "mode": { + "$id": "9343", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Enabled" + }, + "trustedCaCertificateConfigMapRef": { + "$id": "9344", + "kind": "string", + "type": { + "$ref": "1592" + }, + "value": "tectjjvukvelsreihwadh" + } + } + }, + "cloudEventAttributes": { + "$id": "9345", + "kind": "string", + "type": { + "$ref": "306" + }, + "value": "PassThrough" + } + } + }, + "provisioningState": { + "$id": "9346", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Succeeded" + } + } + }, + "extendedLocation": { + "$id": "9347", + "kind": "model", + "type": { + "$ref": "510" + }, + "value": { + "$id": "9348", + "name": { + "$id": "9349", + "kind": "string", + "type": { + "$ref": "512" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "9350", + "kind": "string", + "type": { + "$ref": "44" + }, + "value": "CustomLocation" + } + } + }, + "id": { + "$id": "9351", + "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": "9352", + "kind": "string", + "type": { + "$ref": "424" + }, + "value": "zyhxscudobzfacetvgyjiav" + }, + "type": { + "$id": "9353", + "kind": "string", + "type": { + "$ref": "428" + }, + "value": "iay" + }, + "systemData": { + "$id": "9354", + "kind": "model", + "type": { + "$ref": "433" + }, + "value": { + "$id": "9355", + "createdBy": { + "$id": "9356", + "kind": "string", + "type": { + "$ref": "435" + }, + "value": "ssvaslsmudloholronopqyxjcu" + }, + "createdByType": { + "$id": "9357", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "createdAt": { + "$id": "9358", + "kind": "string", + "type": { + "$ref": "442" + }, + "value": "2024-08-09T18:13:29.389Z" + }, + "lastModifiedBy": { + "$id": "9359", + "kind": "string", + "type": { + "$ref": "447" + }, + "value": "gnicpuszwd" + }, + "lastModifiedByType": { + "$id": "9360", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "9361", + "kind": "string", + "type": { + "$ref": "454" + }, + "value": "2024-08-09T18:13:29.389Z" + } + } + } + } + } + } + ] + } + ] + }, + { + "$id": "9362", + "name": "delete", + "resourceName": "DataflowEndpointResource", + "doc": "Delete a DataflowEndpointResource", + "accessibility": "public", + "parameters": [ + { + "$id": "9363", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "9364", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "9365", + "type": { + "$id": "9366", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-04-01" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "9367", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "9368", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "9369", + "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": "9370", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "9371", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "9372", + "name": "instanceName", + "nameInRequest": "instanceName", + "doc": "Name of instance.", + "type": { + "$id": "9373", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "9374", + "name": "dataflowEndpointName", + "nameInRequest": "dataflowEndpointName", + "doc": "Name of Instance dataflowEndpoint resource", + "type": { + "$id": "9375", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "9376", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "9377", + "kind": "constant", + "valueType": { + "$id": "9378", + "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": "9379", + "statusCodes": [ + 202 + ], + "headers": [ + { + "$id": "9380", + "name": "location", + "nameInResponse": "Location", + "doc": "The Location header contains the URL where the status of the long running operation can be checked.", + "type": { + "$id": "9381", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + { + "$id": "9382", + "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": "9383", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + } + } + ], + "isErrorResponse": false + }, + { + "$id": "9384", + "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": "9385", + "finalStateVia": 1, + "finalResponse": { + "$id": "9386", + "statusCodes": [ + 204 + ] + } + }, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpoint.delete", + "decorators": [], + "examples": [ + { + "$id": "9387", + "kind": "http", + "name": "DataflowEndpoint_Delete", + "description": "DataflowEndpoint_Delete", + "filePath": "2025-04-01/DataflowEndpoint_Delete_MaximumSet_Gen.json", + "parameters": [ + { + "$id": "9388", + "parameter": { + "$ref": "9363" + }, + "value": { + "$id": "9389", + "kind": "string", + "type": { + "$ref": "9364" + }, + "value": "2025-04-01" + } + }, + { + "$id": "9390", + "parameter": { + "$ref": "9367" + }, + "value": { + "$id": "9391", + "kind": "string", + "type": { + "$ref": "9368" + }, + "value": "F8C729F9-DF9C-4743-848F-96EE433D8E53" + } + }, + { + "$id": "9392", + "parameter": { + "$ref": "9370" + }, + "value": { + "$id": "9393", + "kind": "string", + "type": { + "$ref": "9371" + }, + "value": "rgiotoperations" + } + }, + { + "$id": "9394", + "parameter": { + "$ref": "9372" + }, + "value": { + "$id": "9395", + "kind": "string", + "type": { + "$ref": "9373" + }, + "value": "resource-name123" + } + }, + { + "$id": "9396", + "parameter": { + "$ref": "9374" + }, + "value": { + "$id": "9397", + "kind": "string", + "type": { + "$ref": "9375" + }, + "value": "resource-name123" + } + } + ], + "responses": [ + { + "$id": "9398", + "response": { + "$ref": "9379" + }, + "statusCode": 202 + }, + { + "$id": "9399", + "response": { + "$ref": "9384" + }, + "statusCode": 204 + } + ] + } + ] + }, + { + "$id": "9400", + "name": "listByResourceGroup", + "resourceName": "DataflowEndpointResource", + "doc": "List DataflowEndpointResource resources by InstanceResource", + "accessibility": "public", + "parameters": [ + { + "$id": "9401", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "9402", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "9403", + "type": { + "$id": "9404", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-04-01" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "9405", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "9406", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "9407", + "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": "9408", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "9409", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "9410", + "name": "instanceName", + "nameInRequest": "instanceName", + "doc": "Name of instance.", + "type": { + "$id": "9411", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "9412", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "9413", + "kind": "constant", + "valueType": { + "$id": "9414", + "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": "9415", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "1682" + }, + "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": "9416", + "itemPropertySegments": [ + "value" + ], + "nextLink": { + "$id": "9417", + "responseSegments": [ + "nextLink" + ], + "responseLocation": "Body" + } + }, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpoint.listByResourceGroup", + "decorators": [], + "examples": [ + { + "$id": "9418", + "kind": "http", + "name": "DataflowEndpoint_ListByResourceGroup", + "description": "DataflowEndpoint_ListByResourceGroup", + "filePath": "2025-04-01/DataflowEndpoint_ListByResourceGroup_MaximumSet_Gen.json", + "parameters": [ + { + "$id": "9419", + "parameter": { + "$ref": "9401" + }, + "value": { + "$id": "9420", + "kind": "string", + "type": { + "$ref": "9402" + }, + "value": "2025-04-01" + } + }, + { + "$id": "9421", + "parameter": { + "$ref": "9405" + }, + "value": { + "$id": "9422", + "kind": "string", + "type": { + "$ref": "9406" + }, + "value": "F8C729F9-DF9C-4743-848F-96EE433D8E53" + } + }, + { + "$id": "9423", + "parameter": { + "$ref": "9408" + }, + "value": { + "$id": "9424", + "kind": "string", + "type": { + "$ref": "9409" + }, + "value": "rgiotoperations" + } + }, + { + "$id": "9425", + "parameter": { + "$ref": "9410" + }, + "value": { + "$id": "9426", + "kind": "string", + "type": { + "$ref": "9411" + }, + "value": "resource-name123" + } + } + ], + "responses": [ + { + "$id": "9427", + "response": { + "$ref": "9415" + }, + "statusCode": 200, + "bodyValue": { + "$id": "9428", + "kind": "model", + "type": { + "$ref": "1682" + }, + "value": { + "$id": "9429", + "value": { + "$id": "9430", + "kind": "array", + "type": { + "$ref": "1684" + }, + "value": [ + { + "$id": "9431", + "kind": "model", + "type": { + "$ref": "1381" + }, + "value": { + "$id": "9432", + "properties": { + "$id": "9433", + "kind": "model", + "type": { + "$ref": "1383" + }, + "value": { + "$id": "9434", + "endpointType": { + "$id": "9435", + "kind": "string", + "type": { + "$ref": "218" + }, + "value": "DataExplorer" + }, + "dataExplorerSettings": { + "$id": "9436", + "kind": "model", + "type": { + "$ref": "1388" + }, + "value": { + "$id": "9437", + "authentication": { + "$id": "9438", + "kind": "model", + "type": { + "$ref": "1390" + }, + "value": { + "$id": "9439", + "method": { + "$id": "9440", + "kind": "string", + "type": { + "$ref": "232" + }, + "value": "SystemAssignedManagedIdentity" + }, + "systemAssignedManagedIdentitySettings": { + "$id": "9441", + "kind": "model", + "type": { + "$ref": "1395" + }, + "value": { + "$id": "9442", + "audience": { + "$id": "9443", + "kind": "string", + "type": { + "$ref": "1397" + }, + "value": "psxomrfbhoflycm" + } + } + }, + "userAssignedManagedIdentitySettings": { + "$id": "9444", + "kind": "model", + "type": { + "$ref": "1403" + }, + "value": { + "$id": "9445", + "clientId": { + "$id": "9446", + "kind": "string", + "type": { + "$ref": "1405" + }, + "value": "fb90f267-8872-431a-a76a-a1cec5d3c4d2" + }, + "scope": { + "$id": "9447", + "kind": "string", + "type": { + "$ref": "1409" + }, + "value": "zop" + }, + "tenantId": { + "$id": "9448", + "kind": "string", + "type": { + "$ref": "1413" + }, + "value": "ed060aa2-71ff-4d3f-99c4-a9138356fdec" + } + } + } + } + }, + "database": { + "$id": "9449", + "kind": "string", + "type": { + "$ref": "1421" + }, + "value": "yqcdpjsifm" + }, + "host": { + "$id": "9450", + "kind": "string", + "type": { + "$ref": "1425" + }, + "value": "..kusto.windows.net" + }, + "batching": { + "$id": "9451", + "kind": "model", + "type": { + "$ref": "1429" + }, + "value": { + "$id": "9452", + "latencySeconds": { + "$id": "9453", + "kind": "number", + "type": { + "$ref": "1431" + }, + "value": 1228 + }, + "maxMessages": { + "$id": "9454", + "kind": "number", + "type": { + "$ref": "1435" + }, + "value": 171 + } + } + } + } + }, + "dataLakeStorageSettings": { + "$id": "9455", + "kind": "model", + "type": { + "$ref": "1443" + }, + "value": { + "$id": "9456", + "authentication": { + "$id": "9457", + "kind": "model", + "type": { + "$ref": "1445" + }, + "value": { + "$id": "9458", + "method": { + "$id": "9459", + "kind": "string", + "type": { + "$ref": "238" + }, + "value": "SystemAssignedManagedIdentity" + }, + "accessTokenSettings": { + "$id": "9460", + "kind": "model", + "type": { + "$ref": "1450" + }, + "value": { + "$id": "9461", + "secretRef": { + "$id": "9462", + "kind": "string", + "type": { + "$ref": "1452" + }, + "value": "sevriyphcvnlrnfudqzejecwa" + } + } + }, + "systemAssignedManagedIdentitySettings": { + "$id": "9463", + "kind": "model", + "type": { + "$ref": "1395" + }, + "value": { + "$id": "9464", + "audience": { + "$id": "9465", + "kind": "string", + "type": { + "$ref": "1397" + }, + "value": "psxomrfbhoflycm" + } + } + }, + "userAssignedManagedIdentitySettings": { + "$id": "9466", + "kind": "model", + "type": { + "$ref": "1403" + }, + "value": { + "$id": "9467", + "clientId": { + "$id": "9468", + "kind": "string", + "type": { + "$ref": "1405" + }, + "value": "fb90f267-8872-431a-a76a-a1cec5d3c4d2" + }, + "scope": { + "$id": "9469", + "kind": "string", + "type": { + "$ref": "1409" + }, + "value": "zop" + }, + "tenantId": { + "$id": "9470", + "kind": "string", + "type": { + "$ref": "1413" + }, + "value": "ed060aa2-71ff-4d3f-99c4-a9138356fdec" + } + } + } + } + }, + "host": { + "$id": "9471", + "kind": "string", + "type": { + "$ref": "1466" + }, + "value": ".blob.core.windows.net" + }, + "batching": { + "$id": "9472", + "kind": "model", + "type": { + "$ref": "1429" + }, + "value": { + "$id": "9473", + "latencySeconds": { + "$id": "9474", + "kind": "number", + "type": { + "$ref": "1431" + }, + "value": 1228 + }, + "maxMessages": { + "$id": "9475", + "kind": "number", + "type": { + "$ref": "1435" + }, + "value": 171 + } + } + } + } + }, + "fabricOneLakeSettings": { + "$id": "9476", + "kind": "model", + "type": { + "$ref": "1475" + }, + "value": { + "$id": "9477", + "authentication": { + "$id": "9478", + "kind": "model", + "type": { + "$ref": "1477" + }, + "value": { + "$id": "9479", + "method": { + "$id": "9480", + "kind": "string", + "type": { + "$ref": "246" + }, + "value": "SystemAssignedManagedIdentity" + }, + "systemAssignedManagedIdentitySettings": { + "$id": "9481", + "kind": "model", + "type": { + "$ref": "1395" + }, + "value": { + "$id": "9482", + "audience": { + "$id": "9483", + "kind": "string", + "type": { + "$ref": "1397" + }, + "value": "psxomrfbhoflycm" + } + } + }, + "userAssignedManagedIdentitySettings": { + "$id": "9484", + "kind": "model", + "type": { + "$ref": "1403" + }, + "value": { + "$id": "9485", + "clientId": { + "$id": "9486", + "kind": "string", + "type": { + "$ref": "1405" + }, + "value": "fb90f267-8872-431a-a76a-a1cec5d3c4d2" + }, + "scope": { + "$id": "9487", + "kind": "string", + "type": { + "$ref": "1409" + }, + "value": "zop" + }, + "tenantId": { + "$id": "9488", + "kind": "string", + "type": { + "$ref": "1413" + }, + "value": "ed060aa2-71ff-4d3f-99c4-a9138356fdec" + } + } + } + } + }, + "names": { + "$id": "9489", + "kind": "model", + "type": { + "$ref": "1490" + }, + "value": { + "$id": "9490", + "lakehouseName": { + "$id": "9491", + "kind": "string", + "type": { + "$ref": "1492" + }, + "value": "wpeathi" + }, + "workspaceName": { + "$id": "9492", + "kind": "string", + "type": { + "$ref": "1496" + }, + "value": "nwgmitkbljztgms" + } + } + }, + "oneLakePathType": { + "$id": "9493", + "kind": "string", + "type": { + "$ref": "252" + }, + "value": "Files" + }, + "host": { + "$id": "9494", + "kind": "string", + "type": { + "$ref": "1505" + }, + "value": "https://.fabric.microsoft.com" + }, + "batching": { + "$id": "9495", + "kind": "model", + "type": { + "$ref": "1429" + }, + "value": { + "$id": "9496", + "latencySeconds": { + "$id": "9497", + "kind": "number", + "type": { + "$ref": "1431" + }, + "value": 1228 + }, + "maxMessages": { + "$id": "9498", + "kind": "number", + "type": { + "$ref": "1435" + }, + "value": 171 + } + } + } + } + }, + "kafkaSettings": { + "$id": "9499", + "kind": "model", + "type": { + "$ref": "1514" + }, + "value": { + "$id": "9500", + "authentication": { + "$id": "9501", + "kind": "model", + "type": { + "$ref": "1516" + }, + "value": { + "$id": "9502", + "method": { + "$id": "9503", + "kind": "string", + "type": { + "$ref": "258" + }, + "value": "SystemAssignedManagedIdentity" + }, + "systemAssignedManagedIdentitySettings": { + "$id": "9504", + "kind": "model", + "type": { + "$ref": "1395" + }, + "value": { + "$id": "9505", + "audience": { + "$id": "9506", + "kind": "string", + "type": { + "$ref": "1397" + }, + "value": "psxomrfbhoflycm" + } + } + }, + "userAssignedManagedIdentitySettings": { + "$id": "9507", + "kind": "model", + "type": { + "$ref": "1403" + }, + "value": { + "$id": "9508", + "clientId": { + "$id": "9509", + "kind": "string", + "type": { + "$ref": "1405" + }, + "value": "fb90f267-8872-431a-a76a-a1cec5d3c4d2" + }, + "scope": { + "$id": "9510", + "kind": "string", + "type": { + "$ref": "1409" + }, + "value": "zop" + }, + "tenantId": { + "$id": "9511", + "kind": "string", + "type": { + "$ref": "1413" + }, + "value": "ed060aa2-71ff-4d3f-99c4-a9138356fdec" + } + } + }, + "saslSettings": { + "$id": "9512", + "kind": "model", + "type": { + "$ref": "1527" + }, + "value": { + "$id": "9513", + "saslType": { + "$id": "9514", + "kind": "string", + "type": { + "$ref": "270" + }, + "value": "Plain" + }, + "secretRef": { + "$id": "9515", + "kind": "string", + "type": { + "$ref": "1532" + }, + "value": "visyxoztqnylvbyokhtmpdkwes" + } + } + }, + "x509CertificateSettings": { + "$id": "9516", + "kind": "model", + "type": { + "$ref": "1538" + }, + "value": { + "$id": "9517", + "secretRef": { + "$id": "9518", + "kind": "string", + "type": { + "$ref": "1540" + }, + "value": "afwizrystfslkfqd" + } + } + } + } + }, + "consumerGroupId": { + "$id": "9519", + "kind": "string", + "type": { + "$ref": "1548" + }, + "value": "ukkzcjiyenhxokat" + }, + "host": { + "$id": "9520", + "kind": "string", + "type": { + "$ref": "1552" + }, + "value": "pwcqfiqclcgneolpewnyavoulbip" + }, + "batching": { + "$id": "9521", + "kind": "model", + "type": { + "$ref": "1556" + }, + "value": { + "$id": "9522", + "mode": { + "$id": "9523", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Enabled" + }, + "latencyMs": { + "$id": "9524", + "kind": "number", + "type": { + "$ref": "1561" + }, + "value": 3679 + }, + "maxBytes": { + "$id": "9525", + "kind": "number", + "type": { + "$ref": "1565" + }, + "value": 8887 + }, + "maxMessages": { + "$id": "9526", + "kind": "number", + "type": { + "$ref": "1569" + }, + "value": 2174 + } + } + }, + "copyMqttProperties": { + "$id": "9527", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Enabled" + }, + "compression": { + "$id": "9528", + "kind": "string", + "type": { + "$ref": "278" + }, + "value": "None" + }, + "kafkaAcks": { + "$id": "9529", + "kind": "string", + "type": { + "$ref": "288" + }, + "value": "Zero" + }, + "partitionStrategy": { + "$id": "9530", + "kind": "string", + "type": { + "$ref": "296" + }, + "value": "Default" + }, + "tls": { + "$id": "9531", + "kind": "model", + "type": { + "$ref": "1587" + }, + "value": { + "$id": "9532", + "mode": { + "$id": "9533", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Enabled" + }, + "trustedCaCertificateConfigMapRef": { + "$id": "9534", + "kind": "string", + "type": { + "$ref": "1592" + }, + "value": "tectjjvukvelsreihwadh" + } + } + }, + "cloudEventAttributes": { + "$id": "9535", + "kind": "string", + "type": { + "$ref": "306" + }, + "value": "PassThrough" + } + } + }, + "localStorageSettings": { + "$id": "9536", + "kind": "model", + "type": { + "$ref": "1603" + }, + "value": { + "$id": "9537", + "persistentVolumeClaimRef": { + "$id": "9538", + "kind": "string", + "type": { + "$ref": "1605" + }, + "value": "jjwqwvd" + } + } + }, + "mqttSettings": { + "$id": "9539", + "kind": "model", + "type": { + "$ref": "1611" + }, + "value": { + "$id": "9540", + "authentication": { + "$id": "9541", + "kind": "model", + "type": { + "$ref": "1613" + }, + "value": { + "$id": "9542", + "method": { + "$id": "9543", + "kind": "string", + "type": { + "$ref": "312" + }, + "value": "SystemAssignedManagedIdentity" + }, + "systemAssignedManagedIdentitySettings": { + "$id": "9544", + "kind": "model", + "type": { + "$ref": "1395" + }, + "value": { + "$id": "9545", + "audience": { + "$id": "9546", + "kind": "string", + "type": { + "$ref": "1397" + }, + "value": "psxomrfbhoflycm" + } + } + }, + "userAssignedManagedIdentitySettings": { + "$id": "9547", + "kind": "model", + "type": { + "$ref": "1403" + }, + "value": { + "$id": "9548", + "clientId": { + "$id": "9549", + "kind": "string", + "type": { + "$ref": "1405" + }, + "value": "fb90f267-8872-431a-a76a-a1cec5d3c4d2" + }, + "scope": { + "$id": "9550", + "kind": "string", + "type": { + "$ref": "1409" + }, + "value": "zop" + }, + "tenantId": { + "$id": "9551", + "kind": "string", + "type": { + "$ref": "1413" + }, + "value": "ed060aa2-71ff-4d3f-99c4-a9138356fdec" + } + } + }, + "serviceAccountTokenSettings": { + "$id": "9552", + "kind": "model", + "type": { + "$ref": "1624" + }, + "value": { + "$id": "9553", + "audience": { + "$id": "9554", + "kind": "string", + "type": { + "$ref": "1626" + }, + "value": "ejbklrbxgjaqleoycgpje" + } + } + }, + "x509CertificateSettings": { + "$id": "9555", + "kind": "model", + "type": { + "$ref": "1538" + }, + "value": { + "$id": "9556", + "secretRef": { + "$id": "9557", + "kind": "string", + "type": { + "$ref": "1540" + }, + "value": "afwizrystfslkfqd" + } + } + } + } + }, + "clientIdPrefix": { + "$id": "9558", + "kind": "string", + "type": { + "$ref": "1637" + }, + "value": "kkljsdxdirfhwxtkavldekeqhv" + }, + "host": { + "$id": "9559", + "kind": "string", + "type": { + "$ref": "1641" + }, + "value": "nyhnxqnbspstctl" + }, + "protocol": { + "$id": "9560", + "kind": "string", + "type": { + "$ref": "124" + }, + "value": "Mqtt" + }, + "keepAliveSeconds": { + "$id": "9561", + "kind": "number", + "type": { + "$ref": "1648" + }, + "value": 0 + }, + "retain": { + "$id": "9562", + "kind": "string", + "type": { + "$ref": "324" + }, + "value": "Keep" + }, + "maxInflightMessages": { + "$id": "9563", + "kind": "number", + "type": { + "$ref": "1655" + }, + "value": 0 + }, + "qos": { + "$id": "9564", + "kind": "number", + "type": { + "$ref": "1659" + }, + "value": 1 + }, + "sessionExpirySeconds": { + "$id": "9565", + "kind": "number", + "type": { + "$ref": "1663" + }, + "value": 0 + }, + "tls": { + "$id": "9566", + "kind": "model", + "type": { + "$ref": "1587" + }, + "value": { + "$id": "9567", + "mode": { + "$id": "9568", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Enabled" + }, + "trustedCaCertificateConfigMapRef": { + "$id": "9569", + "kind": "string", + "type": { + "$ref": "1592" + }, + "value": "tectjjvukvelsreihwadh" + } + } + }, + "cloudEventAttributes": { + "$id": "9570", + "kind": "string", + "type": { + "$ref": "306" + }, + "value": "PassThrough" + } + } + }, + "provisioningState": { + "$id": "9571", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Succeeded" + } + } + }, + "extendedLocation": { + "$id": "9572", + "kind": "model", + "type": { + "$ref": "510" + }, + "value": { + "$id": "9573", + "name": { + "$id": "9574", + "kind": "string", + "type": { + "$ref": "512" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "9575", + "kind": "string", + "type": { + "$ref": "44" + }, + "value": "CustomLocation" + } + } + }, + "id": { + "$id": "9576", + "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": "9577", + "kind": "string", + "type": { + "$ref": "424" + }, + "value": "zyhxscudobzfacetvgyjiav" + }, + "type": { + "$id": "9578", + "kind": "string", + "type": { + "$ref": "428" + }, + "value": "iay" + }, + "systemData": { + "$id": "9579", + "kind": "model", + "type": { + "$ref": "433" + }, + "value": { + "$id": "9580", + "createdBy": { + "$id": "9581", + "kind": "string", + "type": { + "$ref": "435" + }, + "value": "ssvaslsmudloholronopqyxjcu" + }, + "createdByType": { + "$id": "9582", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "createdAt": { + "$id": "9583", + "kind": "string", + "type": { + "$ref": "442" + }, + "value": "2024-08-09T18:13:29.389Z" + }, + "lastModifiedBy": { + "$id": "9584", + "kind": "string", + "type": { + "$ref": "447" + }, + "value": "gnicpuszwd" + }, + "lastModifiedByType": { + "$id": "9585", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "9586", + "kind": "string", + "type": { + "$ref": "454" + }, + "value": "2024-08-09T18:13:29.389Z" + } + } + } + } + } + ] + }, + "nextLink": { + "$id": "9587", + "kind": "string", + "type": { + "$ref": "1688" + }, + "value": "https://microsoft.com/a" + } + } + } + } + ] + } + ] + } + ], + "parameters": [ + { + "$id": "9588", + "name": "endpoint", + "nameInRequest": "endpoint", + "doc": "Service host", + "type": { + "$id": "9589", + "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": "9590", + "type": { + "$id": "9591", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "https://management.azure.com" + } + } + ], + "decorators": [ + { + "$id": "9592", + "name": "Azure.ResourceManager.@armResourceOperations", + "arguments": { + "$id": "9593" + } + } + ], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpoint", + "apiVersions": [ + "2024-11-01", + "2025-04-01" + ], + "parent": { + "$ref": "1692" + } + } + ] + } + ], + "auth": { + "$id": "9594", + "oAuth2": { + "$id": "9595", + "scopes": [ + "user_impersonation" + ] + } + } +} diff --git a/sdk/mongocluster/Azure.ResourceManager.MongoCluster/api/Azure.ResourceManager.MongoCluster.net8.0.cs b/sdk/mongocluster/Azure.ResourceManager.MongoCluster/api/Azure.ResourceManager.MongoCluster.net8.0.cs index be41ef5b289c..61a91910b891 100644 --- a/sdk/mongocluster/Azure.ResourceManager.MongoCluster/api/Azure.ResourceManager.MongoCluster.net8.0.cs +++ b/sdk/mongocluster/Azure.ResourceManager.MongoCluster/api/Azure.ResourceManager.MongoCluster.net8.0.cs @@ -215,12 +215,30 @@ public static partial class ArmMongoClusterModelFactory public static Azure.ResourceManager.MongoCluster.MongoClusterPrivateEndpointConnectionResourceData MongoClusterPrivateEndpointConnectionResourceData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.MongoCluster.Models.MongoClusterPrivateEndpointConnectionProperties properties = null) { throw null; } public static Azure.ResourceManager.MongoCluster.Models.MongoClusterPrivateLinkResourceData MongoClusterPrivateLinkResourceData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.MongoCluster.Models.MongoClusterPrivateLinkResourceProperties properties = null) { throw null; } public static Azure.ResourceManager.MongoCluster.Models.MongoClusterPrivateLinkResourceProperties MongoClusterPrivateLinkResourceProperties(string groupId = null, System.Collections.Generic.IEnumerable requiredMembers = null, System.Collections.Generic.IEnumerable requiredZoneNames = null) { throw null; } - public static Azure.ResourceManager.MongoCluster.Models.MongoClusterProperties MongoClusterProperties(Azure.ResourceManager.MongoCluster.Models.MongoClusterCreateMode? createMode = default(Azure.ResourceManager.MongoCluster.Models.MongoClusterCreateMode?), Azure.ResourceManager.MongoCluster.Models.MongoClusterRestoreContent restoreParameters = null, Azure.ResourceManager.MongoCluster.Models.MongoClusterReplicaContent replicaParameters = null, Azure.ResourceManager.MongoCluster.Models.MongoClusterAdministratorProperties administrator = null, string serverVersion = null, string connectionString = null, Azure.ResourceManager.MongoCluster.Models.MongoClusterProvisioningState? provisioningState = default(Azure.ResourceManager.MongoCluster.Models.MongoClusterProvisioningState?), Azure.ResourceManager.MongoCluster.Models.MongoClusterStatus? clusterStatus = default(Azure.ResourceManager.MongoCluster.Models.MongoClusterStatus?), Azure.ResourceManager.MongoCluster.Models.MongoClusterPublicNetworkAccess? publicNetworkAccess = default(Azure.ResourceManager.MongoCluster.Models.MongoClusterPublicNetworkAccess?), Azure.ResourceManager.MongoCluster.Models.HighAvailabilityMode? highAvailabilityTargetMode = default(Azure.ResourceManager.MongoCluster.Models.HighAvailabilityMode?), long? storageSizeGb = default(long?), int? shardingShardCount = default(int?), string computeTier = null, string backupEarliestRestoreTime = null, System.Collections.Generic.IEnumerable privateEndpointConnections = null, System.Collections.Generic.IEnumerable previewFeatures = null, Azure.ResourceManager.MongoCluster.Models.MongoClusterReplicationProperties replica = null, string infrastructureVersion = null) { throw null; } + public static Azure.ResourceManager.MongoCluster.Models.MongoClusterProperties MongoClusterProperties(Azure.ResourceManager.MongoCluster.Models.MongoClusterCreateMode? createMode = default(Azure.ResourceManager.MongoCluster.Models.MongoClusterCreateMode?), Azure.ResourceManager.MongoCluster.Models.MongoClusterRestoreContent restoreParameters = null, Azure.ResourceManager.MongoCluster.Models.MongoClusterReplicaContent replicaParameters = null, Azure.ResourceManager.MongoCluster.Models.MongoClusterAdministratorProperties administrator = null, string serverVersion = null, string connectionString = null, Azure.ResourceManager.MongoCluster.Models.MongoClusterProvisioningState? provisioningState = default(Azure.ResourceManager.MongoCluster.Models.MongoClusterProvisioningState?), Azure.ResourceManager.MongoCluster.Models.MongoClusterStatus? clusterStatus = default(Azure.ResourceManager.MongoCluster.Models.MongoClusterStatus?), Azure.ResourceManager.MongoCluster.Models.MongoClusterPublicNetworkAccess? publicNetworkAccess = default(Azure.ResourceManager.MongoCluster.Models.MongoClusterPublicNetworkAccess?), Azure.ResourceManager.MongoCluster.Models.HighAvailabilityMode? highAvailabilityTargetMode = default(Azure.ResourceManager.MongoCluster.Models.HighAvailabilityMode?), long? storageSizeGb = default(long?), int? shardingShardCount = default(int?), string computeTier = null, string backupEarliestRestoreTime = null, Azure.ResourceManager.MongoCluster.Models.DataApiMode? dataApiMode = default(Azure.ResourceManager.MongoCluster.Models.DataApiMode?), System.Collections.Generic.IEnumerable privateEndpointConnections = null, System.Collections.Generic.IEnumerable previewFeatures = null, Azure.ResourceManager.MongoCluster.Models.MongoClusterReplicationProperties replica = null, string infrastructureVersion = null) { throw null; } public static Azure.ResourceManager.MongoCluster.Models.MongoClusterReplica MongoClusterReplica(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.MongoCluster.Models.MongoClusterProperties properties = null) { throw null; } public static Azure.ResourceManager.MongoCluster.Models.MongoClusterReplicationProperties MongoClusterReplicationProperties(Azure.Core.ResourceIdentifier sourceResourceId = null, Azure.ResourceManager.MongoCluster.Models.MongoClusterReplicationRole? role = default(Azure.ResourceManager.MongoCluster.Models.MongoClusterReplicationRole?), Azure.ResourceManager.MongoCluster.Models.MongoClusterReplicationState? replicationState = default(Azure.ResourceManager.MongoCluster.Models.MongoClusterReplicationState?)) { throw null; } public static Azure.ResourceManager.MongoCluster.Models.PromoteReplicaContent PromoteReplicaContent(Azure.ResourceManager.MongoCluster.Models.MongoClusterPromoteOption promoteOption = default(Azure.ResourceManager.MongoCluster.Models.MongoClusterPromoteOption), Azure.ResourceManager.MongoCluster.Models.MongoClusterPromoteMode? mode = default(Azure.ResourceManager.MongoCluster.Models.MongoClusterPromoteMode?)) { throw null; } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct DataApiMode : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public DataApiMode(string value) { throw null; } + public static Azure.ResourceManager.MongoCluster.Models.DataApiMode Disabled { get { throw null; } } + public static Azure.ResourceManager.MongoCluster.Models.DataApiMode Enabled { get { throw null; } } + public bool Equals(Azure.ResourceManager.MongoCluster.Models.DataApiMode 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.MongoCluster.Models.DataApiMode left, Azure.ResourceManager.MongoCluster.Models.DataApiMode right) { throw null; } + public static implicit operator Azure.ResourceManager.MongoCluster.Models.DataApiMode (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.MongoCluster.Models.DataApiMode left, Azure.ResourceManager.MongoCluster.Models.DataApiMode right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct HighAvailabilityMode : System.IEquatable { private readonly object _dummy; @@ -524,6 +542,7 @@ public MongoClusterProperties() { } public string ComputeTier { get { throw null; } set { } } public string ConnectionString { get { throw null; } } public Azure.ResourceManager.MongoCluster.Models.MongoClusterCreateMode? CreateMode { get { throw null; } set { } } + public Azure.ResourceManager.MongoCluster.Models.DataApiMode? DataApiMode { get { throw null; } set { } } public Azure.ResourceManager.MongoCluster.Models.HighAvailabilityMode? HighAvailabilityTargetMode { get { throw null; } set { } } public string InfrastructureVersion { get { throw null; } } public System.Collections.Generic.IList PreviewFeatures { get { throw null; } } @@ -701,6 +720,7 @@ public MongoClusterUpdateProperties() { } public Azure.ResourceManager.MongoCluster.Models.MongoClusterAdministratorProperties Administrator { get { throw null; } set { } } public string BackupEarliestRestoreTime { get { throw null; } } public string ComputeTier { get { throw null; } set { } } + public Azure.ResourceManager.MongoCluster.Models.DataApiMode? DataApiMode { get { throw null; } set { } } public Azure.ResourceManager.MongoCluster.Models.HighAvailabilityMode? HighAvailabilityTargetMode { get { throw null; } set { } } public System.Collections.Generic.IList PreviewFeatures { get { throw null; } } public Azure.ResourceManager.MongoCluster.Models.MongoClusterPublicNetworkAccess? PublicNetworkAccess { get { throw null; } set { } } diff --git a/sdk/mongocluster/Azure.ResourceManager.MongoCluster/api/Azure.ResourceManager.MongoCluster.netstandard2.0.cs b/sdk/mongocluster/Azure.ResourceManager.MongoCluster/api/Azure.ResourceManager.MongoCluster.netstandard2.0.cs index be41ef5b289c..61a91910b891 100644 --- a/sdk/mongocluster/Azure.ResourceManager.MongoCluster/api/Azure.ResourceManager.MongoCluster.netstandard2.0.cs +++ b/sdk/mongocluster/Azure.ResourceManager.MongoCluster/api/Azure.ResourceManager.MongoCluster.netstandard2.0.cs @@ -215,12 +215,30 @@ public static partial class ArmMongoClusterModelFactory public static Azure.ResourceManager.MongoCluster.MongoClusterPrivateEndpointConnectionResourceData MongoClusterPrivateEndpointConnectionResourceData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.MongoCluster.Models.MongoClusterPrivateEndpointConnectionProperties properties = null) { throw null; } public static Azure.ResourceManager.MongoCluster.Models.MongoClusterPrivateLinkResourceData MongoClusterPrivateLinkResourceData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.MongoCluster.Models.MongoClusterPrivateLinkResourceProperties properties = null) { throw null; } public static Azure.ResourceManager.MongoCluster.Models.MongoClusterPrivateLinkResourceProperties MongoClusterPrivateLinkResourceProperties(string groupId = null, System.Collections.Generic.IEnumerable requiredMembers = null, System.Collections.Generic.IEnumerable requiredZoneNames = null) { throw null; } - public static Azure.ResourceManager.MongoCluster.Models.MongoClusterProperties MongoClusterProperties(Azure.ResourceManager.MongoCluster.Models.MongoClusterCreateMode? createMode = default(Azure.ResourceManager.MongoCluster.Models.MongoClusterCreateMode?), Azure.ResourceManager.MongoCluster.Models.MongoClusterRestoreContent restoreParameters = null, Azure.ResourceManager.MongoCluster.Models.MongoClusterReplicaContent replicaParameters = null, Azure.ResourceManager.MongoCluster.Models.MongoClusterAdministratorProperties administrator = null, string serverVersion = null, string connectionString = null, Azure.ResourceManager.MongoCluster.Models.MongoClusterProvisioningState? provisioningState = default(Azure.ResourceManager.MongoCluster.Models.MongoClusterProvisioningState?), Azure.ResourceManager.MongoCluster.Models.MongoClusterStatus? clusterStatus = default(Azure.ResourceManager.MongoCluster.Models.MongoClusterStatus?), Azure.ResourceManager.MongoCluster.Models.MongoClusterPublicNetworkAccess? publicNetworkAccess = default(Azure.ResourceManager.MongoCluster.Models.MongoClusterPublicNetworkAccess?), Azure.ResourceManager.MongoCluster.Models.HighAvailabilityMode? highAvailabilityTargetMode = default(Azure.ResourceManager.MongoCluster.Models.HighAvailabilityMode?), long? storageSizeGb = default(long?), int? shardingShardCount = default(int?), string computeTier = null, string backupEarliestRestoreTime = null, System.Collections.Generic.IEnumerable privateEndpointConnections = null, System.Collections.Generic.IEnumerable previewFeatures = null, Azure.ResourceManager.MongoCluster.Models.MongoClusterReplicationProperties replica = null, string infrastructureVersion = null) { throw null; } + public static Azure.ResourceManager.MongoCluster.Models.MongoClusterProperties MongoClusterProperties(Azure.ResourceManager.MongoCluster.Models.MongoClusterCreateMode? createMode = default(Azure.ResourceManager.MongoCluster.Models.MongoClusterCreateMode?), Azure.ResourceManager.MongoCluster.Models.MongoClusterRestoreContent restoreParameters = null, Azure.ResourceManager.MongoCluster.Models.MongoClusterReplicaContent replicaParameters = null, Azure.ResourceManager.MongoCluster.Models.MongoClusterAdministratorProperties administrator = null, string serverVersion = null, string connectionString = null, Azure.ResourceManager.MongoCluster.Models.MongoClusterProvisioningState? provisioningState = default(Azure.ResourceManager.MongoCluster.Models.MongoClusterProvisioningState?), Azure.ResourceManager.MongoCluster.Models.MongoClusterStatus? clusterStatus = default(Azure.ResourceManager.MongoCluster.Models.MongoClusterStatus?), Azure.ResourceManager.MongoCluster.Models.MongoClusterPublicNetworkAccess? publicNetworkAccess = default(Azure.ResourceManager.MongoCluster.Models.MongoClusterPublicNetworkAccess?), Azure.ResourceManager.MongoCluster.Models.HighAvailabilityMode? highAvailabilityTargetMode = default(Azure.ResourceManager.MongoCluster.Models.HighAvailabilityMode?), long? storageSizeGb = default(long?), int? shardingShardCount = default(int?), string computeTier = null, string backupEarliestRestoreTime = null, Azure.ResourceManager.MongoCluster.Models.DataApiMode? dataApiMode = default(Azure.ResourceManager.MongoCluster.Models.DataApiMode?), System.Collections.Generic.IEnumerable privateEndpointConnections = null, System.Collections.Generic.IEnumerable previewFeatures = null, Azure.ResourceManager.MongoCluster.Models.MongoClusterReplicationProperties replica = null, string infrastructureVersion = null) { throw null; } public static Azure.ResourceManager.MongoCluster.Models.MongoClusterReplica MongoClusterReplica(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.MongoCluster.Models.MongoClusterProperties properties = null) { throw null; } public static Azure.ResourceManager.MongoCluster.Models.MongoClusterReplicationProperties MongoClusterReplicationProperties(Azure.Core.ResourceIdentifier sourceResourceId = null, Azure.ResourceManager.MongoCluster.Models.MongoClusterReplicationRole? role = default(Azure.ResourceManager.MongoCluster.Models.MongoClusterReplicationRole?), Azure.ResourceManager.MongoCluster.Models.MongoClusterReplicationState? replicationState = default(Azure.ResourceManager.MongoCluster.Models.MongoClusterReplicationState?)) { throw null; } public static Azure.ResourceManager.MongoCluster.Models.PromoteReplicaContent PromoteReplicaContent(Azure.ResourceManager.MongoCluster.Models.MongoClusterPromoteOption promoteOption = default(Azure.ResourceManager.MongoCluster.Models.MongoClusterPromoteOption), Azure.ResourceManager.MongoCluster.Models.MongoClusterPromoteMode? mode = default(Azure.ResourceManager.MongoCluster.Models.MongoClusterPromoteMode?)) { throw null; } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct DataApiMode : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public DataApiMode(string value) { throw null; } + public static Azure.ResourceManager.MongoCluster.Models.DataApiMode Disabled { get { throw null; } } + public static Azure.ResourceManager.MongoCluster.Models.DataApiMode Enabled { get { throw null; } } + public bool Equals(Azure.ResourceManager.MongoCluster.Models.DataApiMode 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.MongoCluster.Models.DataApiMode left, Azure.ResourceManager.MongoCluster.Models.DataApiMode right) { throw null; } + public static implicit operator Azure.ResourceManager.MongoCluster.Models.DataApiMode (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.MongoCluster.Models.DataApiMode left, Azure.ResourceManager.MongoCluster.Models.DataApiMode right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct HighAvailabilityMode : System.IEquatable { private readonly object _dummy; @@ -524,6 +542,7 @@ public MongoClusterProperties() { } public string ComputeTier { get { throw null; } set { } } public string ConnectionString { get { throw null; } } public Azure.ResourceManager.MongoCluster.Models.MongoClusterCreateMode? CreateMode { get { throw null; } set { } } + public Azure.ResourceManager.MongoCluster.Models.DataApiMode? DataApiMode { get { throw null; } set { } } public Azure.ResourceManager.MongoCluster.Models.HighAvailabilityMode? HighAvailabilityTargetMode { get { throw null; } set { } } public string InfrastructureVersion { get { throw null; } } public System.Collections.Generic.IList PreviewFeatures { get { throw null; } } @@ -701,6 +720,7 @@ public MongoClusterUpdateProperties() { } public Azure.ResourceManager.MongoCluster.Models.MongoClusterAdministratorProperties Administrator { get { throw null; } set { } } public string BackupEarliestRestoreTime { get { throw null; } } public string ComputeTier { get { throw null; } set { } } + public Azure.ResourceManager.MongoCluster.Models.DataApiMode? DataApiMode { get { throw null; } set { } } public Azure.ResourceManager.MongoCluster.Models.HighAvailabilityMode? HighAvailabilityTargetMode { get { throw null; } set { } } public System.Collections.Generic.IList PreviewFeatures { get { throw null; } } public Azure.ResourceManager.MongoCluster.Models.MongoClusterPublicNetworkAccess? PublicNetworkAccess { get { throw null; } set { } } diff --git a/sdk/mongocluster/Azure.ResourceManager.MongoCluster/samples/Generated/Samples/Sample_MongoClusterCollection.cs b/sdk/mongocluster/Azure.ResourceManager.MongoCluster/samples/Generated/Samples/Sample_MongoClusterCollection.cs index 3a1dea587e91..ec076fb08bcb 100644 --- a/sdk/mongocluster/Azure.ResourceManager.MongoCluster/samples/Generated/Samples/Sample_MongoClusterCollection.cs +++ b/sdk/mongocluster/Azure.ResourceManager.MongoCluster/samples/Generated/Samples/Sample_MongoClusterCollection.cs @@ -21,7 +21,7 @@ public partial class Sample_MongoClusterCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreatesANewMongoClusterResource() { - // Generated from example definition: 2024-07-01/MongoClusters_Create.json + // Generated from example definition: 2024-10-01-preview/MongoClusters_Create.json // this example is just showing the usage of "MongoCluster_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 @@ -71,7 +71,7 @@ public async Task CreateOrUpdate_CreatesANewMongoClusterResource() [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreatesAReplicaMongoClusterResourceFromASourceResource() { - // Generated from example definition: 2024-07-01/MongoClusters_CreateGeoReplica.json + // Generated from example definition: 2024-10-01-preview/MongoClusters_CreateGeoReplica.json // this example is just showing the usage of "MongoCluster_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 @@ -113,7 +113,7 @@ public async Task CreateOrUpdate_CreatesAReplicaMongoClusterResourceFromASourceR [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreatesAMongoClusterResourceFromAPointInTimeRestore() { - // Generated from example definition: 2024-07-01/MongoClusters_CreatePITR.json + // Generated from example definition: 2024-10-01-preview/MongoClusters_CreatePITR.json // this example is just showing the usage of "MongoCluster_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 @@ -159,7 +159,7 @@ public async Task CreateOrUpdate_CreatesAMongoClusterResourceFromAPointInTimeRes [Ignore("Only validating compilation of examples")] public async Task Get_GetsAMongoClusterResource() { - // Generated from example definition: 2024-07-01/MongoClusters_Get.json + // Generated from example definition: 2024-10-01-preview/MongoClusters_Get.json // this example is just showing the usage of "MongoCluster_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 @@ -192,7 +192,7 @@ public async Task Get_GetsAMongoClusterResource() [Ignore("Only validating compilation of examples")] public async Task GetAll_ListsTheMongoClusterResourcesInAResourceGroup() { - // Generated from example definition: 2024-07-01/MongoClusters_ListByResourceGroup.json + // Generated from example definition: 2024-10-01-preview/MongoClusters_ListByResourceGroup.json // this example is just showing the usage of "MongoCluster_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 @@ -227,7 +227,7 @@ public async Task GetAll_ListsTheMongoClusterResourcesInAResourceGroup() [Ignore("Only validating compilation of examples")] public async Task Exists_GetsAMongoClusterResource() { - // Generated from example definition: 2024-07-01/MongoClusters_Get.json + // Generated from example definition: 2024-10-01-preview/MongoClusters_Get.json // this example is just showing the usage of "MongoCluster_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 @@ -256,7 +256,7 @@ public async Task Exists_GetsAMongoClusterResource() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetsAMongoClusterResource() { - // Generated from example definition: 2024-07-01/MongoClusters_Get.json + // Generated from example definition: 2024-10-01-preview/MongoClusters_Get.json // this example is just showing the usage of "MongoCluster_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/mongocluster/Azure.ResourceManager.MongoCluster/samples/Generated/Samples/Sample_MongoClusterFirewallRuleCollection.cs b/sdk/mongocluster/Azure.ResourceManager.MongoCluster/samples/Generated/Samples/Sample_MongoClusterFirewallRuleCollection.cs index f95bd4dccd14..1fd66ec01117 100644 --- a/sdk/mongocluster/Azure.ResourceManager.MongoCluster/samples/Generated/Samples/Sample_MongoClusterFirewallRuleCollection.cs +++ b/sdk/mongocluster/Azure.ResourceManager.MongoCluster/samples/Generated/Samples/Sample_MongoClusterFirewallRuleCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_MongoClusterFirewallRuleCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreatesAFirewallRuleOnAMongoClusterResource() { - // Generated from example definition: 2024-07-01/MongoClusters_FirewallRuleCreate.json + // Generated from example definition: 2024-10-01-preview/MongoClusters_FirewallRuleCreate.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 @@ -59,7 +59,7 @@ public async Task CreateOrUpdate_CreatesAFirewallRuleOnAMongoClusterResource() [Ignore("Only validating compilation of examples")] public async Task Get_GetsAFirewallRuleOnAMongoClusterResource() { - // Generated from example definition: 2024-07-01/MongoClusters_FirewallRuleGet.json + // Generated from example definition: 2024-10-01-preview/MongoClusters_FirewallRuleGet.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 @@ -93,7 +93,7 @@ public async Task Get_GetsAFirewallRuleOnAMongoClusterResource() [Ignore("Only validating compilation of examples")] public async Task GetAll_ListTheFirewallRulesOnAMongoClusterResource() { - // Generated from example definition: 2024-07-01/MongoClusters_FirewallRuleList.json + // Generated from example definition: 2024-10-01-preview/MongoClusters_FirewallRuleList.json // this example is just showing the usage of "FirewallRule_ListByMongoCluster" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -129,7 +129,7 @@ public async Task GetAll_ListTheFirewallRulesOnAMongoClusterResource() [Ignore("Only validating compilation of examples")] public async Task Exists_GetsAFirewallRuleOnAMongoClusterResource() { - // Generated from example definition: 2024-07-01/MongoClusters_FirewallRuleGet.json + // Generated from example definition: 2024-10-01-preview/MongoClusters_FirewallRuleGet.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 @@ -159,7 +159,7 @@ public async Task Exists_GetsAFirewallRuleOnAMongoClusterResource() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetsAFirewallRuleOnAMongoClusterResource() { - // Generated from example definition: 2024-07-01/MongoClusters_FirewallRuleGet.json + // Generated from example definition: 2024-10-01-preview/MongoClusters_FirewallRuleGet.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 diff --git a/sdk/mongocluster/Azure.ResourceManager.MongoCluster/samples/Generated/Samples/Sample_MongoClusterFirewallRuleResource.cs b/sdk/mongocluster/Azure.ResourceManager.MongoCluster/samples/Generated/Samples/Sample_MongoClusterFirewallRuleResource.cs index d4aa354b7aaf..c56bc9192467 100644 --- a/sdk/mongocluster/Azure.ResourceManager.MongoCluster/samples/Generated/Samples/Sample_MongoClusterFirewallRuleResource.cs +++ b/sdk/mongocluster/Azure.ResourceManager.MongoCluster/samples/Generated/Samples/Sample_MongoClusterFirewallRuleResource.cs @@ -20,7 +20,7 @@ public partial class Sample_MongoClusterFirewallRuleResource [Ignore("Only validating compilation of examples")] public async Task Get_GetsAFirewallRuleOnAMongoClusterResource() { - // Generated from example definition: 2024-07-01/MongoClusters_FirewallRuleGet.json + // Generated from example definition: 2024-10-01-preview/MongoClusters_FirewallRuleGet.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 @@ -51,7 +51,7 @@ public async Task Get_GetsAFirewallRuleOnAMongoClusterResource() [Ignore("Only validating compilation of examples")] public async Task Delete_DeletesAFirewallRuleOnAMongoClusterResource() { - // Generated from example definition: 2024-07-01/MongoClusters_FirewallRuleDelete.json + // Generated from example definition: 2024-10-01-preview/MongoClusters_FirewallRuleDelete.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 @@ -78,7 +78,7 @@ public async Task Delete_DeletesAFirewallRuleOnAMongoClusterResource() [Ignore("Only validating compilation of examples")] public async Task Update_CreatesAFirewallRuleOnAMongoClusterResource() { - // Generated from example definition: 2024-07-01/MongoClusters_FirewallRuleCreate.json + // Generated from example definition: 2024-10-01-preview/MongoClusters_FirewallRuleCreate.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 diff --git a/sdk/mongocluster/Azure.ResourceManager.MongoCluster/samples/Generated/Samples/Sample_MongoClusterPrivateEndpointConnectionResource.cs b/sdk/mongocluster/Azure.ResourceManager.MongoCluster/samples/Generated/Samples/Sample_MongoClusterPrivateEndpointConnectionResource.cs index b613f615940e..5c8ec07c0c79 100644 --- a/sdk/mongocluster/Azure.ResourceManager.MongoCluster/samples/Generated/Samples/Sample_MongoClusterPrivateEndpointConnectionResource.cs +++ b/sdk/mongocluster/Azure.ResourceManager.MongoCluster/samples/Generated/Samples/Sample_MongoClusterPrivateEndpointConnectionResource.cs @@ -20,7 +20,7 @@ public partial class Sample_MongoClusterPrivateEndpointConnectionResource [Ignore("Only validating compilation of examples")] public async Task Get_GetAPrivateEndpointConnectionOnAMongoClusterResource() { - // Generated from example definition: 2024-07-01/MongoClusters_PrivateEndpointConnectionGet.json + // Generated from example definition: 2024-10-01-preview/MongoClusters_PrivateEndpointConnectionGet.json // this example is just showing the usage of "PrivateEndpointConnectionResource_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -51,7 +51,7 @@ public async Task Get_GetAPrivateEndpointConnectionOnAMongoClusterResource() [Ignore("Only validating compilation of examples")] public async Task Delete_DeleteAPrivateEndpointConnectionOnAMongoClusterResource() { - // Generated from example definition: 2024-07-01/MongoClusters_PrivateEndpointConnectionDelete.json + // Generated from example definition: 2024-10-01-preview/MongoClusters_PrivateEndpointConnectionDelete.json // this example is just showing the usage of "PrivateEndpointConnectionResource_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -78,7 +78,7 @@ public async Task Delete_DeleteAPrivateEndpointConnectionOnAMongoClusterResource [Ignore("Only validating compilation of examples")] public async Task Update_ApprovesAPrivateEndpointConnectionOnAMongoClusterResource() { - // Generated from example definition: 2024-07-01/MongoClusters_PrivateEndpointConnectionPut.json + // Generated from example definition: 2024-10-01-preview/MongoClusters_PrivateEndpointConnectionPut.json // this example is just showing the usage of "PrivateEndpointConnectionResource_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 diff --git a/sdk/mongocluster/Azure.ResourceManager.MongoCluster/samples/Generated/Samples/Sample_MongoClusterPrivateEndpointConnectionResourceCollection.cs b/sdk/mongocluster/Azure.ResourceManager.MongoCluster/samples/Generated/Samples/Sample_MongoClusterPrivateEndpointConnectionResourceCollection.cs index f0480e5f2648..4b57ad591764 100644 --- a/sdk/mongocluster/Azure.ResourceManager.MongoCluster/samples/Generated/Samples/Sample_MongoClusterPrivateEndpointConnectionResourceCollection.cs +++ b/sdk/mongocluster/Azure.ResourceManager.MongoCluster/samples/Generated/Samples/Sample_MongoClusterPrivateEndpointConnectionResourceCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_MongoClusterPrivateEndpointConnectionResourceCollect [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_ApprovesAPrivateEndpointConnectionOnAMongoClusterResource() { - // Generated from example definition: 2024-07-01/MongoClusters_PrivateEndpointConnectionPut.json + // Generated from example definition: 2024-10-01-preview/MongoClusters_PrivateEndpointConnectionPut.json // this example is just showing the usage of "PrivateEndpointConnectionResource_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 @@ -63,7 +63,7 @@ public async Task CreateOrUpdate_ApprovesAPrivateEndpointConnectionOnAMongoClust [Ignore("Only validating compilation of examples")] public async Task Get_GetAPrivateEndpointConnectionOnAMongoClusterResource() { - // Generated from example definition: 2024-07-01/MongoClusters_PrivateEndpointConnectionGet.json + // Generated from example definition: 2024-10-01-preview/MongoClusters_PrivateEndpointConnectionGet.json // this example is just showing the usage of "PrivateEndpointConnectionResource_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -97,7 +97,7 @@ public async Task Get_GetAPrivateEndpointConnectionOnAMongoClusterResource() [Ignore("Only validating compilation of examples")] public async Task GetAll_ListsThePrivateEndpointConnectionResourcesOnAMongoClusterResource() { - // Generated from example definition: 2024-07-01/MongoClusters_PrivateEndpointConnectionList.json + // Generated from example definition: 2024-10-01-preview/MongoClusters_PrivateEndpointConnectionList.json // this example is just showing the usage of "PrivateEndpointConnectionResource_ListByMongoCluster" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -133,7 +133,7 @@ public async Task GetAll_ListsThePrivateEndpointConnectionResourcesOnAMongoClust [Ignore("Only validating compilation of examples")] public async Task Exists_GetAPrivateEndpointConnectionOnAMongoClusterResource() { - // Generated from example definition: 2024-07-01/MongoClusters_PrivateEndpointConnectionGet.json + // Generated from example definition: 2024-10-01-preview/MongoClusters_PrivateEndpointConnectionGet.json // this example is just showing the usage of "PrivateEndpointConnectionResource_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -163,7 +163,7 @@ public async Task Exists_GetAPrivateEndpointConnectionOnAMongoClusterResource() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetAPrivateEndpointConnectionOnAMongoClusterResource() { - // Generated from example definition: 2024-07-01/MongoClusters_PrivateEndpointConnectionGet.json + // Generated from example definition: 2024-10-01-preview/MongoClusters_PrivateEndpointConnectionGet.json // this example is just showing the usage of "PrivateEndpointConnectionResource_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/mongocluster/Azure.ResourceManager.MongoCluster/samples/Generated/Samples/Sample_MongoClusterResource.cs b/sdk/mongocluster/Azure.ResourceManager.MongoCluster/samples/Generated/Samples/Sample_MongoClusterResource.cs index 89dc0e9ea8fe..a256b8b856f5 100644 --- a/sdk/mongocluster/Azure.ResourceManager.MongoCluster/samples/Generated/Samples/Sample_MongoClusterResource.cs +++ b/sdk/mongocluster/Azure.ResourceManager.MongoCluster/samples/Generated/Samples/Sample_MongoClusterResource.cs @@ -20,7 +20,7 @@ public partial class Sample_MongoClusterResource [Ignore("Only validating compilation of examples")] public async Task Get_GetsAMongoClusterResource() { - // Generated from example definition: 2024-07-01/MongoClusters_Get.json + // Generated from example definition: 2024-10-01-preview/MongoClusters_Get.json // this example is just showing the usage of "MongoCluster_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -50,7 +50,7 @@ public async Task Get_GetsAMongoClusterResource() [Ignore("Only validating compilation of examples")] public async Task Delete_DeletesAMongoClusterResource() { - // Generated from example definition: 2024-07-01/MongoClusters_Delete.json + // Generated from example definition: 2024-10-01-preview/MongoClusters_Delete.json // this example is just showing the usage of "MongoCluster_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 @@ -72,11 +72,49 @@ public async Task Delete_DeletesAMongoClusterResource() Console.WriteLine("Succeeded"); } + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Update_EnablesDataAPIOnAMongoClusterResource() + { + // Generated from example definition: 2024-10-01-preview/MongoClusters_PatchDataApi.json + // this example is just showing the usage of "MongoCluster_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 MongoClusterResource created on azure + // for more information of creating MongoClusterResource, please refer to the document of MongoClusterResource + string subscriptionId = "ffffffff-ffff-ffff-ffff-ffffffffffff"; + string resourceGroupName = "TestResourceGroup"; + string mongoClusterName = "myMongoCluster"; + ResourceIdentifier mongoClusterResourceId = MongoClusterResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, mongoClusterName); + MongoClusterResource mongoCluster = client.GetMongoClusterResource(mongoClusterResourceId); + + // invoke the operation + MongoClusterPatch patch = new MongoClusterPatch + { + Properties = new MongoClusterUpdateProperties + { + DataApiMode = DataApiMode.Enabled, + }, + }; + ArmOperation lro = await mongoCluster.UpdateAsync(WaitUntil.Completed, patch); + MongoClusterResource 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 + MongoClusterData 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_UpdatesTheDiskSizeOnAMongoClusterResource() { - // Generated from example definition: 2024-07-01/MongoClusters_PatchDiskSize.json + // Generated from example definition: 2024-10-01-preview/MongoClusters_PatchDiskSize.json // this example is just showing the usage of "MongoCluster_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -114,7 +152,7 @@ public async Task Update_UpdatesTheDiskSizeOnAMongoClusterResource() [Ignore("Only validating compilation of examples")] public async Task Update_DisablesPublicNetworkAccessOnAMongoClusterResourceWithAPrivateEndpointConnection() { - // Generated from example definition: 2024-07-01/MongoClusters_PatchPrivateNetworkAccess.json + // Generated from example definition: 2024-10-01-preview/MongoClusters_PatchPrivateNetworkAccess.json // this example is just showing the usage of "MongoCluster_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 @@ -152,7 +190,7 @@ public async Task Update_DisablesPublicNetworkAccessOnAMongoClusterResourceWithA [Ignore("Only validating compilation of examples")] public async Task Update_ResetsTheAdministratorLoginPassword() { - // Generated from example definition: 2024-07-01/MongoClusters_ResetPassword.json + // Generated from example definition: 2024-10-01-preview/MongoClusters_ResetPassword.json // this example is just showing the usage of "MongoCluster_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 @@ -194,7 +232,7 @@ public async Task Update_ResetsTheAdministratorLoginPassword() [Ignore("Only validating compilation of examples")] public async Task Update_UpdatesAMongoClusterResource() { - // Generated from example definition: 2024-07-01/MongoClusters_Update.json + // Generated from example definition: 2024-10-01-preview/MongoClusters_Update.json // this example is just showing the usage of "MongoCluster_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 @@ -242,7 +280,7 @@ public async Task Update_UpdatesAMongoClusterResource() [Ignore("Only validating compilation of examples")] public async Task GetConnectionStrings_ListTheAvailableConnectionStringsForTheMongoClusterResource() { - // Generated from example definition: 2024-07-01/MongoClusters_ListConnectionStrings.json + // Generated from example definition: 2024-10-01-preview/MongoClusters_ListConnectionStrings.json // this example is just showing the usage of "MongoClusters_ListConnectionStrings" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -268,7 +306,7 @@ public async Task GetConnectionStrings_ListTheAvailableConnectionStringsForTheMo [Ignore("Only validating compilation of examples")] public async Task Promote_PromotesAReplicaMongoClusterResourceToAPrimaryRole() { - // Generated from example definition: 2024-07-01/MongoClusters_ForcePromoteReplica.json + // Generated from example definition: 2024-10-01-preview/MongoClusters_ForcePromoteReplica.json // this example is just showing the usage of "MongoClusters_Promote" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -298,7 +336,7 @@ public async Task Promote_PromotesAReplicaMongoClusterResourceToAPrimaryRole() [Ignore("Only validating compilation of examples")] public async Task GetPrivateLinks_ListsThePrivateLinkResourcesAvailableOnAMongoClusterResource() { - // Generated from example definition: 2024-07-01/MongoClusters_PrivateLinkResourceList.json + // Generated from example definition: 2024-10-01-preview/MongoClusters_PrivateLinkResourceList.json // this example is just showing the usage of "PrivateLinkResource_ListByMongoCluster" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -327,7 +365,7 @@ public async Task GetPrivateLinks_ListsThePrivateLinkResourcesAvailableOnAMongoC [Ignore("Only validating compilation of examples")] public async Task GetReplicasByParent_ListTheReplicasLinkedToAMongoClusterResource() { - // Generated from example definition: 2024-07-01/MongoClusters_ReplicaList.json + // Generated from example definition: 2024-10-01-preview/MongoClusters_ReplicaList.json // this example is just showing the usage of "Replica_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 diff --git a/sdk/mongocluster/Azure.ResourceManager.MongoCluster/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs b/sdk/mongocluster/Azure.ResourceManager.MongoCluster/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs index 30d2c455dea6..b1a0920f2f00 100644 --- a/sdk/mongocluster/Azure.ResourceManager.MongoCluster/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs +++ b/sdk/mongocluster/Azure.ResourceManager.MongoCluster/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs @@ -21,7 +21,7 @@ public partial class Sample_SubscriptionResourceExtensions [Ignore("Only validating compilation of examples")] public async Task GetMongoClusters_ListsTheMongoClusterResourcesInASubscription() { - // Generated from example definition: 2024-07-01/MongoClusters_List.json + // Generated from example definition: 2024-10-01-preview/MongoClusters_List.json // this example is just showing the usage of "MongoCluster_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 @@ -52,7 +52,7 @@ public async Task GetMongoClusters_ListsTheMongoClusterResourcesInASubscription( [Ignore("Only validating compilation of examples")] public async Task CheckMongoClusterNameAvailability_ChecksAndConfirmsTheMongoClusterNameIsAvailabilityForUse() { - // Generated from example definition: 2024-07-01/MongoClusters_NameAvailability.json + // Generated from example definition: 2024-10-01-preview/MongoClusters_NameAvailability.json // this example is just showing the usage of "MongoClusters_CheckMongoClusterNameAvailability" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -82,7 +82,7 @@ public async Task CheckMongoClusterNameAvailability_ChecksAndConfirmsTheMongoClu [Ignore("Only validating compilation of examples")] public async Task CheckMongoClusterNameAvailability_ChecksAndReturnsThatTheMongoClusterNameIsAlreadyInUse() { - // Generated from example definition: 2024-07-01/MongoClusters_NameAvailability_AlreadyExists.json + // Generated from example definition: 2024-10-01-preview/MongoClusters_NameAvailability_AlreadyExists.json // this example is just showing the usage of "MongoClusters_CheckMongoClusterNameAvailability" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/ArmMongoClusterModelFactory.cs b/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/ArmMongoClusterModelFactory.cs index b9099c97c334..3963542c53d1 100644 --- a/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/ArmMongoClusterModelFactory.cs +++ b/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/ArmMongoClusterModelFactory.cs @@ -55,12 +55,13 @@ public static MongoClusterData MongoClusterData(ResourceIdentifier id = null, st /// The sharding properties of the mongo cluster. /// The compute properties of the mongo cluster. /// The backup properties of the mongo cluster. + /// The Data API properties of the mongo cluster. /// List of private endpoint connections. /// List of private endpoint connections. /// The replication properties for the mongo cluster. /// The infrastructure version the cluster is provisioned on. /// A new instance for mocking. - public static MongoClusterProperties MongoClusterProperties(MongoClusterCreateMode? createMode = null, MongoClusterRestoreContent restoreParameters = null, MongoClusterReplicaContent replicaParameters = null, MongoClusterAdministratorProperties administrator = null, string serverVersion = null, string connectionString = null, MongoClusterProvisioningState? provisioningState = null, MongoClusterStatus? clusterStatus = null, MongoClusterPublicNetworkAccess? publicNetworkAccess = null, HighAvailabilityMode? highAvailabilityTargetMode = null, long? storageSizeGb = null, int? shardingShardCount = null, string computeTier = null, string backupEarliestRestoreTime = null, IEnumerable privateEndpointConnections = null, IEnumerable previewFeatures = null, MongoClusterReplicationProperties replica = null, string infrastructureVersion = null) + public static MongoClusterProperties MongoClusterProperties(MongoClusterCreateMode? createMode = null, MongoClusterRestoreContent restoreParameters = null, MongoClusterReplicaContent replicaParameters = null, MongoClusterAdministratorProperties administrator = null, string serverVersion = null, string connectionString = null, MongoClusterProvisioningState? provisioningState = null, MongoClusterStatus? clusterStatus = null, MongoClusterPublicNetworkAccess? publicNetworkAccess = null, HighAvailabilityMode? highAvailabilityTargetMode = null, long? storageSizeGb = null, int? shardingShardCount = null, string computeTier = null, string backupEarliestRestoreTime = null, DataApiMode? dataApiMode = null, IEnumerable privateEndpointConnections = null, IEnumerable previewFeatures = null, MongoClusterReplicationProperties replica = null, string infrastructureVersion = null) { privateEndpointConnections ??= new List(); previewFeatures ??= new List(); @@ -80,6 +81,7 @@ public static MongoClusterProperties MongoClusterProperties(MongoClusterCreateMo shardingShardCount != null ? new ShardingProperties(shardingShardCount, serializedAdditionalRawData: null) : null, computeTier != null ? new ComputeProperties(computeTier, serializedAdditionalRawData: null) : null, backupEarliestRestoreTime != null ? new BackupProperties(backupEarliestRestoreTime, serializedAdditionalRawData: null) : null, + dataApiMode != null ? new DataApiProperties(dataApiMode, serializedAdditionalRawData: null) : null, privateEndpointConnections?.ToList(), previewFeatures?.ToList(), replica, diff --git a/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/Extensions/MockableMongoClusterResourceGroupResource.cs b/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/Extensions/MockableMongoClusterResourceGroupResource.cs index 87e8ad903dcb..44026ea2aba3 100644 --- a/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/Extensions/MockableMongoClusterResourceGroupResource.cs +++ b/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/Extensions/MockableMongoClusterResourceGroupResource.cs @@ -53,7 +53,7 @@ public virtual MongoClusterCollection GetMongoClusters() /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01-preview /// /// /// Resource @@ -84,7 +84,7 @@ public virtual async Task> GetMongoClusterAsync(s /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01-preview /// /// /// Resource diff --git a/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/Extensions/MockableMongoClusterSubscriptionResource.cs b/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/Extensions/MockableMongoClusterSubscriptionResource.cs index bcba1d0d3f84..f39a86ce17b1 100644 --- a/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/Extensions/MockableMongoClusterSubscriptionResource.cs +++ b/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/Extensions/MockableMongoClusterSubscriptionResource.cs @@ -55,7 +55,7 @@ private string GetApiVersionOrNull(ResourceType resourceType) /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01-preview /// /// /// Resource @@ -85,7 +85,7 @@ public virtual AsyncPageable GetMongoClustersAsync(Cancell /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01-preview /// /// /// Resource @@ -115,7 +115,7 @@ public virtual Pageable GetMongoClusters(CancellationToken /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01-preview /// /// /// Resource @@ -158,7 +158,7 @@ public virtual async Task> CheckMon /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01-preview /// /// /// Resource diff --git a/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/Extensions/MongoClusterExtensions.cs b/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/Extensions/MongoClusterExtensions.cs index ee4d0e4ffd35..5553f5d5064c 100644 --- a/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/Extensions/MongoClusterExtensions.cs +++ b/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/Extensions/MongoClusterExtensions.cs @@ -120,7 +120,7 @@ public static MongoClusterCollection GetMongoClusters(this ResourceGroupResource /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01-preview /// /// /// Resource @@ -158,7 +158,7 @@ public static async Task> GetMongoClusterAsync(th /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01-preview /// /// /// Resource @@ -196,7 +196,7 @@ public static Response GetMongoCluster(this ResourceGroupR /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01-preview /// /// /// Resource @@ -232,7 +232,7 @@ public static AsyncPageable GetMongoClustersAsync(this Sub /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01-preview /// /// /// Resource @@ -268,7 +268,7 @@ public static Pageable GetMongoClusters(this SubscriptionR /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01-preview /// /// /// Resource @@ -305,7 +305,7 @@ public static async Task> CheckMong /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01-preview /// /// /// Resource diff --git a/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/Models/DataApiMode.cs b/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/Models/DataApiMode.cs new file mode 100644 index 000000000000..72ce8ed51f95 --- /dev/null +++ b/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/Models/DataApiMode.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.MongoCluster.Models +{ + /// The mode to apply to the Mongo Data API. + public readonly partial struct DataApiMode : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public DataApiMode(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string EnabledValue = "Enabled"; + private const string DisabledValue = "Disabled"; + + /// Mongo Data API is enabled for the cluster. + public static DataApiMode Enabled { get; } = new DataApiMode(EnabledValue); + /// Mongo Data API is disabled for the cluster. + public static DataApiMode Disabled { get; } = new DataApiMode(DisabledValue); + /// Determines if two values are the same. + public static bool operator ==(DataApiMode left, DataApiMode right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(DataApiMode left, DataApiMode right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator DataApiMode(string value) => new DataApiMode(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is DataApiMode other && Equals(other); + /// + public bool Equals(DataApiMode 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/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/Models/DataApiProperties.Serialization.cs b/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/Models/DataApiProperties.Serialization.cs new file mode 100644 index 000000000000..6c3490ccc23e --- /dev/null +++ b/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/Models/DataApiProperties.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.MongoCluster.Models +{ + internal partial class DataApiProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DataApiProperties)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(Mode)) + { + writer.WritePropertyName("mode"u8); + writer.WriteStringValue(Mode.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 + } + } + } + + DataApiProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DataApiProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDataApiProperties(document.RootElement, options); + } + + internal static DataApiProperties DeserializeDataApiProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + DataApiMode? mode = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("mode"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + mode = new DataApiMode(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DataApiProperties(mode, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(DataApiProperties)} does not support writing '{options.Format}' format."); + } + } + + DataApiProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeDataApiProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DataApiProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/Models/DataApiProperties.cs b/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/Models/DataApiProperties.cs new file mode 100644 index 000000000000..5eccac330a35 --- /dev/null +++ b/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/Models/DataApiProperties.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.MongoCluster.Models +{ + /// Data API properties. + internal partial class DataApiProperties + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// 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 DataApiProperties() + { + } + + /// Initializes a new instance of . + /// The mode to indicate whether the Mongo Data API is enabled for a cluster. + /// Keeps track of any properties unknown to the library. + internal DataApiProperties(DataApiMode? mode, IDictionary serializedAdditionalRawData) + { + Mode = mode; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The mode to indicate whether the Mongo Data API is enabled for a cluster. + public DataApiMode? Mode { get; set; } + } +} diff --git a/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/Models/MongoClusterProperties.Serialization.cs b/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/Models/MongoClusterProperties.Serialization.cs index 50859044b270..192e76cb4c2d 100644 --- a/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/Models/MongoClusterProperties.Serialization.cs +++ b/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/Models/MongoClusterProperties.Serialization.cs @@ -104,6 +104,11 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("backup"u8); writer.WriteObjectValue(Backup, options); } + if (Optional.IsDefined(DataApi)) + { + writer.WritePropertyName("dataApi"u8); + writer.WriteObjectValue(DataApi, options); + } if (options.Format != "W" && Optional.IsCollectionDefined(PrivateEndpointConnections)) { writer.WritePropertyName("privateEndpointConnections"u8); @@ -185,6 +190,7 @@ internal static MongoClusterProperties DeserializeMongoClusterProperties(JsonEle ShardingProperties sharding = default; ComputeProperties compute = default; BackupProperties backup = default; + DataApiProperties dataApi = default; IReadOnlyList privateEndpointConnections = default; IList previewFeatures = default; MongoClusterReplicationProperties replica = default; @@ -311,6 +317,15 @@ internal static MongoClusterProperties DeserializeMongoClusterProperties(JsonEle backup = BackupProperties.DeserializeBackupProperties(property.Value, options); continue; } + if (property.NameEquals("dataApi"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + dataApi = DataApiProperties.DeserializeDataApiProperties(property.Value, options); + continue; + } if (property.NameEquals("privateEndpointConnections"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -374,6 +389,7 @@ internal static MongoClusterProperties DeserializeMongoClusterProperties(JsonEle sharding, compute, backup, + dataApi, privateEndpointConnections ?? new ChangeTrackingList(), previewFeatures ?? new ChangeTrackingList(), replica, diff --git a/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/Models/MongoClusterProperties.cs b/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/Models/MongoClusterProperties.cs index 34981443c068..fbd8073d21cd 100644 --- a/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/Models/MongoClusterProperties.cs +++ b/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/Models/MongoClusterProperties.cs @@ -67,12 +67,13 @@ public MongoClusterProperties() /// The sharding properties of the mongo cluster. /// The compute properties of the mongo cluster. /// The backup properties of the mongo cluster. + /// The Data API properties of the mongo cluster. /// List of private endpoint connections. /// List of private endpoint connections. /// The replication properties for the mongo cluster. /// The infrastructure version the cluster is provisioned on. /// Keeps track of any properties unknown to the library. - internal MongoClusterProperties(MongoClusterCreateMode? createMode, MongoClusterRestoreContent restoreParameters, MongoClusterReplicaContent replicaParameters, MongoClusterAdministratorProperties administrator, string serverVersion, string connectionString, MongoClusterProvisioningState? provisioningState, MongoClusterStatus? clusterStatus, MongoClusterPublicNetworkAccess? publicNetworkAccess, HighAvailabilityProperties highAvailability, StorageProperties storage, ShardingProperties sharding, ComputeProperties compute, BackupProperties backup, IReadOnlyList privateEndpointConnections, IList previewFeatures, MongoClusterReplicationProperties replica, string infrastructureVersion, IDictionary serializedAdditionalRawData) + internal MongoClusterProperties(MongoClusterCreateMode? createMode, MongoClusterRestoreContent restoreParameters, MongoClusterReplicaContent replicaParameters, MongoClusterAdministratorProperties administrator, string serverVersion, string connectionString, MongoClusterProvisioningState? provisioningState, MongoClusterStatus? clusterStatus, MongoClusterPublicNetworkAccess? publicNetworkAccess, HighAvailabilityProperties highAvailability, StorageProperties storage, ShardingProperties sharding, ComputeProperties compute, BackupProperties backup, DataApiProperties dataApi, IReadOnlyList privateEndpointConnections, IList previewFeatures, MongoClusterReplicationProperties replica, string infrastructureVersion, IDictionary serializedAdditionalRawData) { CreateMode = createMode; RestoreParameters = restoreParameters; @@ -88,6 +89,7 @@ internal MongoClusterProperties(MongoClusterCreateMode? createMode, MongoCluster Sharding = sharding; Compute = compute; Backup = backup; + DataApi = dataApi; PrivateEndpointConnections = privateEndpointConnections; PreviewFeatures = previewFeatures; Replica = replica; @@ -177,6 +179,20 @@ public string BackupEarliestRestoreTime get => Backup is null ? default : Backup.EarliestRestoreTime; } + /// The Data API properties of the mongo cluster. + internal DataApiProperties DataApi { get; set; } + /// The mode to indicate whether the Mongo Data API is enabled for a cluster. + public DataApiMode? DataApiMode + { + get => DataApi is null ? default : DataApi.Mode; + set + { + if (DataApi is null) + DataApi = new DataApiProperties(); + DataApi.Mode = value; + } + } + /// List of private endpoint connections. public IReadOnlyList PrivateEndpointConnections { get; } /// List of private endpoint connections. diff --git a/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/Models/MongoClusterUpdateProperties.Serialization.cs b/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/Models/MongoClusterUpdateProperties.Serialization.cs index 2ec12a14f6ac..5bd7b3fdd706 100644 --- a/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/Models/MongoClusterUpdateProperties.Serialization.cs +++ b/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/Models/MongoClusterUpdateProperties.Serialization.cs @@ -74,6 +74,11 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("backup"u8); writer.WriteObjectValue(Backup, options); } + if (Optional.IsDefined(DataApi)) + { + writer.WritePropertyName("dataApi"u8); + writer.WriteObjectValue(DataApi, options); + } if (Optional.IsCollectionDefined(PreviewFeatures)) { writer.WritePropertyName("previewFeatures"u8); @@ -129,6 +134,7 @@ internal static MongoClusterUpdateProperties DeserializeMongoClusterUpdateProper ShardingProperties sharding = default; ComputeProperties compute = default; BackupProperties backup = default; + DataApiProperties dataApi = default; IList previewFeatures = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); @@ -202,6 +208,15 @@ internal static MongoClusterUpdateProperties DeserializeMongoClusterUpdateProper backup = BackupProperties.DeserializeBackupProperties(property.Value, options); continue; } + if (property.NameEquals("dataApi"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + dataApi = DataApiProperties.DeserializeDataApiProperties(property.Value, options); + continue; + } if (property.NameEquals("previewFeatures"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -231,6 +246,7 @@ internal static MongoClusterUpdateProperties DeserializeMongoClusterUpdateProper sharding, compute, backup, + dataApi, previewFeatures ?? new ChangeTrackingList(), serializedAdditionalRawData); } diff --git a/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/Models/MongoClusterUpdateProperties.cs b/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/Models/MongoClusterUpdateProperties.cs index 182cdb763b42..6a5064ab3b83 100644 --- a/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/Models/MongoClusterUpdateProperties.cs +++ b/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/Models/MongoClusterUpdateProperties.cs @@ -60,9 +60,10 @@ public MongoClusterUpdateProperties() /// The sharding properties of the mongo cluster. /// The compute properties of the mongo cluster. /// The backup properties of the mongo cluster. + /// The Data API properties of the mongo cluster. /// List of private endpoint connections. /// Keeps track of any properties unknown to the library. - internal MongoClusterUpdateProperties(MongoClusterAdministratorProperties administrator, string serverVersion, MongoClusterPublicNetworkAccess? publicNetworkAccess, HighAvailabilityProperties highAvailability, StorageProperties storage, ShardingProperties sharding, ComputeProperties compute, BackupProperties backup, IList previewFeatures, IDictionary serializedAdditionalRawData) + internal MongoClusterUpdateProperties(MongoClusterAdministratorProperties administrator, string serverVersion, MongoClusterPublicNetworkAccess? publicNetworkAccess, HighAvailabilityProperties highAvailability, StorageProperties storage, ShardingProperties sharding, ComputeProperties compute, BackupProperties backup, DataApiProperties dataApi, IList previewFeatures, IDictionary serializedAdditionalRawData) { Administrator = administrator; ServerVersion = serverVersion; @@ -72,6 +73,7 @@ internal MongoClusterUpdateProperties(MongoClusterAdministratorProperties admini Sharding = sharding; Compute = compute; Backup = backup; + DataApi = dataApi; PreviewFeatures = previewFeatures; _serializedAdditionalRawData = serializedAdditionalRawData; } @@ -146,6 +148,20 @@ public string BackupEarliestRestoreTime get => Backup is null ? default : Backup.EarliestRestoreTime; } + /// The Data API properties of the mongo cluster. + internal DataApiProperties DataApi { get; set; } + /// The mode to indicate whether the Mongo Data API is enabled for a cluster. + public DataApiMode? DataApiMode + { + get => DataApi is null ? default : DataApi.Mode; + set + { + if (DataApi is null) + DataApi = new DataApiProperties(); + DataApi.Mode = value; + } + } + /// List of private endpoint connections. public IList PreviewFeatures { get; } } diff --git a/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/MongoClusterCollection.cs b/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/MongoClusterCollection.cs index c8d9efdce71d..fa42720d1dca 100644 --- a/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/MongoClusterCollection.cs +++ b/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/MongoClusterCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01-preview /// /// /// Resource @@ -114,7 +114,7 @@ public virtual async Task> CreateOrUpdateAsyn /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01-preview /// /// /// Resource @@ -163,7 +163,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil waitU /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01-preview /// /// /// Resource @@ -208,7 +208,7 @@ public virtual async Task> GetAsync(string mongoC /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01-preview /// /// /// Resource @@ -253,7 +253,7 @@ public virtual Response Get(string mongoClusterName, Cance /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01-preview /// /// /// Resource @@ -283,7 +283,7 @@ public virtual AsyncPageable GetAllAsync(CancellationToken /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01-preview /// /// /// Resource @@ -313,7 +313,7 @@ public virtual Pageable GetAll(CancellationToken cancellat /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01-preview /// /// /// Resource @@ -356,7 +356,7 @@ public virtual async Task> ExistsAsync(string mongoClusterName, C /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01-preview /// /// /// Resource @@ -399,7 +399,7 @@ public virtual Response Exists(string mongoClusterName, CancellationToken /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01-preview /// /// /// Resource @@ -444,7 +444,7 @@ public virtual async Task> GetIfExistsAsy /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01-preview /// /// /// Resource diff --git a/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/MongoClusterFirewallRuleCollection.cs b/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/MongoClusterFirewallRuleCollection.cs index 941f285a6a0f..339303e8b618 100644 --- a/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/MongoClusterFirewallRuleCollection.cs +++ b/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/MongoClusterFirewallRuleCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01-preview /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task> Create /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01-preview /// /// /// Resource @@ -162,7 +162,7 @@ public virtual ArmOperation CreateOrUpdate(Wai /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01-preview /// /// /// Resource @@ -207,7 +207,7 @@ public virtual async Task> GetAsync(s /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01-preview /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get(string firewallRul /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01-preview /// /// /// Resource @@ -282,7 +282,7 @@ public virtual AsyncPageable GetAllAsync(Cance /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01-preview /// /// /// Resource @@ -312,7 +312,7 @@ public virtual Pageable GetAll(CancellationTok /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01-preview /// /// /// Resource @@ -355,7 +355,7 @@ public virtual async Task> ExistsAsync(string firewallRuleName, C /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01-preview /// /// /// Resource @@ -398,7 +398,7 @@ public virtual Response Exists(string firewallRuleName, CancellationToken /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01-preview /// /// /// Resource @@ -443,7 +443,7 @@ public virtual async Task> Ge /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01-preview /// /// /// Resource diff --git a/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/MongoClusterFirewallRuleResource.cs b/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/MongoClusterFirewallRuleResource.cs index fd29a6f95f8d..54451a15a37b 100644 --- a/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/MongoClusterFirewallRuleResource.cs +++ b/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/MongoClusterFirewallRuleResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01-preview /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> GetAsync(C /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01-preview /// /// /// Resource @@ -181,7 +181,7 @@ public virtual Response Get(CancellationToken /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01-preview /// /// /// Resource @@ -223,7 +223,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01-preview /// /// /// Resource @@ -265,7 +265,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01-preview /// /// /// Resource @@ -311,7 +311,7 @@ public virtual async Task> Update /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01-preview /// /// /// Resource diff --git a/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/MongoClusterPrivateEndpointConnectionResource.cs b/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/MongoClusterPrivateEndpointConnectionResource.cs index 07c1a1c07d42..03d574d3fe68 100644 --- a/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/MongoClusterPrivateEndpointConnectionResource.cs +++ b/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/MongoClusterPrivateEndpointConnectionResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01-preview /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01-preview /// /// /// Resource @@ -181,7 +181,7 @@ public virtual Response Get(Cance /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01-preview /// /// /// Resource @@ -223,7 +223,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01-preview /// /// /// Resource @@ -265,7 +265,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01-preview /// /// /// Resource @@ -311,7 +311,7 @@ public virtual async Task /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01-preview /// /// /// Resource diff --git a/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/MongoClusterPrivateEndpointConnectionResourceCollection.cs b/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/MongoClusterPrivateEndpointConnectionResourceCollection.cs index 8136ff74d1d0..d6f6245505b1 100644 --- a/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/MongoClusterPrivateEndpointConnectionResourceCollection.cs +++ b/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/MongoClusterPrivateEndpointConnectionResourceCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01-preview /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01-preview /// /// /// Resource @@ -162,7 +162,7 @@ public virtual ArmOperation Creat /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01-preview /// /// /// Resource @@ -207,7 +207,7 @@ public virtual async Task /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01-preview /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get(strin /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01-preview /// /// /// Resource @@ -282,7 +282,7 @@ public virtual AsyncPageable GetA /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01-preview /// /// /// Resource @@ -312,7 +312,7 @@ public virtual Pageable GetAll(Ca /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01-preview /// /// /// Resource @@ -355,7 +355,7 @@ public virtual async Task> ExistsAsync(string privateEndpointConn /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01-preview /// /// /// Resource @@ -398,7 +398,7 @@ public virtual Response Exists(string privateEndpointConnectionName, Cance /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01-preview /// /// /// Resource @@ -443,7 +443,7 @@ public virtual async Task /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01-preview /// /// /// Resource diff --git a/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/MongoClusterResource.cs b/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/MongoClusterResource.cs index 6804c462bb87..fe2df69ff779 100644 --- a/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/MongoClusterResource.cs +++ b/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/MongoClusterResource.cs @@ -119,7 +119,7 @@ public virtual MongoClusterFirewallRuleCollection GetMongoClusterFirewallRules() /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01-preview /// /// /// Resource @@ -150,7 +150,7 @@ public virtual async Task> GetMongoCl /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01-preview /// /// /// Resource @@ -188,7 +188,7 @@ public virtual MongoClusterPrivateEndpointConnectionResourceCollection GetMongoC /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01-preview /// /// /// Resource @@ -219,7 +219,7 @@ public virtual async Task /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01-preview /// /// /// Resource @@ -250,7 +250,7 @@ public virtual Response GetMongoC /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01-preview /// /// /// Resource @@ -290,7 +290,7 @@ public virtual async Task> GetAsync(CancellationT /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01-preview /// /// /// Resource @@ -330,7 +330,7 @@ public virtual Response Get(CancellationToken cancellation /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01-preview /// /// /// Resource @@ -372,7 +372,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01-preview /// /// /// Resource @@ -414,7 +414,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01-preview /// /// /// Resource @@ -460,7 +460,7 @@ public virtual async Task> UpdateAsync(WaitUn /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01-preview /// /// /// Resource @@ -506,7 +506,7 @@ public virtual ArmOperation Update(WaitUntil waitUntil, Mo /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01-preview /// /// /// Resource @@ -544,7 +544,7 @@ public virtual async Task> GetConn /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01-preview /// /// /// Resource @@ -582,7 +582,7 @@ public virtual Response GetConnectionString /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01-preview /// /// /// Resource @@ -628,7 +628,7 @@ public virtual async Task PromoteAsync(WaitUntil waitUntil, Promot /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01-preview /// /// /// Resource @@ -674,7 +674,7 @@ public virtual ArmOperation Promote(WaitUntil waitUntil, PromoteReplicaContent c /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01-preview /// /// /// @@ -700,7 +700,7 @@ public virtual AsyncPageable GetPrivateLink /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01-preview /// /// /// @@ -726,7 +726,7 @@ public virtual Pageable GetPrivateLinks(Can /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01-preview /// /// /// @@ -752,7 +752,7 @@ public virtual AsyncPageable GetReplicasByParentAsync(Cance /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01-preview /// /// /// @@ -778,7 +778,7 @@ public virtual Pageable GetReplicasByParent(CancellationTok /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01-preview /// /// /// Resource @@ -840,7 +840,7 @@ public virtual async Task> AddTagAsync(string key /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01-preview /// /// /// Resource @@ -902,7 +902,7 @@ public virtual Response AddTag(string key, string value, C /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01-preview /// /// /// Resource @@ -959,7 +959,7 @@ public virtual async Task> SetTagsAsync(IDictiona /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01-preview /// /// /// Resource @@ -1016,7 +1016,7 @@ public virtual Response SetTags(IDictionary /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01-preview /// /// /// Resource @@ -1076,7 +1076,7 @@ public virtual async Task> RemoveTagAsync(string /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01-preview /// /// /// Resource diff --git a/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/RestOperations/FirewallRulesRestOperations.cs b/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/RestOperations/FirewallRulesRestOperations.cs index 4d0d6ac3ecd6..419ec8029a09 100644 --- a/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/RestOperations/FirewallRulesRestOperations.cs +++ b/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/RestOperations/FirewallRulesRestOperations.cs @@ -32,7 +32,7 @@ public FirewallRulesRestOperations(HttpPipeline pipeline, string applicationId, { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-07-01"; + _apiVersion = apiVersion ?? "2024-10-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/RestOperations/MongoClustersRestOperations.cs b/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/RestOperations/MongoClustersRestOperations.cs index 159287b991d5..6c1eaaa5ac4b 100644 --- a/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/RestOperations/MongoClustersRestOperations.cs +++ b/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/RestOperations/MongoClustersRestOperations.cs @@ -32,7 +32,7 @@ public MongoClustersRestOperations(HttpPipeline pipeline, string applicationId, { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-07-01"; + _apiVersion = apiVersion ?? "2024-10-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/RestOperations/PrivateEndpointConnectionsRestOperations.cs b/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/RestOperations/PrivateEndpointConnectionsRestOperations.cs index a25fc00275c0..d14984b59776 100644 --- a/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/RestOperations/PrivateEndpointConnectionsRestOperations.cs +++ b/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/RestOperations/PrivateEndpointConnectionsRestOperations.cs @@ -32,7 +32,7 @@ public PrivateEndpointConnectionsRestOperations(HttpPipeline pipeline, string ap { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-07-01"; + _apiVersion = apiVersion ?? "2024-10-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/RestOperations/PrivateLinksRestOperations.cs b/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/RestOperations/PrivateLinksRestOperations.cs index 04d9d0daf17a..f0b69726b397 100644 --- a/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/RestOperations/PrivateLinksRestOperations.cs +++ b/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/RestOperations/PrivateLinksRestOperations.cs @@ -32,7 +32,7 @@ public PrivateLinksRestOperations(HttpPipeline pipeline, string applicationId, U { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-07-01"; + _apiVersion = apiVersion ?? "2024-10-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/RestOperations/ReplicasRestOperations.cs b/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/RestOperations/ReplicasRestOperations.cs index c99a3c0e0d27..05ea7ed0de1b 100644 --- a/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/RestOperations/ReplicasRestOperations.cs +++ b/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/RestOperations/ReplicasRestOperations.cs @@ -32,7 +32,7 @@ public ReplicasRestOperations(HttpPipeline pipeline, string applicationId, Uri e { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-07-01"; + _apiVersion = apiVersion ?? "2024-10-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/mongocluster/Azure.ResourceManager.MongoCluster/tsp-location.yaml b/sdk/mongocluster/Azure.ResourceManager.MongoCluster/tsp-location.yaml index 1d7ced7e41b4..0f2422ebc438 100644 --- a/sdk/mongocluster/Azure.ResourceManager.MongoCluster/tsp-location.yaml +++ b/sdk/mongocluster/Azure.ResourceManager.MongoCluster/tsp-location.yaml @@ -1,3 +1,4 @@ -directory: specification\mongocluster\DocumentDB.MongoCluster.Management -commit: a105688c303677e1bd3b0968b977b924f2cbbcb8 -repo: Azure/azure-rest-api-specs \ No newline at end of file +directory: specification/mongocluster/DocumentDB.MongoCluster.Management +commit: 6e702986ee542ebd38d0ab2e2f2c00ab48a50b45 +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..825bf36a45fa --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/tsp-location.yaml @@ -0,0 +1,5 @@ +directory: specification/oracle/Oracle.Database.Management +commit: 6e702986ee542ebd38d0ab2e2f2c00ab48a50b45 +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/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/Configuration.json b/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/Configuration.json new file mode 100644 index 000000000000..aa258a8c76eb --- /dev/null +++ b/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/Configuration.json @@ -0,0 +1,12 @@ +{ + "output-folder": ".", + "namespace": "Azure.ResourceManager.PlaywrightTesting", + "library-name": "Azure.ResourceManager.PlaywrightTesting", + "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/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/tsp-location.yaml b/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/tsp-location.yaml index 1e5aac5f3b68..b97851c6f39a 100644 --- a/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/tsp-location.yaml +++ b/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/tsp-location.yaml @@ -1,3 +1,4 @@ -directory: specification/playwrighttesting -commit: 462574dbd02088c209bb1da3eef0d93f699e8de2 +directory: specification/playwrighttesting/PlaywrightTesting.Management +commit: 6e702986ee542ebd38d0ab2e2f2c00ab48a50b45 repo: Azure/azure-rest-api-specs +additionalDirectories: diff --git a/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/tspCodeModel.json b/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/tspCodeModel.json new file mode 100644 index 000000000000..d57eebbec02f --- /dev/null +++ b/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/tspCodeModel.json @@ -0,0 +1,7734 @@ +{ + "$id": "1", + "name": "Microsoft.AzurePlaywrightService", + "apiVersions": [ + "2024-12-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.PlaywrightTesting", + "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.PlaywrightTesting", + "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": "PlaywrightTestingEnablementStatus", + "crossLanguageDefinitionId": "Microsoft.AzurePlaywrightService.EnablementStatus", + "valueType": { + "$id": "15", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "16", + "kind": "enumvalue", + "name": "Enabled", + "value": "Enabled", + "valueType": { + "$id": "17", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "14" + }, + "doc": "The feature is Enabled.", + "decorators": [] + }, + { + "$id": "18", + "kind": "enumvalue", + "name": "Disabled", + "value": "Disabled", + "valueType": { + "$id": "19", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "14" + }, + "doc": "The feature is Disabled.", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.PlaywrightTesting", + "doc": "The enablement status of a feature.", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "20", + "kind": "enum", + "name": "PlaywrightTestingProvisioningState", + "crossLanguageDefinitionId": "Microsoft.AzurePlaywrightService.ProvisioningState", + "valueType": { + "$id": "21", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "22", + "kind": "enumvalue", + "name": "Succeeded", + "value": "Succeeded", + "valueType": { + "$id": "23", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "20" + }, + "doc": "Resource has been created.", + "decorators": [] + }, + { + "$id": "24", + "kind": "enumvalue", + "name": "Failed", + "value": "Failed", + "valueType": { + "$id": "25", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "20" + }, + "doc": "Resource creation failed.", + "decorators": [] + }, + { + "$id": "26", + "kind": "enumvalue", + "name": "Canceled", + "value": "Canceled", + "valueType": { + "$id": "27", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "20" + }, + "doc": "Resource creation was canceled.", + "decorators": [] + }, + { + "$id": "28", + "kind": "enumvalue", + "name": "Creating", + "value": "Creating", + "valueType": { + "$id": "29", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "20" + }, + "doc": "Creation in progress..", + "decorators": [] + }, + { + "$id": "30", + "kind": "enumvalue", + "name": "Deleting", + "value": "Deleting", + "valueType": { + "$id": "31", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "20" + }, + "doc": "Deletion in progress..", + "decorators": [] + }, + { + "$id": "32", + "kind": "enumvalue", + "name": "Accepted", + "value": "Accepted", + "valueType": { + "$id": "33", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "20" + }, + "doc": "Change accepted for processing..", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.PlaywrightTesting", + "doc": "The status of the current operation.", + "isFixed": false, + "isFlags": false, + "usage": "Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "34", + "kind": "enum", + "name": "createdByType", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.createdByType", + "valueType": { + "$id": "35", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "36", + "kind": "enumvalue", + "name": "User", + "value": "User", + "valueType": { + "$id": "37", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "34" + }, + "doc": "The entity was created by a user.", + "decorators": [] + }, + { + "$id": "38", + "kind": "enumvalue", + "name": "Application", + "value": "Application", + "valueType": { + "$id": "39", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "34" + }, + "doc": "The entity was created by an application.", + "decorators": [] + }, + { + "$id": "40", + "kind": "enumvalue", + "name": "ManagedIdentity", + "value": "ManagedIdentity", + "valueType": { + "$id": "41", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "34" + }, + "doc": "The entity was created by a managed identity.", + "decorators": [] + }, + { + "$id": "42", + "kind": "enumvalue", + "name": "Key", + "value": "Key", + "valueType": { + "$id": "43", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "34" + }, + "doc": "The entity was created by a key.", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.PlaywrightTesting", + "doc": "The kind of entity that created the resource.", + "isFixed": false, + "isFlags": false, + "usage": "Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "44", + "kind": "enum", + "name": "ResourceProvisioningState", + "crossLanguageDefinitionId": "Azure.ResourceManager.ResourceProvisioningState", + "valueType": { + "$id": "45", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "46", + "kind": "enumvalue", + "name": "Succeeded", + "value": "Succeeded", + "valueType": { + "$id": "47", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "44" + }, + "doc": "Resource has been created.", + "decorators": [] + }, + { + "$id": "48", + "kind": "enumvalue", + "name": "Failed", + "value": "Failed", + "valueType": { + "$id": "49", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "44" + }, + "doc": "Resource creation failed.", + "decorators": [] + }, + { + "$id": "50", + "kind": "enumvalue", + "name": "Canceled", + "value": "Canceled", + "valueType": { + "$id": "51", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "44" + }, + "doc": "Resource creation was canceled.", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.PlaywrightTesting", + "doc": "The provisioning state of a resource type.", + "isFixed": false, + "isFlags": false, + "usage": "LroPolling", + "decorators": [] + }, + { + "$id": "52", + "kind": "enum", + "name": "PlaywrightTestingNameUnavailableReason", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.CheckNameAvailabilityReason", + "valueType": { + "$id": "53", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "54", + "kind": "enumvalue", + "name": "Invalid", + "value": "Invalid", + "valueType": { + "$id": "55", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "52" + }, + "doc": "Name is invalid.", + "decorators": [] + }, + { + "$id": "56", + "kind": "enumvalue", + "name": "AlreadyExists", + "value": "AlreadyExists", + "valueType": { + "$id": "57", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "52" + }, + "doc": "Name already exists.", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.PlaywrightTesting", + "doc": "Possible reasons for a name not being available.", + "isFixed": false, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "58", + "kind": "enum", + "name": "PlaywrightTestingQuotaNames", + "crossLanguageDefinitionId": "Microsoft.AzurePlaywrightService.QuotaNames", + "valueType": { + "$id": "59", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "60", + "kind": "enumvalue", + "name": "ScalableExecution", + "value": "ScalableExecution", + "valueType": { + "$id": "61", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "58" + }, + "doc": "The quota details for scalable execution feature. When enabled, Playwright client workers can connect to cloud-hosted browsers. This can increase the number of parallel workers for a test run, significantly minimizing test completion durations.", + "decorators": [] + }, + { + "$id": "62", + "kind": "enumvalue", + "name": "Reporting", + "value": "Reporting", + "valueType": { + "$id": "63", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "58" + }, + "doc": "The quota details for reporting feature. When enabled, Playwright client will be able to upload and display test results, including artifacts like traces and screenshots, in the Playwright portal. This enables faster and more efficient troubleshooting.", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.PlaywrightTesting", + "doc": "The enum for quota name.", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json", + "decorators": [] + }, + { + "$id": "64", + "kind": "enum", + "name": "PlaywrightTestingFreeTrialState", + "crossLanguageDefinitionId": "Microsoft.AzurePlaywrightService.FreeTrialState", + "valueType": { + "$id": "65", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "66", + "kind": "enumvalue", + "name": "Active", + "value": "Active", + "valueType": { + "$id": "67", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "64" + }, + "doc": "The free-trial is Active.", + "decorators": [] + }, + { + "$id": "68", + "kind": "enumvalue", + "name": "Expired", + "value": "Expired", + "valueType": { + "$id": "69", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "64" + }, + "doc": "The free-trial is Expired.", + "decorators": [] + }, + { + "$id": "70", + "kind": "enumvalue", + "name": "NotEligible", + "value": "NotEligible", + "valueType": { + "$id": "71", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "64" + }, + "doc": "The free-trial is Not Eligible.", + "decorators": [] + }, + { + "$id": "72", + "kind": "enumvalue", + "name": "NotRegistered", + "value": "NotRegistered", + "valueType": { + "$id": "73", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "64" + }, + "doc": "The free-trial is Not Registered.", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.PlaywrightTesting", + "doc": "The free-trial state.", + "isFixed": false, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "74", + "kind": "enum", + "name": "PlaywrightTestingOfferingType", + "crossLanguageDefinitionId": "Microsoft.AzurePlaywrightService.OfferingType", + "valueType": { + "$id": "75", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "76", + "kind": "enumvalue", + "name": "NotApplicable", + "value": "NotApplicable", + "valueType": { + "$id": "77", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "74" + }, + "doc": "The offeringType is NotApplicable.", + "decorators": [] + }, + { + "$id": "78", + "kind": "enumvalue", + "name": "PrivatePreview", + "value": "PrivatePreview", + "valueType": { + "$id": "79", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "74" + }, + "doc": "The offeringType is PrivatePreview.", + "decorators": [] + }, + { + "$id": "80", + "kind": "enumvalue", + "name": "PublicPreview", + "value": "PublicPreview", + "valueType": { + "$id": "81", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "74" + }, + "doc": "The offeringType is PublicPreview.", + "decorators": [] + }, + { + "$id": "82", + "kind": "enumvalue", + "name": "GeneralAvailability", + "value": "GeneralAvailability", + "valueType": { + "$id": "83", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "74" + }, + "doc": "The offeringType is GeneralAvailability.", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.PlaywrightTesting", + "doc": "Offering type state.", + "isFixed": false, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "84", + "kind": "enum", + "name": "Versions", + "crossLanguageDefinitionId": "Microsoft.AzurePlaywrightService.Versions", + "valueType": { + "$id": "85", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "86", + "kind": "enumvalue", + "name": "2024-12-01", + "value": "2024-12-01", + "valueType": { + "$id": "87", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "84" + }, + "doc": "2024-12-01 version", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.PlaywrightTesting", + "doc": "Microsoft.AzurePlaywrightService Management API Versions.", + "isFixed": true, + "isFlags": false, + "usage": "ApiVersionEnum", + "decorators": [] + } + ], + "models": [ + { + "$id": "88", + "kind": "model", + "name": "OperationListResult", + "namespace": "Azure.ResourceManager.PlaywrightTesting", + "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": "89", + "kind": "property", + "name": "value", + "serializedName": "value", + "doc": "The Operation items on this page", + "type": { + "$id": "90", + "kind": "array", + "name": "ArrayOperation", + "valueType": { + "$id": "91", + "kind": "model", + "name": "Operation", + "namespace": "Azure.ResourceManager.PlaywrightTesting", + "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": "92", + "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": "93", + "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": "94", + "json": { + "$id": "95", + "name": "name" + } + } + }, + { + "$id": "96", + "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": "97", + "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": "98", + "json": { + "$id": "99", + "name": "isDataAction" + } + } + }, + { + "$id": "100", + "kind": "property", + "name": "display", + "serializedName": "display", + "doc": "Localized display information for this particular operation.", + "type": { + "$id": "101", + "kind": "model", + "name": "OperationDisplay", + "namespace": "Azure.ResourceManager.PlaywrightTesting", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.OperationDisplay", + "usage": "Output,Json", + "doc": "Localized display information for and operation.", + "decorators": [], + "properties": [ + { + "$id": "102", + "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": "103", + "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": "104", + "json": { + "$id": "105", + "name": "provider" + } + } + }, + { + "$id": "106", + "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": "107", + "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": "108", + "json": { + "$id": "109", + "name": "resource" + } + } + }, + { + "$id": "110", + "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": "111", + "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": "112", + "json": { + "$id": "113", + "name": "operation" + } + } + }, + { + "$id": "114", + "kind": "property", + "name": "description", + "serializedName": "description", + "doc": "The short, localized friendly description of the operation; suitable for tool tips and detailed views.", + "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.description", + "serializationOptions": { + "$id": "116", + "json": { + "$id": "117", + "name": "description" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.Operation.display", + "serializationOptions": { + "$id": "118", + "json": { + "$id": "119", + "name": "display" + } + } + }, + { + "$id": "120", + "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": "121", + "json": { + "$id": "122", + "name": "origin" + } + } + }, + { + "$id": "123", + "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": "124", + "json": { + "$id": "125", + "name": "actionType" + } + } + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.OperationListResult.value", + "serializationOptions": { + "$id": "126", + "json": { + "$id": "127", + "name": "value" + } + } + }, + { + "$id": "128", + "kind": "property", + "name": "nextLink", + "serializedName": "nextLink", + "doc": "The link to the next page of items", + "type": { + "$id": "129", + "kind": "url", + "name": "ResourceLocation", + "crossLanguageDefinitionId": "TypeSpec.Rest.ResourceLocation", + "baseType": { + "$id": "130", + "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": "131", + "json": { + "$id": "132", + "name": "nextLink" + } + } + } + ] + }, + { + "$ref": "91" + }, + { + "$ref": "101" + }, + { + "$id": "133", + "kind": "model", + "name": "ErrorResponse", + "namespace": "Azure.ResourceManager.PlaywrightTesting", + "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": "134", + "kind": "property", + "name": "error", + "serializedName": "error", + "doc": "The error object.", + "type": { + "$id": "135", + "kind": "model", + "name": "ErrorDetail", + "namespace": "Azure.ResourceManager.PlaywrightTesting", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorDetail", + "usage": "Json,Exception,LroPolling", + "doc": "The error detail.", + "decorators": [], + "properties": [ + { + "$id": "136", + "kind": "property", + "name": "code", + "serializedName": "code", + "doc": "The error code.", + "type": { + "$id": "137", + "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": "138", + "json": { + "$id": "139", + "name": "code" + } + } + }, + { + "$id": "140", + "kind": "property", + "name": "message", + "serializedName": "message", + "doc": "The error message.", + "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.message", + "serializationOptions": { + "$id": "142", + "json": { + "$id": "143", + "name": "message" + } + } + }, + { + "$id": "144", + "kind": "property", + "name": "target", + "serializedName": "target", + "doc": "The error target.", + "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.target", + "serializationOptions": { + "$id": "146", + "json": { + "$id": "147", + "name": "target" + } + } + }, + { + "$id": "148", + "kind": "property", + "name": "details", + "serializedName": "details", + "doc": "The error details.", + "type": { + "$id": "149", + "kind": "array", + "name": "ArrayErrorDetail", + "valueType": { + "$ref": "135" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorDetail.details", + "serializationOptions": { + "$id": "150", + "json": { + "$id": "151", + "name": "details" + } + } + }, + { + "$id": "152", + "kind": "property", + "name": "additionalInfo", + "serializedName": "additionalInfo", + "doc": "The error additional info.", + "type": { + "$id": "153", + "kind": "array", + "name": "ArrayErrorAdditionalInfo", + "valueType": { + "$id": "154", + "kind": "model", + "name": "ErrorAdditionalInfo", + "namespace": "Azure.ResourceManager.PlaywrightTesting", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorAdditionalInfo", + "usage": "Json,Exception,LroPolling", + "doc": "The resource management error additional info.", + "decorators": [], + "properties": [ + { + "$id": "155", + "kind": "property", + "name": "type", + "serializedName": "type", + "doc": "The additional info type.", + "type": { + "$id": "156", + "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": "157", + "json": { + "$id": "158", + "name": "type" + } + } + }, + { + "$id": "159", + "kind": "property", + "name": "info", + "serializedName": "info", + "doc": "The additional info.", + "type": { + "$id": "160", + "kind": "model", + "name": "ErrorAdditionalInfoInfo", + "namespace": "Azure.ResourceManager.PlaywrightTesting", + "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": "161", + "json": { + "$id": "162", + "name": "info" + } + } + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorDetail.additionalInfo", + "serializationOptions": { + "$id": "163", + "json": { + "$id": "164", + "name": "additionalInfo" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorResponse.error", + "serializationOptions": { + "$id": "165", + "json": { + "$id": "166", + "name": "error" + } + } + } + ] + }, + { + "$ref": "135" + }, + { + "$ref": "154" + }, + { + "$ref": "160" + }, + { + "$id": "167", + "kind": "model", + "name": "PlaywrightTestingAccount", + "namespace": "Azure.ResourceManager.PlaywrightTesting", + "crossLanguageDefinitionId": "Microsoft.AzurePlaywrightService.Account", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "doc": "A Playwright service account resource.", + "decorators": [], + "baseModel": { + "$id": "168", + "kind": "model", + "name": "TrackedResource", + "namespace": "Azure.ResourceManager.PlaywrightTesting", + "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": "169", + "kind": "model", + "name": "Resource", + "namespace": "Azure.ResourceManager.PlaywrightTesting", + "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": "170", + "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": "171", + "kind": "string", + "name": "armResourceIdentifier", + "crossLanguageDefinitionId": "Azure.Core.armResourceIdentifier", + "baseType": { + "$id": "172", + "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": "173", + "json": { + "$id": "174", + "name": "id" + } + } + }, + { + "$id": "175", + "kind": "property", + "name": "name", + "serializedName": "name", + "doc": "The name of the resource", + "type": { + "$id": "176", + "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": "177", + "json": { + "$id": "178", + "name": "name" + } + } + }, + { + "$id": "179", + "kind": "property", + "name": "type", + "serializedName": "type", + "doc": "The type of the resource. E.g. \"Microsoft.Compute/virtualMachines\" or \"Microsoft.Storage/storageAccounts\"", + "type": { + "$id": "180", + "kind": "string", + "name": "armResourceType", + "crossLanguageDefinitionId": "Azure.Core.armResourceType", + "baseType": { + "$id": "181", + "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": "182", + "json": { + "$id": "183", + "name": "type" + } + } + }, + { + "$id": "184", + "kind": "property", + "name": "systemData", + "serializedName": "systemData", + "doc": "Azure Resource Manager metadata containing createdBy and modifiedBy information.", + "type": { + "$id": "185", + "kind": "model", + "name": "SystemData", + "namespace": "Azure.ResourceManager.PlaywrightTesting", + "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": "186", + "kind": "property", + "name": "createdBy", + "serializedName": "createdBy", + "doc": "The identity that created the resource.", + "type": { + "$id": "187", + "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": "188", + "json": { + "$id": "189", + "name": "createdBy" + } + } + }, + { + "$id": "190", + "kind": "property", + "name": "createdByType", + "serializedName": "createdByType", + "doc": "The type of identity that created the resource.", + "type": { + "$ref": "34" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.SystemData.createdByType", + "serializationOptions": { + "$id": "191", + "json": { + "$id": "192", + "name": "createdByType" + } + } + }, + { + "$id": "193", + "kind": "property", + "name": "createdAt", + "serializedName": "createdAt", + "doc": "The timestamp of resource creation (UTC).", + "type": { + "$id": "194", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "rfc3339", + "wireType": { + "$id": "195", + "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": "196", + "json": { + "$id": "197", + "name": "createdAt" + } + } + }, + { + "$id": "198", + "kind": "property", + "name": "lastModifiedBy", + "serializedName": "lastModifiedBy", + "doc": "The identity that last modified the resource.", + "type": { + "$id": "199", + "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": "200", + "json": { + "$id": "201", + "name": "lastModifiedBy" + } + } + }, + { + "$id": "202", + "kind": "property", + "name": "lastModifiedByType", + "serializedName": "lastModifiedByType", + "doc": "The type of identity that last modified the resource.", + "type": { + "$ref": "34" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.SystemData.lastModifiedByType", + "serializationOptions": { + "$id": "203", + "json": { + "$id": "204", + "name": "lastModifiedByType" + } + } + }, + { + "$id": "205", + "kind": "property", + "name": "lastModifiedAt", + "serializedName": "lastModifiedAt", + "doc": "The timestamp of resource last modification (UTC)", + "type": { + "$id": "206", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "rfc3339", + "wireType": { + "$id": "207", + "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": "208", + "json": { + "$id": "209", + "name": "lastModifiedAt" + } + } + } + ] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.Resource.systemData", + "serializationOptions": { + "$id": "210", + "json": { + "$id": "211", + "name": "systemData" + } + } + } + ] + }, + "properties": [ + { + "$id": "212", + "kind": "property", + "name": "tags", + "serializedName": "tags", + "doc": "Resource tags.", + "type": { + "$id": "213", + "kind": "dict", + "keyType": { + "$id": "214", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "valueType": { + "$id": "215", + "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": "216", + "json": { + "$id": "217", + "name": "tags" + } + } + }, + { + "$id": "218", + "kind": "property", + "name": "location", + "serializedName": "location", + "doc": "The geo-location where the resource lives", + "type": { + "$id": "219", + "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": "220", + "json": { + "$id": "221", + "name": "location" + } + } + } + ] + }, + "properties": [ + { + "$id": "222", + "kind": "property", + "name": "properties", + "serializedName": "properties", + "doc": "The resource-specific properties for this resource.", + "type": { + "$id": "223", + "kind": "model", + "name": "PlaywrightTestingAccountProperties", + "namespace": "Azure.ResourceManager.PlaywrightTesting", + "crossLanguageDefinitionId": "Microsoft.AzurePlaywrightService.AccountProperties", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "doc": "Account resource properties.", + "decorators": [], + "properties": [ + { + "$id": "224", + "kind": "property", + "name": "dashboardUri", + "serializedName": "dashboardUri", + "doc": "The Playwright testing dashboard URI for the account resource.", + "type": { + "$id": "225", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzurePlaywrightService.AccountProperties.dashboardUri", + "serializationOptions": { + "$id": "226", + "json": { + "$id": "227", + "name": "dashboardUri" + } + } + }, + { + "$id": "228", + "kind": "property", + "name": "regionalAffinity", + "serializedName": "regionalAffinity", + "doc": "This property sets the connection region for Playwright client workers to cloud-hosted browsers. If enabled, workers connect to browsers in the closest Azure region, ensuring lower latency. If disabled, workers connect to browsers in the Azure region in which the workspace was initially created.", + "type": { + "$ref": "14" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzurePlaywrightService.AccountProperties.regionalAffinity", + "serializationOptions": { + "$id": "229", + "json": { + "$id": "230", + "name": "regionalAffinity" + } + } + }, + { + "$id": "231", + "kind": "property", + "name": "scalableExecution", + "serializedName": "scalableExecution", + "doc": "When enabled, Playwright client workers can connect to cloud-hosted browsers. This can increase the number of parallel workers for a test run, significantly minimizing test completion durations.", + "type": { + "$ref": "14" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzurePlaywrightService.AccountProperties.scalableExecution", + "serializationOptions": { + "$id": "232", + "json": { + "$id": "233", + "name": "scalableExecution" + } + } + }, + { + "$id": "234", + "kind": "property", + "name": "reporting", + "serializedName": "reporting", + "doc": "When enabled, this feature allows the workspace to upload and display test results, including artifacts like traces and screenshots, in the Playwright portal. This enables faster and more efficient troubleshooting.", + "type": { + "$ref": "14" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzurePlaywrightService.AccountProperties.reporting", + "serializationOptions": { + "$id": "235", + "json": { + "$id": "236", + "name": "reporting" + } + } + }, + { + "$id": "237", + "kind": "property", + "name": "localAuth", + "serializedName": "localAuth", + "doc": "When enabled, this feature allows the workspace to use local auth (through service access token) for executing operations.", + "type": { + "$ref": "14" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzurePlaywrightService.AccountProperties.localAuth", + "serializationOptions": { + "$id": "238", + "json": { + "$id": "239", + "name": "localAuth" + } + } + }, + { + "$id": "240", + "kind": "property", + "name": "provisioningState", + "serializedName": "provisioningState", + "doc": "The status of the last operation.", + "type": { + "$ref": "20" + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzurePlaywrightService.AccountProperties.provisioningState", + "serializationOptions": { + "$id": "241", + "json": { + "$id": "242", + "name": "provisioningState" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzurePlaywrightService.Account.properties", + "serializationOptions": { + "$id": "243", + "json": { + "$id": "244", + "name": "properties" + } + } + } + ] + }, + { + "$ref": "223" + }, + { + "$ref": "168" + }, + { + "$ref": "169" + }, + { + "$ref": "185" + }, + { + "$id": "245", + "kind": "model", + "name": "AccountUpdate", + "namespace": "Azure.ResourceManager.PlaywrightTesting", + "crossLanguageDefinitionId": "Azure.ResourceManager.Foundations.ResourceUpdateModel", + "usage": "Input,Json", + "doc": "The type used for update operations of the Account.", + "decorators": [], + "properties": [ + { + "$id": "246", + "kind": "property", + "name": "tags", + "serializedName": "tags", + "doc": "Resource tags.", + "type": { + "$id": "247", + "kind": "dict", + "keyType": { + "$id": "248", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "valueType": { + "$id": "249", + "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": "250", + "json": { + "$id": "251", + "name": "tags" + } + } + }, + { + "$id": "252", + "kind": "property", + "name": "properties", + "serializedName": "properties", + "doc": "The resource-specific properties for this resource.", + "type": { + "$id": "253", + "kind": "model", + "name": "AccountUpdateProperties", + "namespace": "Azure.ResourceManager.PlaywrightTesting", + "crossLanguageDefinitionId": "Azure.ResourceManager.Foundations.ResourceUpdateModelProperties", + "usage": "Input,Json", + "doc": "The updatable properties of the Account.", + "decorators": [], + "properties": [ + { + "$id": "254", + "kind": "property", + "name": "regionalAffinity", + "serializedName": "regionalAffinity", + "doc": "This property sets the connection region for Playwright client workers to cloud-hosted browsers. If enabled, workers connect to browsers in the closest Azure region, ensuring lower latency. If disabled, workers connect to browsers in the Azure region in which the workspace was initially created.", + "type": { + "$ref": "14" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.Foundations.ResourceUpdateModelProperties.regionalAffinity", + "serializationOptions": { + "$id": "255", + "json": { + "$id": "256", + "name": "regionalAffinity" + } + } + }, + { + "$id": "257", + "kind": "property", + "name": "scalableExecution", + "serializedName": "scalableExecution", + "doc": "When enabled, Playwright client workers can connect to cloud-hosted browsers. This can increase the number of parallel workers for a test run, significantly minimizing test completion durations.", + "type": { + "$ref": "14" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.Foundations.ResourceUpdateModelProperties.scalableExecution", + "serializationOptions": { + "$id": "258", + "json": { + "$id": "259", + "name": "scalableExecution" + } + } + }, + { + "$id": "260", + "kind": "property", + "name": "reporting", + "serializedName": "reporting", + "doc": "When enabled, this feature allows the workspace to upload and display test results, including artifacts like traces and screenshots, in the Playwright portal. This enables faster and more efficient troubleshooting.", + "type": { + "$ref": "14" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.Foundations.ResourceUpdateModelProperties.reporting", + "serializationOptions": { + "$id": "261", + "json": { + "$id": "262", + "name": "reporting" + } + } + }, + { + "$id": "263", + "kind": "property", + "name": "localAuth", + "serializedName": "localAuth", + "doc": "When enabled, this feature allows the workspace to use local auth (through service access token) for executing operations.", + "type": { + "$ref": "14" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.Foundations.ResourceUpdateModelProperties.localAuth", + "serializationOptions": { + "$id": "264", + "json": { + "$id": "265", + "name": "localAuth" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.Foundations.ResourceUpdateModel.properties", + "serializationOptions": { + "$id": "266", + "json": { + "$id": "267", + "name": "properties" + } + } + } + ] + }, + { + "$ref": "253" + }, + { + "$id": "268", + "kind": "model", + "name": "ArmOperationStatusResourceProvisioningState", + "namespace": "Azure.ResourceManager.PlaywrightTesting", + "crossLanguageDefinitionId": "Azure.ResourceManager.ArmOperationStatus", + "usage": "LroPolling", + "doc": "Standard Azure Resource Manager operation status response", + "decorators": [], + "properties": [ + { + "$id": "269", + "kind": "property", + "name": "status", + "serializedName": "status", + "doc": "The operation status", + "type": { + "$ref": "44" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.ArmOperationStatus.status", + "serializationOptions": { + "$id": "270", + "json": { + "$id": "271", + "name": "status" + } + } + }, + { + "$id": "272", + "kind": "property", + "name": "name", + "serializedName": "name", + "doc": "The name of the operationStatus resource", + "type": { + "$id": "273", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.ArmOperationStatus.name", + "serializationOptions": { + "$id": "274", + "json": { + "$id": "275", + "name": "name" + } + } + }, + { + "$id": "276", + "kind": "property", + "name": "startTime", + "serializedName": "startTime", + "doc": "Operation start time", + "type": { + "$id": "277", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "rfc3339", + "wireType": { + "$id": "278", + "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": "279", + "json": { + "$id": "280", + "name": "startTime" + } + } + }, + { + "$id": "281", + "kind": "property", + "name": "endTime", + "serializedName": "endTime", + "doc": "Operation complete time", + "type": { + "$id": "282", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "rfc3339", + "wireType": { + "$id": "283", + "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": "284", + "json": { + "$id": "285", + "name": "endTime" + } + } + }, + { + "$id": "286", + "kind": "property", + "name": "percentComplete", + "serializedName": "percentComplete", + "doc": "The progress made toward completing the operation", + "type": { + "$id": "287", + "kind": "float64", + "name": "float64", + "crossLanguageDefinitionId": "TypeSpec.float64", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.ArmOperationStatus.percentComplete", + "serializationOptions": { + "$id": "288", + "json": { + "$id": "289", + "name": "percentComplete" + } + } + }, + { + "$id": "290", + "kind": "property", + "name": "error", + "serializedName": "error", + "doc": "Errors that occurred if the operation ended with Canceled or Failed status", + "type": { + "$ref": "135" + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.ArmOperationStatus.error", + "serializationOptions": { + "$id": "291", + "json": { + "$id": "292", + "name": "error" + } + } + } + ] + }, + { + "$id": "293", + "kind": "model", + "name": "AccountListResult", + "namespace": "Azure.ResourceManager.PlaywrightTesting", + "crossLanguageDefinitionId": "Azure.ResourceManager.ResourceListResult", + "usage": "Output,Json", + "doc": "The response of a Account list operation.", + "decorators": [], + "properties": [ + { + "$id": "294", + "kind": "property", + "name": "value", + "serializedName": "value", + "doc": "The Account items on this page", + "type": { + "$id": "295", + "kind": "array", + "name": "ArrayAccount", + "valueType": { + "$ref": "167" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.ResourceListResult.value", + "serializationOptions": { + "$id": "296", + "json": { + "$id": "297", + "name": "value" + } + } + }, + { + "$id": "298", + "kind": "property", + "name": "nextLink", + "serializedName": "nextLink", + "doc": "The link to the next page of items", + "type": { + "$id": "299", + "kind": "url", + "name": "ResourceLocation", + "crossLanguageDefinitionId": "TypeSpec.Rest.ResourceLocation", + "baseType": { + "$id": "300", + "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": "301", + "json": { + "$id": "302", + "name": "nextLink" + } + } + } + ] + }, + { + "$id": "303", + "kind": "model", + "name": "PlaywrightTestingNameAvailabilityRequest", + "namespace": "Azure.ResourceManager.PlaywrightTesting", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.CheckNameAvailabilityRequest", + "usage": "Input,Json", + "doc": "The check availability request body.", + "decorators": [], + "properties": [ + { + "$id": "304", + "kind": "property", + "name": "name", + "serializedName": "name", + "doc": "The name of the resource for which availability needs to be checked.", + "type": { + "$id": "305", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.CheckNameAvailabilityRequest.name", + "serializationOptions": { + "$id": "306", + "json": { + "$id": "307", + "name": "name" + } + } + }, + { + "$id": "308", + "kind": "property", + "name": "type", + "serializedName": "type", + "doc": "The resource type.", + "type": { + "$id": "309", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.CheckNameAvailabilityRequest.type", + "serializationOptions": { + "$id": "310", + "json": { + "$id": "311", + "name": "type" + } + } + } + ] + }, + { + "$id": "312", + "kind": "model", + "name": "PlaywrightTestingNameAvailabilityResult", + "namespace": "Azure.ResourceManager.PlaywrightTesting", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.CheckNameAvailabilityResponse", + "usage": "Output,Json", + "doc": "The check availability result.", + "decorators": [], + "properties": [ + { + "$id": "313", + "kind": "property", + "name": "IsNameAvailable", + "serializedName": "nameAvailable", + "doc": "Indicates if the resource name is available.", + "type": { + "$id": "314", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.CheckNameAvailabilityResponse.nameAvailable", + "serializationOptions": { + "$id": "315", + "json": { + "$id": "316", + "name": "nameAvailable" + } + } + }, + { + "$id": "317", + "kind": "property", + "name": "reason", + "serializedName": "reason", + "doc": "The reason why the given name is not available.", + "type": { + "$ref": "52" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.CheckNameAvailabilityResponse.reason", + "serializationOptions": { + "$id": "318", + "json": { + "$id": "319", + "name": "reason" + } + } + }, + { + "$id": "320", + "kind": "property", + "name": "message", + "serializedName": "message", + "doc": "Detailed reason why the given name is not available.", + "type": { + "$id": "321", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.CheckNameAvailabilityResponse.message", + "serializationOptions": { + "$id": "322", + "json": { + "$id": "323", + "name": "message" + } + } + } + ] + }, + { + "$id": "324", + "kind": "model", + "name": "PlaywrightTestingQuotas", + "namespace": "Azure.ResourceManager.PlaywrightTesting", + "crossLanguageDefinitionId": "Microsoft.AzurePlaywrightService.Quota", + "usage": "Output,Json", + "doc": "A subscription quota resource.", + "decorators": [], + "baseModel": { + "$id": "325", + "kind": "model", + "name": "ProxyResource", + "namespace": "Azure.ResourceManager.PlaywrightTesting", + "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": "169" + }, + "properties": [] + }, + "properties": [ + { + "$id": "326", + "kind": "property", + "name": "properties", + "serializedName": "properties", + "doc": "The resource-specific properties for this resource.", + "type": { + "$id": "327", + "kind": "model", + "name": "PlaywrightTestingQuotaProperties", + "namespace": "Azure.ResourceManager.PlaywrightTesting", + "crossLanguageDefinitionId": "Microsoft.AzurePlaywrightService.QuotaProperties", + "usage": "Output,Json", + "doc": "The subscription quota resource properties.", + "decorators": [], + "properties": [ + { + "$id": "328", + "kind": "property", + "name": "freeTrial", + "serializedName": "freeTrial", + "doc": "The subscription quota resource free-trial properties.", + "type": { + "$id": "329", + "kind": "model", + "name": "PlaywrightTestingFreeTrialProperties", + "namespace": "Azure.ResourceManager.PlaywrightTesting", + "crossLanguageDefinitionId": "Microsoft.AzurePlaywrightService.FreeTrialProperties", + "usage": "Output,Json", + "doc": "The subscription quota resource free-trial properties.", + "decorators": [], + "properties": [ + { + "$id": "330", + "kind": "property", + "name": "accountId", + "serializedName": "accountId", + "doc": "The Playwright service account id.", + "type": { + "$id": "331", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzurePlaywrightService.FreeTrialProperties.accountId", + "serializationOptions": { + "$id": "332", + "json": { + "$id": "333", + "name": "accountId" + } + } + }, + { + "$id": "334", + "kind": "property", + "name": "state", + "serializedName": "state", + "doc": "The free-trial state.", + "type": { + "$ref": "64" + }, + "optional": false, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzurePlaywrightService.FreeTrialProperties.state", + "serializationOptions": { + "$id": "335", + "json": { + "$id": "336", + "name": "state" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzurePlaywrightService.QuotaProperties.freeTrial", + "serializationOptions": { + "$id": "337", + "json": { + "$id": "338", + "name": "freeTrial" + } + } + }, + { + "$id": "339", + "kind": "property", + "name": "offeringType", + "serializedName": "offeringType", + "doc": "Indicates the offering type for the subscription.", + "type": { + "$ref": "74" + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzurePlaywrightService.QuotaProperties.offeringType", + "serializationOptions": { + "$id": "340", + "json": { + "$id": "341", + "name": "offeringType" + } + } + }, + { + "$id": "342", + "kind": "property", + "name": "provisioningState", + "serializedName": "provisioningState", + "doc": "The status of the last operation.", + "type": { + "$ref": "20" + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzurePlaywrightService.QuotaProperties.provisioningState", + "serializationOptions": { + "$id": "343", + "json": { + "$id": "344", + "name": "provisioningState" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzurePlaywrightService.Quota.properties", + "serializationOptions": { + "$id": "345", + "json": { + "$id": "346", + "name": "properties" + } + } + } + ] + }, + { + "$ref": "327" + }, + { + "$ref": "329" + }, + { + "$ref": "325" + }, + { + "$id": "347", + "kind": "model", + "name": "QuotaListResult", + "namespace": "Azure.ResourceManager.PlaywrightTesting", + "crossLanguageDefinitionId": "Azure.ResourceManager.ResourceListResult", + "usage": "Output,Json", + "doc": "The response of a Quota list operation.", + "decorators": [], + "properties": [ + { + "$id": "348", + "kind": "property", + "name": "value", + "serializedName": "value", + "doc": "The Quota items on this page", + "type": { + "$id": "349", + "kind": "array", + "name": "ArrayQuota", + "valueType": { + "$ref": "324" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.ResourceListResult.value", + "serializationOptions": { + "$id": "350", + "json": { + "$id": "351", + "name": "value" + } + } + }, + { + "$id": "352", + "kind": "property", + "name": "nextLink", + "serializedName": "nextLink", + "doc": "The link to the next page of items", + "type": { + "$id": "353", + "kind": "url", + "name": "ResourceLocation", + "crossLanguageDefinitionId": "TypeSpec.Rest.ResourceLocation", + "baseType": { + "$id": "354", + "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": "355", + "json": { + "$id": "356", + "name": "nextLink" + } + } + } + ] + }, + { + "$id": "357", + "kind": "model", + "name": "PlaywrightTestingAccountQuotas", + "namespace": "Azure.ResourceManager.PlaywrightTesting", + "crossLanguageDefinitionId": "Microsoft.AzurePlaywrightService.AccountQuota", + "usage": "Output,Json", + "doc": "A quota resource for a Playwright service account.", + "decorators": [], + "baseModel": { + "$ref": "325" + }, + "properties": [ + { + "$id": "358", + "kind": "property", + "name": "properties", + "serializedName": "properties", + "doc": "The resource-specific properties for this resource.", + "type": { + "$id": "359", + "kind": "model", + "name": "PlaywrightTestingAccountQuotaProperties", + "namespace": "Azure.ResourceManager.PlaywrightTesting", + "crossLanguageDefinitionId": "Microsoft.AzurePlaywrightService.AccountQuotaProperties", + "usage": "Output,Json", + "doc": "The Playwright service account quota resource properties.", + "decorators": [], + "properties": [ + { + "$id": "360", + "kind": "property", + "name": "freeTrial", + "serializedName": "freeTrial", + "doc": "The Playwright service account quota resource free-trial properties.", + "type": { + "$id": "361", + "kind": "model", + "name": "PlaywrightTestingAccountFreeTrialProperties", + "namespace": "Azure.ResourceManager.PlaywrightTesting", + "crossLanguageDefinitionId": "Microsoft.AzurePlaywrightService.AccountFreeTrialProperties", + "usage": "Output,Json", + "doc": "The Playwright service account quota resource free-trial properties.", + "decorators": [], + "properties": [ + { + "$id": "362", + "kind": "property", + "name": "createdAt", + "serializedName": "createdAt", + "doc": "The free-trial createdAt utcDateTime.", + "type": { + "$id": "363", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "rfc3339", + "wireType": { + "$id": "364", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + }, + "optional": false, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzurePlaywrightService.AccountFreeTrialProperties.createdAt", + "serializationOptions": { + "$id": "365", + "json": { + "$id": "366", + "name": "createdAt" + } + } + }, + { + "$id": "367", + "kind": "property", + "name": "expiryAt", + "serializedName": "expiryAt", + "doc": "The free-trial expiryAt utcDateTime.", + "type": { + "$id": "368", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "rfc3339", + "wireType": { + "$id": "369", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + }, + "optional": false, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzurePlaywrightService.AccountFreeTrialProperties.expiryAt", + "serializationOptions": { + "$id": "370", + "json": { + "$id": "371", + "name": "expiryAt" + } + } + }, + { + "$id": "372", + "kind": "property", + "name": "allocatedValue", + "serializedName": "allocatedValue", + "doc": "The free-trial allocated limit value eg. allocated free minutes.", + "type": { + "$id": "373", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzurePlaywrightService.AccountFreeTrialProperties.allocatedValue", + "serializationOptions": { + "$id": "374", + "json": { + "$id": "375", + "name": "allocatedValue" + } + } + }, + { + "$id": "376", + "kind": "property", + "name": "usedValue", + "serializedName": "usedValue", + "doc": "The free-trial used value eg. used free minutes.", + "type": { + "$id": "377", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzurePlaywrightService.AccountFreeTrialProperties.usedValue", + "serializationOptions": { + "$id": "378", + "json": { + "$id": "379", + "name": "usedValue" + } + } + }, + { + "$id": "380", + "kind": "property", + "name": "percentageUsed", + "serializedName": "percentageUsed", + "doc": "The free-trial percentage used.", + "type": { + "$id": "381", + "kind": "float32", + "name": "float32", + "crossLanguageDefinitionId": "TypeSpec.float32", + "decorators": [] + }, + "optional": false, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzurePlaywrightService.AccountFreeTrialProperties.percentageUsed", + "serializationOptions": { + "$id": "382", + "json": { + "$id": "383", + "name": "percentageUsed" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzurePlaywrightService.AccountQuotaProperties.freeTrial", + "serializationOptions": { + "$id": "384", + "json": { + "$id": "385", + "name": "freeTrial" + } + } + }, + { + "$id": "386", + "kind": "property", + "name": "provisioningState", + "serializedName": "provisioningState", + "doc": "The status of the last operation.", + "type": { + "$ref": "20" + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzurePlaywrightService.AccountQuotaProperties.provisioningState", + "serializationOptions": { + "$id": "387", + "json": { + "$id": "388", + "name": "provisioningState" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzurePlaywrightService.AccountQuota.properties", + "serializationOptions": { + "$id": "389", + "json": { + "$id": "390", + "name": "properties" + } + } + } + ] + }, + { + "$ref": "359" + }, + { + "$ref": "361" + }, + { + "$id": "391", + "kind": "model", + "name": "AccountQuotaListResult", + "namespace": "Azure.ResourceManager.PlaywrightTesting", + "crossLanguageDefinitionId": "Azure.ResourceManager.ResourceListResult", + "usage": "Output,Json", + "doc": "The response of a AccountQuota list operation.", + "decorators": [], + "properties": [ + { + "$id": "392", + "kind": "property", + "name": "value", + "serializedName": "value", + "doc": "The AccountQuota items on this page", + "type": { + "$id": "393", + "kind": "array", + "name": "ArrayAccountQuota", + "valueType": { + "$ref": "357" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.ResourceListResult.value", + "serializationOptions": { + "$id": "394", + "json": { + "$id": "395", + "name": "value" + } + } + }, + { + "$id": "396", + "kind": "property", + "name": "nextLink", + "serializedName": "nextLink", + "doc": "The link to the next page of items", + "type": { + "$id": "397", + "kind": "url", + "name": "ResourceLocation", + "crossLanguageDefinitionId": "TypeSpec.Rest.ResourceLocation", + "baseType": { + "$id": "398", + "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": "399", + "json": { + "$id": "400", + "name": "nextLink" + } + } + } + ] + } + ], + "clients": [ + { + "$id": "401", + "kind": "client", + "name": "AzurePlaywrightServiceClient", + "namespace": "Azure.ResourceManager.PlaywrightTesting", + "doc": "Microsoft.AzurePlaywrightService Resource Provider Management API.", + "operations": [], + "parameters": [ + { + "$id": "402", + "name": "endpoint", + "nameInRequest": "endpoint", + "doc": "Service host", + "type": { + "$id": "403", + "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": "404", + "type": { + "$id": "405", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "https://management.azure.com" + } + } + ], + "decorators": [ + { + "$id": "406", + "name": "TypeSpec.@service", + "arguments": { + "$id": "407", + "options": { + "$id": "408", + "title": "Microsoft AzurePlaywrightService Management API" + } + } + } + ], + "crossLanguageDefinitionId": "Microsoft.AzurePlaywrightService", + "apiVersions": [ + "2024-12-01" + ], + "children": [ + { + "$id": "409", + "kind": "client", + "name": "Operations", + "namespace": "Azure.ResourceManager.PlaywrightTesting", + "operations": [ + { + "$id": "410", + "name": "list", + "resourceName": "Operations", + "doc": "List the operations for the provider", + "accessibility": "public", + "parameters": [ + { + "$id": "411", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "412", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "413", + "type": { + "$id": "414", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2024-12-01" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "415", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "416", + "kind": "constant", + "valueType": { + "$id": "417", + "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": "418", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "88" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "GET", + "uri": "{endpoint}", + "path": "/providers/Microsoft.AzurePlaywrightService/operations", + "bufferResponse": true, + "paging": { + "$id": "419", + "itemPropertySegments": [ + "value" + ], + "nextLink": { + "$id": "420", + "responseSegments": [ + "nextLink" + ], + "responseLocation": "Body" + } + }, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Azure.ResourceManager.Operations.list", + "decorators": [], + "examples": [ + { + "$id": "421", + "kind": "http", + "name": "Operations_List", + "description": "Operations_List", + "filePath": "2024-12-01/Operations_List.json", + "parameters": [ + { + "$id": "422", + "parameter": { + "$ref": "411" + }, + "value": { + "$id": "423", + "kind": "string", + "type": { + "$ref": "412" + }, + "value": "2024-12-01" + } + } + ], + "responses": [ + { + "$id": "424", + "response": { + "$ref": "418" + }, + "statusCode": 200, + "bodyValue": { + "$id": "425", + "kind": "model", + "type": { + "$ref": "88" + }, + "value": { + "$id": "426", + "value": { + "$id": "427", + "kind": "array", + "type": { + "$ref": "90" + }, + "value": [ + { + "$id": "428", + "kind": "model", + "type": { + "$ref": "91" + }, + "value": { + "$id": "429", + "name": { + "$id": "430", + "kind": "string", + "type": { + "$ref": "93" + }, + "value": "Microsoft.AzurePlaywrightService/accounts/Write" + }, + "isDataAction": { + "$id": "431", + "kind": "boolean", + "type": { + "$ref": "97" + }, + "value": false + }, + "display": { + "$id": "432", + "kind": "model", + "type": { + "$ref": "101" + }, + "value": { + "$id": "433", + "provider": { + "$id": "434", + "kind": "string", + "type": { + "$ref": "103" + }, + "value": "Microsoft.AzurePlaywrightService" + }, + "resource": { + "$id": "435", + "kind": "string", + "type": { + "$ref": "107" + }, + "value": "accounts" + }, + "operation": { + "$id": "436", + "kind": "string", + "type": { + "$ref": "111" + }, + "value": "Creates or updates the PlaywrightAccounts" + }, + "description": { + "$id": "437", + "kind": "string", + "type": { + "$ref": "115" + }, + "value": "Set PlaywrightAccounts" + } + } + } + } + }, + { + "$id": "438", + "kind": "model", + "type": { + "$ref": "91" + }, + "value": { + "$id": "439", + "name": { + "$id": "440", + "kind": "string", + "type": { + "$ref": "93" + }, + "value": "Microsoft.AzurePlaywrightService/accounts/Delete" + }, + "isDataAction": { + "$id": "441", + "kind": "boolean", + "type": { + "$ref": "97" + }, + "value": false + }, + "display": { + "$id": "442", + "kind": "model", + "type": { + "$ref": "101" + }, + "value": { + "$id": "443", + "provider": { + "$id": "444", + "kind": "string", + "type": { + "$ref": "103" + }, + "value": "Microsoft.AzurePlaywrightService" + }, + "resource": { + "$id": "445", + "kind": "string", + "type": { + "$ref": "107" + }, + "value": "accounts" + }, + "operation": { + "$id": "446", + "kind": "string", + "type": { + "$ref": "111" + }, + "value": "Deletes the PlaywrightAccounts" + }, + "description": { + "$id": "447", + "kind": "string", + "type": { + "$ref": "115" + }, + "value": "Delete PlaywrightAccounts" + } + } + } + } + }, + { + "$id": "448", + "kind": "model", + "type": { + "$ref": "91" + }, + "value": { + "$id": "449", + "name": { + "$id": "450", + "kind": "string", + "type": { + "$ref": "93" + }, + "value": "Microsoft.AzurePlaywrightService/accounts/Read" + }, + "isDataAction": { + "$id": "451", + "kind": "boolean", + "type": { + "$ref": "97" + }, + "value": false + }, + "display": { + "$id": "452", + "kind": "model", + "type": { + "$ref": "101" + }, + "value": { + "$id": "453", + "provider": { + "$id": "454", + "kind": "string", + "type": { + "$ref": "103" + }, + "value": "Microsoft.AzurePlaywrightService" + }, + "resource": { + "$id": "455", + "kind": "string", + "type": { + "$ref": "107" + }, + "value": "accounts" + }, + "operation": { + "$id": "456", + "kind": "string", + "type": { + "$ref": "111" + }, + "value": "Reads the PlaywrightAccounts" + }, + "description": { + "$id": "457", + "kind": "string", + "type": { + "$ref": "115" + }, + "value": "Read PlaywrightAccounts" + } + } + } + } + } + ] + }, + "nextLink": { + "$id": "458", + "kind": "string", + "type": { + "$ref": "129" + }, + "value": "http://nextlink.contoso.com" + } + } + } + } + ] + } + ] + } + ], + "parameters": [ + { + "$id": "459", + "name": "endpoint", + "nameInRequest": "endpoint", + "doc": "Service host", + "type": { + "$id": "460", + "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": "461", + "type": { + "$id": "462", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "https://management.azure.com" + } + } + ], + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzurePlaywrightService.Operations", + "apiVersions": [ + "2024-12-01" + ], + "parent": { + "$ref": "401" + } + }, + { + "$id": "463", + "kind": "client", + "name": "Accounts", + "namespace": "Azure.ResourceManager.PlaywrightTesting", + "operations": [ + { + "$id": "464", + "name": "get", + "resourceName": "Account", + "doc": "Get a Account", + "accessibility": "public", + "parameters": [ + { + "$id": "465", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "466", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "467", + "type": { + "$id": "468", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2024-12-01" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "469", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "470", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "471", + "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": "472", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "473", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "474", + "name": "accountName", + "nameInRequest": "accountName", + "doc": "Name of account.", + "type": { + "$id": "475", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "476", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "477", + "kind": "constant", + "valueType": { + "$id": "478", + "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": "479", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "167" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "GET", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzurePlaywrightService/accounts/{accountName}", + "bufferResponse": true, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Azure.ResourceManager.Accounts.get", + "decorators": [] + }, + { + "$id": "480", + "name": "createOrUpdate", + "resourceName": "Account", + "doc": "Create a Account", + "accessibility": "public", + "parameters": [ + { + "$id": "481", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "482", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "483", + "type": { + "$id": "484", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2024-12-01" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "485", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "486", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "487", + "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": "488", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "489", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "490", + "name": "accountName", + "nameInRequest": "accountName", + "doc": "Name of account.", + "type": { + "$id": "491", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "492", + "name": "contentType", + "nameInRequest": "Content-Type", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$id": "493", + "kind": "constant", + "valueType": { + "$id": "494", + "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": "495", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "496", + "kind": "constant", + "valueType": { + "$id": "497", + "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": "498", + "name": "resource", + "nameInRequest": "resource", + "doc": "Resource create parameters.", + "type": { + "$ref": "167" + }, + "location": "Body", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "499", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "167" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + }, + { + "$id": "500", + "statusCodes": [ + 201 + ], + "bodyType": { + "$ref": "167" + }, + "headers": [ + { + "$id": "501", + "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": "502", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + } + } + ], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "PUT", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzurePlaywrightService/accounts/{accountName}", + "requestMediaTypes": [ + "application/json" + ], + "bufferResponse": true, + "longRunning": { + "$id": "503", + "finalStateVia": 0, + "finalResponse": { + "$id": "504", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "167" + } + } + }, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.AzurePlaywrightService.Accounts.createOrUpdate", + "decorators": [ + { + "$id": "505", + "name": "Azure.Core.@useFinalStateVia", + "arguments": { + "$id": "506", + "finalState": "azure-async-operation" + } + } + ], + "examples": [ + { + "$id": "507", + "kind": "http", + "name": "Accounts_CreateOrUpdate", + "description": "Accounts_CreateOrUpdate", + "filePath": "2024-12-01/Accounts_CreateOrUpdate.json", + "parameters": [ + { + "$id": "508", + "parameter": { + "$ref": "481" + }, + "value": { + "$id": "509", + "kind": "string", + "type": { + "$ref": "482" + }, + "value": "2024-12-01" + } + }, + { + "$id": "510", + "parameter": { + "$ref": "485" + }, + "value": { + "$id": "511", + "kind": "string", + "type": { + "$ref": "486" + }, + "value": "00000000-0000-0000-0000-000000000000" + } + }, + { + "$id": "512", + "parameter": { + "$ref": "488" + }, + "value": { + "$id": "513", + "kind": "string", + "type": { + "$ref": "489" + }, + "value": "dummyrg" + } + }, + { + "$id": "514", + "parameter": { + "$ref": "490" + }, + "value": { + "$id": "515", + "kind": "string", + "type": { + "$ref": "491" + }, + "value": "myPlaywrightAccount" + } + }, + { + "$id": "516", + "parameter": { + "$ref": "498" + }, + "value": { + "$id": "517", + "kind": "model", + "type": { + "$ref": "167" + }, + "value": { + "$id": "518", + "location": { + "$id": "519", + "kind": "string", + "type": { + "$ref": "219" + }, + "value": "westus" + }, + "tags": { + "$id": "520", + "kind": "dict", + "type": { + "$ref": "213" + }, + "value": { + "$id": "521", + "Team": { + "$id": "522", + "kind": "string", + "type": { + "$ref": "215" + }, + "value": "Dev Exp" + } + } + }, + "properties": { + "$id": "523", + "kind": "model", + "type": { + "$ref": "223" + }, + "value": { + "$id": "524", + "regionalAffinity": { + "$id": "525", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Enabled" + } + } + } + } + } + } + ], + "responses": [ + { + "$id": "526", + "response": { + "$ref": "499" + }, + "statusCode": 200, + "bodyValue": { + "$id": "527", + "kind": "model", + "type": { + "$ref": "167" + }, + "value": { + "$id": "528", + "location": { + "$id": "529", + "kind": "string", + "type": { + "$ref": "219" + }, + "value": "westus" + }, + "properties": { + "$id": "530", + "kind": "model", + "type": { + "$ref": "223" + }, + "value": { + "$id": "531", + "dashboardUri": { + "$id": "532", + "kind": "string", + "type": { + "$ref": "225" + }, + "value": "https://dashboard.00000000-0000-0000-0000-000000000000.domain.com" + }, + "provisioningState": { + "$id": "533", + "kind": "string", + "type": { + "$ref": "20" + }, + "value": "Succeeded" + }, + "regionalAffinity": { + "$id": "534", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Enabled" + }, + "scalableExecution": { + "$id": "535", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Enabled" + }, + "reporting": { + "$id": "536", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Enabled" + }, + "localAuth": { + "$id": "537", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Enabled" + } + } + }, + "id": { + "$id": "538", + "kind": "string", + "type": { + "$ref": "171" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dummyrg/providers/Microsoft.AzurePlaywrightService/accounts/myPlaywrightAccount" + }, + "name": { + "$id": "539", + "kind": "string", + "type": { + "$ref": "176" + }, + "value": "myPlaywrightAccount" + }, + "type": { + "$id": "540", + "kind": "string", + "type": { + "$ref": "180" + }, + "value": "Microsoft.AzurePlaywrightService/accounts" + }, + "tags": { + "$id": "541", + "kind": "dict", + "type": { + "$ref": "213" + }, + "value": { + "$id": "542", + "Team": { + "$id": "543", + "kind": "string", + "type": { + "$ref": "215" + }, + "value": "Dev Exp" + } + } + }, + "systemData": { + "$id": "544", + "kind": "model", + "type": { + "$ref": "185" + }, + "value": { + "$id": "545", + "createdBy": { + "$id": "546", + "kind": "string", + "type": { + "$ref": "187" + }, + "value": "userId1001" + }, + "createdByType": { + "$id": "547", + "kind": "string", + "type": { + "$ref": "34" + }, + "value": "User" + }, + "createdAt": { + "$id": "548", + "kind": "string", + "type": { + "$ref": "194" + }, + "value": "2021-09-28T12:32:33Z" + }, + "lastModifiedBy": { + "$id": "549", + "kind": "string", + "type": { + "$ref": "199" + }, + "value": "userId1001" + }, + "lastModifiedByType": { + "$id": "550", + "kind": "string", + "type": { + "$ref": "34" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "551", + "kind": "string", + "type": { + "$ref": "206" + }, + "value": "2021-09-28T12:32:33Z" + } + } + } + } + } + }, + { + "$id": "552", + "response": { + "$ref": "500" + }, + "statusCode": 201, + "bodyValue": { + "$id": "553", + "kind": "model", + "type": { + "$ref": "167" + }, + "value": { + "$id": "554", + "location": { + "$id": "555", + "kind": "string", + "type": { + "$ref": "219" + }, + "value": "westus" + }, + "properties": { + "$id": "556", + "kind": "model", + "type": { + "$ref": "223" + }, + "value": { + "$id": "557", + "dashboardUri": { + "$id": "558", + "kind": "string", + "type": { + "$ref": "225" + }, + "value": "https://dashboard.00000000-0000-0000-0000-000000000000.domain.com" + }, + "provisioningState": { + "$id": "559", + "kind": "string", + "type": { + "$ref": "20" + }, + "value": "Succeeded" + }, + "regionalAffinity": { + "$id": "560", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Enabled" + }, + "scalableExecution": { + "$id": "561", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Enabled" + }, + "reporting": { + "$id": "562", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Enabled" + }, + "localAuth": { + "$id": "563", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Enabled" + } + } + }, + "id": { + "$id": "564", + "kind": "string", + "type": { + "$ref": "171" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dummyrg/providers/Microsoft.AzurePlaywrightService/accounts/myPlaywrightAccount" + }, + "name": { + "$id": "565", + "kind": "string", + "type": { + "$ref": "176" + }, + "value": "myPlaywrightAccount" + }, + "type": { + "$id": "566", + "kind": "string", + "type": { + "$ref": "180" + }, + "value": "Microsoft.AzurePlaywrightService/accounts" + }, + "tags": { + "$id": "567", + "kind": "dict", + "type": { + "$ref": "213" + }, + "value": { + "$id": "568", + "Team": { + "$id": "569", + "kind": "string", + "type": { + "$ref": "215" + }, + "value": "Dev Exp" + } + } + }, + "systemData": { + "$id": "570", + "kind": "model", + "type": { + "$ref": "185" + }, + "value": { + "$id": "571", + "createdBy": { + "$id": "572", + "kind": "string", + "type": { + "$ref": "187" + }, + "value": "userId1001" + }, + "createdByType": { + "$id": "573", + "kind": "string", + "type": { + "$ref": "34" + }, + "value": "User" + }, + "createdAt": { + "$id": "574", + "kind": "string", + "type": { + "$ref": "194" + }, + "value": "2021-09-28T12:32:33Z" + }, + "lastModifiedBy": { + "$id": "575", + "kind": "string", + "type": { + "$ref": "199" + }, + "value": "userId1001" + }, + "lastModifiedByType": { + "$id": "576", + "kind": "string", + "type": { + "$ref": "34" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "577", + "kind": "string", + "type": { + "$ref": "206" + }, + "value": "2021-09-28T12:32:33Z" + } + } + } + } + } + } + ] + } + ] + }, + { + "$id": "578", + "name": "update", + "resourceName": "Account", + "doc": "Update a Account", + "accessibility": "public", + "parameters": [ + { + "$id": "579", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "580", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "581", + "type": { + "$id": "582", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2024-12-01" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "583", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "584", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "585", + "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": "586", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "587", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "588", + "name": "accountName", + "nameInRequest": "accountName", + "doc": "Name of account.", + "type": { + "$id": "589", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "590", + "name": "contentType", + "nameInRequest": "Content-Type", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$id": "591", + "kind": "constant", + "valueType": { + "$id": "592", + "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": "593", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "594", + "kind": "constant", + "valueType": { + "$id": "595", + "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": "596", + "name": "properties", + "nameInRequest": "properties", + "doc": "The resource properties to be updated.", + "type": { + "$ref": "245" + }, + "location": "Body", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "597", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "167" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "PATCH", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzurePlaywrightService/accounts/{accountName}", + "requestMediaTypes": [ + "application/json" + ], + "bufferResponse": true, + "generateProtocolMethod": true, + "generateConvenienceMethod": false, + "crossLanguageDefinitionId": "Microsoft.AzurePlaywrightService.Accounts.update", + "decorators": [], + "examples": [ + { + "$id": "598", + "kind": "http", + "name": "Accounts_Update", + "description": "Accounts_Update", + "filePath": "2024-12-01/Accounts_Update.json", + "parameters": [ + { + "$id": "599", + "parameter": { + "$ref": "579" + }, + "value": { + "$id": "600", + "kind": "string", + "type": { + "$ref": "580" + }, + "value": "2024-12-01" + } + }, + { + "$id": "601", + "parameter": { + "$ref": "583" + }, + "value": { + "$id": "602", + "kind": "string", + "type": { + "$ref": "584" + }, + "value": "00000000-0000-0000-0000-000000000000" + } + }, + { + "$id": "603", + "parameter": { + "$ref": "586" + }, + "value": { + "$id": "604", + "kind": "string", + "type": { + "$ref": "587" + }, + "value": "dummyrg" + } + }, + { + "$id": "605", + "parameter": { + "$ref": "588" + }, + "value": { + "$id": "606", + "kind": "string", + "type": { + "$ref": "589" + }, + "value": "myPlaywrightAccount" + } + }, + { + "$id": "607", + "parameter": { + "$ref": "596" + }, + "value": { + "$id": "608", + "kind": "model", + "type": { + "$ref": "245" + }, + "value": { + "$id": "609", + "tags": { + "$id": "610", + "kind": "dict", + "type": { + "$ref": "247" + }, + "value": { + "$id": "611", + "Team": { + "$id": "612", + "kind": "string", + "type": { + "$ref": "249" + }, + "value": "Dev Exp" + }, + "Division": { + "$id": "613", + "kind": "string", + "type": { + "$ref": "249" + }, + "value": "LT" + } + } + }, + "properties": { + "$id": "614", + "kind": "model", + "type": { + "$ref": "253" + }, + "value": { + "$id": "615", + "regionalAffinity": { + "$id": "616", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Enabled" + } + } + } + } + } + } + ], + "responses": [ + { + "$id": "617", + "response": { + "$ref": "597" + }, + "statusCode": 200, + "bodyValue": { + "$id": "618", + "kind": "model", + "type": { + "$ref": "167" + }, + "value": { + "$id": "619", + "location": { + "$id": "620", + "kind": "string", + "type": { + "$ref": "219" + }, + "value": "westus" + }, + "properties": { + "$id": "621", + "kind": "model", + "type": { + "$ref": "223" + }, + "value": { + "$id": "622", + "dashboardUri": { + "$id": "623", + "kind": "string", + "type": { + "$ref": "225" + }, + "value": "https://dashboard.00000000-0000-0000-0000-000000000000.domain.com" + }, + "provisioningState": { + "$id": "624", + "kind": "string", + "type": { + "$ref": "20" + }, + "value": "Succeeded" + }, + "regionalAffinity": { + "$id": "625", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Enabled" + }, + "scalableExecution": { + "$id": "626", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Enabled" + }, + "reporting": { + "$id": "627", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Enabled" + }, + "localAuth": { + "$id": "628", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Enabled" + } + } + }, + "id": { + "$id": "629", + "kind": "string", + "type": { + "$ref": "171" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dummyrg/providers/Microsoft.AzurePlaywrightService/accounts/myPlaywrightAccount" + }, + "name": { + "$id": "630", + "kind": "string", + "type": { + "$ref": "176" + }, + "value": "myPlaywrightAccount" + }, + "type": { + "$id": "631", + "kind": "string", + "type": { + "$ref": "180" + }, + "value": "Microsoft.AzurePlaywrightService/accounts" + }, + "tags": { + "$id": "632", + "kind": "dict", + "type": { + "$ref": "213" + }, + "value": { + "$id": "633", + "Team": { + "$id": "634", + "kind": "string", + "type": { + "$ref": "215" + }, + "value": "Dev Exp" + } + } + }, + "systemData": { + "$id": "635", + "kind": "model", + "type": { + "$ref": "185" + }, + "value": { + "$id": "636", + "createdBy": { + "$id": "637", + "kind": "string", + "type": { + "$ref": "187" + }, + "value": "userId1001" + }, + "createdByType": { + "$id": "638", + "kind": "string", + "type": { + "$ref": "34" + }, + "value": "User" + }, + "createdAt": { + "$id": "639", + "kind": "string", + "type": { + "$ref": "194" + }, + "value": "2021-09-28T12:32:33Z" + }, + "lastModifiedBy": { + "$id": "640", + "kind": "string", + "type": { + "$ref": "199" + }, + "value": "userId1001" + }, + "lastModifiedByType": { + "$id": "641", + "kind": "string", + "type": { + "$ref": "34" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "642", + "kind": "string", + "type": { + "$ref": "206" + }, + "value": "2021-09-28T12:32:33Z" + } + } + } + } + } + } + ] + } + ] + }, + { + "$id": "643", + "name": "delete", + "resourceName": "Account", + "doc": "Delete a Account", + "accessibility": "public", + "parameters": [ + { + "$id": "644", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "645", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "646", + "type": { + "$id": "647", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2024-12-01" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "648", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "649", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "650", + "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": "651", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "652", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "653", + "name": "accountName", + "nameInRequest": "accountName", + "doc": "Name of account.", + "type": { + "$id": "654", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "655", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "656", + "kind": "constant", + "valueType": { + "$id": "657", + "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": "658", + "statusCodes": [ + 202 + ], + "headers": [ + { + "$id": "659", + "name": "location", + "nameInResponse": "Location", + "doc": "The Location header contains the URL where the status of the long running operation can be checked.", + "type": { + "$id": "660", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + { + "$id": "661", + "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": "662", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + } + } + ], + "isErrorResponse": false + }, + { + "$id": "663", + "statusCodes": [ + 204 + ], + "headers": [], + "isErrorResponse": false + } + ], + "httpMethod": "DELETE", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzurePlaywrightService/accounts/{accountName}", + "bufferResponse": true, + "longRunning": { + "$id": "664", + "finalStateVia": 1, + "finalResponse": { + "$id": "665", + "statusCodes": [ + 204 + ] + } + }, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.AzurePlaywrightService.Accounts.delete", + "decorators": [], + "examples": [ + { + "$id": "666", + "kind": "http", + "name": "Accounts_Delete", + "description": "Accounts_Delete", + "filePath": "2024-12-01/Accounts_Delete.json", + "parameters": [ + { + "$id": "667", + "parameter": { + "$ref": "644" + }, + "value": { + "$id": "668", + "kind": "string", + "type": { + "$ref": "645" + }, + "value": "2024-12-01" + } + }, + { + "$id": "669", + "parameter": { + "$ref": "648" + }, + "value": { + "$id": "670", + "kind": "string", + "type": { + "$ref": "649" + }, + "value": "00000000-0000-0000-0000-000000000000" + } + }, + { + "$id": "671", + "parameter": { + "$ref": "651" + }, + "value": { + "$id": "672", + "kind": "string", + "type": { + "$ref": "652" + }, + "value": "dummyrg" + } + }, + { + "$id": "673", + "parameter": { + "$ref": "653" + }, + "value": { + "$id": "674", + "kind": "string", + "type": { + "$ref": "654" + }, + "value": "myPlaywrightAccount" + } + } + ], + "responses": [ + { + "$id": "675", + "response": { + "$ref": "658" + }, + "statusCode": 202 + }, + { + "$id": "676", + "response": { + "$ref": "663" + }, + "statusCode": 204 + } + ] + } + ] + }, + { + "$id": "677", + "name": "listByResourceGroup", + "resourceName": "Account", + "doc": "List Account resources by resource group", + "accessibility": "public", + "parameters": [ + { + "$id": "678", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "679", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "680", + "type": { + "$id": "681", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2024-12-01" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "682", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "683", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "684", + "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": "685", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "686", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "687", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "688", + "kind": "constant", + "valueType": { + "$id": "689", + "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": "690", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "293" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "GET", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzurePlaywrightService/accounts", + "bufferResponse": true, + "paging": { + "$id": "691", + "itemPropertySegments": [ + "value" + ], + "nextLink": { + "$id": "692", + "responseSegments": [ + "nextLink" + ], + "responseLocation": "Body" + } + }, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Azure.ResourceManager.Accounts.listByResourceGroup", + "decorators": [] + }, + { + "$id": "693", + "name": "listBySubscription", + "resourceName": "Account", + "doc": "List Account resources by subscription ID", + "accessibility": "public", + "parameters": [ + { + "$id": "694", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "695", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "696", + "type": { + "$id": "697", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2024-12-01" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "698", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "699", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "700", + "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": "701", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "702", + "kind": "constant", + "valueType": { + "$id": "703", + "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": "704", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "293" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "GET", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/providers/Microsoft.AzurePlaywrightService/accounts", + "bufferResponse": true, + "paging": { + "$id": "705", + "itemPropertySegments": [ + "value" + ], + "nextLink": { + "$id": "706", + "responseSegments": [ + "nextLink" + ], + "responseLocation": "Body" + } + }, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Azure.ResourceManager.Accounts.listBySubscription", + "decorators": [] + }, + { + "$id": "707", + "name": "CheckPlaywrightTestingNameAvailability", + "resourceName": "Accounts", + "doc": "Adds check global name availability operation, normally used if a resource name must be globally unique.", + "accessibility": "public", + "parameters": [ + { + "$id": "708", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "709", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "710", + "type": { + "$id": "711", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2024-12-01" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "712", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "713", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "714", + "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": "715", + "name": "contentType", + "nameInRequest": "Content-Type", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$id": "716", + "kind": "constant", + "valueType": { + "$id": "717", + "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": "718", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "719", + "kind": "constant", + "valueType": { + "$id": "720", + "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": "721", + "name": "body", + "nameInRequest": "body", + "doc": "The CheckAvailability request", + "type": { + "$ref": "303" + }, + "location": "Body", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "722", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "312" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "POST", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/providers/Microsoft.AzurePlaywrightService/checkNameAvailability", + "requestMediaTypes": [ + "application/json" + ], + "bufferResponse": true, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.AzurePlaywrightService.Accounts.checkNameAvailability", + "decorators": [], + "examples": [ + { + "$id": "723", + "kind": "http", + "name": "Accounts_CheckNameAvailability", + "description": "Accounts_CheckNameAvailability", + "filePath": "2024-12-01/Accounts_CheckNameAvailability.json", + "parameters": [ + { + "$id": "724", + "parameter": { + "$ref": "708" + }, + "value": { + "$id": "725", + "kind": "string", + "type": { + "$ref": "709" + }, + "value": "2024-12-01" + } + }, + { + "$id": "726", + "parameter": { + "$ref": "712" + }, + "value": { + "$id": "727", + "kind": "string", + "type": { + "$ref": "713" + }, + "value": "00000000-0000-0000-0000-000000000000" + } + }, + { + "$id": "728", + "parameter": { + "$ref": "721" + }, + "value": { + "$id": "729", + "kind": "model", + "type": { + "$ref": "303" + }, + "value": { + "$id": "730", + "name": { + "$id": "731", + "kind": "string", + "type": { + "$ref": "305" + }, + "value": "dummyName" + }, + "type": { + "$id": "732", + "kind": "string", + "type": { + "$ref": "309" + }, + "value": "Microsoft.AzurePlaywrightService/Accounts" + } + } + } + } + ], + "responses": [ + { + "$id": "733", + "response": { + "$ref": "722" + }, + "statusCode": 200, + "bodyValue": { + "$id": "734", + "kind": "model", + "type": { + "$ref": "312" + }, + "value": { + "$id": "735", + "nameAvailable": { + "$id": "736", + "kind": "boolean", + "type": { + "$ref": "314" + }, + "value": true + }, + "message": { + "$id": "737", + "kind": "string", + "type": { + "$ref": "321" + }, + "value": "Test message." + } + } + } + } + ] + } + ] + } + ], + "parameters": [ + { + "$id": "738", + "name": "endpoint", + "nameInRequest": "endpoint", + "doc": "Service host", + "type": { + "$id": "739", + "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": "740", + "type": { + "$id": "741", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "https://management.azure.com" + } + } + ], + "decorators": [ + { + "$id": "742", + "name": "Azure.ResourceManager.@armResourceOperations", + "arguments": { + "$id": "743" + } + } + ], + "crossLanguageDefinitionId": "Microsoft.AzurePlaywrightService.Accounts", + "apiVersions": [ + "2024-12-01" + ], + "parent": { + "$ref": "401" + } + }, + { + "$id": "744", + "kind": "client", + "name": "Quotas", + "namespace": "Azure.ResourceManager.PlaywrightTesting", + "operations": [ + { + "$id": "745", + "name": "get", + "resourceName": "Quota", + "doc": "Get subscription quota by name.", + "accessibility": "public", + "parameters": [ + { + "$id": "746", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "747", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "748", + "type": { + "$id": "749", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2024-12-01" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "750", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "751", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "752", + "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": "753", + "name": "location", + "nameInRequest": "location", + "doc": "The location of quota in ARM Normalized format like eastus, southeastasia etc.", + "type": { + "$id": "754", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "755", + "name": "quotaName", + "nameInRequest": "quotaName", + "doc": "The quota name.", + "type": { + "$ref": "58" + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "756", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "757", + "kind": "constant", + "valueType": { + "$id": "758", + "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": "759", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "324" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "GET", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/providers/Microsoft.AzurePlaywrightService/locations/{location}/quotas/{quotaName}", + "bufferResponse": true, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.AzurePlaywrightService.Quotas.get", + "decorators": [], + "examples": [ + { + "$id": "760", + "kind": "http", + "name": "Quotas_Get", + "description": "Quotas_Get", + "filePath": "2024-12-01/Quotas_Get.json", + "parameters": [ + { + "$id": "761", + "parameter": { + "$ref": "746" + }, + "value": { + "$id": "762", + "kind": "string", + "type": { + "$ref": "747" + }, + "value": "2024-12-01" + } + }, + { + "$id": "763", + "parameter": { + "$ref": "750" + }, + "value": { + "$id": "764", + "kind": "string", + "type": { + "$ref": "751" + }, + "value": "00000000-0000-0000-0000-000000000000" + } + }, + { + "$id": "765", + "parameter": { + "$ref": "753" + }, + "value": { + "$id": "766", + "kind": "string", + "type": { + "$ref": "754" + }, + "value": "eastus" + } + }, + { + "$id": "767", + "parameter": { + "$ref": "755" + }, + "value": { + "$id": "768", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "ScalableExecution" + } + } + ], + "responses": [ + { + "$id": "769", + "response": { + "$ref": "759" + }, + "statusCode": 200, + "bodyValue": { + "$id": "770", + "kind": "model", + "type": { + "$ref": "324" + }, + "value": { + "$id": "771", + "id": { + "$id": "772", + "kind": "string", + "type": { + "$ref": "171" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.AzurePlaywrightService/locations/eastus/quotas/ScalableExecution" + }, + "name": { + "$id": "773", + "kind": "string", + "type": { + "$ref": "176" + }, + "value": "ScalableExecution" + }, + "type": { + "$id": "774", + "kind": "string", + "type": { + "$ref": "180" + }, + "value": "Microsoft.AzurePlaywrightService/Locations/Quotas" + }, + "properties": { + "$id": "775", + "kind": "model", + "type": { + "$ref": "327" + }, + "value": { + "$id": "776", + "freeTrial": { + "$id": "777", + "kind": "model", + "type": { + "$ref": "329" + }, + "value": { + "$id": "778", + "accountId": { + "$id": "779", + "kind": "string", + "type": { + "$ref": "331" + }, + "value": "3fa85f64-5717-4562-b3fc-2c963f66afa6" + }, + "state": { + "$id": "780", + "kind": "string", + "type": { + "$ref": "64" + }, + "value": "Active" + } + } + }, + "offeringType": { + "$id": "781", + "kind": "string", + "type": { + "$ref": "74" + }, + "value": "NotApplicable" + }, + "provisioningState": { + "$id": "782", + "kind": "string", + "type": { + "$ref": "20" + }, + "value": "Succeeded" + } + } + } + } + } + } + ] + } + ] + }, + { + "$id": "783", + "name": "listBySubscription", + "resourceName": "Quota", + "doc": "List quotas for a given subscription Id.", + "accessibility": "public", + "parameters": [ + { + "$id": "784", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "785", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "786", + "type": { + "$id": "787", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2024-12-01" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "788", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "789", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "790", + "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": "791", + "name": "location", + "nameInRequest": "location", + "doc": "The location of quota in ARM Normalized format like eastus, southeastasia etc.", + "type": { + "$id": "792", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "793", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "794", + "kind": "constant", + "valueType": { + "$id": "795", + "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": "796", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "347" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "GET", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/providers/Microsoft.AzurePlaywrightService/locations/{location}/quotas", + "bufferResponse": true, + "paging": { + "$id": "797", + "itemPropertySegments": [ + "value" + ], + "nextLink": { + "$id": "798", + "responseSegments": [ + "nextLink" + ], + "responseLocation": "Body" + } + }, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.AzurePlaywrightService.Quotas.listBySubscription", + "decorators": [], + "examples": [ + { + "$id": "799", + "kind": "http", + "name": "Quotas_ListBySubscription", + "description": "Quotas_ListBySubscription", + "filePath": "2024-12-01/Quotas_ListBySubscription.json", + "parameters": [ + { + "$id": "800", + "parameter": { + "$ref": "784" + }, + "value": { + "$id": "801", + "kind": "string", + "type": { + "$ref": "785" + }, + "value": "2024-12-01" + } + }, + { + "$id": "802", + "parameter": { + "$ref": "788" + }, + "value": { + "$id": "803", + "kind": "string", + "type": { + "$ref": "789" + }, + "value": "00000000-0000-0000-0000-000000000000" + } + }, + { + "$id": "804", + "parameter": { + "$ref": "791" + }, + "value": { + "$id": "805", + "kind": "string", + "type": { + "$ref": "792" + }, + "value": "eastus" + } + } + ], + "responses": [ + { + "$id": "806", + "response": { + "$ref": "796" + }, + "statusCode": 200, + "bodyValue": { + "$id": "807", + "kind": "model", + "type": { + "$ref": "347" + }, + "value": { + "$id": "808", + "value": { + "$id": "809", + "kind": "array", + "type": { + "$ref": "349" + }, + "value": [ + { + "$id": "810", + "kind": "model", + "type": { + "$ref": "324" + }, + "value": { + "$id": "811", + "properties": { + "$id": "812", + "kind": "model", + "type": { + "$ref": "327" + }, + "value": { + "$id": "813", + "freeTrial": { + "$id": "814", + "kind": "model", + "type": { + "$ref": "329" + }, + "value": { + "$id": "815", + "accountId": { + "$id": "816", + "kind": "string", + "type": { + "$ref": "331" + }, + "value": "3fa85f64-5717-4562-b3fc-2c963f66afa6" + }, + "state": { + "$id": "817", + "kind": "string", + "type": { + "$ref": "64" + }, + "value": "Active" + } + } + }, + "offeringType": { + "$id": "818", + "kind": "string", + "type": { + "$ref": "74" + }, + "value": "NotApplicable" + }, + "provisioningState": { + "$id": "819", + "kind": "string", + "type": { + "$ref": "20" + }, + "value": "Succeeded" + } + } + }, + "id": { + "$id": "820", + "kind": "string", + "type": { + "$ref": "171" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.AzurePlaywrightService/locations/eastus/quotas/ScalableExecution" + }, + "name": { + "$id": "821", + "kind": "string", + "type": { + "$ref": "176" + }, + "value": "ScalableExecution" + }, + "type": { + "$id": "822", + "kind": "string", + "type": { + "$ref": "180" + }, + "value": "Microsoft.AzurePlaywrightService/Locations/Quotas" + } + } + }, + { + "$id": "823", + "kind": "model", + "type": { + "$ref": "324" + }, + "value": { + "$id": "824", + "properties": { + "$id": "825", + "kind": "model", + "type": { + "$ref": "327" + }, + "value": { + "$id": "826", + "freeTrial": { + "$id": "827", + "kind": "model", + "type": { + "$ref": "329" + }, + "value": { + "$id": "828", + "accountId": { + "$id": "829", + "kind": "string", + "type": { + "$ref": "331" + }, + "value": "3fa85f64-5717-4562-b3fc-2c963f66afa6" + }, + "state": { + "$id": "830", + "kind": "string", + "type": { + "$ref": "64" + }, + "value": "Active" + } + } + }, + "offeringType": { + "$id": "831", + "kind": "string", + "type": { + "$ref": "74" + }, + "value": "PrivatePreview" + }, + "provisioningState": { + "$id": "832", + "kind": "string", + "type": { + "$ref": "20" + }, + "value": "Succeeded" + } + } + }, + "id": { + "$id": "833", + "kind": "string", + "type": { + "$ref": "171" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.AzurePlaywrightService/locations/eastus/quotas/Reporting" + }, + "name": { + "$id": "834", + "kind": "string", + "type": { + "$ref": "176" + }, + "value": "Reporting" + }, + "type": { + "$id": "835", + "kind": "string", + "type": { + "$ref": "180" + }, + "value": "Microsoft.AzurePlaywrightService/Locations/Quotas" + } + } + } + ] + } + } + } + } + ] + } + ] + } + ], + "parameters": [ + { + "$id": "836", + "name": "endpoint", + "nameInRequest": "endpoint", + "doc": "Service host", + "type": { + "$id": "837", + "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": "838", + "type": { + "$id": "839", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "https://management.azure.com" + } + } + ], + "decorators": [ + { + "$id": "840", + "name": "Azure.ResourceManager.@armResourceOperations", + "arguments": { + "$id": "841" + } + } + ], + "crossLanguageDefinitionId": "Microsoft.AzurePlaywrightService.Quotas", + "apiVersions": [ + "2024-12-01" + ], + "parent": { + "$ref": "401" + } + }, + { + "$id": "842", + "kind": "client", + "name": "AccountQuotas", + "namespace": "Azure.ResourceManager.PlaywrightTesting", + "operations": [ + { + "$id": "843", + "name": "get", + "resourceName": "AccountQuota", + "doc": "Get quota by name for an account.", + "accessibility": "public", + "parameters": [ + { + "$id": "844", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "845", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "846", + "type": { + "$id": "847", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2024-12-01" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "848", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "849", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "850", + "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": "851", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "852", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "853", + "name": "accountName", + "nameInRequest": "accountName", + "doc": "Name of account.", + "type": { + "$id": "854", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "855", + "name": "quotaName", + "nameInRequest": "quotaName", + "doc": "The Playwright service account quota name.", + "type": { + "$ref": "58" + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "856", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "857", + "kind": "constant", + "valueType": { + "$id": "858", + "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": "859", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "357" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "GET", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzurePlaywrightService/accounts/{accountName}/quotas/{quotaName}", + "bufferResponse": true, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.AzurePlaywrightService.AccountQuotas.get", + "decorators": [], + "examples": [ + { + "$id": "860", + "kind": "http", + "name": "AccountQuotas_Get", + "description": "AccountQuotas_Get", + "filePath": "2024-12-01/AccountQuotas_Get.json", + "parameters": [ + { + "$id": "861", + "parameter": { + "$ref": "844" + }, + "value": { + "$id": "862", + "kind": "string", + "type": { + "$ref": "845" + }, + "value": "2024-12-01" + } + }, + { + "$id": "863", + "parameter": { + "$ref": "848" + }, + "value": { + "$id": "864", + "kind": "string", + "type": { + "$ref": "849" + }, + "value": "00000000-0000-0000-0000-000000000000" + } + }, + { + "$id": "865", + "parameter": { + "$ref": "851" + }, + "value": { + "$id": "866", + "kind": "string", + "type": { + "$ref": "852" + }, + "value": "dummyrg" + } + }, + { + "$id": "867", + "parameter": { + "$ref": "853" + }, + "value": { + "$id": "868", + "kind": "string", + "type": { + "$ref": "854" + }, + "value": "myPlaywrightAccount" + } + }, + { + "$id": "869", + "parameter": { + "$ref": "855" + }, + "value": { + "$id": "870", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "ScalableExecution" + } + } + ], + "responses": [ + { + "$id": "871", + "response": { + "$ref": "859" + }, + "statusCode": 200, + "bodyValue": { + "$id": "872", + "kind": "model", + "type": { + "$ref": "357" + }, + "value": { + "$id": "873", + "id": { + "$id": "874", + "kind": "string", + "type": { + "$ref": "171" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dummyrg/providers/Microsoft.AzurePlaywrightService/accounts/myPlaywrightAccount/quotas/ScalableExecution" + }, + "name": { + "$id": "875", + "kind": "string", + "type": { + "$ref": "176" + }, + "value": "ScalableExecution" + }, + "type": { + "$id": "876", + "kind": "string", + "type": { + "$ref": "180" + }, + "value": "Microsoft.AzurePlaywrightService/Accounts/Quotas" + }, + "properties": { + "$id": "877", + "kind": "model", + "type": { + "$ref": "359" + }, + "value": { + "$id": "878", + "freeTrial": { + "$id": "879", + "kind": "model", + "type": { + "$ref": "361" + }, + "value": { + "$id": "880", + "createdAt": { + "$id": "881", + "kind": "string", + "type": { + "$ref": "363" + }, + "value": "2023-08-31T10:19:36.081Z" + }, + "expiryAt": { + "$id": "882", + "kind": "string", + "type": { + "$ref": "368" + }, + "value": "2023-08-31T10:19:36.081Z" + }, + "allocatedValue": { + "$id": "883", + "kind": "number", + "type": { + "$ref": "373" + }, + "value": 0 + }, + "usedValue": { + "$id": "884", + "kind": "number", + "type": { + "$ref": "377" + }, + "value": 0 + }, + "percentageUsed": { + "$id": "885", + "kind": "number", + "type": { + "$ref": "381" + }, + "value": 100 + } + } + }, + "provisioningState": { + "$id": "886", + "kind": "string", + "type": { + "$ref": "20" + }, + "value": "Succeeded" + } + } + } + } + } + } + ] + } + ] + }, + { + "$id": "887", + "name": "listByAccount", + "resourceName": "AccountQuota", + "doc": "List quotas for a given account.", + "accessibility": "public", + "parameters": [ + { + "$id": "888", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "889", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "890", + "type": { + "$id": "891", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2024-12-01" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "892", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "893", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "894", + "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": "895", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "896", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "897", + "name": "accountName", + "nameInRequest": "accountName", + "doc": "Name of account.", + "type": { + "$id": "898", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "899", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "900", + "kind": "constant", + "valueType": { + "$id": "901", + "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": "902", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "391" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "GET", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzurePlaywrightService/accounts/{accountName}/quotas", + "bufferResponse": true, + "paging": { + "$id": "903", + "itemPropertySegments": [ + "value" + ], + "nextLink": { + "$id": "904", + "responseSegments": [ + "nextLink" + ], + "responseLocation": "Body" + } + }, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.AzurePlaywrightService.AccountQuotas.listByAccount", + "decorators": [], + "examples": [ + { + "$id": "905", + "kind": "http", + "name": "AccountQuotas_ListByAccount", + "description": "AccountQuotas_ListByAccount", + "filePath": "2024-12-01/AccountQuotas_ListByAccount.json", + "parameters": [ + { + "$id": "906", + "parameter": { + "$ref": "888" + }, + "value": { + "$id": "907", + "kind": "string", + "type": { + "$ref": "889" + }, + "value": "2024-12-01" + } + }, + { + "$id": "908", + "parameter": { + "$ref": "892" + }, + "value": { + "$id": "909", + "kind": "string", + "type": { + "$ref": "893" + }, + "value": "00000000-0000-0000-0000-000000000000" + } + }, + { + "$id": "910", + "parameter": { + "$ref": "895" + }, + "value": { + "$id": "911", + "kind": "string", + "type": { + "$ref": "896" + }, + "value": "dummyrg" + } + }, + { + "$id": "912", + "parameter": { + "$ref": "897" + }, + "value": { + "$id": "913", + "kind": "string", + "type": { + "$ref": "898" + }, + "value": "myPlaywrightAccount" + } + } + ], + "responses": [ + { + "$id": "914", + "response": { + "$ref": "902" + }, + "statusCode": 200, + "bodyValue": { + "$id": "915", + "kind": "model", + "type": { + "$ref": "391" + }, + "value": { + "$id": "916", + "value": { + "$id": "917", + "kind": "array", + "type": { + "$ref": "393" + }, + "value": [ + { + "$id": "918", + "kind": "model", + "type": { + "$ref": "357" + }, + "value": { + "$id": "919", + "id": { + "$id": "920", + "kind": "string", + "type": { + "$ref": "171" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dummyrg/providers/Microsoft.AzurePlaywrightService/accounts/myPlaywrightAccount/quotas/ScalableExecution" + }, + "name": { + "$id": "921", + "kind": "string", + "type": { + "$ref": "176" + }, + "value": "ScalableExecution" + }, + "type": { + "$id": "922", + "kind": "string", + "type": { + "$ref": "180" + }, + "value": "Microsoft.AzurePlaywrightService/Accounts/Quotas" + }, + "properties": { + "$id": "923", + "kind": "model", + "type": { + "$ref": "359" + }, + "value": { + "$id": "924", + "freeTrial": { + "$id": "925", + "kind": "model", + "type": { + "$ref": "361" + }, + "value": { + "$id": "926", + "createdAt": { + "$id": "927", + "kind": "string", + "type": { + "$ref": "363" + }, + "value": "2023-08-31T10:19:36.081Z" + }, + "expiryAt": { + "$id": "928", + "kind": "string", + "type": { + "$ref": "368" + }, + "value": "2023-08-31T10:19:36.081Z" + }, + "allocatedValue": { + "$id": "929", + "kind": "number", + "type": { + "$ref": "373" + }, + "value": 0 + }, + "usedValue": { + "$id": "930", + "kind": "number", + "type": { + "$ref": "377" + }, + "value": 0 + }, + "percentageUsed": { + "$id": "931", + "kind": "number", + "type": { + "$ref": "381" + }, + "value": 100 + } + } + }, + "provisioningState": { + "$id": "932", + "kind": "string", + "type": { + "$ref": "20" + }, + "value": "Succeeded" + } + } + } + } + }, + { + "$id": "933", + "kind": "model", + "type": { + "$ref": "357" + }, + "value": { + "$id": "934", + "id": { + "$id": "935", + "kind": "string", + "type": { + "$ref": "171" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dummyrg/providers/Microsoft.AzurePlaywrightService/accounts/myPlaywrightAccount/quotas/Reporting" + }, + "name": { + "$id": "936", + "kind": "string", + "type": { + "$ref": "176" + }, + "value": "Reporting" + }, + "type": { + "$id": "937", + "kind": "string", + "type": { + "$ref": "180" + }, + "value": "Microsoft.AzurePlaywrightService/Accounts/Quotas" + }, + "properties": { + "$id": "938", + "kind": "model", + "type": { + "$ref": "359" + }, + "value": { + "$id": "939", + "freeTrial": { + "$id": "940", + "kind": "model", + "type": { + "$ref": "361" + }, + "value": { + "$id": "941", + "createdAt": { + "$id": "942", + "kind": "string", + "type": { + "$ref": "363" + }, + "value": "2023-08-31T10:19:36.081Z" + }, + "expiryAt": { + "$id": "943", + "kind": "string", + "type": { + "$ref": "368" + }, + "value": "2023-08-31T10:19:36.081Z" + }, + "allocatedValue": { + "$id": "944", + "kind": "number", + "type": { + "$ref": "373" + }, + "value": 0 + }, + "usedValue": { + "$id": "945", + "kind": "number", + "type": { + "$ref": "377" + }, + "value": 0 + }, + "percentageUsed": { + "$id": "946", + "kind": "number", + "type": { + "$ref": "381" + }, + "value": 100 + } + } + }, + "provisioningState": { + "$id": "947", + "kind": "string", + "type": { + "$ref": "20" + }, + "value": "Succeeded" + } + } + } + } + } + ] + } + } + } + } + ] + } + ] + } + ], + "parameters": [ + { + "$id": "948", + "name": "endpoint", + "nameInRequest": "endpoint", + "doc": "Service host", + "type": { + "$id": "949", + "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": "950", + "type": { + "$id": "951", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "https://management.azure.com" + } + } + ], + "decorators": [ + { + "$id": "952", + "name": "Azure.ResourceManager.@armResourceOperations", + "arguments": { + "$id": "953" + } + } + ], + "crossLanguageDefinitionId": "Microsoft.AzurePlaywrightService.AccountQuotas", + "apiVersions": [ + "2024-12-01" + ], + "parent": { + "$ref": "401" + } + } + ] + } + ], + "auth": { + "$id": "954", + "oAuth2": { + "$id": "955", + "scopes": [ + "user_impersonation" + ] + } + } +} diff --git a/sdk/qumulo/Azure.ResourceManager.Qumulo/Configuration.json b/sdk/qumulo/Azure.ResourceManager.Qumulo/Configuration.json new file mode 100644 index 000000000000..731cb16f6b1b --- /dev/null +++ b/sdk/qumulo/Azure.ResourceManager.Qumulo/Configuration.json @@ -0,0 +1,12 @@ +{ + "output-folder": ".", + "namespace": "Azure.ResourceManager.Qumulo", + "library-name": "Azure.ResourceManager.Qumulo", + "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/qumulo/Azure.ResourceManager.Qumulo/tsp-location.yaml b/sdk/qumulo/Azure.ResourceManager.Qumulo/tsp-location.yaml new file mode 100644 index 000000000000..d3b16c3b5383 --- /dev/null +++ b/sdk/qumulo/Azure.ResourceManager.Qumulo/tsp-location.yaml @@ -0,0 +1,4 @@ +directory: specification/liftrqumulo/Qumulo.Storage.Management +commit: 6e702986ee542ebd38d0ab2e2f2c00ab48a50b45 +repo: Azure/azure-rest-api-specs +additionalDirectories: diff --git a/sdk/qumulo/Azure.ResourceManager.Qumulo/tspCodeModel.json b/sdk/qumulo/Azure.ResourceManager.Qumulo/tspCodeModel.json new file mode 100644 index 000000000000..dcb15c34f991 --- /dev/null +++ b/sdk/qumulo/Azure.ResourceManager.Qumulo/tspCodeModel.json @@ -0,0 +1,8539 @@ +{ + "$id": "1", + "name": "Qumulo.Storage", + "apiVersions": [ + "2024-06-19" + ], + "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.Qumulo", + "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.Qumulo", + "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": "MarketplaceSubscriptionStatus", + "crossLanguageDefinitionId": "LiftrBase.MarketplaceSubscriptionStatus", + "valueType": { + "$id": "15", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "16", + "kind": "enumvalue", + "name": "PendingFulfillmentStart", + "value": "PendingFulfillmentStart", + "valueType": { + "$id": "17", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "14" + }, + "doc": "Fulfillment has not started", + "decorators": [] + }, + { + "$id": "18", + "kind": "enumvalue", + "name": "Subscribed", + "value": "Subscribed", + "valueType": { + "$id": "19", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "14" + }, + "doc": "Marketplace offer is subscribed", + "decorators": [] + }, + { + "$id": "20", + "kind": "enumvalue", + "name": "Suspended", + "value": "Suspended", + "valueType": { + "$id": "21", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "14" + }, + "doc": "Marketplace offer is suspended because of non payment", + "decorators": [] + }, + { + "$id": "22", + "kind": "enumvalue", + "name": "Unsubscribed", + "value": "Unsubscribed", + "valueType": { + "$id": "23", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "14" + }, + "doc": "Marketplace offer is unsubscribed", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.Qumulo", + "doc": "Marketplace subscription status of the file system resource", + "isFixed": false, + "isFlags": false, + "usage": "Output,Json,LroInitial,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "24", + "kind": "enum", + "name": "ProvisioningState", + "crossLanguageDefinitionId": "LiftrBase.ProvisioningState", + "valueType": { + "$id": "25", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "26", + "kind": "enumvalue", + "name": "Accepted", + "value": "Accepted", + "valueType": { + "$id": "27", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "24" + }, + "doc": "File system resource creation request accepted", + "decorators": [] + }, + { + "$id": "28", + "kind": "enumvalue", + "name": "Creating", + "value": "Creating", + "valueType": { + "$id": "29", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "24" + }, + "doc": "File system resource creation started", + "decorators": [] + }, + { + "$id": "30", + "kind": "enumvalue", + "name": "Updating", + "value": "Updating", + "valueType": { + "$id": "31", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "24" + }, + "doc": "File system resource is being updated", + "decorators": [] + }, + { + "$id": "32", + "kind": "enumvalue", + "name": "Deleting", + "value": "Deleting", + "valueType": { + "$id": "33", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "24" + }, + "doc": "File system resource deletion started", + "decorators": [] + }, + { + "$id": "34", + "kind": "enumvalue", + "name": "Succeeded", + "value": "Succeeded", + "valueType": { + "$id": "35", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "24" + }, + "doc": "File system resource creation successful", + "decorators": [] + }, + { + "$id": "36", + "kind": "enumvalue", + "name": "Failed", + "value": "Failed", + "valueType": { + "$id": "37", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "24" + }, + "doc": "File system resource creation failed", + "decorators": [] + }, + { + "$id": "38", + "kind": "enumvalue", + "name": "Canceled", + "value": "Canceled", + "valueType": { + "$id": "39", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "24" + }, + "doc": "File system resource creation canceled", + "decorators": [] + }, + { + "$id": "40", + "kind": "enumvalue", + "name": "Deleted", + "value": "Deleted", + "valueType": { + "$id": "41", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "24" + }, + "doc": "File system resource is deleted", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.Qumulo", + "doc": "Provisioning State of the File system resource", + "isFixed": false, + "isFlags": false, + "usage": "Output,Json,LroInitial,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "42", + "kind": "enum", + "name": "ManagedServiceIdentityType", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ManagedServiceIdentityType", + "valueType": { + "$id": "43", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "44", + "kind": "enumvalue", + "name": "None", + "value": "None", + "valueType": { + "$id": "45", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "42" + }, + "doc": "No managed identity.", + "decorators": [] + }, + { + "$id": "46", + "kind": "enumvalue", + "name": "SystemAssigned", + "value": "SystemAssigned", + "valueType": { + "$id": "47", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "42" + }, + "doc": "System assigned managed identity.", + "decorators": [] + }, + { + "$id": "48", + "kind": "enumvalue", + "name": "UserAssigned", + "value": "UserAssigned", + "valueType": { + "$id": "49", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "42" + }, + "doc": "User assigned managed identity.", + "decorators": [] + }, + { + "$id": "50", + "kind": "enumvalue", + "name": "SystemAssigned,UserAssigned", + "value": "SystemAssigned,UserAssigned", + "valueType": { + "$id": "51", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "42" + }, + "doc": "System and user assigned managed identity.", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.Qumulo", + "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": "52", + "kind": "enum", + "name": "createdByType", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.createdByType", + "valueType": { + "$id": "53", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "54", + "kind": "enumvalue", + "name": "User", + "value": "User", + "valueType": { + "$id": "55", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "52" + }, + "doc": "The entity was created by a user.", + "decorators": [] + }, + { + "$id": "56", + "kind": "enumvalue", + "name": "Application", + "value": "Application", + "valueType": { + "$id": "57", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "52" + }, + "doc": "The entity was created by an application.", + "decorators": [] + }, + { + "$id": "58", + "kind": "enumvalue", + "name": "ManagedIdentity", + "value": "ManagedIdentity", + "valueType": { + "$id": "59", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "52" + }, + "doc": "The entity was created by a managed identity.", + "decorators": [] + }, + { + "$id": "60", + "kind": "enumvalue", + "name": "Key", + "value": "Key", + "valueType": { + "$id": "61", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "52" + }, + "doc": "The entity was created by a key.", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.Qumulo", + "doc": "The kind of entity that created the resource.", + "isFixed": false, + "isFlags": false, + "usage": "Output,Json,LroInitial,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "62", + "kind": "enum", + "name": "ResourceProvisioningState", + "crossLanguageDefinitionId": "Azure.ResourceManager.ResourceProvisioningState", + "valueType": { + "$id": "63", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "64", + "kind": "enumvalue", + "name": "Succeeded", + "value": "Succeeded", + "valueType": { + "$id": "65", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "62" + }, + "doc": "Resource has been created.", + "decorators": [] + }, + { + "$id": "66", + "kind": "enumvalue", + "name": "Failed", + "value": "Failed", + "valueType": { + "$id": "67", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "62" + }, + "doc": "Resource creation failed.", + "decorators": [] + }, + { + "$id": "68", + "kind": "enumvalue", + "name": "Canceled", + "value": "Canceled", + "valueType": { + "$id": "69", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "62" + }, + "doc": "Resource creation was canceled.", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.Qumulo", + "doc": "The provisioning state of a resource type.", + "isFixed": false, + "isFlags": false, + "usage": "LroPolling", + "decorators": [] + }, + { + "$id": "70", + "kind": "enum", + "name": "Versions", + "crossLanguageDefinitionId": "Qumulo.Storage.Versions", + "valueType": { + "$id": "71", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "72", + "kind": "enumvalue", + "name": "v2_stable", + "value": "2024-06-19", + "valueType": { + "$id": "73", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "70" + }, + "doc": "The 2024-06-19 Stable API version.", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.Qumulo", + "doc": "The available API versions.", + "isFixed": true, + "isFlags": false, + "usage": "ApiVersionEnum", + "decorators": [] + } + ], + "models": [ + { + "$id": "74", + "kind": "model", + "name": "OperationListResult", + "namespace": "Azure.ResourceManager.Qumulo", + "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": "75", + "kind": "property", + "name": "value", + "serializedName": "value", + "doc": "The Operation items on this page", + "type": { + "$id": "76", + "kind": "array", + "name": "ArrayOperation", + "valueType": { + "$id": "77", + "kind": "model", + "name": "Operation", + "namespace": "Azure.ResourceManager.Qumulo", + "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": "78", + "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": "79", + "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": "80", + "json": { + "$id": "81", + "name": "name" + } + } + }, + { + "$id": "82", + "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": "83", + "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": "84", + "json": { + "$id": "85", + "name": "isDataAction" + } + } + }, + { + "$id": "86", + "kind": "property", + "name": "display", + "serializedName": "display", + "doc": "Localized display information for this particular operation.", + "type": { + "$id": "87", + "kind": "model", + "name": "OperationDisplay", + "namespace": "Azure.ResourceManager.Qumulo", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.OperationDisplay", + "usage": "Output,Json", + "doc": "Localized display information for and operation.", + "decorators": [], + "properties": [ + { + "$id": "88", + "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": "89", + "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": "90", + "json": { + "$id": "91", + "name": "provider" + } + } + }, + { + "$id": "92", + "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": "93", + "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": "94", + "json": { + "$id": "95", + "name": "resource" + } + } + }, + { + "$id": "96", + "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": "97", + "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": "98", + "json": { + "$id": "99", + "name": "operation" + } + } + }, + { + "$id": "100", + "kind": "property", + "name": "description", + "serializedName": "description", + "doc": "The short, localized friendly description of the operation; suitable for tool tips and detailed views.", + "type": { + "$id": "101", + "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": "102", + "json": { + "$id": "103", + "name": "description" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.Operation.display", + "serializationOptions": { + "$id": "104", + "json": { + "$id": "105", + "name": "display" + } + } + }, + { + "$id": "106", + "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": "107", + "json": { + "$id": "108", + "name": "origin" + } + } + }, + { + "$id": "109", + "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": "110", + "json": { + "$id": "111", + "name": "actionType" + } + } + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.OperationListResult.value", + "serializationOptions": { + "$id": "112", + "json": { + "$id": "113", + "name": "value" + } + } + }, + { + "$id": "114", + "kind": "property", + "name": "nextLink", + "serializedName": "nextLink", + "doc": "The link to the next page of items", + "type": { + "$id": "115", + "kind": "url", + "name": "ResourceLocation", + "crossLanguageDefinitionId": "TypeSpec.Rest.ResourceLocation", + "baseType": { + "$id": "116", + "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": "117", + "json": { + "$id": "118", + "name": "nextLink" + } + } + } + ] + }, + { + "$ref": "77" + }, + { + "$ref": "87" + }, + { + "$id": "119", + "kind": "model", + "name": "ErrorResponse", + "namespace": "Azure.ResourceManager.Qumulo", + "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": "120", + "kind": "property", + "name": "error", + "serializedName": "error", + "doc": "The error object.", + "type": { + "$id": "121", + "kind": "model", + "name": "ErrorDetail", + "namespace": "Azure.ResourceManager.Qumulo", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorDetail", + "usage": "Json,Exception,LroPolling", + "doc": "The error detail.", + "decorators": [], + "properties": [ + { + "$id": "122", + "kind": "property", + "name": "code", + "serializedName": "code", + "doc": "The error code.", + "type": { + "$id": "123", + "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": "124", + "json": { + "$id": "125", + "name": "code" + } + } + }, + { + "$id": "126", + "kind": "property", + "name": "message", + "serializedName": "message", + "doc": "The error message.", + "type": { + "$id": "127", + "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": "128", + "json": { + "$id": "129", + "name": "message" + } + } + }, + { + "$id": "130", + "kind": "property", + "name": "target", + "serializedName": "target", + "doc": "The error target.", + "type": { + "$id": "131", + "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": "132", + "json": { + "$id": "133", + "name": "target" + } + } + }, + { + "$id": "134", + "kind": "property", + "name": "details", + "serializedName": "details", + "doc": "The error details.", + "type": { + "$id": "135", + "kind": "array", + "name": "ArrayErrorDetail", + "valueType": { + "$ref": "121" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorDetail.details", + "serializationOptions": { + "$id": "136", + "json": { + "$id": "137", + "name": "details" + } + } + }, + { + "$id": "138", + "kind": "property", + "name": "additionalInfo", + "serializedName": "additionalInfo", + "doc": "The error additional info.", + "type": { + "$id": "139", + "kind": "array", + "name": "ArrayErrorAdditionalInfo", + "valueType": { + "$id": "140", + "kind": "model", + "name": "ErrorAdditionalInfo", + "namespace": "Azure.ResourceManager.Qumulo", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorAdditionalInfo", + "usage": "Json,Exception,LroPolling", + "doc": "The resource management error additional info.", + "decorators": [], + "properties": [ + { + "$id": "141", + "kind": "property", + "name": "type", + "serializedName": "type", + "doc": "The additional info type.", + "type": { + "$id": "142", + "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": "143", + "json": { + "$id": "144", + "name": "type" + } + } + }, + { + "$id": "145", + "kind": "property", + "name": "info", + "serializedName": "info", + "doc": "The additional info.", + "type": { + "$id": "146", + "kind": "model", + "name": "ErrorAdditionalInfoInfo", + "namespace": "Azure.ResourceManager.Qumulo", + "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": "147", + "json": { + "$id": "148", + "name": "info" + } + } + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorDetail.additionalInfo", + "serializationOptions": { + "$id": "149", + "json": { + "$id": "150", + "name": "additionalInfo" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorResponse.error", + "serializationOptions": { + "$id": "151", + "json": { + "$id": "152", + "name": "error" + } + } + } + ] + }, + { + "$ref": "121" + }, + { + "$ref": "140" + }, + { + "$ref": "146" + }, + { + "$id": "153", + "kind": "model", + "name": "FileSystemResource", + "namespace": "Azure.ResourceManager.Qumulo", + "crossLanguageDefinitionId": "LiftrBase.Storage.FileSystemResource", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Concrete tracked resource types can be created by aliasing this type using a specific property type.", + "decorators": [], + "baseModel": { + "$id": "154", + "kind": "model", + "name": "TrackedResource", + "namespace": "Azure.ResourceManager.Qumulo", + "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": "155", + "kind": "model", + "name": "Resource", + "namespace": "Azure.ResourceManager.Qumulo", + "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": "156", + "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": "157", + "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": "158", + "json": { + "$id": "159", + "name": "id" + } + } + }, + { + "$id": "160", + "kind": "property", + "name": "name", + "serializedName": "name", + "doc": "The name of the resource", + "type": { + "$id": "161", + "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": "162", + "json": { + "$id": "163", + "name": "name" + } + } + }, + { + "$id": "164", + "kind": "property", + "name": "type", + "serializedName": "type", + "doc": "The type of the resource. E.g. \"Microsoft.Compute/virtualMachines\" or \"Microsoft.Storage/storageAccounts\"", + "type": { + "$id": "165", + "kind": "string", + "name": "armResourceType", + "crossLanguageDefinitionId": "Azure.Core.armResourceType", + "baseType": { + "$id": "166", + "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": "167", + "json": { + "$id": "168", + "name": "type" + } + } + }, + { + "$id": "169", + "kind": "property", + "name": "systemData", + "serializedName": "systemData", + "doc": "Azure Resource Manager metadata containing createdBy and modifiedBy information.", + "type": { + "$id": "170", + "kind": "model", + "name": "SystemData", + "namespace": "Azure.ResourceManager.Qumulo", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.SystemData", + "usage": "Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Metadata pertaining to creation and last modification of the resource.", + "decorators": [], + "properties": [ + { + "$id": "171", + "kind": "property", + "name": "createdBy", + "serializedName": "createdBy", + "doc": "The identity that created the resource.", + "type": { + "$id": "172", + "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": "173", + "json": { + "$id": "174", + "name": "createdBy" + } + } + }, + { + "$id": "175", + "kind": "property", + "name": "createdByType", + "serializedName": "createdByType", + "doc": "The type of identity that created the resource.", + "type": { + "$ref": "52" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.SystemData.createdByType", + "serializationOptions": { + "$id": "176", + "json": { + "$id": "177", + "name": "createdByType" + } + } + }, + { + "$id": "178", + "kind": "property", + "name": "createdAt", + "serializedName": "createdAt", + "doc": "The timestamp of resource creation (UTC).", + "type": { + "$id": "179", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "rfc3339", + "wireType": { + "$id": "180", + "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": "181", + "json": { + "$id": "182", + "name": "createdAt" + } + } + }, + { + "$id": "183", + "kind": "property", + "name": "lastModifiedBy", + "serializedName": "lastModifiedBy", + "doc": "The identity that last modified the resource.", + "type": { + "$id": "184", + "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": "185", + "json": { + "$id": "186", + "name": "lastModifiedBy" + } + } + }, + { + "$id": "187", + "kind": "property", + "name": "lastModifiedByType", + "serializedName": "lastModifiedByType", + "doc": "The type of identity that last modified the resource.", + "type": { + "$ref": "52" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.SystemData.lastModifiedByType", + "serializationOptions": { + "$id": "188", + "json": { + "$id": "189", + "name": "lastModifiedByType" + } + } + }, + { + "$id": "190", + "kind": "property", + "name": "lastModifiedAt", + "serializedName": "lastModifiedAt", + "doc": "The timestamp of resource last modification (UTC)", + "type": { + "$id": "191", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "rfc3339", + "wireType": { + "$id": "192", + "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": "193", + "json": { + "$id": "194", + "name": "lastModifiedAt" + } + } + } + ] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.Resource.systemData", + "serializationOptions": { + "$id": "195", + "json": { + "$id": "196", + "name": "systemData" + } + } + } + ] + }, + "properties": [ + { + "$id": "197", + "kind": "property", + "name": "tags", + "serializedName": "tags", + "doc": "Resource tags.", + "type": { + "$id": "198", + "kind": "dict", + "keyType": { + "$id": "199", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "valueType": { + "$id": "200", + "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": "201", + "json": { + "$id": "202", + "name": "tags" + } + } + }, + { + "$id": "203", + "kind": "property", + "name": "location", + "serializedName": "location", + "doc": "The geo-location where the resource lives", + "type": { + "$id": "204", + "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": "205", + "json": { + "$id": "206", + "name": "location" + } + } + } + ] + }, + "properties": [ + { + "$id": "207", + "kind": "property", + "name": "properties", + "serializedName": "properties", + "doc": "The resource-specific properties for this resource.", + "type": { + "$id": "208", + "kind": "model", + "name": "FileSystemResourceProperties", + "namespace": "Azure.ResourceManager.Qumulo", + "crossLanguageDefinitionId": "LiftrBase.Storage.FileSystemResourceProperties", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Properties specific to the Qumulo File System resource", + "decorators": [], + "properties": [ + { + "$id": "209", + "kind": "property", + "name": "marketplaceDetails", + "serializedName": "marketplaceDetails", + "doc": "Marketplace details", + "type": { + "$id": "210", + "kind": "model", + "name": "MarketplaceDetails", + "namespace": "Azure.ResourceManager.Qumulo", + "crossLanguageDefinitionId": "LiftrBase.MarketplaceDetails", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "MarketplaceDetails of Qumulo FileSystem resource", + "decorators": [], + "properties": [ + { + "$id": "211", + "kind": "property", + "name": "marketplaceSubscriptionId", + "serializedName": "marketplaceSubscriptionId", + "doc": "Marketplace Subscription Id", + "type": { + "$id": "212", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "LiftrBase.MarketplaceDetails.marketplaceSubscriptionId", + "serializationOptions": { + "$id": "213", + "json": { + "$id": "214", + "name": "marketplaceSubscriptionId" + } + } + }, + { + "$id": "215", + "kind": "property", + "name": "planId", + "serializedName": "planId", + "doc": "Plan Id", + "type": { + "$id": "216", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "LiftrBase.MarketplaceDetails.planId", + "serializationOptions": { + "$id": "217", + "json": { + "$id": "218", + "name": "planId" + } + } + }, + { + "$id": "219", + "kind": "property", + "name": "offerId", + "serializedName": "offerId", + "doc": "Offer Id", + "type": { + "$id": "220", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "LiftrBase.MarketplaceDetails.offerId", + "serializationOptions": { + "$id": "221", + "json": { + "$id": "222", + "name": "offerId" + } + } + }, + { + "$id": "223", + "kind": "property", + "name": "publisherId", + "serializedName": "publisherId", + "doc": "Publisher Id", + "type": { + "$id": "224", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "LiftrBase.MarketplaceDetails.publisherId", + "serializationOptions": { + "$id": "225", + "json": { + "$id": "226", + "name": "publisherId" + } + } + }, + { + "$id": "227", + "kind": "property", + "name": "termUnit", + "serializedName": "termUnit", + "doc": "Term Unit", + "type": { + "$id": "228", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "LiftrBase.MarketplaceDetails.termUnit", + "serializationOptions": { + "$id": "229", + "json": { + "$id": "230", + "name": "termUnit" + } + } + }, + { + "$id": "231", + "kind": "property", + "name": "marketplaceSubscriptionStatus", + "serializedName": "marketplaceSubscriptionStatus", + "doc": "Marketplace subscription status", + "type": { + "$ref": "14" + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "LiftrBase.MarketplaceDetails.marketplaceSubscriptionStatus", + "serializationOptions": { + "$id": "232", + "json": { + "$id": "233", + "name": "marketplaceSubscriptionStatus" + } + } + } + ] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "LiftrBase.Storage.FileSystemResourceProperties.marketplaceDetails", + "serializationOptions": { + "$id": "234", + "json": { + "$id": "235", + "name": "marketplaceDetails" + } + } + }, + { + "$id": "236", + "kind": "property", + "name": "provisioningState", + "serializedName": "provisioningState", + "doc": "Provisioning State of the resource", + "type": { + "$ref": "24" + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "LiftrBase.Storage.FileSystemResourceProperties.provisioningState", + "serializationOptions": { + "$id": "237", + "json": { + "$id": "238", + "name": "provisioningState" + } + } + }, + { + "$id": "239", + "kind": "property", + "name": "storageSku", + "serializedName": "storageSku", + "doc": "Storage Sku", + "type": { + "$id": "240", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "LiftrBase.Storage.FileSystemResourceProperties.storageSku", + "serializationOptions": { + "$id": "241", + "json": { + "$id": "242", + "name": "storageSku" + } + } + }, + { + "$id": "243", + "kind": "property", + "name": "userDetails", + "serializedName": "userDetails", + "doc": "User Details", + "type": { + "$id": "244", + "kind": "model", + "name": "UserDetails", + "namespace": "Azure.ResourceManager.Qumulo", + "crossLanguageDefinitionId": "LiftrBase.UserDetails", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "User Details of Qumulo FileSystem resource", + "decorators": [], + "properties": [ + { + "$id": "245", + "kind": "property", + "name": "email", + "serializedName": "email", + "doc": "User Email", + "type": { + "$id": "246", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "LiftrBase.UserDetails.email", + "serializationOptions": { + "$id": "247", + "json": { + "$id": "248", + "name": "email" + } + } + } + ] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "LiftrBase.Storage.FileSystemResourceProperties.userDetails", + "serializationOptions": { + "$id": "249", + "json": { + "$id": "250", + "name": "userDetails" + } + } + }, + { + "$id": "251", + "kind": "property", + "name": "delegatedSubnetId", + "serializedName": "delegatedSubnetId", + "doc": "Delegated subnet id for Vnet injection", + "type": { + "$id": "252", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "LiftrBase.Storage.FileSystemResourceProperties.delegatedSubnetId", + "serializationOptions": { + "$id": "253", + "json": { + "$id": "254", + "name": "delegatedSubnetId" + } + } + }, + { + "$id": "255", + "kind": "property", + "name": "clusterLoginUrl", + "serializedName": "clusterLoginUrl", + "doc": "File system Id of the resource", + "type": { + "$id": "256", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "LiftrBase.Storage.FileSystemResourceProperties.clusterLoginUrl", + "serializationOptions": { + "$id": "257", + "json": { + "$id": "258", + "name": "clusterLoginUrl" + } + } + }, + { + "$id": "259", + "kind": "property", + "name": "privateIPs", + "serializedName": "privateIPs", + "doc": "Private IPs of the resource", + "type": { + "$id": "260", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "261", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "LiftrBase.Storage.FileSystemResourceProperties.privateIPs", + "serializationOptions": { + "$id": "262", + "json": { + "$id": "263", + "name": "privateIPs" + } + } + }, + { + "$id": "264", + "kind": "property", + "name": "adminPassword", + "serializedName": "adminPassword", + "doc": "Initial administrator password of the resource", + "type": { + "$id": "265", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "LiftrBase.Storage.FileSystemResourceProperties.adminPassword", + "serializationOptions": { + "$id": "266", + "json": { + "$id": "267", + "name": "adminPassword" + } + } + }, + { + "$id": "268", + "kind": "property", + "name": "availabilityZone", + "serializedName": "availabilityZone", + "doc": "Availability zone", + "type": { + "$id": "269", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "LiftrBase.Storage.FileSystemResourceProperties.availabilityZone", + "serializationOptions": { + "$id": "270", + "json": { + "$id": "271", + "name": "availabilityZone" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "LiftrBase.Storage.FileSystemResource.properties", + "serializationOptions": { + "$id": "272", + "json": { + "$id": "273", + "name": "properties" + } + } + }, + { + "$id": "274", + "kind": "property", + "name": "identity", + "serializedName": "identity", + "doc": "The managed service identities assigned to this resource.", + "type": { + "$id": "275", + "kind": "model", + "name": "ManagedServiceIdentity", + "namespace": "Azure.ResourceManager.Qumulo", + "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": "276", + "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": "277", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "278", + "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": "279", + "json": { + "$id": "280", + "name": "principalId" + } + } + }, + { + "$id": "281", + "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": "282", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "283", + "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": "284", + "json": { + "$id": "285", + "name": "tenantId" + } + } + }, + { + "$id": "286", + "kind": "property", + "name": "type", + "serializedName": "type", + "doc": "The type of managed identity assigned to this resource.", + "type": { + "$ref": "42" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ManagedServiceIdentity.type", + "serializationOptions": { + "$id": "287", + "json": { + "$id": "288", + "name": "type" + } + } + }, + { + "$id": "289", + "kind": "property", + "name": "userAssignedIdentities", + "serializedName": "userAssignedIdentities", + "doc": "The identities assigned to this resource by the user.", + "type": { + "$id": "290", + "kind": "dict", + "keyType": { + "$id": "291", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "valueType": { + "$id": "292", + "kind": "model", + "name": "UserAssignedIdentity", + "namespace": "Azure.ResourceManager.Qumulo", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.UserAssignedIdentity", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "User assigned identity properties", + "decorators": [], + "properties": [ + { + "$id": "293", + "kind": "property", + "name": "clientId", + "serializedName": "clientId", + "doc": "The client ID of the assigned identity.", + "type": { + "$id": "294", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "295", + "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": "296", + "json": { + "$id": "297", + "name": "clientId" + } + } + }, + { + "$id": "298", + "kind": "property", + "name": "principalId", + "serializedName": "principalId", + "doc": "The principal ID of the assigned identity.", + "type": { + "$id": "299", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "300", + "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": "301", + "json": { + "$id": "302", + "name": "principalId" + } + } + } + ] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ManagedServiceIdentity.userAssignedIdentities", + "serializationOptions": { + "$id": "303", + "json": { + "$id": "304", + "name": "userAssignedIdentities" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "LiftrBase.Storage.FileSystemResource.identity", + "serializationOptions": { + "$id": "305", + "json": { + "$id": "306", + "name": "identity" + } + } + } + ] + }, + { + "$ref": "208" + }, + { + "$ref": "210" + }, + { + "$ref": "244" + }, + { + "$ref": "275" + }, + { + "$ref": "292" + }, + { + "$ref": "154" + }, + { + "$ref": "155" + }, + { + "$ref": "170" + }, + { + "$id": "307", + "kind": "model", + "name": "ArmOperationStatusResourceProvisioningState", + "namespace": "Azure.ResourceManager.Qumulo", + "crossLanguageDefinitionId": "Azure.ResourceManager.ArmOperationStatus", + "usage": "LroPolling", + "doc": "Standard Azure Resource Manager operation status response", + "decorators": [], + "properties": [ + { + "$id": "308", + "kind": "property", + "name": "status", + "serializedName": "status", + "doc": "The operation status", + "type": { + "$ref": "62" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.ArmOperationStatus.status", + "serializationOptions": { + "$id": "309", + "json": { + "$id": "310", + "name": "status" + } + } + }, + { + "$id": "311", + "kind": "property", + "name": "name", + "serializedName": "name", + "doc": "The name of the operationStatus resource", + "type": { + "$id": "312", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.ArmOperationStatus.name", + "serializationOptions": { + "$id": "313", + "json": { + "$id": "314", + "name": "name" + } + } + }, + { + "$id": "315", + "kind": "property", + "name": "startTime", + "serializedName": "startTime", + "doc": "Operation start time", + "type": { + "$id": "316", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "rfc3339", + "wireType": { + "$id": "317", + "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": "318", + "json": { + "$id": "319", + "name": "startTime" + } + } + }, + { + "$id": "320", + "kind": "property", + "name": "endTime", + "serializedName": "endTime", + "doc": "Operation complete time", + "type": { + "$id": "321", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "rfc3339", + "wireType": { + "$id": "322", + "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": "323", + "json": { + "$id": "324", + "name": "endTime" + } + } + }, + { + "$id": "325", + "kind": "property", + "name": "percentComplete", + "serializedName": "percentComplete", + "doc": "The progress made toward completing the operation", + "type": { + "$id": "326", + "kind": "float64", + "name": "float64", + "crossLanguageDefinitionId": "TypeSpec.float64", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.ArmOperationStatus.percentComplete", + "serializationOptions": { + "$id": "327", + "json": { + "$id": "328", + "name": "percentComplete" + } + } + }, + { + "$id": "329", + "kind": "property", + "name": "error", + "serializedName": "error", + "doc": "Errors that occurred if the operation ended with Canceled or Failed status", + "type": { + "$ref": "121" + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.ArmOperationStatus.error", + "serializationOptions": { + "$id": "330", + "json": { + "$id": "331", + "name": "error" + } + } + } + ] + }, + { + "$id": "332", + "kind": "model", + "name": "FileSystemResourceUpdate", + "namespace": "Azure.ResourceManager.Qumulo", + "crossLanguageDefinitionId": "LiftrBase.Storage.FileSystemResourceUpdate", + "usage": "Input,Json", + "doc": "The type used for update operations of the FileSystemResource.", + "decorators": [], + "properties": [ + { + "$id": "333", + "kind": "property", + "name": "identity", + "serializedName": "identity", + "doc": "The managed service identities assigned to this resource.", + "type": { + "$ref": "275" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "LiftrBase.Storage.FileSystemResourceUpdate.identity", + "serializationOptions": { + "$id": "334", + "json": { + "$id": "335", + "name": "identity" + } + } + }, + { + "$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": "LiftrBase.Storage.FileSystemResourceUpdate.tags", + "serializationOptions": { + "$id": "340", + "json": { + "$id": "341", + "name": "tags" + } + } + }, + { + "$id": "342", + "kind": "property", + "name": "properties", + "serializedName": "properties", + "doc": "The updatable properties of the FileSystemResource.", + "type": { + "$id": "343", + "kind": "model", + "name": "FileSystemResourceUpdateProperties", + "namespace": "Azure.ResourceManager.Qumulo", + "crossLanguageDefinitionId": "LiftrBase.Storage.FileSystemResourceUpdateProperties", + "usage": "Input,Json", + "doc": "The updatable properties of the FileSystemResource.", + "decorators": [], + "properties": [ + { + "$id": "344", + "kind": "property", + "name": "marketplaceDetails", + "serializedName": "marketplaceDetails", + "doc": "Marketplace details", + "type": { + "$ref": "210" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "LiftrBase.Storage.FileSystemResourceUpdateProperties.marketplaceDetails", + "serializationOptions": { + "$id": "345", + "json": { + "$id": "346", + "name": "marketplaceDetails" + } + } + }, + { + "$id": "347", + "kind": "property", + "name": "userDetails", + "serializedName": "userDetails", + "doc": "User Details", + "type": { + "$ref": "244" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "LiftrBase.Storage.FileSystemResourceUpdateProperties.userDetails", + "serializationOptions": { + "$id": "348", + "json": { + "$id": "349", + "name": "userDetails" + } + } + }, + { + "$id": "350", + "kind": "property", + "name": "delegatedSubnetId", + "serializedName": "delegatedSubnetId", + "doc": "Delegated subnet id for Vnet injection", + "type": { + "$id": "351", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "LiftrBase.Storage.FileSystemResourceUpdateProperties.delegatedSubnetId", + "serializationOptions": { + "$id": "352", + "json": { + "$id": "353", + "name": "delegatedSubnetId" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "LiftrBase.Storage.FileSystemResourceUpdate.properties", + "serializationOptions": { + "$id": "354", + "json": { + "$id": "355", + "name": "properties" + } + } + } + ] + }, + { + "$ref": "343" + }, + { + "$id": "356", + "kind": "model", + "name": "FileSystemResourceListResult", + "namespace": "Azure.ResourceManager.Qumulo", + "crossLanguageDefinitionId": "Azure.ResourceManager.ResourceListResult", + "usage": "Output,Json", + "doc": "The response of a FileSystemResource list operation.", + "decorators": [], + "properties": [ + { + "$id": "357", + "kind": "property", + "name": "value", + "serializedName": "value", + "doc": "The FileSystemResource items on this page", + "type": { + "$id": "358", + "kind": "array", + "name": "ArrayFileSystemResource", + "valueType": { + "$ref": "153" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.ResourceListResult.value", + "serializationOptions": { + "$id": "359", + "json": { + "$id": "360", + "name": "value" + } + } + }, + { + "$id": "361", + "kind": "property", + "name": "nextLink", + "serializedName": "nextLink", + "doc": "The link to the next page of items", + "type": { + "$id": "362", + "kind": "url", + "name": "ResourceLocation", + "crossLanguageDefinitionId": "TypeSpec.Rest.ResourceLocation", + "baseType": { + "$id": "363", + "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": "364", + "json": { + "$id": "365", + "name": "nextLink" + } + } + } + ] + } + ], + "clients": [ + { + "$id": "366", + "kind": "client", + "name": "StorageClient", + "namespace": "Azure.ResourceManager.Qumulo", + "operations": [], + "parameters": [ + { + "$id": "367", + "name": "endpoint", + "nameInRequest": "endpoint", + "doc": "Service host", + "type": { + "$id": "368", + "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": "369", + "type": { + "$id": "370", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "https://management.azure.com" + } + } + ], + "decorators": [ + { + "$id": "371", + "name": "TypeSpec.@service", + "arguments": { + "$id": "372", + "options": { + "$id": "373", + "title": "Qumulo.Storage" + } + } + } + ], + "crossLanguageDefinitionId": "Qumulo.Storage", + "apiVersions": [ + "2024-06-19" + ], + "children": [ + { + "$id": "374", + "kind": "client", + "name": "Operations", + "namespace": "Azure.ResourceManager.Qumulo", + "operations": [ + { + "$id": "375", + "name": "list", + "resourceName": "Operations", + "doc": "List the operations for the provider", + "accessibility": "public", + "parameters": [ + { + "$id": "376", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "377", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "378", + "type": { + "$id": "379", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2024-06-19" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "380", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "381", + "kind": "constant", + "valueType": { + "$id": "382", + "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": "383", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "74" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "GET", + "uri": "{endpoint}", + "path": "/providers/Qumulo.Storage/operations", + "bufferResponse": true, + "paging": { + "$id": "384", + "itemPropertySegments": [ + "value" + ], + "nextLink": { + "$id": "385", + "responseSegments": [ + "nextLink" + ], + "responseLocation": "Body" + } + }, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Azure.ResourceManager.Operations.list", + "decorators": [], + "examples": [ + { + "$id": "386", + "kind": "http", + "name": "Operations_List", + "description": "Operations_List", + "filePath": "2024-06-19/Operations_List_MaximumSet_Gen.json", + "parameters": [ + { + "$id": "387", + "parameter": { + "$ref": "376" + }, + "value": { + "$id": "388", + "kind": "string", + "type": { + "$ref": "377" + }, + "value": "2024-06-19" + } + } + ], + "responses": [ + { + "$id": "389", + "response": { + "$ref": "383" + }, + "statusCode": 200, + "bodyValue": { + "$id": "390", + "kind": "model", + "type": { + "$ref": "74" + }, + "value": { + "$id": "391", + "value": { + "$id": "392", + "kind": "array", + "type": { + "$ref": "76" + }, + "value": [ + { + "$id": "393", + "kind": "model", + "type": { + "$ref": "77" + }, + "value": { + "$id": "394", + "name": { + "$id": "395", + "kind": "string", + "type": { + "$ref": "79" + }, + "value": "melhpzamnyx" + }, + "isDataAction": { + "$id": "396", + "kind": "boolean", + "type": { + "$ref": "83" + }, + "value": true + }, + "display": { + "$id": "397", + "kind": "model", + "type": { + "$ref": "87" + }, + "value": { + "$id": "398", + "provider": { + "$id": "399", + "kind": "string", + "type": { + "$ref": "89" + }, + "value": "ilyrhd" + }, + "resource": { + "$id": "400", + "kind": "string", + "type": { + "$ref": "93" + }, + "value": "vjz" + }, + "operation": { + "$id": "401", + "kind": "string", + "type": { + "$ref": "97" + }, + "value": "ayfoeuuyhtwjafroqzimyujr" + }, + "description": { + "$id": "402", + "kind": "string", + "type": { + "$ref": "101" + }, + "value": "vodhl" + } + } + }, + "origin": { + "$id": "403", + "kind": "string", + "type": { + "$ref": "2" + }, + "value": "user" + }, + "actionType": { + "$id": "404", + "kind": "string", + "type": { + "$ref": "10" + }, + "value": "Internal" + } + } + } + ] + }, + "nextLink": { + "$id": "405", + "kind": "string", + "type": { + "$ref": "115" + }, + "value": "vxtunikmzmz" + } + } + } + } + ] + }, + { + "$id": "406", + "kind": "http", + "name": "Operations_List_MinimumSet_Gen", + "description": "Operations_List_MinimumSet_Gen", + "filePath": "2024-06-19/Operations_List_MinimumSet_Gen.json", + "parameters": [ + { + "$id": "407", + "parameter": { + "$ref": "376" + }, + "value": { + "$id": "408", + "kind": "string", + "type": { + "$ref": "377" + }, + "value": "2024-06-19" + } + } + ], + "responses": [ + { + "$id": "409", + "response": { + "$ref": "383" + }, + "statusCode": 200, + "bodyValue": { + "$id": "410", + "kind": "model", + "type": { + "$ref": "74" + }, + "value": { + "$id": "411" + } + } + } + ] + } + ] + } + ], + "parameters": [ + { + "$id": "412", + "name": "endpoint", + "nameInRequest": "endpoint", + "doc": "Service host", + "type": { + "$id": "413", + "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": "414", + "type": { + "$id": "415", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "https://management.azure.com" + } + } + ], + "decorators": [], + "crossLanguageDefinitionId": "Qumulo.Storage.Operations", + "apiVersions": [ + "2024-06-19" + ], + "parent": { + "$ref": "366" + } + }, + { + "$id": "416", + "kind": "client", + "name": "FileSystems", + "namespace": "Azure.ResourceManager.Qumulo", + "operations": [ + { + "$id": "417", + "name": "get", + "resourceName": "FileSystemResource", + "doc": "Get a FileSystemResource", + "accessibility": "public", + "parameters": [ + { + "$id": "418", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "419", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "420", + "type": { + "$id": "421", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2024-06-19" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "422", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "423", + "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": "424", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "425", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "426", + "name": "fileSystemName", + "nameInRequest": "fileSystemName", + "doc": "Name of the File System resource", + "type": { + "$id": "427", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "428", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "429", + "kind": "constant", + "valueType": { + "$id": "430", + "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": "431", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "153" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "GET", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Qumulo.Storage/fileSystems/{fileSystemName}", + "bufferResponse": true, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Qumulo.Storage.FileSystems.get", + "decorators": [], + "examples": [ + { + "$id": "432", + "kind": "http", + "name": "FileSystems_Get", + "description": "FileSystems_Get", + "filePath": "2024-06-19/FileSystems_Get_MaximumSet_Gen.json", + "parameters": [ + { + "$id": "433", + "parameter": { + "$ref": "418" + }, + "value": { + "$id": "434", + "kind": "string", + "type": { + "$ref": "419" + }, + "value": "2024-06-19" + } + }, + { + "$id": "435", + "parameter": { + "$ref": "422" + }, + "value": { + "$id": "436", + "kind": "string", + "type": { + "$ref": "423" + }, + "value": "382E8C7A-AC80-4D70-8580-EFE99537B9B7" + } + }, + { + "$id": "437", + "parameter": { + "$ref": "424" + }, + "value": { + "$id": "438", + "kind": "string", + "type": { + "$ref": "425" + }, + "value": "rgQumulo" + } + }, + { + "$id": "439", + "parameter": { + "$ref": "426" + }, + "value": { + "$id": "440", + "kind": "string", + "type": { + "$ref": "427" + }, + "value": "sihbehcisdqtqqyfiewiiaphgh" + } + } + ], + "responses": [ + { + "$id": "441", + "response": { + "$ref": "431" + }, + "statusCode": 200, + "bodyValue": { + "$id": "442", + "kind": "model", + "type": { + "$ref": "153" + }, + "value": { + "$id": "443", + "properties": { + "$id": "444", + "kind": "model", + "type": { + "$ref": "208" + }, + "value": { + "$id": "445", + "marketplaceDetails": { + "$id": "446", + "kind": "model", + "type": { + "$ref": "210" + }, + "value": { + "$id": "447", + "marketplaceSubscriptionId": { + "$id": "448", + "kind": "string", + "type": { + "$ref": "212" + }, + "value": "xaqtkloiyovmexqhn" + }, + "planId": { + "$id": "449", + "kind": "string", + "type": { + "$ref": "216" + }, + "value": "fwtpz" + }, + "offerId": { + "$id": "450", + "kind": "string", + "type": { + "$ref": "220" + }, + "value": "s" + }, + "publisherId": { + "$id": "451", + "kind": "string", + "type": { + "$ref": "224" + }, + "value": "czxcfrwodazyaft" + }, + "termUnit": { + "$id": "452", + "kind": "string", + "type": { + "$ref": "228" + }, + "value": "cfwwczmygsimcyvoclcw" + }, + "marketplaceSubscriptionStatus": { + "$id": "453", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "PendingFulfillmentStart" + } + } + }, + "provisioningState": { + "$id": "454", + "kind": "string", + "type": { + "$ref": "24" + }, + "value": "Accepted" + }, + "storageSku": { + "$id": "455", + "kind": "string", + "type": { + "$ref": "240" + }, + "value": "yhyzby" + }, + "userDetails": { + "$id": "456", + "kind": "model", + "type": { + "$ref": "244" + }, + "value": { + "$id": "457" + } + }, + "delegatedSubnetId": { + "$id": "458", + "kind": "string", + "type": { + "$ref": "252" + }, + "value": "jykmxrf" + }, + "clusterLoginUrl": { + "$id": "459", + "kind": "string", + "type": { + "$ref": "256" + }, + "value": "ykaynsjvhihdthkkvvodjrgc" + }, + "privateIPs": { + "$id": "460", + "kind": "array", + "type": { + "$ref": "260" + }, + "value": [ + { + "$id": "461", + "kind": "string", + "type": { + "$ref": "261" + }, + "value": "gzken" + } + ] + }, + "availabilityZone": { + "$id": "462", + "kind": "string", + "type": { + "$ref": "269" + }, + "value": "eqdvbdiuwmhhzqzmksmwllpddqquwt" + } + } + }, + "identity": { + "$id": "463", + "kind": "model", + "type": { + "$ref": "275" + }, + "value": { + "$id": "464", + "principalId": { + "$id": "465", + "kind": "string", + "type": { + "$ref": "277" + }, + "value": "11111111-1111-1111-1111-111111111111" + }, + "tenantId": { + "$id": "466", + "kind": "string", + "type": { + "$ref": "282" + }, + "value": "11111111-1111-1111-1111-111111111111" + }, + "type": { + "$id": "467", + "kind": "string", + "type": { + "$ref": "42" + }, + "value": "None" + }, + "userAssignedIdentities": { + "$id": "468", + "kind": "dict", + "type": { + "$ref": "290" + }, + "value": { + "$id": "469", + "key7679": { + "$id": "470", + "kind": "model", + "type": { + "$ref": "292" + }, + "value": { + "$id": "471", + "principalId": { + "$id": "472", + "kind": "string", + "type": { + "$ref": "299" + }, + "value": "11111111-1111-1111-1111-111111111111" + }, + "clientId": { + "$id": "473", + "kind": "string", + "type": { + "$ref": "294" + }, + "value": "11111111-1111-1111-1111-111111111111" + } + } + } + } + } + } + }, + "tags": { + "$id": "474", + "kind": "dict", + "type": { + "$ref": "198" + }, + "value": { + "$id": "475", + "key7090": { + "$id": "476", + "kind": "string", + "type": { + "$ref": "200" + }, + "value": "rurrdiaqp" + } + } + }, + "location": { + "$id": "477", + "kind": "string", + "type": { + "$ref": "204" + }, + "value": "pnb" + }, + "id": { + "$id": "478", + "kind": "string", + "type": { + "$ref": "157" + }, + "value": "rfta" + }, + "name": { + "$id": "479", + "kind": "string", + "type": { + "$ref": "161" + }, + "value": "stftolw" + }, + "type": { + "$id": "480", + "kind": "string", + "type": { + "$ref": "165" + }, + "value": "wj" + }, + "systemData": { + "$id": "481", + "kind": "model", + "type": { + "$ref": "170" + }, + "value": { + "$id": "482", + "createdBy": { + "$id": "483", + "kind": "string", + "type": { + "$ref": "172" + }, + "value": "usnkckwkizihezb" + }, + "createdByType": { + "$id": "484", + "kind": "string", + "type": { + "$ref": "52" + }, + "value": "User" + }, + "createdAt": { + "$id": "485", + "kind": "string", + "type": { + "$ref": "179" + }, + "value": "2024-03-21T08:11:54.895Z" + }, + "lastModifiedBy": { + "$id": "486", + "kind": "string", + "type": { + "$ref": "184" + }, + "value": "yjsiqdgtsmycxlncjceemlucn" + }, + "lastModifiedByType": { + "$id": "487", + "kind": "string", + "type": { + "$ref": "52" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "488", + "kind": "string", + "type": { + "$ref": "191" + }, + "value": "2024-03-21T08:11:54.895Z" + } + } + } + } + } + } + ] + }, + { + "$id": "489", + "kind": "http", + "name": "FileSystems_Get_MinimumSet_Gen", + "description": "FileSystems_Get_MinimumSet_Gen", + "filePath": "2024-06-19/FileSystems_Get_MinimumSet_Gen.json", + "parameters": [ + { + "$id": "490", + "parameter": { + "$ref": "418" + }, + "value": { + "$id": "491", + "kind": "string", + "type": { + "$ref": "419" + }, + "value": "2024-06-19" + } + }, + { + "$id": "492", + "parameter": { + "$ref": "426" + }, + "value": { + "$id": "493", + "kind": "string", + "type": { + "$ref": "427" + }, + "value": "aaaaaaaaaaaaaaaaa" + } + }, + { + "$id": "494", + "parameter": { + "$ref": "424" + }, + "value": { + "$id": "495", + "kind": "string", + "type": { + "$ref": "425" + }, + "value": "rgQumulo" + } + }, + { + "$id": "496", + "parameter": { + "$ref": "422" + }, + "value": { + "$id": "497", + "kind": "string", + "type": { + "$ref": "423" + }, + "value": "aaaaaaa" + } + } + ], + "responses": [ + { + "$id": "498", + "response": { + "$ref": "431" + }, + "statusCode": 200, + "bodyValue": { + "$id": "499", + "kind": "model", + "type": { + "$ref": "153" + }, + "value": { + "$id": "500", + "name": { + "$id": "501", + "kind": "string", + "type": { + "$ref": "161" + }, + "value": "aaaaa" + }, + "id": { + "$id": "502", + "kind": "string", + "type": { + "$ref": "157" + }, + "value": "aaaaaaaaaaaaaaaaa" + }, + "location": { + "$id": "503", + "kind": "string", + "type": { + "$ref": "204" + }, + "value": "aaaaaaaaaaaaaaaaaaaaaaaaaaaa" + }, + "properties": { + "$id": "504", + "kind": "model", + "type": { + "$ref": "208" + }, + "value": { + "$id": "505", + "delegatedSubnetId": { + "$id": "506", + "kind": "string", + "type": { + "$ref": "252" + }, + "value": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaa" + }, + "marketplaceDetails": { + "$id": "507", + "kind": "model", + "type": { + "$ref": "210" + }, + "value": { + "$id": "508", + "marketplaceSubscriptionId": { + "$id": "509", + "kind": "string", + "type": { + "$ref": "212" + }, + "value": "aaaaaaaaaaaaaaaaa" + }, + "marketplaceSubscriptionStatus": { + "$id": "510", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "PendingFulfillmentStart" + }, + "offerId": { + "$id": "511", + "kind": "string", + "type": { + "$ref": "220" + }, + "value": "aaaaaaaaa" + }, + "planId": { + "$id": "512", + "kind": "string", + "type": { + "$ref": "216" + }, + "value": "aaaaaaa" + }, + "termUnit": { + "$id": "513", + "kind": "string", + "type": { + "$ref": "228" + }, + "value": "zxv" + } + } + }, + "provisioningState": { + "$id": "514", + "kind": "string", + "type": { + "$ref": "24" + }, + "value": "Accepted" + }, + "storageSku": { + "$id": "515", + "kind": "string", + "type": { + "$ref": "240" + }, + "value": "Standard" + }, + "userDetails": { + "$id": "516", + "kind": "model", + "type": { + "$ref": "244" + }, + "value": { + "$id": "517" + } + } + } + } + } + } + } + ] + } + ] + }, + { + "$id": "518", + "name": "createOrUpdate", + "resourceName": "FileSystemResource", + "doc": "Create a FileSystemResource", + "accessibility": "public", + "parameters": [ + { + "$id": "519", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "520", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "521", + "type": { + "$id": "522", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2024-06-19" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "523", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "524", + "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": "525", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "526", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "527", + "name": "fileSystemName", + "nameInRequest": "fileSystemName", + "doc": "Name of the File System resource", + "type": { + "$id": "528", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "529", + "name": "contentType", + "nameInRequest": "Content-Type", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$id": "530", + "kind": "constant", + "valueType": { + "$id": "531", + "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": "532", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "533", + "kind": "constant", + "valueType": { + "$id": "534", + "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": "535", + "name": "resource", + "nameInRequest": "resource", + "doc": "Resource create parameters.", + "type": { + "$ref": "153" + }, + "location": "Body", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "536", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "153" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + }, + { + "$id": "537", + "statusCodes": [ + 201 + ], + "bodyType": { + "$ref": "153" + }, + "headers": [ + { + "$id": "538", + "name": "azureAsyncOperation", + "nameInResponse": "Azure-AsyncOperation", + "doc": "A link to the status monitor", + "type": { + "$id": "539", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + { + "$id": "540", + "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": "541", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + } + } + ], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "PUT", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Qumulo.Storage/fileSystems/{fileSystemName}", + "requestMediaTypes": [ + "application/json" + ], + "bufferResponse": true, + "longRunning": { + "$id": "542", + "finalStateVia": 0, + "finalResponse": { + "$id": "543", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "153" + } + } + }, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Qumulo.Storage.FileSystems.createOrUpdate", + "decorators": [], + "examples": [ + { + "$id": "544", + "kind": "http", + "name": "FileSystems_CreateOrUpdate", + "description": "FileSystems_CreateOrUpdate", + "filePath": "2024-06-19/FileSystems_CreateOrUpdate_MaximumSet_Gen.json", + "parameters": [ + { + "$id": "545", + "parameter": { + "$ref": "519" + }, + "value": { + "$id": "546", + "kind": "string", + "type": { + "$ref": "520" + }, + "value": "2024-06-19" + } + }, + { + "$id": "547", + "parameter": { + "$ref": "523" + }, + "value": { + "$id": "548", + "kind": "string", + "type": { + "$ref": "524" + }, + "value": "382E8C7A-AC80-4D70-8580-EFE99537B9B7" + } + }, + { + "$id": "549", + "parameter": { + "$ref": "525" + }, + "value": { + "$id": "550", + "kind": "string", + "type": { + "$ref": "526" + }, + "value": "rgQumulo" + } + }, + { + "$id": "551", + "parameter": { + "$ref": "527" + }, + "value": { + "$id": "552", + "kind": "string", + "type": { + "$ref": "528" + }, + "value": "hfcmtgaes" + } + }, + { + "$id": "553", + "parameter": { + "$ref": "535" + }, + "value": { + "$id": "554", + "kind": "model", + "type": { + "$ref": "153" + }, + "value": { + "$id": "555", + "properties": { + "$id": "556", + "kind": "model", + "type": { + "$ref": "208" + }, + "value": { + "$id": "557", + "marketplaceDetails": { + "$id": "558", + "kind": "model", + "type": { + "$ref": "210" + }, + "value": { + "$id": "559", + "marketplaceSubscriptionId": { + "$id": "560", + "kind": "string", + "type": { + "$ref": "212" + }, + "value": "xaqtkloiyovmexqhn" + }, + "planId": { + "$id": "561", + "kind": "string", + "type": { + "$ref": "216" + }, + "value": "fwtpz" + }, + "offerId": { + "$id": "562", + "kind": "string", + "type": { + "$ref": "220" + }, + "value": "s" + }, + "publisherId": { + "$id": "563", + "kind": "string", + "type": { + "$ref": "224" + }, + "value": "czxcfrwodazyaft" + }, + "termUnit": { + "$id": "564", + "kind": "string", + "type": { + "$ref": "228" + }, + "value": "cfwwczmygsimcyvoclcw" + }, + "marketplaceSubscriptionStatus": { + "$id": "565", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "PendingFulfillmentStart" + } + } + }, + "storageSku": { + "$id": "566", + "kind": "string", + "type": { + "$ref": "240" + }, + "value": "yhyzby" + }, + "userDetails": { + "$id": "567", + "kind": "model", + "type": { + "$ref": "244" + }, + "value": { + "$id": "568", + "email": { + "$id": "569", + "kind": "string", + "type": { + "$ref": "246" + }, + "value": "aqsnzyroo" + } + } + }, + "delegatedSubnetId": { + "$id": "570", + "kind": "string", + "type": { + "$ref": "252" + }, + "value": "jykmxrf" + }, + "clusterLoginUrl": { + "$id": "571", + "kind": "string", + "type": { + "$ref": "256" + }, + "value": "ykaynsjvhihdthkkvvodjrgc" + }, + "privateIPs": { + "$id": "572", + "kind": "array", + "type": { + "$ref": "260" + }, + "value": [ + { + "$id": "573", + "kind": "string", + "type": { + "$ref": "261" + }, + "value": "gzken" + } + ] + }, + "adminPassword": { + "$id": "574", + "kind": "string", + "type": { + "$ref": "265" + }, + "value": "fakeTestSecretPlaceholder" + }, + "availabilityZone": { + "$id": "575", + "kind": "string", + "type": { + "$ref": "269" + }, + "value": "eqdvbdiuwmhhzqzmksmwllpddqquwt" + } + } + }, + "identity": { + "$id": "576", + "kind": "model", + "type": { + "$ref": "275" + }, + "value": { + "$id": "577", + "type": { + "$id": "578", + "kind": "string", + "type": { + "$ref": "42" + }, + "value": "None" + }, + "userAssignedIdentities": { + "$id": "579", + "kind": "dict", + "type": { + "$ref": "290" + }, + "value": { + "$id": "580", + "key7679": { + "$id": "581", + "kind": "model", + "type": { + "$ref": "292" + }, + "value": { + "$id": "582" + } + } + } + } + } + }, + "tags": { + "$id": "583", + "kind": "dict", + "type": { + "$ref": "198" + }, + "value": { + "$id": "584", + "key7090": { + "$id": "585", + "kind": "string", + "type": { + "$ref": "200" + }, + "value": "rurrdiaqp" + } + } + }, + "location": { + "$id": "586", + "kind": "string", + "type": { + "$ref": "204" + }, + "value": "pnb" + } + } + } + } + ], + "responses": [ + { + "$id": "587", + "response": { + "$ref": "536" + }, + "statusCode": 200, + "bodyValue": { + "$id": "588", + "kind": "model", + "type": { + "$ref": "153" + }, + "value": { + "$id": "589", + "properties": { + "$id": "590", + "kind": "model", + "type": { + "$ref": "208" + }, + "value": { + "$id": "591", + "marketplaceDetails": { + "$id": "592", + "kind": "model", + "type": { + "$ref": "210" + }, + "value": { + "$id": "593", + "marketplaceSubscriptionId": { + "$id": "594", + "kind": "string", + "type": { + "$ref": "212" + }, + "value": "xaqtkloiyovmexqhn" + }, + "planId": { + "$id": "595", + "kind": "string", + "type": { + "$ref": "216" + }, + "value": "fwtpz" + }, + "offerId": { + "$id": "596", + "kind": "string", + "type": { + "$ref": "220" + }, + "value": "s" + }, + "publisherId": { + "$id": "597", + "kind": "string", + "type": { + "$ref": "224" + }, + "value": "czxcfrwodazyaft" + }, + "termUnit": { + "$id": "598", + "kind": "string", + "type": { + "$ref": "228" + }, + "value": "cfwwczmygsimcyvoclcw" + }, + "marketplaceSubscriptionStatus": { + "$id": "599", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "PendingFulfillmentStart" + } + } + }, + "provisioningState": { + "$id": "600", + "kind": "string", + "type": { + "$ref": "24" + }, + "value": "Accepted" + }, + "storageSku": { + "$id": "601", + "kind": "string", + "type": { + "$ref": "240" + }, + "value": "yhyzby" + }, + "userDetails": { + "$id": "602", + "kind": "model", + "type": { + "$ref": "244" + }, + "value": { + "$id": "603" + } + }, + "delegatedSubnetId": { + "$id": "604", + "kind": "string", + "type": { + "$ref": "252" + }, + "value": "jykmxrf" + }, + "clusterLoginUrl": { + "$id": "605", + "kind": "string", + "type": { + "$ref": "256" + }, + "value": "ykaynsjvhihdthkkvvodjrgc" + }, + "privateIPs": { + "$id": "606", + "kind": "array", + "type": { + "$ref": "260" + }, + "value": [ + { + "$id": "607", + "kind": "string", + "type": { + "$ref": "261" + }, + "value": "gzken" + } + ] + }, + "availabilityZone": { + "$id": "608", + "kind": "string", + "type": { + "$ref": "269" + }, + "value": "eqdvbdiuwmhhzqzmksmwllpddqquwt" + } + } + }, + "identity": { + "$id": "609", + "kind": "model", + "type": { + "$ref": "275" + }, + "value": { + "$id": "610", + "principalId": { + "$id": "611", + "kind": "string", + "type": { + "$ref": "277" + }, + "value": "11111111-1111-1111-1111-111111111111" + }, + "tenantId": { + "$id": "612", + "kind": "string", + "type": { + "$ref": "282" + }, + "value": "11111111-1111-1111-1111-111111111111" + }, + "type": { + "$id": "613", + "kind": "string", + "type": { + "$ref": "42" + }, + "value": "None" + }, + "userAssignedIdentities": { + "$id": "614", + "kind": "dict", + "type": { + "$ref": "290" + }, + "value": { + "$id": "615", + "key7679": { + "$id": "616", + "kind": "model", + "type": { + "$ref": "292" + }, + "value": { + "$id": "617", + "principalId": { + "$id": "618", + "kind": "string", + "type": { + "$ref": "299" + }, + "value": "11111111-1111-1111-1111-111111111111" + }, + "clientId": { + "$id": "619", + "kind": "string", + "type": { + "$ref": "294" + }, + "value": "11111111-1111-1111-1111-111111111111" + } + } + } + } + } + } + }, + "tags": { + "$id": "620", + "kind": "dict", + "type": { + "$ref": "198" + }, + "value": { + "$id": "621", + "key7090": { + "$id": "622", + "kind": "string", + "type": { + "$ref": "200" + }, + "value": "rurrdiaqp" + } + } + }, + "location": { + "$id": "623", + "kind": "string", + "type": { + "$ref": "204" + }, + "value": "pnb" + }, + "id": { + "$id": "624", + "kind": "string", + "type": { + "$ref": "157" + }, + "value": "rfta" + }, + "name": { + "$id": "625", + "kind": "string", + "type": { + "$ref": "161" + }, + "value": "stftolw" + }, + "type": { + "$id": "626", + "kind": "string", + "type": { + "$ref": "165" + }, + "value": "wj" + }, + "systemData": { + "$id": "627", + "kind": "model", + "type": { + "$ref": "170" + }, + "value": { + "$id": "628", + "createdBy": { + "$id": "629", + "kind": "string", + "type": { + "$ref": "172" + }, + "value": "usnkckwkizihezb" + }, + "createdByType": { + "$id": "630", + "kind": "string", + "type": { + "$ref": "52" + }, + "value": "User" + }, + "createdAt": { + "$id": "631", + "kind": "string", + "type": { + "$ref": "179" + }, + "value": "2024-03-21T08:11:54.895Z" + }, + "lastModifiedBy": { + "$id": "632", + "kind": "string", + "type": { + "$ref": "184" + }, + "value": "yjsiqdgtsmycxlncjceemlucn" + }, + "lastModifiedByType": { + "$id": "633", + "kind": "string", + "type": { + "$ref": "52" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "634", + "kind": "string", + "type": { + "$ref": "191" + }, + "value": "2024-03-21T08:11:54.895Z" + } + } + } + } + } + }, + { + "$id": "635", + "response": { + "$ref": "537" + }, + "statusCode": 201, + "bodyValue": { + "$id": "636", + "kind": "model", + "type": { + "$ref": "153" + }, + "value": { + "$id": "637", + "properties": { + "$id": "638", + "kind": "model", + "type": { + "$ref": "208" + }, + "value": { + "$id": "639", + "marketplaceDetails": { + "$id": "640", + "kind": "model", + "type": { + "$ref": "210" + }, + "value": { + "$id": "641", + "marketplaceSubscriptionId": { + "$id": "642", + "kind": "string", + "type": { + "$ref": "212" + }, + "value": "xaqtkloiyovmexqhn" + }, + "planId": { + "$id": "643", + "kind": "string", + "type": { + "$ref": "216" + }, + "value": "fwtpz" + }, + "offerId": { + "$id": "644", + "kind": "string", + "type": { + "$ref": "220" + }, + "value": "s" + }, + "publisherId": { + "$id": "645", + "kind": "string", + "type": { + "$ref": "224" + }, + "value": "czxcfrwodazyaft" + }, + "termUnit": { + "$id": "646", + "kind": "string", + "type": { + "$ref": "228" + }, + "value": "cfwwczmygsimcyvoclcw" + }, + "marketplaceSubscriptionStatus": { + "$id": "647", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "PendingFulfillmentStart" + } + } + }, + "provisioningState": { + "$id": "648", + "kind": "string", + "type": { + "$ref": "24" + }, + "value": "Accepted" + }, + "storageSku": { + "$id": "649", + "kind": "string", + "type": { + "$ref": "240" + }, + "value": "yhyzby" + }, + "userDetails": { + "$id": "650", + "kind": "model", + "type": { + "$ref": "244" + }, + "value": { + "$id": "651" + } + }, + "delegatedSubnetId": { + "$id": "652", + "kind": "string", + "type": { + "$ref": "252" + }, + "value": "jykmxrf" + }, + "clusterLoginUrl": { + "$id": "653", + "kind": "string", + "type": { + "$ref": "256" + }, + "value": "ykaynsjvhihdthkkvvodjrgc" + }, + "privateIPs": { + "$id": "654", + "kind": "array", + "type": { + "$ref": "260" + }, + "value": [ + { + "$id": "655", + "kind": "string", + "type": { + "$ref": "261" + }, + "value": "gzken" + } + ] + }, + "availabilityZone": { + "$id": "656", + "kind": "string", + "type": { + "$ref": "269" + }, + "value": "eqdvbdiuwmhhzqzmksmwllpddqquwt" + } + } + }, + "identity": { + "$id": "657", + "kind": "model", + "type": { + "$ref": "275" + }, + "value": { + "$id": "658", + "principalId": { + "$id": "659", + "kind": "string", + "type": { + "$ref": "277" + }, + "value": "11111111-1111-1111-1111-111111111111" + }, + "tenantId": { + "$id": "660", + "kind": "string", + "type": { + "$ref": "282" + }, + "value": "11111111-1111-1111-1111-111111111111" + }, + "type": { + "$id": "661", + "kind": "string", + "type": { + "$ref": "42" + }, + "value": "None" + }, + "userAssignedIdentities": { + "$id": "662", + "kind": "dict", + "type": { + "$ref": "290" + }, + "value": { + "$id": "663", + "key7679": { + "$id": "664", + "kind": "model", + "type": { + "$ref": "292" + }, + "value": { + "$id": "665", + "principalId": { + "$id": "666", + "kind": "string", + "type": { + "$ref": "299" + }, + "value": "11111111-1111-1111-1111-111111111111" + }, + "clientId": { + "$id": "667", + "kind": "string", + "type": { + "$ref": "294" + }, + "value": "11111111-1111-1111-1111-111111111111" + } + } + } + } + } + } + }, + "tags": { + "$id": "668", + "kind": "dict", + "type": { + "$ref": "198" + }, + "value": { + "$id": "669", + "key7090": { + "$id": "670", + "kind": "string", + "type": { + "$ref": "200" + }, + "value": "rurrdiaqp" + } + } + }, + "location": { + "$id": "671", + "kind": "string", + "type": { + "$ref": "204" + }, + "value": "pnb" + }, + "id": { + "$id": "672", + "kind": "string", + "type": { + "$ref": "157" + }, + "value": "rfta" + }, + "name": { + "$id": "673", + "kind": "string", + "type": { + "$ref": "161" + }, + "value": "stftolw" + }, + "type": { + "$id": "674", + "kind": "string", + "type": { + "$ref": "165" + }, + "value": "wj" + }, + "systemData": { + "$id": "675", + "kind": "model", + "type": { + "$ref": "170" + }, + "value": { + "$id": "676", + "createdBy": { + "$id": "677", + "kind": "string", + "type": { + "$ref": "172" + }, + "value": "usnkckwkizihezb" + }, + "createdByType": { + "$id": "678", + "kind": "string", + "type": { + "$ref": "52" + }, + "value": "User" + }, + "createdAt": { + "$id": "679", + "kind": "string", + "type": { + "$ref": "179" + }, + "value": "2024-03-21T08:11:54.895Z" + }, + "lastModifiedBy": { + "$id": "680", + "kind": "string", + "type": { + "$ref": "184" + }, + "value": "yjsiqdgtsmycxlncjceemlucn" + }, + "lastModifiedByType": { + "$id": "681", + "kind": "string", + "type": { + "$ref": "52" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "682", + "kind": "string", + "type": { + "$ref": "191" + }, + "value": "2024-03-21T08:11:54.895Z" + } + } + } + } + } + } + ] + }, + { + "$id": "683", + "kind": "http", + "name": "FileSystems_CreateOrUpdate_MinimumSet_Gen", + "description": "FileSystems_CreateOrUpdate_MinimumSet_Gen", + "filePath": "2024-06-19/FileSystems_CreateOrUpdate_MinimumSet_Gen.json", + "parameters": [ + { + "$id": "684", + "parameter": { + "$ref": "519" + }, + "value": { + "$id": "685", + "kind": "string", + "type": { + "$ref": "520" + }, + "value": "2024-06-19" + } + }, + { + "$id": "686", + "parameter": { + "$ref": "527" + }, + "value": { + "$id": "687", + "kind": "string", + "type": { + "$ref": "528" + }, + "value": "aaaaaaaa" + } + }, + { + "$id": "688", + "parameter": { + "$ref": "535" + }, + "value": { + "$id": "689", + "kind": "model", + "type": { + "$ref": "153" + }, + "value": { + "$id": "690", + "location": { + "$id": "691", + "kind": "string", + "type": { + "$ref": "204" + }, + "value": "aaaaaaaaaaaaaaaaaaaaaaaaa" + }, + "properties": { + "$id": "692", + "kind": "model", + "type": { + "$ref": "208" + }, + "value": { + "$id": "693", + "adminPassword": { + "$id": "694", + "kind": "string", + "type": { + "$ref": "265" + }, + "value": "fakeTestSecretPlaceholder" + }, + "delegatedSubnetId": { + "$id": "695", + "kind": "string", + "type": { + "$ref": "252" + }, + "value": "aaaaaaaaaa" + }, + "marketplaceDetails": { + "$id": "696", + "kind": "model", + "type": { + "$ref": "210" + }, + "value": { + "$id": "697", + "marketplaceSubscriptionId": { + "$id": "698", + "kind": "string", + "type": { + "$ref": "212" + }, + "value": "aaaaaaaaaaaaa" + }, + "marketplaceSubscriptionStatus": { + "$id": "699", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "PendingFulfillmentStart" + }, + "offerId": { + "$id": "700", + "kind": "string", + "type": { + "$ref": "220" + }, + "value": "aaaaaaaaaaaaaaaaaaaaaaaaa" + }, + "planId": { + "$id": "701", + "kind": "string", + "type": { + "$ref": "216" + }, + "value": "aaaaaa" + } + } + }, + "storageSku": { + "$id": "702", + "kind": "string", + "type": { + "$ref": "240" + }, + "value": "Standard" + }, + "userDetails": { + "$id": "703", + "kind": "model", + "type": { + "$ref": "244" + }, + "value": { + "$id": "704", + "email": { + "$id": "705", + "kind": "string", + "type": { + "$ref": "246" + }, + "value": "viptslwulnpaupfljvnjeq" + } + } + } + } + } + } + } + }, + { + "$id": "706", + "parameter": { + "$ref": "525" + }, + "value": { + "$id": "707", + "kind": "string", + "type": { + "$ref": "526" + }, + "value": "rgopenapi" + } + }, + { + "$id": "708", + "parameter": { + "$ref": "523" + }, + "value": { + "$id": "709", + "kind": "string", + "type": { + "$ref": "524" + }, + "value": "aaaaaaaaaaaaaaaaaaaaaaaa" + } + } + ], + "responses": [ + { + "$id": "710", + "response": { + "$ref": "536" + }, + "statusCode": 200, + "bodyValue": { + "$id": "711", + "kind": "model", + "type": { + "$ref": "153" + }, + "value": { + "$id": "712", + "id": { + "$id": "713", + "kind": "string", + "type": { + "$ref": "157" + }, + "value": "aaaaaaaaaaaaaaaaa" + }, + "location": { + "$id": "714", + "kind": "string", + "type": { + "$ref": "204" + }, + "value": "aaaaaaaaa" + }, + "properties": { + "$id": "715", + "kind": "model", + "type": { + "$ref": "208" + }, + "value": { + "$id": "716", + "delegatedSubnetId": { + "$id": "717", + "kind": "string", + "type": { + "$ref": "252" + }, + "value": "aaaaaaaaaa" + }, + "marketplaceDetails": { + "$id": "718", + "kind": "model", + "type": { + "$ref": "210" + }, + "value": { + "$id": "719", + "marketplaceSubscriptionId": { + "$id": "720", + "kind": "string", + "type": { + "$ref": "212" + }, + "value": "aaaaaaaaaaaaa" + }, + "marketplaceSubscriptionStatus": { + "$id": "721", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "PendingFulfillmentStart" + }, + "offerId": { + "$id": "722", + "kind": "string", + "type": { + "$ref": "220" + }, + "value": "aaaaaaaaaaaaaaaaaaaaaaaaa" + }, + "planId": { + "$id": "723", + "kind": "string", + "type": { + "$ref": "216" + }, + "value": "aaaaaa" + }, + "publisherId": { + "$id": "724", + "kind": "string", + "type": { + "$ref": "224" + }, + "value": "aa" + } + } + }, + "provisioningState": { + "$id": "725", + "kind": "string", + "type": { + "$ref": "24" + }, + "value": "Accepted" + }, + "storageSku": { + "$id": "726", + "kind": "string", + "type": { + "$ref": "240" + }, + "value": "Standard" + }, + "userDetails": { + "$id": "727", + "kind": "model", + "type": { + "$ref": "244" + }, + "value": { + "$id": "728" + } + } + } + } + } + } + }, + { + "$id": "729", + "response": { + "$ref": "537" + }, + "statusCode": 201, + "bodyValue": { + "$id": "730", + "kind": "model", + "type": { + "$ref": "153" + }, + "value": { + "$id": "731", + "id": { + "$id": "732", + "kind": "string", + "type": { + "$ref": "157" + }, + "value": "aaaaaaaaaaaaaaaaa" + }, + "location": { + "$id": "733", + "kind": "string", + "type": { + "$ref": "204" + }, + "value": "aaaaaaaaa" + }, + "properties": { + "$id": "734", + "kind": "model", + "type": { + "$ref": "208" + }, + "value": { + "$id": "735", + "delegatedSubnetId": { + "$id": "736", + "kind": "string", + "type": { + "$ref": "252" + }, + "value": "aaaaaaaaaa" + }, + "marketplaceDetails": { + "$id": "737", + "kind": "model", + "type": { + "$ref": "210" + }, + "value": { + "$id": "738", + "marketplaceSubscriptionId": { + "$id": "739", + "kind": "string", + "type": { + "$ref": "212" + }, + "value": "aaaaaaaaaaaaa" + }, + "marketplaceSubscriptionStatus": { + "$id": "740", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "PendingFulfillmentStart" + }, + "offerId": { + "$id": "741", + "kind": "string", + "type": { + "$ref": "220" + }, + "value": "aaaaaaaaaaaaaaaaaaaaaaaaa" + }, + "planId": { + "$id": "742", + "kind": "string", + "type": { + "$ref": "216" + }, + "value": "aaaaaa" + }, + "publisherId": { + "$id": "743", + "kind": "string", + "type": { + "$ref": "224" + }, + "value": "aa" + } + } + }, + "provisioningState": { + "$id": "744", + "kind": "string", + "type": { + "$ref": "24" + }, + "value": "Accepted" + }, + "storageSku": { + "$id": "745", + "kind": "string", + "type": { + "$ref": "240" + }, + "value": "Standard" + }, + "userDetails": { + "$id": "746", + "kind": "model", + "type": { + "$ref": "244" + }, + "value": { + "$id": "747" + } + } + } + } + } + } + } + ] + } + ] + }, + { + "$id": "748", + "name": "update", + "resourceName": "FileSystemResource", + "doc": "Update a FileSystemResource", + "accessibility": "public", + "parameters": [ + { + "$id": "749", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "750", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "751", + "type": { + "$id": "752", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2024-06-19" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "753", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "754", + "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": "755", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "756", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "757", + "name": "fileSystemName", + "nameInRequest": "fileSystemName", + "doc": "Name of the File System resource", + "type": { + "$id": "758", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "759", + "name": "contentType", + "nameInRequest": "Content-Type", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$id": "760", + "kind": "constant", + "valueType": { + "$id": "761", + "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": "762", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "763", + "kind": "constant", + "valueType": { + "$id": "764", + "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": "765", + "name": "properties", + "nameInRequest": "properties", + "doc": "The resource properties to be updated.", + "type": { + "$ref": "332" + }, + "location": "Body", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "766", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "153" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "PATCH", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Qumulo.Storage/fileSystems/{fileSystemName}", + "requestMediaTypes": [ + "application/json" + ], + "bufferResponse": true, + "generateProtocolMethod": true, + "generateConvenienceMethod": false, + "crossLanguageDefinitionId": "Qumulo.Storage.FileSystems.update", + "decorators": [], + "examples": [ + { + "$id": "767", + "kind": "http", + "name": "FileSystems_Update", + "description": "FileSystems_Update", + "filePath": "2024-06-19/FileSystems_Update_MaximumSet_Gen.json", + "parameters": [ + { + "$id": "768", + "parameter": { + "$ref": "749" + }, + "value": { + "$id": "769", + "kind": "string", + "type": { + "$ref": "750" + }, + "value": "2024-06-19" + } + }, + { + "$id": "770", + "parameter": { + "$ref": "753" + }, + "value": { + "$id": "771", + "kind": "string", + "type": { + "$ref": "754" + }, + "value": "382E8C7A-AC80-4D70-8580-EFE99537B9B7" + } + }, + { + "$id": "772", + "parameter": { + "$ref": "755" + }, + "value": { + "$id": "773", + "kind": "string", + "type": { + "$ref": "756" + }, + "value": "rgQumulo" + } + }, + { + "$id": "774", + "parameter": { + "$ref": "757" + }, + "value": { + "$id": "775", + "kind": "string", + "type": { + "$ref": "758" + }, + "value": "ahpixnvykleksjlr" + } + }, + { + "$id": "776", + "parameter": { + "$ref": "765" + }, + "value": { + "$id": "777", + "kind": "model", + "type": { + "$ref": "332" + }, + "value": { + "$id": "778", + "identity": { + "$id": "779", + "kind": "model", + "type": { + "$ref": "275" + }, + "value": { + "$id": "780", + "type": { + "$id": "781", + "kind": "string", + "type": { + "$ref": "42" + }, + "value": "None" + }, + "userAssignedIdentities": { + "$id": "782", + "kind": "dict", + "type": { + "$ref": "290" + }, + "value": { + "$id": "783", + "key7679": { + "$id": "784", + "kind": "model", + "type": { + "$ref": "292" + }, + "value": { + "$id": "785" + } + } + } + } + } + }, + "tags": { + "$id": "786", + "kind": "dict", + "type": { + "$ref": "337" + }, + "value": { + "$id": "787", + "key357": { + "$id": "788", + "kind": "string", + "type": { + "$ref": "339" + }, + "value": "ztkkvhfia" + } + } + }, + "properties": { + "$id": "789", + "kind": "model", + "type": { + "$ref": "343" + }, + "value": { + "$id": "790", + "marketplaceDetails": { + "$id": "791", + "kind": "model", + "type": { + "$ref": "210" + }, + "value": { + "$id": "792", + "marketplaceSubscriptionId": { + "$id": "793", + "kind": "string", + "type": { + "$ref": "212" + }, + "value": "xaqtkloiyovmexqhn" + }, + "planId": { + "$id": "794", + "kind": "string", + "type": { + "$ref": "216" + }, + "value": "fwtpz" + }, + "offerId": { + "$id": "795", + "kind": "string", + "type": { + "$ref": "220" + }, + "value": "s" + }, + "publisherId": { + "$id": "796", + "kind": "string", + "type": { + "$ref": "224" + }, + "value": "czxcfrwodazyaft" + }, + "termUnit": { + "$id": "797", + "kind": "string", + "type": { + "$ref": "228" + }, + "value": "cfwwczmygsimcyvoclcw" + }, + "marketplaceSubscriptionStatus": { + "$id": "798", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "PendingFulfillmentStart" + } + } + }, + "userDetails": { + "$id": "799", + "kind": "model", + "type": { + "$ref": "244" + }, + "value": { + "$id": "800", + "email": { + "$id": "801", + "kind": "string", + "type": { + "$ref": "246" + }, + "value": "aqsnzyroo" + } + } + }, + "delegatedSubnetId": { + "$id": "802", + "kind": "string", + "type": { + "$ref": "351" + }, + "value": "bqaryqsjlackxphpmzffgoqsvm" + } + } + } + } + } + } + ], + "responses": [ + { + "$id": "803", + "response": { + "$ref": "766" + }, + "statusCode": 200, + "bodyValue": { + "$id": "804", + "kind": "model", + "type": { + "$ref": "153" + }, + "value": { + "$id": "805", + "properties": { + "$id": "806", + "kind": "model", + "type": { + "$ref": "208" + }, + "value": { + "$id": "807", + "marketplaceDetails": { + "$id": "808", + "kind": "model", + "type": { + "$ref": "210" + }, + "value": { + "$id": "809", + "marketplaceSubscriptionId": { + "$id": "810", + "kind": "string", + "type": { + "$ref": "212" + }, + "value": "xaqtkloiyovmexqhn" + }, + "planId": { + "$id": "811", + "kind": "string", + "type": { + "$ref": "216" + }, + "value": "fwtpz" + }, + "offerId": { + "$id": "812", + "kind": "string", + "type": { + "$ref": "220" + }, + "value": "s" + }, + "publisherId": { + "$id": "813", + "kind": "string", + "type": { + "$ref": "224" + }, + "value": "czxcfrwodazyaft" + }, + "termUnit": { + "$id": "814", + "kind": "string", + "type": { + "$ref": "228" + }, + "value": "cfwwczmygsimcyvoclcw" + }, + "marketplaceSubscriptionStatus": { + "$id": "815", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "PendingFulfillmentStart" + } + } + }, + "provisioningState": { + "$id": "816", + "kind": "string", + "type": { + "$ref": "24" + }, + "value": "Accepted" + }, + "storageSku": { + "$id": "817", + "kind": "string", + "type": { + "$ref": "240" + }, + "value": "yhyzby" + }, + "userDetails": { + "$id": "818", + "kind": "model", + "type": { + "$ref": "244" + }, + "value": { + "$id": "819" + } + }, + "delegatedSubnetId": { + "$id": "820", + "kind": "string", + "type": { + "$ref": "252" + }, + "value": "jykmxrf" + }, + "clusterLoginUrl": { + "$id": "821", + "kind": "string", + "type": { + "$ref": "256" + }, + "value": "ykaynsjvhihdthkkvvodjrgc" + }, + "privateIPs": { + "$id": "822", + "kind": "array", + "type": { + "$ref": "260" + }, + "value": [ + { + "$id": "823", + "kind": "string", + "type": { + "$ref": "261" + }, + "value": "gzken" + } + ] + }, + "availabilityZone": { + "$id": "824", + "kind": "string", + "type": { + "$ref": "269" + }, + "value": "eqdvbdiuwmhhzqzmksmwllpddqquwt" + } + } + }, + "identity": { + "$id": "825", + "kind": "model", + "type": { + "$ref": "275" + }, + "value": { + "$id": "826", + "principalId": { + "$id": "827", + "kind": "string", + "type": { + "$ref": "277" + }, + "value": "11111111-1111-1111-1111-111111111111" + }, + "tenantId": { + "$id": "828", + "kind": "string", + "type": { + "$ref": "282" + }, + "value": "11111111-1111-1111-1111-111111111111" + }, + "type": { + "$id": "829", + "kind": "string", + "type": { + "$ref": "42" + }, + "value": "None" + }, + "userAssignedIdentities": { + "$id": "830", + "kind": "dict", + "type": { + "$ref": "290" + }, + "value": { + "$id": "831", + "key7679": { + "$id": "832", + "kind": "model", + "type": { + "$ref": "292" + }, + "value": { + "$id": "833", + "principalId": { + "$id": "834", + "kind": "string", + "type": { + "$ref": "299" + }, + "value": "11111111-1111-1111-1111-111111111111" + }, + "clientId": { + "$id": "835", + "kind": "string", + "type": { + "$ref": "294" + }, + "value": "11111111-1111-1111-1111-111111111111" + } + } + } + } + } + } + }, + "tags": { + "$id": "836", + "kind": "dict", + "type": { + "$ref": "198" + }, + "value": { + "$id": "837", + "key7090": { + "$id": "838", + "kind": "string", + "type": { + "$ref": "200" + }, + "value": "rurrdiaqp" + } + } + }, + "location": { + "$id": "839", + "kind": "string", + "type": { + "$ref": "204" + }, + "value": "pnb" + }, + "id": { + "$id": "840", + "kind": "string", + "type": { + "$ref": "157" + }, + "value": "rfta" + }, + "name": { + "$id": "841", + "kind": "string", + "type": { + "$ref": "161" + }, + "value": "stftolw" + }, + "type": { + "$id": "842", + "kind": "string", + "type": { + "$ref": "165" + }, + "value": "wj" + }, + "systemData": { + "$id": "843", + "kind": "model", + "type": { + "$ref": "170" + }, + "value": { + "$id": "844", + "createdBy": { + "$id": "845", + "kind": "string", + "type": { + "$ref": "172" + }, + "value": "usnkckwkizihezb" + }, + "createdByType": { + "$id": "846", + "kind": "string", + "type": { + "$ref": "52" + }, + "value": "User" + }, + "createdAt": { + "$id": "847", + "kind": "string", + "type": { + "$ref": "179" + }, + "value": "2024-03-21T08:11:54.895Z" + }, + "lastModifiedBy": { + "$id": "848", + "kind": "string", + "type": { + "$ref": "184" + }, + "value": "yjsiqdgtsmycxlncjceemlucn" + }, + "lastModifiedByType": { + "$id": "849", + "kind": "string", + "type": { + "$ref": "52" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "850", + "kind": "string", + "type": { + "$ref": "191" + }, + "value": "2024-03-21T08:11:54.895Z" + } + } + } + } + } + } + ] + }, + { + "$id": "851", + "kind": "http", + "name": "FileSystems_Update_MinimumSet_Gen", + "description": "FileSystems_Update_MinimumSet_Gen", + "filePath": "2024-06-19/FileSystems_Update_MinimumSet_Gen.json", + "parameters": [ + { + "$id": "852", + "parameter": { + "$ref": "749" + }, + "value": { + "$id": "853", + "kind": "string", + "type": { + "$ref": "750" + }, + "value": "2024-06-19" + } + }, + { + "$id": "854", + "parameter": { + "$ref": "757" + }, + "value": { + "$id": "855", + "kind": "string", + "type": { + "$ref": "758" + }, + "value": "aaaaaaaaaaaaaaaaa" + } + }, + { + "$id": "856", + "parameter": { + "$ref": "765" + }, + "value": { + "$id": "857", + "kind": "model", + "type": { + "$ref": "332" + }, + "value": { + "$id": "858" + } + } + }, + { + "$id": "859", + "parameter": { + "$ref": "755" + }, + "value": { + "$id": "860", + "kind": "string", + "type": { + "$ref": "756" + }, + "value": "rgQumulo" + } + }, + { + "$id": "861", + "parameter": { + "$ref": "753" + }, + "value": { + "$id": "862", + "kind": "string", + "type": { + "$ref": "754" + }, + "value": "aaaaaaa" + } + } + ], + "responses": [ + { + "$id": "863", + "response": { + "$ref": "766" + }, + "statusCode": 200, + "bodyValue": { + "$id": "864", + "kind": "model", + "type": { + "$ref": "153" + }, + "value": { + "$id": "865", + "name": { + "$id": "866", + "kind": "string", + "type": { + "$ref": "161" + }, + "value": "aaaaa" + }, + "location": { + "$id": "867", + "kind": "string", + "type": { + "$ref": "204" + }, + "value": "aaaaaaaaaaaaaaaaaaaaaaaaaaaa" + }, + "properties": { + "$id": "868", + "kind": "model", + "type": { + "$ref": "208" + }, + "value": { + "$id": "869", + "delegatedSubnetId": { + "$id": "870", + "kind": "string", + "type": { + "$ref": "252" + }, + "value": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaa" + }, + "marketplaceDetails": { + "$id": "871", + "kind": "model", + "type": { + "$ref": "210" + }, + "value": { + "$id": "872", + "marketplaceSubscriptionId": { + "$id": "873", + "kind": "string", + "type": { + "$ref": "212" + }, + "value": "aaaaaaaaaaaaaaaaa" + }, + "marketplaceSubscriptionStatus": { + "$id": "874", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "PendingFulfillmentStart" + }, + "offerId": { + "$id": "875", + "kind": "string", + "type": { + "$ref": "220" + }, + "value": "aaaaaaaaa" + }, + "planId": { + "$id": "876", + "kind": "string", + "type": { + "$ref": "216" + }, + "value": "aaaaaaa" + } + } + }, + "provisioningState": { + "$id": "877", + "kind": "string", + "type": { + "$ref": "24" + }, + "value": "Accepted" + }, + "storageSku": { + "$id": "878", + "kind": "string", + "type": { + "$ref": "240" + }, + "value": "Standard" + }, + "userDetails": { + "$id": "879", + "kind": "model", + "type": { + "$ref": "244" + }, + "value": { + "$id": "880" + } + } + } + } + } + } + } + ] + } + ] + }, + { + "$id": "881", + "name": "delete", + "resourceName": "FileSystemResource", + "doc": "Delete a FileSystemResource", + "accessibility": "public", + "parameters": [ + { + "$id": "882", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "883", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "884", + "type": { + "$id": "885", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2024-06-19" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "886", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "887", + "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": "888", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "889", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "890", + "name": "fileSystemName", + "nameInRequest": "fileSystemName", + "doc": "Name of the File System resource", + "type": { + "$id": "891", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "892", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "893", + "kind": "constant", + "valueType": { + "$id": "894", + "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": "895", + "statusCodes": [ + 202 + ], + "headers": [ + { + "$id": "896", + "name": "azureAsyncOperation", + "nameInResponse": "Azure-AsyncOperation", + "doc": "A link to the status monitor", + "type": { + "$id": "897", + "kind": "url", + "name": "ResourceLocation", + "crossLanguageDefinitionId": "TypeSpec.Rest.ResourceLocation", + "baseType": { + "$id": "898", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url", + "decorators": [] + }, + "decorators": [] + } + }, + { + "$id": "899", + "name": "location", + "nameInResponse": "Location", + "doc": "The Location header contains the URL where the status of the long running operation can be checked.", + "type": { + "$id": "900", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + { + "$id": "901", + "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": "902", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + } + } + ], + "isErrorResponse": false + }, + { + "$id": "903", + "statusCodes": [ + 204 + ], + "headers": [], + "isErrorResponse": false + } + ], + "httpMethod": "DELETE", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Qumulo.Storage/fileSystems/{fileSystemName}", + "bufferResponse": true, + "longRunning": { + "$id": "904", + "finalStateVia": 1, + "finalResponse": { + "$id": "905", + "statusCodes": [ + 204 + ] + } + }, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Qumulo.Storage.FileSystems.delete", + "decorators": [], + "examples": [ + { + "$id": "906", + "kind": "http", + "name": "FileSystems_Delete", + "description": "FileSystems_Delete", + "filePath": "2024-06-19/FileSystems_Delete_MaximumSet_Gen.json", + "parameters": [ + { + "$id": "907", + "parameter": { + "$ref": "882" + }, + "value": { + "$id": "908", + "kind": "string", + "type": { + "$ref": "883" + }, + "value": "2024-06-19" + } + }, + { + "$id": "909", + "parameter": { + "$ref": "886" + }, + "value": { + "$id": "910", + "kind": "string", + "type": { + "$ref": "887" + }, + "value": "382E8C7A-AC80-4D70-8580-EFE99537B9B7" + } + }, + { + "$id": "911", + "parameter": { + "$ref": "888" + }, + "value": { + "$id": "912", + "kind": "string", + "type": { + "$ref": "889" + }, + "value": "rgQumulo" + } + }, + { + "$id": "913", + "parameter": { + "$ref": "890" + }, + "value": { + "$id": "914", + "kind": "string", + "type": { + "$ref": "891" + }, + "value": "xoschzkccroahrykedlvbbnsddq" + } + } + ], + "responses": [ + { + "$id": "915", + "response": { + "$ref": "895" + }, + "statusCode": 202 + }, + { + "$id": "916", + "response": { + "$ref": "903" + }, + "statusCode": 204 + } + ] + }, + { + "$id": "917", + "kind": "http", + "name": "FileSystems_Delete_MinimumSet_Gen", + "description": "FileSystems_Delete_MinimumSet_Gen", + "filePath": "2024-06-19/FileSystems_Delete_MinimumSet_Gen.json", + "parameters": [ + { + "$id": "918", + "parameter": { + "$ref": "882" + }, + "value": { + "$id": "919", + "kind": "string", + "type": { + "$ref": "883" + }, + "value": "2024-06-19" + } + }, + { + "$id": "920", + "parameter": { + "$ref": "886" + }, + "value": { + "$id": "921", + "kind": "string", + "type": { + "$ref": "887" + }, + "value": "382E8C7A-AC80-4D70-8580-EFE99537B9B7" + } + }, + { + "$id": "922", + "parameter": { + "$ref": "888" + }, + "value": { + "$id": "923", + "kind": "string", + "type": { + "$ref": "889" + }, + "value": "rgQumulo" + } + }, + { + "$id": "924", + "parameter": { + "$ref": "890" + }, + "value": { + "$id": "925", + "kind": "string", + "type": { + "$ref": "891" + }, + "value": "jgtskkiplquyrlkaxvhdg" + } + } + ], + "responses": [ + { + "$id": "926", + "response": { + "$ref": "895" + }, + "statusCode": 202 + }, + { + "$id": "927", + "response": { + "$ref": "903" + }, + "statusCode": 204 + } + ] + } + ] + }, + { + "$id": "928", + "name": "listByResourceGroup", + "resourceName": "FileSystemResource", + "doc": "List FileSystemResource resources by resource group", + "accessibility": "public", + "parameters": [ + { + "$id": "929", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "930", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "931", + "type": { + "$id": "932", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2024-06-19" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "933", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "934", + "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": "935", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "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": "accept", + "nameInRequest": "Accept", + "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": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "940", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "356" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "GET", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Qumulo.Storage/fileSystems", + "bufferResponse": true, + "paging": { + "$id": "941", + "itemPropertySegments": [ + "value" + ], + "nextLink": { + "$id": "942", + "responseSegments": [ + "nextLink" + ], + "responseLocation": "Body" + } + }, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Qumulo.Storage.FileSystems.listByResourceGroup", + "decorators": [], + "examples": [ + { + "$id": "943", + "kind": "http", + "name": "FileSystems_ListByResourceGroup", + "description": "FileSystems_ListByResourceGroup", + "filePath": "2024-06-19/FileSystems_ListByResourceGroup_MaximumSet_Gen.json", + "parameters": [ + { + "$id": "944", + "parameter": { + "$ref": "929" + }, + "value": { + "$id": "945", + "kind": "string", + "type": { + "$ref": "930" + }, + "value": "2024-06-19" + } + }, + { + "$id": "946", + "parameter": { + "$ref": "933" + }, + "value": { + "$id": "947", + "kind": "string", + "type": { + "$ref": "934" + }, + "value": "382E8C7A-AC80-4D70-8580-EFE99537B9B7" + } + }, + { + "$id": "948", + "parameter": { + "$ref": "935" + }, + "value": { + "$id": "949", + "kind": "string", + "type": { + "$ref": "936" + }, + "value": "rgQumulo" + } + } + ], + "responses": [ + { + "$id": "950", + "response": { + "$ref": "940" + }, + "statusCode": 200, + "bodyValue": { + "$id": "951", + "kind": "model", + "type": { + "$ref": "356" + }, + "value": { + "$id": "952", + "value": { + "$id": "953", + "kind": "array", + "type": { + "$ref": "358" + }, + "value": [ + { + "$id": "954", + "kind": "model", + "type": { + "$ref": "153" + }, + "value": { + "$id": "955", + "properties": { + "$id": "956", + "kind": "model", + "type": { + "$ref": "208" + }, + "value": { + "$id": "957", + "marketplaceDetails": { + "$id": "958", + "kind": "model", + "type": { + "$ref": "210" + }, + "value": { + "$id": "959", + "marketplaceSubscriptionId": { + "$id": "960", + "kind": "string", + "type": { + "$ref": "212" + }, + "value": "xaqtkloiyovmexqhn" + }, + "planId": { + "$id": "961", + "kind": "string", + "type": { + "$ref": "216" + }, + "value": "fwtpz" + }, + "offerId": { + "$id": "962", + "kind": "string", + "type": { + "$ref": "220" + }, + "value": "s" + }, + "publisherId": { + "$id": "963", + "kind": "string", + "type": { + "$ref": "224" + }, + "value": "czxcfrwodazyaft" + }, + "termUnit": { + "$id": "964", + "kind": "string", + "type": { + "$ref": "228" + }, + "value": "cfwwczmygsimcyvoclcw" + }, + "marketplaceSubscriptionStatus": { + "$id": "965", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "PendingFulfillmentStart" + } + } + }, + "provisioningState": { + "$id": "966", + "kind": "string", + "type": { + "$ref": "24" + }, + "value": "Accepted" + }, + "storageSku": { + "$id": "967", + "kind": "string", + "type": { + "$ref": "240" + }, + "value": "yhyzby" + }, + "userDetails": { + "$id": "968", + "kind": "model", + "type": { + "$ref": "244" + }, + "value": { + "$id": "969" + } + }, + "delegatedSubnetId": { + "$id": "970", + "kind": "string", + "type": { + "$ref": "252" + }, + "value": "jykmxrf" + }, + "clusterLoginUrl": { + "$id": "971", + "kind": "string", + "type": { + "$ref": "256" + }, + "value": "ykaynsjvhihdthkkvvodjrgc" + }, + "privateIPs": { + "$id": "972", + "kind": "array", + "type": { + "$ref": "260" + }, + "value": [ + { + "$id": "973", + "kind": "string", + "type": { + "$ref": "261" + }, + "value": "gzken" + } + ] + }, + "availabilityZone": { + "$id": "974", + "kind": "string", + "type": { + "$ref": "269" + }, + "value": "eqdvbdiuwmhhzqzmksmwllpddqquwt" + } + } + }, + "identity": { + "$id": "975", + "kind": "model", + "type": { + "$ref": "275" + }, + "value": { + "$id": "976", + "principalId": { + "$id": "977", + "kind": "string", + "type": { + "$ref": "277" + }, + "value": "11111111-1111-1111-1111-111111111111" + }, + "tenantId": { + "$id": "978", + "kind": "string", + "type": { + "$ref": "282" + }, + "value": "11111111-1111-1111-1111-111111111111" + }, + "type": { + "$id": "979", + "kind": "string", + "type": { + "$ref": "42" + }, + "value": "None" + }, + "userAssignedIdentities": { + "$id": "980", + "kind": "dict", + "type": { + "$ref": "290" + }, + "value": { + "$id": "981", + "key7679": { + "$id": "982", + "kind": "model", + "type": { + "$ref": "292" + }, + "value": { + "$id": "983", + "principalId": { + "$id": "984", + "kind": "string", + "type": { + "$ref": "299" + }, + "value": "11111111-1111-1111-1111-111111111111" + }, + "clientId": { + "$id": "985", + "kind": "string", + "type": { + "$ref": "294" + }, + "value": "11111111-1111-1111-1111-111111111111" + } + } + } + } + } + } + }, + "tags": { + "$id": "986", + "kind": "dict", + "type": { + "$ref": "198" + }, + "value": { + "$id": "987", + "key7090": { + "$id": "988", + "kind": "string", + "type": { + "$ref": "200" + }, + "value": "rurrdiaqp" + } + } + }, + "location": { + "$id": "989", + "kind": "string", + "type": { + "$ref": "204" + }, + "value": "pnb" + }, + "id": { + "$id": "990", + "kind": "string", + "type": { + "$ref": "157" + }, + "value": "rfta" + }, + "name": { + "$id": "991", + "kind": "string", + "type": { + "$ref": "161" + }, + "value": "stftolw" + }, + "type": { + "$id": "992", + "kind": "string", + "type": { + "$ref": "165" + }, + "value": "wj" + }, + "systemData": { + "$id": "993", + "kind": "model", + "type": { + "$ref": "170" + }, + "value": { + "$id": "994", + "createdBy": { + "$id": "995", + "kind": "string", + "type": { + "$ref": "172" + }, + "value": "usnkckwkizihezb" + }, + "createdByType": { + "$id": "996", + "kind": "string", + "type": { + "$ref": "52" + }, + "value": "User" + }, + "createdAt": { + "$id": "997", + "kind": "string", + "type": { + "$ref": "179" + }, + "value": "2024-03-21T08:11:54.895Z" + }, + "lastModifiedBy": { + "$id": "998", + "kind": "string", + "type": { + "$ref": "184" + }, + "value": "yjsiqdgtsmycxlncjceemlucn" + }, + "lastModifiedByType": { + "$id": "999", + "kind": "string", + "type": { + "$ref": "52" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "1000", + "kind": "string", + "type": { + "$ref": "191" + }, + "value": "2024-03-21T08:11:54.895Z" + } + } + } + } + } + ] + }, + "nextLink": { + "$id": "1001", + "kind": "string", + "type": { + "$ref": "362" + }, + "value": "https://microsoft.com/a" + } + } + } + } + ] + }, + { + "$id": "1002", + "kind": "http", + "name": "FileSystems_ListByResourceGroup_MinimumSet_Gen", + "description": "FileSystems_ListByResourceGroup_MinimumSet_Gen", + "filePath": "2024-06-19/FileSystems_ListByResourceGroup_MinimumSet_Gen.json", + "parameters": [ + { + "$id": "1003", + "parameter": { + "$ref": "929" + }, + "value": { + "$id": "1004", + "kind": "string", + "type": { + "$ref": "930" + }, + "value": "2024-06-19" + } + }, + { + "$id": "1005", + "parameter": { + "$ref": "935" + }, + "value": { + "$id": "1006", + "kind": "string", + "type": { + "$ref": "936" + }, + "value": "rgQumulo" + } + }, + { + "$id": "1007", + "parameter": { + "$ref": "933" + }, + "value": { + "$id": "1008", + "kind": "string", + "type": { + "$ref": "934" + }, + "value": "aaaaaaa" + } + } + ], + "responses": [ + { + "$id": "1009", + "response": { + "$ref": "940" + }, + "statusCode": 200, + "bodyValue": { + "$id": "1010", + "kind": "model", + "type": { + "$ref": "356" + }, + "value": { + "$id": "1011", + "value": { + "$id": "1012", + "kind": "array", + "type": { + "$ref": "358" + }, + "value": [ + { + "$id": "1013", + "kind": "model", + "type": { + "$ref": "153" + }, + "value": { + "$id": "1014", + "name": { + "$id": "1015", + "kind": "string", + "type": { + "$ref": "161" + }, + "value": "aaaaa" + }, + "id": { + "$id": "1016", + "kind": "string", + "type": { + "$ref": "157" + }, + "value": "aaaaaaaaaaaaaaaaa" + }, + "location": { + "$id": "1017", + "kind": "string", + "type": { + "$ref": "204" + }, + "value": "aaaaaaaaaaaaaaaaaaaaaaaaaaaa" + }, + "properties": { + "$id": "1018", + "kind": "model", + "type": { + "$ref": "208" + }, + "value": { + "$id": "1019", + "delegatedSubnetId": { + "$id": "1020", + "kind": "string", + "type": { + "$ref": "252" + }, + "value": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaa" + }, + "marketplaceDetails": { + "$id": "1021", + "kind": "model", + "type": { + "$ref": "210" + }, + "value": { + "$id": "1022", + "marketplaceSubscriptionId": { + "$id": "1023", + "kind": "string", + "type": { + "$ref": "212" + }, + "value": "aaaaaaaaaaaaaaaaa" + }, + "marketplaceSubscriptionStatus": { + "$id": "1024", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "PendingFulfillmentStart" + }, + "offerId": { + "$id": "1025", + "kind": "string", + "type": { + "$ref": "220" + }, + "value": "aaaaaaaaa" + }, + "planId": { + "$id": "1026", + "kind": "string", + "type": { + "$ref": "216" + }, + "value": "aaaaaaa" + } + } + }, + "provisioningState": { + "$id": "1027", + "kind": "string", + "type": { + "$ref": "24" + }, + "value": "Accepted" + }, + "storageSku": { + "$id": "1028", + "kind": "string", + "type": { + "$ref": "240" + }, + "value": "Standard" + }, + "userDetails": { + "$id": "1029", + "kind": "model", + "type": { + "$ref": "244" + }, + "value": { + "$id": "1030" + } + } + } + } + } + } + ] + } + } + } + } + ] + } + ] + }, + { + "$id": "1031", + "name": "listBySubscription", + "resourceName": "FileSystemResource", + "doc": "List FileSystemResource resources by subscription ID", + "accessibility": "public", + "parameters": [ + { + "$id": "1032", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "1033", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "1034", + "type": { + "$id": "1035", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2024-06-19" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1036", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "1037", + "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": "1038", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "1039", + "kind": "constant", + "valueType": { + "$id": "1040", + "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": "1041", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "356" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "GET", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/providers/Qumulo.Storage/fileSystems", + "bufferResponse": true, + "paging": { + "$id": "1042", + "itemPropertySegments": [ + "value" + ], + "nextLink": { + "$id": "1043", + "responseSegments": [ + "nextLink" + ], + "responseLocation": "Body" + } + }, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Qumulo.Storage.FileSystems.listBySubscription", + "decorators": [], + "examples": [ + { + "$id": "1044", + "kind": "http", + "name": "FileSystems_ListBySubscription", + "description": "FileSystems_ListBySubscription", + "filePath": "2024-06-19/FileSystems_ListBySubscription_MaximumSet_Gen.json", + "parameters": [ + { + "$id": "1045", + "parameter": { + "$ref": "1032" + }, + "value": { + "$id": "1046", + "kind": "string", + "type": { + "$ref": "1033" + }, + "value": "2024-06-19" + } + }, + { + "$id": "1047", + "parameter": { + "$ref": "1036" + }, + "value": { + "$id": "1048", + "kind": "string", + "type": { + "$ref": "1037" + }, + "value": "382E8C7A-AC80-4D70-8580-EFE99537B9B7" + } + } + ], + "responses": [ + { + "$id": "1049", + "response": { + "$ref": "1041" + }, + "statusCode": 200, + "bodyValue": { + "$id": "1050", + "kind": "model", + "type": { + "$ref": "356" + }, + "value": { + "$id": "1051", + "value": { + "$id": "1052", + "kind": "array", + "type": { + "$ref": "358" + }, + "value": [ + { + "$id": "1053", + "kind": "model", + "type": { + "$ref": "153" + }, + "value": { + "$id": "1054", + "properties": { + "$id": "1055", + "kind": "model", + "type": { + "$ref": "208" + }, + "value": { + "$id": "1056", + "marketplaceDetails": { + "$id": "1057", + "kind": "model", + "type": { + "$ref": "210" + }, + "value": { + "$id": "1058", + "marketplaceSubscriptionId": { + "$id": "1059", + "kind": "string", + "type": { + "$ref": "212" + }, + "value": "xaqtkloiyovmexqhn" + }, + "planId": { + "$id": "1060", + "kind": "string", + "type": { + "$ref": "216" + }, + "value": "fwtpz" + }, + "offerId": { + "$id": "1061", + "kind": "string", + "type": { + "$ref": "220" + }, + "value": "s" + }, + "publisherId": { + "$id": "1062", + "kind": "string", + "type": { + "$ref": "224" + }, + "value": "czxcfrwodazyaft" + }, + "termUnit": { + "$id": "1063", + "kind": "string", + "type": { + "$ref": "228" + }, + "value": "cfwwczmygsimcyvoclcw" + }, + "marketplaceSubscriptionStatus": { + "$id": "1064", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "PendingFulfillmentStart" + } + } + }, + "provisioningState": { + "$id": "1065", + "kind": "string", + "type": { + "$ref": "24" + }, + "value": "Accepted" + }, + "storageSku": { + "$id": "1066", + "kind": "string", + "type": { + "$ref": "240" + }, + "value": "yhyzby" + }, + "userDetails": { + "$id": "1067", + "kind": "model", + "type": { + "$ref": "244" + }, + "value": { + "$id": "1068" + } + }, + "delegatedSubnetId": { + "$id": "1069", + "kind": "string", + "type": { + "$ref": "252" + }, + "value": "jykmxrf" + }, + "clusterLoginUrl": { + "$id": "1070", + "kind": "string", + "type": { + "$ref": "256" + }, + "value": "ykaynsjvhihdthkkvvodjrgc" + }, + "privateIPs": { + "$id": "1071", + "kind": "array", + "type": { + "$ref": "260" + }, + "value": [ + { + "$id": "1072", + "kind": "string", + "type": { + "$ref": "261" + }, + "value": "gzken" + } + ] + }, + "availabilityZone": { + "$id": "1073", + "kind": "string", + "type": { + "$ref": "269" + }, + "value": "eqdvbdiuwmhhzqzmksmwllpddqquwt" + } + } + }, + "identity": { + "$id": "1074", + "kind": "model", + "type": { + "$ref": "275" + }, + "value": { + "$id": "1075", + "principalId": { + "$id": "1076", + "kind": "string", + "type": { + "$ref": "277" + }, + "value": "11111111-1111-1111-1111-111111111111" + }, + "tenantId": { + "$id": "1077", + "kind": "string", + "type": { + "$ref": "282" + }, + "value": "11111111-1111-1111-1111-111111111111" + }, + "type": { + "$id": "1078", + "kind": "string", + "type": { + "$ref": "42" + }, + "value": "None" + }, + "userAssignedIdentities": { + "$id": "1079", + "kind": "dict", + "type": { + "$ref": "290" + }, + "value": { + "$id": "1080", + "key7679": { + "$id": "1081", + "kind": "model", + "type": { + "$ref": "292" + }, + "value": { + "$id": "1082", + "principalId": { + "$id": "1083", + "kind": "string", + "type": { + "$ref": "299" + }, + "value": "11111111-1111-1111-1111-111111111111" + }, + "clientId": { + "$id": "1084", + "kind": "string", + "type": { + "$ref": "294" + }, + "value": "11111111-1111-1111-1111-111111111111" + } + } + } + } + } + } + }, + "tags": { + "$id": "1085", + "kind": "dict", + "type": { + "$ref": "198" + }, + "value": { + "$id": "1086", + "key7090": { + "$id": "1087", + "kind": "string", + "type": { + "$ref": "200" + }, + "value": "rurrdiaqp" + } + } + }, + "location": { + "$id": "1088", + "kind": "string", + "type": { + "$ref": "204" + }, + "value": "pnb" + }, + "id": { + "$id": "1089", + "kind": "string", + "type": { + "$ref": "157" + }, + "value": "rfta" + }, + "name": { + "$id": "1090", + "kind": "string", + "type": { + "$ref": "161" + }, + "value": "stftolw" + }, + "type": { + "$id": "1091", + "kind": "string", + "type": { + "$ref": "165" + }, + "value": "wj" + }, + "systemData": { + "$id": "1092", + "kind": "model", + "type": { + "$ref": "170" + }, + "value": { + "$id": "1093", + "createdBy": { + "$id": "1094", + "kind": "string", + "type": { + "$ref": "172" + }, + "value": "usnkckwkizihezb" + }, + "createdByType": { + "$id": "1095", + "kind": "string", + "type": { + "$ref": "52" + }, + "value": "User" + }, + "createdAt": { + "$id": "1096", + "kind": "string", + "type": { + "$ref": "179" + }, + "value": "2024-03-21T08:11:54.895Z" + }, + "lastModifiedBy": { + "$id": "1097", + "kind": "string", + "type": { + "$ref": "184" + }, + "value": "yjsiqdgtsmycxlncjceemlucn" + }, + "lastModifiedByType": { + "$id": "1098", + "kind": "string", + "type": { + "$ref": "52" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "1099", + "kind": "string", + "type": { + "$ref": "191" + }, + "value": "2024-03-21T08:11:54.895Z" + } + } + } + } + } + ] + }, + "nextLink": { + "$id": "1100", + "kind": "string", + "type": { + "$ref": "362" + }, + "value": "https://microsoft.com/a" + } + } + } + } + ] + }, + { + "$id": "1101", + "kind": "http", + "name": "FileSystems_ListBySubscription_MinimumSet_Gen", + "description": "FileSystems_ListBySubscription_MinimumSet_Gen", + "filePath": "2024-06-19/FileSystems_ListBySubscription_MinimumSet_Gen.json", + "parameters": [ + { + "$id": "1102", + "parameter": { + "$ref": "1032" + }, + "value": { + "$id": "1103", + "kind": "string", + "type": { + "$ref": "1033" + }, + "value": "2024-06-19" + } + }, + { + "$id": "1104", + "parameter": { + "$ref": "1036" + }, + "value": { + "$id": "1105", + "kind": "string", + "type": { + "$ref": "1037" + }, + "value": "aaaaaaa" + } + } + ], + "responses": [ + { + "$id": "1106", + "response": { + "$ref": "1041" + }, + "statusCode": 200, + "bodyValue": { + "$id": "1107", + "kind": "model", + "type": { + "$ref": "356" + }, + "value": { + "$id": "1108", + "value": { + "$id": "1109", + "kind": "array", + "type": { + "$ref": "358" + }, + "value": [ + { + "$id": "1110", + "kind": "model", + "type": { + "$ref": "153" + }, + "value": { + "$id": "1111", + "name": { + "$id": "1112", + "kind": "string", + "type": { + "$ref": "161" + }, + "value": "aaaaa" + }, + "id": { + "$id": "1113", + "kind": "string", + "type": { + "$ref": "157" + }, + "value": "aaaaaaaaaaaaaaaaa" + }, + "location": { + "$id": "1114", + "kind": "string", + "type": { + "$ref": "204" + }, + "value": "aaaaaaaaaaaaaaaaaaaaaaaaaaaa" + }, + "properties": { + "$id": "1115", + "kind": "model", + "type": { + "$ref": "208" + }, + "value": { + "$id": "1116", + "delegatedSubnetId": { + "$id": "1117", + "kind": "string", + "type": { + "$ref": "252" + }, + "value": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaa" + }, + "marketplaceDetails": { + "$id": "1118", + "kind": "model", + "type": { + "$ref": "210" + }, + "value": { + "$id": "1119", + "marketplaceSubscriptionId": { + "$id": "1120", + "kind": "string", + "type": { + "$ref": "212" + }, + "value": "aaaaaaaaaaaaaaaaa" + }, + "marketplaceSubscriptionStatus": { + "$id": "1121", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "PendingFulfillmentStart" + }, + "offerId": { + "$id": "1122", + "kind": "string", + "type": { + "$ref": "220" + }, + "value": "aaaaaaaaa" + }, + "planId": { + "$id": "1123", + "kind": "string", + "type": { + "$ref": "216" + }, + "value": "aaaaaaa" + } + } + }, + "provisioningState": { + "$id": "1124", + "kind": "string", + "type": { + "$ref": "24" + }, + "value": "Accepted" + }, + "storageSku": { + "$id": "1125", + "kind": "string", + "type": { + "$ref": "240" + }, + "value": "Standard" + }, + "userDetails": { + "$id": "1126", + "kind": "model", + "type": { + "$ref": "244" + }, + "value": { + "$id": "1127" + } + } + } + } + } + } + ] + } + } + } + } + ] + } + ] + } + ], + "parameters": [ + { + "$id": "1128", + "name": "endpoint", + "nameInRequest": "endpoint", + "doc": "Service host", + "type": { + "$id": "1129", + "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": "1130", + "type": { + "$id": "1131", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "https://management.azure.com" + } + } + ], + "decorators": [ + { + "$id": "1132", + "name": "Azure.ResourceManager.@armResourceOperations", + "arguments": { + "$id": "1133" + } + } + ], + "crossLanguageDefinitionId": "Qumulo.Storage.FileSystems", + "apiVersions": [ + "2024-06-19" + ], + "parent": { + "$ref": "366" + } + } + ] + } + ], + "auth": { + "$id": "1134", + "oAuth2": { + "$id": "1135", + "scopes": [ + "user_impersonation" + ] + } + } +} diff --git a/sdk/resourcemanager/ci.mgmt.yml b/sdk/resourcemanager/ci.mgmt.yml index 4e3c032f60a4..3b68837699ab 100644 --- a/sdk/resourcemanager/ci.mgmt.yml +++ b/sdk/resourcemanager/ci.mgmt.yml @@ -40,6 +40,7 @@ trigger: - sdk/changeanalysis/Azure.ResourceManager.ChangeAnalysis - sdk/chaos/Azure.ResourceManager.Chaos - sdk/cognitiveservices/Azure.ResourceManager.CognitiveServices + - sdk/commonedgesitemanageroperations/Azure.ResourceManager.CommonEdgeSiteManagerOperations - sdk/communication/Azure.ResourceManager.Communication - sdk/compute/Azure.ResourceManager.Compute - sdk/computefleet/Azure.ResourceManager.ComputeFleet @@ -53,10 +54,12 @@ trigger: - sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime - sdk/containerregistry/Azure.ResourceManager.ContainerRegistry - sdk/containerservice/Azure.ResourceManager.ContainerService + - sdk/contoso/Azure.ResourceManager.Contoso - sdk/cosmosdb/Azure.ResourceManager.CosmosDB - 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 +150,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 @@ -184,6 +188,7 @@ trigger: - sdk/servicelinker/Azure.ResourceManager.ServiceLinker - sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking - sdk/signalr/Azure.ResourceManager.SignalR + - sdk/sitemanager/Azure.ResourceManager.SiteManager - sdk/sphere/Azure.ResourceManager.Sphere - sdk/springappdiscovery/Azure.ResourceManager.SpringAppDiscovery - sdk/sqlmanagement/Azure.ResourceManager.Sql @@ -207,6 +212,7 @@ trigger: - sdk/websites/Azure.ResourceManager.AppService - sdk/workloadmonitor/Azure.ResourceManager.WorkloadMonitor - sdk/workloads/Azure.ResourceManager.Workloads + - sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances pr: branches: @@ -249,6 +255,7 @@ pr: - sdk/changeanalysis/Azure.ResourceManager.ChangeAnalysis - sdk/chaos/Azure.ResourceManager.Chaos - sdk/cognitiveservices/Azure.ResourceManager.CognitiveServices + - sdk/commonedgesitemanageroperations/Azure.ResourceManager.CommonEdgeSiteManagerOperations - sdk/communication/Azure.ResourceManager.Communication - sdk/compute/Azure.ResourceManager.Compute - sdk/computefleet/Azure.ResourceManager.ComputeFleet @@ -262,10 +269,12 @@ pr: - sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime - sdk/containerregistry/Azure.ResourceManager.ContainerRegistry - sdk/containerservice/Azure.ResourceManager.ContainerService + - sdk/contoso/Azure.ResourceManager.Contoso - sdk/cosmosdb/Azure.ResourceManager.CosmosDB - 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 +365,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 @@ -393,6 +403,7 @@ pr: - sdk/servicelinker/Azure.ResourceManager.ServiceLinker - sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking - sdk/signalr/Azure.ResourceManager.SignalR + - sdk/sitemanager/Azure.ResourceManager.SiteManager - sdk/sphere/Azure.ResourceManager.Sphere - sdk/springappdiscovery/Azure.ResourceManager.SpringAppDiscovery - sdk/sqlmanagement/Azure.ResourceManager.Sql @@ -416,6 +427,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/servicenetworking/Azure.ResourceManager.ServiceNetworking/Configuration.json b/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/Configuration.json new file mode 100644 index 000000000000..4a3e558fc260 --- /dev/null +++ b/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/Configuration.json @@ -0,0 +1,12 @@ +{ + "output-folder": ".", + "namespace": "Azure.ResourceManager.ServiceNetworking", + "library-name": "Azure.ResourceManager.ServiceNetworking", + "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/servicenetworking/Azure.ResourceManager.ServiceNetworking/tsp-location.yaml b/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/tsp-location.yaml index 717c8fce85f2..705aeb0540f8 100644 --- a/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/tsp-location.yaml +++ b/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/tsp-location.yaml @@ -1,3 +1,4 @@ directory: specification/servicenetworking/ServiceNetworking.Management -commit: 488fe8302cc529352bd6544e882773b5cc391f15 +commit: 6e702986ee542ebd38d0ab2e2f2c00ab48a50b45 repo: Azure/azure-rest-api-specs +additionalDirectories: diff --git a/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/tspCodeModel.json b/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/tspCodeModel.json new file mode 100644 index 000000000000..2593f3f83fec --- /dev/null +++ b/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/tspCodeModel.json @@ -0,0 +1,13854 @@ +{ + "$id": "1", + "name": "Microsoft.ServiceNetworking", + "apiVersions": [ + "2023-11-01", + "2024-05-01-preview", + "2025-01-01", + "2025-03-01-preview" + ], + "enums": [ + { + "$id": "2", + "kind": "enum", + "name": "TrafficControllerAssociationType", + "crossLanguageDefinitionId": "Microsoft.ServiceNetworking.AssociationType", + "valueType": { + "$id": "3", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "4", + "kind": "enumvalue", + "name": "subnets", + "value": "subnets", + "valueType": { + "$id": "5", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "2" + }, + "doc": "Association of Type Subnet", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.ServiceNetworking", + "doc": "Association Type Enum", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "6", + "kind": "enum", + "name": "ServiceNetworkingProvisioningState", + "crossLanguageDefinitionId": "Microsoft.ServiceNetworking.ProvisioningState", + "valueType": { + "$id": "7", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "8", + "kind": "enumvalue", + "name": "Provisioning", + "value": "Provisioning", + "valueType": { + "$id": "9", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "6" + }, + "doc": "Resource in Provisioning State", + "decorators": [] + }, + { + "$id": "10", + "kind": "enumvalue", + "name": "Updating", + "value": "Updating", + "valueType": { + "$id": "11", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "6" + }, + "doc": "Resource in Updating State", + "decorators": [] + }, + { + "$id": "12", + "kind": "enumvalue", + "name": "Deleting", + "value": "Deleting", + "valueType": { + "$id": "13", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "6" + }, + "doc": "Resource in Deleting State", + "decorators": [] + }, + { + "$id": "14", + "kind": "enumvalue", + "name": "Accepted", + "value": "Accepted", + "valueType": { + "$id": "15", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "6" + }, + "doc": "Resource in Accepted State", + "decorators": [] + }, + { + "$id": "16", + "kind": "enumvalue", + "name": "Succeeded", + "value": "Succeeded", + "valueType": { + "$id": "17", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "6" + }, + "doc": "Resource in Succeeded State", + "decorators": [] + }, + { + "$id": "18", + "kind": "enumvalue", + "name": "Failed", + "value": "Failed", + "valueType": { + "$id": "19", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "6" + }, + "doc": "Resource in Failed State", + "decorators": [] + }, + { + "$id": "20", + "kind": "enumvalue", + "name": "Canceled", + "value": "Canceled", + "valueType": { + "$id": "21", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "6" + }, + "doc": "Resource in Canceled State", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.ServiceNetworking", + "doc": "Resource Provisioning State Enum", + "isFixed": false, + "isFlags": false, + "usage": "Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "22", + "kind": "enum", + "name": "createdByType", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.createdByType", + "valueType": { + "$id": "23", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "24", + "kind": "enumvalue", + "name": "User", + "value": "User", + "valueType": { + "$id": "25", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "22" + }, + "doc": "The entity was created by a user.", + "decorators": [] + }, + { + "$id": "26", + "kind": "enumvalue", + "name": "Application", + "value": "Application", + "valueType": { + "$id": "27", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "22" + }, + "doc": "The entity was created by an application.", + "decorators": [] + }, + { + "$id": "28", + "kind": "enumvalue", + "name": "ManagedIdentity", + "value": "ManagedIdentity", + "valueType": { + "$id": "29", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "22" + }, + "doc": "The entity was created by a managed identity.", + "decorators": [] + }, + { + "$id": "30", + "kind": "enumvalue", + "name": "Key", + "value": "Key", + "valueType": { + "$id": "31", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "22" + }, + "doc": "The entity was created by a key.", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.ServiceNetworking", + "doc": "The kind of entity that created the resource.", + "isFixed": false, + "isFlags": false, + "usage": "Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "32", + "kind": "enum", + "name": "ResourceProvisioningState", + "crossLanguageDefinitionId": "Azure.ResourceManager.ResourceProvisioningState", + "valueType": { + "$id": "33", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "34", + "kind": "enumvalue", + "name": "Succeeded", + "value": "Succeeded", + "valueType": { + "$id": "35", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "32" + }, + "doc": "Resource has been created.", + "decorators": [] + }, + { + "$id": "36", + "kind": "enumvalue", + "name": "Failed", + "value": "Failed", + "valueType": { + "$id": "37", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "32" + }, + "doc": "Resource creation failed.", + "decorators": [] + }, + { + "$id": "38", + "kind": "enumvalue", + "name": "Canceled", + "value": "Canceled", + "valueType": { + "$id": "39", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "32" + }, + "doc": "Resource creation was canceled.", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.ServiceNetworking", + "doc": "The provisioning state of a resource type.", + "isFixed": false, + "isFlags": false, + "usage": "LroPolling", + "decorators": [] + }, + { + "$id": "40", + "kind": "enum", + "name": "ApplicationGatewayForContainersSecurityPolicyType", + "crossLanguageDefinitionId": "Microsoft.ServiceNetworking.PolicyType", + "valueType": { + "$id": "41", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "42", + "kind": "enumvalue", + "name": "WAF", + "value": "waf", + "valueType": { + "$id": "43", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "40" + }, + "doc": "Policy of Type WAF", + "decorators": [] + }, + { + "$id": "44", + "kind": "enumvalue", + "name": "IpAccessRules", + "value": "ipAccessRules", + "valueType": { + "$id": "45", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "40" + }, + "doc": "Policy of Type IpAccessRules", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.ServiceNetworking", + "doc": "Policy Type of the Security Policy", + "isFixed": false, + "isFlags": false, + "usage": "Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "46", + "kind": "enum", + "name": "IpAccessRuleAction", + "crossLanguageDefinitionId": "Microsoft.ServiceNetworking.IpAccessRuleAction", + "valueType": { + "$id": "47", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "48", + "kind": "enumvalue", + "name": "Allow", + "value": "allow", + "valueType": { + "$id": "49", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "46" + }, + "doc": "Allow Source Ip Prefixes", + "decorators": [] + }, + { + "$id": "50", + "kind": "enumvalue", + "name": "Deny", + "value": "deny", + "valueType": { + "$id": "51", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "46" + }, + "doc": "Deny Source Ip Prefixes", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.ServiceNetworking", + "doc": "Action of Ip Access Rule", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "52", + "kind": "enum", + "name": "Origin", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.Origin", + "valueType": { + "$id": "53", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "54", + "kind": "enumvalue", + "name": "user", + "value": "user", + "valueType": { + "$id": "55", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "52" + }, + "doc": "Indicates the operation is initiated by a user.", + "decorators": [] + }, + { + "$id": "56", + "kind": "enumvalue", + "name": "system", + "value": "system", + "valueType": { + "$id": "57", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "52" + }, + "doc": "Indicates the operation is initiated by a system.", + "decorators": [] + }, + { + "$id": "58", + "kind": "enumvalue", + "name": "user,system", + "value": "user,system", + "valueType": { + "$id": "59", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "52" + }, + "doc": "Indicates the operation is initiated by a user or system.", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.ServiceNetworking", + "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": "60", + "kind": "enum", + "name": "ActionType", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ActionType", + "valueType": { + "$id": "61", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "62", + "kind": "enumvalue", + "name": "Internal", + "value": "Internal", + "valueType": { + "$id": "63", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "60" + }, + "doc": "Actions are for internal-only APIs.", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.ServiceNetworking", + "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": "64", + "kind": "enum", + "name": "Versions", + "crossLanguageDefinitionId": "Microsoft.ServiceNetworking.Versions", + "valueType": { + "$id": "65", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "66", + "kind": "enumvalue", + "name": "v2023_11_01", + "value": "2023-11-01", + "valueType": { + "$id": "67", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "64" + }, + "doc": "2023-11-01 stable version", + "decorators": [] + }, + { + "$id": "68", + "kind": "enumvalue", + "name": "v2024_05_01_preview", + "value": "2024-05-01-preview", + "valueType": { + "$id": "69", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "64" + }, + "doc": "2024-05-01 preview version", + "decorators": [] + }, + { + "$id": "70", + "kind": "enumvalue", + "name": "v2025_05_01", + "value": "2025-01-01", + "valueType": { + "$id": "71", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "64" + }, + "doc": "2025-01-01 stable version", + "decorators": [] + }, + { + "$id": "72", + "kind": "enumvalue", + "name": "v2025_03_01_preview", + "value": "2025-03-01-preview", + "valueType": { + "$id": "73", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "64" + }, + "doc": "2025-03-01 preview version", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.ServiceNetworking", + "doc": "Api versions", + "isFixed": true, + "isFlags": false, + "usage": "ApiVersionEnum", + "decorators": [] + } + ], + "models": [ + { + "$id": "74", + "kind": "model", + "name": "TrafficControllerAssociation", + "namespace": "Azure.ResourceManager.ServiceNetworking", + "crossLanguageDefinitionId": "Microsoft.ServiceNetworking.Association", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "doc": "Association Subresource of Traffic Controller", + "decorators": [], + "baseModel": { + "$id": "75", + "kind": "model", + "name": "TrackedResource", + "namespace": "Azure.ResourceManager.ServiceNetworking", + "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": "76", + "kind": "model", + "name": "Resource", + "namespace": "Azure.ResourceManager.ServiceNetworking", + "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": "77", + "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": "78", + "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": "79", + "json": { + "$id": "80", + "name": "id" + } + } + }, + { + "$id": "81", + "kind": "property", + "name": "name", + "serializedName": "name", + "doc": "The name of the resource", + "type": { + "$id": "82", + "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": "83", + "json": { + "$id": "84", + "name": "name" + } + } + }, + { + "$id": "85", + "kind": "property", + "name": "type", + "serializedName": "type", + "doc": "The type of the resource. E.g. \"Microsoft.Compute/virtualMachines\" or \"Microsoft.Storage/storageAccounts\"", + "type": { + "$id": "86", + "kind": "string", + "name": "armResourceType", + "crossLanguageDefinitionId": "Azure.Core.armResourceType", + "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.type", + "serializationOptions": { + "$id": "88", + "json": { + "$id": "89", + "name": "type" + } + } + }, + { + "$id": "90", + "kind": "property", + "name": "systemData", + "serializedName": "systemData", + "doc": "Azure Resource Manager metadata containing createdBy and modifiedBy information.", + "type": { + "$id": "91", + "kind": "model", + "name": "SystemData", + "namespace": "Azure.ResourceManager.ServiceNetworking", + "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": "92", + "kind": "property", + "name": "createdBy", + "serializedName": "createdBy", + "doc": "The identity that created the resource.", + "type": { + "$id": "93", + "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": "94", + "json": { + "$id": "95", + "name": "createdBy" + } + } + }, + { + "$id": "96", + "kind": "property", + "name": "createdByType", + "serializedName": "createdByType", + "doc": "The type of identity that created the resource.", + "type": { + "$ref": "22" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.SystemData.createdByType", + "serializationOptions": { + "$id": "97", + "json": { + "$id": "98", + "name": "createdByType" + } + } + }, + { + "$id": "99", + "kind": "property", + "name": "createdAt", + "serializedName": "createdAt", + "doc": "The timestamp of resource creation (UTC).", + "type": { + "$id": "100", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "rfc3339", + "wireType": { + "$id": "101", + "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": "102", + "json": { + "$id": "103", + "name": "createdAt" + } + } + }, + { + "$id": "104", + "kind": "property", + "name": "lastModifiedBy", + "serializedName": "lastModifiedBy", + "doc": "The identity that last modified the resource.", + "type": { + "$id": "105", + "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": "106", + "json": { + "$id": "107", + "name": "lastModifiedBy" + } + } + }, + { + "$id": "108", + "kind": "property", + "name": "lastModifiedByType", + "serializedName": "lastModifiedByType", + "doc": "The type of identity that last modified the resource.", + "type": { + "$ref": "22" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.SystemData.lastModifiedByType", + "serializationOptions": { + "$id": "109", + "json": { + "$id": "110", + "name": "lastModifiedByType" + } + } + }, + { + "$id": "111", + "kind": "property", + "name": "lastModifiedAt", + "serializedName": "lastModifiedAt", + "doc": "The timestamp of resource last modification (UTC)", + "type": { + "$id": "112", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "rfc3339", + "wireType": { + "$id": "113", + "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": "114", + "json": { + "$id": "115", + "name": "lastModifiedAt" + } + } + } + ] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.Resource.systemData", + "serializationOptions": { + "$id": "116", + "json": { + "$id": "117", + "name": "systemData" + } + } + } + ] + }, + "properties": [ + { + "$id": "118", + "kind": "property", + "name": "tags", + "serializedName": "tags", + "doc": "Resource tags.", + "type": { + "$id": "119", + "kind": "dict", + "keyType": { + "$id": "120", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "valueType": { + "$id": "121", + "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": "122", + "json": { + "$id": "123", + "name": "tags" + } + } + }, + { + "$id": "124", + "kind": "property", + "name": "location", + "serializedName": "location", + "doc": "The geo-location where the resource lives", + "type": { + "$id": "125", + "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": "126", + "json": { + "$id": "127", + "name": "location" + } + } + } + ] + }, + "properties": [ + { + "$id": "128", + "kind": "property", + "name": "properties", + "serializedName": "properties", + "doc": "The resource-specific properties for this resource.", + "type": { + "$id": "129", + "kind": "model", + "name": "AssociationProperties", + "namespace": "Azure.ResourceManager.ServiceNetworking", + "crossLanguageDefinitionId": "Microsoft.ServiceNetworking.AssociationProperties", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "doc": "Association Properties.", + "decorators": [], + "properties": [ + { + "$id": "130", + "kind": "property", + "name": "associationType", + "serializedName": "associationType", + "doc": "Association Type", + "type": { + "$ref": "2" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceNetworking.AssociationProperties.associationType", + "serializationOptions": { + "$id": "131", + "json": { + "$id": "132", + "name": "associationType" + } + } + }, + { + "$id": "133", + "kind": "property", + "name": "subnet", + "serializedName": "subnet", + "doc": "Association Subnet", + "type": { + "$id": "134", + "kind": "model", + "name": "AssociationSubnet", + "namespace": "Azure.ResourceManager.ServiceNetworking", + "crossLanguageDefinitionId": "Microsoft.ServiceNetworking.AssociationSubnet", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "doc": "Association Subnet.", + "decorators": [], + "properties": [ + { + "$id": "135", + "kind": "property", + "name": "id", + "serializedName": "id", + "doc": "Association ID.", + "type": { + "$id": "136", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceNetworking.AssociationSubnet.id", + "serializationOptions": { + "$id": "137", + "json": { + "$id": "138", + "name": "id" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceNetworking.AssociationProperties.subnet", + "serializationOptions": { + "$id": "139", + "json": { + "$id": "140", + "name": "subnet" + } + } + }, + { + "$id": "141", + "kind": "property", + "name": "provisioningState", + "serializedName": "provisioningState", + "doc": "Provisioning State of Traffic Controller Association Resource", + "type": { + "$ref": "6" + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceNetworking.AssociationProperties.provisioningState", + "serializationOptions": { + "$id": "142", + "json": { + "$id": "143", + "name": "provisioningState" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": true, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceNetworking.Association.properties", + "serializationOptions": { + "$id": "144", + "json": { + "$id": "145", + "name": "properties" + } + } + } + ] + }, + { + "$ref": "129" + }, + { + "$ref": "134" + }, + { + "$ref": "75" + }, + { + "$ref": "76" + }, + { + "$ref": "91" + }, + { + "$id": "146", + "kind": "model", + "name": "ErrorResponse", + "namespace": "Azure.ResourceManager.ServiceNetworking", + "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": "147", + "kind": "property", + "name": "error", + "serializedName": "error", + "doc": "The error object.", + "type": { + "$id": "148", + "kind": "model", + "name": "ErrorDetail", + "namespace": "Azure.ResourceManager.ServiceNetworking", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorDetail", + "usage": "Json,Exception,LroPolling", + "doc": "The error detail.", + "decorators": [], + "properties": [ + { + "$id": "149", + "kind": "property", + "name": "code", + "serializedName": "code", + "doc": "The error code.", + "type": { + "$id": "150", + "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": "151", + "json": { + "$id": "152", + "name": "code" + } + } + }, + { + "$id": "153", + "kind": "property", + "name": "message", + "serializedName": "message", + "doc": "The error message.", + "type": { + "$id": "154", + "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": "155", + "json": { + "$id": "156", + "name": "message" + } + } + }, + { + "$id": "157", + "kind": "property", + "name": "target", + "serializedName": "target", + "doc": "The error target.", + "type": { + "$id": "158", + "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": "159", + "json": { + "$id": "160", + "name": "target" + } + } + }, + { + "$id": "161", + "kind": "property", + "name": "details", + "serializedName": "details", + "doc": "The error details.", + "type": { + "$id": "162", + "kind": "array", + "name": "ArrayErrorDetail", + "valueType": { + "$ref": "148" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorDetail.details", + "serializationOptions": { + "$id": "163", + "json": { + "$id": "164", + "name": "details" + } + } + }, + { + "$id": "165", + "kind": "property", + "name": "additionalInfo", + "serializedName": "additionalInfo", + "doc": "The error additional info.", + "type": { + "$id": "166", + "kind": "array", + "name": "ArrayErrorAdditionalInfo", + "valueType": { + "$id": "167", + "kind": "model", + "name": "ErrorAdditionalInfo", + "namespace": "Azure.ResourceManager.ServiceNetworking", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorAdditionalInfo", + "usage": "Json,Exception,LroPolling", + "doc": "The resource management error additional info.", + "decorators": [], + "properties": [ + { + "$id": "168", + "kind": "property", + "name": "type", + "serializedName": "type", + "doc": "The additional info type.", + "type": { + "$id": "169", + "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": "170", + "json": { + "$id": "171", + "name": "type" + } + } + }, + { + "$id": "172", + "kind": "property", + "name": "info", + "serializedName": "info", + "doc": "The additional info.", + "type": { + "$id": "173", + "kind": "model", + "name": "ErrorAdditionalInfoInfo", + "namespace": "Azure.ResourceManager.ServiceNetworking", + "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": "174", + "json": { + "$id": "175", + "name": "info" + } + } + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorDetail.additionalInfo", + "serializationOptions": { + "$id": "176", + "json": { + "$id": "177", + "name": "additionalInfo" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorResponse.error", + "serializationOptions": { + "$id": "178", + "json": { + "$id": "179", + "name": "error" + } + } + } + ] + }, + { + "$ref": "148" + }, + { + "$ref": "167" + }, + { + "$ref": "173" + }, + { + "$id": "180", + "kind": "model", + "name": "TrafficControllerAssociationUpdate", + "namespace": "Azure.ResourceManager.ServiceNetworking", + "crossLanguageDefinitionId": "Microsoft.ServiceNetworking.AssociationUpdate", + "usage": "Input,Json", + "doc": "The type used for update operations of the Association.", + "decorators": [], + "properties": [ + { + "$id": "181", + "kind": "property", + "name": "tags", + "serializedName": "tags", + "doc": "Resource tags.", + "type": { + "$id": "182", + "kind": "dict", + "keyType": { + "$id": "183", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "valueType": { + "$id": "184", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceNetworking.AssociationUpdate.tags", + "serializationOptions": { + "$id": "185", + "json": { + "$id": "186", + "name": "tags" + } + } + }, + { + "$id": "187", + "kind": "property", + "name": "properties", + "serializedName": "properties", + "doc": "The resource-specific properties for this resource.", + "type": { + "$id": "188", + "kind": "model", + "name": "AssociationUpdateProperties", + "namespace": "Azure.ResourceManager.ServiceNetworking", + "crossLanguageDefinitionId": "Microsoft.ServiceNetworking.AssociationUpdateProperties", + "usage": "Input,Json", + "doc": "The updatable properties of the Association.", + "decorators": [], + "properties": [ + { + "$id": "189", + "kind": "property", + "name": "associationType", + "serializedName": "associationType", + "doc": "Association Type", + "type": { + "$ref": "2" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceNetworking.AssociationUpdateProperties.associationType", + "serializationOptions": { + "$id": "190", + "json": { + "$id": "191", + "name": "associationType" + } + } + }, + { + "$id": "192", + "kind": "property", + "name": "subnet", + "serializedName": "subnet", + "doc": "Association Subnet", + "type": { + "$id": "193", + "kind": "model", + "name": "AssociationSubnetUpdate", + "namespace": "Azure.ResourceManager.ServiceNetworking", + "crossLanguageDefinitionId": "Microsoft.ServiceNetworking.AssociationSubnetUpdate", + "usage": "Input,Json", + "doc": "Association Subnet.", + "decorators": [], + "properties": [ + { + "$id": "194", + "kind": "property", + "name": "id", + "serializedName": "id", + "doc": "Association ID.", + "type": { + "$id": "195", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceNetworking.AssociationSubnetUpdate.id", + "serializationOptions": { + "$id": "196", + "json": { + "$id": "197", + "name": "id" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceNetworking.AssociationUpdateProperties.subnet", + "serializationOptions": { + "$id": "198", + "json": { + "$id": "199", + "name": "subnet" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": true, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceNetworking.AssociationUpdate.properties", + "serializationOptions": { + "$id": "200", + "json": { + "$id": "201", + "name": "properties" + } + } + } + ] + }, + { + "$ref": "188" + }, + { + "$ref": "193" + }, + { + "$id": "202", + "kind": "model", + "name": "ArmOperationStatusResourceProvisioningState", + "namespace": "Azure.ResourceManager.ServiceNetworking", + "crossLanguageDefinitionId": "Azure.ResourceManager.ArmOperationStatus", + "usage": "LroPolling", + "doc": "Standard Azure Resource Manager operation status response", + "decorators": [], + "properties": [ + { + "$id": "203", + "kind": "property", + "name": "status", + "serializedName": "status", + "doc": "The operation status", + "type": { + "$ref": "32" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.ArmOperationStatus.status", + "serializationOptions": { + "$id": "204", + "json": { + "$id": "205", + "name": "status" + } + } + }, + { + "$id": "206", + "kind": "property", + "name": "name", + "serializedName": "name", + "doc": "The name of the operationStatus resource", + "type": { + "$id": "207", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.ArmOperationStatus.name", + "serializationOptions": { + "$id": "208", + "json": { + "$id": "209", + "name": "name" + } + } + }, + { + "$id": "210", + "kind": "property", + "name": "startTime", + "serializedName": "startTime", + "doc": "Operation start time", + "type": { + "$id": "211", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "rfc3339", + "wireType": { + "$id": "212", + "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": "213", + "json": { + "$id": "214", + "name": "startTime" + } + } + }, + { + "$id": "215", + "kind": "property", + "name": "endTime", + "serializedName": "endTime", + "doc": "Operation complete time", + "type": { + "$id": "216", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "rfc3339", + "wireType": { + "$id": "217", + "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": "218", + "json": { + "$id": "219", + "name": "endTime" + } + } + }, + { + "$id": "220", + "kind": "property", + "name": "percentComplete", + "serializedName": "percentComplete", + "doc": "The progress made toward completing the operation", + "type": { + "$id": "221", + "kind": "float64", + "name": "float64", + "crossLanguageDefinitionId": "TypeSpec.float64", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.ArmOperationStatus.percentComplete", + "serializationOptions": { + "$id": "222", + "json": { + "$id": "223", + "name": "percentComplete" + } + } + }, + { + "$id": "224", + "kind": "property", + "name": "error", + "serializedName": "error", + "doc": "Errors that occurred if the operation ended with Canceled or Failed status", + "type": { + "$ref": "148" + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.ArmOperationStatus.error", + "serializationOptions": { + "$id": "225", + "json": { + "$id": "226", + "name": "error" + } + } + } + ] + }, + { + "$id": "227", + "kind": "model", + "name": "AssociationListResult", + "namespace": "Azure.ResourceManager.ServiceNetworking", + "crossLanguageDefinitionId": "Azure.ResourceManager.ResourceListResult", + "usage": "Output,Json", + "doc": "The response of a Association list operation.", + "decorators": [], + "properties": [ + { + "$id": "228", + "kind": "property", + "name": "value", + "serializedName": "value", + "doc": "The Association items on this page", + "type": { + "$id": "229", + "kind": "array", + "name": "ArrayAssociation", + "valueType": { + "$ref": "74" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.ResourceListResult.value", + "serializationOptions": { + "$id": "230", + "json": { + "$id": "231", + "name": "value" + } + } + }, + { + "$id": "232", + "kind": "property", + "name": "nextLink", + "serializedName": "nextLink", + "doc": "The link to the next page of items", + "type": { + "$id": "233", + "kind": "url", + "name": "ResourceLocation", + "crossLanguageDefinitionId": "TypeSpec.Rest.ResourceLocation", + "baseType": { + "$id": "234", + "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": "235", + "json": { + "$id": "236", + "name": "nextLink" + } + } + } + ] + }, + { + "$id": "237", + "kind": "model", + "name": "TrafficControllerFrontend", + "namespace": "Azure.ResourceManager.ServiceNetworking", + "crossLanguageDefinitionId": "Microsoft.ServiceNetworking.Frontend", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "doc": "Frontend Sub Resource of Traffic Controller.", + "decorators": [], + "baseModel": { + "$ref": "75" + }, + "properties": [ + { + "$id": "238", + "kind": "property", + "name": "properties", + "serializedName": "properties", + "doc": "The resource-specific properties for this resource.", + "type": { + "$id": "239", + "kind": "model", + "name": "FrontendProperties", + "namespace": "Azure.ResourceManager.ServiceNetworking", + "crossLanguageDefinitionId": "Microsoft.ServiceNetworking.FrontendProperties", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "doc": "Frontend Properties.", + "decorators": [], + "properties": [ + { + "$id": "240", + "kind": "property", + "name": "fqdn", + "serializedName": "fqdn", + "doc": "The Fully Qualified Domain Name of the DNS record associated to a Traffic Controller frontend.", + "type": { + "$id": "241", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceNetworking.FrontendProperties.fqdn", + "serializationOptions": { + "$id": "242", + "json": { + "$id": "243", + "name": "fqdn" + } + } + }, + { + "$id": "244", + "kind": "property", + "name": "securityPolicyConfigurations", + "serializedName": "securityPolicyConfigurations", + "doc": "Frontend Security Policy Configuration", + "type": { + "$id": "245", + "kind": "model", + "name": "SecurityPolicyConfigurations", + "namespace": "Azure.ResourceManager.ServiceNetworking", + "crossLanguageDefinitionId": "Microsoft.ServiceNetworking.SecurityPolicyConfigurations", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "doc": "SecurityPolicyConfigurations Subresource of Traffic Controller.", + "decorators": [], + "properties": [ + { + "$id": "246", + "kind": "property", + "name": "wafSecurityPolicy", + "serializedName": "wafSecurityPolicy", + "doc": "Contains reference to a WAF-type security policy.", + "type": { + "$id": "247", + "kind": "model", + "name": "WafSecurityPolicy", + "namespace": "Azure.ResourceManager.ServiceNetworking", + "crossLanguageDefinitionId": "Microsoft.ServiceNetworking.WafSecurityPolicy", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "doc": "Web Application Firewall Security Policy", + "decorators": [], + "properties": [ + { + "$id": "248", + "kind": "property", + "name": "id", + "serializedName": "id", + "doc": "Resource ID of the Waf Security Policy", + "type": { + "$id": "249", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceNetworking.WafSecurityPolicy.id", + "serializationOptions": { + "$id": "250", + "json": { + "$id": "251", + "name": "id" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceNetworking.SecurityPolicyConfigurations.wafSecurityPolicy", + "serializationOptions": { + "$id": "252", + "json": { + "$id": "253", + "name": "wafSecurityPolicy" + } + } + }, + { + "$id": "254", + "kind": "property", + "name": "ipAccessRulesSecurityPolicy", + "serializedName": "ipAccessRulesSecurityPolicy", + "doc": "Contains reference to a IpAccessRules-type security policy.", + "type": { + "$id": "255", + "kind": "model", + "name": "IpAccessRulesSecurityPolicy", + "namespace": "Azure.ResourceManager.ServiceNetworking", + "crossLanguageDefinitionId": "Microsoft.ServiceNetworking.IpAccessRulesSecurityPolicy", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "doc": "IpAccessRules Security Policy", + "decorators": [], + "properties": [ + { + "$id": "256", + "kind": "property", + "name": "id", + "serializedName": "id", + "doc": "Resource ID of the Ip Access Rules Security Policy", + "type": { + "$id": "257", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceNetworking.IpAccessRulesSecurityPolicy.id", + "serializationOptions": { + "$id": "258", + "json": { + "$id": "259", + "name": "id" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceNetworking.SecurityPolicyConfigurations.ipAccessRulesSecurityPolicy", + "serializationOptions": { + "$id": "260", + "json": { + "$id": "261", + "name": "ipAccessRulesSecurityPolicy" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceNetworking.FrontendProperties.securityPolicyConfigurations", + "serializationOptions": { + "$id": "262", + "json": { + "$id": "263", + "name": "securityPolicyConfigurations" + } + } + }, + { + "$id": "264", + "kind": "property", + "name": "provisioningState", + "serializedName": "provisioningState", + "doc": "Provisioning State of Traffic Controller Frontend Resource", + "type": { + "$ref": "6" + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceNetworking.FrontendProperties.provisioningState", + "serializationOptions": { + "$id": "265", + "json": { + "$id": "266", + "name": "provisioningState" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": true, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceNetworking.Frontend.properties", + "serializationOptions": { + "$id": "267", + "json": { + "$id": "268", + "name": "properties" + } + } + } + ] + }, + { + "$ref": "239" + }, + { + "$ref": "245" + }, + { + "$ref": "247" + }, + { + "$ref": "255" + }, + { + "$id": "269", + "kind": "model", + "name": "FrontendUpdate", + "namespace": "Azure.ResourceManager.ServiceNetworking", + "crossLanguageDefinitionId": "Azure.ResourceManager.Foundations.ResourceUpdateModel", + "usage": "Input,Json", + "doc": "The type used for update operations of the Frontend.", + "decorators": [], + "properties": [ + { + "$id": "270", + "kind": "property", + "name": "tags", + "serializedName": "tags", + "doc": "Resource tags.", + "type": { + "$id": "271", + "kind": "dict", + "keyType": { + "$id": "272", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "valueType": { + "$id": "273", + "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": "274", + "json": { + "$id": "275", + "name": "tags" + } + } + }, + { + "$id": "276", + "kind": "property", + "name": "properties", + "serializedName": "properties", + "doc": "The resource-specific properties for this resource.", + "type": { + "$id": "277", + "kind": "model", + "name": "FrontendUpdateProperties", + "namespace": "Azure.ResourceManager.ServiceNetworking", + "crossLanguageDefinitionId": "Azure.ResourceManager.Foundations.ResourceUpdateModelProperties", + "usage": "Input,Json", + "doc": "The updatable properties of the Frontend.", + "decorators": [], + "properties": [ + { + "$id": "278", + "kind": "property", + "name": "securityPolicyConfigurations", + "serializedName": "securityPolicyConfigurations", + "doc": "Frontend Security Policy Configuration", + "type": { + "$ref": "245" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.Foundations.ResourceUpdateModelProperties.securityPolicyConfigurations", + "serializationOptions": { + "$id": "279", + "json": { + "$id": "280", + "name": "securityPolicyConfigurations" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.Foundations.ResourceUpdateModel.properties", + "serializationOptions": { + "$id": "281", + "json": { + "$id": "282", + "name": "properties" + } + } + } + ] + }, + { + "$ref": "277" + }, + { + "$id": "283", + "kind": "model", + "name": "FrontendListResult", + "namespace": "Azure.ResourceManager.ServiceNetworking", + "crossLanguageDefinitionId": "Azure.ResourceManager.ResourceListResult", + "usage": "Output,Json", + "doc": "The response of a Frontend list operation.", + "decorators": [], + "properties": [ + { + "$id": "284", + "kind": "property", + "name": "value", + "serializedName": "value", + "doc": "The Frontend items on this page", + "type": { + "$id": "285", + "kind": "array", + "name": "ArrayFrontend", + "valueType": { + "$ref": "237" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.ResourceListResult.value", + "serializationOptions": { + "$id": "286", + "json": { + "$id": "287", + "name": "value" + } + } + }, + { + "$id": "288", + "kind": "property", + "name": "nextLink", + "serializedName": "nextLink", + "doc": "The link to the next page of items", + "type": { + "$id": "289", + "kind": "url", + "name": "ResourceLocation", + "crossLanguageDefinitionId": "TypeSpec.Rest.ResourceLocation", + "baseType": { + "$id": "290", + "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": "291", + "json": { + "$id": "292", + "name": "nextLink" + } + } + } + ] + }, + { + "$id": "293", + "kind": "model", + "name": "ApplicationGatewayForContainersSecurityPolicy", + "namespace": "Azure.ResourceManager.ServiceNetworking", + "crossLanguageDefinitionId": "Microsoft.ServiceNetworking.SecurityPolicy", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "doc": "SecurityPolicy Subresource of Traffic Controller.", + "decorators": [], + "baseModel": { + "$ref": "75" + }, + "properties": [ + { + "$id": "294", + "kind": "property", + "name": "properties", + "serializedName": "properties", + "doc": "The resource-specific properties for this resource.", + "type": { + "$id": "295", + "kind": "model", + "name": "SecurityPolicyProperties", + "namespace": "Azure.ResourceManager.ServiceNetworking", + "crossLanguageDefinitionId": "Microsoft.ServiceNetworking.SecurityPolicyProperties", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "doc": "SecurityPolicy Properties.", + "decorators": [], + "properties": [ + { + "$id": "296", + "kind": "property", + "name": "policyType", + "serializedName": "policyType", + "doc": "Type of the Traffic Controller Security Policy", + "type": { + "$ref": "40" + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceNetworking.SecurityPolicyProperties.policyType", + "serializationOptions": { + "$id": "297", + "json": { + "$id": "298", + "name": "policyType" + } + } + }, + { + "$id": "299", + "kind": "property", + "name": "wafPolicy", + "serializedName": "wafPolicy", + "doc": "Web Application Firewall Policy of the Traffic Controller Security Policy. Single Security Policy can have only one policy type set.", + "type": { + "$id": "300", + "kind": "model", + "name": "WafPolicy", + "namespace": "Azure.ResourceManager.ServiceNetworking", + "crossLanguageDefinitionId": "Microsoft.ServiceNetworking.WafPolicy", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "doc": "Web Application Firewall Policy", + "decorators": [], + "properties": [ + { + "$id": "301", + "kind": "property", + "name": "id", + "serializedName": "id", + "doc": "Resource ID of the WAF", + "type": { + "$id": "302", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceNetworking.WafPolicy.id", + "serializationOptions": { + "$id": "303", + "json": { + "$id": "304", + "name": "id" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceNetworking.SecurityPolicyProperties.wafPolicy", + "serializationOptions": { + "$id": "305", + "json": { + "$id": "306", + "name": "wafPolicy" + } + } + }, + { + "$id": "307", + "kind": "property", + "name": "ipAccessRulesPolicy", + "serializedName": "ipAccessRulesPolicy", + "doc": "Ip Access Policy of the Traffic Controller Security Policy. Single Security Policy can have only one policy type set.", + "type": { + "$id": "308", + "kind": "model", + "name": "IpAccessRulesPolicy", + "namespace": "Azure.ResourceManager.ServiceNetworking", + "crossLanguageDefinitionId": "Microsoft.ServiceNetworking.IpAccessRulesPolicy", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "doc": "Ip Access Policy", + "decorators": [], + "properties": [ + { + "$id": "309", + "kind": "property", + "name": "rules", + "serializedName": "rules", + "doc": "Ip Access Policy Rules List", + "type": { + "$id": "310", + "kind": "array", + "name": "ArrayIpAccessRule", + "valueType": { + "$id": "311", + "kind": "model", + "name": "IpAccessRule", + "namespace": "Azure.ResourceManager.ServiceNetworking", + "crossLanguageDefinitionId": "Microsoft.ServiceNetworking.IpAccessRule", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "doc": "Ip Access Policy Rules", + "decorators": [], + "properties": [ + { + "$id": "312", + "kind": "property", + "name": "name", + "serializedName": "name", + "doc": "Name of the Ip Access Rule", + "type": { + "$id": "313", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceNetworking.IpAccessRule.name", + "serializationOptions": { + "$id": "314", + "json": { + "$id": "315", + "name": "name" + } + } + }, + { + "$id": "316", + "kind": "property", + "name": "priority", + "serializedName": "priority", + "doc": "The priority of the rule. The value can be between 1 and 500. 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": "317", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceNetworking.IpAccessRule.priority", + "serializationOptions": { + "$id": "318", + "json": { + "$id": "319", + "name": "priority" + } + } + }, + { + "$id": "320", + "kind": "property", + "name": "sourceAddressPrefixes", + "serializedName": "sourceAddressPrefixes", + "doc": "Source Address Prefixed Applied by the Rule. Asterisk '*' can also be used to match all source IPs.", + "type": { + "$id": "321", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "322", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceNetworking.IpAccessRule.sourceAddressPrefixes", + "serializationOptions": { + "$id": "323", + "json": { + "$id": "324", + "name": "sourceAddressPrefixes" + } + } + }, + { + "$id": "325", + "kind": "property", + "name": "action", + "serializedName": "action", + "doc": "Action of the Rule", + "type": { + "$ref": "46" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceNetworking.IpAccessRule.action", + "serializationOptions": { + "$id": "326", + "json": { + "$id": "327", + "name": "action" + } + } + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceNetworking.IpAccessRulesPolicy.rules", + "serializationOptions": { + "$id": "328", + "json": { + "$id": "329", + "name": "rules" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceNetworking.SecurityPolicyProperties.ipAccessRulesPolicy", + "serializationOptions": { + "$id": "330", + "json": { + "$id": "331", + "name": "ipAccessRulesPolicy" + } + } + }, + { + "$id": "332", + "kind": "property", + "name": "provisioningState", + "serializedName": "provisioningState", + "doc": "Provisioning State of Traffic Controller SecurityPolicy Resource", + "type": { + "$ref": "6" + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceNetworking.SecurityPolicyProperties.provisioningState", + "serializationOptions": { + "$id": "333", + "json": { + "$id": "334", + "name": "provisioningState" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": true, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceNetworking.SecurityPolicy.properties", + "serializationOptions": { + "$id": "335", + "json": { + "$id": "336", + "name": "properties" + } + } + } + ] + }, + { + "$ref": "295" + }, + { + "$ref": "300" + }, + { + "$ref": "308" + }, + { + "$ref": "311" + }, + { + "$id": "337", + "kind": "model", + "name": "SecurityPolicyUpdate", + "namespace": "Azure.ResourceManager.ServiceNetworking", + "crossLanguageDefinitionId": "Azure.ResourceManager.Foundations.ResourceUpdateModel", + "usage": "Input,Json", + "doc": "The type used for update operations of the SecurityPolicy.", + "decorators": [], + "properties": [ + { + "$id": "338", + "kind": "property", + "name": "tags", + "serializedName": "tags", + "doc": "Resource tags.", + "type": { + "$id": "339", + "kind": "dict", + "keyType": { + "$id": "340", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "valueType": { + "$id": "341", + "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": "342", + "json": { + "$id": "343", + "name": "tags" + } + } + }, + { + "$id": "344", + "kind": "property", + "name": "properties", + "serializedName": "properties", + "doc": "The resource-specific properties for this resource.", + "type": { + "$id": "345", + "kind": "model", + "name": "SecurityPolicyUpdateProperties", + "namespace": "Azure.ResourceManager.ServiceNetworking", + "crossLanguageDefinitionId": "Azure.ResourceManager.Foundations.ResourceUpdateModelProperties", + "usage": "Input,Json", + "doc": "The updatable properties of the SecurityPolicy.", + "decorators": [], + "properties": [ + { + "$id": "346", + "kind": "property", + "name": "wafPolicy", + "serializedName": "wafPolicy", + "doc": "Web Application Firewall Policy of the Traffic Controller Security Policy. Single Security Policy can have only one policy type set.", + "type": { + "$ref": "300" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.Foundations.ResourceUpdateModelProperties.wafPolicy", + "serializationOptions": { + "$id": "347", + "json": { + "$id": "348", + "name": "wafPolicy" + } + } + }, + { + "$id": "349", + "kind": "property", + "name": "ipAccessRulesPolicy", + "serializedName": "ipAccessRulesPolicy", + "doc": "Ip Access Policy of the Traffic Controller Security Policy. Single Security Policy can have only one policy type set.", + "type": { + "$ref": "308" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.Foundations.ResourceUpdateModelProperties.ipAccessRulesPolicy", + "serializationOptions": { + "$id": "350", + "json": { + "$id": "351", + "name": "ipAccessRulesPolicy" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.Foundations.ResourceUpdateModel.properties", + "serializationOptions": { + "$id": "352", + "json": { + "$id": "353", + "name": "properties" + } + } + } + ] + }, + { + "$ref": "345" + }, + { + "$id": "354", + "kind": "model", + "name": "SecurityPolicyListResult", + "namespace": "Azure.ResourceManager.ServiceNetworking", + "crossLanguageDefinitionId": "Azure.ResourceManager.ResourceListResult", + "usage": "Output,Json", + "doc": "The response of a SecurityPolicy list operation.", + "decorators": [], + "properties": [ + { + "$id": "355", + "kind": "property", + "name": "value", + "serializedName": "value", + "doc": "The SecurityPolicy items on this page", + "type": { + "$id": "356", + "kind": "array", + "name": "ArraySecurityPolicy", + "valueType": { + "$ref": "293" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.ResourceListResult.value", + "serializationOptions": { + "$id": "357", + "json": { + "$id": "358", + "name": "value" + } + } + }, + { + "$id": "359", + "kind": "property", + "name": "nextLink", + "serializedName": "nextLink", + "doc": "The link to the next page of items", + "type": { + "$id": "360", + "kind": "url", + "name": "ResourceLocation", + "crossLanguageDefinitionId": "TypeSpec.Rest.ResourceLocation", + "baseType": { + "$id": "361", + "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": "362", + "json": { + "$id": "363", + "name": "nextLink" + } + } + } + ] + }, + { + "$id": "364", + "kind": "model", + "name": "TrafficController", + "namespace": "Azure.ResourceManager.ServiceNetworking", + "crossLanguageDefinitionId": "Microsoft.ServiceNetworking.TrafficController", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "doc": "Concrete tracked resource types can be created by aliasing this type using a specific property type.", + "decorators": [], + "baseModel": { + "$ref": "75" + }, + "properties": [ + { + "$id": "365", + "kind": "property", + "name": "properties", + "serializedName": "properties", + "doc": "The resource-specific properties for this resource.", + "type": { + "$id": "366", + "kind": "model", + "name": "TrafficControllerProperties", + "namespace": "Azure.ResourceManager.ServiceNetworking", + "crossLanguageDefinitionId": "Microsoft.ServiceNetworking.TrafficControllerProperties", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "doc": "Traffic Controller Properties.", + "decorators": [], + "properties": [ + { + "$id": "367", + "kind": "property", + "name": "configurationEndpoints", + "serializedName": "configurationEndpoints", + "doc": "Configuration Endpoints.", + "type": { + "$id": "368", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "369", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceNetworking.TrafficControllerProperties.configurationEndpoints", + "serializationOptions": { + "$id": "370", + "json": { + "$id": "371", + "name": "configurationEndpoints" + } + } + }, + { + "$id": "372", + "kind": "property", + "name": "frontends", + "serializedName": "frontends", + "doc": "Frontends References List", + "type": { + "$id": "373", + "kind": "array", + "name": "ArrayResourceId", + "valueType": { + "$id": "374", + "kind": "model", + "name": "ResourceId", + "namespace": "Azure.ResourceManager.ServiceNetworking", + "crossLanguageDefinitionId": "Microsoft.ServiceNetworking.ResourceId", + "usage": "Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "doc": "Resource ID definition used by parent to reference child resources.", + "decorators": [], + "properties": [ + { + "$id": "375", + "kind": "property", + "name": "id", + "serializedName": "id", + "doc": "Resource ID of child resource.", + "type": { + "$id": "376", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceNetworking.ResourceId.id", + "serializationOptions": { + "$id": "377", + "json": { + "$id": "378", + "name": "id" + } + } + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceNetworking.TrafficControllerProperties.frontends", + "serializationOptions": { + "$id": "379", + "json": { + "$id": "380", + "name": "frontends" + } + } + }, + { + "$id": "381", + "kind": "property", + "name": "associations", + "serializedName": "associations", + "doc": "Associations References List", + "type": { + "$id": "382", + "kind": "array", + "name": "ArrayResourceId", + "valueType": { + "$ref": "374" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceNetworking.TrafficControllerProperties.associations", + "serializationOptions": { + "$id": "383", + "json": { + "$id": "384", + "name": "associations" + } + } + }, + { + "$id": "385", + "kind": "property", + "name": "securityPolicies", + "serializedName": "securityPolicies", + "doc": "Security Policies References List", + "type": { + "$id": "386", + "kind": "array", + "name": "ArrayResourceId", + "valueType": { + "$ref": "374" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceNetworking.TrafficControllerProperties.securityPolicies", + "serializationOptions": { + "$id": "387", + "json": { + "$id": "388", + "name": "securityPolicies" + } + } + }, + { + "$id": "389", + "kind": "property", + "name": "securityPolicyConfigurations", + "serializedName": "securityPolicyConfigurations", + "doc": "Security Policy Configuration", + "type": { + "$ref": "245" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceNetworking.TrafficControllerProperties.securityPolicyConfigurations", + "serializationOptions": { + "$id": "390", + "json": { + "$id": "391", + "name": "securityPolicyConfigurations" + } + } + }, + { + "$id": "392", + "kind": "property", + "name": "TrafficControllerProvisioningState", + "serializedName": "provisioningState", + "doc": "The status of the last operation.", + "type": { + "$ref": "6" + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceNetworking.TrafficControllerProperties.provisioningState", + "serializationOptions": { + "$id": "393", + "json": { + "$id": "394", + "name": "provisioningState" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": true, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceNetworking.TrafficController.properties", + "serializationOptions": { + "$id": "395", + "json": { + "$id": "396", + "name": "properties" + } + } + } + ] + }, + { + "$ref": "366" + }, + { + "$ref": "374" + }, + { + "$id": "397", + "kind": "model", + "name": "TrafficControllerUpdate", + "namespace": "Azure.ResourceManager.ServiceNetworking", + "crossLanguageDefinitionId": "Azure.ResourceManager.Foundations.ResourceUpdateModel", + "usage": "Input,Json", + "doc": "The type used for update operations of the TrafficController.", + "decorators": [], + "properties": [ + { + "$id": "398", + "kind": "property", + "name": "tags", + "serializedName": "tags", + "doc": "Resource tags.", + "type": { + "$id": "399", + "kind": "dict", + "keyType": { + "$id": "400", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "valueType": { + "$id": "401", + "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": "402", + "json": { + "$id": "403", + "name": "tags" + } + } + }, + { + "$id": "404", + "kind": "property", + "name": "properties", + "serializedName": "properties", + "doc": "The resource-specific properties for this resource.", + "type": { + "$id": "405", + "kind": "model", + "name": "TrafficControllerUpdateProperties", + "namespace": "Azure.ResourceManager.ServiceNetworking", + "crossLanguageDefinitionId": "Azure.ResourceManager.Foundations.ResourceUpdateModelProperties", + "usage": "Input,Json", + "doc": "The updatable properties of the TrafficController.", + "decorators": [], + "properties": [ + { + "$id": "406", + "kind": "property", + "name": "securityPolicyConfigurations", + "serializedName": "securityPolicyConfigurations", + "doc": "Security Policy Configuration", + "type": { + "$ref": "245" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.Foundations.ResourceUpdateModelProperties.securityPolicyConfigurations", + "serializationOptions": { + "$id": "407", + "json": { + "$id": "408", + "name": "securityPolicyConfigurations" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.Foundations.ResourceUpdateModel.properties", + "serializationOptions": { + "$id": "409", + "json": { + "$id": "410", + "name": "properties" + } + } + } + ] + }, + { + "$ref": "405" + }, + { + "$id": "411", + "kind": "model", + "name": "TrafficControllerListResult", + "namespace": "Azure.ResourceManager.ServiceNetworking", + "crossLanguageDefinitionId": "Azure.ResourceManager.ResourceListResult", + "usage": "Output,Json", + "doc": "The response of a TrafficController list operation.", + "decorators": [], + "properties": [ + { + "$id": "412", + "kind": "property", + "name": "value", + "serializedName": "value", + "doc": "The TrafficController items on this page", + "type": { + "$id": "413", + "kind": "array", + "name": "ArrayTrafficController", + "valueType": { + "$ref": "364" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.ResourceListResult.value", + "serializationOptions": { + "$id": "414", + "json": { + "$id": "415", + "name": "value" + } + } + }, + { + "$id": "416", + "kind": "property", + "name": "nextLink", + "serializedName": "nextLink", + "doc": "The link to the next page of items", + "type": { + "$id": "417", + "kind": "url", + "name": "ResourceLocation", + "crossLanguageDefinitionId": "TypeSpec.Rest.ResourceLocation", + "baseType": { + "$id": "418", + "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": "419", + "json": { + "$id": "420", + "name": "nextLink" + } + } + } + ] + }, + { + "$id": "421", + "kind": "model", + "name": "OperationListResult", + "namespace": "Azure.ResourceManager.ServiceNetworking", + "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": "422", + "kind": "property", + "name": "value", + "serializedName": "value", + "doc": "The Operation items on this page", + "type": { + "$id": "423", + "kind": "array", + "name": "ArrayOperation", + "valueType": { + "$id": "424", + "kind": "model", + "name": "Operation", + "namespace": "Azure.ResourceManager.ServiceNetworking", + "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": "425", + "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": "426", + "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": "427", + "json": { + "$id": "428", + "name": "name" + } + } + }, + { + "$id": "429", + "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": "430", + "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": "431", + "json": { + "$id": "432", + "name": "isDataAction" + } + } + }, + { + "$id": "433", + "kind": "property", + "name": "display", + "serializedName": "display", + "doc": "Localized display information for this particular operation.", + "type": { + "$id": "434", + "kind": "model", + "name": "OperationDisplay", + "namespace": "Azure.ResourceManager.ServiceNetworking", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.OperationDisplay", + "usage": "Output,Json", + "doc": "Localized display information for and operation.", + "decorators": [], + "properties": [ + { + "$id": "435", + "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": "436", + "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": "437", + "json": { + "$id": "438", + "name": "provider" + } + } + }, + { + "$id": "439", + "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": "440", + "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": "441", + "json": { + "$id": "442", + "name": "resource" + } + } + }, + { + "$id": "443", + "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": "444", + "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": "445", + "json": { + "$id": "446", + "name": "operation" + } + } + }, + { + "$id": "447", + "kind": "property", + "name": "description", + "serializedName": "description", + "doc": "The short, localized friendly description of the operation; suitable for tool tips and detailed views.", + "type": { + "$id": "448", + "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": "449", + "json": { + "$id": "450", + "name": "description" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.Operation.display", + "serializationOptions": { + "$id": "451", + "json": { + "$id": "452", + "name": "display" + } + } + }, + { + "$id": "453", + "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": "52" + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.Operation.origin", + "serializationOptions": { + "$id": "454", + "json": { + "$id": "455", + "name": "origin" + } + } + }, + { + "$id": "456", + "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": "60" + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.Operation.actionType", + "serializationOptions": { + "$id": "457", + "json": { + "$id": "458", + "name": "actionType" + } + } + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.OperationListResult.value", + "serializationOptions": { + "$id": "459", + "json": { + "$id": "460", + "name": "value" + } + } + }, + { + "$id": "461", + "kind": "property", + "name": "nextLink", + "serializedName": "nextLink", + "doc": "The link to the next page of items", + "type": { + "$id": "462", + "kind": "url", + "name": "ResourceLocation", + "crossLanguageDefinitionId": "TypeSpec.Rest.ResourceLocation", + "baseType": { + "$id": "463", + "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": "464", + "json": { + "$id": "465", + "name": "nextLink" + } + } + } + ] + }, + { + "$ref": "424" + }, + { + "$ref": "434" + } + ], + "clients": [ + { + "$id": "466", + "kind": "client", + "name": "ServiceNetworkingClient", + "namespace": "Azure.ResourceManager.ServiceNetworking", + "doc": "Traffic Controller Provider management API.", + "operations": [], + "parameters": [ + { + "$id": "467", + "name": "endpoint", + "nameInRequest": "endpoint", + "doc": "Service host", + "type": { + "$id": "468", + "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": "469", + "type": { + "$id": "470", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "https://management.azure.com" + } + } + ], + "decorators": [ + { + "$id": "471", + "name": "TypeSpec.@service", + "arguments": { + "$id": "472", + "options": { + "$id": "473", + "title": "TrafficController" + } + } + } + ], + "crossLanguageDefinitionId": "Microsoft.ServiceNetworking", + "apiVersions": [ + "2023-11-01", + "2024-05-01-preview", + "2025-01-01", + "2025-03-01-preview" + ], + "children": [ + { + "$id": "474", + "kind": "client", + "name": "AssociationsInterface", + "namespace": "Azure.ResourceManager.ServiceNetworking", + "operations": [ + { + "$id": "475", + "name": "get", + "resourceName": "Association", + "doc": "Get a Association", + "accessibility": "public", + "parameters": [ + { + "$id": "476", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "477", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "478", + "type": { + "$id": "479", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-03-01-preview" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "480", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "481", + "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": "482", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "483", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "484", + "name": "trafficControllerName", + "nameInRequest": "trafficControllerName", + "doc": "traffic controller name for path", + "type": { + "$id": "485", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "486", + "name": "associationName", + "nameInRequest": "associationName", + "doc": "Name of Association", + "type": { + "$id": "487", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "488", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "489", + "kind": "constant", + "valueType": { + "$id": "490", + "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": "491", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "74" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "GET", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceNetworking/trafficControllers/{trafficControllerName}/associations/{associationName}", + "bufferResponse": true, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.ServiceNetworking.AssociationsInterface.get", + "decorators": [], + "examples": [ + { + "$id": "492", + "kind": "http", + "name": "Get Association", + "description": "Get Association", + "filePath": "2025-03-01-preview/AssociationGet.json", + "parameters": [ + { + "$id": "493", + "parameter": { + "$ref": "476" + }, + "value": { + "$id": "494", + "kind": "string", + "type": { + "$ref": "477" + }, + "value": "2025-03-01-preview" + } + }, + { + "$id": "495", + "parameter": { + "$ref": "480" + }, + "value": { + "$id": "496", + "kind": "string", + "type": { + "$ref": "481" + }, + "value": "subid" + } + }, + { + "$id": "497", + "parameter": { + "$ref": "482" + }, + "value": { + "$id": "498", + "kind": "string", + "type": { + "$ref": "483" + }, + "value": "rg1" + } + }, + { + "$id": "499", + "parameter": { + "$ref": "484" + }, + "value": { + "$id": "500", + "kind": "string", + "type": { + "$ref": "485" + }, + "value": "tc1" + } + }, + { + "$id": "501", + "parameter": { + "$ref": "486" + }, + "value": { + "$id": "502", + "kind": "string", + "type": { + "$ref": "487" + }, + "value": "as1" + } + } + ], + "responses": [ + { + "$id": "503", + "response": { + "$ref": "491" + }, + "statusCode": 200, + "bodyValue": { + "$id": "504", + "kind": "model", + "type": { + "$ref": "74" + }, + "value": { + "$id": "505", + "name": { + "$id": "506", + "kind": "string", + "type": { + "$ref": "82" + }, + "value": "as1" + }, + "type": { + "$id": "507", + "kind": "string", + "type": { + "$ref": "86" + }, + "value": "Microsoft.ServiceNetworking/trafficControllers/associations" + }, + "id": { + "$id": "508", + "kind": "string", + "type": { + "$ref": "78" + }, + "value": "/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.ServiceNetworking/trafficControllers/tc1/associations/as1" + }, + "location": { + "$id": "509", + "kind": "string", + "type": { + "$ref": "125" + }, + "value": "NorthCentralUS" + }, + "properties": { + "$id": "510", + "kind": "model", + "type": { + "$ref": "129" + }, + "value": { + "$id": "511", + "associationType": { + "$id": "512", + "kind": "string", + "type": { + "$ref": "2" + }, + "value": "subnets" + }, + "subnet": { + "$id": "513", + "kind": "model", + "type": { + "$ref": "134" + }, + "value": { + "$id": "514", + "id": { + "$id": "515", + "kind": "string", + "type": { + "$ref": "136" + }, + "value": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet-tc/subnets/tc-subnet" + } + } + }, + "provisioningState": { + "$id": "516", + "kind": "string", + "type": { + "$ref": "6" + }, + "value": "Succeeded" + } + } + } + } + } + } + ] + } + ] + }, + { + "$id": "517", + "name": "createOrUpdate", + "resourceName": "Association", + "doc": "Create a Association", + "accessibility": "public", + "parameters": [ + { + "$id": "518", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "519", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "520", + "type": { + "$id": "521", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-03-01-preview" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "522", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "523", + "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": "524", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "525", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "526", + "name": "trafficControllerName", + "nameInRequest": "trafficControllerName", + "doc": "traffic controller name for path", + "type": { + "$id": "527", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "528", + "name": "associationName", + "nameInRequest": "associationName", + "doc": "Name of Association", + "type": { + "$id": "529", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "530", + "name": "contentType", + "nameInRequest": "Content-Type", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$id": "531", + "kind": "constant", + "valueType": { + "$id": "532", + "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": "533", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "534", + "kind": "constant", + "valueType": { + "$id": "535", + "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": "536", + "name": "resource", + "nameInRequest": "resource", + "doc": "Resource create parameters.", + "type": { + "$ref": "74" + }, + "location": "Body", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "537", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "74" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + }, + { + "$id": "538", + "statusCodes": [ + 201 + ], + "bodyType": { + "$ref": "74" + }, + "headers": [ + { + "$id": "539", + "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": "540", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + } + } + ], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "PUT", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceNetworking/trafficControllers/{trafficControllerName}/associations/{associationName}", + "requestMediaTypes": [ + "application/json" + ], + "bufferResponse": true, + "longRunning": { + "$id": "541", + "finalStateVia": 0, + "finalResponse": { + "$id": "542", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "74" + } + } + }, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.ServiceNetworking.AssociationsInterface.createOrUpdate", + "decorators": [ + { + "$id": "543", + "name": "Azure.Core.@useFinalStateVia", + "arguments": { + "$id": "544", + "finalState": "azure-async-operation" + } + } + ], + "examples": [ + { + "$id": "545", + "kind": "http", + "name": "Put Association", + "description": "Put Association", + "filePath": "2025-03-01-preview/AssociationPut.json", + "parameters": [ + { + "$id": "546", + "parameter": { + "$ref": "518" + }, + "value": { + "$id": "547", + "kind": "string", + "type": { + "$ref": "519" + }, + "value": "2025-03-01-preview" + } + }, + { + "$id": "548", + "parameter": { + "$ref": "522" + }, + "value": { + "$id": "549", + "kind": "string", + "type": { + "$ref": "523" + }, + "value": "subid" + } + }, + { + "$id": "550", + "parameter": { + "$ref": "524" + }, + "value": { + "$id": "551", + "kind": "string", + "type": { + "$ref": "525" + }, + "value": "rg1" + } + }, + { + "$id": "552", + "parameter": { + "$ref": "526" + }, + "value": { + "$id": "553", + "kind": "string", + "type": { + "$ref": "527" + }, + "value": "tc1" + } + }, + { + "$id": "554", + "parameter": { + "$ref": "528" + }, + "value": { + "$id": "555", + "kind": "string", + "type": { + "$ref": "529" + }, + "value": "as1" + } + }, + { + "$id": "556", + "parameter": { + "$ref": "536" + }, + "value": { + "$id": "557", + "kind": "model", + "type": { + "$ref": "74" + }, + "value": { + "$id": "558", + "location": { + "$id": "559", + "kind": "string", + "type": { + "$ref": "125" + }, + "value": "NorthCentralUS" + }, + "properties": { + "$id": "560", + "kind": "model", + "type": { + "$ref": "129" + }, + "value": { + "$id": "561", + "associationType": { + "$id": "562", + "kind": "string", + "type": { + "$ref": "2" + }, + "value": "subnets" + }, + "subnet": { + "$id": "563", + "kind": "model", + "type": { + "$ref": "134" + }, + "value": { + "$id": "564", + "id": { + "$id": "565", + "kind": "string", + "type": { + "$ref": "136" + }, + "value": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet-tc/subnets/tc-subnet" + } + } + } + } + } + } + } + } + ], + "responses": [ + { + "$id": "566", + "response": { + "$ref": "537" + }, + "statusCode": 200, + "bodyValue": { + "$id": "567", + "kind": "model", + "type": { + "$ref": "74" + }, + "value": { + "$id": "568", + "name": { + "$id": "569", + "kind": "string", + "type": { + "$ref": "82" + }, + "value": "associatedvnet-1" + }, + "type": { + "$id": "570", + "kind": "string", + "type": { + "$ref": "86" + }, + "value": "Microsoft.ServiceNetworking/trafficControllers/associations" + }, + "id": { + "$id": "571", + "kind": "string", + "type": { + "$ref": "78" + }, + "value": "/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.ServiceNetworking/trafficControllers/tc1/associations/as1" + }, + "location": { + "$id": "572", + "kind": "string", + "type": { + "$ref": "125" + }, + "value": "NorthCentralUS" + }, + "properties": { + "$id": "573", + "kind": "model", + "type": { + "$ref": "129" + }, + "value": { + "$id": "574", + "associationType": { + "$id": "575", + "kind": "string", + "type": { + "$ref": "2" + }, + "value": "subnets" + }, + "subnet": { + "$id": "576", + "kind": "model", + "type": { + "$ref": "134" + }, + "value": { + "$id": "577", + "id": { + "$id": "578", + "kind": "string", + "type": { + "$ref": "136" + }, + "value": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet-tc/subnets/tc-subnet" + } + } + }, + "provisioningState": { + "$id": "579", + "kind": "string", + "type": { + "$ref": "6" + }, + "value": "Accepted" + } + } + } + } + } + }, + { + "$id": "580", + "response": { + "$ref": "538" + }, + "statusCode": 201, + "bodyValue": { + "$id": "581", + "kind": "model", + "type": { + "$ref": "74" + }, + "value": { + "$id": "582", + "name": { + "$id": "583", + "kind": "string", + "type": { + "$ref": "82" + }, + "value": "associatedvnet-1" + }, + "type": { + "$id": "584", + "kind": "string", + "type": { + "$ref": "86" + }, + "value": "Microsoft.ServiceNetworking/trafficControllers/associations" + }, + "id": { + "$id": "585", + "kind": "string", + "type": { + "$ref": "78" + }, + "value": "/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.ServiceNetworking/trafficControllers/tc1/associations/as1" + }, + "location": { + "$id": "586", + "kind": "string", + "type": { + "$ref": "125" + }, + "value": "NorthCentralUS" + }, + "properties": { + "$id": "587", + "kind": "model", + "type": { + "$ref": "129" + }, + "value": { + "$id": "588", + "associationType": { + "$id": "589", + "kind": "string", + "type": { + "$ref": "2" + }, + "value": "subnets" + }, + "subnet": { + "$id": "590", + "kind": "model", + "type": { + "$ref": "134" + }, + "value": { + "$id": "591", + "id": { + "$id": "592", + "kind": "string", + "type": { + "$ref": "136" + }, + "value": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet-tc/subnets/tc-subnet" + } + } + } + } + } + } + } + } + ] + } + ] + }, + { + "$id": "593", + "name": "update", + "resourceName": "Association", + "doc": "Update a Association", + "accessibility": "public", + "parameters": [ + { + "$id": "594", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "595", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "596", + "type": { + "$id": "597", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-03-01-preview" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "598", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "599", + "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": "600", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "601", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "602", + "name": "trafficControllerName", + "nameInRequest": "trafficControllerName", + "doc": "traffic controller name for path", + "type": { + "$id": "603", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "604", + "name": "associationName", + "nameInRequest": "associationName", + "doc": "Name of Association", + "type": { + "$id": "605", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "606", + "name": "contentType", + "nameInRequest": "Content-Type", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$id": "607", + "kind": "constant", + "valueType": { + "$id": "608", + "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": "609", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "610", + "kind": "constant", + "valueType": { + "$id": "611", + "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": "612", + "name": "properties", + "nameInRequest": "properties", + "doc": "The resource properties to be updated.", + "type": { + "$ref": "180" + }, + "location": "Body", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "613", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "74" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "PATCH", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceNetworking/trafficControllers/{trafficControllerName}/associations/{associationName}", + "requestMediaTypes": [ + "application/json" + ], + "bufferResponse": true, + "generateProtocolMethod": true, + "generateConvenienceMethod": false, + "crossLanguageDefinitionId": "Microsoft.ServiceNetworking.AssociationsInterface.update", + "decorators": [], + "examples": [ + { + "$id": "614", + "kind": "http", + "name": "Update Association", + "description": "Update Association", + "filePath": "2025-03-01-preview/AssociationPatch.json", + "parameters": [ + { + "$id": "615", + "parameter": { + "$ref": "594" + }, + "value": { + "$id": "616", + "kind": "string", + "type": { + "$ref": "595" + }, + "value": "2025-03-01-preview" + } + }, + { + "$id": "617", + "parameter": { + "$ref": "598" + }, + "value": { + "$id": "618", + "kind": "string", + "type": { + "$ref": "599" + }, + "value": "subid" + } + }, + { + "$id": "619", + "parameter": { + "$ref": "600" + }, + "value": { + "$id": "620", + "kind": "string", + "type": { + "$ref": "601" + }, + "value": "rg1" + } + }, + { + "$id": "621", + "parameter": { + "$ref": "602" + }, + "value": { + "$id": "622", + "kind": "string", + "type": { + "$ref": "603" + }, + "value": "tc1" + } + }, + { + "$id": "623", + "parameter": { + "$ref": "604" + }, + "value": { + "$id": "624", + "kind": "string", + "type": { + "$ref": "605" + }, + "value": "as1" + } + }, + { + "$id": "625", + "parameter": { + "$ref": "612" + }, + "value": { + "$id": "626", + "kind": "model", + "type": { + "$ref": "180" + }, + "value": { + "$id": "627", + "properties": { + "$id": "628", + "kind": "model", + "type": { + "$ref": "188" + }, + "value": { + "$id": "629", + "associationType": { + "$id": "630", + "kind": "string", + "type": { + "$ref": "2" + }, + "value": "subnets" + }, + "subnet": { + "$id": "631", + "kind": "model", + "type": { + "$ref": "193" + }, + "value": { + "$id": "632", + "id": { + "$id": "633", + "kind": "string", + "type": { + "$ref": "195" + }, + "value": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet-tc/subnets/tc-subnet" + } + } + } + } + } + } + } + } + ], + "responses": [ + { + "$id": "634", + "response": { + "$ref": "613" + }, + "statusCode": 200, + "bodyValue": { + "$id": "635", + "kind": "model", + "type": { + "$ref": "74" + }, + "value": { + "$id": "636", + "name": { + "$id": "637", + "kind": "string", + "type": { + "$ref": "82" + }, + "value": "as1" + }, + "type": { + "$id": "638", + "kind": "string", + "type": { + "$ref": "86" + }, + "value": "Microsoft.ServiceNetworking/trafficControllers/associations" + }, + "id": { + "$id": "639", + "kind": "string", + "type": { + "$ref": "78" + }, + "value": "/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.ServiceNetworking/trafficControllers/tc1/associations/as1" + }, + "location": { + "$id": "640", + "kind": "string", + "type": { + "$ref": "125" + }, + "value": "NorthCentralUS" + }, + "properties": { + "$id": "641", + "kind": "model", + "type": { + "$ref": "129" + }, + "value": { + "$id": "642", + "associationType": { + "$id": "643", + "kind": "string", + "type": { + "$ref": "2" + }, + "value": "subnets" + }, + "subnet": { + "$id": "644", + "kind": "model", + "type": { + "$ref": "134" + }, + "value": { + "$id": "645", + "id": { + "$id": "646", + "kind": "string", + "type": { + "$ref": "136" + }, + "value": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet-tc/subnets/tc-subnet" + } + } + } + } + } + } + } + } + ] + } + ] + }, + { + "$id": "647", + "name": "delete", + "resourceName": "Association", + "doc": "Delete a Association", + "accessibility": "public", + "parameters": [ + { + "$id": "648", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "649", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "650", + "type": { + "$id": "651", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-03-01-preview" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "652", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "653", + "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": "654", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "655", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "656", + "name": "trafficControllerName", + "nameInRequest": "trafficControllerName", + "doc": "traffic controller name for path", + "type": { + "$id": "657", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "658", + "name": "associationName", + "nameInRequest": "associationName", + "doc": "Name of Association", + "type": { + "$id": "659", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "660", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "661", + "kind": "constant", + "valueType": { + "$id": "662", + "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": "663", + "statusCodes": [ + 202 + ], + "headers": [ + { + "$id": "664", + "name": "location", + "nameInResponse": "Location", + "doc": "The Location header contains the URL where the status of the long running operation can be checked.", + "type": { + "$id": "665", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + { + "$id": "666", + "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": "667", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + } + } + ], + "isErrorResponse": false + }, + { + "$id": "668", + "statusCodes": [ + 204 + ], + "headers": [], + "isErrorResponse": false + } + ], + "httpMethod": "DELETE", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceNetworking/trafficControllers/{trafficControllerName}/associations/{associationName}", + "bufferResponse": true, + "longRunning": { + "$id": "669", + "finalStateVia": 1, + "finalResponse": { + "$id": "670", + "statusCodes": [ + 204 + ] + } + }, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.ServiceNetworking.AssociationsInterface.delete", + "decorators": [], + "examples": [ + { + "$id": "671", + "kind": "http", + "name": "Delete Association", + "description": "Delete Association", + "filePath": "2025-03-01-preview/AssociationDelete.json", + "parameters": [ + { + "$id": "672", + "parameter": { + "$ref": "648" + }, + "value": { + "$id": "673", + "kind": "string", + "type": { + "$ref": "649" + }, + "value": "2025-03-01-preview" + } + }, + { + "$id": "674", + "parameter": { + "$ref": "652" + }, + "value": { + "$id": "675", + "kind": "string", + "type": { + "$ref": "653" + }, + "value": "subid" + } + }, + { + "$id": "676", + "parameter": { + "$ref": "654" + }, + "value": { + "$id": "677", + "kind": "string", + "type": { + "$ref": "655" + }, + "value": "rg1" + } + }, + { + "$id": "678", + "parameter": { + "$ref": "656" + }, + "value": { + "$id": "679", + "kind": "string", + "type": { + "$ref": "657" + }, + "value": "tc1" + } + }, + { + "$id": "680", + "parameter": { + "$ref": "658" + }, + "value": { + "$id": "681", + "kind": "string", + "type": { + "$ref": "659" + }, + "value": "as1" + } + } + ], + "responses": [ + { + "$id": "682", + "response": { + "$ref": "663" + }, + "statusCode": 202 + }, + { + "$id": "683", + "response": { + "$ref": "668" + }, + "statusCode": 204 + } + ] + } + ] + }, + { + "$id": "684", + "name": "listByTrafficController", + "resourceName": "Association", + "doc": "List Association resources by TrafficController", + "accessibility": "public", + "parameters": [ + { + "$id": "685", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "686", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "687", + "type": { + "$id": "688", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-03-01-preview" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "689", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "690", + "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": "691", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "692", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "693", + "name": "trafficControllerName", + "nameInRequest": "trafficControllerName", + "doc": "traffic controller name for path", + "type": { + "$id": "694", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "695", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "696", + "kind": "constant", + "valueType": { + "$id": "697", + "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": "698", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "227" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "GET", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceNetworking/trafficControllers/{trafficControllerName}/associations", + "bufferResponse": true, + "paging": { + "$id": "699", + "itemPropertySegments": [ + "value" + ], + "nextLink": { + "$id": "700", + "responseSegments": [ + "nextLink" + ], + "responseLocation": "Body" + } + }, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.ServiceNetworking.AssociationsInterface.listByTrafficController", + "decorators": [], + "examples": [ + { + "$id": "701", + "kind": "http", + "name": "Get Associations", + "description": "Get Associations", + "filePath": "2025-03-01-preview/AssociationsGet.json", + "parameters": [ + { + "$id": "702", + "parameter": { + "$ref": "685" + }, + "value": { + "$id": "703", + "kind": "string", + "type": { + "$ref": "686" + }, + "value": "2025-03-01-preview" + } + }, + { + "$id": "704", + "parameter": { + "$ref": "689" + }, + "value": { + "$id": "705", + "kind": "string", + "type": { + "$ref": "690" + }, + "value": "subid" + } + }, + { + "$id": "706", + "parameter": { + "$ref": "691" + }, + "value": { + "$id": "707", + "kind": "string", + "type": { + "$ref": "692" + }, + "value": "rg1" + } + }, + { + "$id": "708", + "parameter": { + "$ref": "693" + }, + "value": { + "$id": "709", + "kind": "string", + "type": { + "$ref": "694" + }, + "value": "tc1" + } + } + ], + "responses": [ + { + "$id": "710", + "response": { + "$ref": "698" + }, + "statusCode": 200, + "bodyValue": { + "$id": "711", + "kind": "model", + "type": { + "$ref": "227" + }, + "value": { + "$id": "712", + "value": { + "$id": "713", + "kind": "array", + "type": { + "$ref": "229" + }, + "value": [ + { + "$id": "714", + "kind": "model", + "type": { + "$ref": "74" + }, + "value": { + "$id": "715", + "name": { + "$id": "716", + "kind": "string", + "type": { + "$ref": "82" + }, + "value": "as1" + }, + "type": { + "$id": "717", + "kind": "string", + "type": { + "$ref": "86" + }, + "value": "Microsoft.ServiceNetworking/trafficControllers/associations" + }, + "id": { + "$id": "718", + "kind": "string", + "type": { + "$ref": "78" + }, + "value": "/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.ServiceNetworking/trafficControllers/tc1/associations/as1" + }, + "location": { + "$id": "719", + "kind": "string", + "type": { + "$ref": "125" + }, + "value": "NorthCentralUS" + }, + "properties": { + "$id": "720", + "kind": "model", + "type": { + "$ref": "129" + }, + "value": { + "$id": "721", + "associationType": { + "$id": "722", + "kind": "string", + "type": { + "$ref": "2" + }, + "value": "subnets" + }, + "subnet": { + "$id": "723", + "kind": "model", + "type": { + "$ref": "134" + }, + "value": { + "$id": "724", + "id": { + "$id": "725", + "kind": "string", + "type": { + "$ref": "136" + }, + "value": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet-tc/subnets/tc-subnet" + } + } + }, + "provisioningState": { + "$id": "726", + "kind": "string", + "type": { + "$ref": "6" + }, + "value": "Succeeded" + } + } + } + } + } + ] + } + } + } + } + ] + } + ] + } + ], + "parameters": [ + { + "$id": "727", + "name": "endpoint", + "nameInRequest": "endpoint", + "doc": "Service host", + "type": { + "$id": "728", + "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": "729", + "type": { + "$id": "730", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "https://management.azure.com" + } + } + ], + "decorators": [ + { + "$id": "731", + "name": "Azure.ResourceManager.@armResourceOperations", + "arguments": { + "$id": "732" + } + } + ], + "crossLanguageDefinitionId": "Microsoft.ServiceNetworking.AssociationsInterface", + "apiVersions": [ + "2023-11-01", + "2024-05-01-preview", + "2025-01-01", + "2025-03-01-preview" + ], + "parent": { + "$ref": "466" + } + }, + { + "$id": "733", + "kind": "client", + "name": "FrontendsInterface", + "namespace": "Azure.ResourceManager.ServiceNetworking", + "operations": [ + { + "$id": "734", + "name": "get", + "resourceName": "Frontend", + "doc": "Get a Frontend", + "accessibility": "public", + "parameters": [ + { + "$id": "735", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "736", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "737", + "type": { + "$id": "738", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-03-01-preview" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "739", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "740", + "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": "741", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "742", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "743", + "name": "trafficControllerName", + "nameInRequest": "trafficControllerName", + "doc": "traffic controller name for path", + "type": { + "$id": "744", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "745", + "name": "frontendName", + "nameInRequest": "frontendName", + "doc": "Frontends", + "type": { + "$id": "746", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "747", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "748", + "kind": "constant", + "valueType": { + "$id": "749", + "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": "750", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "237" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "GET", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceNetworking/trafficControllers/{trafficControllerName}/frontends/{frontendName}", + "bufferResponse": true, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.ServiceNetworking.FrontendsInterface.get", + "decorators": [], + "examples": [ + { + "$id": "751", + "kind": "http", + "name": "Get Frontend", + "description": "Get Frontend", + "filePath": "2025-03-01-preview/FrontendGet.json", + "parameters": [ + { + "$id": "752", + "parameter": { + "$ref": "735" + }, + "value": { + "$id": "753", + "kind": "string", + "type": { + "$ref": "736" + }, + "value": "2025-03-01-preview" + } + }, + { + "$id": "754", + "parameter": { + "$ref": "739" + }, + "value": { + "$id": "755", + "kind": "string", + "type": { + "$ref": "740" + }, + "value": "subid" + } + }, + { + "$id": "756", + "parameter": { + "$ref": "741" + }, + "value": { + "$id": "757", + "kind": "string", + "type": { + "$ref": "742" + }, + "value": "rg1" + } + }, + { + "$id": "758", + "parameter": { + "$ref": "743" + }, + "value": { + "$id": "759", + "kind": "string", + "type": { + "$ref": "744" + }, + "value": "tc1" + } + }, + { + "$id": "760", + "parameter": { + "$ref": "745" + }, + "value": { + "$id": "761", + "kind": "string", + "type": { + "$ref": "746" + }, + "value": "fe1" + } + } + ], + "responses": [ + { + "$id": "762", + "response": { + "$ref": "750" + }, + "statusCode": 200, + "bodyValue": { + "$id": "763", + "kind": "model", + "type": { + "$ref": "237" + }, + "value": { + "$id": "764", + "name": { + "$id": "765", + "kind": "string", + "type": { + "$ref": "82" + }, + "value": "fe1" + }, + "location": { + "$id": "766", + "kind": "string", + "type": { + "$ref": "125" + }, + "value": "NorthCentralUS" + }, + "type": { + "$id": "767", + "kind": "string", + "type": { + "$ref": "86" + }, + "value": "Microsoft.ServiceNetworking/trafficControllers/frontends" + }, + "id": { + "$id": "768", + "kind": "string", + "type": { + "$ref": "78" + }, + "value": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ServiceNetworking/trafficControllers/tc1/frontends/fe1" + }, + "properties": { + "$id": "769", + "kind": "model", + "type": { + "$ref": "239" + }, + "value": { + "$id": "770", + "fqdn": { + "$id": "771", + "kind": "string", + "type": { + "$ref": "241" + }, + "value": "test.net" + }, + "securityPolicyConfigurations": { + "$id": "772", + "kind": "model", + "type": { + "$ref": "245" + }, + "value": { + "$id": "773", + "ipAccessRulesSecurityPolicy": { + "$id": "774", + "kind": "model", + "type": { + "$ref": "255" + }, + "value": { + "$id": "775", + "id": { + "$id": "776", + "kind": "string", + "type": { + "$ref": "257" + }, + "value": "/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.ServiceNetworking/trafficControllers/sample-tc/securityPolicies/ipAccessRules-0" + } + } + } + } + }, + "provisioningState": { + "$id": "777", + "kind": "string", + "type": { + "$ref": "6" + }, + "value": "Succeeded" + } + } + } + } + } + } + ] + } + ] + }, + { + "$id": "778", + "name": "createOrUpdate", + "resourceName": "Frontend", + "doc": "Create a Frontend", + "accessibility": "public", + "parameters": [ + { + "$id": "779", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "780", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "781", + "type": { + "$id": "782", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-03-01-preview" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "783", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "784", + "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": "785", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "786", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "787", + "name": "trafficControllerName", + "nameInRequest": "trafficControllerName", + "doc": "traffic controller name for path", + "type": { + "$id": "788", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "789", + "name": "frontendName", + "nameInRequest": "frontendName", + "doc": "Frontends", + "type": { + "$id": "790", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "791", + "name": "contentType", + "nameInRequest": "Content-Type", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$id": "792", + "kind": "constant", + "valueType": { + "$id": "793", + "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": "794", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "795", + "kind": "constant", + "valueType": { + "$id": "796", + "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": "797", + "name": "resource", + "nameInRequest": "resource", + "doc": "Resource create parameters.", + "type": { + "$ref": "237" + }, + "location": "Body", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "798", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "237" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + }, + { + "$id": "799", + "statusCodes": [ + 201 + ], + "bodyType": { + "$ref": "237" + }, + "headers": [ + { + "$id": "800", + "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": "801", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + } + } + ], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "PUT", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceNetworking/trafficControllers/{trafficControllerName}/frontends/{frontendName}", + "requestMediaTypes": [ + "application/json" + ], + "bufferResponse": true, + "longRunning": { + "$id": "802", + "finalStateVia": 0, + "finalResponse": { + "$id": "803", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "237" + } + } + }, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.ServiceNetworking.FrontendsInterface.createOrUpdate", + "decorators": [ + { + "$id": "804", + "name": "Azure.Core.@useFinalStateVia", + "arguments": { + "$id": "805", + "finalState": "azure-async-operation" + } + } + ], + "examples": [ + { + "$id": "806", + "kind": "http", + "name": "Put Frontend", + "description": "Put Frontend", + "filePath": "2025-03-01-preview/FrontendPut.json", + "parameters": [ + { + "$id": "807", + "parameter": { + "$ref": "779" + }, + "value": { + "$id": "808", + "kind": "string", + "type": { + "$ref": "780" + }, + "value": "2025-03-01-preview" + } + }, + { + "$id": "809", + "parameter": { + "$ref": "783" + }, + "value": { + "$id": "810", + "kind": "string", + "type": { + "$ref": "784" + }, + "value": "subid" + } + }, + { + "$id": "811", + "parameter": { + "$ref": "785" + }, + "value": { + "$id": "812", + "kind": "string", + "type": { + "$ref": "786" + }, + "value": "rg1" + } + }, + { + "$id": "813", + "parameter": { + "$ref": "787" + }, + "value": { + "$id": "814", + "kind": "string", + "type": { + "$ref": "788" + }, + "value": "tc1" + } + }, + { + "$id": "815", + "parameter": { + "$ref": "789" + }, + "value": { + "$id": "816", + "kind": "string", + "type": { + "$ref": "790" + }, + "value": "fe1" + } + }, + { + "$id": "817", + "parameter": { + "$ref": "797" + }, + "value": { + "$id": "818", + "kind": "model", + "type": { + "$ref": "237" + }, + "value": { + "$id": "819", + "location": { + "$id": "820", + "kind": "string", + "type": { + "$ref": "125" + }, + "value": "NorthCentralUS" + }, + "properties": { + "$id": "821", + "kind": "model", + "type": { + "$ref": "239" + }, + "value": { + "$id": "822" + } + } + } + } + } + ], + "responses": [ + { + "$id": "823", + "response": { + "$ref": "798" + }, + "statusCode": 200, + "bodyValue": { + "$id": "824", + "kind": "model", + "type": { + "$ref": "237" + }, + "value": { + "$id": "825", + "name": { + "$id": "826", + "kind": "string", + "type": { + "$ref": "82" + }, + "value": "fe1" + }, + "location": { + "$id": "827", + "kind": "string", + "type": { + "$ref": "125" + }, + "value": "NorthCentralUS" + }, + "type": { + "$id": "828", + "kind": "string", + "type": { + "$ref": "86" + }, + "value": "Microsoft.ServiceNetworking/trafficControllers/frontends" + }, + "id": { + "$id": "829", + "kind": "string", + "type": { + "$ref": "78" + }, + "value": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ServiceNetworking/trafficControllers/tc1/frontends/fe1" + }, + "properties": { + "$id": "830", + "kind": "model", + "type": { + "$ref": "239" + }, + "value": { + "$id": "831", + "fqdn": { + "$id": "832", + "kind": "string", + "type": { + "$ref": "241" + }, + "value": "test.net" + }, + "securityPolicyConfigurations": { + "$id": "833", + "kind": "model", + "type": { + "$ref": "245" + }, + "value": { + "$id": "834", + "ipAccessRulesSecurityPolicy": { + "$id": "835", + "kind": "model", + "type": { + "$ref": "255" + }, + "value": { + "$id": "836", + "id": { + "$id": "837", + "kind": "string", + "type": { + "$ref": "257" + }, + "value": "/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.ServiceNetworking/trafficControllers/sample-tc/securityPolicies/ipAccessRules-0" + } + } + } + } + }, + "provisioningState": { + "$id": "838", + "kind": "string", + "type": { + "$ref": "6" + }, + "value": "Succeeded" + } + } + } + } + } + }, + { + "$id": "839", + "response": { + "$ref": "799" + }, + "statusCode": 201, + "bodyValue": { + "$id": "840", + "kind": "model", + "type": { + "$ref": "237" + }, + "value": { + "$id": "841", + "name": { + "$id": "842", + "kind": "string", + "type": { + "$ref": "82" + }, + "value": "fe1" + }, + "location": { + "$id": "843", + "kind": "string", + "type": { + "$ref": "125" + }, + "value": "NorthCentralUS" + }, + "type": { + "$id": "844", + "kind": "string", + "type": { + "$ref": "86" + }, + "value": "Microsoft.ServiceNetworking/trafficControllers/frontends" + }, + "id": { + "$id": "845", + "kind": "string", + "type": { + "$ref": "78" + }, + "value": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ServiceNetworking/trafficControllers/tc1/frontends/fe1" + }, + "properties": { + "$id": "846", + "kind": "model", + "type": { + "$ref": "239" + }, + "value": { + "$id": "847", + "fqdn": { + "$id": "848", + "kind": "string", + "type": { + "$ref": "241" + }, + "value": "test.net" + }, + "securityPolicyConfigurations": { + "$id": "849", + "kind": "model", + "type": { + "$ref": "245" + }, + "value": { + "$id": "850", + "ipAccessRulesSecurityPolicy": { + "$id": "851", + "kind": "model", + "type": { + "$ref": "255" + }, + "value": { + "$id": "852", + "id": { + "$id": "853", + "kind": "string", + "type": { + "$ref": "257" + }, + "value": "/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.ServiceNetworking/trafficControllers/sample-tc/securityPolicies/ipAccessRules-0" + } + } + } + } + }, + "provisioningState": { + "$id": "854", + "kind": "string", + "type": { + "$ref": "6" + }, + "value": "Succeeded" + } + } + } + } + } + } + ] + } + ] + }, + { + "$id": "855", + "name": "update", + "resourceName": "Frontend", + "doc": "Update a Frontend", + "accessibility": "public", + "parameters": [ + { + "$id": "856", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "857", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "858", + "type": { + "$id": "859", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-03-01-preview" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "860", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "861", + "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": "862", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "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": "trafficControllerName", + "nameInRequest": "trafficControllerName", + "doc": "traffic controller name for path", + "type": { + "$id": "865", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "866", + "name": "frontendName", + "nameInRequest": "frontendName", + "doc": "Frontends", + "type": { + "$id": "867", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "868", + "name": "contentType", + "nameInRequest": "Content-Type", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$id": "869", + "kind": "constant", + "valueType": { + "$id": "870", + "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": "871", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "872", + "kind": "constant", + "valueType": { + "$id": "873", + "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": "874", + "name": "properties", + "nameInRequest": "properties", + "doc": "The resource properties to be updated.", + "type": { + "$ref": "269" + }, + "location": "Body", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "875", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "237" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "PATCH", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceNetworking/trafficControllers/{trafficControllerName}/frontends/{frontendName}", + "requestMediaTypes": [ + "application/json" + ], + "bufferResponse": true, + "generateProtocolMethod": true, + "generateConvenienceMethod": false, + "crossLanguageDefinitionId": "Microsoft.ServiceNetworking.FrontendsInterface.update", + "decorators": [], + "examples": [ + { + "$id": "876", + "kind": "http", + "name": "Update Frontend", + "description": "Update Frontend", + "filePath": "2025-03-01-preview/FrontendPatch.json", + "parameters": [ + { + "$id": "877", + "parameter": { + "$ref": "856" + }, + "value": { + "$id": "878", + "kind": "string", + "type": { + "$ref": "857" + }, + "value": "2025-03-01-preview" + } + }, + { + "$id": "879", + "parameter": { + "$ref": "860" + }, + "value": { + "$id": "880", + "kind": "string", + "type": { + "$ref": "861" + }, + "value": "subid" + } + }, + { + "$id": "881", + "parameter": { + "$ref": "862" + }, + "value": { + "$id": "882", + "kind": "string", + "type": { + "$ref": "863" + }, + "value": "rg1" + } + }, + { + "$id": "883", + "parameter": { + "$ref": "864" + }, + "value": { + "$id": "884", + "kind": "string", + "type": { + "$ref": "865" + }, + "value": "tc1" + } + }, + { + "$id": "885", + "parameter": { + "$ref": "866" + }, + "value": { + "$id": "886", + "kind": "string", + "type": { + "$ref": "867" + }, + "value": "fe1" + } + }, + { + "$id": "887", + "parameter": { + "$ref": "874" + }, + "value": { + "$id": "888", + "kind": "model", + "type": { + "$ref": "269" + }, + "value": { + "$id": "889" + } + } + } + ], + "responses": [ + { + "$id": "890", + "response": { + "$ref": "875" + }, + "statusCode": 200, + "bodyValue": { + "$id": "891", + "kind": "model", + "type": { + "$ref": "237" + }, + "value": { + "$id": "892", + "name": { + "$id": "893", + "kind": "string", + "type": { + "$ref": "82" + }, + "value": "fe1" + }, + "location": { + "$id": "894", + "kind": "string", + "type": { + "$ref": "125" + }, + "value": "NorthCentralUS" + }, + "type": { + "$id": "895", + "kind": "string", + "type": { + "$ref": "86" + }, + "value": "Microsoft.ServiceNetworking/trafficControllers/frontends" + }, + "id": { + "$id": "896", + "kind": "string", + "type": { + "$ref": "78" + }, + "value": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ServiceNetworking/trafficControllers/tc1/frontends/fe1" + }, + "properties": { + "$id": "897", + "kind": "model", + "type": { + "$ref": "239" + }, + "value": { + "$id": "898", + "fqdn": { + "$id": "899", + "kind": "string", + "type": { + "$ref": "241" + }, + "value": "test.net" + }, + "securityPolicyConfigurations": { + "$id": "900", + "kind": "model", + "type": { + "$ref": "245" + }, + "value": { + "$id": "901", + "ipAccessRulesSecurityPolicy": { + "$id": "902", + "kind": "model", + "type": { + "$ref": "255" + }, + "value": { + "$id": "903", + "id": { + "$id": "904", + "kind": "string", + "type": { + "$ref": "257" + }, + "value": "/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.ServiceNetworking/trafficControllers/sample-tc/securityPolicies/ipAccessRules-0" + } + } + } + } + }, + "provisioningState": { + "$id": "905", + "kind": "string", + "type": { + "$ref": "6" + }, + "value": "Succeeded" + } + } + } + } + } + } + ] + } + ] + }, + { + "$id": "906", + "name": "delete", + "resourceName": "Frontend", + "doc": "Delete a Frontend", + "accessibility": "public", + "parameters": [ + { + "$id": "907", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "908", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "909", + "type": { + "$id": "910", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-03-01-preview" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "911", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "912", + "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": "913", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "914", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "915", + "name": "trafficControllerName", + "nameInRequest": "trafficControllerName", + "doc": "traffic controller name for path", + "type": { + "$id": "916", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "917", + "name": "frontendName", + "nameInRequest": "frontendName", + "doc": "Frontends", + "type": { + "$id": "918", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "919", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "920", + "kind": "constant", + "valueType": { + "$id": "921", + "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": "922", + "statusCodes": [ + 202 + ], + "headers": [ + { + "$id": "923", + "name": "location", + "nameInResponse": "Location", + "doc": "The Location header contains the URL where the status of the long running operation can be checked.", + "type": { + "$id": "924", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + { + "$id": "925", + "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": "926", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + } + } + ], + "isErrorResponse": false + }, + { + "$id": "927", + "statusCodes": [ + 204 + ], + "headers": [], + "isErrorResponse": false + } + ], + "httpMethod": "DELETE", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceNetworking/trafficControllers/{trafficControllerName}/frontends/{frontendName}", + "bufferResponse": true, + "longRunning": { + "$id": "928", + "finalStateVia": 1, + "finalResponse": { + "$id": "929", + "statusCodes": [ + 204 + ] + } + }, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.ServiceNetworking.FrontendsInterface.delete", + "decorators": [], + "examples": [ + { + "$id": "930", + "kind": "http", + "name": "Delete Frontend", + "description": "Delete Frontend", + "filePath": "2025-03-01-preview/FrontendDelete.json", + "parameters": [ + { + "$id": "931", + "parameter": { + "$ref": "907" + }, + "value": { + "$id": "932", + "kind": "string", + "type": { + "$ref": "908" + }, + "value": "2025-03-01-preview" + } + }, + { + "$id": "933", + "parameter": { + "$ref": "911" + }, + "value": { + "$id": "934", + "kind": "string", + "type": { + "$ref": "912" + }, + "value": "subid" + } + }, + { + "$id": "935", + "parameter": { + "$ref": "913" + }, + "value": { + "$id": "936", + "kind": "string", + "type": { + "$ref": "914" + }, + "value": "rg1" + } + }, + { + "$id": "937", + "parameter": { + "$ref": "915" + }, + "value": { + "$id": "938", + "kind": "string", + "type": { + "$ref": "916" + }, + "value": "tc1" + } + }, + { + "$id": "939", + "parameter": { + "$ref": "917" + }, + "value": { + "$id": "940", + "kind": "string", + "type": { + "$ref": "918" + }, + "value": "fe1" + } + } + ], + "responses": [ + { + "$id": "941", + "response": { + "$ref": "922" + }, + "statusCode": 202 + }, + { + "$id": "942", + "response": { + "$ref": "927" + }, + "statusCode": 204 + } + ] + } + ] + }, + { + "$id": "943", + "name": "listByTrafficController", + "resourceName": "Frontend", + "doc": "List Frontend resources by TrafficController", + "accessibility": "public", + "parameters": [ + { + "$id": "944", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "945", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "946", + "type": { + "$id": "947", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-03-01-preview" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "948", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "949", + "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": "950", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "951", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "952", + "name": "trafficControllerName", + "nameInRequest": "trafficControllerName", + "doc": "traffic controller name for path", + "type": { + "$id": "953", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "954", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "955", + "kind": "constant", + "valueType": { + "$id": "956", + "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": "957", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "283" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "GET", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceNetworking/trafficControllers/{trafficControllerName}/frontends", + "bufferResponse": true, + "paging": { + "$id": "958", + "itemPropertySegments": [ + "value" + ], + "nextLink": { + "$id": "959", + "responseSegments": [ + "nextLink" + ], + "responseLocation": "Body" + } + }, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.ServiceNetworking.FrontendsInterface.listByTrafficController", + "decorators": [], + "examples": [ + { + "$id": "960", + "kind": "http", + "name": "Get Frontends", + "description": "Get Frontends", + "filePath": "2025-03-01-preview/FrontendsGet.json", + "parameters": [ + { + "$id": "961", + "parameter": { + "$ref": "944" + }, + "value": { + "$id": "962", + "kind": "string", + "type": { + "$ref": "945" + }, + "value": "2025-03-01-preview" + } + }, + { + "$id": "963", + "parameter": { + "$ref": "948" + }, + "value": { + "$id": "964", + "kind": "string", + "type": { + "$ref": "949" + }, + "value": "subid" + } + }, + { + "$id": "965", + "parameter": { + "$ref": "950" + }, + "value": { + "$id": "966", + "kind": "string", + "type": { + "$ref": "951" + }, + "value": "rg1" + } + }, + { + "$id": "967", + "parameter": { + "$ref": "952" + }, + "value": { + "$id": "968", + "kind": "string", + "type": { + "$ref": "953" + }, + "value": "tc1" + } + } + ], + "responses": [ + { + "$id": "969", + "response": { + "$ref": "957" + }, + "statusCode": 200, + "bodyValue": { + "$id": "970", + "kind": "model", + "type": { + "$ref": "283" + }, + "value": { + "$id": "971", + "value": { + "$id": "972", + "kind": "array", + "type": { + "$ref": "285" + }, + "value": [ + { + "$id": "973", + "kind": "model", + "type": { + "$ref": "237" + }, + "value": { + "$id": "974", + "name": { + "$id": "975", + "kind": "string", + "type": { + "$ref": "82" + }, + "value": "fe1" + }, + "location": { + "$id": "976", + "kind": "string", + "type": { + "$ref": "125" + }, + "value": "NorthCentralUS" + }, + "type": { + "$id": "977", + "kind": "string", + "type": { + "$ref": "86" + }, + "value": "Microsoft.ServiceNetworking/trafficControllers/frontends" + }, + "id": { + "$id": "978", + "kind": "string", + "type": { + "$ref": "78" + }, + "value": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ServiceNetworking/trafficControllers/tc1/frontends/fe1" + }, + "properties": { + "$id": "979", + "kind": "model", + "type": { + "$ref": "239" + }, + "value": { + "$id": "980", + "fqdn": { + "$id": "981", + "kind": "string", + "type": { + "$ref": "241" + }, + "value": "test.net" + }, + "securityPolicyConfigurations": { + "$id": "982", + "kind": "model", + "type": { + "$ref": "245" + }, + "value": { + "$id": "983", + "ipAccessRulesSecurityPolicy": { + "$id": "984", + "kind": "model", + "type": { + "$ref": "255" + }, + "value": { + "$id": "985", + "id": { + "$id": "986", + "kind": "string", + "type": { + "$ref": "257" + }, + "value": "/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.ServiceNetworking/trafficControllers/sample-tc/securityPolicies/ipAccessRules-0" + } + } + } + } + }, + "provisioningState": { + "$id": "987", + "kind": "string", + "type": { + "$ref": "6" + }, + "value": "Succeeded" + } + } + } + } + } + ] + } + } + } + } + ] + } + ] + } + ], + "parameters": [ + { + "$id": "988", + "name": "endpoint", + "nameInRequest": "endpoint", + "doc": "Service host", + "type": { + "$id": "989", + "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": "990", + "type": { + "$id": "991", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "https://management.azure.com" + } + } + ], + "decorators": [ + { + "$id": "992", + "name": "Azure.ResourceManager.@armResourceOperations", + "arguments": { + "$id": "993" + } + } + ], + "crossLanguageDefinitionId": "Microsoft.ServiceNetworking.FrontendsInterface", + "apiVersions": [ + "2023-11-01", + "2024-05-01-preview", + "2025-01-01", + "2025-03-01-preview" + ], + "parent": { + "$ref": "466" + } + }, + { + "$id": "994", + "kind": "client", + "name": "SecurityPoliciesInterface", + "namespace": "Azure.ResourceManager.ServiceNetworking", + "operations": [ + { + "$id": "995", + "name": "get", + "resourceName": "SecurityPolicy", + "doc": "Get a SecurityPolicy", + "accessibility": "public", + "parameters": [ + { + "$id": "996", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "997", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "998", + "type": { + "$id": "999", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-03-01-preview" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1000", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "1001", + "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": "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": "trafficControllerName", + "nameInRequest": "trafficControllerName", + "doc": "traffic controller name for path", + "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": "securityPolicyName", + "nameInRequest": "securityPolicyName", + "doc": "SecurityPolicy", + "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": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "1009", + "kind": "constant", + "valueType": { + "$id": "1010", + "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": "1011", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "293" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "GET", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceNetworking/trafficControllers/{trafficControllerName}/securityPolicies/{securityPolicyName}", + "bufferResponse": true, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.ServiceNetworking.SecurityPoliciesInterface.get", + "decorators": [], + "examples": [ + { + "$id": "1012", + "kind": "http", + "name": "Get SecurityPolicy", + "description": "Get SecurityPolicy", + "filePath": "2025-03-01-preview/SecurityPolicyGet.json", + "parameters": [ + { + "$id": "1013", + "parameter": { + "$ref": "996" + }, + "value": { + "$id": "1014", + "kind": "string", + "type": { + "$ref": "997" + }, + "value": "2025-03-01-preview" + } + }, + { + "$id": "1015", + "parameter": { + "$ref": "1000" + }, + "value": { + "$id": "1016", + "kind": "string", + "type": { + "$ref": "1001" + }, + "value": "subid" + } + }, + { + "$id": "1017", + "parameter": { + "$ref": "1002" + }, + "value": { + "$id": "1018", + "kind": "string", + "type": { + "$ref": "1003" + }, + "value": "rg1" + } + }, + { + "$id": "1019", + "parameter": { + "$ref": "1004" + }, + "value": { + "$id": "1020", + "kind": "string", + "type": { + "$ref": "1005" + }, + "value": "tc1" + } + }, + { + "$id": "1021", + "parameter": { + "$ref": "1006" + }, + "value": { + "$id": "1022", + "kind": "string", + "type": { + "$ref": "1007" + }, + "value": "sp1" + } + } + ], + "responses": [ + { + "$id": "1023", + "response": { + "$ref": "1011" + }, + "statusCode": 200, + "bodyValue": { + "$id": "1024", + "kind": "model", + "type": { + "$ref": "293" + }, + "value": { + "$id": "1025", + "name": { + "$id": "1026", + "kind": "string", + "type": { + "$ref": "82" + }, + "value": "waf-0" + }, + "type": { + "$id": "1027", + "kind": "string", + "type": { + "$ref": "86" + }, + "value": "Microsoft.ServiceNetworking/trafficControllers/securityPolicies" + }, + "id": { + "$id": "1028", + "kind": "string", + "type": { + "$ref": "78" + }, + "value": "/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.ServiceNetworking/trafficControllers/sample-tc/securityPolicies/waf-0" + }, + "location": { + "$id": "1029", + "kind": "string", + "type": { + "$ref": "125" + }, + "value": "eastus" + }, + "properties": { + "$id": "1030", + "kind": "model", + "type": { + "$ref": "295" + }, + "value": { + "$id": "1031", + "policyType": { + "$id": "1032", + "kind": "string", + "type": { + "$ref": "40" + }, + "value": "waf" + }, + "wafPolicy": { + "$id": "1033", + "kind": "model", + "type": { + "$ref": "300" + }, + "value": { + "$id": "1034", + "id": { + "$id": "1035", + "kind": "string", + "type": { + "$ref": "302" + }, + "value": "/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.Networking/applicationGatewayWebApplicationFirewallPolicies/wp-0" + } + } + }, + "provisioningState": { + "$id": "1036", + "kind": "string", + "type": { + "$ref": "6" + }, + "value": "Succeeded" + } + } + } + } + } + } + ] + } + ] + }, + { + "$id": "1037", + "name": "createOrUpdate", + "resourceName": "SecurityPolicy", + "doc": "Create a SecurityPolicy", + "accessibility": "public", + "parameters": [ + { + "$id": "1038", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "1039", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "1040", + "type": { + "$id": "1041", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-03-01-preview" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1042", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "1043", + "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": "1044", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "1045", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1046", + "name": "trafficControllerName", + "nameInRequest": "trafficControllerName", + "doc": "traffic controller name for path", + "type": { + "$id": "1047", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1048", + "name": "securityPolicyName", + "nameInRequest": "securityPolicyName", + "doc": "SecurityPolicy", + "type": { + "$id": "1049", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1050", + "name": "contentType", + "nameInRequest": "Content-Type", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$id": "1051", + "kind": "constant", + "valueType": { + "$id": "1052", + "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": "1053", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "1054", + "kind": "constant", + "valueType": { + "$id": "1055", + "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": "1056", + "name": "resource", + "nameInRequest": "resource", + "doc": "Resource create parameters.", + "type": { + "$ref": "293" + }, + "location": "Body", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "1057", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "293" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + }, + { + "$id": "1058", + "statusCodes": [ + 201 + ], + "bodyType": { + "$ref": "293" + }, + "headers": [ + { + "$id": "1059", + "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": "1060", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + } + } + ], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "PUT", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceNetworking/trafficControllers/{trafficControllerName}/securityPolicies/{securityPolicyName}", + "requestMediaTypes": [ + "application/json" + ], + "bufferResponse": true, + "longRunning": { + "$id": "1061", + "finalStateVia": 0, + "finalResponse": { + "$id": "1062", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "293" + } + } + }, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.ServiceNetworking.SecurityPoliciesInterface.createOrUpdate", + "decorators": [ + { + "$id": "1063", + "name": "Azure.Core.@useFinalStateVia", + "arguments": { + "$id": "1064", + "finalState": "azure-async-operation" + } + } + ], + "examples": [ + { + "$id": "1065", + "kind": "http", + "name": "Put IpAccessRules SecurityPolicy", + "description": "Put IpAccessRules SecurityPolicy", + "filePath": "2025-03-01-preview/IpAccessRulesSecurityPolicyPut.json", + "parameters": [ + { + "$id": "1066", + "parameter": { + "$ref": "1038" + }, + "value": { + "$id": "1067", + "kind": "string", + "type": { + "$ref": "1039" + }, + "value": "2025-03-01-preview" + } + }, + { + "$id": "1068", + "parameter": { + "$ref": "1042" + }, + "value": { + "$id": "1069", + "kind": "string", + "type": { + "$ref": "1043" + }, + "value": "subid" + } + }, + { + "$id": "1070", + "parameter": { + "$ref": "1044" + }, + "value": { + "$id": "1071", + "kind": "string", + "type": { + "$ref": "1045" + }, + "value": "rg1" + } + }, + { + "$id": "1072", + "parameter": { + "$ref": "1046" + }, + "value": { + "$id": "1073", + "kind": "string", + "type": { + "$ref": "1047" + }, + "value": "tc1" + } + }, + { + "$id": "1074", + "parameter": { + "$ref": "1048" + }, + "value": { + "$id": "1075", + "kind": "string", + "type": { + "$ref": "1049" + }, + "value": "sp1" + } + }, + { + "$id": "1076", + "parameter": { + "$ref": "1056" + }, + "value": { + "$id": "1077", + "kind": "model", + "type": { + "$ref": "293" + }, + "value": { + "$id": "1078", + "location": { + "$id": "1079", + "kind": "string", + "type": { + "$ref": "125" + }, + "value": "NorthCentralUS" + }, + "properties": { + "$id": "1080", + "kind": "model", + "type": { + "$ref": "295" + }, + "value": { + "$id": "1081", + "ipAccessRulesPolicy": { + "$id": "1082", + "kind": "model", + "type": { + "$ref": "308" + }, + "value": { + "$id": "1083", + "rules": { + "$id": "1084", + "kind": "array", + "type": { + "$ref": "310" + }, + "value": [] + } + } + } + } + } + } + } + } + ], + "responses": [ + { + "$id": "1085", + "response": { + "$ref": "1057" + }, + "statusCode": 200, + "bodyValue": { + "$id": "1086", + "kind": "model", + "type": { + "$ref": "293" + }, + "value": { + "$id": "1087", + "name": { + "$id": "1088", + "kind": "string", + "type": { + "$ref": "82" + }, + "value": "ipAccessRules-0" + }, + "type": { + "$id": "1089", + "kind": "string", + "type": { + "$ref": "86" + }, + "value": "Microsoft.ServiceNetworking/trafficControllers/securityPolicies" + }, + "id": { + "$id": "1090", + "kind": "string", + "type": { + "$ref": "78" + }, + "value": "/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.ServiceNetworking/trafficControllers/sample-tc/securityPolicies/ipAccessRules-0" + }, + "location": { + "$id": "1091", + "kind": "string", + "type": { + "$ref": "125" + }, + "value": "eastus" + }, + "properties": { + "$id": "1092", + "kind": "model", + "type": { + "$ref": "295" + }, + "value": { + "$id": "1093", + "policyType": { + "$id": "1094", + "kind": "string", + "type": { + "$ref": "40" + }, + "value": "ipAccessRules" + }, + "ipAccessRulesPolicy": { + "$id": "1095", + "kind": "model", + "type": { + "$ref": "308" + }, + "value": { + "$id": "1096", + "rules": { + "$id": "1097", + "kind": "array", + "type": { + "$ref": "310" + }, + "value": [] + } + } + }, + "provisioningState": { + "$id": "1098", + "kind": "string", + "type": { + "$ref": "6" + }, + "value": "Succeeded" + } + } + } + } + } + }, + { + "$id": "1099", + "response": { + "$ref": "1058" + }, + "statusCode": 201, + "bodyValue": { + "$id": "1100", + "kind": "model", + "type": { + "$ref": "293" + }, + "value": { + "$id": "1101", + "name": { + "$id": "1102", + "kind": "string", + "type": { + "$ref": "82" + }, + "value": "ipAccessRules-0" + }, + "type": { + "$id": "1103", + "kind": "string", + "type": { + "$ref": "86" + }, + "value": "Microsoft.ServiceNetworking/trafficControllers/securityPolicies" + }, + "id": { + "$id": "1104", + "kind": "string", + "type": { + "$ref": "78" + }, + "value": "/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.ServiceNetworking/trafficControllers/sample-tc/securityPolicies/ipAccessRules-0" + }, + "location": { + "$id": "1105", + "kind": "string", + "type": { + "$ref": "125" + }, + "value": "eastus" + }, + "properties": { + "$id": "1106", + "kind": "model", + "type": { + "$ref": "295" + }, + "value": { + "$id": "1107", + "policyType": { + "$id": "1108", + "kind": "string", + "type": { + "$ref": "40" + }, + "value": "ipAccessRules" + }, + "ipAccessRulesPolicy": { + "$id": "1109", + "kind": "model", + "type": { + "$ref": "308" + }, + "value": { + "$id": "1110", + "rules": { + "$id": "1111", + "kind": "array", + "type": { + "$ref": "310" + }, + "value": [] + } + } + }, + "provisioningState": { + "$id": "1112", + "kind": "string", + "type": { + "$ref": "6" + }, + "value": "Succeeded" + } + } + } + } + } + } + ] + }, + { + "$id": "1113", + "kind": "http", + "name": "Put WAF SecurityPolicy", + "description": "Put WAF SecurityPolicy", + "filePath": "2025-03-01-preview/WafSecurityPolicyPut.json", + "parameters": [ + { + "$id": "1114", + "parameter": { + "$ref": "1038" + }, + "value": { + "$id": "1115", + "kind": "string", + "type": { + "$ref": "1039" + }, + "value": "2025-03-01-preview" + } + }, + { + "$id": "1116", + "parameter": { + "$ref": "1042" + }, + "value": { + "$id": "1117", + "kind": "string", + "type": { + "$ref": "1043" + }, + "value": "subid" + } + }, + { + "$id": "1118", + "parameter": { + "$ref": "1044" + }, + "value": { + "$id": "1119", + "kind": "string", + "type": { + "$ref": "1045" + }, + "value": "rg1" + } + }, + { + "$id": "1120", + "parameter": { + "$ref": "1046" + }, + "value": { + "$id": "1121", + "kind": "string", + "type": { + "$ref": "1047" + }, + "value": "tc1" + } + }, + { + "$id": "1122", + "parameter": { + "$ref": "1048" + }, + "value": { + "$id": "1123", + "kind": "string", + "type": { + "$ref": "1049" + }, + "value": "sp1" + } + }, + { + "$id": "1124", + "parameter": { + "$ref": "1056" + }, + "value": { + "$id": "1125", + "kind": "model", + "type": { + "$ref": "293" + }, + "value": { + "$id": "1126", + "location": { + "$id": "1127", + "kind": "string", + "type": { + "$ref": "125" + }, + "value": "NorthCentralUS" + }, + "properties": { + "$id": "1128", + "kind": "model", + "type": { + "$ref": "295" + }, + "value": { + "$id": "1129", + "wafPolicy": { + "$id": "1130", + "kind": "model", + "type": { + "$ref": "300" + }, + "value": { + "$id": "1131", + "id": { + "$id": "1132", + "kind": "string", + "type": { + "$ref": "302" + }, + "value": "/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.Networking/applicationGatewayWebApplicationFirewallPolicies/wp-0" + } + } + } + } + } + } + } + } + ], + "responses": [ + { + "$id": "1133", + "response": { + "$ref": "1057" + }, + "statusCode": 200, + "bodyValue": { + "$id": "1134", + "kind": "model", + "type": { + "$ref": "293" + }, + "value": { + "$id": "1135", + "name": { + "$id": "1136", + "kind": "string", + "type": { + "$ref": "82" + }, + "value": "waf-0" + }, + "type": { + "$id": "1137", + "kind": "string", + "type": { + "$ref": "86" + }, + "value": "Microsoft.ServiceNetworking/trafficControllers/securityPolicies" + }, + "id": { + "$id": "1138", + "kind": "string", + "type": { + "$ref": "78" + }, + "value": "/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.ServiceNetworking/trafficControllers/sample-tc/securityPolicies/waf-0" + }, + "location": { + "$id": "1139", + "kind": "string", + "type": { + "$ref": "125" + }, + "value": "eastus" + }, + "properties": { + "$id": "1140", + "kind": "model", + "type": { + "$ref": "295" + }, + "value": { + "$id": "1141", + "policyType": { + "$id": "1142", + "kind": "string", + "type": { + "$ref": "40" + }, + "value": "waf" + }, + "wafPolicy": { + "$id": "1143", + "kind": "model", + "type": { + "$ref": "300" + }, + "value": { + "$id": "1144", + "id": { + "$id": "1145", + "kind": "string", + "type": { + "$ref": "302" + }, + "value": "/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.Networking/applicationGatewayWebApplicationFirewallPolicies/wp-0" + } + } + }, + "provisioningState": { + "$id": "1146", + "kind": "string", + "type": { + "$ref": "6" + }, + "value": "Succeeded" + } + } + } + } + } + }, + { + "$id": "1147", + "response": { + "$ref": "1058" + }, + "statusCode": 201, + "bodyValue": { + "$id": "1148", + "kind": "model", + "type": { + "$ref": "293" + }, + "value": { + "$id": "1149", + "name": { + "$id": "1150", + "kind": "string", + "type": { + "$ref": "82" + }, + "value": "waf-0" + }, + "type": { + "$id": "1151", + "kind": "string", + "type": { + "$ref": "86" + }, + "value": "Microsoft.ServiceNetworking/trafficControllers/securityPolicies" + }, + "id": { + "$id": "1152", + "kind": "string", + "type": { + "$ref": "78" + }, + "value": "/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.ServiceNetworking/trafficControllers/sample-tc/securityPolicies/waf-0" + }, + "location": { + "$id": "1153", + "kind": "string", + "type": { + "$ref": "125" + }, + "value": "eastus" + }, + "properties": { + "$id": "1154", + "kind": "model", + "type": { + "$ref": "295" + }, + "value": { + "$id": "1155", + "policyType": { + "$id": "1156", + "kind": "string", + "type": { + "$ref": "40" + }, + "value": "waf" + }, + "wafPolicy": { + "$id": "1157", + "kind": "model", + "type": { + "$ref": "300" + }, + "value": { + "$id": "1158", + "id": { + "$id": "1159", + "kind": "string", + "type": { + "$ref": "302" + }, + "value": "/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.Networking/applicationGatewayWebApplicationFirewallPolicies/wp-0" + } + } + }, + "provisioningState": { + "$id": "1160", + "kind": "string", + "type": { + "$ref": "6" + }, + "value": "Succeeded" + } + } + } + } + } + } + ] + } + ] + }, + { + "$id": "1161", + "name": "update", + "resourceName": "SecurityPolicy", + "doc": "Update a SecurityPolicy", + "accessibility": "public", + "parameters": [ + { + "$id": "1162", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "1163", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "1164", + "type": { + "$id": "1165", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-03-01-preview" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1166", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "1167", + "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": "1168", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "1169", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1170", + "name": "trafficControllerName", + "nameInRequest": "trafficControllerName", + "doc": "traffic controller name for path", + "type": { + "$id": "1171", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1172", + "name": "securityPolicyName", + "nameInRequest": "securityPolicyName", + "doc": "SecurityPolicy", + "type": { + "$id": "1173", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1174", + "name": "contentType", + "nameInRequest": "Content-Type", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$id": "1175", + "kind": "constant", + "valueType": { + "$id": "1176", + "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": "1177", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "1178", + "kind": "constant", + "valueType": { + "$id": "1179", + "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": "1180", + "name": "properties", + "nameInRequest": "properties", + "doc": "The resource properties to be updated.", + "type": { + "$ref": "337" + }, + "location": "Body", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "1181", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "293" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "PATCH", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceNetworking/trafficControllers/{trafficControllerName}/securityPolicies/{securityPolicyName}", + "requestMediaTypes": [ + "application/json" + ], + "bufferResponse": true, + "generateProtocolMethod": true, + "generateConvenienceMethod": false, + "crossLanguageDefinitionId": "Microsoft.ServiceNetworking.SecurityPoliciesInterface.update", + "decorators": [], + "examples": [ + { + "$id": "1182", + "kind": "http", + "name": "Update IpAccessRules SecurityPolicy", + "description": "Update IpAccessRules SecurityPolicy", + "filePath": "2025-03-01-preview/IpAccessRulesSecurityPolicyPatch.json", + "parameters": [ + { + "$id": "1183", + "parameter": { + "$ref": "1162" + }, + "value": { + "$id": "1184", + "kind": "string", + "type": { + "$ref": "1163" + }, + "value": "2025-03-01-preview" + } + }, + { + "$id": "1185", + "parameter": { + "$ref": "1166" + }, + "value": { + "$id": "1186", + "kind": "string", + "type": { + "$ref": "1167" + }, + "value": "subid" + } + }, + { + "$id": "1187", + "parameter": { + "$ref": "1168" + }, + "value": { + "$id": "1188", + "kind": "string", + "type": { + "$ref": "1169" + }, + "value": "rg1" + } + }, + { + "$id": "1189", + "parameter": { + "$ref": "1170" + }, + "value": { + "$id": "1190", + "kind": "string", + "type": { + "$ref": "1171" + }, + "value": "tc1" + } + }, + { + "$id": "1191", + "parameter": { + "$ref": "1172" + }, + "value": { + "$id": "1192", + "kind": "string", + "type": { + "$ref": "1173" + }, + "value": "sp1" + } + }, + { + "$id": "1193", + "parameter": { + "$ref": "1180" + }, + "value": { + "$id": "1194", + "kind": "model", + "type": { + "$ref": "337" + }, + "value": { + "$id": "1195", + "properties": { + "$id": "1196", + "kind": "model", + "type": { + "$ref": "345" + }, + "value": { + "$id": "1197", + "ipAccessRulesPolicy": { + "$id": "1198", + "kind": "model", + "type": { + "$ref": "308" + }, + "value": { + "$id": "1199", + "rules": { + "$id": "1200", + "kind": "array", + "type": { + "$ref": "310" + }, + "value": [] + } + } + } + } + } + } + } + } + ], + "responses": [ + { + "$id": "1201", + "response": { + "$ref": "1181" + }, + "statusCode": 200, + "bodyValue": { + "$id": "1202", + "kind": "model", + "type": { + "$ref": "293" + }, + "value": { + "$id": "1203", + "name": { + "$id": "1204", + "kind": "string", + "type": { + "$ref": "82" + }, + "value": "ipAccessRules-0" + }, + "type": { + "$id": "1205", + "kind": "string", + "type": { + "$ref": "86" + }, + "value": "Microsoft.ServiceNetworking/trafficControllers/securityPolicies" + }, + "id": { + "$id": "1206", + "kind": "string", + "type": { + "$ref": "78" + }, + "value": "/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.ServiceNetworking/trafficControllers/sample-tc/securityPolicies/ipAccessRules-0" + }, + "location": { + "$id": "1207", + "kind": "string", + "type": { + "$ref": "125" + }, + "value": "eastus" + }, + "properties": { + "$id": "1208", + "kind": "model", + "type": { + "$ref": "295" + }, + "value": { + "$id": "1209", + "policyType": { + "$id": "1210", + "kind": "string", + "type": { + "$ref": "40" + }, + "value": "ipAccessRules" + }, + "ipAccessRulesPolicy": { + "$id": "1211", + "kind": "model", + "type": { + "$ref": "308" + }, + "value": { + "$id": "1212", + "rules": { + "$id": "1213", + "kind": "array", + "type": { + "$ref": "310" + }, + "value": [] + } + } + }, + "provisioningState": { + "$id": "1214", + "kind": "string", + "type": { + "$ref": "6" + }, + "value": "Succeeded" + } + } + } + } + } + } + ] + }, + { + "$id": "1215", + "kind": "http", + "name": "Update WAF SecurityPolicy", + "description": "Update WAF SecurityPolicy", + "filePath": "2025-03-01-preview/WafSecurityPolicyPatch.json", + "parameters": [ + { + "$id": "1216", + "parameter": { + "$ref": "1162" + }, + "value": { + "$id": "1217", + "kind": "string", + "type": { + "$ref": "1163" + }, + "value": "2025-03-01-preview" + } + }, + { + "$id": "1218", + "parameter": { + "$ref": "1166" + }, + "value": { + "$id": "1219", + "kind": "string", + "type": { + "$ref": "1167" + }, + "value": "subid" + } + }, + { + "$id": "1220", + "parameter": { + "$ref": "1168" + }, + "value": { + "$id": "1221", + "kind": "string", + "type": { + "$ref": "1169" + }, + "value": "rg1" + } + }, + { + "$id": "1222", + "parameter": { + "$ref": "1170" + }, + "value": { + "$id": "1223", + "kind": "string", + "type": { + "$ref": "1171" + }, + "value": "tc1" + } + }, + { + "$id": "1224", + "parameter": { + "$ref": "1172" + }, + "value": { + "$id": "1225", + "kind": "string", + "type": { + "$ref": "1173" + }, + "value": "sp1" + } + }, + { + "$id": "1226", + "parameter": { + "$ref": "1180" + }, + "value": { + "$id": "1227", + "kind": "model", + "type": { + "$ref": "337" + }, + "value": { + "$id": "1228", + "properties": { + "$id": "1229", + "kind": "model", + "type": { + "$ref": "345" + }, + "value": { + "$id": "1230", + "wafPolicy": { + "$id": "1231", + "kind": "model", + "type": { + "$ref": "300" + }, + "value": { + "$id": "1232", + "id": { + "$id": "1233", + "kind": "string", + "type": { + "$ref": "302" + }, + "value": "/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.Networking/applicationGatewayWebApplicationFirewallPolicies/wp-0" + } + } + } + } + } + } + } + } + ], + "responses": [ + { + "$id": "1234", + "response": { + "$ref": "1181" + }, + "statusCode": 200, + "bodyValue": { + "$id": "1235", + "kind": "model", + "type": { + "$ref": "293" + }, + "value": { + "$id": "1236", + "name": { + "$id": "1237", + "kind": "string", + "type": { + "$ref": "82" + }, + "value": "waf-0" + }, + "type": { + "$id": "1238", + "kind": "string", + "type": { + "$ref": "86" + }, + "value": "Microsoft.ServiceNetworking/trafficControllers/securityPolicies" + }, + "id": { + "$id": "1239", + "kind": "string", + "type": { + "$ref": "78" + }, + "value": "/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.ServiceNetworking/trafficControllers/sample-tc/securityPolicies/waf-0" + }, + "location": { + "$id": "1240", + "kind": "string", + "type": { + "$ref": "125" + }, + "value": "eastus" + }, + "properties": { + "$id": "1241", + "kind": "model", + "type": { + "$ref": "295" + }, + "value": { + "$id": "1242", + "policyType": { + "$id": "1243", + "kind": "string", + "type": { + "$ref": "40" + }, + "value": "waf" + }, + "wafPolicy": { + "$id": "1244", + "kind": "model", + "type": { + "$ref": "300" + }, + "value": { + "$id": "1245", + "id": { + "$id": "1246", + "kind": "string", + "type": { + "$ref": "302" + }, + "value": "/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.Networking/applicationGatewayWebApplicationFirewallPolicies/wp-0" + } + } + }, + "provisioningState": { + "$id": "1247", + "kind": "string", + "type": { + "$ref": "6" + }, + "value": "Succeeded" + } + } + } + } + } + } + ] + } + ] + }, + { + "$id": "1248", + "name": "delete", + "resourceName": "SecurityPolicy", + "doc": "Delete a SecurityPolicy", + "accessibility": "public", + "parameters": [ + { + "$id": "1249", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "1250", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "1251", + "type": { + "$id": "1252", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-03-01-preview" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1253", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "1254", + "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": "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": "trafficControllerName", + "nameInRequest": "trafficControllerName", + "doc": "traffic controller name for path", + "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": "securityPolicyName", + "nameInRequest": "securityPolicyName", + "doc": "SecurityPolicy", + "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": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "1262", + "kind": "constant", + "valueType": { + "$id": "1263", + "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": "1264", + "statusCodes": [ + 202 + ], + "headers": [ + { + "$id": "1265", + "name": "location", + "nameInResponse": "Location", + "doc": "The Location header contains the URL where the status of the long running operation can be checked.", + "type": { + "$id": "1266", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + { + "$id": "1267", + "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": "1268", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + } + } + ], + "isErrorResponse": false + }, + { + "$id": "1269", + "statusCodes": [ + 204 + ], + "headers": [], + "isErrorResponse": false + } + ], + "httpMethod": "DELETE", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceNetworking/trafficControllers/{trafficControllerName}/securityPolicies/{securityPolicyName}", + "bufferResponse": true, + "longRunning": { + "$id": "1270", + "finalStateVia": 1, + "finalResponse": { + "$id": "1271", + "statusCodes": [ + 204 + ] + } + }, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.ServiceNetworking.SecurityPoliciesInterface.delete", + "decorators": [], + "examples": [ + { + "$id": "1272", + "kind": "http", + "name": "Delete SecurityPolicy", + "description": "Delete SecurityPolicy", + "filePath": "2025-03-01-preview/SecurityPolicyDelete.json", + "parameters": [ + { + "$id": "1273", + "parameter": { + "$ref": "1249" + }, + "value": { + "$id": "1274", + "kind": "string", + "type": { + "$ref": "1250" + }, + "value": "2025-03-01-preview" + } + }, + { + "$id": "1275", + "parameter": { + "$ref": "1253" + }, + "value": { + "$id": "1276", + "kind": "string", + "type": { + "$ref": "1254" + }, + "value": "subid" + } + }, + { + "$id": "1277", + "parameter": { + "$ref": "1255" + }, + "value": { + "$id": "1278", + "kind": "string", + "type": { + "$ref": "1256" + }, + "value": "rg1" + } + }, + { + "$id": "1279", + "parameter": { + "$ref": "1257" + }, + "value": { + "$id": "1280", + "kind": "string", + "type": { + "$ref": "1258" + }, + "value": "tc1" + } + }, + { + "$id": "1281", + "parameter": { + "$ref": "1259" + }, + "value": { + "$id": "1282", + "kind": "string", + "type": { + "$ref": "1260" + }, + "value": "sp1" + } + } + ], + "responses": [ + { + "$id": "1283", + "response": { + "$ref": "1264" + }, + "statusCode": 202 + }, + { + "$id": "1284", + "response": { + "$ref": "1269" + }, + "statusCode": 204 + } + ] + } + ] + }, + { + "$id": "1285", + "name": "listByTrafficController", + "resourceName": "SecurityPolicy", + "doc": "List SecurityPolicy resources by TrafficController", + "accessibility": "public", + "parameters": [ + { + "$id": "1286", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "1287", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "1288", + "type": { + "$id": "1289", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-03-01-preview" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1290", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "1291", + "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": "1292", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "1293", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1294", + "name": "trafficControllerName", + "nameInRequest": "trafficControllerName", + "doc": "traffic controller name for path", + "type": { + "$id": "1295", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1296", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "1297", + "kind": "constant", + "valueType": { + "$id": "1298", + "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": "1299", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "354" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "GET", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceNetworking/trafficControllers/{trafficControllerName}/securityPolicies", + "bufferResponse": true, + "paging": { + "$id": "1300", + "itemPropertySegments": [ + "value" + ], + "nextLink": { + "$id": "1301", + "responseSegments": [ + "nextLink" + ], + "responseLocation": "Body" + } + }, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.ServiceNetworking.SecurityPoliciesInterface.listByTrafficController", + "decorators": [], + "examples": [ + { + "$id": "1302", + "kind": "http", + "name": "Get SecurityPolicies", + "description": "Get SecurityPolicies", + "filePath": "2025-03-01-preview/SecurityPoliciesGetList.json", + "parameters": [ + { + "$id": "1303", + "parameter": { + "$ref": "1286" + }, + "value": { + "$id": "1304", + "kind": "string", + "type": { + "$ref": "1287" + }, + "value": "2025-03-01-preview" + } + }, + { + "$id": "1305", + "parameter": { + "$ref": "1290" + }, + "value": { + "$id": "1306", + "kind": "string", + "type": { + "$ref": "1291" + }, + "value": "subid" + } + }, + { + "$id": "1307", + "parameter": { + "$ref": "1292" + }, + "value": { + "$id": "1308", + "kind": "string", + "type": { + "$ref": "1293" + }, + "value": "rg1" + } + }, + { + "$id": "1309", + "parameter": { + "$ref": "1294" + }, + "value": { + "$id": "1310", + "kind": "string", + "type": { + "$ref": "1295" + }, + "value": "tc1" + } + } + ], + "responses": [ + { + "$id": "1311", + "response": { + "$ref": "1299" + }, + "statusCode": 200, + "bodyValue": { + "$id": "1312", + "kind": "model", + "type": { + "$ref": "354" + }, + "value": { + "$id": "1313", + "value": { + "$id": "1314", + "kind": "array", + "type": { + "$ref": "356" + }, + "value": [ + { + "$id": "1315", + "kind": "model", + "type": { + "$ref": "293" + }, + "value": { + "$id": "1316", + "name": { + "$id": "1317", + "kind": "string", + "type": { + "$ref": "82" + }, + "value": "waf-0" + }, + "type": { + "$id": "1318", + "kind": "string", + "type": { + "$ref": "86" + }, + "value": "Microsoft.ServiceNetworking/trafficControllers/securityPolicies" + }, + "id": { + "$id": "1319", + "kind": "string", + "type": { + "$ref": "78" + }, + "value": "/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.ServiceNetworking/trafficControllers/sample-tc/securityPolicies/waf-0" + }, + "location": { + "$id": "1320", + "kind": "string", + "type": { + "$ref": "125" + }, + "value": "eastus" + }, + "properties": { + "$id": "1321", + "kind": "model", + "type": { + "$ref": "295" + }, + "value": { + "$id": "1322", + "policyType": { + "$id": "1323", + "kind": "string", + "type": { + "$ref": "40" + }, + "value": "waf" + }, + "wafPolicy": { + "$id": "1324", + "kind": "model", + "type": { + "$ref": "300" + }, + "value": { + "$id": "1325", + "id": { + "$id": "1326", + "kind": "string", + "type": { + "$ref": "302" + }, + "value": "/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.Networking/applicationGatewayWebApplicationFirewallPolicies/wp-0" + } + } + }, + "provisioningState": { + "$id": "1327", + "kind": "string", + "type": { + "$ref": "6" + }, + "value": "Succeeded" + } + } + } + } + } + ] + } + } + } + } + ] + } + ] + } + ], + "parameters": [ + { + "$id": "1328", + "name": "endpoint", + "nameInRequest": "endpoint", + "doc": "Service host", + "type": { + "$id": "1329", + "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": "1330", + "type": { + "$id": "1331", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "https://management.azure.com" + } + } + ], + "decorators": [ + { + "$id": "1332", + "name": "Azure.ResourceManager.@armResourceOperations", + "arguments": { + "$id": "1333" + } + } + ], + "crossLanguageDefinitionId": "Microsoft.ServiceNetworking.SecurityPoliciesInterface", + "apiVersions": [ + "2024-05-01-preview", + "2025-01-01", + "2025-03-01-preview" + ], + "parent": { + "$ref": "466" + } + }, + { + "$id": "1334", + "kind": "client", + "name": "TrafficControllerInterface", + "namespace": "Azure.ResourceManager.ServiceNetworking", + "operations": [ + { + "$id": "1335", + "name": "get", + "resourceName": "TrafficController", + "doc": "Get a TrafficController", + "accessibility": "public", + "parameters": [ + { + "$id": "1336", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "1337", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "1338", + "type": { + "$id": "1339", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-03-01-preview" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1340", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "1341", + "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": "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": "trafficControllerName", + "nameInRequest": "trafficControllerName", + "doc": "traffic controller name for path", + "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": "364" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "GET", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceNetworking/trafficControllers/{trafficControllerName}", + "bufferResponse": true, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.ServiceNetworking.TrafficControllerInterface.get", + "decorators": [], + "examples": [ + { + "$id": "1350", + "kind": "http", + "name": "Get Traffic Controller", + "description": "Get Traffic Controller", + "filePath": "2025-03-01-preview/TrafficControllerGet.json", + "parameters": [ + { + "$id": "1351", + "parameter": { + "$ref": "1336" + }, + "value": { + "$id": "1352", + "kind": "string", + "type": { + "$ref": "1337" + }, + "value": "2025-03-01-preview" + } + }, + { + "$id": "1353", + "parameter": { + "$ref": "1340" + }, + "value": { + "$id": "1354", + "kind": "string", + "type": { + "$ref": "1341" + }, + "value": "subid" + } + }, + { + "$id": "1355", + "parameter": { + "$ref": "1342" + }, + "value": { + "$id": "1356", + "kind": "string", + "type": { + "$ref": "1343" + }, + "value": "rg1" + } + }, + { + "$id": "1357", + "parameter": { + "$ref": "1344" + }, + "value": { + "$id": "1358", + "kind": "string", + "type": { + "$ref": "1345" + }, + "value": "tc1" + } + } + ], + "responses": [ + { + "$id": "1359", + "response": { + "$ref": "1349" + }, + "statusCode": 200, + "bodyValue": { + "$id": "1360", + "kind": "model", + "type": { + "$ref": "364" + }, + "value": { + "$id": "1361", + "name": { + "$id": "1362", + "kind": "string", + "type": { + "$ref": "82" + }, + "value": "tc1" + }, + "id": { + "$id": "1363", + "kind": "string", + "type": { + "$ref": "78" + }, + "value": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ServiceNetworking/trafficControllers/tc1" + }, + "type": { + "$id": "1364", + "kind": "string", + "type": { + "$ref": "86" + }, + "value": "Microsoft.ServiceNetworking/trafficControllers" + }, + "location": { + "$id": "1365", + "kind": "string", + "type": { + "$ref": "125" + }, + "value": "NorthCentralUS" + }, + "tags": { + "$id": "1366", + "kind": "dict", + "type": { + "$ref": "119" + }, + "value": { + "$id": "1367", + "key1": { + "$id": "1368", + "kind": "string", + "type": { + "$ref": "121" + }, + "value": "value1" + } + } + }, + "properties": { + "$id": "1369", + "kind": "model", + "type": { + "$ref": "366" + }, + "value": { + "$id": "1370", + "configurationEndpoints": { + "$id": "1371", + "kind": "array", + "type": { + "$ref": "368" + }, + "value": [ + { + "$id": "1372", + "kind": "string", + "type": { + "$ref": "369" + }, + "value": "abc.trafficcontroller.azure.net" + } + ] + }, + "frontends": { + "$id": "1373", + "kind": "array", + "type": { + "$ref": "373" + }, + "value": [ + { + "$id": "1374", + "kind": "model", + "type": { + "$ref": "374" + }, + "value": { + "$id": "1375", + "id": { + "$id": "1376", + "kind": "string", + "type": { + "$ref": "376" + }, + "value": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ServiceNetworking/trafficControllers/tc1/frontends/fe1" + } + } + } + ] + }, + "associations": { + "$id": "1377", + "kind": "array", + "type": { + "$ref": "382" + }, + "value": [ + { + "$id": "1378", + "kind": "model", + "type": { + "$ref": "374" + }, + "value": { + "$id": "1379", + "id": { + "$id": "1380", + "kind": "string", + "type": { + "$ref": "376" + }, + "value": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ServiceNetworking/trafficControllers/tc1/association/as1" + } + } + } + ] + }, + "provisioningState": { + "$id": "1381", + "kind": "string", + "type": { + "$ref": "6" + }, + "value": "Succeeded" + } + } + } + } + } + } + ] + } + ] + }, + { + "$id": "1382", + "name": "createOrUpdate", + "resourceName": "TrafficController", + "doc": "Create a TrafficController", + "accessibility": "public", + "parameters": [ + { + "$id": "1383", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "1384", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "1385", + "type": { + "$id": "1386", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-03-01-preview" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1387", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "1388", + "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": "1389", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "1390", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1391", + "name": "trafficControllerName", + "nameInRequest": "trafficControllerName", + "doc": "traffic controller name for path", + "type": { + "$id": "1392", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1393", + "name": "contentType", + "nameInRequest": "Content-Type", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$id": "1394", + "kind": "constant", + "valueType": { + "$id": "1395", + "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": "1396", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "1397", + "kind": "constant", + "valueType": { + "$id": "1398", + "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": "1399", + "name": "resource", + "nameInRequest": "resource", + "doc": "Resource create parameters.", + "type": { + "$ref": "364" + }, + "location": "Body", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "1400", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "364" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + }, + { + "$id": "1401", + "statusCodes": [ + 201 + ], + "bodyType": { + "$ref": "364" + }, + "headers": [ + { + "$id": "1402", + "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": "1403", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + } + } + ], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "PUT", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceNetworking/trafficControllers/{trafficControllerName}", + "requestMediaTypes": [ + "application/json" + ], + "bufferResponse": true, + "longRunning": { + "$id": "1404", + "finalStateVia": 0, + "finalResponse": { + "$id": "1405", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "364" + } + } + }, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.ServiceNetworking.TrafficControllerInterface.createOrUpdate", + "decorators": [ + { + "$id": "1406", + "name": "Azure.Core.@useFinalStateVia", + "arguments": { + "$id": "1407", + "finalState": "azure-async-operation" + } + } + ], + "examples": [ + { + "$id": "1408", + "kind": "http", + "name": "Put Traffic Controller", + "description": "Put Traffic Controller", + "filePath": "2025-03-01-preview/TrafficControllerPut.json", + "parameters": [ + { + "$id": "1409", + "parameter": { + "$ref": "1383" + }, + "value": { + "$id": "1410", + "kind": "string", + "type": { + "$ref": "1384" + }, + "value": "2025-03-01-preview" + } + }, + { + "$id": "1411", + "parameter": { + "$ref": "1387" + }, + "value": { + "$id": "1412", + "kind": "string", + "type": { + "$ref": "1388" + }, + "value": "subid" + } + }, + { + "$id": "1413", + "parameter": { + "$ref": "1389" + }, + "value": { + "$id": "1414", + "kind": "string", + "type": { + "$ref": "1390" + }, + "value": "rg1" + } + }, + { + "$id": "1415", + "parameter": { + "$ref": "1391" + }, + "value": { + "$id": "1416", + "kind": "string", + "type": { + "$ref": "1392" + }, + "value": "tc1" + } + }, + { + "$id": "1417", + "parameter": { + "$ref": "1399" + }, + "value": { + "$id": "1418", + "kind": "model", + "type": { + "$ref": "364" + }, + "value": { + "$id": "1419", + "location": { + "$id": "1420", + "kind": "string", + "type": { + "$ref": "125" + }, + "value": "NorthCentralUS" + }, + "tags": { + "$id": "1421", + "kind": "dict", + "type": { + "$ref": "119" + }, + "value": { + "$id": "1422", + "key1": { + "$id": "1423", + "kind": "string", + "type": { + "$ref": "121" + }, + "value": "value1" + } + } + } + } + } + } + ], + "responses": [ + { + "$id": "1424", + "response": { + "$ref": "1400" + }, + "statusCode": 200, + "bodyValue": { + "$id": "1425", + "kind": "model", + "type": { + "$ref": "364" + }, + "value": { + "$id": "1426", + "name": { + "$id": "1427", + "kind": "string", + "type": { + "$ref": "82" + }, + "value": "tc1" + }, + "id": { + "$id": "1428", + "kind": "string", + "type": { + "$ref": "78" + }, + "value": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ServiceNetworking/trafficControllers/tc1" + }, + "type": { + "$id": "1429", + "kind": "string", + "type": { + "$ref": "86" + }, + "value": "Microsoft.ServiceNetworking/trafficControllers" + }, + "location": { + "$id": "1430", + "kind": "string", + "type": { + "$ref": "125" + }, + "value": "NorthCentralUS" + }, + "tags": { + "$id": "1431", + "kind": "dict", + "type": { + "$ref": "119" + }, + "value": { + "$id": "1432", + "key1": { + "$id": "1433", + "kind": "string", + "type": { + "$ref": "121" + }, + "value": "value1" + } + } + }, + "properties": { + "$id": "1434", + "kind": "model", + "type": { + "$ref": "366" + }, + "value": { + "$id": "1435", + "configurationEndpoints": { + "$id": "1436", + "kind": "array", + "type": { + "$ref": "368" + }, + "value": [ + { + "$id": "1437", + "kind": "string", + "type": { + "$ref": "369" + }, + "value": "abc.trafficcontroller.azure.net" + } + ] + }, + "frontends": { + "$id": "1438", + "kind": "array", + "type": { + "$ref": "373" + }, + "value": [ + { + "$id": "1439", + "kind": "model", + "type": { + "$ref": "374" + }, + "value": { + "$id": "1440", + "id": { + "$id": "1441", + "kind": "string", + "type": { + "$ref": "376" + }, + "value": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ServiceNetworking/trafficControllers/tc1/frontends/fe1" + } + } + } + ] + }, + "associations": { + "$id": "1442", + "kind": "array", + "type": { + "$ref": "382" + }, + "value": [ + { + "$id": "1443", + "kind": "model", + "type": { + "$ref": "374" + }, + "value": { + "$id": "1444", + "id": { + "$id": "1445", + "kind": "string", + "type": { + "$ref": "376" + }, + "value": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ServiceNetworking/trafficControllers/tc1/association/as1" + } + } + } + ] + }, + "securityPolicies": { + "$id": "1446", + "kind": "array", + "type": { + "$ref": "386" + }, + "value": [ + { + "$id": "1447", + "kind": "model", + "type": { + "$ref": "374" + }, + "value": { + "$id": "1448", + "id": { + "$id": "1449", + "kind": "string", + "type": { + "$ref": "376" + }, + "value": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ServiceNetworking/trafficControllers/tc1/securityPolicies/sp1" + } + } + } + ] + }, + "securityPolicyConfigurations": { + "$id": "1450", + "kind": "model", + "type": { + "$ref": "245" + }, + "value": { + "$id": "1451", + "wafSecurityPolicy": { + "$id": "1452", + "kind": "model", + "type": { + "$ref": "247" + }, + "value": { + "$id": "1453", + "id": { + "$id": "1454", + "kind": "string", + "type": { + "$ref": "249" + }, + "value": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ServiceNetworking/trafficControllers/tc1/securityPolicies/waf-0" + } + } + } + } + }, + "provisioningState": { + "$id": "1455", + "kind": "string", + "type": { + "$ref": "6" + }, + "value": "Succeeded" + } + } + } + } + } + }, + { + "$id": "1456", + "response": { + "$ref": "1401" + }, + "statusCode": 201, + "bodyValue": { + "$id": "1457", + "kind": "model", + "type": { + "$ref": "364" + }, + "value": { + "$id": "1458", + "name": { + "$id": "1459", + "kind": "string", + "type": { + "$ref": "82" + }, + "value": "tc1" + }, + "id": { + "$id": "1460", + "kind": "string", + "type": { + "$ref": "78" + }, + "value": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ServiceNetworking/trafficControllers/tc1" + }, + "type": { + "$id": "1461", + "kind": "string", + "type": { + "$ref": "86" + }, + "value": "Microsoft.ServiceNetworking/trafficControllers" + }, + "location": { + "$id": "1462", + "kind": "string", + "type": { + "$ref": "125" + }, + "value": "NorthCentralUS" + }, + "tags": { + "$id": "1463", + "kind": "dict", + "type": { + "$ref": "119" + }, + "value": { + "$id": "1464", + "key1": { + "$id": "1465", + "kind": "string", + "type": { + "$ref": "121" + }, + "value": "value1" + } + } + }, + "properties": { + "$id": "1466", + "kind": "model", + "type": { + "$ref": "366" + }, + "value": { + "$id": "1467", + "configurationEndpoints": { + "$id": "1468", + "kind": "array", + "type": { + "$ref": "368" + }, + "value": [ + { + "$id": "1469", + "kind": "string", + "type": { + "$ref": "369" + }, + "value": "abc.trafficcontroller.azure.net" + } + ] + }, + "frontends": { + "$id": "1470", + "kind": "array", + "type": { + "$ref": "373" + }, + "value": [ + { + "$id": "1471", + "kind": "model", + "type": { + "$ref": "374" + }, + "value": { + "$id": "1472", + "id": { + "$id": "1473", + "kind": "string", + "type": { + "$ref": "376" + }, + "value": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ServiceNetworking/trafficControllers/tc1/frontends/fe1" + } + } + } + ] + }, + "associations": { + "$id": "1474", + "kind": "array", + "type": { + "$ref": "382" + }, + "value": [ + { + "$id": "1475", + "kind": "model", + "type": { + "$ref": "374" + }, + "value": { + "$id": "1476", + "id": { + "$id": "1477", + "kind": "string", + "type": { + "$ref": "376" + }, + "value": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ServiceNetworking/trafficControllers/tc1/association/as1" + } + } + } + ] + }, + "securityPolicies": { + "$id": "1478", + "kind": "array", + "type": { + "$ref": "386" + }, + "value": [ + { + "$id": "1479", + "kind": "model", + "type": { + "$ref": "374" + }, + "value": { + "$id": "1480", + "id": { + "$id": "1481", + "kind": "string", + "type": { + "$ref": "376" + }, + "value": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ServiceNetworking/trafficControllers/tc1/securityPolicies/sp1" + } + } + } + ] + }, + "securityPolicyConfigurations": { + "$id": "1482", + "kind": "model", + "type": { + "$ref": "245" + }, + "value": { + "$id": "1483", + "wafSecurityPolicy": { + "$id": "1484", + "kind": "model", + "type": { + "$ref": "247" + }, + "value": { + "$id": "1485", + "id": { + "$id": "1486", + "kind": "string", + "type": { + "$ref": "249" + }, + "value": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ServiceNetworking/trafficControllers/tc1/securityPolicies/waf-0" + } + } + } + } + }, + "provisioningState": { + "$id": "1487", + "kind": "string", + "type": { + "$ref": "6" + }, + "value": "Succeeded" + } + } + } + } + } + } + ] + } + ] + }, + { + "$id": "1488", + "name": "update", + "resourceName": "TrafficController", + "doc": "Update a TrafficController", + "accessibility": "public", + "parameters": [ + { + "$id": "1489", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "1490", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "1491", + "type": { + "$id": "1492", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-03-01-preview" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1493", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "1494", + "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": "1495", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "1496", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1497", + "name": "trafficControllerName", + "nameInRequest": "trafficControllerName", + "doc": "traffic controller name for path", + "type": { + "$id": "1498", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1499", + "name": "contentType", + "nameInRequest": "Content-Type", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$id": "1500", + "kind": "constant", + "valueType": { + "$id": "1501", + "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": "1502", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "1503", + "kind": "constant", + "valueType": { + "$id": "1504", + "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": "1505", + "name": "properties", + "nameInRequest": "properties", + "doc": "The resource properties to be updated.", + "type": { + "$ref": "397" + }, + "location": "Body", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "1506", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "364" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "PATCH", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceNetworking/trafficControllers/{trafficControllerName}", + "requestMediaTypes": [ + "application/json" + ], + "bufferResponse": true, + "generateProtocolMethod": true, + "generateConvenienceMethod": false, + "crossLanguageDefinitionId": "Microsoft.ServiceNetworking.TrafficControllerInterface.update", + "decorators": [], + "examples": [ + { + "$id": "1507", + "kind": "http", + "name": "Patch Traffic Controller", + "description": "Patch Traffic Controller", + "filePath": "2025-03-01-preview/TrafficControllerPatch.json", + "parameters": [ + { + "$id": "1508", + "parameter": { + "$ref": "1489" + }, + "value": { + "$id": "1509", + "kind": "string", + "type": { + "$ref": "1490" + }, + "value": "2025-03-01-preview" + } + }, + { + "$id": "1510", + "parameter": { + "$ref": "1493" + }, + "value": { + "$id": "1511", + "kind": "string", + "type": { + "$ref": "1494" + }, + "value": "subid" + } + }, + { + "$id": "1512", + "parameter": { + "$ref": "1495" + }, + "value": { + "$id": "1513", + "kind": "string", + "type": { + "$ref": "1496" + }, + "value": "rg1" + } + }, + { + "$id": "1514", + "parameter": { + "$ref": "1497" + }, + "value": { + "$id": "1515", + "kind": "string", + "type": { + "$ref": "1498" + }, + "value": "tc1" + } + }, + { + "$id": "1516", + "parameter": { + "$ref": "1505" + }, + "value": { + "$id": "1517", + "kind": "model", + "type": { + "$ref": "397" + }, + "value": { + "$id": "1518", + "tags": { + "$id": "1519", + "kind": "dict", + "type": { + "$ref": "399" + }, + "value": { + "$id": "1520", + "key1": { + "$id": "1521", + "kind": "string", + "type": { + "$ref": "401" + }, + "value": "value1" + } + } + } + } + } + } + ], + "responses": [ + { + "$id": "1522", + "response": { + "$ref": "1506" + }, + "statusCode": 200, + "bodyValue": { + "$id": "1523", + "kind": "model", + "type": { + "$ref": "364" + }, + "value": { + "$id": "1524", + "name": { + "$id": "1525", + "kind": "string", + "type": { + "$ref": "82" + }, + "value": "tc1" + }, + "id": { + "$id": "1526", + "kind": "string", + "type": { + "$ref": "78" + }, + "value": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ServiceNetworking/trafficControllers/tc1" + }, + "type": { + "$id": "1527", + "kind": "string", + "type": { + "$ref": "86" + }, + "value": "Microsoft.ServiceNetworking/trafficControllers" + }, + "location": { + "$id": "1528", + "kind": "string", + "type": { + "$ref": "125" + }, + "value": "NorthCentralUS" + }, + "tags": { + "$id": "1529", + "kind": "dict", + "type": { + "$ref": "119" + }, + "value": { + "$id": "1530", + "key1": { + "$id": "1531", + "kind": "string", + "type": { + "$ref": "121" + }, + "value": "value1" + } + } + }, + "properties": { + "$id": "1532", + "kind": "model", + "type": { + "$ref": "366" + }, + "value": { + "$id": "1533", + "configurationEndpoints": { + "$id": "1534", + "kind": "array", + "type": { + "$ref": "368" + }, + "value": [ + { + "$id": "1535", + "kind": "string", + "type": { + "$ref": "369" + }, + "value": "abc.trafficcontroller.azure.net" + } + ] + }, + "frontends": { + "$id": "1536", + "kind": "array", + "type": { + "$ref": "373" + }, + "value": [ + { + "$id": "1537", + "kind": "model", + "type": { + "$ref": "374" + }, + "value": { + "$id": "1538", + "id": { + "$id": "1539", + "kind": "string", + "type": { + "$ref": "376" + }, + "value": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ServiceNetworking/trafficControllers/tc1/frontends/fe1" + } + } + } + ] + }, + "associations": { + "$id": "1540", + "kind": "array", + "type": { + "$ref": "382" + }, + "value": [ + { + "$id": "1541", + "kind": "model", + "type": { + "$ref": "374" + }, + "value": { + "$id": "1542", + "id": { + "$id": "1543", + "kind": "string", + "type": { + "$ref": "376" + }, + "value": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ServiceNetworking/trafficControllers/tc1/association/as1" + } + } + } + ] + }, + "securityPolicies": { + "$id": "1544", + "kind": "array", + "type": { + "$ref": "386" + }, + "value": [ + { + "$id": "1545", + "kind": "model", + "type": { + "$ref": "374" + }, + "value": { + "$id": "1546", + "id": { + "$id": "1547", + "kind": "string", + "type": { + "$ref": "376" + }, + "value": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ServiceNetworking/trafficControllers/tc1/securityPolicies/sp1" + } + } + } + ] + }, + "securityPolicyConfigurations": { + "$id": "1548", + "kind": "model", + "type": { + "$ref": "245" + }, + "value": { + "$id": "1549", + "wafSecurityPolicy": { + "$id": "1550", + "kind": "model", + "type": { + "$ref": "247" + }, + "value": { + "$id": "1551", + "id": { + "$id": "1552", + "kind": "string", + "type": { + "$ref": "249" + }, + "value": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ServiceNetworking/trafficControllers/tc1/securityPolicies/waf-0" + } + } + } + } + }, + "provisioningState": { + "$id": "1553", + "kind": "string", + "type": { + "$ref": "6" + }, + "value": "Succeeded" + } + } + } + } + } + } + ] + } + ] + }, + { + "$id": "1554", + "name": "delete", + "resourceName": "TrafficController", + "doc": "Delete a TrafficController", + "accessibility": "public", + "parameters": [ + { + "$id": "1555", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "1556", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "1557", + "type": { + "$id": "1558", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-03-01-preview" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1559", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "1560", + "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": "1561", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "1562", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1563", + "name": "trafficControllerName", + "nameInRequest": "trafficControllerName", + "doc": "traffic controller name for path", + "type": { + "$id": "1564", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1565", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "1566", + "kind": "constant", + "valueType": { + "$id": "1567", + "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": "1568", + "statusCodes": [ + 202 + ], + "headers": [ + { + "$id": "1569", + "name": "location", + "nameInResponse": "Location", + "doc": "The Location header contains the URL where the status of the long running operation can be checked.", + "type": { + "$id": "1570", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + { + "$id": "1571", + "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": "1572", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + } + } + ], + "isErrorResponse": false + }, + { + "$id": "1573", + "statusCodes": [ + 204 + ], + "headers": [], + "isErrorResponse": false + } + ], + "httpMethod": "DELETE", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceNetworking/trafficControllers/{trafficControllerName}", + "bufferResponse": true, + "longRunning": { + "$id": "1574", + "finalStateVia": 1, + "finalResponse": { + "$id": "1575", + "statusCodes": [ + 204 + ] + } + }, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.ServiceNetworking.TrafficControllerInterface.delete", + "decorators": [], + "examples": [ + { + "$id": "1576", + "kind": "http", + "name": "Delete Traffic Controller", + "description": "Delete Traffic Controller", + "filePath": "2025-03-01-preview/TrafficControllerDelete.json", + "parameters": [ + { + "$id": "1577", + "parameter": { + "$ref": "1555" + }, + "value": { + "$id": "1578", + "kind": "string", + "type": { + "$ref": "1556" + }, + "value": "2025-03-01-preview" + } + }, + { + "$id": "1579", + "parameter": { + "$ref": "1559" + }, + "value": { + "$id": "1580", + "kind": "string", + "type": { + "$ref": "1560" + }, + "value": "subid" + } + }, + { + "$id": "1581", + "parameter": { + "$ref": "1561" + }, + "value": { + "$id": "1582", + "kind": "string", + "type": { + "$ref": "1562" + }, + "value": "rg1" + } + }, + { + "$id": "1583", + "parameter": { + "$ref": "1563" + }, + "value": { + "$id": "1584", + "kind": "string", + "type": { + "$ref": "1564" + }, + "value": "tc1" + } + } + ], + "responses": [ + { + "$id": "1585", + "response": { + "$ref": "1568" + }, + "statusCode": 202 + }, + { + "$id": "1586", + "response": { + "$ref": "1573" + }, + "statusCode": 204 + } + ] + } + ] + }, + { + "$id": "1587", + "name": "listByResourceGroup", + "resourceName": "TrafficController", + "doc": "List TrafficController resources by resource group", + "accessibility": "public", + "parameters": [ + { + "$id": "1588", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "1589", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "1590", + "type": { + "$id": "1591", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-03-01-preview" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1592", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "1593", + "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": "1594", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "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": { + "$id": "1597", + "kind": "constant", + "valueType": { + "$id": "1598", + "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": "1599", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "411" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "GET", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceNetworking/trafficControllers", + "bufferResponse": true, + "paging": { + "$id": "1600", + "itemPropertySegments": [ + "value" + ], + "nextLink": { + "$id": "1601", + "responseSegments": [ + "nextLink" + ], + "responseLocation": "Body" + } + }, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.ServiceNetworking.TrafficControllerInterface.listByResourceGroup", + "decorators": [], + "examples": [ + { + "$id": "1602", + "kind": "http", + "name": "Get Traffic Controllers", + "description": "Get Traffic Controllers", + "filePath": "2025-03-01-preview/TrafficControllersGet.json", + "parameters": [ + { + "$id": "1603", + "parameter": { + "$ref": "1588" + }, + "value": { + "$id": "1604", + "kind": "string", + "type": { + "$ref": "1589" + }, + "value": "2025-03-01-preview" + } + }, + { + "$id": "1605", + "parameter": { + "$ref": "1592" + }, + "value": { + "$id": "1606", + "kind": "string", + "type": { + "$ref": "1593" + }, + "value": "subid" + } + }, + { + "$id": "1607", + "parameter": { + "$ref": "1594" + }, + "value": { + "$id": "1608", + "kind": "string", + "type": { + "$ref": "1595" + }, + "value": "rg1" + } + } + ], + "responses": [ + { + "$id": "1609", + "response": { + "$ref": "1599" + }, + "statusCode": 200, + "bodyValue": { + "$id": "1610", + "kind": "model", + "type": { + "$ref": "411" + }, + "value": { + "$id": "1611", + "value": { + "$id": "1612", + "kind": "array", + "type": { + "$ref": "413" + }, + "value": [ + { + "$id": "1613", + "kind": "model", + "type": { + "$ref": "364" + }, + "value": { + "$id": "1614", + "name": { + "$id": "1615", + "kind": "string", + "type": { + "$ref": "82" + }, + "value": "tc1" + }, + "id": { + "$id": "1616", + "kind": "string", + "type": { + "$ref": "78" + }, + "value": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ServiceNetworking/trafficControllers/tc1" + }, + "type": { + "$id": "1617", + "kind": "string", + "type": { + "$ref": "86" + }, + "value": "Microsoft.ServiceNetworking/trafficControllers" + }, + "location": { + "$id": "1618", + "kind": "string", + "type": { + "$ref": "125" + }, + "value": "NorthCentralUS" + }, + "tags": { + "$id": "1619", + "kind": "dict", + "type": { + "$ref": "119" + }, + "value": { + "$id": "1620", + "key1": { + "$id": "1621", + "kind": "string", + "type": { + "$ref": "121" + }, + "value": "value1" + } + } + }, + "properties": { + "$id": "1622", + "kind": "model", + "type": { + "$ref": "366" + }, + "value": { + "$id": "1623", + "configurationEndpoints": { + "$id": "1624", + "kind": "array", + "type": { + "$ref": "368" + }, + "value": [ + { + "$id": "1625", + "kind": "string", + "type": { + "$ref": "369" + }, + "value": "abc.trafficcontroller.azure.net" + } + ] + }, + "frontends": { + "$id": "1626", + "kind": "array", + "type": { + "$ref": "373" + }, + "value": [ + { + "$id": "1627", + "kind": "model", + "type": { + "$ref": "374" + }, + "value": { + "$id": "1628", + "id": { + "$id": "1629", + "kind": "string", + "type": { + "$ref": "376" + }, + "value": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ServiceNetworking/trafficControllers/tc1/frontends/fe1" + } + } + } + ] + }, + "associations": { + "$id": "1630", + "kind": "array", + "type": { + "$ref": "382" + }, + "value": [ + { + "$id": "1631", + "kind": "model", + "type": { + "$ref": "374" + }, + "value": { + "$id": "1632", + "id": { + "$id": "1633", + "kind": "string", + "type": { + "$ref": "376" + }, + "value": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ServiceNetworking/trafficControllers/tc1/association/as1" + } + } + } + ] + }, + "securityPolicies": { + "$id": "1634", + "kind": "array", + "type": { + "$ref": "386" + }, + "value": [ + { + "$id": "1635", + "kind": "model", + "type": { + "$ref": "374" + }, + "value": { + "$id": "1636", + "id": { + "$id": "1637", + "kind": "string", + "type": { + "$ref": "376" + }, + "value": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ServiceNetworking/trafficControllers/tc1/securityPolicies/sp1" + } + } + } + ] + }, + "securityPolicyConfigurations": { + "$id": "1638", + "kind": "model", + "type": { + "$ref": "245" + }, + "value": { + "$id": "1639", + "wafSecurityPolicy": { + "$id": "1640", + "kind": "model", + "type": { + "$ref": "247" + }, + "value": { + "$id": "1641", + "id": { + "$id": "1642", + "kind": "string", + "type": { + "$ref": "249" + }, + "value": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ServiceNetworking/trafficControllers/tc1/securityPolicies/waf-0" + } + } + } + } + }, + "provisioningState": { + "$id": "1643", + "kind": "string", + "type": { + "$ref": "6" + }, + "value": "Succeeded" + } + } + } + } + } + ] + } + } + } + } + ] + } + ] + }, + { + "$id": "1644", + "name": "listBySubscription", + "resourceName": "TrafficController", + "doc": "List TrafficController resources by subscription ID", + "accessibility": "public", + "parameters": [ + { + "$id": "1645", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "1646", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "1647", + "type": { + "$id": "1648", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-03-01-preview" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1649", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "1650", + "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": "1651", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "1652", + "kind": "constant", + "valueType": { + "$id": "1653", + "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": "1654", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "411" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "GET", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/providers/Microsoft.ServiceNetworking/trafficControllers", + "bufferResponse": true, + "paging": { + "$id": "1655", + "itemPropertySegments": [ + "value" + ], + "nextLink": { + "$id": "1656", + "responseSegments": [ + "nextLink" + ], + "responseLocation": "Body" + } + }, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.ServiceNetworking.TrafficControllerInterface.listBySubscription", + "decorators": [], + "examples": [ + { + "$id": "1657", + "kind": "http", + "name": "Get Traffic Controllers List", + "description": "Get Traffic Controllers List", + "filePath": "2025-03-01-preview/TrafficControllersGetList.json", + "parameters": [ + { + "$id": "1658", + "parameter": { + "$ref": "1645" + }, + "value": { + "$id": "1659", + "kind": "string", + "type": { + "$ref": "1646" + }, + "value": "2025-03-01-preview" + } + }, + { + "$id": "1660", + "parameter": { + "$ref": "1649" + }, + "value": { + "$id": "1661", + "kind": "string", + "type": { + "$ref": "1650" + }, + "value": "subid" + } + } + ], + "responses": [ + { + "$id": "1662", + "response": { + "$ref": "1654" + }, + "statusCode": 200, + "bodyValue": { + "$id": "1663", + "kind": "model", + "type": { + "$ref": "411" + }, + "value": { + "$id": "1664", + "value": { + "$id": "1665", + "kind": "array", + "type": { + "$ref": "413" + }, + "value": [ + { + "$id": "1666", + "kind": "model", + "type": { + "$ref": "364" + }, + "value": { + "$id": "1667", + "name": { + "$id": "1668", + "kind": "string", + "type": { + "$ref": "82" + }, + "value": "tc1" + }, + "id": { + "$id": "1669", + "kind": "string", + "type": { + "$ref": "78" + }, + "value": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ServiceNetworking/trafficControllers/tc1" + }, + "type": { + "$id": "1670", + "kind": "string", + "type": { + "$ref": "86" + }, + "value": "Microsoft.ServiceNetworking/trafficControllers" + }, + "location": { + "$id": "1671", + "kind": "string", + "type": { + "$ref": "125" + }, + "value": "NorthCentralUS" + }, + "tags": { + "$id": "1672", + "kind": "dict", + "type": { + "$ref": "119" + }, + "value": { + "$id": "1673", + "key1": { + "$id": "1674", + "kind": "string", + "type": { + "$ref": "121" + }, + "value": "value1" + } + } + }, + "properties": { + "$id": "1675", + "kind": "model", + "type": { + "$ref": "366" + }, + "value": { + "$id": "1676", + "configurationEndpoints": { + "$id": "1677", + "kind": "array", + "type": { + "$ref": "368" + }, + "value": [ + { + "$id": "1678", + "kind": "string", + "type": { + "$ref": "369" + }, + "value": "abc.trafficcontroller.azure.net" + } + ] + }, + "frontends": { + "$id": "1679", + "kind": "array", + "type": { + "$ref": "373" + }, + "value": [ + { + "$id": "1680", + "kind": "model", + "type": { + "$ref": "374" + }, + "value": { + "$id": "1681", + "id": { + "$id": "1682", + "kind": "string", + "type": { + "$ref": "376" + }, + "value": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ServiceNetworking/trafficControllers/tc1/frontends/fe1" + } + } + } + ] + }, + "associations": { + "$id": "1683", + "kind": "array", + "type": { + "$ref": "382" + }, + "value": [ + { + "$id": "1684", + "kind": "model", + "type": { + "$ref": "374" + }, + "value": { + "$id": "1685", + "id": { + "$id": "1686", + "kind": "string", + "type": { + "$ref": "376" + }, + "value": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ServiceNetworking/trafficControllers/tc1/association/as1" + } + } + } + ] + }, + "securityPolicies": { + "$id": "1687", + "kind": "array", + "type": { + "$ref": "386" + }, + "value": [ + { + "$id": "1688", + "kind": "model", + "type": { + "$ref": "374" + }, + "value": { + "$id": "1689", + "id": { + "$id": "1690", + "kind": "string", + "type": { + "$ref": "376" + }, + "value": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ServiceNetworking/trafficControllers/tc1/securityPolicies/sp1" + } + } + } + ] + }, + "securityPolicyConfigurations": { + "$id": "1691", + "kind": "model", + "type": { + "$ref": "245" + }, + "value": { + "$id": "1692", + "wafSecurityPolicy": { + "$id": "1693", + "kind": "model", + "type": { + "$ref": "247" + }, + "value": { + "$id": "1694", + "id": { + "$id": "1695", + "kind": "string", + "type": { + "$ref": "249" + }, + "value": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ServiceNetworking/trafficControllers/tc1/securityPolicies/waf-0" + } + } + } + } + }, + "provisioningState": { + "$id": "1696", + "kind": "string", + "type": { + "$ref": "6" + }, + "value": "Succeeded" + } + } + } + } + } + ] + } + } + } + } + ] + } + ] + } + ], + "parameters": [ + { + "$id": "1697", + "name": "endpoint", + "nameInRequest": "endpoint", + "doc": "Service host", + "type": { + "$id": "1698", + "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": "1699", + "type": { + "$id": "1700", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "https://management.azure.com" + } + } + ], + "decorators": [ + { + "$id": "1701", + "name": "Azure.ResourceManager.@armResourceOperations", + "arguments": { + "$id": "1702" + } + } + ], + "crossLanguageDefinitionId": "Microsoft.ServiceNetworking.TrafficControllerInterface", + "apiVersions": [ + "2023-11-01", + "2024-05-01-preview", + "2025-01-01", + "2025-03-01-preview" + ], + "parent": { + "$ref": "466" + } + }, + { + "$id": "1703", + "kind": "client", + "name": "Operations", + "namespace": "Azure.ResourceManager.ServiceNetworking", + "operations": [ + { + "$id": "1704", + "name": "list", + "resourceName": "Operations", + "doc": "List the operations for the provider", + "accessibility": "public", + "parameters": [ + { + "$id": "1705", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "1706", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "1707", + "type": { + "$id": "1708", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-03-01-preview" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1709", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "1710", + "kind": "constant", + "valueType": { + "$id": "1711", + "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": "1712", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "421" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "GET", + "uri": "{endpoint}", + "path": "/providers/Microsoft.ServiceNetworking/operations", + "bufferResponse": true, + "paging": { + "$id": "1713", + "itemPropertySegments": [ + "value" + ], + "nextLink": { + "$id": "1714", + "responseSegments": [ + "nextLink" + ], + "responseLocation": "Body" + } + }, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Azure.ResourceManager.Operations.list", + "decorators": [], + "examples": [ + { + "$id": "1715", + "kind": "http", + "name": "Get Operations List", + "description": "Get Operations List", + "filePath": "2025-03-01-preview/OperationsList.json", + "parameters": [ + { + "$id": "1716", + "parameter": { + "$ref": "1705" + }, + "value": { + "$id": "1717", + "kind": "string", + "type": { + "$ref": "1706" + }, + "value": "2025-03-01-preview" + } + } + ], + "responses": [ + { + "$id": "1718", + "response": { + "$ref": "1712" + }, + "statusCode": 200, + "bodyValue": { + "$id": "1719", + "kind": "model", + "type": { + "$ref": "421" + }, + "value": { + "$id": "1720", + "value": { + "$id": "1721", + "kind": "array", + "type": { + "$ref": "423" + }, + "value": [ + { + "$id": "1722", + "kind": "model", + "type": { + "$ref": "424" + }, + "value": { + "$id": "1723", + "name": { + "$id": "1724", + "kind": "string", + "type": { + "$ref": "426" + }, + "value": "Microsoft.ServiceNetworking/trafficControllers/read" + }, + "isDataAction": { + "$id": "1725", + "kind": "boolean", + "type": { + "$ref": "430" + }, + "value": false + }, + "display": { + "$id": "1726", + "kind": "model", + "type": { + "$ref": "434" + }, + "value": { + "$id": "1727", + "provider": { + "$id": "1728", + "kind": "string", + "type": { + "$ref": "436" + }, + "value": "Microsoft Service Networking" + }, + "resource": { + "$id": "1729", + "kind": "string", + "type": { + "$ref": "440" + }, + "value": "Traffic Controller" + }, + "operation": { + "$id": "1730", + "kind": "string", + "type": { + "$ref": "444" + }, + "value": "Get Traffic Controller configuration" + }, + "description": { + "$id": "1731", + "kind": "string", + "type": { + "$ref": "448" + }, + "value": "Traffic Controller is a L7 Load Balancing solution for a Multi Cluster setup" + } + } + }, + "origin": { + "$id": "1732", + "kind": "string", + "type": { + "$ref": "52" + }, + "value": "user,system" + } + } + } + ] + } + } + } + } + ] + } + ] + } + ], + "parameters": [ + { + "$id": "1733", + "name": "endpoint", + "nameInRequest": "endpoint", + "doc": "Service host", + "type": { + "$id": "1734", + "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": "1735", + "type": { + "$id": "1736", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "https://management.azure.com" + } + } + ], + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceNetworking.Operations", + "apiVersions": [ + "2023-11-01", + "2024-05-01-preview", + "2025-01-01", + "2025-03-01-preview" + ], + "parent": { + "$ref": "466" + } + } + ] + } + ], + "auth": { + "$id": "1737", + "oAuth2": { + "$id": "1738", + "scopes": [ + "user_impersonation" + ] + } + } +} diff --git a/sdk/sitemanager/Azure.ResourceManager.SiteManager/Azure.ResourceManager.SiteManager.sln b/sdk/sitemanager/Azure.ResourceManager.SiteManager/Azure.ResourceManager.SiteManager.sln new file mode 100644 index 000000000000..3e41f05eca9c --- /dev/null +++ b/sdk/sitemanager/Azure.ResourceManager.SiteManager/Azure.ResourceManager.SiteManager.sln @@ -0,0 +1,54 @@ +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.SiteManager.Samples", "samples\Azure.ResourceManager.SiteManager.Samples.csproj", "{7A2DFF15-5746-49F4-BD0F-C6C35337088A}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Azure.ResourceManager.SiteManager", "src\Azure.ResourceManager.SiteManager.csproj", "{28FF4005-4467-4E36-92E7-DEA27DEB1519}" +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/sitemanager/Azure.ResourceManager.SiteManager/CHANGELOG.md b/sdk/sitemanager/Azure.ResourceManager.SiteManager/CHANGELOG.md new file mode 100644 index 000000000000..8b33f0fedccc --- /dev/null +++ b/sdk/sitemanager/Azure.ResourceManager.SiteManager/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/sitemanager/Azure.ResourceManager.SiteManager/Directory.Build.props b/sdk/sitemanager/Azure.ResourceManager.SiteManager/Directory.Build.props new file mode 100644 index 000000000000..63bd836ad44b --- /dev/null +++ b/sdk/sitemanager/Azure.ResourceManager.SiteManager/Directory.Build.props @@ -0,0 +1,6 @@ + + + + diff --git a/sdk/sitemanager/Azure.ResourceManager.SiteManager/README.md b/sdk/sitemanager/Azure.ResourceManager.SiteManager/README.md new file mode 100644 index 000000000000..c2f1cb55a1f5 --- /dev/null +++ b/sdk/sitemanager/Azure.ResourceManager.SiteManager/README.md @@ -0,0 +1,80 @@ +# Microsoft Azure SiteManager 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 SiteManager management library for .NET with [NuGet](https://www.nuget.org/): + +```dotnetcli +dotnet add package Azure.ResourceManager.SiteManager --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/sitemanager/Azure.ResourceManager.SiteManager/api/Azure.ResourceManager.SiteManager.net8.0.cs b/sdk/sitemanager/Azure.ResourceManager.SiteManager/api/Azure.ResourceManager.SiteManager.net8.0.cs new file mode 100644 index 000000000000..99c199a6566b --- /dev/null +++ b/sdk/sitemanager/Azure.ResourceManager.SiteManager/api/Azure.ResourceManager.SiteManager.net8.0.cs @@ -0,0 +1,161 @@ +namespace Azure.ResourceManager.SiteManager +{ + public partial class SiteCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected SiteCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string siteName, Azure.ResourceManager.SiteManager.SiteData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string siteName, Azure.ResourceManager.SiteManager.SiteData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string siteName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string siteName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string siteName, 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 siteName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string siteName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string siteName, 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 SiteData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public SiteData() { } + public Azure.ResourceManager.SiteManager.Models.SiteProperties Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.SiteManager.SiteData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.SiteManager.SiteData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public static partial class SiteManagerExtensions + { + public static Azure.ResourceManager.ArmOperation CreateOrUpdateSitesBySubscription(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.WaitUntil waitUntil, string siteName, Azure.ResourceManager.SiteManager.SiteData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static System.Threading.Tasks.Task> CreateOrUpdateSitesBySubscriptionAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.WaitUntil waitUntil, string siteName, Azure.ResourceManager.SiteManager.SiteData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.Response DeleteSitesBySubscription(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, string siteName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static System.Threading.Tasks.Task DeleteSitesBySubscriptionAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, string siteName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.Response GetSite(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string siteName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static System.Threading.Tasks.Task> GetSiteAsync(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string siteName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.ResourceManager.SiteManager.SiteResource GetSiteResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.SiteManager.SiteCollection GetSites(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource) { throw null; } + public static Azure.Pageable GetSites(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.AsyncPageable GetSitesAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.Response GetSitesBySubscription(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, string siteName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static System.Threading.Tasks.Task> GetSitesBySubscriptionAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, string siteName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.Response UpdateSitesBySubscription(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, string siteName, Azure.ResourceManager.SiteManager.Models.SiteUpdate properties, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static System.Threading.Tasks.Task> UpdateSitesBySubscriptionAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, string siteName, Azure.ResourceManager.SiteManager.Models.SiteUpdate properties, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class SiteResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected SiteResource() { } + public virtual Azure.ResourceManager.SiteManager.SiteData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string siteName) { 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.SiteManager.SiteData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.SiteManager.SiteData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + public virtual Azure.Response Update(Azure.ResourceManager.SiteManager.Models.SiteUpdate properties, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.ResourceManager.SiteManager.Models.SiteUpdate properties, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } +} +namespace Azure.ResourceManager.SiteManager.Mocking +{ + public partial class MockableSiteManagerArmClient : Azure.ResourceManager.ArmResource + { + protected MockableSiteManagerArmClient() { } + public virtual Azure.ResourceManager.SiteManager.SiteResource GetSiteResource(Azure.Core.ResourceIdentifier id) { throw null; } + } + public partial class MockableSiteManagerResourceGroupResource : Azure.ResourceManager.ArmResource + { + protected MockableSiteManagerResourceGroupResource() { } + public virtual Azure.Response GetSite(string siteName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetSiteAsync(string siteName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.SiteManager.SiteCollection GetSites() { throw null; } + } + public partial class MockableSiteManagerSubscriptionResource : Azure.ResourceManager.ArmResource + { + protected MockableSiteManagerSubscriptionResource() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdateSitesBySubscription(Azure.WaitUntil waitUntil, string siteName, Azure.ResourceManager.SiteManager.SiteData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateSitesBySubscriptionAsync(Azure.WaitUntil waitUntil, string siteName, Azure.ResourceManager.SiteManager.SiteData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response DeleteSitesBySubscription(string siteName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteSitesBySubscriptionAsync(string siteName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetSites(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetSitesAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetSitesBySubscription(string siteName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetSitesBySubscriptionAsync(string siteName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response UpdateSitesBySubscription(string siteName, Azure.ResourceManager.SiteManager.Models.SiteUpdate properties, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateSitesBySubscriptionAsync(string siteName, Azure.ResourceManager.SiteManager.Models.SiteUpdate properties, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } +} +namespace Azure.ResourceManager.SiteManager.Models +{ + public static partial class ArmSiteManagerModelFactory + { + public static Azure.ResourceManager.SiteManager.SiteData SiteData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.SiteManager.Models.SiteProperties properties = null) { throw null; } + public static Azure.ResourceManager.SiteManager.Models.SiteProperties SiteProperties(string displayName = null, string description = null, Azure.Core.ResourceIdentifier addressResourceId = null, Azure.ResourceManager.SiteManager.Models.ResourceProvisioningState? provisioningState = default(Azure.ResourceManager.SiteManager.Models.ResourceProvisioningState?)) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct ResourceProvisioningState : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ResourceProvisioningState(string value) { throw null; } + public static Azure.ResourceManager.SiteManager.Models.ResourceProvisioningState Canceled { get { throw null; } } + public static Azure.ResourceManager.SiteManager.Models.ResourceProvisioningState Failed { get { throw null; } } + public static Azure.ResourceManager.SiteManager.Models.ResourceProvisioningState Succeeded { get { throw null; } } + public bool Equals(Azure.ResourceManager.SiteManager.Models.ResourceProvisioningState 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.SiteManager.Models.ResourceProvisioningState left, Azure.ResourceManager.SiteManager.Models.ResourceProvisioningState right) { throw null; } + public static implicit operator Azure.ResourceManager.SiteManager.Models.ResourceProvisioningState (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.SiteManager.Models.ResourceProvisioningState left, Azure.ResourceManager.SiteManager.Models.ResourceProvisioningState right) { throw null; } + public override string ToString() { throw null; } + } + public partial class SiteProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public SiteProperties() { } + public Azure.Core.ResourceIdentifier AddressResourceId { get { throw null; } set { } } + public string Description { get { throw null; } set { } } + public string DisplayName { get { throw null; } set { } } + public Azure.ResourceManager.SiteManager.Models.ResourceProvisioningState? ProvisioningState { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.SiteManager.Models.SiteProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.SiteManager.Models.SiteProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class SiteUpdate : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public SiteUpdate() { } + public Azure.ResourceManager.SiteManager.Models.SiteUpdateProperties Properties { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.SiteManager.Models.SiteUpdate System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.SiteManager.Models.SiteUpdate System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class SiteUpdateProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public SiteUpdateProperties() { } + public Azure.Core.ResourceIdentifier AddressResourceId { get { throw null; } set { } } + public string Description { get { throw null; } set { } } + public string DisplayName { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.SiteManager.Models.SiteUpdateProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.SiteManager.Models.SiteUpdateProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.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/sitemanager/Azure.ResourceManager.SiteManager/api/Azure.ResourceManager.SiteManager.netstandard2.0.cs b/sdk/sitemanager/Azure.ResourceManager.SiteManager/api/Azure.ResourceManager.SiteManager.netstandard2.0.cs new file mode 100644 index 000000000000..99c199a6566b --- /dev/null +++ b/sdk/sitemanager/Azure.ResourceManager.SiteManager/api/Azure.ResourceManager.SiteManager.netstandard2.0.cs @@ -0,0 +1,161 @@ +namespace Azure.ResourceManager.SiteManager +{ + public partial class SiteCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected SiteCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string siteName, Azure.ResourceManager.SiteManager.SiteData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string siteName, Azure.ResourceManager.SiteManager.SiteData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string siteName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string siteName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string siteName, 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 siteName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string siteName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string siteName, 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 SiteData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public SiteData() { } + public Azure.ResourceManager.SiteManager.Models.SiteProperties Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.SiteManager.SiteData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.SiteManager.SiteData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public static partial class SiteManagerExtensions + { + public static Azure.ResourceManager.ArmOperation CreateOrUpdateSitesBySubscription(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.WaitUntil waitUntil, string siteName, Azure.ResourceManager.SiteManager.SiteData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static System.Threading.Tasks.Task> CreateOrUpdateSitesBySubscriptionAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.WaitUntil waitUntil, string siteName, Azure.ResourceManager.SiteManager.SiteData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.Response DeleteSitesBySubscription(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, string siteName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static System.Threading.Tasks.Task DeleteSitesBySubscriptionAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, string siteName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.Response GetSite(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string siteName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static System.Threading.Tasks.Task> GetSiteAsync(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string siteName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.ResourceManager.SiteManager.SiteResource GetSiteResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.SiteManager.SiteCollection GetSites(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource) { throw null; } + public static Azure.Pageable GetSites(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.AsyncPageable GetSitesAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.Response GetSitesBySubscription(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, string siteName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static System.Threading.Tasks.Task> GetSitesBySubscriptionAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, string siteName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.Response UpdateSitesBySubscription(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, string siteName, Azure.ResourceManager.SiteManager.Models.SiteUpdate properties, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static System.Threading.Tasks.Task> UpdateSitesBySubscriptionAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, string siteName, Azure.ResourceManager.SiteManager.Models.SiteUpdate properties, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class SiteResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected SiteResource() { } + public virtual Azure.ResourceManager.SiteManager.SiteData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string siteName) { 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.SiteManager.SiteData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.SiteManager.SiteData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + public virtual Azure.Response Update(Azure.ResourceManager.SiteManager.Models.SiteUpdate properties, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.ResourceManager.SiteManager.Models.SiteUpdate properties, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } +} +namespace Azure.ResourceManager.SiteManager.Mocking +{ + public partial class MockableSiteManagerArmClient : Azure.ResourceManager.ArmResource + { + protected MockableSiteManagerArmClient() { } + public virtual Azure.ResourceManager.SiteManager.SiteResource GetSiteResource(Azure.Core.ResourceIdentifier id) { throw null; } + } + public partial class MockableSiteManagerResourceGroupResource : Azure.ResourceManager.ArmResource + { + protected MockableSiteManagerResourceGroupResource() { } + public virtual Azure.Response GetSite(string siteName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetSiteAsync(string siteName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.SiteManager.SiteCollection GetSites() { throw null; } + } + public partial class MockableSiteManagerSubscriptionResource : Azure.ResourceManager.ArmResource + { + protected MockableSiteManagerSubscriptionResource() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdateSitesBySubscription(Azure.WaitUntil waitUntil, string siteName, Azure.ResourceManager.SiteManager.SiteData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateSitesBySubscriptionAsync(Azure.WaitUntil waitUntil, string siteName, Azure.ResourceManager.SiteManager.SiteData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response DeleteSitesBySubscription(string siteName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteSitesBySubscriptionAsync(string siteName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetSites(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetSitesAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetSitesBySubscription(string siteName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetSitesBySubscriptionAsync(string siteName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response UpdateSitesBySubscription(string siteName, Azure.ResourceManager.SiteManager.Models.SiteUpdate properties, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateSitesBySubscriptionAsync(string siteName, Azure.ResourceManager.SiteManager.Models.SiteUpdate properties, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } +} +namespace Azure.ResourceManager.SiteManager.Models +{ + public static partial class ArmSiteManagerModelFactory + { + public static Azure.ResourceManager.SiteManager.SiteData SiteData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.SiteManager.Models.SiteProperties properties = null) { throw null; } + public static Azure.ResourceManager.SiteManager.Models.SiteProperties SiteProperties(string displayName = null, string description = null, Azure.Core.ResourceIdentifier addressResourceId = null, Azure.ResourceManager.SiteManager.Models.ResourceProvisioningState? provisioningState = default(Azure.ResourceManager.SiteManager.Models.ResourceProvisioningState?)) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct ResourceProvisioningState : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ResourceProvisioningState(string value) { throw null; } + public static Azure.ResourceManager.SiteManager.Models.ResourceProvisioningState Canceled { get { throw null; } } + public static Azure.ResourceManager.SiteManager.Models.ResourceProvisioningState Failed { get { throw null; } } + public static Azure.ResourceManager.SiteManager.Models.ResourceProvisioningState Succeeded { get { throw null; } } + public bool Equals(Azure.ResourceManager.SiteManager.Models.ResourceProvisioningState 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.SiteManager.Models.ResourceProvisioningState left, Azure.ResourceManager.SiteManager.Models.ResourceProvisioningState right) { throw null; } + public static implicit operator Azure.ResourceManager.SiteManager.Models.ResourceProvisioningState (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.SiteManager.Models.ResourceProvisioningState left, Azure.ResourceManager.SiteManager.Models.ResourceProvisioningState right) { throw null; } + public override string ToString() { throw null; } + } + public partial class SiteProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public SiteProperties() { } + public Azure.Core.ResourceIdentifier AddressResourceId { get { throw null; } set { } } + public string Description { get { throw null; } set { } } + public string DisplayName { get { throw null; } set { } } + public Azure.ResourceManager.SiteManager.Models.ResourceProvisioningState? ProvisioningState { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.SiteManager.Models.SiteProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.SiteManager.Models.SiteProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class SiteUpdate : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public SiteUpdate() { } + public Azure.ResourceManager.SiteManager.Models.SiteUpdateProperties Properties { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.SiteManager.Models.SiteUpdate System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.SiteManager.Models.SiteUpdate System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class SiteUpdateProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public SiteUpdateProperties() { } + public Azure.Core.ResourceIdentifier AddressResourceId { get { throw null; } set { } } + public string Description { get { throw null; } set { } } + public string DisplayName { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.SiteManager.Models.SiteUpdateProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.SiteManager.Models.SiteUpdateProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.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/sitemanager/Azure.ResourceManager.SiteManager/assets.json b/sdk/sitemanager/Azure.ResourceManager.SiteManager/assets.json new file mode 100644 index 000000000000..fd8ce0868cf6 --- /dev/null +++ b/sdk/sitemanager/Azure.ResourceManager.SiteManager/assets.json @@ -0,0 +1,7 @@ + +{ + "AssetsRepo": "Azure/azure-sdk-assets", + "AssetsRepoPrefixPath": "net", + "TagPrefix": "net/sitemanager/Azure.ResourceManager.SiteManager", + "Tag": "" +} diff --git a/sdk/sitemanager/Azure.ResourceManager.SiteManager/samples/Azure.ResourceManager.SiteManager.Samples.csproj b/sdk/sitemanager/Azure.ResourceManager.SiteManager/samples/Azure.ResourceManager.SiteManager.Samples.csproj new file mode 100644 index 000000000000..ca7b4ed2fcd2 --- /dev/null +++ b/sdk/sitemanager/Azure.ResourceManager.SiteManager/samples/Azure.ResourceManager.SiteManager.Samples.csproj @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/sdk/sitemanager/Azure.ResourceManager.SiteManager/src/Azure.ResourceManager.SiteManager.csproj b/sdk/sitemanager/Azure.ResourceManager.SiteManager/src/Azure.ResourceManager.SiteManager.csproj new file mode 100644 index 000000000000..c8beaaf346a9 --- /dev/null +++ b/sdk/sitemanager/Azure.ResourceManager.SiteManager/src/Azure.ResourceManager.SiteManager.csproj @@ -0,0 +1,8 @@ + + + Azure Resource Manager client SDK for Azure resource provider SiteManager. + 1.0.0-beta.1 + azure;management;arm;resource manager;sitemanager + Azure.ResourceManager.SiteManager + + diff --git a/sdk/sitemanager/Azure.ResourceManager.SiteManager/src/Generated/ArmSiteManagerModelFactory.cs b/sdk/sitemanager/Azure.ResourceManager.SiteManager/src/Generated/ArmSiteManagerModelFactory.cs new file mode 100644 index 000000000000..4c3fd7407380 --- /dev/null +++ b/sdk/sitemanager/Azure.ResourceManager.SiteManager/src/Generated/ArmSiteManagerModelFactory.cs @@ -0,0 +1,48 @@ +// 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.SiteManager.Models +{ + /// Model factory for models. + public static partial class ArmSiteManagerModelFactory + { + /// 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 SiteData SiteData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, SiteProperties properties = null) + { + return new SiteData( + id, + name, + resourceType, + systemData, + properties, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// displayName of Site resource. + /// Description of Site resource. + /// AddressResource ArmId of Site resource. + /// Provisioning state of last operation. + /// A new instance for mocking. + public static SiteProperties SiteProperties(string displayName = null, string description = null, ResourceIdentifier addressResourceId = null, ResourceProvisioningState? provisioningState = null) + { + return new SiteProperties(displayName, description, addressResourceId, provisioningState, serializedAdditionalRawData: null); + } + } +} diff --git a/sdk/sitemanager/Azure.ResourceManager.SiteManager/src/Generated/Extensions/MockableSiteManagerArmClient.cs b/sdk/sitemanager/Azure.ResourceManager.SiteManager/src/Generated/Extensions/MockableSiteManagerArmClient.cs new file mode 100644 index 000000000000..50aecfb5c13f --- /dev/null +++ b/sdk/sitemanager/Azure.ResourceManager.SiteManager/src/Generated/Extensions/MockableSiteManagerArmClient.cs @@ -0,0 +1,49 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using Azure.Core; + +namespace Azure.ResourceManager.SiteManager.Mocking +{ + /// A class to add extension methods to ArmClient. + public partial class MockableSiteManagerArmClient : ArmResource + { + /// Initializes a new instance of the class for mocking. + protected MockableSiteManagerArmClient() + { + } + + /// 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 MockableSiteManagerArmClient(ArmClient client, ResourceIdentifier id) : base(client, id) + { + } + + internal MockableSiteManagerArmClient(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 SiteResource GetSiteResource(ResourceIdentifier id) + { + SiteResource.ValidateResourceId(id); + return new SiteResource(Client, id); + } + } +} diff --git a/sdk/sitemanager/Azure.ResourceManager.SiteManager/src/Generated/Extensions/MockableSiteManagerResourceGroupResource.cs b/sdk/sitemanager/Azure.ResourceManager.SiteManager/src/Generated/Extensions/MockableSiteManagerResourceGroupResource.cs new file mode 100644 index 000000000000..f57a6f599248 --- /dev/null +++ b/sdk/sitemanager/Azure.ResourceManager.SiteManager/src/Generated/Extensions/MockableSiteManagerResourceGroupResource.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.SiteManager.Mocking +{ + /// A class to add extension methods to ResourceGroupResource. + public partial class MockableSiteManagerResourceGroupResource : ArmResource + { + /// Initializes a new instance of the class for mocking. + protected MockableSiteManagerResourceGroupResource() + { + } + + /// 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 MockableSiteManagerResourceGroupResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + } + + private string GetApiVersionOrNull(ResourceType resourceType) + { + TryGetApiVersion(resourceType, out string apiVersion); + return apiVersion; + } + + /// Gets a collection of SiteResources in the ResourceGroupResource. + /// An object representing collection of SiteResources and their operations over a SiteResource. + public virtual SiteCollection GetSites() + { + return GetCachedClient(client => new SiteCollection(client, Id)); + } + + /// + /// Get a Site + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/sites/{siteName} + /// + /// + /// Operation Id + /// Site_Get + /// + /// + /// Default Api Version + /// 2024-02-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of Site resource. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetSiteAsync(string siteName, CancellationToken cancellationToken = default) + { + return await GetSites().GetAsync(siteName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get a Site + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/sites/{siteName} + /// + /// + /// Operation Id + /// Site_Get + /// + /// + /// Default Api Version + /// 2024-02-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of Site resource. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetSite(string siteName, CancellationToken cancellationToken = default) + { + return GetSites().Get(siteName, cancellationToken); + } + } +} diff --git a/sdk/sitemanager/Azure.ResourceManager.SiteManager/src/Generated/Extensions/MockableSiteManagerSubscriptionResource.cs b/sdk/sitemanager/Azure.ResourceManager.SiteManager/src/Generated/Extensions/MockableSiteManagerSubscriptionResource.cs new file mode 100644 index 000000000000..9ec4a0c8f79f --- /dev/null +++ b/sdk/sitemanager/Azure.ResourceManager.SiteManager/src/Generated/Extensions/MockableSiteManagerSubscriptionResource.cs @@ -0,0 +1,425 @@ +// 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.SiteManager.Models; + +namespace Azure.ResourceManager.SiteManager.Mocking +{ + /// A class to add extension methods to SubscriptionResource. + public partial class MockableSiteManagerSubscriptionResource : ArmResource + { + private ClientDiagnostics _sitesBySubscriptionClientDiagnostics; + private SitesBySubscriptionRestOperations _sitesBySubscriptionRestClient; + + /// Initializes a new instance of the class for mocking. + protected MockableSiteManagerSubscriptionResource() + { + } + + /// 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 MockableSiteManagerSubscriptionResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + } + + private ClientDiagnostics SitesBySubscriptionClientDiagnostics => _sitesBySubscriptionClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.SiteManager", ProviderConstants.DefaultProviderNamespace, Diagnostics); + private SitesBySubscriptionRestOperations SitesBySubscriptionRestClient => _sitesBySubscriptionRestClient ??= new SitesBySubscriptionRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint); + + private string GetApiVersionOrNull(ResourceType resourceType) + { + TryGetApiVersion(resourceType, out string apiVersion); + return apiVersion; + } + + /// + /// List Site resources by subscription ID + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Edge/sites + /// + /// + /// Operation Id + /// Site_List + /// + /// + /// Default Api Version + /// 2024-02-01-preview + /// + /// + /// + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetSitesAsync(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => SitesBySubscriptionRestClient.CreateListRequest(Id.SubscriptionId); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => SitesBySubscriptionRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new SiteResource(Client, SiteData.DeserializeSiteData(e)), SitesBySubscriptionClientDiagnostics, Pipeline, "MockableSiteManagerSubscriptionResource.GetSites", "value", "nextLink", cancellationToken); + } + + /// + /// List Site resources by subscription ID + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Edge/sites + /// + /// + /// Operation Id + /// Site_List + /// + /// + /// Default Api Version + /// 2024-02-01-preview + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetSites(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => SitesBySubscriptionRestClient.CreateListRequest(Id.SubscriptionId); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => SitesBySubscriptionRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new SiteResource(Client, SiteData.DeserializeSiteData(e)), SitesBySubscriptionClientDiagnostics, Pipeline, "MockableSiteManagerSubscriptionResource.GetSites", "value", "nextLink", cancellationToken); + } + + /// + /// Get a Site + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Edge/sites/{siteName} + /// + /// + /// Operation Id + /// Site_Get + /// + /// + /// Default Api Version + /// 2024-02-01-preview + /// + /// + /// + /// Name of Site resource. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetSitesBySubscriptionAsync(string siteName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(siteName, nameof(siteName)); + + using var scope = SitesBySubscriptionClientDiagnostics.CreateScope("MockableSiteManagerSubscriptionResource.GetSitesBySubscription"); + scope.Start(); + try + { + var response = await SitesBySubscriptionRestClient.GetAsync(Id.SubscriptionId, siteName, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new SiteResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a Site + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Edge/sites/{siteName} + /// + /// + /// Operation Id + /// Site_Get + /// + /// + /// Default Api Version + /// 2024-02-01-preview + /// + /// + /// + /// Name of Site resource. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response GetSitesBySubscription(string siteName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(siteName, nameof(siteName)); + + using var scope = SitesBySubscriptionClientDiagnostics.CreateScope("MockableSiteManagerSubscriptionResource.GetSitesBySubscription"); + scope.Start(); + try + { + var response = SitesBySubscriptionRestClient.Get(Id.SubscriptionId, siteName, cancellationToken); + return Response.FromValue(new SiteResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Create a Site + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Edge/sites/{siteName} + /// + /// + /// Operation Id + /// Site_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2024-02-01-preview + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the 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 Site resource. + /// 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> CreateOrUpdateSitesBySubscriptionAsync(WaitUntil waitUntil, string siteName, SiteData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(siteName, nameof(siteName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = SitesBySubscriptionClientDiagnostics.CreateScope("MockableSiteManagerSubscriptionResource.CreateOrUpdateSitesBySubscription"); + scope.Start(); + try + { + var response = await SitesBySubscriptionRestClient.CreateOrUpdateAsync(Id.SubscriptionId, siteName, data, cancellationToken).ConfigureAwait(false); + var operation = new SiteManagerArmOperation(new SiteOperationSource(Client), SitesBySubscriptionClientDiagnostics, Pipeline, SitesBySubscriptionRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, siteName, 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 Site + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Edge/sites/{siteName} + /// + /// + /// Operation Id + /// Site_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2024-02-01-preview + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the 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 Site resource. + /// 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 CreateOrUpdateSitesBySubscription(WaitUntil waitUntil, string siteName, SiteData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(siteName, nameof(siteName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = SitesBySubscriptionClientDiagnostics.CreateScope("MockableSiteManagerSubscriptionResource.CreateOrUpdateSitesBySubscription"); + scope.Start(); + try + { + var response = SitesBySubscriptionRestClient.CreateOrUpdate(Id.SubscriptionId, siteName, data, cancellationToken); + var operation = new SiteManagerArmOperation(new SiteOperationSource(Client), SitesBySubscriptionClientDiagnostics, Pipeline, SitesBySubscriptionRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, siteName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Update a Site + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Edge/sites/{siteName} + /// + /// + /// Operation Id + /// Site_Update + /// + /// + /// Default Api Version + /// 2024-02-01-preview + /// + /// + /// + /// Name of Site resource. + /// The resource properties to be updated. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual async Task> UpdateSitesBySubscriptionAsync(string siteName, SiteUpdate properties, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(siteName, nameof(siteName)); + Argument.AssertNotNull(properties, nameof(properties)); + + using var scope = SitesBySubscriptionClientDiagnostics.CreateScope("MockableSiteManagerSubscriptionResource.UpdateSitesBySubscription"); + scope.Start(); + try + { + var response = await SitesBySubscriptionRestClient.UpdateAsync(Id.SubscriptionId, siteName, properties, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new SiteResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Update a Site + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Edge/sites/{siteName} + /// + /// + /// Operation Id + /// Site_Update + /// + /// + /// Default Api Version + /// 2024-02-01-preview + /// + /// + /// + /// Name of Site resource. + /// The resource properties to be updated. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual Response UpdateSitesBySubscription(string siteName, SiteUpdate properties, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(siteName, nameof(siteName)); + Argument.AssertNotNull(properties, nameof(properties)); + + using var scope = SitesBySubscriptionClientDiagnostics.CreateScope("MockableSiteManagerSubscriptionResource.UpdateSitesBySubscription"); + scope.Start(); + try + { + var response = SitesBySubscriptionRestClient.Update(Id.SubscriptionId, siteName, properties, cancellationToken); + return Response.FromValue(new SiteResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete a Site + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Edge/sites/{siteName} + /// + /// + /// Operation Id + /// Site_Delete + /// + /// + /// Default Api Version + /// 2024-02-01-preview + /// + /// + /// + /// Name of Site resource. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task DeleteSitesBySubscriptionAsync(string siteName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(siteName, nameof(siteName)); + + using var scope = SitesBySubscriptionClientDiagnostics.CreateScope("MockableSiteManagerSubscriptionResource.DeleteSitesBySubscription"); + scope.Start(); + try + { + var response = await SitesBySubscriptionRestClient.DeleteAsync(Id.SubscriptionId, siteName, cancellationToken).ConfigureAwait(false); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete a Site + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Edge/sites/{siteName} + /// + /// + /// Operation Id + /// Site_Delete + /// + /// + /// Default Api Version + /// 2024-02-01-preview + /// + /// + /// + /// Name of Site resource. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response DeleteSitesBySubscription(string siteName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(siteName, nameof(siteName)); + + using var scope = SitesBySubscriptionClientDiagnostics.CreateScope("MockableSiteManagerSubscriptionResource.DeleteSitesBySubscription"); + scope.Start(); + try + { + var response = SitesBySubscriptionRestClient.Delete(Id.SubscriptionId, siteName, cancellationToken); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/sitemanager/Azure.ResourceManager.SiteManager/src/Generated/Extensions/SiteManagerExtensions.cs b/sdk/sitemanager/Azure.ResourceManager.SiteManager/src/Generated/Extensions/SiteManagerExtensions.cs new file mode 100644 index 000000000000..f0602e283a32 --- /dev/null +++ b/sdk/sitemanager/Azure.ResourceManager.SiteManager/src/Generated/Extensions/SiteManagerExtensions.cs @@ -0,0 +1,482 @@ +// 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.SiteManager.Mocking; +using Azure.ResourceManager.SiteManager.Models; + +namespace Azure.ResourceManager.SiteManager +{ + /// A class to add extension methods to Azure.ResourceManager.SiteManager. + public static partial class SiteManagerExtensions + { + private static MockableSiteManagerArmClient GetMockableSiteManagerArmClient(ArmClient client) + { + return client.GetCachedClient(client0 => new MockableSiteManagerArmClient(client0)); + } + + private static MockableSiteManagerResourceGroupResource GetMockableSiteManagerResourceGroupResource(ArmResource resource) + { + return resource.GetCachedClient(client => new MockableSiteManagerResourceGroupResource(client, resource.Id)); + } + + private static MockableSiteManagerSubscriptionResource GetMockableSiteManagerSubscriptionResource(ArmResource resource) + { + return resource.GetCachedClient(client => new MockableSiteManagerSubscriptionResource(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 SiteResource GetSiteResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableSiteManagerArmClient(client).GetSiteResource(id); + } + + /// + /// Gets a collection of SiteResources 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 SiteResources and their operations over a SiteResource. + public static SiteCollection GetSites(this ResourceGroupResource resourceGroupResource) + { + Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); + + return GetMockableSiteManagerResourceGroupResource(resourceGroupResource).GetSites(); + } + + /// + /// Get a Site + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/sites/{siteName} + /// + /// + /// Operation Id + /// Site_Get + /// + /// + /// Default Api Version + /// 2024-02-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// Name of Site 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> GetSiteAsync(this ResourceGroupResource resourceGroupResource, string siteName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); + + return await GetMockableSiteManagerResourceGroupResource(resourceGroupResource).GetSiteAsync(siteName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get a Site + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/sites/{siteName} + /// + /// + /// Operation Id + /// Site_Get + /// + /// + /// Default Api Version + /// 2024-02-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// Name of Site resource. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public static Response GetSite(this ResourceGroupResource resourceGroupResource, string siteName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); + + return GetMockableSiteManagerResourceGroupResource(resourceGroupResource).GetSite(siteName, cancellationToken); + } + + /// + /// List Site resources by subscription ID + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Edge/sites + /// + /// + /// Operation Id + /// Site_List + /// + /// + /// Default Api Version + /// 2024-02-01-preview + /// + /// + /// + /// 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 GetSitesAsync(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); + + return GetMockableSiteManagerSubscriptionResource(subscriptionResource).GetSitesAsync(cancellationToken); + } + + /// + /// List Site resources by subscription ID + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Edge/sites + /// + /// + /// Operation Id + /// Site_List + /// + /// + /// Default Api Version + /// 2024-02-01-preview + /// + /// + /// + /// 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 GetSites(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); + + return GetMockableSiteManagerSubscriptionResource(subscriptionResource).GetSites(cancellationToken); + } + + /// + /// Get a Site + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Edge/sites/{siteName} + /// + /// + /// Operation Id + /// Site_Get + /// + /// + /// Default Api Version + /// 2024-02-01-preview + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// Name of Site resource. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public static async Task> GetSitesBySubscriptionAsync(this SubscriptionResource subscriptionResource, string siteName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); + + return await GetMockableSiteManagerSubscriptionResource(subscriptionResource).GetSitesBySubscriptionAsync(siteName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get a Site + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Edge/sites/{siteName} + /// + /// + /// Operation Id + /// Site_Get + /// + /// + /// Default Api Version + /// 2024-02-01-preview + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// Name of Site resource. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public static Response GetSitesBySubscription(this SubscriptionResource subscriptionResource, string siteName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); + + return GetMockableSiteManagerSubscriptionResource(subscriptionResource).GetSitesBySubscription(siteName, cancellationToken); + } + + /// + /// Create a Site + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Edge/sites/{siteName} + /// + /// + /// Operation Id + /// Site_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2024-02-01-preview + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// if the method should wait to return until the long-running operation has completed on the 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 Site resource. + /// Resource create parameters. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// , or is null. + public static async Task> CreateOrUpdateSitesBySubscriptionAsync(this SubscriptionResource subscriptionResource, WaitUntil waitUntil, string siteName, SiteData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); + + return await GetMockableSiteManagerSubscriptionResource(subscriptionResource).CreateOrUpdateSitesBySubscriptionAsync(waitUntil, siteName, data, cancellationToken).ConfigureAwait(false); + } + + /// + /// Create a Site + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Edge/sites/{siteName} + /// + /// + /// Operation Id + /// Site_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2024-02-01-preview + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// if the method should wait to return until the long-running operation has completed on the 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 Site resource. + /// Resource create parameters. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// , or is null. + public static ArmOperation CreateOrUpdateSitesBySubscription(this SubscriptionResource subscriptionResource, WaitUntil waitUntil, string siteName, SiteData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); + + return GetMockableSiteManagerSubscriptionResource(subscriptionResource).CreateOrUpdateSitesBySubscription(waitUntil, siteName, data, cancellationToken); + } + + /// + /// Update a Site + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Edge/sites/{siteName} + /// + /// + /// Operation Id + /// Site_Update + /// + /// + /// Default Api Version + /// 2024-02-01-preview + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// Name of Site resource. + /// The resource properties to be updated. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// , or is null. + public static async Task> UpdateSitesBySubscriptionAsync(this SubscriptionResource subscriptionResource, string siteName, SiteUpdate properties, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); + + return await GetMockableSiteManagerSubscriptionResource(subscriptionResource).UpdateSitesBySubscriptionAsync(siteName, properties, cancellationToken).ConfigureAwait(false); + } + + /// + /// Update a Site + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Edge/sites/{siteName} + /// + /// + /// Operation Id + /// Site_Update + /// + /// + /// Default Api Version + /// 2024-02-01-preview + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// Name of Site resource. + /// The resource properties to be updated. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// , or is null. + public static Response UpdateSitesBySubscription(this SubscriptionResource subscriptionResource, string siteName, SiteUpdate properties, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); + + return GetMockableSiteManagerSubscriptionResource(subscriptionResource).UpdateSitesBySubscription(siteName, properties, cancellationToken); + } + + /// + /// Delete a Site + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Edge/sites/{siteName} + /// + /// + /// Operation Id + /// Site_Delete + /// + /// + /// Default Api Version + /// 2024-02-01-preview + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// Name of Site resource. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public static async Task DeleteSitesBySubscriptionAsync(this SubscriptionResource subscriptionResource, string siteName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); + + return await GetMockableSiteManagerSubscriptionResource(subscriptionResource).DeleteSitesBySubscriptionAsync(siteName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Delete a Site + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Edge/sites/{siteName} + /// + /// + /// Operation Id + /// Site_Delete + /// + /// + /// Default Api Version + /// 2024-02-01-preview + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// Name of Site resource. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public static Response DeleteSitesBySubscription(this SubscriptionResource subscriptionResource, string siteName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); + + return GetMockableSiteManagerSubscriptionResource(subscriptionResource).DeleteSitesBySubscription(siteName, cancellationToken); + } + } +} diff --git a/sdk/sitemanager/Azure.ResourceManager.SiteManager/src/Generated/Internal/Argument.cs b/sdk/sitemanager/Azure.ResourceManager.SiteManager/src/Generated/Internal/Argument.cs new file mode 100644 index 000000000000..a33cae7b9b4a --- /dev/null +++ b/sdk/sitemanager/Azure.ResourceManager.SiteManager/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.SiteManager +{ + 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/sitemanager/Azure.ResourceManager.SiteManager/src/Generated/Internal/ChangeTrackingDictionary.cs b/sdk/sitemanager/Azure.ResourceManager.SiteManager/src/Generated/Internal/ChangeTrackingDictionary.cs new file mode 100644 index 000000000000..d1195c913a7f --- /dev/null +++ b/sdk/sitemanager/Azure.ResourceManager.SiteManager/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.SiteManager +{ + 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/sitemanager/Azure.ResourceManager.SiteManager/src/Generated/Internal/ChangeTrackingList.cs b/sdk/sitemanager/Azure.ResourceManager.SiteManager/src/Generated/Internal/ChangeTrackingList.cs new file mode 100644 index 000000000000..d7c37dce15ea --- /dev/null +++ b/sdk/sitemanager/Azure.ResourceManager.SiteManager/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.SiteManager +{ + 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/sitemanager/Azure.ResourceManager.SiteManager/src/Generated/Internal/ModelSerializationExtensions.cs b/sdk/sitemanager/Azure.ResourceManager.SiteManager/src/Generated/Internal/ModelSerializationExtensions.cs new file mode 100644 index 000000000000..8b6326c08556 --- /dev/null +++ b/sdk/sitemanager/Azure.ResourceManager.SiteManager/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.SiteManager +{ + 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/sitemanager/Azure.ResourceManager.SiteManager/src/Generated/Internal/Optional.cs b/sdk/sitemanager/Azure.ResourceManager.SiteManager/src/Generated/Internal/Optional.cs new file mode 100644 index 000000000000..eeaa7c102d82 --- /dev/null +++ b/sdk/sitemanager/Azure.ResourceManager.SiteManager/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.SiteManager +{ + 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/sitemanager/Azure.ResourceManager.SiteManager/src/Generated/Internal/Utf8JsonRequestContent.cs b/sdk/sitemanager/Azure.ResourceManager.SiteManager/src/Generated/Internal/Utf8JsonRequestContent.cs new file mode 100644 index 000000000000..5c17e9380373 --- /dev/null +++ b/sdk/sitemanager/Azure.ResourceManager.SiteManager/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.SiteManager +{ + 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/sitemanager/Azure.ResourceManager.SiteManager/src/Generated/LongRunningOperation/SiteManagerArmOperation.cs b/sdk/sitemanager/Azure.ResourceManager.SiteManager/src/Generated/LongRunningOperation/SiteManagerArmOperation.cs new file mode 100644 index 000000000000..2cd25b7e0d02 --- /dev/null +++ b/sdk/sitemanager/Azure.ResourceManager.SiteManager/src/Generated/LongRunningOperation/SiteManagerArmOperation.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.SiteManager +{ +#pragma warning disable SA1649 // File name should match first type name + internal class SiteManagerArmOperation : 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 SiteManagerArmOperation for mocking. + protected SiteManagerArmOperation() + { + } + + internal SiteManagerArmOperation(Response response, RehydrationToken? rehydrationToken = null) + { + _operation = OperationInternal.Succeeded(response); + _completeRehydrationToken = rehydrationToken; + _operationId = GetOperationId(rehydrationToken); + } + + internal SiteManagerArmOperation(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, "SiteManagerArmOperation", 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/sitemanager/Azure.ResourceManager.SiteManager/src/Generated/LongRunningOperation/SiteManagerArmOperationOfT.cs b/sdk/sitemanager/Azure.ResourceManager.SiteManager/src/Generated/LongRunningOperation/SiteManagerArmOperationOfT.cs new file mode 100644 index 000000000000..fc904280a722 --- /dev/null +++ b/sdk/sitemanager/Azure.ResourceManager.SiteManager/src/Generated/LongRunningOperation/SiteManagerArmOperationOfT.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.SiteManager +{ +#pragma warning disable SA1649 // File name should match first type name + internal class SiteManagerArmOperation : 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 SiteManagerArmOperation for mocking. + protected SiteManagerArmOperation() + { + } + + internal SiteManagerArmOperation(Response response, RehydrationToken? rehydrationToken = null) + { + _operation = OperationInternal.Succeeded(response.GetRawResponse(), response.Value); + _completeRehydrationToken = rehydrationToken; + _operationId = GetOperationId(rehydrationToken); + } + + internal SiteManagerArmOperation(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, "SiteManagerArmOperation", 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/sitemanager/Azure.ResourceManager.SiteManager/src/Generated/LongRunningOperation/SiteOperationSource.cs b/sdk/sitemanager/Azure.ResourceManager.SiteManager/src/Generated/LongRunningOperation/SiteOperationSource.cs new file mode 100644 index 000000000000..4076d2b1fd32 --- /dev/null +++ b/sdk/sitemanager/Azure.ResourceManager.SiteManager/src/Generated/LongRunningOperation/SiteOperationSource.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.SiteManager +{ + internal class SiteOperationSource : IOperationSource + { + private readonly ArmClient _client; + + internal SiteOperationSource(ArmClient client) + { + _client = client; + } + + SiteResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + var data = ModelReaderWriter.Read(response.Content); + return new SiteResource(_client, data); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + var data = ModelReaderWriter.Read(response.Content); + return await Task.FromResult(new SiteResource(_client, data)).ConfigureAwait(false); + } + } +} diff --git a/sdk/sitemanager/Azure.ResourceManager.SiteManager/src/Generated/Models/ResourceProvisioningState.cs b/sdk/sitemanager/Azure.ResourceManager.SiteManager/src/Generated/Models/ResourceProvisioningState.cs new file mode 100644 index 000000000000..e99e5b7d2b63 --- /dev/null +++ b/sdk/sitemanager/Azure.ResourceManager.SiteManager/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.SiteManager.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/sitemanager/Azure.ResourceManager.SiteManager/src/Generated/Models/SiteListResult.Serialization.cs b/sdk/sitemanager/Azure.ResourceManager.SiteManager/src/Generated/Models/SiteListResult.Serialization.cs new file mode 100644 index 000000000000..d2fe83e6a24a --- /dev/null +++ b/sdk/sitemanager/Azure.ResourceManager.SiteManager/src/Generated/Models/SiteListResult.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.SiteManager.Models +{ + internal partial class SiteListResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SiteListResult)} 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 + } + } + } + + SiteListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SiteListResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSiteListResult(document.RootElement, options); + } + + internal static SiteListResult DeserializeSiteListResult(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(SiteData.DeserializeSiteData(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 SiteListResult(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(SiteListResult)} does not support writing '{options.Format}' format."); + } + } + + SiteListResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeSiteListResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SiteListResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/sitemanager/Azure.ResourceManager.SiteManager/src/Generated/Models/SiteListResult.cs b/sdk/sitemanager/Azure.ResourceManager.SiteManager/src/Generated/Models/SiteListResult.cs new file mode 100644 index 000000000000..cdd5ac29edcd --- /dev/null +++ b/sdk/sitemanager/Azure.ResourceManager.SiteManager/src/Generated/Models/SiteListResult.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.SiteManager.Models +{ + /// The response of a Site list operation. + internal partial class SiteListResult + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// 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 Site items on this page. + /// is null. + internal SiteListResult(IEnumerable value) + { + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); + } + + /// Initializes a new instance of . + /// The Site items on this page. + /// The link to the next page of items. + /// Keeps track of any properties unknown to the library. + internal SiteListResult(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) + { + Value = value; + NextLink = nextLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal SiteListResult() + { + } + + /// The Site items on this page. + public IReadOnlyList Value { get; } + /// The link to the next page of items. + public Uri NextLink { get; } + } +} diff --git a/sdk/sitemanager/Azure.ResourceManager.SiteManager/src/Generated/Models/SiteProperties.Serialization.cs b/sdk/sitemanager/Azure.ResourceManager.SiteManager/src/Generated/Models/SiteProperties.Serialization.cs new file mode 100644 index 000000000000..65aee1d1f37f --- /dev/null +++ b/sdk/sitemanager/Azure.ResourceManager.SiteManager/src/Generated/Models/SiteProperties.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.SiteManager.Models +{ + public partial class SiteProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SiteProperties)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(DisplayName)) + { + writer.WritePropertyName("displayName"u8); + writer.WriteStringValue(DisplayName); + } + if (Optional.IsDefined(Description)) + { + writer.WritePropertyName("description"u8); + writer.WriteStringValue(Description); + } + if (Optional.IsDefined(AddressResourceId)) + { + writer.WritePropertyName("addressResourceId"u8); + writer.WriteStringValue(AddressResourceId); + } + 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 + } + } + } + + SiteProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SiteProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSiteProperties(document.RootElement, options); + } + + internal static SiteProperties DeserializeSiteProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string displayName = default; + string description = default; + ResourceIdentifier addressResourceId = default; + ResourceProvisioningState? 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("description"u8)) + { + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("addressResourceId"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + addressResourceId = new ResourceIdentifier(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 SiteProperties(displayName, description, addressResourceId, 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(SiteProperties)} does not support writing '{options.Format}' format."); + } + } + + SiteProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeSiteProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SiteProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/sitemanager/Azure.ResourceManager.SiteManager/src/Generated/Models/SiteProperties.cs b/sdk/sitemanager/Azure.ResourceManager.SiteManager/src/Generated/Models/SiteProperties.cs new file mode 100644 index 000000000000..744e4baf8923 --- /dev/null +++ b/sdk/sitemanager/Azure.ResourceManager.SiteManager/src/Generated/Models/SiteProperties.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.Core; + +namespace Azure.ResourceManager.SiteManager.Models +{ + /// Site properties. + public partial class SiteProperties + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// 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 SiteProperties() + { + } + + /// Initializes a new instance of . + /// displayName of Site resource. + /// Description of Site resource. + /// AddressResource ArmId of Site resource. + /// Provisioning state of last operation. + /// Keeps track of any properties unknown to the library. + internal SiteProperties(string displayName, string description, ResourceIdentifier addressResourceId, ResourceProvisioningState? provisioningState, IDictionary serializedAdditionalRawData) + { + DisplayName = displayName; + Description = description; + AddressResourceId = addressResourceId; + ProvisioningState = provisioningState; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// displayName of Site resource. + public string DisplayName { get; set; } + /// Description of Site resource. + public string Description { get; set; } + /// AddressResource ArmId of Site resource. + public ResourceIdentifier AddressResourceId { get; set; } + /// Provisioning state of last operation. + public ResourceProvisioningState? ProvisioningState { get; } + } +} diff --git a/sdk/sitemanager/Azure.ResourceManager.SiteManager/src/Generated/Models/SiteUpdate.Serialization.cs b/sdk/sitemanager/Azure.ResourceManager.SiteManager/src/Generated/Models/SiteUpdate.Serialization.cs new file mode 100644 index 000000000000..dac0628fdd2f --- /dev/null +++ b/sdk/sitemanager/Azure.ResourceManager.SiteManager/src/Generated/Models/SiteUpdate.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.SiteManager.Models +{ + public partial class SiteUpdate : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SiteUpdate)} 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 + } + } + } + + SiteUpdate IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SiteUpdate)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSiteUpdate(document.RootElement, options); + } + + internal static SiteUpdate DeserializeSiteUpdate(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + SiteUpdateProperties 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 = SiteUpdateProperties.DeserializeSiteUpdateProperties(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new SiteUpdate(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(SiteUpdate)} does not support writing '{options.Format}' format."); + } + } + + SiteUpdate IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeSiteUpdate(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SiteUpdate)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/sitemanager/Azure.ResourceManager.SiteManager/src/Generated/Models/SiteUpdate.cs b/sdk/sitemanager/Azure.ResourceManager.SiteManager/src/Generated/Models/SiteUpdate.cs new file mode 100644 index 000000000000..ed66baac9fcb --- /dev/null +++ b/sdk/sitemanager/Azure.ResourceManager.SiteManager/src/Generated/Models/SiteUpdate.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.SiteManager.Models +{ + /// The type used for update operations of the Site. + public partial class SiteUpdate + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// 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 SiteUpdate() + { + } + + /// Initializes a new instance of . + /// The updatable properties of the Site. + /// Keeps track of any properties unknown to the library. + internal SiteUpdate(SiteUpdateProperties properties, IDictionary serializedAdditionalRawData) + { + Properties = properties; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The updatable properties of the Site. + public SiteUpdateProperties Properties { get; set; } + } +} diff --git a/sdk/sitemanager/Azure.ResourceManager.SiteManager/src/Generated/Models/SiteUpdateProperties.Serialization.cs b/sdk/sitemanager/Azure.ResourceManager.SiteManager/src/Generated/Models/SiteUpdateProperties.Serialization.cs new file mode 100644 index 000000000000..f0d094c1f685 --- /dev/null +++ b/sdk/sitemanager/Azure.ResourceManager.SiteManager/src/Generated/Models/SiteUpdateProperties.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.SiteManager.Models +{ + public partial class SiteUpdateProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SiteUpdateProperties)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(DisplayName)) + { + writer.WritePropertyName("displayName"u8); + writer.WriteStringValue(DisplayName); + } + if (Optional.IsDefined(Description)) + { + writer.WritePropertyName("description"u8); + writer.WriteStringValue(Description); + } + if (Optional.IsDefined(AddressResourceId)) + { + writer.WritePropertyName("addressResourceId"u8); + writer.WriteStringValue(AddressResourceId); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + SiteUpdateProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SiteUpdateProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSiteUpdateProperties(document.RootElement, options); + } + + internal static SiteUpdateProperties DeserializeSiteUpdateProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string displayName = default; + string description = default; + ResourceIdentifier addressResourceId = 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("description"u8)) + { + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("addressResourceId"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + addressResourceId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new SiteUpdateProperties(displayName, description, addressResourceId, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(SiteUpdateProperties)} does not support writing '{options.Format}' format."); + } + } + + SiteUpdateProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeSiteUpdateProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SiteUpdateProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/sitemanager/Azure.ResourceManager.SiteManager/src/Generated/Models/SiteUpdateProperties.cs b/sdk/sitemanager/Azure.ResourceManager.SiteManager/src/Generated/Models/SiteUpdateProperties.cs new file mode 100644 index 000000000000..a356c03675a9 --- /dev/null +++ b/sdk/sitemanager/Azure.ResourceManager.SiteManager/src/Generated/Models/SiteUpdateProperties.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.SiteManager.Models +{ + /// The updatable properties of the Site. + public partial class SiteUpdateProperties + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// 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 SiteUpdateProperties() + { + } + + /// Initializes a new instance of . + /// displayName of Site resource. + /// Description of Site resource. + /// AddressResource ArmId of Site resource. + /// Keeps track of any properties unknown to the library. + internal SiteUpdateProperties(string displayName, string description, ResourceIdentifier addressResourceId, IDictionary serializedAdditionalRawData) + { + DisplayName = displayName; + Description = description; + AddressResourceId = addressResourceId; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// displayName of Site resource. + public string DisplayName { get; set; } + /// Description of Site resource. + public string Description { get; set; } + /// AddressResource ArmId of Site resource. + public ResourceIdentifier AddressResourceId { get; set; } + } +} diff --git a/sdk/sitemanager/Azure.ResourceManager.SiteManager/src/Generated/ProviderConstants.cs b/sdk/sitemanager/Azure.ResourceManager.SiteManager/src/Generated/ProviderConstants.cs new file mode 100644 index 000000000000..ac5d9bb23fcf --- /dev/null +++ b/sdk/sitemanager/Azure.ResourceManager.SiteManager/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.SiteManager +{ + internal static class ProviderConstants + { + public static string DefaultProviderNamespace { get; } = ClientDiagnostics.GetResourceProviderNamespace(typeof(ProviderConstants).Assembly); + } +} diff --git a/sdk/sitemanager/Azure.ResourceManager.SiteManager/src/Generated/RestOperations/SitesBySubscriptionRestOperations.cs b/sdk/sitemanager/Azure.ResourceManager.SiteManager/src/Generated/RestOperations/SitesBySubscriptionRestOperations.cs new file mode 100644 index 000000000000..2f4cfee6095f --- /dev/null +++ b/sdk/sitemanager/Azure.ResourceManager.SiteManager/src/Generated/RestOperations/SitesBySubscriptionRestOperations.cs @@ -0,0 +1,529 @@ +// 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.SiteManager.Models; + +namespace Azure.ResourceManager.SiteManager +{ + internal partial class SitesBySubscriptionRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of SitesBySubscriptionRestOperations. + /// 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 SitesBySubscriptionRestOperations(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-02-01-preview"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateListRequestUri(string subscriptionId) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Microsoft.Edge/sites", 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.Edge/sites", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List Site 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> 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: + { + SiteListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = SiteListResult.DeserializeSiteListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List Site 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 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: + { + SiteListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = SiteListResult.DeserializeSiteListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string siteName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Microsoft.Edge/sites/", false); + uri.AppendPath(siteName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string siteName) + { + 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.Edge/sites/", false); + uri.AppendPath(siteName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get a Site. + /// The ID of the target subscription. The value must be an UUID. + /// Name of Site 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 siteName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(siteName, nameof(siteName)); + + using var message = CreateGetRequest(subscriptionId, siteName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + SiteData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = SiteData.DeserializeSiteData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get a Site. + /// The ID of the target subscription. The value must be an UUID. + /// Name of Site 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 siteName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(siteName, nameof(siteName)); + + using var message = CreateGetRequest(subscriptionId, siteName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + SiteData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = SiteData.DeserializeSiteData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, string siteName, SiteData data) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Microsoft.Edge/sites/", false); + uri.AppendPath(siteName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string siteName, SiteData 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/Microsoft.Edge/sites/", false); + uri.AppendPath(siteName, 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 Site. + /// The ID of the target subscription. The value must be an UUID. + /// Name of Site resource. + /// 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 siteName, SiteData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(siteName, nameof(siteName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, siteName, 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 Site. + /// The ID of the target subscription. The value must be an UUID. + /// Name of Site resource. + /// 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 siteName, SiteData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(siteName, nameof(siteName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, siteName, 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 siteName, SiteUpdate properties) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Microsoft.Edge/sites/", false); + uri.AppendPath(siteName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateUpdateRequest(string subscriptionId, string siteName, SiteUpdate properties) + { + 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/Microsoft.Edge/sites/", false); + uri.AppendPath(siteName, 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(properties, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Update a Site. + /// The ID of the target subscription. The value must be an UUID. + /// Name of Site resource. + /// 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 siteName, SiteUpdate properties, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(siteName, nameof(siteName)); + Argument.AssertNotNull(properties, nameof(properties)); + + using var message = CreateUpdateRequest(subscriptionId, siteName, properties); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + SiteData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = SiteData.DeserializeSiteData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Update a Site. + /// The ID of the target subscription. The value must be an UUID. + /// Name of Site resource. + /// 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 siteName, SiteUpdate properties, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(siteName, nameof(siteName)); + Argument.AssertNotNull(properties, nameof(properties)); + + using var message = CreateUpdateRequest(subscriptionId, siteName, properties); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + SiteData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = SiteData.DeserializeSiteData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string siteName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Microsoft.Edge/sites/", false); + uri.AppendPath(siteName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateDeleteRequest(string subscriptionId, string siteName) + { + 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/Microsoft.Edge/sites/", false); + uri.AppendPath(siteName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Delete a Site. + /// The ID of the target subscription. The value must be an UUID. + /// Name of Site 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 siteName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(siteName, nameof(siteName)); + + using var message = CreateDeleteRequest(subscriptionId, siteName); + 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 Site. + /// The ID of the target subscription. The value must be an UUID. + /// Name of Site 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 siteName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(siteName, nameof(siteName)); + + using var message = CreateDeleteRequest(subscriptionId, siteName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListNextPageRequestUri(string nextLink, string subscriptionId) + { + 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; + } + + /// List Site 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> 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: + { + SiteListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = SiteListResult.DeserializeSiteListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List Site 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 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: + { + SiteListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = SiteListResult.DeserializeSiteListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/sitemanager/Azure.ResourceManager.SiteManager/src/Generated/RestOperations/SitesRestOperations.cs b/sdk/sitemanager/Azure.ResourceManager.SiteManager/src/Generated/RestOperations/SitesRestOperations.cs new file mode 100644 index 000000000000..5e5d78d744a4 --- /dev/null +++ b/sdk/sitemanager/Azure.ResourceManager.SiteManager/src/Generated/RestOperations/SitesRestOperations.cs @@ -0,0 +1,577 @@ +// 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.SiteManager.Models; + +namespace Azure.ResourceManager.SiteManager +{ + internal partial class SitesRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of SitesRestOperations. + /// 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 SitesRestOperations(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-02-01-preview"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string siteName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Edge/sites/", false); + uri.AppendPath(siteName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string siteName) + { + 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.Edge/sites/", false); + uri.AppendPath(siteName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get a Site. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of Site 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 siteName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(siteName, nameof(siteName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, siteName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + SiteData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = SiteData.DeserializeSiteData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((SiteData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get a Site. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of Site 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 siteName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(siteName, nameof(siteName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, siteName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + SiteData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = SiteData.DeserializeSiteData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((SiteData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, string resourceGroupName, string siteName, SiteData 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.Edge/sites/", false); + uri.AppendPath(siteName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string siteName, SiteData 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.Edge/sites/", false); + uri.AppendPath(siteName, 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 Site. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of Site resource. + /// 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 siteName, SiteData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(siteName, nameof(siteName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, siteName, 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 Site. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of Site resource. + /// 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 siteName, SiteData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(siteName, nameof(siteName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, siteName, 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 siteName, SiteUpdate properties) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Edge/sites/", false); + uri.AppendPath(siteName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string siteName, SiteUpdate properties) + { + 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.Edge/sites/", false); + uri.AppendPath(siteName, 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(properties, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Update a Site. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of Site resource. + /// 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 siteName, SiteUpdate properties, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(siteName, nameof(siteName)); + Argument.AssertNotNull(properties, nameof(properties)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, siteName, properties); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + SiteData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = SiteData.DeserializeSiteData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Update a Site. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of Site resource. + /// 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 siteName, SiteUpdate properties, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(siteName, nameof(siteName)); + Argument.AssertNotNull(properties, nameof(properties)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, siteName, properties); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + SiteData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = SiteData.DeserializeSiteData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string siteName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Edge/sites/", false); + uri.AppendPath(siteName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string siteName) + { + 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.Edge/sites/", false); + uri.AppendPath(siteName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Delete a Site. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of Site 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 siteName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(siteName, nameof(siteName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, siteName); + 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 Site. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of Site 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 siteName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(siteName, nameof(siteName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, siteName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + 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.Edge/sites", 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.Edge/sites", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List Site 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: + { + SiteListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = SiteListResult.DeserializeSiteListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List Site 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: + { + SiteListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = SiteListResult.DeserializeSiteListResult(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 Site 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: + { + SiteListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = SiteListResult.DeserializeSiteListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List Site 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: + { + SiteListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = SiteListResult.DeserializeSiteListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/sitemanager/Azure.ResourceManager.SiteManager/src/Generated/SiteCollection.cs b/sdk/sitemanager/Azure.ResourceManager.SiteManager/src/Generated/SiteCollection.cs new file mode 100644 index 000000000000..5141b9845b08 --- /dev/null +++ b/sdk/sitemanager/Azure.ResourceManager.SiteManager/src/Generated/SiteCollection.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.SiteManager +{ + /// + /// 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 GetSites method from an instance of . + /// + public partial class SiteCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _siteClientDiagnostics; + private readonly SitesRestOperations _siteRestClient; + + /// Initializes a new instance of the class for mocking. + protected SiteCollection() + { + } + + /// 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 SiteCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _siteClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.SiteManager", SiteResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(SiteResource.ResourceType, out string siteApiVersion); + _siteRestClient = new SitesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, siteApiVersion); +#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 Site + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/sites/{siteName} + /// + /// + /// Operation Id + /// Site_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2024-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 Site resource. + /// 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 siteName, SiteData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(siteName, nameof(siteName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _siteClientDiagnostics.CreateScope("SiteCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _siteRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, siteName, data, cancellationToken).ConfigureAwait(false); + var operation = new SiteManagerArmOperation(new SiteOperationSource(Client), _siteClientDiagnostics, Pipeline, _siteRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, siteName, 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 Site + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/sites/{siteName} + /// + /// + /// Operation Id + /// Site_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2024-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 Site resource. + /// 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 siteName, SiteData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(siteName, nameof(siteName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _siteClientDiagnostics.CreateScope("SiteCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _siteRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, siteName, data, cancellationToken); + var operation = new SiteManagerArmOperation(new SiteOperationSource(Client), _siteClientDiagnostics, Pipeline, _siteRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, siteName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a Site + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/sites/{siteName} + /// + /// + /// Operation Id + /// Site_Get + /// + /// + /// Default Api Version + /// 2024-02-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of Site 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 siteName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(siteName, nameof(siteName)); + + using var scope = _siteClientDiagnostics.CreateScope("SiteCollection.Get"); + scope.Start(); + try + { + var response = await _siteRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, siteName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new SiteResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a Site + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/sites/{siteName} + /// + /// + /// Operation Id + /// Site_Get + /// + /// + /// Default Api Version + /// 2024-02-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of Site resource. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string siteName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(siteName, nameof(siteName)); + + using var scope = _siteClientDiagnostics.CreateScope("SiteCollection.Get"); + scope.Start(); + try + { + var response = _siteRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, siteName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new SiteResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// List Site resources by resource group + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/sites + /// + /// + /// Operation Id + /// Site_ListByResourceGroup + /// + /// + /// Default Api Version + /// 2024-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 GetAllAsync(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _siteRestClient.CreateListByResourceGroupRequest(Id.SubscriptionId, Id.ResourceGroupName); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _siteRestClient.CreateListByResourceGroupNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new SiteResource(Client, SiteData.DeserializeSiteData(e)), _siteClientDiagnostics, Pipeline, "SiteCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// List Site resources by resource group + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/sites + /// + /// + /// Operation Id + /// Site_ListByResourceGroup + /// + /// + /// Default Api Version + /// 2024-02-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _siteRestClient.CreateListByResourceGroupRequest(Id.SubscriptionId, Id.ResourceGroupName); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _siteRestClient.CreateListByResourceGroupNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new SiteResource(Client, SiteData.DeserializeSiteData(e)), _siteClientDiagnostics, Pipeline, "SiteCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/sites/{siteName} + /// + /// + /// Operation Id + /// Site_Get + /// + /// + /// Default Api Version + /// 2024-02-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of Site 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 siteName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(siteName, nameof(siteName)); + + using var scope = _siteClientDiagnostics.CreateScope("SiteCollection.Exists"); + scope.Start(); + try + { + var response = await _siteRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, siteName, 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.Edge/sites/{siteName} + /// + /// + /// Operation Id + /// Site_Get + /// + /// + /// Default Api Version + /// 2024-02-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of Site resource. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string siteName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(siteName, nameof(siteName)); + + using var scope = _siteClientDiagnostics.CreateScope("SiteCollection.Exists"); + scope.Start(); + try + { + var response = _siteRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, siteName, 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.Edge/sites/{siteName} + /// + /// + /// Operation Id + /// Site_Get + /// + /// + /// Default Api Version + /// 2024-02-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of Site 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 siteName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(siteName, nameof(siteName)); + + using var scope = _siteClientDiagnostics.CreateScope("SiteCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _siteRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, siteName, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new SiteResource(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.Edge/sites/{siteName} + /// + /// + /// Operation Id + /// Site_Get + /// + /// + /// Default Api Version + /// 2024-02-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of Site resource. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string siteName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(siteName, nameof(siteName)); + + using var scope = _siteClientDiagnostics.CreateScope("SiteCollection.GetIfExists"); + scope.Start(); + try + { + var response = _siteRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, siteName, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new SiteResource(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/sitemanager/Azure.ResourceManager.SiteManager/src/Generated/SiteData.Serialization.cs b/sdk/sitemanager/Azure.ResourceManager.SiteManager/src/Generated/SiteData.Serialization.cs new file mode 100644 index 000000000000..a7d463851997 --- /dev/null +++ b/sdk/sitemanager/Azure.ResourceManager.SiteManager/src/Generated/SiteData.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.SiteManager.Models; + +namespace Azure.ResourceManager.SiteManager +{ + public partial class SiteData : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.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(SiteData)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties, options); + } + } + + SiteData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SiteData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSiteData(document.RootElement, options); + } + + internal static SiteData DeserializeSiteData(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + SiteProperties 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 = SiteProperties.DeserializeSiteProperties(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 SiteData( + 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(SiteData)} does not support writing '{options.Format}' format."); + } + } + + SiteData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeSiteData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SiteData)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/sitemanager/Azure.ResourceManager.SiteManager/src/Generated/SiteData.cs b/sdk/sitemanager/Azure.ResourceManager.SiteManager/src/Generated/SiteData.cs new file mode 100644 index 000000000000..a8eeede0bd0c --- /dev/null +++ b/sdk/sitemanager/Azure.ResourceManager.SiteManager/src/Generated/SiteData.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.SiteManager.Models; + +namespace Azure.ResourceManager.SiteManager +{ + /// + /// A class representing the Site data model. + /// Site as ARM Resource + /// + public partial class SiteData : 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 SiteData() + { + } + + /// 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 SiteData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, SiteProperties properties, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + { + Properties = properties; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The resource-specific properties for this resource. + public SiteProperties Properties { get; set; } + } +} diff --git a/sdk/sitemanager/Azure.ResourceManager.SiteManager/src/Generated/SiteResource.Serialization.cs b/sdk/sitemanager/Azure.ResourceManager.SiteManager/src/Generated/SiteResource.Serialization.cs new file mode 100644 index 000000000000..e58a1fa32660 --- /dev/null +++ b/sdk/sitemanager/Azure.ResourceManager.SiteManager/src/Generated/SiteResource.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.SiteManager +{ + public partial class SiteResource : IJsonModel + { + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + SiteData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options); + + SiteData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + } +} diff --git a/sdk/sitemanager/Azure.ResourceManager.SiteManager/src/Generated/SiteResource.cs b/sdk/sitemanager/Azure.ResourceManager.SiteManager/src/Generated/SiteResource.cs new file mode 100644 index 000000000000..d1d30e89ca61 --- /dev/null +++ b/sdk/sitemanager/Azure.ResourceManager.SiteManager/src/Generated/SiteResource.cs @@ -0,0 +1,344 @@ +// 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; +using Azure.ResourceManager.SiteManager.Models; + +namespace Azure.ResourceManager.SiteManager +{ + /// + /// A Class representing a Site 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 GetSiteResource method. + /// Otherwise you can get one from its parent resource using the GetSite method. + /// + public partial class SiteResource : ArmResource + { + /// Generate the resource identifier of a instance. + /// The subscriptionId. + /// The resourceGroupName. + /// The siteName. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string siteName) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/sites/{siteName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _siteClientDiagnostics; + private readonly SitesRestOperations _siteRestClient; + private readonly SiteData _data; + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.Edge/sites"; + + /// Initializes a new instance of the class for mocking. + protected SiteResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal SiteResource(ArmClient client, SiteData 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 SiteResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _siteClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.SiteManager", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string siteApiVersion); + _siteRestClient = new SitesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, siteApiVersion); +#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 SiteData 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 Site + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/sites/{siteName} + /// + /// + /// Operation Id + /// Site_Get + /// + /// + /// Default Api Version + /// 2024-02-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _siteClientDiagnostics.CreateScope("SiteResource.Get"); + scope.Start(); + try + { + var response = await _siteRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new SiteResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a Site + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/sites/{siteName} + /// + /// + /// Operation Id + /// Site_Get + /// + /// + /// Default Api Version + /// 2024-02-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _siteClientDiagnostics.CreateScope("SiteResource.Get"); + scope.Start(); + try + { + var response = _siteRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new SiteResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete a Site + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/sites/{siteName} + /// + /// + /// Operation Id + /// Site_Delete + /// + /// + /// Default Api Version + /// 2024-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 = _siteClientDiagnostics.CreateScope("SiteResource.Delete"); + scope.Start(); + try + { + var response = await _siteRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + var uri = _siteRestClient.CreateDeleteRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Delete, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new SiteManagerArmOperation(response, rehydrationToken); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete a Site + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/sites/{siteName} + /// + /// + /// Operation Id + /// Site_Delete + /// + /// + /// Default Api Version + /// 2024-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 = _siteClientDiagnostics.CreateScope("SiteResource.Delete"); + scope.Start(); + try + { + var response = _siteRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + var uri = _siteRestClient.CreateDeleteRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Delete, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new SiteManagerArmOperation(response, rehydrationToken); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Update a Site + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/sites/{siteName} + /// + /// + /// Operation Id + /// Site_Update + /// + /// + /// Default Api Version + /// 2024-02-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The resource properties to be updated. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(SiteUpdate properties, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(properties, nameof(properties)); + + using var scope = _siteClientDiagnostics.CreateScope("SiteResource.Update"); + scope.Start(); + try + { + var response = await _siteRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, properties, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new SiteResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Update a Site + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/sites/{siteName} + /// + /// + /// Operation Id + /// Site_Update + /// + /// + /// Default Api Version + /// 2024-02-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The resource properties to be updated. + /// The cancellation token to use. + /// is null. + public virtual Response Update(SiteUpdate properties, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(properties, nameof(properties)); + + using var scope = _siteClientDiagnostics.CreateScope("SiteResource.Update"); + scope.Start(); + try + { + var response = _siteRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, properties, cancellationToken); + return Response.FromValue(new SiteResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/sitemanager/Azure.ResourceManager.SiteManager/src/Properties/AssemblyInfo.cs b/sdk/sitemanager/Azure.ResourceManager.SiteManager/src/Properties/AssemblyInfo.cs new file mode 100644 index 000000000000..ae2291871033 --- /dev/null +++ b/sdk/sitemanager/Azure.ResourceManager.SiteManager/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.SiteManager.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("SiteManager")] diff --git a/sdk/sitemanager/Azure.ResourceManager.SiteManager/tsp-location.yaml b/sdk/sitemanager/Azure.ResourceManager.SiteManager/tsp-location.yaml new file mode 100644 index 000000000000..a0c4ea3fe8c2 --- /dev/null +++ b/sdk/sitemanager/Azure.ResourceManager.SiteManager/tsp-location.yaml @@ -0,0 +1,4 @@ +directory: specification/edge/Microsoft.Edge.Sites.Management +commit: 6e702986ee542ebd38d0ab2e2f2c00ab48a50b45 +repo: Azure/azure-rest-api-specs +additionalDirectories: diff --git a/sdk/sitemanager/ci.mgmt.yml b/sdk/sitemanager/ci.mgmt.yml new file mode 100644 index 000000000000..b64b81600c03 --- /dev/null +++ b/sdk/sitemanager/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/sitemanager /ci.mgmt.yml + - sdk/sitemanager /Azure.ResourceManager.SiteManager / + + +extends: + template: /eng/pipelines/templates/stages/archetype-sdk-client.yml + parameters: + ServiceDirectory: sitemanager + ArtifactName: packages + LimitForPullRequest: true + Artifacts: + - name: Azure.ResourceManager.SiteManager + safeName: AzureResourceManagerSiteManager 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..716aecd9e7cf 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: 6e702986ee542ebd38d0ab2e2f2c00ab48a50b45 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..a3e0536f8952 --- /dev/null +++ b/sdk/standbypool/Azure.ResourceManager.StandbyPool/tspCodeModel.json @@ -0,0 +1,16386 @@ +{ + "$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" + } + } + } + ] + }, + { + "$ref": "227" + }, + { + "$ref": "229" + }, + { + "$ref": "172" + }, + { + "$ref": "173" + }, + { + "$ref": "189" + }, + { + "$id": "253", + "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": "254", + "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": "255", + "json": { + "$id": "256", + "name": "status" + } + } + }, + { + "$id": "257", + "kind": "property", + "name": "name", + "serializedName": "name", + "doc": "The name of the operationStatus resource", + "type": { + "$id": "258", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.ArmOperationStatus.name", + "serializationOptions": { + "$id": "259", + "json": { + "$id": "260", + "name": "name" + } + } + }, + { + "$id": "261", + "kind": "property", + "name": "startTime", + "serializedName": "startTime", + "doc": "Operation start time", + "type": { + "$id": "262", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "rfc3339", + "wireType": { + "$id": "263", + "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": "264", + "json": { + "$id": "265", + "name": "startTime" + } + } + }, + { + "$id": "266", + "kind": "property", + "name": "endTime", + "serializedName": "endTime", + "doc": "Operation complete time", + "type": { + "$id": "267", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "rfc3339", + "wireType": { + "$id": "268", + "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": "269", + "json": { + "$id": "270", + "name": "endTime" + } + } + }, + { + "$id": "271", + "kind": "property", + "name": "percentComplete", + "serializedName": "percentComplete", + "doc": "The progress made toward completing the operation", + "type": { + "$id": "272", + "kind": "float64", + "name": "float64", + "crossLanguageDefinitionId": "TypeSpec.float64", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.ArmOperationStatus.percentComplete", + "serializationOptions": { + "$id": "273", + "json": { + "$id": "274", + "name": "percentComplete" + } + } + }, + { + "$id": "275", + "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": "276", + "json": { + "$id": "277", + "name": "error" + } + } + } + ] + }, + { + "$id": "278", + "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": "279", + "kind": "property", + "name": "tags", + "serializedName": "tags", + "doc": "Resource tags.", + "type": { + "$id": "280", + "kind": "dict", + "keyType": { + "$id": "281", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "valueType": { + "$id": "282", + "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": "283", + "json": { + "$id": "284", + "name": "tags" + } + } + }, + { + "$id": "285", + "kind": "property", + "name": "properties", + "serializedName": "properties", + "doc": "The resource-specific properties for this resource.", + "type": { + "$id": "286", + "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": "287", + "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": "288", + "json": { + "$id": "289", + "name": "elasticityProfile" + } + } + }, + { + "$id": "290", + "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": "291", + "json": { + "$id": "292", + "name": "virtualMachineState" + } + } + }, + { + "$id": "293", + "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": "294", + "kind": "string", + "name": "armResourceIdentifier", + "crossLanguageDefinitionId": "Azure.Core.armResourceIdentifier", + "baseType": { + "$id": "295", + "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": "296", + "json": { + "$id": "297", + "name": "attachedVirtualMachineScaleSetId" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.Foundations.ResourceUpdateModel.properties", + "serializationOptions": { + "$id": "298", + "json": { + "$id": "299", + "name": "properties" + } + } + } + ] + }, + { + "$ref": "286" + }, + { + "$id": "300", + "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": "301", + "kind": "property", + "name": "value", + "serializedName": "value", + "doc": "The StandbyVirtualMachinePoolResource items on this page", + "type": { + "$id": "302", + "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": "303", + "json": { + "$id": "304", + "name": "value" + } + } + }, + { + "$id": "305", + "kind": "property", + "name": "nextLink", + "serializedName": "nextLink", + "doc": "The link to the next page of items", + "type": { + "$id": "306", + "kind": "url", + "name": "ResourceLocation", + "crossLanguageDefinitionId": "TypeSpec.Rest.ResourceLocation", + "baseType": { + "$id": "307", + "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": "308", + "json": { + "$id": "309", + "name": "nextLink" + } + } + } + ] + }, + { + "$id": "310", + "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": "311", + "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": "312", + "kind": "property", + "name": "properties", + "serializedName": "properties", + "doc": "The resource-specific properties for this resource.", + "type": { + "$id": "313", + "kind": "model", + "name": "StandbyVirtualMachineProperties", + "namespace": "Azure.ResourceManager.StandbyPool", + "crossLanguageDefinitionId": "Microsoft.StandbyPool.StandbyVirtualMachineResourceProperties", + "usage": "Output,Json", + "doc": "Details of the StandbyVirtualMachine.", + "decorators": [], + "properties": [ + { + "$id": "314", + "kind": "property", + "name": "virtualMachineResourceId", + "serializedName": "virtualMachineResourceId", + "doc": "Resource id of the virtual machine.", + "type": { + "$id": "315", + "kind": "string", + "name": "armResourceIdentifier", + "crossLanguageDefinitionId": "Azure.Core.armResourceIdentifier", + "baseType": { + "$id": "316", + "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": "317", + "json": { + "$id": "318", + "name": "virtualMachineResourceId" + } + } + }, + { + "$id": "319", + "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": "320", + "json": { + "$id": "321", + "name": "provisioningState" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.StandbyPool.StandbyVirtualMachineResource.properties", + "serializationOptions": { + "$id": "322", + "json": { + "$id": "323", + "name": "properties" + } + } + } + ] + }, + { + "$ref": "313" + }, + { + "$ref": "311" + }, + { + "$id": "324", + "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": "325", + "kind": "property", + "name": "value", + "serializedName": "value", + "doc": "The StandbyVirtualMachineResource items on this page", + "type": { + "$id": "326", + "kind": "array", + "name": "ArrayStandbyVirtualMachineResource", + "valueType": { + "$ref": "310" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.ResourceListResult.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": "Azure.ResourceManager.ResourceListResult.nextLink", + "serializationOptions": { + "$id": "332", + "json": { + "$id": "333", + "name": "nextLink" + } + } + } + ] + }, + { + "$id": "334", + "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": "311" + }, + "properties": [ + { + "$id": "335", + "kind": "property", + "name": "properties", + "serializedName": "properties", + "doc": "The resource-specific properties for this resource.", + "type": { + "$id": "336", + "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": "337", + "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": "338", + "kind": "array", + "name": "ArrayVirtualMachineInstanceCountSummary", + "valueType": { + "$id": "339", + "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": "340", + "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": "341", + "kind": "int64", + "name": "int64", + "crossLanguageDefinitionId": "TypeSpec.int64", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.StandbyPool.VirtualMachineInstanceCountSummary.zone", + "serializationOptions": { + "$id": "342", + "json": { + "$id": "343", + "name": "zone" + } + } + }, + { + "$id": "344", + "kind": "property", + "name": "StandbyVirtualMachineInstanceCountsByState", + "serializedName": "instanceCountsByState", + "doc": "The count of pooled virtual machines in each state for the given zone.", + "type": { + "$id": "345", + "kind": "array", + "name": "ArrayPoolVirtualMachineStateCount", + "valueType": { + "$id": "346", + "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": "347", + "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": "348", + "json": { + "$id": "349", + "name": "state" + } + } + }, + { + "$id": "350", + "kind": "property", + "name": "count", + "serializedName": "count", + "doc": "The count of pooled virtual machines in the given state.", + "type": { + "$id": "351", + "kind": "int64", + "name": "int64", + "crossLanguageDefinitionId": "TypeSpec.int64", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.StandbyPool.PoolVirtualMachineStateCount.count", + "serializationOptions": { + "$id": "352", + "json": { + "$id": "353", + "name": "count" + } + } + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.StandbyPool.VirtualMachineInstanceCountSummary.instanceCountsByState", + "serializationOptions": { + "$id": "354", + "json": { + "$id": "355", + "name": "instanceCountsByState" + } + } + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.StandbyPool.StandbyVirtualMachinePoolRuntimeViewResourceProperties.instanceCountSummary", + "serializationOptions": { + "$id": "356", + "json": { + "$id": "357", + "name": "instanceCountSummary" + } + } + }, + { + "$id": "358", + "kind": "property", + "name": "status", + "serializedName": "status", + "doc": "Display status of the standby pool", + "type": { + "$id": "359", + "kind": "model", + "name": "StandbyPoolStatus", + "namespace": "Azure.ResourceManager.StandbyPool", + "crossLanguageDefinitionId": "Microsoft.StandbyPool.PoolStatus", + "usage": "Output,Json", + "doc": "Displays StandbyPool status.", + "decorators": [], + "properties": [ + { + "$id": "360", + "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": "361", + "json": { + "$id": "362", + "name": "code" + } + } + }, + { + "$id": "363", + "kind": "property", + "name": "message", + "serializedName": "message", + "doc": "Displays the StandbyPool health state details.", + "type": { + "$id": "364", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.StandbyPool.PoolStatus.message", + "serializationOptions": { + "$id": "365", + "json": { + "$id": "366", + "name": "message" + } + } + } + ] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.StandbyPool.StandbyVirtualMachinePoolRuntimeViewResourceProperties.status", + "serializationOptions": { + "$id": "367", + "json": { + "$id": "368", + "name": "status" + } + } + }, + { + "$id": "369", + "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": "370", + "json": { + "$id": "371", + "name": "provisioningState" + } + } + }, + { + "$id": "372", + "kind": "property", + "name": "prediction", + "serializedName": "prediction", + "doc": "Displays prediction information of the standby pool", + "type": { + "$id": "373", + "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": "374", + "kind": "property", + "name": "forecastValues", + "serializedName": "forecastValues", + "doc": "Displays the forecast information of the standby pool.", + "type": { + "$id": "375", + "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": "376", + "kind": "property", + "name": "instancesRequestedCount", + "serializedName": "instancesRequestedCount", + "doc": "Displays the predicted count of instances to be requested from the standby pool.", + "type": { + "$id": "377", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "378", + "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": "379", + "json": { + "$id": "380", + "name": "instancesRequestedCount" + } + } + } + ] + }, + "optional": false, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.StandbyPool.StandbyVirtualMachinePoolPrediction.forecastValues", + "serializationOptions": { + "$id": "381", + "json": { + "$id": "382", + "name": "forecastValues" + } + } + }, + { + "$id": "383", + "kind": "property", + "name": "forecastStartTime", + "serializedName": "forecastStartTime", + "doc": "Displays the UTC timestamp of when the prediction was retrieved for the standby pool.", + "type": { + "$id": "384", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "rfc3339", + "wireType": { + "$id": "385", + "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": "386", + "json": { + "$id": "387", + "name": "forecastStartTime" + } + } + }, + { + "$id": "388", + "kind": "property", + "name": "forecastInfo", + "serializedName": "forecastInfo", + "doc": "Displays additional information for the prediction of the standby pool.", + "type": { + "$id": "389", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.StandbyPool.StandbyVirtualMachinePoolPrediction.forecastInfo", + "serializationOptions": { + "$id": "390", + "json": { + "$id": "391", + "name": "forecastInfo" + } + } + } + ] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.StandbyPool.StandbyVirtualMachinePoolRuntimeViewResourceProperties.prediction", + "serializationOptions": { + "$id": "392", + "json": { + "$id": "393", + "name": "prediction" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.StandbyPool.StandbyVirtualMachinePoolRuntimeViewResource.properties", + "serializationOptions": { + "$id": "394", + "json": { + "$id": "395", + "name": "properties" + } + } + } + ] + }, + { + "$ref": "336" + }, + { + "$ref": "339" + }, + { + "$ref": "346" + }, + { + "$ref": "359" + }, + { + "$ref": "373" + }, + { + "$ref": "375" + }, + { + "$id": "396", + "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": "397", + "kind": "property", + "name": "value", + "serializedName": "value", + "doc": "The StandbyVirtualMachinePoolRuntimeViewResource items on this page", + "type": { + "$id": "398", + "kind": "array", + "name": "ArrayStandbyVirtualMachinePoolRuntimeViewResource", + "valueType": { + "$ref": "334" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.ResourceListResult.value", + "serializationOptions": { + "$id": "399", + "json": { + "$id": "400", + "name": "value" + } + } + }, + { + "$id": "401", + "kind": "property", + "name": "nextLink", + "serializedName": "nextLink", + "doc": "The link to the next page of items", + "type": { + "$id": "402", + "kind": "url", + "name": "ResourceLocation", + "crossLanguageDefinitionId": "TypeSpec.Rest.ResourceLocation", + "baseType": { + "$id": "403", + "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": "404", + "json": { + "$id": "405", + "name": "nextLink" + } + } + } + ] + }, + { + "$id": "406", + "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": "407", + "kind": "property", + "name": "properties", + "serializedName": "properties", + "doc": "The resource-specific properties for this resource.", + "type": { + "$id": "408", + "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": "409", + "kind": "property", + "name": "elasticityProfile", + "serializedName": "elasticityProfile", + "doc": "Specifies elasticity profile of standby container group pools.", + "type": { + "$id": "410", + "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": "411", + "kind": "property", + "name": "maxReadyCapacity", + "serializedName": "maxReadyCapacity", + "doc": "Specifies maximum number of standby container groups in the standby pool.", + "type": { + "$id": "412", + "kind": "int64", + "name": "int64", + "crossLanguageDefinitionId": "TypeSpec.int64", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.StandbyPool.StandbyContainerGroupPoolElasticityProfile.maxReadyCapacity", + "serializationOptions": { + "$id": "413", + "json": { + "$id": "414", + "name": "maxReadyCapacity" + } + } + }, + { + "$id": "415", + "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": "416", + "json": { + "$id": "417", + "name": "refillPolicy" + } + } + } + ] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.StandbyPool.StandbyContainerGroupPoolResourceProperties.elasticityProfile", + "serializationOptions": { + "$id": "418", + "json": { + "$id": "419", + "name": "elasticityProfile" + } + } + }, + { + "$id": "420", + "kind": "property", + "name": "containerGroupProperties", + "serializedName": "containerGroupProperties", + "doc": "Specifies container group properties of standby container group pools.", + "type": { + "$id": "421", + "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": "422", + "kind": "property", + "name": "containerGroupProfile", + "serializedName": "containerGroupProfile", + "doc": "Specifies container group profile of standby container groups.", + "type": { + "$id": "423", + "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": "424", + "kind": "property", + "name": "id", + "serializedName": "id", + "doc": "Specifies container group profile id of standby container groups.", + "type": { + "$id": "425", + "kind": "string", + "name": "armResourceIdentifier", + "crossLanguageDefinitionId": "Azure.Core.armResourceIdentifier", + "baseType": { + "$id": "426", + "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": "427", + "json": { + "$id": "428", + "name": "id" + } + } + }, + { + "$id": "429", + "kind": "property", + "name": "revision", + "serializedName": "revision", + "doc": "Specifies revision of container group profile.", + "type": { + "$id": "430", + "kind": "int64", + "name": "int64", + "crossLanguageDefinitionId": "TypeSpec.int64", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.StandbyPool.ContainerGroupProfile.revision", + "serializationOptions": { + "$id": "431", + "json": { + "$id": "432", + "name": "revision" + } + } + } + ] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.StandbyPool.ContainerGroupProperties.containerGroupProfile", + "serializationOptions": { + "$id": "433", + "json": { + "$id": "434", + "name": "containerGroupProfile" + } + } + }, + { + "$id": "435", + "kind": "property", + "name": "subnetIds", + "serializedName": "subnetIds", + "doc": "Specifies subnet Ids for container group.", + "type": { + "$id": "436", + "kind": "array", + "name": "ArraySubnet", + "valueType": { + "$id": "437", + "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": "438", + "kind": "property", + "name": "id", + "serializedName": "id", + "doc": "Specifies ARM resource id of the subnet.", + "type": { + "$id": "439", + "kind": "string", + "name": "armResourceIdentifier", + "crossLanguageDefinitionId": "Azure.Core.armResourceIdentifier", + "baseType": { + "$id": "440", + "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": "441", + "json": { + "$id": "442", + "name": "id" + } + } + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.StandbyPool.ContainerGroupProperties.subnetIds", + "serializationOptions": { + "$id": "443", + "json": { + "$id": "444", + "name": "subnetIds" + } + } + } + ] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.StandbyPool.StandbyContainerGroupPoolResourceProperties.containerGroupProperties", + "serializationOptions": { + "$id": "445", + "json": { + "$id": "446", + "name": "containerGroupProperties" + } + } + }, + { + "$id": "447", + "kind": "property", + "name": "zones", + "serializedName": "zones", + "doc": "Specifies zones of standby container group pools.", + "type": { + "$id": "448", + "kind": "array", + "name": "Array1", + "valueType": { + "$id": "449", + "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": "450", + "json": { + "$id": "451", + "name": "zones" + } + } + }, + { + "$id": "452", + "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": "453", + "json": { + "$id": "454", + "name": "provisioningState" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.StandbyPool.StandbyContainerGroupPoolResource.properties", + "serializationOptions": { + "$id": "455", + "json": { + "$id": "456", + "name": "properties" + } + } + } + ] + }, + { + "$ref": "408" + }, + { + "$ref": "410" + }, + { + "$ref": "421" + }, + { + "$ref": "423" + }, + { + "$ref": "437" + }, + { + "$id": "457", + "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": "458", + "kind": "property", + "name": "tags", + "serializedName": "tags", + "doc": "Resource tags.", + "type": { + "$id": "459", + "kind": "dict", + "keyType": { + "$id": "460", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "valueType": { + "$id": "461", + "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": "462", + "json": { + "$id": "463", + "name": "tags" + } + } + }, + { + "$id": "464", + "kind": "property", + "name": "properties", + "serializedName": "properties", + "doc": "The resource-specific properties for this resource.", + "type": { + "$id": "465", + "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": "466", + "kind": "property", + "name": "elasticityProfile", + "serializedName": "elasticityProfile", + "doc": "Specifies elasticity profile of standby container group pools.", + "type": { + "$ref": "410" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.Foundations.ResourceUpdateModelProperties.elasticityProfile", + "serializationOptions": { + "$id": "467", + "json": { + "$id": "468", + "name": "elasticityProfile" + } + } + }, + { + "$id": "469", + "kind": "property", + "name": "containerGroupProperties", + "serializedName": "containerGroupProperties", + "doc": "Specifies container group properties of standby container group pools.", + "type": { + "$ref": "421" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.Foundations.ResourceUpdateModelProperties.containerGroupProperties", + "serializationOptions": { + "$id": "470", + "json": { + "$id": "471", + "name": "containerGroupProperties" + } + } + }, + { + "$id": "472", + "kind": "property", + "name": "zones", + "serializedName": "zones", + "doc": "Specifies zones of standby container group pools.", + "type": { + "$id": "473", + "kind": "array", + "name": "Array1", + "valueType": { + "$id": "474", + "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": "475", + "json": { + "$id": "476", + "name": "zones" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.Foundations.ResourceUpdateModel.properties", + "serializationOptions": { + "$id": "477", + "json": { + "$id": "478", + "name": "properties" + } + } + } + ] + }, + { + "$ref": "465" + }, + { + "$id": "479", + "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": "480", + "kind": "property", + "name": "value", + "serializedName": "value", + "doc": "The StandbyContainerGroupPoolResource items on this page", + "type": { + "$id": "481", + "kind": "array", + "name": "ArrayStandbyContainerGroupPoolResource", + "valueType": { + "$ref": "406" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.ResourceListResult.value", + "serializationOptions": { + "$id": "482", + "json": { + "$id": "483", + "name": "value" + } + } + }, + { + "$id": "484", + "kind": "property", + "name": "nextLink", + "serializedName": "nextLink", + "doc": "The link to the next page of items", + "type": { + "$id": "485", + "kind": "url", + "name": "ResourceLocation", + "crossLanguageDefinitionId": "TypeSpec.Rest.ResourceLocation", + "baseType": { + "$id": "486", + "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": "487", + "json": { + "$id": "488", + "name": "nextLink" + } + } + } + ] + }, + { + "$id": "489", + "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": "311" + }, + "properties": [ + { + "$id": "490", + "kind": "property", + "name": "properties", + "serializedName": "properties", + "doc": "The resource-specific properties for this resource.", + "type": { + "$id": "491", + "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": "492", + "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": "493", + "kind": "array", + "name": "ArrayContainerGroupInstanceCountSummary", + "valueType": { + "$id": "494", + "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": "495", + "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": "496", + "kind": "int64", + "name": "int64", + "crossLanguageDefinitionId": "TypeSpec.int64", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.StandbyPool.ContainerGroupInstanceCountSummary.zone", + "serializationOptions": { + "$id": "497", + "json": { + "$id": "498", + "name": "zone" + } + } + }, + { + "$id": "499", + "kind": "property", + "name": "StandbyContainerGroupInstanceCountsByState", + "serializedName": "instanceCountsByState", + "doc": "The count of pooled container groups in each state for the given zone.", + "type": { + "$id": "500", + "kind": "array", + "name": "ArrayPoolContainerGroupStateCount", + "valueType": { + "$id": "501", + "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": "502", + "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": "503", + "json": { + "$id": "504", + "name": "state" + } + } + }, + { + "$id": "505", + "kind": "property", + "name": "count", + "serializedName": "count", + "doc": "The count of pooled container groups in the given state.", + "type": { + "$id": "506", + "kind": "int64", + "name": "int64", + "crossLanguageDefinitionId": "TypeSpec.int64", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.StandbyPool.PoolContainerGroupStateCount.count", + "serializationOptions": { + "$id": "507", + "json": { + "$id": "508", + "name": "count" + } + } + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.StandbyPool.ContainerGroupInstanceCountSummary.instanceCountsByState", + "serializationOptions": { + "$id": "509", + "json": { + "$id": "510", + "name": "instanceCountsByState" + } + } + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.StandbyPool.StandbyContainerGroupPoolRuntimeViewResourceProperties.instanceCountSummary", + "serializationOptions": { + "$id": "511", + "json": { + "$id": "512", + "name": "instanceCountSummary" + } + } + }, + { + "$id": "513", + "kind": "property", + "name": "status", + "serializedName": "status", + "doc": "Display status of the standby pool", + "type": { + "$ref": "359" + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.StandbyPool.StandbyContainerGroupPoolRuntimeViewResourceProperties.status", + "serializationOptions": { + "$id": "514", + "json": { + "$id": "515", + "name": "status" + } + } + }, + { + "$id": "516", + "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": "517", + "json": { + "$id": "518", + "name": "provisioningState" + } + } + }, + { + "$id": "519", + "kind": "property", + "name": "prediction", + "serializedName": "prediction", + "doc": "Displays prediction information of the standby pool", + "type": { + "$id": "520", + "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": "521", + "kind": "property", + "name": "forecastValues", + "serializedName": "forecastValues", + "doc": "Displays the forecast information of the standby pool.", + "type": { + "$id": "522", + "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": "523", + "kind": "property", + "name": "instancesRequestedCount", + "serializedName": "instancesRequestedCount", + "doc": "Displays the predicted count of instances to be requested from the standby pool.", + "type": { + "$id": "524", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "525", + "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": "526", + "json": { + "$id": "527", + "name": "instancesRequestedCount" + } + } + } + ] + }, + "optional": false, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.StandbyPool.StandbyContainerGroupPoolPrediction.forecastValues", + "serializationOptions": { + "$id": "528", + "json": { + "$id": "529", + "name": "forecastValues" + } + } + }, + { + "$id": "530", + "kind": "property", + "name": "forecastStartTime", + "serializedName": "forecastStartTime", + "doc": "Displays the UTC timestamp of when the prediction was retrieved for the standby pool.", + "type": { + "$id": "531", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "rfc3339", + "wireType": { + "$id": "532", + "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": "533", + "json": { + "$id": "534", + "name": "forecastStartTime" + } + } + }, + { + "$id": "535", + "kind": "property", + "name": "forecastInfo", + "serializedName": "forecastInfo", + "doc": "Displays additional information for the prediction of the standby pool.", + "type": { + "$id": "536", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.StandbyPool.StandbyContainerGroupPoolPrediction.forecastInfo", + "serializationOptions": { + "$id": "537", + "json": { + "$id": "538", + "name": "forecastInfo" + } + } + } + ] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.StandbyPool.StandbyContainerGroupPoolRuntimeViewResourceProperties.prediction", + "serializationOptions": { + "$id": "539", + "json": { + "$id": "540", + "name": "prediction" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.StandbyPool.StandbyContainerGroupPoolRuntimeViewResource.properties", + "serializationOptions": { + "$id": "541", + "json": { + "$id": "542", + "name": "properties" + } + } + } + ] + }, + { + "$ref": "491" + }, + { + "$ref": "494" + }, + { + "$ref": "501" + }, + { + "$ref": "520" + }, + { + "$ref": "522" + }, + { + "$id": "543", + "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": "544", + "kind": "property", + "name": "value", + "serializedName": "value", + "doc": "The StandbyContainerGroupPoolRuntimeViewResource items on this page", + "type": { + "$id": "545", + "kind": "array", + "name": "ArrayStandbyContainerGroupPoolRuntimeViewResource", + "valueType": { + "$ref": "489" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.ResourceListResult.value", + "serializationOptions": { + "$id": "546", + "json": { + "$id": "547", + "name": "value" + } + } + }, + { + "$id": "548", + "kind": "property", + "name": "nextLink", + "serializedName": "nextLink", + "doc": "The link to the next page of items", + "type": { + "$id": "549", + "kind": "url", + "name": "ResourceLocation", + "crossLanguageDefinitionId": "TypeSpec.Rest.ResourceLocation", + "baseType": { + "$id": "550", + "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": "551", + "json": { + "$id": "552", + "name": "nextLink" + } + } + } + ] + } + ], + "clients": [ + { + "$id": "553", + "kind": "client", + "name": "StandbyPoolClient", + "namespace": "Azure.ResourceManager.StandbyPool", + "operations": [], + "parameters": [ + { + "$id": "554", + "name": "endpoint", + "nameInRequest": "endpoint", + "doc": "Service host", + "type": { + "$id": "555", + "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": "556", + "type": { + "$id": "557", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "https://management.azure.com" + } + } + ], + "decorators": [ + { + "$id": "558", + "name": "TypeSpec.@service", + "arguments": { + "$id": "559", + "options": { + "$id": "560", + "title": "Microsoft.StandbyPool" + } + } + } + ], + "crossLanguageDefinitionId": "Microsoft.StandbyPool", + "apiVersions": [ + "2023-12-01-preview", + "2024-03-01-preview", + "2024-03-01", + "2025-03-01" + ], + "children": [ + { + "$id": "561", + "kind": "client", + "name": "Operations", + "namespace": "Azure.ResourceManager.StandbyPool", + "operations": [ + { + "$id": "562", + "name": "list", + "resourceName": "Operations", + "doc": "List the operations for the provider", + "accessibility": "internal", + "parameters": [ + { + "$id": "563", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "564", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "565", + "type": { + "$id": "566", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-03-01" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "567", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "568", + "kind": "constant", + "valueType": { + "$id": "569", + "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": "570", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "92" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "GET", + "uri": "{endpoint}", + "path": "/providers/Microsoft.StandbyPool/operations", + "bufferResponse": true, + "paging": { + "$id": "571", + "itemPropertySegments": [ + "value" + ], + "nextLink": { + "$id": "572", + "responseSegments": [ + "nextLink" + ], + "responseLocation": "Body" + } + }, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Azure.ResourceManager.Operations.list", + "decorators": [], + "examples": [ + { + "$id": "573", + "kind": "http", + "name": "Operations_List", + "description": "Operations_List", + "filePath": "2025-03-01/Operations_List.json", + "parameters": [ + { + "$id": "574", + "parameter": { + "$ref": "563" + }, + "value": { + "$id": "575", + "kind": "string", + "type": { + "$ref": "564" + }, + "value": "2025-03-01" + } + } + ], + "responses": [ + { + "$id": "576", + "response": { + "$ref": "570" + }, + "statusCode": 200, + "bodyValue": { + "$id": "577", + "kind": "model", + "type": { + "$ref": "92" + }, + "value": { + "$id": "578", + "value": { + "$id": "579", + "kind": "array", + "type": { + "$ref": "94" + }, + "value": [ + { + "$id": "580", + "kind": "model", + "type": { + "$ref": "95" + }, + "value": { + "$id": "581", + "name": { + "$id": "582", + "kind": "string", + "type": { + "$ref": "97" + }, + "value": "Microsoft.StandbyPool/standbyContainerGroupPools/write" + }, + "isDataAction": { + "$id": "583", + "kind": "boolean", + "type": { + "$ref": "101" + }, + "value": true + }, + "display": { + "$id": "584", + "kind": "model", + "type": { + "$ref": "105" + }, + "value": { + "$id": "585", + "provider": { + "$id": "586", + "kind": "string", + "type": { + "$ref": "107" + }, + "value": "Microsoft.StandbyPool" + }, + "resource": { + "$id": "587", + "kind": "string", + "type": { + "$ref": "111" + }, + "value": "standbyContainerGroupPools" + }, + "operation": { + "$id": "588", + "kind": "string", + "type": { + "$ref": "115" + }, + "value": "StandbyContainerGroupPools_Create" + }, + "description": { + "$id": "589", + "kind": "string", + "type": { + "$ref": "119" + }, + "value": "Create a StandbyContainerGroupPools Resource" + } + } + }, + "origin": { + "$id": "590", + "kind": "string", + "type": { + "$ref": "2" + }, + "value": "user" + }, + "actionType": { + "$id": "591", + "kind": "string", + "type": { + "$ref": "10" + }, + "value": "Internal" + } + } + } + ] + }, + "nextLink": { + "$id": "592", + "kind": "string", + "type": { + "$ref": "133" + }, + "value": "https://example.com/providers/Microsoft.StandbyPool/operations" + } + } + } + } + ] + } + ] + } + ], + "parameters": [ + { + "$id": "593", + "name": "endpoint", + "nameInRequest": "endpoint", + "doc": "Service host", + "type": { + "$id": "594", + "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": "595", + "type": { + "$id": "596", + "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": "553" + } + }, + { + "$id": "597", + "kind": "client", + "name": "StandbyVirtualMachinePools", + "namespace": "Azure.ResourceManager.StandbyPool", + "operations": [ + { + "$id": "598", + "name": "get", + "resourceName": "StandbyVirtualMachinePoolResource", + "doc": "Get a StandbyVirtualMachinePoolResource", + "accessibility": "public", + "parameters": [ + { + "$id": "599", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "600", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "601", + "type": { + "$id": "602", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-03-01" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "603", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "604", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "605", + "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": "606", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "607", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "608", + "name": "standbyVirtualMachinePoolName", + "nameInRequest": "standbyVirtualMachinePoolName", + "doc": "Name of the standby virtual machine pool", + "type": { + "$id": "609", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "610", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "611", + "kind": "constant", + "valueType": { + "$id": "612", + "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": "613", + "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": "614", + "kind": "http", + "name": "StandbyVirtualMachinePools_Get", + "description": "StandbyVirtualMachinePools_Get", + "filePath": "2025-03-01/StandbyVirtualMachinePools_Get.json", + "parameters": [ + { + "$id": "615", + "parameter": { + "$ref": "599" + }, + "value": { + "$id": "616", + "kind": "string", + "type": { + "$ref": "600" + }, + "value": "2025-03-01" + } + }, + { + "$id": "617", + "parameter": { + "$ref": "603" + }, + "value": { + "$id": "618", + "kind": "string", + "type": { + "$ref": "604" + }, + "value": "00000000-0000-0000-0000-000000000009" + } + }, + { + "$id": "619", + "parameter": { + "$ref": "606" + }, + "value": { + "$id": "620", + "kind": "string", + "type": { + "$ref": "607" + }, + "value": "rgstandbypool" + } + }, + { + "$id": "621", + "parameter": { + "$ref": "608" + }, + "value": { + "$id": "622", + "kind": "string", + "type": { + "$ref": "609" + }, + "value": "pool" + } + } + ], + "responses": [ + { + "$id": "623", + "response": { + "$ref": "613" + }, + "statusCode": 200, + "bodyValue": { + "$id": "624", + "kind": "model", + "type": { + "$ref": "171" + }, + "value": { + "$id": "625", + "properties": { + "$id": "626", + "kind": "model", + "type": { + "$ref": "227" + }, + "value": { + "$id": "627", + "elasticityProfile": { + "$id": "628", + "kind": "model", + "type": { + "$ref": "229" + }, + "value": { + "$id": "629", + "maxReadyCapacity": { + "$id": "630", + "kind": "number", + "type": { + "$ref": "231" + }, + "value": 304 + }, + "minReadyCapacity": { + "$id": "631", + "kind": "number", + "type": { + "$ref": "235" + }, + "value": 300 + } + } + }, + "virtualMachineState": { + "$id": "632", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Running" + }, + "attachedVirtualMachineScaleSetId": { + "$id": "633", + "kind": "string", + "type": { + "$ref": "244" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000009/resourceGroups/rgstandbypool/providers/Microsoft.Compute/virtualMachineScaleSets/myVmss" + }, + "provisioningState": { + "$id": "634", + "kind": "string", + "type": { + "$ref": "22" + }, + "value": "Succeeded" + } + } + }, + "tags": { + "$id": "635", + "kind": "dict", + "type": { + "$ref": "217" + }, + "value": { + "$id": "636" + } + }, + "location": { + "$id": "637", + "kind": "string", + "type": { + "$ref": "223" + }, + "value": "West US" + }, + "id": { + "$id": "638", + "kind": "string", + "type": { + "$ref": "175" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000009/resourceGroups/rgstandbypool/providers/Microsoft.StandbyPool/standbyVirtualMachinePools/pool" + }, + "name": { + "$id": "639", + "kind": "string", + "type": { + "$ref": "180" + }, + "value": "pool" + }, + "type": { + "$id": "640", + "kind": "string", + "type": { + "$ref": "184" + }, + "value": "Microsoft.StandbyPool/standbyVirtualMachinePools" + }, + "systemData": { + "$id": "641", + "kind": "model", + "type": { + "$ref": "189" + }, + "value": { + "$id": "642", + "createdBy": { + "$id": "643", + "kind": "string", + "type": { + "$ref": "191" + }, + "value": "pooluser@microsoft.com" + }, + "createdByType": { + "$id": "644", + "kind": "string", + "type": { + "$ref": "32" + }, + "value": "User" + }, + "createdAt": { + "$id": "645", + "kind": "string", + "type": { + "$ref": "198" + }, + "value": "2023-09-07T16:33:22.210Z" + }, + "lastModifiedBy": { + "$id": "646", + "kind": "string", + "type": { + "$ref": "203" + }, + "value": "pooluser@microsoft.com" + }, + "lastModifiedByType": { + "$id": "647", + "kind": "string", + "type": { + "$ref": "32" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "648", + "kind": "string", + "type": { + "$ref": "210" + }, + "value": "2023-09-07T16:33:22.210Z" + } + } + } + } + } + } + ] + } + ] + }, + { + "$id": "649", + "name": "createOrUpdate", + "resourceName": "StandbyVirtualMachinePoolResource", + "doc": "Create a StandbyVirtualMachinePoolResource", + "accessibility": "public", + "parameters": [ + { + "$id": "650", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "651", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "652", + "type": { + "$id": "653", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-03-01" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "654", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "655", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "656", + "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": "657", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "658", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "659", + "name": "standbyVirtualMachinePoolName", + "nameInRequest": "standbyVirtualMachinePoolName", + "doc": "Name of the standby virtual machine pool", + "type": { + "$id": "660", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "661", + "name": "contentType", + "nameInRequest": "Content-Type", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$id": "662", + "kind": "constant", + "valueType": { + "$id": "663", + "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": "664", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "665", + "kind": "constant", + "valueType": { + "$id": "666", + "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": "667", + "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": "668", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "171" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + }, + { + "$id": "669", + "statusCodes": [ + 201 + ], + "bodyType": { + "$ref": "171" + }, + "headers": [ + { + "$id": "670", + "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": "671", + "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": "672", + "finalStateVia": 0, + "finalResponse": { + "$id": "673", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "171" + } + } + }, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.StandbyPool.StandbyVirtualMachinePools.createOrUpdate", + "decorators": [ + { + "$id": "674", + "name": "Azure.Core.@useFinalStateVia", + "arguments": { + "$id": "675", + "finalState": "azure-async-operation" + } + } + ], + "examples": [ + { + "$id": "676", + "kind": "http", + "name": "StandbyVirtualMachinePools_CreateOrUpdate", + "description": "StandbyVirtualMachinePools_CreateOrUpdate", + "filePath": "2025-03-01/StandbyVirtualMachinePools_CreateOrUpdate.json", + "parameters": [ + { + "$id": "677", + "parameter": { + "$ref": "650" + }, + "value": { + "$id": "678", + "kind": "string", + "type": { + "$ref": "651" + }, + "value": "2025-03-01" + } + }, + { + "$id": "679", + "parameter": { + "$ref": "654" + }, + "value": { + "$id": "680", + "kind": "string", + "type": { + "$ref": "655" + }, + "value": "00000000-0000-0000-0000-000000000009" + } + }, + { + "$id": "681", + "parameter": { + "$ref": "657" + }, + "value": { + "$id": "682", + "kind": "string", + "type": { + "$ref": "658" + }, + "value": "rgstandbypool" + } + }, + { + "$id": "683", + "parameter": { + "$ref": "659" + }, + "value": { + "$id": "684", + "kind": "string", + "type": { + "$ref": "660" + }, + "value": "pool" + } + }, + { + "$id": "685", + "parameter": { + "$ref": "667" + }, + "value": { + "$id": "686", + "kind": "model", + "type": { + "$ref": "171" + }, + "value": { + "$id": "687", + "properties": { + "$id": "688", + "kind": "model", + "type": { + "$ref": "227" + }, + "value": { + "$id": "689", + "elasticityProfile": { + "$id": "690", + "kind": "model", + "type": { + "$ref": "229" + }, + "value": { + "$id": "691", + "maxReadyCapacity": { + "$id": "692", + "kind": "number", + "type": { + "$ref": "231" + }, + "value": 304 + }, + "minReadyCapacity": { + "$id": "693", + "kind": "number", + "type": { + "$ref": "235" + }, + "value": 300 + } + } + }, + "virtualMachineState": { + "$id": "694", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Running" + }, + "attachedVirtualMachineScaleSetId": { + "$id": "695", + "kind": "string", + "type": { + "$ref": "244" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000009/resourceGroups/rgstandbypool/providers/Microsoft.Compute/virtualMachineScaleSets/myVmss" + } + } + }, + "tags": { + "$id": "696", + "kind": "dict", + "type": { + "$ref": "217" + }, + "value": { + "$id": "697" + } + }, + "location": { + "$id": "698", + "kind": "string", + "type": { + "$ref": "223" + }, + "value": "West US" + } + } + } + } + ], + "responses": [ + { + "$id": "699", + "response": { + "$ref": "668" + }, + "statusCode": 200, + "bodyValue": { + "$id": "700", + "kind": "model", + "type": { + "$ref": "171" + }, + "value": { + "$id": "701", + "properties": { + "$id": "702", + "kind": "model", + "type": { + "$ref": "227" + }, + "value": { + "$id": "703", + "elasticityProfile": { + "$id": "704", + "kind": "model", + "type": { + "$ref": "229" + }, + "value": { + "$id": "705", + "maxReadyCapacity": { + "$id": "706", + "kind": "number", + "type": { + "$ref": "231" + }, + "value": 304 + }, + "minReadyCapacity": { + "$id": "707", + "kind": "number", + "type": { + "$ref": "235" + }, + "value": 300 + } + } + }, + "virtualMachineState": { + "$id": "708", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Running" + }, + "attachedVirtualMachineScaleSetId": { + "$id": "709", + "kind": "string", + "type": { + "$ref": "244" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000009/resourceGroups/rgstandbypool/providers/Microsoft.Compute/virtualMachineScaleSets/myVmss" + }, + "provisioningState": { + "$id": "710", + "kind": "string", + "type": { + "$ref": "22" + }, + "value": "Succeeded" + } + } + }, + "tags": { + "$id": "711", + "kind": "dict", + "type": { + "$ref": "217" + }, + "value": { + "$id": "712" + } + }, + "location": { + "$id": "713", + "kind": "string", + "type": { + "$ref": "223" + }, + "value": "West US" + }, + "id": { + "$id": "714", + "kind": "string", + "type": { + "$ref": "175" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000009/resourceGroups/rgstandbypool/providers/Microsoft.StandbyPool/standbyVirtualMachinePools/pool" + }, + "name": { + "$id": "715", + "kind": "string", + "type": { + "$ref": "180" + }, + "value": "pool" + }, + "type": { + "$id": "716", + "kind": "string", + "type": { + "$ref": "184" + }, + "value": "Microsoft.StandbyPool/standbyVirtualMachinePools" + }, + "systemData": { + "$id": "717", + "kind": "model", + "type": { + "$ref": "189" + }, + "value": { + "$id": "718", + "createdBy": { + "$id": "719", + "kind": "string", + "type": { + "$ref": "191" + }, + "value": "pooluser@microsoft.com" + }, + "createdByType": { + "$id": "720", + "kind": "string", + "type": { + "$ref": "32" + }, + "value": "User" + }, + "createdAt": { + "$id": "721", + "kind": "string", + "type": { + "$ref": "198" + }, + "value": "2023-09-07T16:33:22.210Z" + }, + "lastModifiedBy": { + "$id": "722", + "kind": "string", + "type": { + "$ref": "203" + }, + "value": "pooluser@microsoft.com" + }, + "lastModifiedByType": { + "$id": "723", + "kind": "string", + "type": { + "$ref": "32" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "724", + "kind": "string", + "type": { + "$ref": "210" + }, + "value": "2023-09-07T16:33:22.210Z" + } + } + } + } + } + }, + { + "$id": "725", + "response": { + "$ref": "669" + }, + "statusCode": 201, + "bodyValue": { + "$id": "726", + "kind": "model", + "type": { + "$ref": "171" + }, + "value": { + "$id": "727", + "properties": { + "$id": "728", + "kind": "model", + "type": { + "$ref": "227" + }, + "value": { + "$id": "729", + "elasticityProfile": { + "$id": "730", + "kind": "model", + "type": { + "$ref": "229" + }, + "value": { + "$id": "731", + "maxReadyCapacity": { + "$id": "732", + "kind": "number", + "type": { + "$ref": "231" + }, + "value": 304 + }, + "minReadyCapacity": { + "$id": "733", + "kind": "number", + "type": { + "$ref": "235" + }, + "value": 300 + } + } + }, + "virtualMachineState": { + "$id": "734", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Running" + }, + "attachedVirtualMachineScaleSetId": { + "$id": "735", + "kind": "string", + "type": { + "$ref": "244" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000009/resourceGroups/rgstandbypool/providers/Microsoft.Compute/virtualMachineScaleSets/myVmss" + }, + "provisioningState": { + "$id": "736", + "kind": "string", + "type": { + "$ref": "22" + }, + "value": "Succeeded" + } + } + }, + "tags": { + "$id": "737", + "kind": "dict", + "type": { + "$ref": "217" + }, + "value": { + "$id": "738" + } + }, + "location": { + "$id": "739", + "kind": "string", + "type": { + "$ref": "223" + }, + "value": "West US" + }, + "id": { + "$id": "740", + "kind": "string", + "type": { + "$ref": "175" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000009/resourceGroups/rgstandbypool/providers/Microsoft.StandbyPool/standbyVirtualMachinePools/pool" + }, + "name": { + "$id": "741", + "kind": "string", + "type": { + "$ref": "180" + }, + "value": "pool" + }, + "type": { + "$id": "742", + "kind": "string", + "type": { + "$ref": "184" + }, + "value": "Microsoft.StandbyPool/standbyVirtualMachinePools" + }, + "systemData": { + "$id": "743", + "kind": "model", + "type": { + "$ref": "189" + }, + "value": { + "$id": "744", + "createdBy": { + "$id": "745", + "kind": "string", + "type": { + "$ref": "191" + }, + "value": "pooluser@microsoft.com" + }, + "createdByType": { + "$id": "746", + "kind": "string", + "type": { + "$ref": "32" + }, + "value": "User" + }, + "createdAt": { + "$id": "747", + "kind": "string", + "type": { + "$ref": "198" + }, + "value": "2023-09-07T16:33:22.210Z" + }, + "lastModifiedBy": { + "$id": "748", + "kind": "string", + "type": { + "$ref": "203" + }, + "value": "pooluser@microsoft.com" + }, + "lastModifiedByType": { + "$id": "749", + "kind": "string", + "type": { + "$ref": "32" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "750", + "kind": "string", + "type": { + "$ref": "210" + }, + "value": "2023-09-07T16:33:22.210Z" + } + } + } + } + } + } + ] + } + ] + }, + { + "$id": "751", + "name": "delete", + "resourceName": "StandbyVirtualMachinePoolResource", + "doc": "Delete a StandbyVirtualMachinePoolResource", + "accessibility": "public", + "parameters": [ + { + "$id": "752", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "753", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "754", + "type": { + "$id": "755", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-03-01" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "756", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "757", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "758", + "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": "759", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "760", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "761", + "name": "standbyVirtualMachinePoolName", + "nameInRequest": "standbyVirtualMachinePoolName", + "doc": "Name of the standby virtual machine pool", + "type": { + "$id": "762", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "763", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "764", + "kind": "constant", + "valueType": { + "$id": "765", + "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": "766", + "statusCodes": [ + 202 + ], + "headers": [ + { + "$id": "767", + "name": "location", + "nameInResponse": "Location", + "doc": "The Location header contains the URL where the status of the long running operation can be checked.", + "type": { + "$id": "768", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + { + "$id": "769", + "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": "770", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + } + } + ], + "isErrorResponse": false + }, + { + "$id": "771", + "statusCodes": [ + 204 + ], + "headers": [], + "isErrorResponse": false + } + ], + "httpMethod": "DELETE", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StandbyPool/standbyVirtualMachinePools/{standbyVirtualMachinePoolName}", + "bufferResponse": true, + "longRunning": { + "$id": "772", + "finalStateVia": 1, + "finalResponse": { + "$id": "773", + "statusCodes": [ + 204 + ] + } + }, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.StandbyPool.StandbyVirtualMachinePools.delete", + "decorators": [], + "examples": [ + { + "$id": "774", + "kind": "http", + "name": "StandbyVirtualMachinePools_Delete", + "description": "StandbyVirtualMachinePools_Delete", + "filePath": "2025-03-01/StandbyVirtualMachinePools_Delete.json", + "parameters": [ + { + "$id": "775", + "parameter": { + "$ref": "752" + }, + "value": { + "$id": "776", + "kind": "string", + "type": { + "$ref": "753" + }, + "value": "2025-03-01" + } + }, + { + "$id": "777", + "parameter": { + "$ref": "756" + }, + "value": { + "$id": "778", + "kind": "string", + "type": { + "$ref": "757" + }, + "value": "00000000-0000-0000-0000-000000000009" + } + }, + { + "$id": "779", + "parameter": { + "$ref": "759" + }, + "value": { + "$id": "780", + "kind": "string", + "type": { + "$ref": "760" + }, + "value": "rgstandbypool" + } + }, + { + "$id": "781", + "parameter": { + "$ref": "761" + }, + "value": { + "$id": "782", + "kind": "string", + "type": { + "$ref": "762" + }, + "value": "pool" + } + } + ], + "responses": [ + { + "$id": "783", + "response": { + "$ref": "766" + }, + "statusCode": 202 + }, + { + "$id": "784", + "response": { + "$ref": "771" + }, + "statusCode": 204 + } + ] + } + ] + }, + { + "$id": "785", + "name": "update", + "resourceName": "StandbyVirtualMachinePoolResource", + "doc": "Update a StandbyVirtualMachinePoolResource", + "accessibility": "public", + "parameters": [ + { + "$id": "786", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "787", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "788", + "type": { + "$id": "789", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-03-01" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "790", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "791", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "792", + "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": "793", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "794", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "795", + "name": "standbyVirtualMachinePoolName", + "nameInRequest": "standbyVirtualMachinePoolName", + "doc": "Name of the standby virtual machine pool", + "type": { + "$id": "796", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "797", + "name": "contentType", + "nameInRequest": "Content-Type", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$id": "798", + "kind": "constant", + "valueType": { + "$id": "799", + "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": "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 + }, + { + "$id": "803", + "name": "properties", + "nameInRequest": "properties", + "doc": "The resource properties to be updated.", + "type": { + "$ref": "278" + }, + "location": "Body", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "804", + "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": "805", + "kind": "http", + "name": "StandbyVirtualMachinePools_Update", + "description": "StandbyVirtualMachinePools_Update", + "filePath": "2025-03-01/StandbyVirtualMachinePools_Update.json", + "parameters": [ + { + "$id": "806", + "parameter": { + "$ref": "786" + }, + "value": { + "$id": "807", + "kind": "string", + "type": { + "$ref": "787" + }, + "value": "2025-03-01" + } + }, + { + "$id": "808", + "parameter": { + "$ref": "790" + }, + "value": { + "$id": "809", + "kind": "string", + "type": { + "$ref": "791" + }, + "value": "00000000-0000-0000-0000-000000000009" + } + }, + { + "$id": "810", + "parameter": { + "$ref": "793" + }, + "value": { + "$id": "811", + "kind": "string", + "type": { + "$ref": "794" + }, + "value": "rgstandbypool" + } + }, + { + "$id": "812", + "parameter": { + "$ref": "795" + }, + "value": { + "$id": "813", + "kind": "string", + "type": { + "$ref": "796" + }, + "value": "pool" + } + }, + { + "$id": "814", + "parameter": { + "$ref": "803" + }, + "value": { + "$id": "815", + "kind": "model", + "type": { + "$ref": "278" + }, + "value": { + "$id": "816", + "tags": { + "$id": "817", + "kind": "dict", + "type": { + "$ref": "280" + }, + "value": { + "$id": "818" + } + }, + "properties": { + "$id": "819", + "kind": "model", + "type": { + "$ref": "286" + }, + "value": { + "$id": "820", + "elasticityProfile": { + "$id": "821", + "kind": "model", + "type": { + "$ref": "229" + }, + "value": { + "$id": "822", + "maxReadyCapacity": { + "$id": "823", + "kind": "number", + "type": { + "$ref": "231" + }, + "value": 304 + }, + "minReadyCapacity": { + "$id": "824", + "kind": "number", + "type": { + "$ref": "235" + }, + "value": 300 + } + } + }, + "virtualMachineState": { + "$id": "825", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Running" + }, + "attachedVirtualMachineScaleSetId": { + "$id": "826", + "kind": "string", + "type": { + "$ref": "294" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000009/resourceGroups/rgstandbypool/providers/Microsoft.Compute/virtualMachineScaleSets/myVmss" + } + } + } + } + } + } + ], + "responses": [ + { + "$id": "827", + "response": { + "$ref": "804" + }, + "statusCode": 200, + "bodyValue": { + "$id": "828", + "kind": "model", + "type": { + "$ref": "171" + }, + "value": { + "$id": "829", + "properties": { + "$id": "830", + "kind": "model", + "type": { + "$ref": "227" + }, + "value": { + "$id": "831", + "elasticityProfile": { + "$id": "832", + "kind": "model", + "type": { + "$ref": "229" + }, + "value": { + "$id": "833", + "maxReadyCapacity": { + "$id": "834", + "kind": "number", + "type": { + "$ref": "231" + }, + "value": 304 + }, + "minReadyCapacity": { + "$id": "835", + "kind": "number", + "type": { + "$ref": "235" + }, + "value": 300 + } + } + }, + "virtualMachineState": { + "$id": "836", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Running" + }, + "attachedVirtualMachineScaleSetId": { + "$id": "837", + "kind": "string", + "type": { + "$ref": "244" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000009/resourceGroups/rgstandbypool/providers/Microsoft.Compute/virtualMachineScaleSets/myVmss" + }, + "provisioningState": { + "$id": "838", + "kind": "string", + "type": { + "$ref": "22" + }, + "value": "Succeeded" + } + } + }, + "tags": { + "$id": "839", + "kind": "dict", + "type": { + "$ref": "217" + }, + "value": { + "$id": "840" + } + }, + "location": { + "$id": "841", + "kind": "string", + "type": { + "$ref": "223" + }, + "value": "West US" + }, + "id": { + "$id": "842", + "kind": "string", + "type": { + "$ref": "175" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000009/resourceGroups/rgstandbypool/providers/Microsoft.StandbyPool/standbyVirtualMachinePools/pool" + }, + "name": { + "$id": "843", + "kind": "string", + "type": { + "$ref": "180" + }, + "value": "pool" + }, + "type": { + "$id": "844", + "kind": "string", + "type": { + "$ref": "184" + }, + "value": "Microsoft.StandbyPool/standbyVirtualMachinePools" + }, + "systemData": { + "$id": "845", + "kind": "model", + "type": { + "$ref": "189" + }, + "value": { + "$id": "846", + "createdBy": { + "$id": "847", + "kind": "string", + "type": { + "$ref": "191" + }, + "value": "pooluser@microsoft.com" + }, + "createdByType": { + "$id": "848", + "kind": "string", + "type": { + "$ref": "32" + }, + "value": "User" + }, + "createdAt": { + "$id": "849", + "kind": "string", + "type": { + "$ref": "198" + }, + "value": "2023-09-07T16:33:22.210Z" + }, + "lastModifiedBy": { + "$id": "850", + "kind": "string", + "type": { + "$ref": "203" + }, + "value": "pooluser@microsoft.com" + }, + "lastModifiedByType": { + "$id": "851", + "kind": "string", + "type": { + "$ref": "32" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "852", + "kind": "string", + "type": { + "$ref": "210" + }, + "value": "2023-09-07T16:33:22.210Z" + } + } + } + } + } + } + ] + } + ] + }, + { + "$id": "853", + "name": "listByResourceGroup", + "resourceName": "StandbyVirtualMachinePoolResource", + "doc": "List StandbyVirtualMachinePoolResource resources by resource group", + "accessibility": "public", + "parameters": [ + { + "$id": "854", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "855", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "856", + "type": { + "$id": "857", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-03-01" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "858", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "859", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "860", + "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": "861", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "862", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "863", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "864", + "kind": "constant", + "valueType": { + "$id": "865", + "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": "866", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "300" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "GET", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StandbyPool/standbyVirtualMachinePools", + "bufferResponse": true, + "paging": { + "$id": "867", + "itemPropertySegments": [ + "value" + ], + "nextLink": { + "$id": "868", + "responseSegments": [ + "nextLink" + ], + "responseLocation": "Body" + } + }, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.StandbyPool.StandbyVirtualMachinePools.listByResourceGroup", + "decorators": [], + "examples": [ + { + "$id": "869", + "kind": "http", + "name": "StandbyVirtualMachinePools_ListByResourceGroup", + "description": "StandbyVirtualMachinePools_ListByResourceGroup", + "filePath": "2025-03-01/StandbyVirtualMachinePools_ListByResourceGroup.json", + "parameters": [ + { + "$id": "870", + "parameter": { + "$ref": "854" + }, + "value": { + "$id": "871", + "kind": "string", + "type": { + "$ref": "855" + }, + "value": "2025-03-01" + } + }, + { + "$id": "872", + "parameter": { + "$ref": "858" + }, + "value": { + "$id": "873", + "kind": "string", + "type": { + "$ref": "859" + }, + "value": "00000000-0000-0000-0000-000000000009" + } + }, + { + "$id": "874", + "parameter": { + "$ref": "861" + }, + "value": { + "$id": "875", + "kind": "string", + "type": { + "$ref": "862" + }, + "value": "rgstandbypool" + } + } + ], + "responses": [ + { + "$id": "876", + "response": { + "$ref": "866" + }, + "statusCode": 200, + "bodyValue": { + "$id": "877", + "kind": "model", + "type": { + "$ref": "300" + }, + "value": { + "$id": "878", + "value": { + "$id": "879", + "kind": "array", + "type": { + "$ref": "302" + }, + "value": [ + { + "$id": "880", + "kind": "model", + "type": { + "$ref": "171" + }, + "value": { + "$id": "881", + "properties": { + "$id": "882", + "kind": "model", + "type": { + "$ref": "227" + }, + "value": { + "$id": "883", + "elasticityProfile": { + "$id": "884", + "kind": "model", + "type": { + "$ref": "229" + }, + "value": { + "$id": "885", + "maxReadyCapacity": { + "$id": "886", + "kind": "number", + "type": { + "$ref": "231" + }, + "value": 304 + }, + "minReadyCapacity": { + "$id": "887", + "kind": "number", + "type": { + "$ref": "235" + }, + "value": 300 + } + } + }, + "virtualMachineState": { + "$id": "888", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Running" + }, + "attachedVirtualMachineScaleSetId": { + "$id": "889", + "kind": "string", + "type": { + "$ref": "244" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000009/resourceGroups/rgstandbypool/providers/Microsoft.Compute/virtualMachineScaleSets/myVmss" + }, + "provisioningState": { + "$id": "890", + "kind": "string", + "type": { + "$ref": "22" + }, + "value": "Succeeded" + } + } + }, + "tags": { + "$id": "891", + "kind": "dict", + "type": { + "$ref": "217" + }, + "value": { + "$id": "892" + } + }, + "location": { + "$id": "893", + "kind": "string", + "type": { + "$ref": "223" + }, + "value": "West US" + }, + "id": { + "$id": "894", + "kind": "string", + "type": { + "$ref": "175" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000009/resourceGroups/rgstandbypool/providers/Microsoft.StandbyPool/standbyVirtualMachinePools/pool" + }, + "name": { + "$id": "895", + "kind": "string", + "type": { + "$ref": "180" + }, + "value": "pool" + }, + "type": { + "$id": "896", + "kind": "string", + "type": { + "$ref": "184" + }, + "value": "Microsoft.StandbyPool/standbyVirtualMachinePools" + }, + "systemData": { + "$id": "897", + "kind": "model", + "type": { + "$ref": "189" + }, + "value": { + "$id": "898", + "createdBy": { + "$id": "899", + "kind": "string", + "type": { + "$ref": "191" + }, + "value": "pooluser@microsoft.com" + }, + "createdByType": { + "$id": "900", + "kind": "string", + "type": { + "$ref": "32" + }, + "value": "User" + }, + "createdAt": { + "$id": "901", + "kind": "string", + "type": { + "$ref": "198" + }, + "value": "2023-09-07T16:33:22.210Z" + }, + "lastModifiedBy": { + "$id": "902", + "kind": "string", + "type": { + "$ref": "203" + }, + "value": "pooluser@microsoft.com" + }, + "lastModifiedByType": { + "$id": "903", + "kind": "string", + "type": { + "$ref": "32" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "904", + "kind": "string", + "type": { + "$ref": "210" + }, + "value": "2023-09-07T16:33:22.210Z" + } + } + } + } + } + ] + }, + "nextLink": { + "$id": "905", + "kind": "string", + "type": { + "$ref": "306" + }, + "value": "https://example.com/subscriptions/00000000-0000-0000-0000-000000000009/resourceGroups/rgstandbypool/providers/Microsoft.StandbyPool/standbyVirtualMachinePools" + } + } + } + } + ] + } + ] + }, + { + "$id": "906", + "name": "listBySubscription", + "resourceName": "StandbyVirtualMachinePoolResource", + "doc": "List StandbyVirtualMachinePoolResource resources by subscription ID", + "accessibility": "public", + "parameters": [ + { + "$id": "907", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "908", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "909", + "type": { + "$id": "910", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-03-01" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "911", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "912", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "913", + "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": "914", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "915", + "kind": "constant", + "valueType": { + "$id": "916", + "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": "917", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "300" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "GET", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/providers/Microsoft.StandbyPool/standbyVirtualMachinePools", + "bufferResponse": true, + "paging": { + "$id": "918", + "itemPropertySegments": [ + "value" + ], + "nextLink": { + "$id": "919", + "responseSegments": [ + "nextLink" + ], + "responseLocation": "Body" + } + }, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.StandbyPool.StandbyVirtualMachinePools.listBySubscription", + "decorators": [], + "examples": [ + { + "$id": "920", + "kind": "http", + "name": "StandbyVirtualMachinePools_ListBySubscription", + "description": "StandbyVirtualMachinePools_ListBySubscription", + "filePath": "2025-03-01/StandbyVirtualMachinePools_ListBySubscription.json", + "parameters": [ + { + "$id": "921", + "parameter": { + "$ref": "907" + }, + "value": { + "$id": "922", + "kind": "string", + "type": { + "$ref": "908" + }, + "value": "2025-03-01" + } + }, + { + "$id": "923", + "parameter": { + "$ref": "911" + }, + "value": { + "$id": "924", + "kind": "string", + "type": { + "$ref": "912" + }, + "value": "00000000-0000-0000-0000-000000000009" + } + } + ], + "responses": [ + { + "$id": "925", + "response": { + "$ref": "917" + }, + "statusCode": 200, + "bodyValue": { + "$id": "926", + "kind": "model", + "type": { + "$ref": "300" + }, + "value": { + "$id": "927", + "value": { + "$id": "928", + "kind": "array", + "type": { + "$ref": "302" + }, + "value": [ + { + "$id": "929", + "kind": "model", + "type": { + "$ref": "171" + }, + "value": { + "$id": "930", + "properties": { + "$id": "931", + "kind": "model", + "type": { + "$ref": "227" + }, + "value": { + "$id": "932", + "elasticityProfile": { + "$id": "933", + "kind": "model", + "type": { + "$ref": "229" + }, + "value": { + "$id": "934", + "maxReadyCapacity": { + "$id": "935", + "kind": "number", + "type": { + "$ref": "231" + }, + "value": 304 + }, + "minReadyCapacity": { + "$id": "936", + "kind": "number", + "type": { + "$ref": "235" + }, + "value": 300 + } + } + }, + "virtualMachineState": { + "$id": "937", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Running" + }, + "attachedVirtualMachineScaleSetId": { + "$id": "938", + "kind": "string", + "type": { + "$ref": "244" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000009/resourceGroups/rgstandbypool/providers/Microsoft.Compute/virtualMachineScaleSets/myVmss" + }, + "provisioningState": { + "$id": "939", + "kind": "string", + "type": { + "$ref": "22" + }, + "value": "Succeeded" + } + } + }, + "tags": { + "$id": "940", + "kind": "dict", + "type": { + "$ref": "217" + }, + "value": { + "$id": "941" + } + }, + "location": { + "$id": "942", + "kind": "string", + "type": { + "$ref": "223" + }, + "value": "West US" + }, + "id": { + "$id": "943", + "kind": "string", + "type": { + "$ref": "175" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000009/resourceGroups/rgstandbypool/providers/Microsoft.StandbyPool/standbyVirtualMachinePools/pool" + }, + "name": { + "$id": "944", + "kind": "string", + "type": { + "$ref": "180" + }, + "value": "pool" + }, + "type": { + "$id": "945", + "kind": "string", + "type": { + "$ref": "184" + }, + "value": "Microsoft.StandbyPool/standbyVirtualMachinePools" + }, + "systemData": { + "$id": "946", + "kind": "model", + "type": { + "$ref": "189" + }, + "value": { + "$id": "947", + "createdBy": { + "$id": "948", + "kind": "string", + "type": { + "$ref": "191" + }, + "value": "pooluser@microsoft.com" + }, + "createdByType": { + "$id": "949", + "kind": "string", + "type": { + "$ref": "32" + }, + "value": "User" + }, + "createdAt": { + "$id": "950", + "kind": "string", + "type": { + "$ref": "198" + }, + "value": "2023-09-07T16:33:22.210Z" + }, + "lastModifiedBy": { + "$id": "951", + "kind": "string", + "type": { + "$ref": "203" + }, + "value": "pooluser@microsoft.com" + }, + "lastModifiedByType": { + "$id": "952", + "kind": "string", + "type": { + "$ref": "32" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "953", + "kind": "string", + "type": { + "$ref": "210" + }, + "value": "2023-09-07T16:33:22.210Z" + } + } + } + } + } + ] + }, + "nextLink": { + "$id": "954", + "kind": "string", + "type": { + "$ref": "306" + }, + "value": "https://example.com/subscriptions/00000000-0000-0000-0000-000000000009/resourceGroups/rgstandbypool/providers/Microsoft.StandbyPool/standbyVirtualMachinePools" + } + } + } + } + ] + } + ] + } + ], + "parameters": [ + { + "$id": "955", + "name": "endpoint", + "nameInRequest": "endpoint", + "doc": "Service host", + "type": { + "$id": "956", + "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": "957", + "type": { + "$id": "958", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "https://management.azure.com" + } + } + ], + "decorators": [ + { + "$id": "959", + "name": "Azure.ResourceManager.@armResourceOperations", + "arguments": { + "$id": "960" + } + } + ], + "crossLanguageDefinitionId": "Microsoft.StandbyPool.StandbyVirtualMachinePools", + "apiVersions": [ + "2023-12-01-preview", + "2024-03-01-preview", + "2024-03-01", + "2025-03-01" + ], + "parent": { + "$ref": "553" + } + }, + { + "$id": "961", + "kind": "client", + "name": "StandbyVirtualMachines", + "namespace": "Azure.ResourceManager.StandbyPool", + "operations": [ + { + "$id": "962", + "name": "get", + "resourceName": "StandbyVirtualMachineResource", + "doc": "Get a StandbyVirtualMachineResource", + "accessibility": "public", + "parameters": [ + { + "$id": "963", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "964", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "965", + "type": { + "$id": "966", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-03-01" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "967", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "968", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "969", + "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": "970", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "971", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "972", + "name": "standbyVirtualMachinePoolName", + "nameInRequest": "standbyVirtualMachinePoolName", + "doc": "Name of the standby virtual machine pool", + "type": { + "$id": "973", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "974", + "name": "standbyVirtualMachineName", + "nameInRequest": "standbyVirtualMachineName", + "doc": "Name of the standby virtual machine", + "type": { + "$id": "975", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "976", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "977", + "kind": "constant", + "valueType": { + "$id": "978", + "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": "979", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "310" + }, + "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": "980", + "kind": "http", + "name": "StandbyVirtualMachines_Get", + "description": "StandbyVirtualMachines_Get", + "filePath": "2025-03-01/StandbyVirtualMachines_Get.json", + "parameters": [ + { + "$id": "981", + "parameter": { + "$ref": "963" + }, + "value": { + "$id": "982", + "kind": "string", + "type": { + "$ref": "964" + }, + "value": "2025-03-01" + } + }, + { + "$id": "983", + "parameter": { + "$ref": "967" + }, + "value": { + "$id": "984", + "kind": "string", + "type": { + "$ref": "968" + }, + "value": "00000000-0000-0000-0000-000000000009" + } + }, + { + "$id": "985", + "parameter": { + "$ref": "970" + }, + "value": { + "$id": "986", + "kind": "string", + "type": { + "$ref": "971" + }, + "value": "rgstandbypool" + } + }, + { + "$id": "987", + "parameter": { + "$ref": "972" + }, + "value": { + "$id": "988", + "kind": "string", + "type": { + "$ref": "973" + }, + "value": "pool" + } + }, + { + "$id": "989", + "parameter": { + "$ref": "974" + }, + "value": { + "$id": "990", + "kind": "string", + "type": { + "$ref": "975" + }, + "value": "virtualMachine" + } + } + ], + "responses": [ + { + "$id": "991", + "response": { + "$ref": "979" + }, + "statusCode": 200, + "bodyValue": { + "$id": "992", + "kind": "model", + "type": { + "$ref": "310" + }, + "value": { + "$id": "993", + "properties": { + "$id": "994", + "kind": "model", + "type": { + "$ref": "313" + }, + "value": { + "$id": "995", + "virtualMachineResourceId": { + "$id": "996", + "kind": "string", + "type": { + "$ref": "315" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000009/resourceGroups/rgstandbypool/providers/Microsoft.Compute/virtualMachines/virtualMachine" + }, + "provisioningState": { + "$id": "997", + "kind": "string", + "type": { + "$ref": "22" + }, + "value": "Succeeded" + } + } + }, + "id": { + "$id": "998", + "kind": "string", + "type": { + "$ref": "175" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000009/resourceGroups/rgstandbypool/providers/Microsoft.StandbyPool/standbyVirtualMachinePools/pool/standbyVirtualMachines/virtualMachine" + }, + "name": { + "$id": "999", + "kind": "string", + "type": { + "$ref": "180" + }, + "value": "pool" + }, + "type": { + "$id": "1000", + "kind": "string", + "type": { + "$ref": "184" + }, + "value": "Microsoft.StandbyPool/standbyVirtualMachinePools/virtualMachines" + }, + "systemData": { + "$id": "1001", + "kind": "model", + "type": { + "$ref": "189" + }, + "value": { + "$id": "1002", + "createdBy": { + "$id": "1003", + "kind": "string", + "type": { + "$ref": "191" + }, + "value": "pooluser@microsoft.com" + }, + "createdByType": { + "$id": "1004", + "kind": "string", + "type": { + "$ref": "32" + }, + "value": "User" + }, + "createdAt": { + "$id": "1005", + "kind": "string", + "type": { + "$ref": "198" + }, + "value": "2023-09-07T16:33:22.210Z" + }, + "lastModifiedBy": { + "$id": "1006", + "kind": "string", + "type": { + "$ref": "203" + }, + "value": "pooluser@microsoft.com" + }, + "lastModifiedByType": { + "$id": "1007", + "kind": "string", + "type": { + "$ref": "32" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "1008", + "kind": "string", + "type": { + "$ref": "210" + }, + "value": "2023-09-07T16:33:22.210Z" + } + } + } + } + } + } + ] + } + ] + }, + { + "$id": "1009", + "name": "listByStandbyVirtualMachinePoolResource", + "resourceName": "StandbyVirtualMachineResource", + "doc": "List StandbyVirtualMachineResource resources by StandbyVirtualMachinePoolResource", + "accessibility": "public", + "parameters": [ + { + "$id": "1010", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "1011", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "1012", + "type": { + "$id": "1013", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-03-01" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1014", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "1015", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "1016", + "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": "1017", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "1018", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1019", + "name": "standbyVirtualMachinePoolName", + "nameInRequest": "standbyVirtualMachinePoolName", + "doc": "Name of the standby virtual machine pool", + "type": { + "$id": "1020", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1021", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "1022", + "kind": "constant", + "valueType": { + "$id": "1023", + "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": "1024", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "324" + }, + "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": "1025", + "itemPropertySegments": [ + "value" + ], + "nextLink": { + "$id": "1026", + "responseSegments": [ + "nextLink" + ], + "responseLocation": "Body" + } + }, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.StandbyPool.StandbyVirtualMachines.listByStandbyVirtualMachinePoolResource", + "decorators": [], + "examples": [ + { + "$id": "1027", + "kind": "http", + "name": "StandbyVirtualMachines_ListByStandbyVirtualMachinePoolResource", + "description": "StandbyVirtualMachines_ListByStandbyVirtualMachinePoolResource", + "filePath": "2025-03-01/StandbyVirtualMachines_ListByStandbyVirtualMachinePoolResource.json", + "parameters": [ + { + "$id": "1028", + "parameter": { + "$ref": "1010" + }, + "value": { + "$id": "1029", + "kind": "string", + "type": { + "$ref": "1011" + }, + "value": "2025-03-01" + } + }, + { + "$id": "1030", + "parameter": { + "$ref": "1014" + }, + "value": { + "$id": "1031", + "kind": "string", + "type": { + "$ref": "1015" + }, + "value": "00000000-0000-0000-0000-000000000009" + } + }, + { + "$id": "1032", + "parameter": { + "$ref": "1017" + }, + "value": { + "$id": "1033", + "kind": "string", + "type": { + "$ref": "1018" + }, + "value": "rgstandbypool" + } + }, + { + "$id": "1034", + "parameter": { + "$ref": "1019" + }, + "value": { + "$id": "1035", + "kind": "string", + "type": { + "$ref": "1020" + }, + "value": "pool" + } + } + ], + "responses": [ + { + "$id": "1036", + "response": { + "$ref": "1024" + }, + "statusCode": 200, + "bodyValue": { + "$id": "1037", + "kind": "model", + "type": { + "$ref": "324" + }, + "value": { + "$id": "1038", + "value": { + "$id": "1039", + "kind": "array", + "type": { + "$ref": "326" + }, + "value": [ + { + "$id": "1040", + "kind": "model", + "type": { + "$ref": "310" + }, + "value": { + "$id": "1041", + "properties": { + "$id": "1042", + "kind": "model", + "type": { + "$ref": "313" + }, + "value": { + "$id": "1043", + "virtualMachineResourceId": { + "$id": "1044", + "kind": "string", + "type": { + "$ref": "315" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000009/resourceGroups/rgstandbypool/providers/Microsoft.Compute/virtualMachines/virtualMachine" + }, + "provisioningState": { + "$id": "1045", + "kind": "string", + "type": { + "$ref": "22" + }, + "value": "Succeeded" + } + } + }, + "id": { + "$id": "1046", + "kind": "string", + "type": { + "$ref": "175" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000009/resourceGroups/rgstandbypool/providers/Microsoft.StandbyPool/standbyVirtualMachinePools/pool/standbyVirtualMachines/virtualMachine" + }, + "name": { + "$id": "1047", + "kind": "string", + "type": { + "$ref": "180" + }, + "value": "pool" + }, + "type": { + "$id": "1048", + "kind": "string", + "type": { + "$ref": "184" + }, + "value": "Microsoft.StandbyPool/standbyVirtualMachinePools/virtualMachines" + }, + "systemData": { + "$id": "1049", + "kind": "model", + "type": { + "$ref": "189" + }, + "value": { + "$id": "1050", + "createdBy": { + "$id": "1051", + "kind": "string", + "type": { + "$ref": "191" + }, + "value": "pooluser@microsoft.com" + }, + "createdByType": { + "$id": "1052", + "kind": "string", + "type": { + "$ref": "32" + }, + "value": "User" + }, + "createdAt": { + "$id": "1053", + "kind": "string", + "type": { + "$ref": "198" + }, + "value": "2023-09-07T16:33:22.210Z" + }, + "lastModifiedBy": { + "$id": "1054", + "kind": "string", + "type": { + "$ref": "203" + }, + "value": "pooluser@microsoft.com" + }, + "lastModifiedByType": { + "$id": "1055", + "kind": "string", + "type": { + "$ref": "32" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "1056", + "kind": "string", + "type": { + "$ref": "210" + }, + "value": "2023-09-07T16:33:22.210Z" + } + } + } + } + } + ] + }, + "nextLink": { + "$id": "1057", + "kind": "string", + "type": { + "$ref": "330" + }, + "value": "https://microsoft.com/a" + } + } + } + } + ] + } + ] + } + ], + "parameters": [ + { + "$id": "1058", + "name": "endpoint", + "nameInRequest": "endpoint", + "doc": "Service host", + "type": { + "$id": "1059", + "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": "1060", + "type": { + "$id": "1061", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "https://management.azure.com" + } + } + ], + "decorators": [ + { + "$id": "1062", + "name": "Azure.ResourceManager.@armResourceOperations", + "arguments": { + "$id": "1063" + } + } + ], + "crossLanguageDefinitionId": "Microsoft.StandbyPool.StandbyVirtualMachines", + "apiVersions": [ + "2023-12-01-preview", + "2024-03-01-preview", + "2024-03-01", + "2025-03-01" + ], + "parent": { + "$ref": "553" + } + }, + { + "$id": "1064", + "kind": "client", + "name": "StandbyVirtualMachinePoolRuntimeViews", + "namespace": "Azure.ResourceManager.StandbyPool", + "operations": [ + { + "$id": "1065", + "name": "get", + "resourceName": "StandbyVirtualMachinePoolRuntimeViewResource", + "doc": "Get a StandbyVirtualMachinePoolRuntimeViewResource", + "accessibility": "public", + "parameters": [ + { + "$id": "1066", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "1067", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "1068", + "type": { + "$id": "1069", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-03-01" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1070", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "1071", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "1072", + "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": "1073", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "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": "standbyVirtualMachinePoolName", + "nameInRequest": "standbyVirtualMachinePoolName", + "doc": "Name of the standby virtual machine pool", + "type": { + "$id": "1076", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1077", + "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": "1078", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1079", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "1080", + "kind": "constant", + "valueType": { + "$id": "1081", + "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": "1082", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "334" + }, + "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": "1083", + "kind": "http", + "name": "StandbyVirtualMachinePoolRuntimeViews_Get", + "description": "StandbyVirtualMachinePoolRuntimeViews_Get", + "filePath": "2025-03-01/StandbyVirtualMachinePoolRuntimeViews_Get.json", + "parameters": [ + { + "$id": "1084", + "parameter": { + "$ref": "1066" + }, + "value": { + "$id": "1085", + "kind": "string", + "type": { + "$ref": "1067" + }, + "value": "2025-03-01" + } + }, + { + "$id": "1086", + "parameter": { + "$ref": "1070" + }, + "value": { + "$id": "1087", + "kind": "string", + "type": { + "$ref": "1071" + }, + "value": "00000000-0000-0000-0000-000000000009" + } + }, + { + "$id": "1088", + "parameter": { + "$ref": "1073" + }, + "value": { + "$id": "1089", + "kind": "string", + "type": { + "$ref": "1074" + }, + "value": "rgstandbypool" + } + }, + { + "$id": "1090", + "parameter": { + "$ref": "1075" + }, + "value": { + "$id": "1091", + "kind": "string", + "type": { + "$ref": "1076" + }, + "value": "pool" + } + }, + { + "$id": "1092", + "parameter": { + "$ref": "1077" + }, + "value": { + "$id": "1093", + "kind": "string", + "type": { + "$ref": "1078" + }, + "value": "latest" + } + } + ], + "responses": [ + { + "$id": "1094", + "response": { + "$ref": "1082" + }, + "statusCode": 200, + "bodyValue": { + "$id": "1095", + "kind": "model", + "type": { + "$ref": "334" + }, + "value": { + "$id": "1096", + "properties": { + "$id": "1097", + "kind": "model", + "type": { + "$ref": "336" + }, + "value": { + "$id": "1098", + "instanceCountSummary": { + "$id": "1099", + "kind": "array", + "type": { + "$ref": "338" + }, + "value": [ + { + "$id": "1100", + "kind": "model", + "type": { + "$ref": "339" + }, + "value": { + "$id": "1101", + "zone": { + "$id": "1102", + "kind": "number", + "type": { + "$ref": "341" + }, + "value": 1 + }, + "instanceCountsByState": { + "$id": "1103", + "kind": "array", + "type": { + "$ref": "345" + }, + "value": [ + { + "$id": "1104", + "kind": "model", + "type": { + "$ref": "346" + }, + "value": { + "$id": "1105", + "state": { + "$id": "1106", + "kind": "string", + "type": { + "$ref": "50" + }, + "value": "Creating" + }, + "count": { + "$id": "1107", + "kind": "number", + "type": { + "$ref": "351" + }, + "value": 100 + } + } + }, + { + "$id": "1108", + "kind": "model", + "type": { + "$ref": "346" + }, + "value": { + "$id": "1109", + "state": { + "$id": "1110", + "kind": "string", + "type": { + "$ref": "50" + }, + "value": "Running" + }, + "count": { + "$id": "1111", + "kind": "number", + "type": { + "$ref": "351" + }, + "value": 20 + } + } + }, + { + "$id": "1112", + "kind": "model", + "type": { + "$ref": "346" + }, + "value": { + "$id": "1113", + "state": { + "$id": "1114", + "kind": "string", + "type": { + "$ref": "50" + }, + "value": "Deallocating" + }, + "count": { + "$id": "1115", + "kind": "number", + "type": { + "$ref": "351" + }, + "value": 10 + } + } + }, + { + "$id": "1116", + "kind": "model", + "type": { + "$ref": "346" + }, + "value": { + "$id": "1117", + "state": { + "$id": "1118", + "kind": "string", + "type": { + "$ref": "50" + }, + "value": "Deallocated" + }, + "count": { + "$id": "1119", + "kind": "number", + "type": { + "$ref": "351" + }, + "value": 100 + } + } + }, + { + "$id": "1120", + "kind": "model", + "type": { + "$ref": "346" + }, + "value": { + "$id": "1121", + "state": { + "$id": "1122", + "kind": "string", + "type": { + "$ref": "50" + }, + "value": "Starting" + }, + "count": { + "$id": "1123", + "kind": "number", + "type": { + "$ref": "351" + }, + "value": 0 + } + } + }, + { + "$id": "1124", + "kind": "model", + "type": { + "$ref": "346" + }, + "value": { + "$id": "1125", + "state": { + "$id": "1126", + "kind": "string", + "type": { + "$ref": "50" + }, + "value": "Deleting" + }, + "count": { + "$id": "1127", + "kind": "number", + "type": { + "$ref": "351" + }, + "value": 0 + } + } + }, + { + "$id": "1128", + "kind": "model", + "type": { + "$ref": "346" + }, + "value": { + "$id": "1129", + "state": { + "$id": "1130", + "kind": "string", + "type": { + "$ref": "50" + }, + "value": "Hibernating" + }, + "count": { + "$id": "1131", + "kind": "number", + "type": { + "$ref": "351" + }, + "value": 0 + } + } + }, + { + "$id": "1132", + "kind": "model", + "type": { + "$ref": "346" + }, + "value": { + "$id": "1133", + "state": { + "$id": "1134", + "kind": "string", + "type": { + "$ref": "50" + }, + "value": "Hibernated" + }, + "count": { + "$id": "1135", + "kind": "number", + "type": { + "$ref": "351" + }, + "value": 0 + } + } + } + ] + } + } + }, + { + "$id": "1136", + "kind": "model", + "type": { + "$ref": "339" + }, + "value": { + "$id": "1137", + "zone": { + "$id": "1138", + "kind": "number", + "type": { + "$ref": "341" + }, + "value": 2 + }, + "instanceCountsByState": { + "$id": "1139", + "kind": "array", + "type": { + "$ref": "345" + }, + "value": [ + { + "$id": "1140", + "kind": "model", + "type": { + "$ref": "346" + }, + "value": { + "$id": "1141", + "state": { + "$id": "1142", + "kind": "string", + "type": { + "$ref": "50" + }, + "value": "Creating" + }, + "count": { + "$id": "1143", + "kind": "number", + "type": { + "$ref": "351" + }, + "value": 100 + } + } + }, + { + "$id": "1144", + "kind": "model", + "type": { + "$ref": "346" + }, + "value": { + "$id": "1145", + "state": { + "$id": "1146", + "kind": "string", + "type": { + "$ref": "50" + }, + "value": "Running" + }, + "count": { + "$id": "1147", + "kind": "number", + "type": { + "$ref": "351" + }, + "value": 20 + } + } + }, + { + "$id": "1148", + "kind": "model", + "type": { + "$ref": "346" + }, + "value": { + "$id": "1149", + "state": { + "$id": "1150", + "kind": "string", + "type": { + "$ref": "50" + }, + "value": "Deallocating" + }, + "count": { + "$id": "1151", + "kind": "number", + "type": { + "$ref": "351" + }, + "value": 10 + } + } + }, + { + "$id": "1152", + "kind": "model", + "type": { + "$ref": "346" + }, + "value": { + "$id": "1153", + "state": { + "$id": "1154", + "kind": "string", + "type": { + "$ref": "50" + }, + "value": "Deallocated" + }, + "count": { + "$id": "1155", + "kind": "number", + "type": { + "$ref": "351" + }, + "value": 100 + } + } + }, + { + "$id": "1156", + "kind": "model", + "type": { + "$ref": "346" + }, + "value": { + "$id": "1157", + "state": { + "$id": "1158", + "kind": "string", + "type": { + "$ref": "50" + }, + "value": "Starting" + }, + "count": { + "$id": "1159", + "kind": "number", + "type": { + "$ref": "351" + }, + "value": 0 + } + } + }, + { + "$id": "1160", + "kind": "model", + "type": { + "$ref": "346" + }, + "value": { + "$id": "1161", + "state": { + "$id": "1162", + "kind": "string", + "type": { + "$ref": "50" + }, + "value": "Deleting" + }, + "count": { + "$id": "1163", + "kind": "number", + "type": { + "$ref": "351" + }, + "value": 0 + } + } + }, + { + "$id": "1164", + "kind": "model", + "type": { + "$ref": "346" + }, + "value": { + "$id": "1165", + "state": { + "$id": "1166", + "kind": "string", + "type": { + "$ref": "50" + }, + "value": "Hibernating" + }, + "count": { + "$id": "1167", + "kind": "number", + "type": { + "$ref": "351" + }, + "value": 0 + } + } + }, + { + "$id": "1168", + "kind": "model", + "type": { + "$ref": "346" + }, + "value": { + "$id": "1169", + "state": { + "$id": "1170", + "kind": "string", + "type": { + "$ref": "50" + }, + "value": "Hibernated" + }, + "count": { + "$id": "1171", + "kind": "number", + "type": { + "$ref": "351" + }, + "value": 0 + } + } + } + ] + } + } + }, + { + "$id": "1172", + "kind": "model", + "type": { + "$ref": "339" + }, + "value": { + "$id": "1173", + "zone": { + "$id": "1174", + "kind": "number", + "type": { + "$ref": "341" + }, + "value": 3 + }, + "instanceCountsByState": { + "$id": "1175", + "kind": "array", + "type": { + "$ref": "345" + }, + "value": [ + { + "$id": "1176", + "kind": "model", + "type": { + "$ref": "346" + }, + "value": { + "$id": "1177", + "state": { + "$id": "1178", + "kind": "string", + "type": { + "$ref": "50" + }, + "value": "Creating" + }, + "count": { + "$id": "1179", + "kind": "number", + "type": { + "$ref": "351" + }, + "value": 100 + } + } + }, + { + "$id": "1180", + "kind": "model", + "type": { + "$ref": "346" + }, + "value": { + "$id": "1181", + "state": { + "$id": "1182", + "kind": "string", + "type": { + "$ref": "50" + }, + "value": "Running" + }, + "count": { + "$id": "1183", + "kind": "number", + "type": { + "$ref": "351" + }, + "value": 20 + } + } + }, + { + "$id": "1184", + "kind": "model", + "type": { + "$ref": "346" + }, + "value": { + "$id": "1185", + "state": { + "$id": "1186", + "kind": "string", + "type": { + "$ref": "50" + }, + "value": "Deallocating" + }, + "count": { + "$id": "1187", + "kind": "number", + "type": { + "$ref": "351" + }, + "value": 10 + } + } + }, + { + "$id": "1188", + "kind": "model", + "type": { + "$ref": "346" + }, + "value": { + "$id": "1189", + "state": { + "$id": "1190", + "kind": "string", + "type": { + "$ref": "50" + }, + "value": "Deallocated" + }, + "count": { + "$id": "1191", + "kind": "number", + "type": { + "$ref": "351" + }, + "value": 100 + } + } + }, + { + "$id": "1192", + "kind": "model", + "type": { + "$ref": "346" + }, + "value": { + "$id": "1193", + "state": { + "$id": "1194", + "kind": "string", + "type": { + "$ref": "50" + }, + "value": "Starting" + }, + "count": { + "$id": "1195", + "kind": "number", + "type": { + "$ref": "351" + }, + "value": 0 + } + } + }, + { + "$id": "1196", + "kind": "model", + "type": { + "$ref": "346" + }, + "value": { + "$id": "1197", + "state": { + "$id": "1198", + "kind": "string", + "type": { + "$ref": "50" + }, + "value": "Deleting" + }, + "count": { + "$id": "1199", + "kind": "number", + "type": { + "$ref": "351" + }, + "value": 0 + } + } + }, + { + "$id": "1200", + "kind": "model", + "type": { + "$ref": "346" + }, + "value": { + "$id": "1201", + "state": { + "$id": "1202", + "kind": "string", + "type": { + "$ref": "50" + }, + "value": "Hibernating" + }, + "count": { + "$id": "1203", + "kind": "number", + "type": { + "$ref": "351" + }, + "value": 0 + } + } + }, + { + "$id": "1204", + "kind": "model", + "type": { + "$ref": "346" + }, + "value": { + "$id": "1205", + "state": { + "$id": "1206", + "kind": "string", + "type": { + "$ref": "50" + }, + "value": "Hibernated" + }, + "count": { + "$id": "1207", + "kind": "number", + "type": { + "$ref": "351" + }, + "value": 0 + } + } + } + ] + } + } + } + ] + }, + "provisioningState": { + "$id": "1208", + "kind": "string", + "type": { + "$ref": "22" + }, + "value": "Succeeded" + }, + "status": { + "$id": "1209", + "kind": "model", + "type": { + "$ref": "359" + }, + "value": { + "$id": "1210", + "code": { + "$id": "1211", + "kind": "string", + "type": { + "$ref": "68" + }, + "value": "HealthState/healthy" + }, + "message": { + "$id": "1212", + "kind": "string", + "type": { + "$ref": "364" + }, + "value": "The pool is healthy." + } + } + }, + "prediction": { + "$id": "1213", + "kind": "model", + "type": { + "$ref": "373" + }, + "value": { + "$id": "1214", + "forecastValues": { + "$id": "1215", + "kind": "model", + "type": { + "$ref": "375" + }, + "value": { + "$id": "1216", + "instancesRequestedCount": { + "$id": "1217", + "kind": "array", + "type": { + "$ref": "377" + }, + "value": [ + { + "$id": "1218", + "kind": "number", + "type": { + "$ref": "378" + }, + "value": 24 + }, + { + "$id": "1219", + "kind": "number", + "type": { + "$ref": "378" + }, + "value": 10 + }, + { + "$id": "1220", + "kind": "number", + "type": { + "$ref": "378" + }, + "value": 200 + }, + { + "$id": "1221", + "kind": "number", + "type": { + "$ref": "378" + }, + "value": 12 + }, + { + "$id": "1222", + "kind": "number", + "type": { + "$ref": "378" + }, + "value": 5 + }, + { + "$id": "1223", + "kind": "number", + "type": { + "$ref": "378" + }, + "value": 10 + }, + { + "$id": "1224", + "kind": "number", + "type": { + "$ref": "378" + }, + "value": 15 + }, + { + "$id": "1225", + "kind": "number", + "type": { + "$ref": "378" + }, + "value": 23 + }, + { + "$id": "1226", + "kind": "number", + "type": { + "$ref": "378" + }, + "value": 56 + }, + { + "$id": "1227", + "kind": "number", + "type": { + "$ref": "378" + }, + "value": 38 + }, + { + "$id": "1228", + "kind": "number", + "type": { + "$ref": "378" + }, + "value": 12 + }, + { + "$id": "1229", + "kind": "number", + "type": { + "$ref": "378" + }, + "value": 19 + } + ] + } + } + }, + "forecastStartTime": { + "$id": "1230", + "kind": "string", + "type": { + "$ref": "384" + }, + "value": "2025-02-14T01:34:59.228Z" + }, + "forecastInfo": { + "$id": "1231", + "kind": "string", + "type": { + "$ref": "389" + }, + "value": "{\"forecastAccuracy\": 85, \"seriesUnitIntervalInMins\": 60, \"instancesRequestedCount_recentHistory\": \"[9, 4, 2, 8, 8, 2, 3, 6, 5, 3, 2, 6]\"}" + } + } + } + } + }, + "id": { + "$id": "1232", + "kind": "string", + "type": { + "$ref": "175" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000009/resourceGroups/rgstandbypool/providers/Microsoft.StandbyPool/standbyVirtualMachinePools/pool/runtimeViews/latest" + }, + "name": { + "$id": "1233", + "kind": "string", + "type": { + "$ref": "180" + }, + "value": "pool" + }, + "type": { + "$id": "1234", + "kind": "string", + "type": { + "$ref": "184" + }, + "value": "Microsoft.StandbyPool/standbyVirtualMachinePools/runtimeViews" + }, + "systemData": { + "$id": "1235", + "kind": "model", + "type": { + "$ref": "189" + }, + "value": { + "$id": "1236", + "createdBy": { + "$id": "1237", + "kind": "string", + "type": { + "$ref": "191" + }, + "value": "pooluser@microsoft.com" + }, + "createdByType": { + "$id": "1238", + "kind": "string", + "type": { + "$ref": "32" + }, + "value": "User" + }, + "createdAt": { + "$id": "1239", + "kind": "string", + "type": { + "$ref": "198" + }, + "value": "2024-02-14T23:31:59.679Z" + }, + "lastModifiedBy": { + "$id": "1240", + "kind": "string", + "type": { + "$ref": "203" + }, + "value": "pooluser@microsoft.com" + }, + "lastModifiedByType": { + "$id": "1241", + "kind": "string", + "type": { + "$ref": "32" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "1242", + "kind": "string", + "type": { + "$ref": "210" + }, + "value": "2024-02-14T23:31:59.679Z" + } + } + } + } + } + } + ] + } + ] + }, + { + "$id": "1243", + "name": "listByStandbyPool", + "resourceName": "StandbyVirtualMachinePoolRuntimeViewResource", + "doc": "List StandbyVirtualMachinePoolRuntimeViewResource resources by StandbyVirtualMachinePoolResource", + "accessibility": "public", + "parameters": [ + { + "$id": "1244", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "1245", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "1246", + "type": { + "$id": "1247", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-03-01" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1248", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "1249", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "1250", + "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": "1251", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "1252", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1253", + "name": "standbyVirtualMachinePoolName", + "nameInRequest": "standbyVirtualMachinePoolName", + "doc": "Name of the standby virtual machine pool", + "type": { + "$id": "1254", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1255", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "1256", + "kind": "constant", + "valueType": { + "$id": "1257", + "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": "1258", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "396" + }, + "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": "1259", + "itemPropertySegments": [ + "value" + ], + "nextLink": { + "$id": "1260", + "responseSegments": [ + "nextLink" + ], + "responseLocation": "Body" + } + }, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.StandbyPool.StandbyVirtualMachinePoolRuntimeViews.listByStandbyPool", + "decorators": [], + "examples": [ + { + "$id": "1261", + "kind": "http", + "name": "StandbyVirtualMachinePoolRuntimeViews_ListByStandbyPool", + "description": "StandbyVirtualMachinePoolRuntimeViews_ListByStandbyPool", + "filePath": "2025-03-01/StandbyVirtualMachinePoolRuntimeViews_ListByStandbyPool.json", + "parameters": [ + { + "$id": "1262", + "parameter": { + "$ref": "1244" + }, + "value": { + "$id": "1263", + "kind": "string", + "type": { + "$ref": "1245" + }, + "value": "2025-03-01" + } + }, + { + "$id": "1264", + "parameter": { + "$ref": "1248" + }, + "value": { + "$id": "1265", + "kind": "string", + "type": { + "$ref": "1249" + }, + "value": "00000000-0000-0000-0000-000000000009" + } + }, + { + "$id": "1266", + "parameter": { + "$ref": "1251" + }, + "value": { + "$id": "1267", + "kind": "string", + "type": { + "$ref": "1252" + }, + "value": "rgstandbypool" + } + }, + { + "$id": "1268", + "parameter": { + "$ref": "1253" + }, + "value": { + "$id": "1269", + "kind": "string", + "type": { + "$ref": "1254" + }, + "value": "pool" + } + } + ], + "responses": [ + { + "$id": "1270", + "response": { + "$ref": "1258" + }, + "statusCode": 200, + "bodyValue": { + "$id": "1271", + "kind": "model", + "type": { + "$ref": "396" + }, + "value": { + "$id": "1272", + "value": { + "$id": "1273", + "kind": "array", + "type": { + "$ref": "398" + }, + "value": [ + { + "$id": "1274", + "kind": "model", + "type": { + "$ref": "334" + }, + "value": { + "$id": "1275", + "properties": { + "$id": "1276", + "kind": "model", + "type": { + "$ref": "336" + }, + "value": { + "$id": "1277", + "instanceCountSummary": { + "$id": "1278", + "kind": "array", + "type": { + "$ref": "338" + }, + "value": [ + { + "$id": "1279", + "kind": "model", + "type": { + "$ref": "339" + }, + "value": { + "$id": "1280", + "zone": { + "$id": "1281", + "kind": "number", + "type": { + "$ref": "341" + }, + "value": 1 + }, + "instanceCountsByState": { + "$id": "1282", + "kind": "array", + "type": { + "$ref": "345" + }, + "value": [ + { + "$id": "1283", + "kind": "model", + "type": { + "$ref": "346" + }, + "value": { + "$id": "1284", + "state": { + "$id": "1285", + "kind": "string", + "type": { + "$ref": "50" + }, + "value": "Creating" + }, + "count": { + "$id": "1286", + "kind": "number", + "type": { + "$ref": "351" + }, + "value": 100 + } + } + }, + { + "$id": "1287", + "kind": "model", + "type": { + "$ref": "346" + }, + "value": { + "$id": "1288", + "state": { + "$id": "1289", + "kind": "string", + "type": { + "$ref": "50" + }, + "value": "Running" + }, + "count": { + "$id": "1290", + "kind": "number", + "type": { + "$ref": "351" + }, + "value": 20 + } + } + }, + { + "$id": "1291", + "kind": "model", + "type": { + "$ref": "346" + }, + "value": { + "$id": "1292", + "state": { + "$id": "1293", + "kind": "string", + "type": { + "$ref": "50" + }, + "value": "Deallocating" + }, + "count": { + "$id": "1294", + "kind": "number", + "type": { + "$ref": "351" + }, + "value": 10 + } + } + }, + { + "$id": "1295", + "kind": "model", + "type": { + "$ref": "346" + }, + "value": { + "$id": "1296", + "state": { + "$id": "1297", + "kind": "string", + "type": { + "$ref": "50" + }, + "value": "Deallocated" + }, + "count": { + "$id": "1298", + "kind": "number", + "type": { + "$ref": "351" + }, + "value": 100 + } + } + }, + { + "$id": "1299", + "kind": "model", + "type": { + "$ref": "346" + }, + "value": { + "$id": "1300", + "state": { + "$id": "1301", + "kind": "string", + "type": { + "$ref": "50" + }, + "value": "Starting" + }, + "count": { + "$id": "1302", + "kind": "number", + "type": { + "$ref": "351" + }, + "value": 0 + } + } + }, + { + "$id": "1303", + "kind": "model", + "type": { + "$ref": "346" + }, + "value": { + "$id": "1304", + "state": { + "$id": "1305", + "kind": "string", + "type": { + "$ref": "50" + }, + "value": "Deleting" + }, + "count": { + "$id": "1306", + "kind": "number", + "type": { + "$ref": "351" + }, + "value": 0 + } + } + }, + { + "$id": "1307", + "kind": "model", + "type": { + "$ref": "346" + }, + "value": { + "$id": "1308", + "state": { + "$id": "1309", + "kind": "string", + "type": { + "$ref": "50" + }, + "value": "Hibernating" + }, + "count": { + "$id": "1310", + "kind": "number", + "type": { + "$ref": "351" + }, + "value": 0 + } + } + }, + { + "$id": "1311", + "kind": "model", + "type": { + "$ref": "346" + }, + "value": { + "$id": "1312", + "state": { + "$id": "1313", + "kind": "string", + "type": { + "$ref": "50" + }, + "value": "Hibernated" + }, + "count": { + "$id": "1314", + "kind": "number", + "type": { + "$ref": "351" + }, + "value": 0 + } + } + } + ] + } + } + }, + { + "$id": "1315", + "kind": "model", + "type": { + "$ref": "339" + }, + "value": { + "$id": "1316", + "zone": { + "$id": "1317", + "kind": "number", + "type": { + "$ref": "341" + }, + "value": 2 + }, + "instanceCountsByState": { + "$id": "1318", + "kind": "array", + "type": { + "$ref": "345" + }, + "value": [ + { + "$id": "1319", + "kind": "model", + "type": { + "$ref": "346" + }, + "value": { + "$id": "1320", + "state": { + "$id": "1321", + "kind": "string", + "type": { + "$ref": "50" + }, + "value": "Creating" + }, + "count": { + "$id": "1322", + "kind": "number", + "type": { + "$ref": "351" + }, + "value": 100 + } + } + }, + { + "$id": "1323", + "kind": "model", + "type": { + "$ref": "346" + }, + "value": { + "$id": "1324", + "state": { + "$id": "1325", + "kind": "string", + "type": { + "$ref": "50" + }, + "value": "Running" + }, + "count": { + "$id": "1326", + "kind": "number", + "type": { + "$ref": "351" + }, + "value": 20 + } + } + }, + { + "$id": "1327", + "kind": "model", + "type": { + "$ref": "346" + }, + "value": { + "$id": "1328", + "state": { + "$id": "1329", + "kind": "string", + "type": { + "$ref": "50" + }, + "value": "Deallocating" + }, + "count": { + "$id": "1330", + "kind": "number", + "type": { + "$ref": "351" + }, + "value": 10 + } + } + }, + { + "$id": "1331", + "kind": "model", + "type": { + "$ref": "346" + }, + "value": { + "$id": "1332", + "state": { + "$id": "1333", + "kind": "string", + "type": { + "$ref": "50" + }, + "value": "Deallocated" + }, + "count": { + "$id": "1334", + "kind": "number", + "type": { + "$ref": "351" + }, + "value": 100 + } + } + }, + { + "$id": "1335", + "kind": "model", + "type": { + "$ref": "346" + }, + "value": { + "$id": "1336", + "state": { + "$id": "1337", + "kind": "string", + "type": { + "$ref": "50" + }, + "value": "Starting" + }, + "count": { + "$id": "1338", + "kind": "number", + "type": { + "$ref": "351" + }, + "value": 0 + } + } + }, + { + "$id": "1339", + "kind": "model", + "type": { + "$ref": "346" + }, + "value": { + "$id": "1340", + "state": { + "$id": "1341", + "kind": "string", + "type": { + "$ref": "50" + }, + "value": "Deleting" + }, + "count": { + "$id": "1342", + "kind": "number", + "type": { + "$ref": "351" + }, + "value": 0 + } + } + }, + { + "$id": "1343", + "kind": "model", + "type": { + "$ref": "346" + }, + "value": { + "$id": "1344", + "state": { + "$id": "1345", + "kind": "string", + "type": { + "$ref": "50" + }, + "value": "Hibernating" + }, + "count": { + "$id": "1346", + "kind": "number", + "type": { + "$ref": "351" + }, + "value": 0 + } + } + }, + { + "$id": "1347", + "kind": "model", + "type": { + "$ref": "346" + }, + "value": { + "$id": "1348", + "state": { + "$id": "1349", + "kind": "string", + "type": { + "$ref": "50" + }, + "value": "Hibernated" + }, + "count": { + "$id": "1350", + "kind": "number", + "type": { + "$ref": "351" + }, + "value": 0 + } + } + } + ] + } + } + }, + { + "$id": "1351", + "kind": "model", + "type": { + "$ref": "339" + }, + "value": { + "$id": "1352", + "zone": { + "$id": "1353", + "kind": "number", + "type": { + "$ref": "341" + }, + "value": 3 + }, + "instanceCountsByState": { + "$id": "1354", + "kind": "array", + "type": { + "$ref": "345" + }, + "value": [ + { + "$id": "1355", + "kind": "model", + "type": { + "$ref": "346" + }, + "value": { + "$id": "1356", + "state": { + "$id": "1357", + "kind": "string", + "type": { + "$ref": "50" + }, + "value": "Creating" + }, + "count": { + "$id": "1358", + "kind": "number", + "type": { + "$ref": "351" + }, + "value": 100 + } + } + }, + { + "$id": "1359", + "kind": "model", + "type": { + "$ref": "346" + }, + "value": { + "$id": "1360", + "state": { + "$id": "1361", + "kind": "string", + "type": { + "$ref": "50" + }, + "value": "Running" + }, + "count": { + "$id": "1362", + "kind": "number", + "type": { + "$ref": "351" + }, + "value": 20 + } + } + }, + { + "$id": "1363", + "kind": "model", + "type": { + "$ref": "346" + }, + "value": { + "$id": "1364", + "state": { + "$id": "1365", + "kind": "string", + "type": { + "$ref": "50" + }, + "value": "Deallocating" + }, + "count": { + "$id": "1366", + "kind": "number", + "type": { + "$ref": "351" + }, + "value": 10 + } + } + }, + { + "$id": "1367", + "kind": "model", + "type": { + "$ref": "346" + }, + "value": { + "$id": "1368", + "state": { + "$id": "1369", + "kind": "string", + "type": { + "$ref": "50" + }, + "value": "Deallocated" + }, + "count": { + "$id": "1370", + "kind": "number", + "type": { + "$ref": "351" + }, + "value": 100 + } + } + }, + { + "$id": "1371", + "kind": "model", + "type": { + "$ref": "346" + }, + "value": { + "$id": "1372", + "state": { + "$id": "1373", + "kind": "string", + "type": { + "$ref": "50" + }, + "value": "Starting" + }, + "count": { + "$id": "1374", + "kind": "number", + "type": { + "$ref": "351" + }, + "value": 0 + } + } + }, + { + "$id": "1375", + "kind": "model", + "type": { + "$ref": "346" + }, + "value": { + "$id": "1376", + "state": { + "$id": "1377", + "kind": "string", + "type": { + "$ref": "50" + }, + "value": "Deleting" + }, + "count": { + "$id": "1378", + "kind": "number", + "type": { + "$ref": "351" + }, + "value": 0 + } + } + }, + { + "$id": "1379", + "kind": "model", + "type": { + "$ref": "346" + }, + "value": { + "$id": "1380", + "state": { + "$id": "1381", + "kind": "string", + "type": { + "$ref": "50" + }, + "value": "Hibernating" + }, + "count": { + "$id": "1382", + "kind": "number", + "type": { + "$ref": "351" + }, + "value": 0 + } + } + }, + { + "$id": "1383", + "kind": "model", + "type": { + "$ref": "346" + }, + "value": { + "$id": "1384", + "state": { + "$id": "1385", + "kind": "string", + "type": { + "$ref": "50" + }, + "value": "Hibernated" + }, + "count": { + "$id": "1386", + "kind": "number", + "type": { + "$ref": "351" + }, + "value": 0 + } + } + } + ] + } + } + } + ] + }, + "provisioningState": { + "$id": "1387", + "kind": "string", + "type": { + "$ref": "22" + }, + "value": "Succeeded" + }, + "status": { + "$id": "1388", + "kind": "model", + "type": { + "$ref": "359" + }, + "value": { + "$id": "1389", + "code": { + "$id": "1390", + "kind": "string", + "type": { + "$ref": "68" + }, + "value": "HealthState/healthy" + }, + "message": { + "$id": "1391", + "kind": "string", + "type": { + "$ref": "364" + }, + "value": "The pool is healthy." + } + } + }, + "prediction": { + "$id": "1392", + "kind": "model", + "type": { + "$ref": "373" + }, + "value": { + "$id": "1393", + "forecastValues": { + "$id": "1394", + "kind": "model", + "type": { + "$ref": "375" + }, + "value": { + "$id": "1395", + "instancesRequestedCount": { + "$id": "1396", + "kind": "array", + "type": { + "$ref": "377" + }, + "value": [ + { + "$id": "1397", + "kind": "number", + "type": { + "$ref": "378" + }, + "value": 24 + }, + { + "$id": "1398", + "kind": "number", + "type": { + "$ref": "378" + }, + "value": 10 + }, + { + "$id": "1399", + "kind": "number", + "type": { + "$ref": "378" + }, + "value": 200 + }, + { + "$id": "1400", + "kind": "number", + "type": { + "$ref": "378" + }, + "value": 12 + }, + { + "$id": "1401", + "kind": "number", + "type": { + "$ref": "378" + }, + "value": 5 + }, + { + "$id": "1402", + "kind": "number", + "type": { + "$ref": "378" + }, + "value": 10 + }, + { + "$id": "1403", + "kind": "number", + "type": { + "$ref": "378" + }, + "value": 15 + }, + { + "$id": "1404", + "kind": "number", + "type": { + "$ref": "378" + }, + "value": 23 + }, + { + "$id": "1405", + "kind": "number", + "type": { + "$ref": "378" + }, + "value": 56 + }, + { + "$id": "1406", + "kind": "number", + "type": { + "$ref": "378" + }, + "value": 38 + }, + { + "$id": "1407", + "kind": "number", + "type": { + "$ref": "378" + }, + "value": 12 + }, + { + "$id": "1408", + "kind": "number", + "type": { + "$ref": "378" + }, + "value": 19 + } + ] + } + } + }, + "forecastStartTime": { + "$id": "1409", + "kind": "string", + "type": { + "$ref": "384" + }, + "value": "2025-02-14T01:34:59.228Z" + }, + "forecastInfo": { + "$id": "1410", + "kind": "string", + "type": { + "$ref": "389" + }, + "value": "{\"forecastAccuracy\": 85, \"seriesUnitIntervalInMins\": 60, \"instancesRequestedCount_recentHistory\": \"[9, 4, 2, 8, 8, 2, 3, 6, 5, 3, 2, 6]\"}" + } + } + } + } + }, + "id": { + "$id": "1411", + "kind": "string", + "type": { + "$ref": "175" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000009/resourceGroups/rgstandbypool/providers/Microsoft.StandbyPool/standbyVirtualMachinePools/pool/runtimeViews/latest" + }, + "name": { + "$id": "1412", + "kind": "string", + "type": { + "$ref": "180" + }, + "value": "pool" + }, + "type": { + "$id": "1413", + "kind": "string", + "type": { + "$ref": "184" + }, + "value": "Microsoft.StandbyPool/standbyVirtualMachinePools/runtimeViews" + }, + "systemData": { + "$id": "1414", + "kind": "model", + "type": { + "$ref": "189" + }, + "value": { + "$id": "1415", + "createdBy": { + "$id": "1416", + "kind": "string", + "type": { + "$ref": "191" + }, + "value": "pooluser@microsoft.com" + }, + "createdByType": { + "$id": "1417", + "kind": "string", + "type": { + "$ref": "32" + }, + "value": "User" + }, + "createdAt": { + "$id": "1418", + "kind": "string", + "type": { + "$ref": "198" + }, + "value": "2023-09-07T16:33:22.210Z" + }, + "lastModifiedBy": { + "$id": "1419", + "kind": "string", + "type": { + "$ref": "203" + }, + "value": "pooluser@microsoft.com" + }, + "lastModifiedByType": { + "$id": "1420", + "kind": "string", + "type": { + "$ref": "32" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "1421", + "kind": "string", + "type": { + "$ref": "210" + }, + "value": "2023-09-07T16:33:22.210Z" + } + } + } + } + } + ] + }, + "nextLink": { + "$id": "1422", + "kind": "string", + "type": { + "$ref": "402" + }, + "value": "https://microsoft.com/a" + } + } + } + } + ] + } + ] + } + ], + "parameters": [ + { + "$id": "1423", + "name": "endpoint", + "nameInRequest": "endpoint", + "doc": "Service host", + "type": { + "$id": "1424", + "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": "1425", + "type": { + "$id": "1426", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "https://management.azure.com" + } + } + ], + "decorators": [ + { + "$id": "1427", + "name": "Azure.ResourceManager.@armResourceOperations", + "arguments": { + "$id": "1428" + } + } + ], + "crossLanguageDefinitionId": "Microsoft.StandbyPool.StandbyVirtualMachinePoolRuntimeViews", + "apiVersions": [ + "2024-03-01-preview", + "2024-03-01", + "2025-03-01" + ], + "parent": { + "$ref": "553" + } + }, + { + "$id": "1429", + "kind": "client", + "name": "StandbyContainerGroupPools", + "namespace": "Azure.ResourceManager.StandbyPool", + "operations": [ + { + "$id": "1430", + "name": "get", + "resourceName": "StandbyContainerGroupPoolResource", + "doc": "Get a StandbyContainerGroupPoolResource", + "accessibility": "public", + "parameters": [ + { + "$id": "1431", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "1432", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "1433", + "type": { + "$id": "1434", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-03-01" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1435", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "1436", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "1437", + "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": "1438", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "1439", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1440", + "name": "standbyContainerGroupPoolName", + "nameInRequest": "standbyContainerGroupPoolName", + "doc": "Name of the standby container group pool", + "type": { + "$id": "1441", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1442", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "1443", + "kind": "constant", + "valueType": { + "$id": "1444", + "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": "1445", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "406" + }, + "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": "1446", + "kind": "http", + "name": "StandbyContainerGroupPools_Get", + "description": "StandbyContainerGroupPools_Get", + "filePath": "2025-03-01/StandbyContainerGroupPools_Get.json", + "parameters": [ + { + "$id": "1447", + "parameter": { + "$ref": "1431" + }, + "value": { + "$id": "1448", + "kind": "string", + "type": { + "$ref": "1432" + }, + "value": "2025-03-01" + } + }, + { + "$id": "1449", + "parameter": { + "$ref": "1435" + }, + "value": { + "$id": "1450", + "kind": "string", + "type": { + "$ref": "1436" + }, + "value": "00000000-0000-0000-0000-000000000009" + } + }, + { + "$id": "1451", + "parameter": { + "$ref": "1438" + }, + "value": { + "$id": "1452", + "kind": "string", + "type": { + "$ref": "1439" + }, + "value": "rgstandbypool" + } + }, + { + "$id": "1453", + "parameter": { + "$ref": "1440" + }, + "value": { + "$id": "1454", + "kind": "string", + "type": { + "$ref": "1441" + }, + "value": "pool" + } + } + ], + "responses": [ + { + "$id": "1455", + "response": { + "$ref": "1445" + }, + "statusCode": 200, + "bodyValue": { + "$id": "1456", + "kind": "model", + "type": { + "$ref": "406" + }, + "value": { + "$id": "1457", + "properties": { + "$id": "1458", + "kind": "model", + "type": { + "$ref": "408" + }, + "value": { + "$id": "1459", + "elasticityProfile": { + "$id": "1460", + "kind": "model", + "type": { + "$ref": "410" + }, + "value": { + "$id": "1461", + "maxReadyCapacity": { + "$id": "1462", + "kind": "number", + "type": { + "$ref": "412" + }, + "value": 688 + }, + "refillPolicy": { + "$id": "1463", + "kind": "string", + "type": { + "$ref": "74" + }, + "value": "always" + } + } + }, + "provisioningState": { + "$id": "1464", + "kind": "string", + "type": { + "$ref": "22" + }, + "value": "Succeeded" + }, + "containerGroupProperties": { + "$id": "1465", + "kind": "model", + "type": { + "$ref": "421" + }, + "value": { + "$id": "1466", + "containerGroupProfile": { + "$id": "1467", + "kind": "model", + "type": { + "$ref": "423" + }, + "value": { + "$id": "1468", + "id": { + "$id": "1469", + "kind": "string", + "type": { + "$ref": "425" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000009/resourceGroups/rgstandbypool/providers/Microsoft.ContainerInstance/containerGroupProfiles/cgProfile" + }, + "revision": { + "$id": "1470", + "kind": "number", + "type": { + "$ref": "430" + }, + "value": 1 + } + } + }, + "subnetIds": { + "$id": "1471", + "kind": "array", + "type": { + "$ref": "436" + }, + "value": [ + { + "$id": "1472", + "kind": "model", + "type": { + "$ref": "437" + }, + "value": { + "$id": "1473", + "id": { + "$id": "1474", + "kind": "string", + "type": { + "$ref": "439" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000009/resourceGroups/rgstandbypool/providers/Microsoft.Network/virtualNetworks/cgSubnet/subnets/cgSubnet" + } + } + } + ] + } + } + }, + "zones": { + "$id": "1475", + "kind": "array", + "type": { + "$ref": "448" + }, + "value": [ + { + "$id": "1476", + "kind": "string", + "type": { + "$ref": "449" + }, + "value": "1" + }, + { + "$id": "1477", + "kind": "string", + "type": { + "$ref": "449" + }, + "value": "2" + }, + { + "$id": "1478", + "kind": "string", + "type": { + "$ref": "449" + }, + "value": "3" + } + ] + } + } + }, + "tags": { + "$id": "1479", + "kind": "dict", + "type": { + "$ref": "217" + }, + "value": { + "$id": "1480" + } + }, + "location": { + "$id": "1481", + "kind": "string", + "type": { + "$ref": "223" + }, + "value": "West US" + }, + "id": { + "$id": "1482", + "kind": "string", + "type": { + "$ref": "175" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000009/resourceGroups/rgstandbypool/providers/Microsoft.StandbyPool/standbyContainerGroupPools/pool" + }, + "name": { + "$id": "1483", + "kind": "string", + "type": { + "$ref": "180" + }, + "value": "pool" + }, + "type": { + "$id": "1484", + "kind": "string", + "type": { + "$ref": "184" + }, + "value": "Microsoft.StandbyPool/standbyContainerGroupPools" + }, + "systemData": { + "$id": "1485", + "kind": "model", + "type": { + "$ref": "189" + }, + "value": { + "$id": "1486", + "createdBy": { + "$id": "1487", + "kind": "string", + "type": { + "$ref": "191" + }, + "value": "pooluser@microsoft.com" + }, + "createdByType": { + "$id": "1488", + "kind": "string", + "type": { + "$ref": "32" + }, + "value": "User" + }, + "createdAt": { + "$id": "1489", + "kind": "string", + "type": { + "$ref": "198" + }, + "value": "2023-09-07T16:33:22.210Z" + }, + "lastModifiedBy": { + "$id": "1490", + "kind": "string", + "type": { + "$ref": "203" + }, + "value": "pooluser@microsoft.com" + }, + "lastModifiedByType": { + "$id": "1491", + "kind": "string", + "type": { + "$ref": "32" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "1492", + "kind": "string", + "type": { + "$ref": "210" + }, + "value": "2023-09-07T16:33:22.210Z" + } + } + } + } + } + } + ] + } + ] + }, + { + "$id": "1493", + "name": "createOrUpdate", + "resourceName": "StandbyContainerGroupPoolResource", + "doc": "Create a StandbyContainerGroupPoolResource", + "accessibility": "public", + "parameters": [ + { + "$id": "1494", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "1495", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "1496", + "type": { + "$id": "1497", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-03-01" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1498", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "1499", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "1500", + "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": "1501", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "1502", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1503", + "name": "standbyContainerGroupPoolName", + "nameInRequest": "standbyContainerGroupPoolName", + "doc": "Name of the standby container group pool", + "type": { + "$id": "1504", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1505", + "name": "contentType", + "nameInRequest": "Content-Type", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$id": "1506", + "kind": "constant", + "valueType": { + "$id": "1507", + "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": "1508", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "1509", + "kind": "constant", + "valueType": { + "$id": "1510", + "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": "1511", + "name": "resource", + "nameInRequest": "resource", + "doc": "Resource create parameters.", + "type": { + "$ref": "406" + }, + "location": "Body", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "1512", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "406" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + }, + { + "$id": "1513", + "statusCodes": [ + 201 + ], + "bodyType": { + "$ref": "406" + }, + "headers": [ + { + "$id": "1514", + "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": "1515", + "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": "1516", + "finalStateVia": 0, + "finalResponse": { + "$id": "1517", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "406" + } + } + }, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.StandbyPool.StandbyContainerGroupPools.createOrUpdate", + "decorators": [ + { + "$id": "1518", + "name": "Azure.Core.@useFinalStateVia", + "arguments": { + "$id": "1519", + "finalState": "azure-async-operation" + } + } + ], + "examples": [ + { + "$id": "1520", + "kind": "http", + "name": "StandbyContainerGroupPools_CreateOrUpdate", + "description": "StandbyContainerGroupPools_CreateOrUpdate", + "filePath": "2025-03-01/StandbyContainerGroupPools_CreateOrUpdate.json", + "parameters": [ + { + "$id": "1521", + "parameter": { + "$ref": "1494" + }, + "value": { + "$id": "1522", + "kind": "string", + "type": { + "$ref": "1495" + }, + "value": "2025-03-01" + } + }, + { + "$id": "1523", + "parameter": { + "$ref": "1498" + }, + "value": { + "$id": "1524", + "kind": "string", + "type": { + "$ref": "1499" + }, + "value": "00000000-0000-0000-0000-000000000009" + } + }, + { + "$id": "1525", + "parameter": { + "$ref": "1501" + }, + "value": { + "$id": "1526", + "kind": "string", + "type": { + "$ref": "1502" + }, + "value": "rgstandbypool" + } + }, + { + "$id": "1527", + "parameter": { + "$ref": "1503" + }, + "value": { + "$id": "1528", + "kind": "string", + "type": { + "$ref": "1504" + }, + "value": "pool" + } + }, + { + "$id": "1529", + "parameter": { + "$ref": "1511" + }, + "value": { + "$id": "1530", + "kind": "model", + "type": { + "$ref": "406" + }, + "value": { + "$id": "1531", + "properties": { + "$id": "1532", + "kind": "model", + "type": { + "$ref": "408" + }, + "value": { + "$id": "1533", + "elasticityProfile": { + "$id": "1534", + "kind": "model", + "type": { + "$ref": "410" + }, + "value": { + "$id": "1535", + "maxReadyCapacity": { + "$id": "1536", + "kind": "number", + "type": { + "$ref": "412" + }, + "value": 688 + }, + "refillPolicy": { + "$id": "1537", + "kind": "string", + "type": { + "$ref": "74" + }, + "value": "always" + } + } + }, + "containerGroupProperties": { + "$id": "1538", + "kind": "model", + "type": { + "$ref": "421" + }, + "value": { + "$id": "1539", + "containerGroupProfile": { + "$id": "1540", + "kind": "model", + "type": { + "$ref": "423" + }, + "value": { + "$id": "1541", + "id": { + "$id": "1542", + "kind": "string", + "type": { + "$ref": "425" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000009/resourceGroups/rgstandbypool/providers/Microsoft.ContainerInstance/containerGroupProfiles/cgProfile" + }, + "revision": { + "$id": "1543", + "kind": "number", + "type": { + "$ref": "430" + }, + "value": 1 + } + } + }, + "subnetIds": { + "$id": "1544", + "kind": "array", + "type": { + "$ref": "436" + }, + "value": [ + { + "$id": "1545", + "kind": "model", + "type": { + "$ref": "437" + }, + "value": { + "$id": "1546", + "id": { + "$id": "1547", + "kind": "string", + "type": { + "$ref": "439" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000009/resourceGroups/rgstandbypool/providers/Microsoft.Network/virtualNetworks/cgSubnet/subnets/cgSubnet" + } + } + } + ] + } + } + }, + "zones": { + "$id": "1548", + "kind": "array", + "type": { + "$ref": "448" + }, + "value": [ + { + "$id": "1549", + "kind": "string", + "type": { + "$ref": "449" + }, + "value": "1" + }, + { + "$id": "1550", + "kind": "string", + "type": { + "$ref": "449" + }, + "value": "2" + }, + { + "$id": "1551", + "kind": "string", + "type": { + "$ref": "449" + }, + "value": "3" + } + ] + } + } + }, + "tags": { + "$id": "1552", + "kind": "dict", + "type": { + "$ref": "217" + }, + "value": { + "$id": "1553" + } + }, + "location": { + "$id": "1554", + "kind": "string", + "type": { + "$ref": "223" + }, + "value": "West US" + } + } + } + } + ], + "responses": [ + { + "$id": "1555", + "response": { + "$ref": "1512" + }, + "statusCode": 200, + "bodyValue": { + "$id": "1556", + "kind": "model", + "type": { + "$ref": "406" + }, + "value": { + "$id": "1557", + "properties": { + "$id": "1558", + "kind": "model", + "type": { + "$ref": "408" + }, + "value": { + "$id": "1559", + "elasticityProfile": { + "$id": "1560", + "kind": "model", + "type": { + "$ref": "410" + }, + "value": { + "$id": "1561", + "maxReadyCapacity": { + "$id": "1562", + "kind": "number", + "type": { + "$ref": "412" + }, + "value": 688 + }, + "refillPolicy": { + "$id": "1563", + "kind": "string", + "type": { + "$ref": "74" + }, + "value": "always" + } + } + }, + "provisioningState": { + "$id": "1564", + "kind": "string", + "type": { + "$ref": "22" + }, + "value": "Succeeded" + }, + "containerGroupProperties": { + "$id": "1565", + "kind": "model", + "type": { + "$ref": "421" + }, + "value": { + "$id": "1566", + "containerGroupProfile": { + "$id": "1567", + "kind": "model", + "type": { + "$ref": "423" + }, + "value": { + "$id": "1568", + "id": { + "$id": "1569", + "kind": "string", + "type": { + "$ref": "425" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000009/resourceGroups/rgstandbypool/providers/Microsoft.ContainerInstance/containerGroupProfiles/cgProfile" + }, + "revision": { + "$id": "1570", + "kind": "number", + "type": { + "$ref": "430" + }, + "value": 1 + } + } + }, + "subnetIds": { + "$id": "1571", + "kind": "array", + "type": { + "$ref": "436" + }, + "value": [ + { + "$id": "1572", + "kind": "model", + "type": { + "$ref": "437" + }, + "value": { + "$id": "1573", + "id": { + "$id": "1574", + "kind": "string", + "type": { + "$ref": "439" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000009/resourceGroups/rgstandbypool/providers/Microsoft.Network/virtualNetworks/cgSubnet/subnets/cgSubnet" + } + } + } + ] + } + } + }, + "zones": { + "$id": "1575", + "kind": "array", + "type": { + "$ref": "448" + }, + "value": [ + { + "$id": "1576", + "kind": "string", + "type": { + "$ref": "449" + }, + "value": "1" + }, + { + "$id": "1577", + "kind": "string", + "type": { + "$ref": "449" + }, + "value": "2" + }, + { + "$id": "1578", + "kind": "string", + "type": { + "$ref": "449" + }, + "value": "3" + } + ] + } + } + }, + "tags": { + "$id": "1579", + "kind": "dict", + "type": { + "$ref": "217" + }, + "value": { + "$id": "1580" + } + }, + "location": { + "$id": "1581", + "kind": "string", + "type": { + "$ref": "223" + }, + "value": "West US" + }, + "id": { + "$id": "1582", + "kind": "string", + "type": { + "$ref": "175" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000009/resourceGroups/rgstandbypool/providers/Microsoft.StandbyPool/standbyContainerGroupPools/pool" + }, + "name": { + "$id": "1583", + "kind": "string", + "type": { + "$ref": "180" + }, + "value": "pool" + }, + "type": { + "$id": "1584", + "kind": "string", + "type": { + "$ref": "184" + }, + "value": "Microsoft.StandbyPool/standbyContainerGroupPools" + }, + "systemData": { + "$id": "1585", + "kind": "model", + "type": { + "$ref": "189" + }, + "value": { + "$id": "1586", + "createdBy": { + "$id": "1587", + "kind": "string", + "type": { + "$ref": "191" + }, + "value": "pooluser@microsoft.com" + }, + "createdByType": { + "$id": "1588", + "kind": "string", + "type": { + "$ref": "32" + }, + "value": "User" + }, + "createdAt": { + "$id": "1589", + "kind": "string", + "type": { + "$ref": "198" + }, + "value": "2023-09-07T16:33:22.210Z" + }, + "lastModifiedBy": { + "$id": "1590", + "kind": "string", + "type": { + "$ref": "203" + }, + "value": "pooluser@microsoft.com" + }, + "lastModifiedByType": { + "$id": "1591", + "kind": "string", + "type": { + "$ref": "32" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "1592", + "kind": "string", + "type": { + "$ref": "210" + }, + "value": "2023-09-07T16:33:22.210Z" + } + } + } + } + } + }, + { + "$id": "1593", + "response": { + "$ref": "1513" + }, + "statusCode": 201, + "bodyValue": { + "$id": "1594", + "kind": "model", + "type": { + "$ref": "406" + }, + "value": { + "$id": "1595", + "properties": { + "$id": "1596", + "kind": "model", + "type": { + "$ref": "408" + }, + "value": { + "$id": "1597", + "elasticityProfile": { + "$id": "1598", + "kind": "model", + "type": { + "$ref": "410" + }, + "value": { + "$id": "1599", + "maxReadyCapacity": { + "$id": "1600", + "kind": "number", + "type": { + "$ref": "412" + }, + "value": 688 + }, + "refillPolicy": { + "$id": "1601", + "kind": "string", + "type": { + "$ref": "74" + }, + "value": "always" + } + } + }, + "provisioningState": { + "$id": "1602", + "kind": "string", + "type": { + "$ref": "22" + }, + "value": "Succeeded" + }, + "containerGroupProperties": { + "$id": "1603", + "kind": "model", + "type": { + "$ref": "421" + }, + "value": { + "$id": "1604", + "containerGroupProfile": { + "$id": "1605", + "kind": "model", + "type": { + "$ref": "423" + }, + "value": { + "$id": "1606", + "id": { + "$id": "1607", + "kind": "string", + "type": { + "$ref": "425" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000009/resourceGroups/rgstandbypool/providers/Microsoft.ContainerInstance/containerGroupProfiles/cgProfile" + }, + "revision": { + "$id": "1608", + "kind": "number", + "type": { + "$ref": "430" + }, + "value": 1 + } + } + }, + "subnetIds": { + "$id": "1609", + "kind": "array", + "type": { + "$ref": "436" + }, + "value": [ + { + "$id": "1610", + "kind": "model", + "type": { + "$ref": "437" + }, + "value": { + "$id": "1611", + "id": { + "$id": "1612", + "kind": "string", + "type": { + "$ref": "439" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000009/resourceGroups/rgstandbypool/providers/Microsoft.Network/virtualNetworks/cgSubnet/subnets/cgSubnet" + } + } + } + ] + } + } + }, + "zones": { + "$id": "1613", + "kind": "array", + "type": { + "$ref": "448" + }, + "value": [ + { + "$id": "1614", + "kind": "string", + "type": { + "$ref": "449" + }, + "value": "1" + }, + { + "$id": "1615", + "kind": "string", + "type": { + "$ref": "449" + }, + "value": "2" + }, + { + "$id": "1616", + "kind": "string", + "type": { + "$ref": "449" + }, + "value": "3" + } + ] + } + } + }, + "tags": { + "$id": "1617", + "kind": "dict", + "type": { + "$ref": "217" + }, + "value": { + "$id": "1618" + } + }, + "location": { + "$id": "1619", + "kind": "string", + "type": { + "$ref": "223" + }, + "value": "West US" + }, + "id": { + "$id": "1620", + "kind": "string", + "type": { + "$ref": "175" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000009/resourceGroups/rgstandbypool/providers/Microsoft.StandbyPool/standbyContainerGroupPools/pool" + }, + "name": { + "$id": "1621", + "kind": "string", + "type": { + "$ref": "180" + }, + "value": "pool" + }, + "type": { + "$id": "1622", + "kind": "string", + "type": { + "$ref": "184" + }, + "value": "Microsoft.StandbyPool/standbyContainerGroupPools" + }, + "systemData": { + "$id": "1623", + "kind": "model", + "type": { + "$ref": "189" + }, + "value": { + "$id": "1624", + "createdBy": { + "$id": "1625", + "kind": "string", + "type": { + "$ref": "191" + }, + "value": "pooluser@microsoft.com" + }, + "createdByType": { + "$id": "1626", + "kind": "string", + "type": { + "$ref": "32" + }, + "value": "User" + }, + "createdAt": { + "$id": "1627", + "kind": "string", + "type": { + "$ref": "198" + }, + "value": "2023-09-07T16:33:22.210Z" + }, + "lastModifiedBy": { + "$id": "1628", + "kind": "string", + "type": { + "$ref": "203" + }, + "value": "pooluser@microsoft.com" + }, + "lastModifiedByType": { + "$id": "1629", + "kind": "string", + "type": { + "$ref": "32" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "1630", + "kind": "string", + "type": { + "$ref": "210" + }, + "value": "2023-09-07T16:33:22.210Z" + } + } + } + } + } + } + ] + } + ] + }, + { + "$id": "1631", + "name": "delete", + "resourceName": "StandbyContainerGroupPoolResource", + "doc": "Delete a StandbyContainerGroupPoolResource", + "accessibility": "public", + "parameters": [ + { + "$id": "1632", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "1633", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "1634", + "type": { + "$id": "1635", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-03-01" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1636", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "1637", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "1638", + "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": "1639", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "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": "standbyContainerGroupPoolName", + "nameInRequest": "standbyContainerGroupPoolName", + "doc": "Name of the standby container group pool", + "type": { + "$id": "1642", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1643", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "1644", + "kind": "constant", + "valueType": { + "$id": "1645", + "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": "1646", + "statusCodes": [ + 202 + ], + "headers": [ + { + "$id": "1647", + "name": "location", + "nameInResponse": "Location", + "doc": "The Location header contains the URL where the status of the long running operation can be checked.", + "type": { + "$id": "1648", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + { + "$id": "1649", + "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": "1650", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + } + } + ], + "isErrorResponse": false + }, + { + "$id": "1651", + "statusCodes": [ + 204 + ], + "headers": [], + "isErrorResponse": false + } + ], + "httpMethod": "DELETE", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StandbyPool/standbyContainerGroupPools/{standbyContainerGroupPoolName}", + "bufferResponse": true, + "longRunning": { + "$id": "1652", + "finalStateVia": 1, + "finalResponse": { + "$id": "1653", + "statusCodes": [ + 204 + ] + } + }, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.StandbyPool.StandbyContainerGroupPools.delete", + "decorators": [], + "examples": [ + { + "$id": "1654", + "kind": "http", + "name": "StandbyContainerGroupPools_Delete", + "description": "StandbyContainerGroupPools_Delete", + "filePath": "2025-03-01/StandbyContainerGroupPools_Delete.json", + "parameters": [ + { + "$id": "1655", + "parameter": { + "$ref": "1632" + }, + "value": { + "$id": "1656", + "kind": "string", + "type": { + "$ref": "1633" + }, + "value": "2025-03-01" + } + }, + { + "$id": "1657", + "parameter": { + "$ref": "1636" + }, + "value": { + "$id": "1658", + "kind": "string", + "type": { + "$ref": "1637" + }, + "value": "00000000-0000-0000-0000-000000000009" + } + }, + { + "$id": "1659", + "parameter": { + "$ref": "1639" + }, + "value": { + "$id": "1660", + "kind": "string", + "type": { + "$ref": "1640" + }, + "value": "rgstandbypool" + } + }, + { + "$id": "1661", + "parameter": { + "$ref": "1641" + }, + "value": { + "$id": "1662", + "kind": "string", + "type": { + "$ref": "1642" + }, + "value": "pool" + } + } + ], + "responses": [ + { + "$id": "1663", + "response": { + "$ref": "1646" + }, + "statusCode": 202 + }, + { + "$id": "1664", + "response": { + "$ref": "1651" + }, + "statusCode": 204 + } + ] + } + ] + }, + { + "$id": "1665", + "name": "update", + "resourceName": "StandbyContainerGroupPoolResource", + "doc": "Update a StandbyContainerGroupPoolResource", + "accessibility": "public", + "parameters": [ + { + "$id": "1666", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "1667", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "1668", + "type": { + "$id": "1669", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-03-01" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1670", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "1671", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "1672", + "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": "1673", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "1674", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1675", + "name": "standbyContainerGroupPoolName", + "nameInRequest": "standbyContainerGroupPoolName", + "doc": "Name of the standby container group pool", + "type": { + "$id": "1676", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1677", + "name": "contentType", + "nameInRequest": "Content-Type", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$id": "1678", + "kind": "constant", + "valueType": { + "$id": "1679", + "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": "1680", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "1681", + "kind": "constant", + "valueType": { + "$id": "1682", + "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": "1683", + "name": "properties", + "nameInRequest": "properties", + "doc": "The resource properties to be updated.", + "type": { + "$ref": "457" + }, + "location": "Body", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "1684", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "406" + }, + "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": "1685", + "kind": "http", + "name": "StandbyContainerGroupPools_Update", + "description": "StandbyContainerGroupPools_Update", + "filePath": "2025-03-01/StandbyContainerGroupPools_Update.json", + "parameters": [ + { + "$id": "1686", + "parameter": { + "$ref": "1666" + }, + "value": { + "$id": "1687", + "kind": "string", + "type": { + "$ref": "1667" + }, + "value": "2025-03-01" + } + }, + { + "$id": "1688", + "parameter": { + "$ref": "1670" + }, + "value": { + "$id": "1689", + "kind": "string", + "type": { + "$ref": "1671" + }, + "value": "00000000-0000-0000-0000-000000000009" + } + }, + { + "$id": "1690", + "parameter": { + "$ref": "1673" + }, + "value": { + "$id": "1691", + "kind": "string", + "type": { + "$ref": "1674" + }, + "value": "rgstandbypool" + } + }, + { + "$id": "1692", + "parameter": { + "$ref": "1675" + }, + "value": { + "$id": "1693", + "kind": "string", + "type": { + "$ref": "1676" + }, + "value": "pool" + } + }, + { + "$id": "1694", + "parameter": { + "$ref": "1683" + }, + "value": { + "$id": "1695", + "kind": "model", + "type": { + "$ref": "457" + }, + "value": { + "$id": "1696", + "tags": { + "$id": "1697", + "kind": "dict", + "type": { + "$ref": "459" + }, + "value": { + "$id": "1698" + } + }, + "properties": { + "$id": "1699", + "kind": "model", + "type": { + "$ref": "465" + }, + "value": { + "$id": "1700", + "elasticityProfile": { + "$id": "1701", + "kind": "model", + "type": { + "$ref": "410" + }, + "value": { + "$id": "1702", + "maxReadyCapacity": { + "$id": "1703", + "kind": "number", + "type": { + "$ref": "412" + }, + "value": 1743 + }, + "refillPolicy": { + "$id": "1704", + "kind": "string", + "type": { + "$ref": "74" + }, + "value": "always" + } + } + }, + "containerGroupProperties": { + "$id": "1705", + "kind": "model", + "type": { + "$ref": "421" + }, + "value": { + "$id": "1706", + "containerGroupProfile": { + "$id": "1707", + "kind": "model", + "type": { + "$ref": "423" + }, + "value": { + "$id": "1708", + "id": { + "$id": "1709", + "kind": "string", + "type": { + "$ref": "425" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000009/resourceGroups/rgstandbypool/providers/Microsoft.ContainerInstance/containerGroupProfiles/cgProfile" + }, + "revision": { + "$id": "1710", + "kind": "number", + "type": { + "$ref": "430" + }, + "value": 2 + } + } + }, + "subnetIds": { + "$id": "1711", + "kind": "array", + "type": { + "$ref": "436" + }, + "value": [ + { + "$id": "1712", + "kind": "model", + "type": { + "$ref": "437" + }, + "value": { + "$id": "1713", + "id": { + "$id": "1714", + "kind": "string", + "type": { + "$ref": "439" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000009/resourceGroups/rgstandbypool/providers/Microsoft.Network/virtualNetworks/cgSubnet/subnets/cgSubnet" + } + } + } + ] + } + } + }, + "zones": { + "$id": "1715", + "kind": "array", + "type": { + "$ref": "473" + }, + "value": [ + { + "$id": "1716", + "kind": "string", + "type": { + "$ref": "474" + }, + "value": "1" + }, + { + "$id": "1717", + "kind": "string", + "type": { + "$ref": "474" + }, + "value": "2" + }, + { + "$id": "1718", + "kind": "string", + "type": { + "$ref": "474" + }, + "value": "3" + } + ] + } + } + } + } + } + } + ], + "responses": [ + { + "$id": "1719", + "response": { + "$ref": "1684" + }, + "statusCode": 200, + "bodyValue": { + "$id": "1720", + "kind": "model", + "type": { + "$ref": "406" + }, + "value": { + "$id": "1721", + "properties": { + "$id": "1722", + "kind": "model", + "type": { + "$ref": "408" + }, + "value": { + "$id": "1723", + "elasticityProfile": { + "$id": "1724", + "kind": "model", + "type": { + "$ref": "410" + }, + "value": { + "$id": "1725", + "maxReadyCapacity": { + "$id": "1726", + "kind": "number", + "type": { + "$ref": "412" + }, + "value": 1743 + }, + "refillPolicy": { + "$id": "1727", + "kind": "string", + "type": { + "$ref": "74" + }, + "value": "always" + } + } + }, + "provisioningState": { + "$id": "1728", + "kind": "string", + "type": { + "$ref": "22" + }, + "value": "Succeeded" + }, + "containerGroupProperties": { + "$id": "1729", + "kind": "model", + "type": { + "$ref": "421" + }, + "value": { + "$id": "1730", + "containerGroupProfile": { + "$id": "1731", + "kind": "model", + "type": { + "$ref": "423" + }, + "value": { + "$id": "1732", + "id": { + "$id": "1733", + "kind": "string", + "type": { + "$ref": "425" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000009/resourceGroups/rgstandbypool/providers/Microsoft.ContainerInstance/containerGroupProfiles/cgProfile" + }, + "revision": { + "$id": "1734", + "kind": "number", + "type": { + "$ref": "430" + }, + "value": 2 + } + } + }, + "subnetIds": { + "$id": "1735", + "kind": "array", + "type": { + "$ref": "436" + }, + "value": [ + { + "$id": "1736", + "kind": "model", + "type": { + "$ref": "437" + }, + "value": { + "$id": "1737", + "id": { + "$id": "1738", + "kind": "string", + "type": { + "$ref": "439" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000009/resourceGroups/rgstandbypool/providers/Microsoft.Network/virtualNetworks/cgSubnet/subnets/cgSubnet" + } + } + } + ] + } + } + }, + "zones": { + "$id": "1739", + "kind": "array", + "type": { + "$ref": "448" + }, + "value": [ + { + "$id": "1740", + "kind": "string", + "type": { + "$ref": "449" + }, + "value": "1" + }, + { + "$id": "1741", + "kind": "string", + "type": { + "$ref": "449" + }, + "value": "2" + }, + { + "$id": "1742", + "kind": "string", + "type": { + "$ref": "449" + }, + "value": "3" + } + ] + } + } + }, + "tags": { + "$id": "1743", + "kind": "dict", + "type": { + "$ref": "217" + }, + "value": { + "$id": "1744" + } + }, + "location": { + "$id": "1745", + "kind": "string", + "type": { + "$ref": "223" + }, + "value": "West US" + }, + "id": { + "$id": "1746", + "kind": "string", + "type": { + "$ref": "175" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000009/resourceGroups/rgstandbypool/providers/Microsoft.StandbyPool/standbyContainerGroupPools/pool" + }, + "name": { + "$id": "1747", + "kind": "string", + "type": { + "$ref": "180" + }, + "value": "pool" + }, + "type": { + "$id": "1748", + "kind": "string", + "type": { + "$ref": "184" + }, + "value": "Microsoft.StandbyPool/standbyContainerGroupPools" + }, + "systemData": { + "$id": "1749", + "kind": "model", + "type": { + "$ref": "189" + }, + "value": { + "$id": "1750", + "createdBy": { + "$id": "1751", + "kind": "string", + "type": { + "$ref": "191" + }, + "value": "pooluser@microsoft.com" + }, + "createdByType": { + "$id": "1752", + "kind": "string", + "type": { + "$ref": "32" + }, + "value": "User" + }, + "createdAt": { + "$id": "1753", + "kind": "string", + "type": { + "$ref": "198" + }, + "value": "2023-09-07T16:33:22.210Z" + }, + "lastModifiedBy": { + "$id": "1754", + "kind": "string", + "type": { + "$ref": "203" + }, + "value": "pooluser@microsoft.com" + }, + "lastModifiedByType": { + "$id": "1755", + "kind": "string", + "type": { + "$ref": "32" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "1756", + "kind": "string", + "type": { + "$ref": "210" + }, + "value": "2023-09-07T16:33:22.210Z" + } + } + } + } + } + } + ] + } + ] + }, + { + "$id": "1757", + "name": "listByResourceGroup", + "resourceName": "StandbyContainerGroupPoolResource", + "doc": "List StandbyContainerGroupPoolResource resources by resource group", + "accessibility": "public", + "parameters": [ + { + "$id": "1758", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "1759", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "1760", + "type": { + "$id": "1761", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-03-01" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1762", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "1763", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "1764", + "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": "1765", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "1766", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1767", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "1768", + "kind": "constant", + "valueType": { + "$id": "1769", + "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": "1770", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "479" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "GET", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StandbyPool/standbyContainerGroupPools", + "bufferResponse": true, + "paging": { + "$id": "1771", + "itemPropertySegments": [ + "value" + ], + "nextLink": { + "$id": "1772", + "responseSegments": [ + "nextLink" + ], + "responseLocation": "Body" + } + }, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.StandbyPool.StandbyContainerGroupPools.listByResourceGroup", + "decorators": [], + "examples": [ + { + "$id": "1773", + "kind": "http", + "name": "StandbyContainerGroupPools_ListByResourceGroup", + "description": "StandbyContainerGroupPools_ListByResourceGroup", + "filePath": "2025-03-01/StandbyContainerGroupPools_ListByResourceGroup.json", + "parameters": [ + { + "$id": "1774", + "parameter": { + "$ref": "1758" + }, + "value": { + "$id": "1775", + "kind": "string", + "type": { + "$ref": "1759" + }, + "value": "2025-03-01" + } + }, + { + "$id": "1776", + "parameter": { + "$ref": "1762" + }, + "value": { + "$id": "1777", + "kind": "string", + "type": { + "$ref": "1763" + }, + "value": "00000000-0000-0000-0000-000000000009" + } + }, + { + "$id": "1778", + "parameter": { + "$ref": "1765" + }, + "value": { + "$id": "1779", + "kind": "string", + "type": { + "$ref": "1766" + }, + "value": "rgstandbypool" + } + } + ], + "responses": [ + { + "$id": "1780", + "response": { + "$ref": "1770" + }, + "statusCode": 200, + "bodyValue": { + "$id": "1781", + "kind": "model", + "type": { + "$ref": "479" + }, + "value": { + "$id": "1782", + "value": { + "$id": "1783", + "kind": "array", + "type": { + "$ref": "481" + }, + "value": [ + { + "$id": "1784", + "kind": "model", + "type": { + "$ref": "406" + }, + "value": { + "$id": "1785", + "properties": { + "$id": "1786", + "kind": "model", + "type": { + "$ref": "408" + }, + "value": { + "$id": "1787", + "elasticityProfile": { + "$id": "1788", + "kind": "model", + "type": { + "$ref": "410" + }, + "value": { + "$id": "1789", + "maxReadyCapacity": { + "$id": "1790", + "kind": "number", + "type": { + "$ref": "412" + }, + "value": 688 + }, + "refillPolicy": { + "$id": "1791", + "kind": "string", + "type": { + "$ref": "74" + }, + "value": "always" + } + } + }, + "provisioningState": { + "$id": "1792", + "kind": "string", + "type": { + "$ref": "22" + }, + "value": "Succeeded" + }, + "containerGroupProperties": { + "$id": "1793", + "kind": "model", + "type": { + "$ref": "421" + }, + "value": { + "$id": "1794", + "containerGroupProfile": { + "$id": "1795", + "kind": "model", + "type": { + "$ref": "423" + }, + "value": { + "$id": "1796", + "id": { + "$id": "1797", + "kind": "string", + "type": { + "$ref": "425" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000009/resourceGroups/rgstandbypool/providers/Microsoft.ContainerInstance/containerGroupProfiles/cgProfile" + }, + "revision": { + "$id": "1798", + "kind": "number", + "type": { + "$ref": "430" + }, + "value": 1 + } + } + }, + "subnetIds": { + "$id": "1799", + "kind": "array", + "type": { + "$ref": "436" + }, + "value": [ + { + "$id": "1800", + "kind": "model", + "type": { + "$ref": "437" + }, + "value": { + "$id": "1801", + "id": { + "$id": "1802", + "kind": "string", + "type": { + "$ref": "439" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000009/resourceGroups/rgstandbypool/providers/Microsoft.Network/virtualNetworks/cgSubnet/subnets/cgSubnet" + } + } + } + ] + } + } + }, + "zones": { + "$id": "1803", + "kind": "array", + "type": { + "$ref": "448" + }, + "value": [ + { + "$id": "1804", + "kind": "string", + "type": { + "$ref": "449" + }, + "value": "1" + }, + { + "$id": "1805", + "kind": "string", + "type": { + "$ref": "449" + }, + "value": "2" + }, + { + "$id": "1806", + "kind": "string", + "type": { + "$ref": "449" + }, + "value": "3" + } + ] + } + } + }, + "tags": { + "$id": "1807", + "kind": "dict", + "type": { + "$ref": "217" + }, + "value": { + "$id": "1808" + } + }, + "location": { + "$id": "1809", + "kind": "string", + "type": { + "$ref": "223" + }, + "value": "West US" + }, + "id": { + "$id": "1810", + "kind": "string", + "type": { + "$ref": "175" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000009/resourceGroups/rgstandbypool/providers/Microsoft.StandbyPool/standbyContainerGroupPools/pool" + }, + "name": { + "$id": "1811", + "kind": "string", + "type": { + "$ref": "180" + }, + "value": "pool" + }, + "type": { + "$id": "1812", + "kind": "string", + "type": { + "$ref": "184" + }, + "value": "Microsoft.StandbyPool/standbyContainerGroupPools" + }, + "systemData": { + "$id": "1813", + "kind": "model", + "type": { + "$ref": "189" + }, + "value": { + "$id": "1814", + "createdBy": { + "$id": "1815", + "kind": "string", + "type": { + "$ref": "191" + }, + "value": "pooluser@microsoft.com" + }, + "createdByType": { + "$id": "1816", + "kind": "string", + "type": { + "$ref": "32" + }, + "value": "User" + }, + "createdAt": { + "$id": "1817", + "kind": "string", + "type": { + "$ref": "198" + }, + "value": "2023-09-07T16:33:22.210Z" + }, + "lastModifiedBy": { + "$id": "1818", + "kind": "string", + "type": { + "$ref": "203" + }, + "value": "pooluser@microsoft.com" + }, + "lastModifiedByType": { + "$id": "1819", + "kind": "string", + "type": { + "$ref": "32" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "1820", + "kind": "string", + "type": { + "$ref": "210" + }, + "value": "2023-09-07T16:33:22.210Z" + } + } + } + } + } + ] + }, + "nextLink": { + "$id": "1821", + "kind": "string", + "type": { + "$ref": "485" + }, + "value": "https://microsoft.com/a" + } + } + } + } + ] + } + ] + }, + { + "$id": "1822", + "name": "listBySubscription", + "resourceName": "StandbyContainerGroupPoolResource", + "doc": "List StandbyContainerGroupPoolResource resources by subscription ID", + "accessibility": "public", + "parameters": [ + { + "$id": "1823", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "1824", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "1825", + "type": { + "$id": "1826", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-03-01" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1827", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "1828", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "1829", + "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": "1830", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "1831", + "kind": "constant", + "valueType": { + "$id": "1832", + "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": "1833", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "479" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "GET", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/providers/Microsoft.StandbyPool/standbyContainerGroupPools", + "bufferResponse": true, + "paging": { + "$id": "1834", + "itemPropertySegments": [ + "value" + ], + "nextLink": { + "$id": "1835", + "responseSegments": [ + "nextLink" + ], + "responseLocation": "Body" + } + }, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.StandbyPool.StandbyContainerGroupPools.listBySubscription", + "decorators": [], + "examples": [ + { + "$id": "1836", + "kind": "http", + "name": "StandbyContainerGroupPools_ListBySubscription", + "description": "StandbyContainerGroupPools_ListBySubscription", + "filePath": "2025-03-01/StandbyContainerGroupPools_ListBySubscription.json", + "parameters": [ + { + "$id": "1837", + "parameter": { + "$ref": "1823" + }, + "value": { + "$id": "1838", + "kind": "string", + "type": { + "$ref": "1824" + }, + "value": "2025-03-01" + } + }, + { + "$id": "1839", + "parameter": { + "$ref": "1827" + }, + "value": { + "$id": "1840", + "kind": "string", + "type": { + "$ref": "1828" + }, + "value": "00000000-0000-0000-0000-000000000009" + } + } + ], + "responses": [ + { + "$id": "1841", + "response": { + "$ref": "1833" + }, + "statusCode": 200, + "bodyValue": { + "$id": "1842", + "kind": "model", + "type": { + "$ref": "479" + }, + "value": { + "$id": "1843", + "value": { + "$id": "1844", + "kind": "array", + "type": { + "$ref": "481" + }, + "value": [ + { + "$id": "1845", + "kind": "model", + "type": { + "$ref": "406" + }, + "value": { + "$id": "1846", + "properties": { + "$id": "1847", + "kind": "model", + "type": { + "$ref": "408" + }, + "value": { + "$id": "1848", + "elasticityProfile": { + "$id": "1849", + "kind": "model", + "type": { + "$ref": "410" + }, + "value": { + "$id": "1850", + "maxReadyCapacity": { + "$id": "1851", + "kind": "number", + "type": { + "$ref": "412" + }, + "value": 688 + }, + "refillPolicy": { + "$id": "1852", + "kind": "string", + "type": { + "$ref": "74" + }, + "value": "always" + } + } + }, + "provisioningState": { + "$id": "1853", + "kind": "string", + "type": { + "$ref": "22" + }, + "value": "Succeeded" + }, + "containerGroupProperties": { + "$id": "1854", + "kind": "model", + "type": { + "$ref": "421" + }, + "value": { + "$id": "1855", + "containerGroupProfile": { + "$id": "1856", + "kind": "model", + "type": { + "$ref": "423" + }, + "value": { + "$id": "1857", + "id": { + "$id": "1858", + "kind": "string", + "type": { + "$ref": "425" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000009/resourceGroups/rgstandbypool/providers/Microsoft.ContainerInstance/containerGroupProfiles/cgProfile" + }, + "revision": { + "$id": "1859", + "kind": "number", + "type": { + "$ref": "430" + }, + "value": 1 + } + } + }, + "subnetIds": { + "$id": "1860", + "kind": "array", + "type": { + "$ref": "436" + }, + "value": [ + { + "$id": "1861", + "kind": "model", + "type": { + "$ref": "437" + }, + "value": { + "$id": "1862", + "id": { + "$id": "1863", + "kind": "string", + "type": { + "$ref": "439" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000009/resourceGroups/rgstandbypool/providers/Microsoft.Network/virtualNetworks/cgSubnet/subnets/cgSubnet" + } + } + } + ] + } + } + }, + "zones": { + "$id": "1864", + "kind": "array", + "type": { + "$ref": "448" + }, + "value": [ + { + "$id": "1865", + "kind": "string", + "type": { + "$ref": "449" + }, + "value": "1" + }, + { + "$id": "1866", + "kind": "string", + "type": { + "$ref": "449" + }, + "value": "2" + }, + { + "$id": "1867", + "kind": "string", + "type": { + "$ref": "449" + }, + "value": "3" + } + ] + } + } + }, + "tags": { + "$id": "1868", + "kind": "dict", + "type": { + "$ref": "217" + }, + "value": { + "$id": "1869" + } + }, + "location": { + "$id": "1870", + "kind": "string", + "type": { + "$ref": "223" + }, + "value": "West US" + }, + "id": { + "$id": "1871", + "kind": "string", + "type": { + "$ref": "175" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000009/resourceGroups/rgstandbypool/providers/Microsoft.StandbyPool/standbyContainerGroupPools/pool" + }, + "name": { + "$id": "1872", + "kind": "string", + "type": { + "$ref": "180" + }, + "value": "pool" + }, + "type": { + "$id": "1873", + "kind": "string", + "type": { + "$ref": "184" + }, + "value": "Microsoft.StandbyPool/standbyContainerGroupPools" + }, + "systemData": { + "$id": "1874", + "kind": "model", + "type": { + "$ref": "189" + }, + "value": { + "$id": "1875", + "createdBy": { + "$id": "1876", + "kind": "string", + "type": { + "$ref": "191" + }, + "value": "pooluser@microsoft.com" + }, + "createdByType": { + "$id": "1877", + "kind": "string", + "type": { + "$ref": "32" + }, + "value": "User" + }, + "createdAt": { + "$id": "1878", + "kind": "string", + "type": { + "$ref": "198" + }, + "value": "2023-09-07T16:33:22.210Z" + }, + "lastModifiedBy": { + "$id": "1879", + "kind": "string", + "type": { + "$ref": "203" + }, + "value": "pooluser@microsoft.com" + }, + "lastModifiedByType": { + "$id": "1880", + "kind": "string", + "type": { + "$ref": "32" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "1881", + "kind": "string", + "type": { + "$ref": "210" + }, + "value": "2023-09-07T16:33:22.210Z" + } + } + } + } + } + ] + }, + "nextLink": { + "$id": "1882", + "kind": "string", + "type": { + "$ref": "485" + }, + "value": "https://microsoft.com/a" + } + } + } + } + ] + } + ] + } + ], + "parameters": [ + { + "$id": "1883", + "name": "endpoint", + "nameInRequest": "endpoint", + "doc": "Service host", + "type": { + "$id": "1884", + "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": "1885", + "type": { + "$id": "1886", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "https://management.azure.com" + } + } + ], + "decorators": [ + { + "$id": "1887", + "name": "Azure.ResourceManager.@armResourceOperations", + "arguments": { + "$id": "1888" + } + } + ], + "crossLanguageDefinitionId": "Microsoft.StandbyPool.StandbyContainerGroupPools", + "apiVersions": [ + "2023-12-01-preview", + "2024-03-01-preview", + "2024-03-01", + "2025-03-01" + ], + "parent": { + "$ref": "553" + } + }, + { + "$id": "1889", + "kind": "client", + "name": "StandbyContainerGroupPoolRuntimeViews", + "namespace": "Azure.ResourceManager.StandbyPool", + "operations": [ + { + "$id": "1890", + "name": "get", + "resourceName": "StandbyContainerGroupPoolRuntimeViewResource", + "doc": "Get a StandbyContainerGroupPoolRuntimeViewResource", + "accessibility": "public", + "parameters": [ + { + "$id": "1891", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "1892", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "1893", + "type": { + "$id": "1894", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-03-01" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1895", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "1896", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "1897", + "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": "1898", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "1899", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1900", + "name": "standbyContainerGroupPoolName", + "nameInRequest": "standbyContainerGroupPoolName", + "doc": "Name of the standby container group pool", + "type": { + "$id": "1901", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1902", + "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": "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/{standbyContainerGroupPoolName}/runtimeViews/{runtimeView}", + "bufferResponse": true, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.StandbyPool.StandbyContainerGroupPoolRuntimeViews.get", + "decorators": [], + "examples": [ + { + "$id": "1908", + "kind": "http", + "name": "StandbyContainerGroupPoolRuntimeViews_Get", + "description": "StandbyContainerGroupPoolRuntimeViews_Get", + "filePath": "2025-03-01/StandbyContainerGroupPoolRuntimeViews_Get.json", + "parameters": [ + { + "$id": "1909", + "parameter": { + "$ref": "1891" + }, + "value": { + "$id": "1910", + "kind": "string", + "type": { + "$ref": "1892" + }, + "value": "2025-03-01" + } + }, + { + "$id": "1911", + "parameter": { + "$ref": "1895" + }, + "value": { + "$id": "1912", + "kind": "string", + "type": { + "$ref": "1896" + }, + "value": "00000000-0000-0000-0000-000000000009" + } + }, + { + "$id": "1913", + "parameter": { + "$ref": "1898" + }, + "value": { + "$id": "1914", + "kind": "string", + "type": { + "$ref": "1899" + }, + "value": "rgstandbypool" + } + }, + { + "$id": "1915", + "parameter": { + "$ref": "1900" + }, + "value": { + "$id": "1916", + "kind": "string", + "type": { + "$ref": "1901" + }, + "value": "pool" + } + }, + { + "$id": "1917", + "parameter": { + "$ref": "1902" + }, + "value": { + "$id": "1918", + "kind": "string", + "type": { + "$ref": "1903" + }, + "value": "latest" + } + } + ], + "responses": [ + { + "$id": "1919", + "response": { + "$ref": "1907" + }, + "statusCode": 200, + "bodyValue": { + "$id": "1920", + "kind": "model", + "type": { + "$ref": "489" + }, + "value": { + "$id": "1921", + "properties": { + "$id": "1922", + "kind": "model", + "type": { + "$ref": "491" + }, + "value": { + "$id": "1923", + "instanceCountSummary": { + "$id": "1924", + "kind": "array", + "type": { + "$ref": "493" + }, + "value": [ + { + "$id": "1925", + "kind": "model", + "type": { + "$ref": "494" + }, + "value": { + "$id": "1926", + "zone": { + "$id": "1927", + "kind": "number", + "type": { + "$ref": "496" + }, + "value": 1 + }, + "instanceCountsByState": { + "$id": "1928", + "kind": "array", + "type": { + "$ref": "500" + }, + "value": [ + { + "$id": "1929", + "kind": "model", + "type": { + "$ref": "501" + }, + "value": { + "$id": "1930", + "state": { + "$id": "1931", + "kind": "string", + "type": { + "$ref": "78" + }, + "value": "Creating" + }, + "count": { + "$id": "1932", + "kind": "number", + "type": { + "$ref": "506" + }, + "value": 100 + } + } + }, + { + "$id": "1933", + "kind": "model", + "type": { + "$ref": "501" + }, + "value": { + "$id": "1934", + "state": { + "$id": "1935", + "kind": "string", + "type": { + "$ref": "78" + }, + "value": "Running" + }, + "count": { + "$id": "1936", + "kind": "number", + "type": { + "$ref": "506" + }, + "value": 20 + } + } + }, + { + "$id": "1937", + "kind": "model", + "type": { + "$ref": "501" + }, + "value": { + "$id": "1938", + "state": { + "$id": "1939", + "kind": "string", + "type": { + "$ref": "78" + }, + "value": "Deleting" + }, + "count": { + "$id": "1940", + "kind": "number", + "type": { + "$ref": "506" + }, + "value": 21 + } + } + } + ] + } + } + }, + { + "$id": "1941", + "kind": "model", + "type": { + "$ref": "494" + }, + "value": { + "$id": "1942", + "zone": { + "$id": "1943", + "kind": "number", + "type": { + "$ref": "496" + }, + "value": 2 + }, + "instanceCountsByState": { + "$id": "1944", + "kind": "array", + "type": { + "$ref": "500" + }, + "value": [ + { + "$id": "1945", + "kind": "model", + "type": { + "$ref": "501" + }, + "value": { + "$id": "1946", + "state": { + "$id": "1947", + "kind": "string", + "type": { + "$ref": "78" + }, + "value": "Creating" + }, + "count": { + "$id": "1948", + "kind": "number", + "type": { + "$ref": "506" + }, + "value": 100 + } + } + }, + { + "$id": "1949", + "kind": "model", + "type": { + "$ref": "501" + }, + "value": { + "$id": "1950", + "state": { + "$id": "1951", + "kind": "string", + "type": { + "$ref": "78" + }, + "value": "Running" + }, + "count": { + "$id": "1952", + "kind": "number", + "type": { + "$ref": "506" + }, + "value": 500 + } + } + }, + { + "$id": "1953", + "kind": "model", + "type": { + "$ref": "501" + }, + "value": { + "$id": "1954", + "state": { + "$id": "1955", + "kind": "string", + "type": { + "$ref": "78" + }, + "value": "Deleting" + }, + "count": { + "$id": "1956", + "kind": "number", + "type": { + "$ref": "506" + }, + "value": 20 + } + } + } + ] + } + } + }, + { + "$id": "1957", + "kind": "model", + "type": { + "$ref": "494" + }, + "value": { + "$id": "1958", + "zone": { + "$id": "1959", + "kind": "number", + "type": { + "$ref": "496" + }, + "value": 3 + }, + "instanceCountsByState": { + "$id": "1960", + "kind": "array", + "type": { + "$ref": "500" + }, + "value": [ + { + "$id": "1961", + "kind": "model", + "type": { + "$ref": "501" + }, + "value": { + "$id": "1962", + "state": { + "$id": "1963", + "kind": "string", + "type": { + "$ref": "78" + }, + "value": "Creating" + }, + "count": { + "$id": "1964", + "kind": "number", + "type": { + "$ref": "506" + }, + "value": 100 + } + } + }, + { + "$id": "1965", + "kind": "model", + "type": { + "$ref": "501" + }, + "value": { + "$id": "1966", + "state": { + "$id": "1967", + "kind": "string", + "type": { + "$ref": "78" + }, + "value": "Running" + }, + "count": { + "$id": "1968", + "kind": "number", + "type": { + "$ref": "506" + }, + "value": 20 + } + } + }, + { + "$id": "1969", + "kind": "model", + "type": { + "$ref": "501" + }, + "value": { + "$id": "1970", + "state": { + "$id": "1971", + "kind": "string", + "type": { + "$ref": "78" + }, + "value": "Deleting" + }, + "count": { + "$id": "1972", + "kind": "number", + "type": { + "$ref": "506" + }, + "value": 7 + } + } + } + ] + } + } + } + ] + }, + "provisioningState": { + "$id": "1973", + "kind": "string", + "type": { + "$ref": "22" + }, + "value": "Succeeded" + }, + "status": { + "$id": "1974", + "kind": "model", + "type": { + "$ref": "359" + }, + "value": { + "$id": "1975", + "code": { + "$id": "1976", + "kind": "string", + "type": { + "$ref": "68" + }, + "value": "HealthState/healthy" + }, + "message": { + "$id": "1977", + "kind": "string", + "type": { + "$ref": "364" + }, + "value": "The pool is healthy." + } + } + }, + "prediction": { + "$id": "1978", + "kind": "model", + "type": { + "$ref": "520" + }, + "value": { + "$id": "1979", + "forecastValues": { + "$id": "1980", + "kind": "model", + "type": { + "$ref": "522" + }, + "value": { + "$id": "1981", + "instancesRequestedCount": { + "$id": "1982", + "kind": "array", + "type": { + "$ref": "524" + }, + "value": [ + { + "$id": "1983", + "kind": "number", + "type": { + "$ref": "525" + }, + "value": 24 + }, + { + "$id": "1984", + "kind": "number", + "type": { + "$ref": "525" + }, + "value": 10 + }, + { + "$id": "1985", + "kind": "number", + "type": { + "$ref": "525" + }, + "value": 200 + }, + { + "$id": "1986", + "kind": "number", + "type": { + "$ref": "525" + }, + "value": 12 + }, + { + "$id": "1987", + "kind": "number", + "type": { + "$ref": "525" + }, + "value": 5 + }, + { + "$id": "1988", + "kind": "number", + "type": { + "$ref": "525" + }, + "value": 10 + }, + { + "$id": "1989", + "kind": "number", + "type": { + "$ref": "525" + }, + "value": 15 + }, + { + "$id": "1990", + "kind": "number", + "type": { + "$ref": "525" + }, + "value": 23 + }, + { + "$id": "1991", + "kind": "number", + "type": { + "$ref": "525" + }, + "value": 56 + }, + { + "$id": "1992", + "kind": "number", + "type": { + "$ref": "525" + }, + "value": 38 + }, + { + "$id": "1993", + "kind": "number", + "type": { + "$ref": "525" + }, + "value": 12 + }, + { + "$id": "1994", + "kind": "number", + "type": { + "$ref": "525" + }, + "value": 19 + } + ] + } + } + }, + "forecastStartTime": { + "$id": "1995", + "kind": "string", + "type": { + "$ref": "531" + }, + "value": "2025-02-14T01:34:59.228Z" + }, + "forecastInfo": { + "$id": "1996", + "kind": "string", + "type": { + "$ref": "536" + }, + "value": "{\"forecastAccuracy\": 85, \"seriesUnitIntervalInMins\": 60, \"instancesRequestedCount_recentHistory\": \"[9, 4, 2, 8, 8, 2, 3, 6, 5, 3, 2, 6]\"}" + } + } + } + } + }, + "id": { + "$id": "1997", + "kind": "string", + "type": { + "$ref": "175" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000009/resourceGroups/rgstandbypool/providers/Microsoft.StandbyPool/standbyContainerGroupPools/pool/runtimeViews/latest" + }, + "name": { + "$id": "1998", + "kind": "string", + "type": { + "$ref": "180" + }, + "value": "pool" + }, + "type": { + "$id": "1999", + "kind": "string", + "type": { + "$ref": "184" + }, + "value": "Microsoft.StandbyPool/standbyContainerGroupPools/runtimeViews" + }, + "systemData": { + "$id": "2000", + "kind": "model", + "type": { + "$ref": "189" + }, + "value": { + "$id": "2001", + "createdBy": { + "$id": "2002", + "kind": "string", + "type": { + "$ref": "191" + }, + "value": "pooluser@microsoft.com" + }, + "createdByType": { + "$id": "2003", + "kind": "string", + "type": { + "$ref": "32" + }, + "value": "User" + }, + "createdAt": { + "$id": "2004", + "kind": "string", + "type": { + "$ref": "198" + }, + "value": "2023-09-07T16:33:22.210Z" + }, + "lastModifiedBy": { + "$id": "2005", + "kind": "string", + "type": { + "$ref": "203" + }, + "value": "pooluser@microsoft.com" + }, + "lastModifiedByType": { + "$id": "2006", + "kind": "string", + "type": { + "$ref": "32" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "2007", + "kind": "string", + "type": { + "$ref": "210" + }, + "value": "2023-09-07T16:33:22.210Z" + } + } + } + } + } + } + ] + } + ] + }, + { + "$id": "2008", + "name": "listByStandbyPool", + "resourceName": "StandbyContainerGroupPoolRuntimeViewResource", + "doc": "List StandbyContainerGroupPoolRuntimeViewResource resources by StandbyContainerGroupPoolResource", + "accessibility": "public", + "parameters": [ + { + "$id": "2009", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "2010", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "2011", + "type": { + "$id": "2012", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-03-01" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2013", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "2014", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "2015", + "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": "2016", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "2017", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2018", + "name": "standbyContainerGroupPoolName", + "nameInRequest": "standbyContainerGroupPoolName", + "doc": "Name of the standby container group pool", + "type": { + "$id": "2019", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2020", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "2021", + "kind": "constant", + "valueType": { + "$id": "2022", + "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": "2023", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "543" + }, + "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": "2024", + "itemPropertySegments": [ + "value" + ], + "nextLink": { + "$id": "2025", + "responseSegments": [ + "nextLink" + ], + "responseLocation": "Body" + } + }, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.StandbyPool.StandbyContainerGroupPoolRuntimeViews.listByStandbyPool", + "decorators": [], + "examples": [ + { + "$id": "2026", + "kind": "http", + "name": "StandbyContainerGroupPoolRuntimeViews_ListByStandbyPool", + "description": "StandbyContainerGroupPoolRuntimeViews_ListByStandbyPool", + "filePath": "2025-03-01/StandbyContainerGroupPoolRuntimeViews_ListByStandbyPool.json", + "parameters": [ + { + "$id": "2027", + "parameter": { + "$ref": "2009" + }, + "value": { + "$id": "2028", + "kind": "string", + "type": { + "$ref": "2010" + }, + "value": "2025-03-01" + } + }, + { + "$id": "2029", + "parameter": { + "$ref": "2013" + }, + "value": { + "$id": "2030", + "kind": "string", + "type": { + "$ref": "2014" + }, + "value": "00000000-0000-0000-0000-000000000009" + } + }, + { + "$id": "2031", + "parameter": { + "$ref": "2016" + }, + "value": { + "$id": "2032", + "kind": "string", + "type": { + "$ref": "2017" + }, + "value": "rgstandbypool" + } + }, + { + "$id": "2033", + "parameter": { + "$ref": "2018" + }, + "value": { + "$id": "2034", + "kind": "string", + "type": { + "$ref": "2019" + }, + "value": "pool" + } + } + ], + "responses": [ + { + "$id": "2035", + "response": { + "$ref": "2023" + }, + "statusCode": 200, + "bodyValue": { + "$id": "2036", + "kind": "model", + "type": { + "$ref": "543" + }, + "value": { + "$id": "2037", + "value": { + "$id": "2038", + "kind": "array", + "type": { + "$ref": "545" + }, + "value": [ + { + "$id": "2039", + "kind": "model", + "type": { + "$ref": "489" + }, + "value": { + "$id": "2040", + "properties": { + "$id": "2041", + "kind": "model", + "type": { + "$ref": "491" + }, + "value": { + "$id": "2042", + "instanceCountSummary": { + "$id": "2043", + "kind": "array", + "type": { + "$ref": "493" + }, + "value": [ + { + "$id": "2044", + "kind": "model", + "type": { + "$ref": "494" + }, + "value": { + "$id": "2045", + "zone": { + "$id": "2046", + "kind": "number", + "type": { + "$ref": "496" + }, + "value": 1 + }, + "instanceCountsByState": { + "$id": "2047", + "kind": "array", + "type": { + "$ref": "500" + }, + "value": [ + { + "$id": "2048", + "kind": "model", + "type": { + "$ref": "501" + }, + "value": { + "$id": "2049", + "state": { + "$id": "2050", + "kind": "string", + "type": { + "$ref": "78" + }, + "value": "Creating" + }, + "count": { + "$id": "2051", + "kind": "number", + "type": { + "$ref": "506" + }, + "value": 100 + } + } + }, + { + "$id": "2052", + "kind": "model", + "type": { + "$ref": "501" + }, + "value": { + "$id": "2053", + "state": { + "$id": "2054", + "kind": "string", + "type": { + "$ref": "78" + }, + "value": "Running" + }, + "count": { + "$id": "2055", + "kind": "number", + "type": { + "$ref": "506" + }, + "value": 20 + } + } + }, + { + "$id": "2056", + "kind": "model", + "type": { + "$ref": "501" + }, + "value": { + "$id": "2057", + "state": { + "$id": "2058", + "kind": "string", + "type": { + "$ref": "78" + }, + "value": "Deleting" + }, + "count": { + "$id": "2059", + "kind": "number", + "type": { + "$ref": "506" + }, + "value": 21 + } + } + } + ] + } + } + }, + { + "$id": "2060", + "kind": "model", + "type": { + "$ref": "494" + }, + "value": { + "$id": "2061", + "zone": { + "$id": "2062", + "kind": "number", + "type": { + "$ref": "496" + }, + "value": 2 + }, + "instanceCountsByState": { + "$id": "2063", + "kind": "array", + "type": { + "$ref": "500" + }, + "value": [ + { + "$id": "2064", + "kind": "model", + "type": { + "$ref": "501" + }, + "value": { + "$id": "2065", + "state": { + "$id": "2066", + "kind": "string", + "type": { + "$ref": "78" + }, + "value": "Creating" + }, + "count": { + "$id": "2067", + "kind": "number", + "type": { + "$ref": "506" + }, + "value": 100 + } + } + }, + { + "$id": "2068", + "kind": "model", + "type": { + "$ref": "501" + }, + "value": { + "$id": "2069", + "state": { + "$id": "2070", + "kind": "string", + "type": { + "$ref": "78" + }, + "value": "Running" + }, + "count": { + "$id": "2071", + "kind": "number", + "type": { + "$ref": "506" + }, + "value": 500 + } + } + }, + { + "$id": "2072", + "kind": "model", + "type": { + "$ref": "501" + }, + "value": { + "$id": "2073", + "state": { + "$id": "2074", + "kind": "string", + "type": { + "$ref": "78" + }, + "value": "Deleting" + }, + "count": { + "$id": "2075", + "kind": "number", + "type": { + "$ref": "506" + }, + "value": 20 + } + } + } + ] + } + } + }, + { + "$id": "2076", + "kind": "model", + "type": { + "$ref": "494" + }, + "value": { + "$id": "2077", + "zone": { + "$id": "2078", + "kind": "number", + "type": { + "$ref": "496" + }, + "value": 3 + }, + "instanceCountsByState": { + "$id": "2079", + "kind": "array", + "type": { + "$ref": "500" + }, + "value": [ + { + "$id": "2080", + "kind": "model", + "type": { + "$ref": "501" + }, + "value": { + "$id": "2081", + "state": { + "$id": "2082", + "kind": "string", + "type": { + "$ref": "78" + }, + "value": "Creating" + }, + "count": { + "$id": "2083", + "kind": "number", + "type": { + "$ref": "506" + }, + "value": 100 + } + } + }, + { + "$id": "2084", + "kind": "model", + "type": { + "$ref": "501" + }, + "value": { + "$id": "2085", + "state": { + "$id": "2086", + "kind": "string", + "type": { + "$ref": "78" + }, + "value": "Running" + }, + "count": { + "$id": "2087", + "kind": "number", + "type": { + "$ref": "506" + }, + "value": 20 + } + } + }, + { + "$id": "2088", + "kind": "model", + "type": { + "$ref": "501" + }, + "value": { + "$id": "2089", + "state": { + "$id": "2090", + "kind": "string", + "type": { + "$ref": "78" + }, + "value": "Deleting" + }, + "count": { + "$id": "2091", + "kind": "number", + "type": { + "$ref": "506" + }, + "value": 7 + } + } + } + ] + } + } + } + ] + }, + "provisioningState": { + "$id": "2092", + "kind": "string", + "type": { + "$ref": "22" + }, + "value": "Succeeded" + }, + "status": { + "$id": "2093", + "kind": "model", + "type": { + "$ref": "359" + }, + "value": { + "$id": "2094", + "code": { + "$id": "2095", + "kind": "string", + "type": { + "$ref": "68" + }, + "value": "HealthState/healthy" + }, + "message": { + "$id": "2096", + "kind": "string", + "type": { + "$ref": "364" + }, + "value": "The pool is healthy." + } + } + }, + "prediction": { + "$id": "2097", + "kind": "model", + "type": { + "$ref": "520" + }, + "value": { + "$id": "2098", + "forecastValues": { + "$id": "2099", + "kind": "model", + "type": { + "$ref": "522" + }, + "value": { + "$id": "2100", + "instancesRequestedCount": { + "$id": "2101", + "kind": "array", + "type": { + "$ref": "524" + }, + "value": [ + { + "$id": "2102", + "kind": "number", + "type": { + "$ref": "525" + }, + "value": 24 + }, + { + "$id": "2103", + "kind": "number", + "type": { + "$ref": "525" + }, + "value": 10 + }, + { + "$id": "2104", + "kind": "number", + "type": { + "$ref": "525" + }, + "value": 200 + }, + { + "$id": "2105", + "kind": "number", + "type": { + "$ref": "525" + }, + "value": 12 + }, + { + "$id": "2106", + "kind": "number", + "type": { + "$ref": "525" + }, + "value": 5 + }, + { + "$id": "2107", + "kind": "number", + "type": { + "$ref": "525" + }, + "value": 10 + }, + { + "$id": "2108", + "kind": "number", + "type": { + "$ref": "525" + }, + "value": 15 + }, + { + "$id": "2109", + "kind": "number", + "type": { + "$ref": "525" + }, + "value": 23 + }, + { + "$id": "2110", + "kind": "number", + "type": { + "$ref": "525" + }, + "value": 56 + }, + { + "$id": "2111", + "kind": "number", + "type": { + "$ref": "525" + }, + "value": 38 + }, + { + "$id": "2112", + "kind": "number", + "type": { + "$ref": "525" + }, + "value": 12 + }, + { + "$id": "2113", + "kind": "number", + "type": { + "$ref": "525" + }, + "value": 19 + } + ] + } + } + }, + "forecastStartTime": { + "$id": "2114", + "kind": "string", + "type": { + "$ref": "531" + }, + "value": "2025-02-14T01:34:59.228Z" + }, + "forecastInfo": { + "$id": "2115", + "kind": "string", + "type": { + "$ref": "536" + }, + "value": "{\"forecastAccuracy\": 85, \"seriesUnitIntervalInMins\": 60, \"instancesRequestedCount_recentHistory\": \"[9, 4, 2, 8, 8, 2, 3, 6, 5, 3, 2, 6]\"}" + } + } + } + } + }, + "id": { + "$id": "2116", + "kind": "string", + "type": { + "$ref": "175" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000009/resourceGroups/rgstandbypool/providers/Microsoft.StandbyPool/standbyContainerGroupPools/pool/runtimeViews/latest" + }, + "name": { + "$id": "2117", + "kind": "string", + "type": { + "$ref": "180" + }, + "value": "pool" + }, + "type": { + "$id": "2118", + "kind": "string", + "type": { + "$ref": "184" + }, + "value": "Microsoft.StandbyPool/standbyContainerGroupPools/runtimeViews" + }, + "systemData": { + "$id": "2119", + "kind": "model", + "type": { + "$ref": "189" + }, + "value": { + "$id": "2120", + "createdBy": { + "$id": "2121", + "kind": "string", + "type": { + "$ref": "191" + }, + "value": "pooluser@microsoft.com" + }, + "createdByType": { + "$id": "2122", + "kind": "string", + "type": { + "$ref": "32" + }, + "value": "User" + }, + "createdAt": { + "$id": "2123", + "kind": "string", + "type": { + "$ref": "198" + }, + "value": "2023-09-07T16:33:22.210Z" + }, + "lastModifiedBy": { + "$id": "2124", + "kind": "string", + "type": { + "$ref": "203" + }, + "value": "pooluser@microsoft.com" + }, + "lastModifiedByType": { + "$id": "2125", + "kind": "string", + "type": { + "$ref": "32" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "2126", + "kind": "string", + "type": { + "$ref": "210" + }, + "value": "2023-09-07T16:33:22.210Z" + } + } + } + } + } + ] + }, + "nextLink": { + "$id": "2127", + "kind": "string", + "type": { + "$ref": "549" + }, + "value": "https://microsoft.com/a" + } + } + } + } + ] + } + ] + } + ], + "parameters": [ + { + "$id": "2128", + "name": "endpoint", + "nameInRequest": "endpoint", + "doc": "Service host", + "type": { + "$id": "2129", + "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": "2130", + "type": { + "$id": "2131", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "https://management.azure.com" + } + } + ], + "decorators": [ + { + "$id": "2132", + "name": "Azure.ResourceManager.@armResourceOperations", + "arguments": { + "$id": "2133" + } + } + ], + "crossLanguageDefinitionId": "Microsoft.StandbyPool.StandbyContainerGroupPoolRuntimeViews", + "apiVersions": [ + "2024-03-01-preview", + "2024-03-01", + "2025-03-01" + ], + "parent": { + "$ref": "553" + } + } + ] + } + ], + "auth": { + "$id": "2134", + "oAuth2": { + "$id": "2135", + "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/terraform/Azure.ResourceManager.Terraform/api/Azure.ResourceManager.Terraform.net8.0.cs b/sdk/terraform/Azure.ResourceManager.Terraform/api/Azure.ResourceManager.Terraform.net8.0.cs index 6ba77b806a8b..0fc04bdf06eb 100644 --- a/sdk/terraform/Azure.ResourceManager.Terraform/api/Azure.ResourceManager.Terraform.net8.0.cs +++ b/sdk/terraform/Azure.ResourceManager.Terraform/api/Azure.ResourceManager.Terraform.net8.0.cs @@ -19,11 +19,31 @@ namespace Azure.ResourceManager.Terraform.Models { public static partial class ArmTerraformModelFactory { - public static Azure.ResourceManager.Terraform.Models.ExportQueryTerraform ExportQueryTerraform(Azure.ResourceManager.Terraform.Models.TargetTerraformProvider? targetProvider = default(Azure.ResourceManager.Terraform.Models.TargetTerraformProvider?), bool? isOutputFullPropertiesEnabled = default(bool?), bool? isMaskSensitiveEnabled = default(bool?), string query = null, string namePattern = null, bool? isRecursive = default(bool?)) { throw null; } + public static Azure.ResourceManager.Terraform.Models.ExportQueryTerraform ExportQueryTerraform(Azure.ResourceManager.Terraform.Models.TargetTerraformProvider? targetProvider = default(Azure.ResourceManager.Terraform.Models.TargetTerraformProvider?), bool? isOutputFullPropertiesEnabled = default(bool?), bool? isMaskSensitiveEnabled = default(bool?), string query = null, string namePattern = null, bool? isRecursive = default(bool?), string table = null, Azure.ResourceManager.Terraform.Models.AuthorizationScopeFilter? authorizationScopeFilter = default(Azure.ResourceManager.Terraform.Models.AuthorizationScopeFilter?)) { throw null; } public static Azure.ResourceManager.Terraform.Models.ExportResourceGroupTerraform ExportResourceGroupTerraform(Azure.ResourceManager.Terraform.Models.TargetTerraformProvider? targetProvider = default(Azure.ResourceManager.Terraform.Models.TargetTerraformProvider?), bool? isOutputFullPropertiesEnabled = default(bool?), bool? isMaskSensitiveEnabled = default(bool?), string resourceGroupName = null, string namePattern = null) { throw null; } - public static Azure.ResourceManager.Terraform.Models.TerraformExportResult TerraformExportResult(string configuration = null, System.Collections.Generic.IEnumerable skippedResourceIds = null, System.Collections.Generic.IEnumerable errors = null) { throw null; } + public static Azure.ResourceManager.Terraform.Models.TerraformExportResult TerraformExportResult(string configuration = null, string import = null, System.Collections.Generic.IEnumerable skippedResourceIds = null, System.Collections.Generic.IEnumerable errors = null) { throw null; } public static Azure.ResourceManager.Terraform.Models.TerraformOperationStatus TerraformOperationStatus(Azure.ResourceManager.Terraform.Models.TerraformExportResult properties = null, Azure.ResourceManager.Terraform.Models.TerraformResourceProvisioningState status = default(Azure.ResourceManager.Terraform.Models.TerraformResourceProvisioningState), string name = null, System.DateTimeOffset? startOn = default(System.DateTimeOffset?), System.DateTimeOffset? endOn = default(System.DateTimeOffset?), double? percentComplete = default(double?), Azure.ResponseError error = null) { throw null; } } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct AuthorizationScopeFilter : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public AuthorizationScopeFilter(string value) { throw null; } + public static Azure.ResourceManager.Terraform.Models.AuthorizationScopeFilter AtScopeAboveAndBelow { get { throw null; } } + public static Azure.ResourceManager.Terraform.Models.AuthorizationScopeFilter AtScopeAndAbove { get { throw null; } } + public static Azure.ResourceManager.Terraform.Models.AuthorizationScopeFilter AtScopeAndBelow { get { throw null; } } + public static Azure.ResourceManager.Terraform.Models.AuthorizationScopeFilter AtScopeExact { get { throw null; } } + public bool Equals(Azure.ResourceManager.Terraform.Models.AuthorizationScopeFilter 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.Terraform.Models.AuthorizationScopeFilter left, Azure.ResourceManager.Terraform.Models.AuthorizationScopeFilter right) { throw null; } + public static implicit operator Azure.ResourceManager.Terraform.Models.AuthorizationScopeFilter (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.Terraform.Models.AuthorizationScopeFilter left, Azure.ResourceManager.Terraform.Models.AuthorizationScopeFilter right) { throw null; } + public override string ToString() { throw null; } + } public abstract partial class CommonExportProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { protected CommonExportProperties() { } @@ -40,9 +60,11 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public partial class ExportQueryTerraform : Azure.ResourceManager.Terraform.Models.CommonExportProperties, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public ExportQueryTerraform(string query) { } + public Azure.ResourceManager.Terraform.Models.AuthorizationScopeFilter? AuthorizationScopeFilter { get { throw null; } set { } } public bool? IsRecursive { get { throw null; } set { } } public string NamePattern { get { throw null; } set { } } public string Query { get { throw null; } } + public string Table { get { throw null; } set { } } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Terraform.Models.ExportQueryTerraform System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -99,6 +121,7 @@ public partial class TerraformExportResult : System.ClientModel.Primitives.IJson internal TerraformExportResult() { } public string Configuration { get { throw null; } } public System.Collections.Generic.IReadOnlyList Errors { get { throw null; } } + public string Import { get { throw null; } } public System.Collections.Generic.IReadOnlyList SkippedResourceIds { get { throw null; } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Terraform.Models.TerraformExportResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } diff --git a/sdk/terraform/Azure.ResourceManager.Terraform/api/Azure.ResourceManager.Terraform.netstandard2.0.cs b/sdk/terraform/Azure.ResourceManager.Terraform/api/Azure.ResourceManager.Terraform.netstandard2.0.cs index 6ba77b806a8b..0fc04bdf06eb 100644 --- a/sdk/terraform/Azure.ResourceManager.Terraform/api/Azure.ResourceManager.Terraform.netstandard2.0.cs +++ b/sdk/terraform/Azure.ResourceManager.Terraform/api/Azure.ResourceManager.Terraform.netstandard2.0.cs @@ -19,11 +19,31 @@ namespace Azure.ResourceManager.Terraform.Models { public static partial class ArmTerraformModelFactory { - public static Azure.ResourceManager.Terraform.Models.ExportQueryTerraform ExportQueryTerraform(Azure.ResourceManager.Terraform.Models.TargetTerraformProvider? targetProvider = default(Azure.ResourceManager.Terraform.Models.TargetTerraformProvider?), bool? isOutputFullPropertiesEnabled = default(bool?), bool? isMaskSensitiveEnabled = default(bool?), string query = null, string namePattern = null, bool? isRecursive = default(bool?)) { throw null; } + public static Azure.ResourceManager.Terraform.Models.ExportQueryTerraform ExportQueryTerraform(Azure.ResourceManager.Terraform.Models.TargetTerraformProvider? targetProvider = default(Azure.ResourceManager.Terraform.Models.TargetTerraformProvider?), bool? isOutputFullPropertiesEnabled = default(bool?), bool? isMaskSensitiveEnabled = default(bool?), string query = null, string namePattern = null, bool? isRecursive = default(bool?), string table = null, Azure.ResourceManager.Terraform.Models.AuthorizationScopeFilter? authorizationScopeFilter = default(Azure.ResourceManager.Terraform.Models.AuthorizationScopeFilter?)) { throw null; } public static Azure.ResourceManager.Terraform.Models.ExportResourceGroupTerraform ExportResourceGroupTerraform(Azure.ResourceManager.Terraform.Models.TargetTerraformProvider? targetProvider = default(Azure.ResourceManager.Terraform.Models.TargetTerraformProvider?), bool? isOutputFullPropertiesEnabled = default(bool?), bool? isMaskSensitiveEnabled = default(bool?), string resourceGroupName = null, string namePattern = null) { throw null; } - public static Azure.ResourceManager.Terraform.Models.TerraformExportResult TerraformExportResult(string configuration = null, System.Collections.Generic.IEnumerable skippedResourceIds = null, System.Collections.Generic.IEnumerable errors = null) { throw null; } + public static Azure.ResourceManager.Terraform.Models.TerraformExportResult TerraformExportResult(string configuration = null, string import = null, System.Collections.Generic.IEnumerable skippedResourceIds = null, System.Collections.Generic.IEnumerable errors = null) { throw null; } public static Azure.ResourceManager.Terraform.Models.TerraformOperationStatus TerraformOperationStatus(Azure.ResourceManager.Terraform.Models.TerraformExportResult properties = null, Azure.ResourceManager.Terraform.Models.TerraformResourceProvisioningState status = default(Azure.ResourceManager.Terraform.Models.TerraformResourceProvisioningState), string name = null, System.DateTimeOffset? startOn = default(System.DateTimeOffset?), System.DateTimeOffset? endOn = default(System.DateTimeOffset?), double? percentComplete = default(double?), Azure.ResponseError error = null) { throw null; } } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct AuthorizationScopeFilter : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public AuthorizationScopeFilter(string value) { throw null; } + public static Azure.ResourceManager.Terraform.Models.AuthorizationScopeFilter AtScopeAboveAndBelow { get { throw null; } } + public static Azure.ResourceManager.Terraform.Models.AuthorizationScopeFilter AtScopeAndAbove { get { throw null; } } + public static Azure.ResourceManager.Terraform.Models.AuthorizationScopeFilter AtScopeAndBelow { get { throw null; } } + public static Azure.ResourceManager.Terraform.Models.AuthorizationScopeFilter AtScopeExact { get { throw null; } } + public bool Equals(Azure.ResourceManager.Terraform.Models.AuthorizationScopeFilter 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.Terraform.Models.AuthorizationScopeFilter left, Azure.ResourceManager.Terraform.Models.AuthorizationScopeFilter right) { throw null; } + public static implicit operator Azure.ResourceManager.Terraform.Models.AuthorizationScopeFilter (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.Terraform.Models.AuthorizationScopeFilter left, Azure.ResourceManager.Terraform.Models.AuthorizationScopeFilter right) { throw null; } + public override string ToString() { throw null; } + } public abstract partial class CommonExportProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { protected CommonExportProperties() { } @@ -40,9 +60,11 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public partial class ExportQueryTerraform : Azure.ResourceManager.Terraform.Models.CommonExportProperties, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public ExportQueryTerraform(string query) { } + public Azure.ResourceManager.Terraform.Models.AuthorizationScopeFilter? AuthorizationScopeFilter { get { throw null; } set { } } public bool? IsRecursive { get { throw null; } set { } } public string NamePattern { get { throw null; } set { } } public string Query { get { throw null; } } + public string Table { get { throw null; } set { } } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Terraform.Models.ExportQueryTerraform System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -99,6 +121,7 @@ public partial class TerraformExportResult : System.ClientModel.Primitives.IJson internal TerraformExportResult() { } public string Configuration { get { throw null; } } public System.Collections.Generic.IReadOnlyList Errors { get { throw null; } } + public string Import { get { throw null; } } public System.Collections.Generic.IReadOnlyList SkippedResourceIds { get { throw null; } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Terraform.Models.TerraformExportResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } diff --git a/sdk/terraform/Azure.ResourceManager.Terraform/src/Generated/ArmTerraformModelFactory.cs b/sdk/terraform/Azure.ResourceManager.Terraform/src/Generated/ArmTerraformModelFactory.cs index 72b56c7b2a60..ba1de21e590c 100644 --- a/sdk/terraform/Azure.ResourceManager.Terraform/src/Generated/ArmTerraformModelFactory.cs +++ b/sdk/terraform/Azure.ResourceManager.Terraform/src/Generated/ArmTerraformModelFactory.cs @@ -22,8 +22,10 @@ public static partial class ArmTerraformModelFactory /// The ARG where predicate. Note that you can combine multiple conditions in one `where` predicate, e.g. `resourceGroup =~ "my-rg" and type =~ "microsoft.network/virtualnetworks"`. /// The name pattern of the Terraform resources. /// Whether to recursively list child resources of the query result. + /// The ARG table name. + /// The ARG Scope Filter parameter. /// A new instance for mocking. - public static ExportQueryTerraform ExportQueryTerraform(TargetTerraformProvider? targetProvider = null, bool? isOutputFullPropertiesEnabled = null, bool? isMaskSensitiveEnabled = null, string query = null, string namePattern = null, bool? isRecursive = null) + public static ExportQueryTerraform ExportQueryTerraform(TargetTerraformProvider? targetProvider = null, bool? isOutputFullPropertiesEnabled = null, bool? isMaskSensitiveEnabled = null, string query = null, string namePattern = null, bool? isRecursive = null, string table = null, AuthorizationScopeFilter? authorizationScopeFilter = null) { return new ExportQueryTerraform( CommonExportType.ExportQuery, @@ -33,7 +35,9 @@ public static ExportQueryTerraform ExportQueryTerraform(TargetTerraformProvider? serializedAdditionalRawData: null, query, namePattern, - isRecursive); + isRecursive, + table, + authorizationScopeFilter); } /// Initializes a new instance of . @@ -79,15 +83,16 @@ public static TerraformOperationStatus TerraformOperationStatus(TerraformExportR /// Initializes a new instance of . /// The Terraform configuration content. + /// The Terraform import blocks for the current export, which users can use to run "terraform plan" with to import the resources. /// A list of Azure resources which are not exported to Terraform due to there is no corresponding resources in Terraform. /// A list of errors derived during exporting each resource. /// A new instance for mocking. - public static TerraformExportResult TerraformExportResult(string configuration = null, IEnumerable skippedResourceIds = null, IEnumerable errors = null) + public static TerraformExportResult TerraformExportResult(string configuration = null, string import = null, IEnumerable skippedResourceIds = null, IEnumerable errors = null) { skippedResourceIds ??= new List(); errors ??= new List(); - return new TerraformExportResult(configuration, skippedResourceIds?.ToList(), errors?.ToList(), serializedAdditionalRawData: null); + return new TerraformExportResult(configuration, import, skippedResourceIds?.ToList(), errors?.ToList(), serializedAdditionalRawData: null); } } } diff --git a/sdk/terraform/Azure.ResourceManager.Terraform/src/Generated/Models/AuthorizationScopeFilter.cs b/sdk/terraform/Azure.ResourceManager.Terraform/src/Generated/Models/AuthorizationScopeFilter.cs new file mode 100644 index 000000000000..70c537b28d37 --- /dev/null +++ b/sdk/terraform/Azure.ResourceManager.Terraform/src/Generated/Models/AuthorizationScopeFilter.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.Terraform.Models +{ + /// The Azure Resource Graph Authorization Scope Filter parameter. + public readonly partial struct AuthorizationScopeFilter : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public AuthorizationScopeFilter(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string AtScopeAndBelowValue = "AtScopeAndBelow"; + private const string AtScopeAndAboveValue = "AtScopeAndAbove"; + private const string AtScopeAboveAndBelowValue = "AtScopeAboveAndBelow"; + private const string AtScopeExactValue = "AtScopeExact"; + + /// Returns assignments for the given scope and all child scopes. + public static AuthorizationScopeFilter AtScopeAndBelow { get; } = new AuthorizationScopeFilter(AtScopeAndBelowValue); + /// Returns assignments for the given scope and all parent scopes, but not child scopes. + public static AuthorizationScopeFilter AtScopeAndAbove { get; } = new AuthorizationScopeFilter(AtScopeAndAboveValue); + /// Returns assignments for the given scope, all parent scopes, and all child scopes. + public static AuthorizationScopeFilter AtScopeAboveAndBelow { get; } = new AuthorizationScopeFilter(AtScopeAboveAndBelowValue); + /// Returns assignments only for the given scope; no parent or child scopes are included. + public static AuthorizationScopeFilter AtScopeExact { get; } = new AuthorizationScopeFilter(AtScopeExactValue); + /// Determines if two values are the same. + public static bool operator ==(AuthorizationScopeFilter left, AuthorizationScopeFilter right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(AuthorizationScopeFilter left, AuthorizationScopeFilter right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator AuthorizationScopeFilter(string value) => new AuthorizationScopeFilter(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is AuthorizationScopeFilter other && Equals(other); + /// + public bool Equals(AuthorizationScopeFilter 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/terraform/Azure.ResourceManager.Terraform/src/Generated/Models/ExportQueryTerraform.Serialization.cs b/sdk/terraform/Azure.ResourceManager.Terraform/src/Generated/Models/ExportQueryTerraform.Serialization.cs index 0fcb788785b7..261a97c122de 100644 --- a/sdk/terraform/Azure.ResourceManager.Terraform/src/Generated/Models/ExportQueryTerraform.Serialization.cs +++ b/sdk/terraform/Azure.ResourceManager.Terraform/src/Generated/Models/ExportQueryTerraform.Serialization.cs @@ -47,6 +47,16 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("recursive"u8); writer.WriteBooleanValue(IsRecursive.Value); } + if (Optional.IsDefined(Table)) + { + writer.WritePropertyName("table"u8); + writer.WriteStringValue(Table); + } + if (Optional.IsDefined(AuthorizationScopeFilter)) + { + writer.WritePropertyName("authorizationScopeFilter"u8); + writer.WriteStringValue(AuthorizationScopeFilter.Value.ToString()); + } } ExportQueryTerraform IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) @@ -72,6 +82,8 @@ internal static ExportQueryTerraform DeserializeExportQueryTerraform(JsonElement string query = default; string namePattern = default; bool? recursive = default; + string table = default; + AuthorizationScopeFilter? authorizationScopeFilter = default; CommonExportType type = default; TargetTerraformProvider? targetProvider = default; bool? fullProperties = default; @@ -99,6 +111,20 @@ internal static ExportQueryTerraform DeserializeExportQueryTerraform(JsonElement recursive = property.Value.GetBoolean(); continue; } + if (property.NameEquals("table"u8)) + { + table = property.Value.GetString(); + continue; + } + if (property.NameEquals("authorizationScopeFilter"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + authorizationScopeFilter = new AuthorizationScopeFilter(property.Value.GetString()); + continue; + } if (property.NameEquals("type"u8)) { type = new CommonExportType(property.Value.GetString()); @@ -145,7 +171,9 @@ internal static ExportQueryTerraform DeserializeExportQueryTerraform(JsonElement serializedAdditionalRawData, query, namePattern, - recursive); + recursive, + table, + authorizationScopeFilter); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/terraform/Azure.ResourceManager.Terraform/src/Generated/Models/ExportQueryTerraform.cs b/sdk/terraform/Azure.ResourceManager.Terraform/src/Generated/Models/ExportQueryTerraform.cs index 2d7c71a05d0c..13812280ac56 100644 --- a/sdk/terraform/Azure.ResourceManager.Terraform/src/Generated/Models/ExportQueryTerraform.cs +++ b/sdk/terraform/Azure.ResourceManager.Terraform/src/Generated/Models/ExportQueryTerraform.cs @@ -33,11 +33,15 @@ public ExportQueryTerraform(string query) /// The ARG where predicate. Note that you can combine multiple conditions in one `where` predicate, e.g. `resourceGroup =~ "my-rg" and type =~ "microsoft.network/virtualnetworks"`. /// The name pattern of the Terraform resources. /// Whether to recursively list child resources of the query result. - internal ExportQueryTerraform(CommonExportType type, TargetTerraformProvider? targetProvider, bool? isOutputFullPropertiesEnabled, bool? isMaskSensitiveEnabled, IDictionary serializedAdditionalRawData, string query, string namePattern, bool? isRecursive) : base(type, targetProvider, isOutputFullPropertiesEnabled, isMaskSensitiveEnabled, serializedAdditionalRawData) + /// The ARG table name. + /// The ARG Scope Filter parameter. + internal ExportQueryTerraform(CommonExportType type, TargetTerraformProvider? targetProvider, bool? isOutputFullPropertiesEnabled, bool? isMaskSensitiveEnabled, IDictionary serializedAdditionalRawData, string query, string namePattern, bool? isRecursive, string table, AuthorizationScopeFilter? authorizationScopeFilter) : base(type, targetProvider, isOutputFullPropertiesEnabled, isMaskSensitiveEnabled, serializedAdditionalRawData) { Query = query; NamePattern = namePattern; IsRecursive = isRecursive; + Table = table; + AuthorizationScopeFilter = authorizationScopeFilter; Type = type; } @@ -52,5 +56,9 @@ internal ExportQueryTerraform() public string NamePattern { get; set; } /// Whether to recursively list child resources of the query result. public bool? IsRecursive { get; set; } + /// The ARG table name. + public string Table { get; set; } + /// The ARG Scope Filter parameter. + public AuthorizationScopeFilter? AuthorizationScopeFilter { get; set; } } } diff --git a/sdk/terraform/Azure.ResourceManager.Terraform/src/Generated/Models/TerraformExportResult.Serialization.cs b/sdk/terraform/Azure.ResourceManager.Terraform/src/Generated/Models/TerraformExportResult.Serialization.cs index 614cffbb3768..21e7f51c7913 100644 --- a/sdk/terraform/Azure.ResourceManager.Terraform/src/Generated/Models/TerraformExportResult.Serialization.cs +++ b/sdk/terraform/Azure.ResourceManager.Terraform/src/Generated/Models/TerraformExportResult.Serialization.cs @@ -39,6 +39,11 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("configuration"u8); writer.WriteStringValue(Configuration); } + if (Optional.IsDefined(Import)) + { + writer.WritePropertyName("import"u8); + writer.WriteStringValue(Import); + } if (Optional.IsCollectionDefined(SkippedResourceIds)) { writer.WritePropertyName("skippedResources"u8); @@ -102,6 +107,7 @@ internal static TerraformExportResult DeserializeTerraformExportResult(JsonEleme return null; } string configuration = default; + string import = default; IReadOnlyList skippedResources = default; IReadOnlyList errors = default; IDictionary serializedAdditionalRawData = default; @@ -113,6 +119,11 @@ internal static TerraformExportResult DeserializeTerraformExportResult(JsonEleme configuration = property.Value.GetString(); continue; } + if (property.NameEquals("import"u8)) + { + import = property.Value.GetString(); + continue; + } if (property.NameEquals("skippedResources"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -154,7 +165,7 @@ internal static TerraformExportResult DeserializeTerraformExportResult(JsonEleme } } serializedAdditionalRawData = rawDataDictionary; - return new TerraformExportResult(configuration, skippedResources ?? new ChangeTrackingList(), errors ?? new ChangeTrackingList(), serializedAdditionalRawData); + return new TerraformExportResult(configuration, import, skippedResources ?? new ChangeTrackingList(), errors ?? new ChangeTrackingList(), serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/terraform/Azure.ResourceManager.Terraform/src/Generated/Models/TerraformExportResult.cs b/sdk/terraform/Azure.ResourceManager.Terraform/src/Generated/Models/TerraformExportResult.cs index 68a442fa99f7..2151ce67b5c2 100644 --- a/sdk/terraform/Azure.ResourceManager.Terraform/src/Generated/Models/TerraformExportResult.cs +++ b/sdk/terraform/Azure.ResourceManager.Terraform/src/Generated/Models/TerraformExportResult.cs @@ -55,12 +55,14 @@ internal TerraformExportResult() /// Initializes a new instance of . /// The Terraform configuration content. + /// The Terraform import blocks for the current export, which users can use to run "terraform plan" with to import the resources. /// A list of Azure resources which are not exported to Terraform due to there is no corresponding resources in Terraform. /// A list of errors derived during exporting each resource. /// Keeps track of any properties unknown to the library. - internal TerraformExportResult(string configuration, IReadOnlyList skippedResourceIds, IReadOnlyList errors, IDictionary serializedAdditionalRawData) + internal TerraformExportResult(string configuration, string import, IReadOnlyList skippedResourceIds, IReadOnlyList errors, IDictionary serializedAdditionalRawData) { Configuration = configuration; + Import = import; SkippedResourceIds = skippedResourceIds; Errors = errors; _serializedAdditionalRawData = serializedAdditionalRawData; @@ -68,6 +70,8 @@ internal TerraformExportResult(string configuration, IReadOnlyList The Terraform configuration content. public string Configuration { get; } + /// The Terraform import blocks for the current export, which users can use to run "terraform plan" with to import the resources. + public string Import { get; } /// A list of Azure resources which are not exported to Terraform due to there is no corresponding resources in Terraform. public IReadOnlyList SkippedResourceIds { get; } /// A list of errors derived during exporting each resource. diff --git a/sdk/terraform/Azure.ResourceManager.Terraform/tsp-location.yaml b/sdk/terraform/Azure.ResourceManager.Terraform/tsp-location.yaml index 118a13af21a0..b0c184281592 100644 --- a/sdk/terraform/Azure.ResourceManager.Terraform/tsp-location.yaml +++ b/sdk/terraform/Azure.ResourceManager.Terraform/tsp-location.yaml @@ -1,3 +1,4 @@ directory: specification/terraform/Microsoft.AzureTerraform.Management -commit: 2689e8f63f285a6476c6b040dc5dce132317da4b +commit: 6e702986ee542ebd38d0ab2e2f2c00ab48a50b45 repo: Azure/azure-rest-api-specs +additionalDirectories: 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..16c62a85b91e --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/tsp-location.yaml @@ -0,0 +1,4 @@ +directory: specification/workloads/Workloads.SAPVirtualInstance.Management +commit: 6e702986ee542ebd38d0ab2e2f2c00ab48a50b45 +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