diff --git a/sdk/agricultureplatform/Azure.ResourceManager.AgriculturePlatform/tsp-location.yaml b/sdk/agricultureplatform/Azure.ResourceManager.AgriculturePlatform/tsp-location.yaml index d42f5de7a940..decdc1097a9e 100644 --- a/sdk/agricultureplatform/Azure.ResourceManager.AgriculturePlatform/tsp-location.yaml +++ b/sdk/agricultureplatform/Azure.ResourceManager.AgriculturePlatform/tsp-location.yaml @@ -1,3 +1,4 @@ -directory: specification/agricultureplatform -commit: eeb0e92b55f6c56827df9e7d57f5e08bc633e077 -repo: Azure/azure-rest-api-specs \ No newline at end of file +directory: specification/agricultureplatform/AgriculturePlatform.Management +commit: af51fab0cc00ba3eaee7e4710e8fec5894d4bb0c +repo: Azure/azure-rest-api-specs +additionalDirectories: 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..abd82741573f 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: af51fab0cc00ba3eaee7e4710e8fec5894d4bb0c +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/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/tsp-location.yaml b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/tsp-location.yaml index f28c0988f7e4..37c2616a92e3 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: af51fab0cc00ba3eaee7e4710e8fec5894d4bb0c +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..b27815f7623c 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: af51fab0cc00ba3eaee7e4710e8fec5894d4bb0c 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/durabletask/Azure.ResourceManager.DurableTask/Azure.ResourceManager.DurableTask.sln b/sdk/durabletask/Azure.ResourceManager.DurableTask/Azure.ResourceManager.DurableTask.sln new file mode 100644 index 000000000000..4564bbd5499e --- /dev/null +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/Azure.ResourceManager.DurableTask.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.DurableTask.Samples", "samples\Azure.ResourceManager.DurableTask.Samples.csproj", "{7A2DFF15-5746-49F4-BD0F-C6C35337088A}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Azure.ResourceManager.DurableTask", "src\Azure.ResourceManager.DurableTask.csproj", "{28FF4005-4467-4E36-92E7-DEA27DEB1519}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Azure.ResourceManager.DurableTask.Tests", "tests\Azure.ResourceManager.DurableTask.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/durabletask/Azure.ResourceManager.DurableTask/CHANGELOG.md b/sdk/durabletask/Azure.ResourceManager.DurableTask/CHANGELOG.md new file mode 100644 index 000000000000..8b33f0fedccc --- /dev/null +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/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/durabletask/Azure.ResourceManager.DurableTask/Directory.Build.props b/sdk/durabletask/Azure.ResourceManager.DurableTask/Directory.Build.props new file mode 100644 index 000000000000..63bd836ad44b --- /dev/null +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/Directory.Build.props @@ -0,0 +1,6 @@ + + + + diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/README.md b/sdk/durabletask/Azure.ResourceManager.DurableTask/README.md new file mode 100644 index 000000000000..61c6950f4999 --- /dev/null +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/README.md @@ -0,0 +1,80 @@ +# Microsoft Azure DurableTask 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 DurableTask management library for .NET with [NuGet](https://www.nuget.org/): + +```dotnetcli +dotnet add package Azure.ResourceManager.DurableTask --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/durabletask/Azure.ResourceManager.DurableTask/api/Azure.ResourceManager.DurableTask.net8.0.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/api/Azure.ResourceManager.DurableTask.net8.0.cs new file mode 100644 index 000000000000..a6004dc50874 --- /dev/null +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/api/Azure.ResourceManager.DurableTask.net8.0.cs @@ -0,0 +1,351 @@ +namespace Azure.ResourceManager.DurableTask +{ + public static partial class DurableTaskExtensions + { + public static Azure.ResourceManager.DurableTask.RetentionPolicyResource GetRetentionPolicyResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.Response GetScheduler(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string schedulerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static System.Threading.Tasks.Task> GetSchedulerAsync(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string schedulerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.ResourceManager.DurableTask.SchedulerResource GetSchedulerResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.DurableTask.SchedulerCollection GetSchedulers(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource) { throw null; } + public static Azure.Pageable GetSchedulers(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.AsyncPageable GetSchedulersAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.ResourceManager.DurableTask.TaskHubResource GetTaskHubResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + } + public partial class RetentionPolicyData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public RetentionPolicyData() { } + public Azure.ResourceManager.DurableTask.Models.RetentionPolicyProperties Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DurableTask.RetentionPolicyData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DurableTask.RetentionPolicyData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class RetentionPolicyResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected RetentionPolicyResource() { } + public virtual Azure.ResourceManager.DurableTask.RetentionPolicyData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, Azure.ResourceManager.DurableTask.RetentionPolicyData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.DurableTask.RetentionPolicyData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string schedulerName) { 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.DurableTask.RetentionPolicyData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DurableTask.RetentionPolicyData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.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.DurableTask.RetentionPolicyData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.DurableTask.RetentionPolicyData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class SchedulerCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected SchedulerCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string schedulerName, Azure.ResourceManager.DurableTask.SchedulerData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string schedulerName, Azure.ResourceManager.DurableTask.SchedulerData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string schedulerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string schedulerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string schedulerName, 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 schedulerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string schedulerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string schedulerName, 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 SchedulerData : Azure.ResourceManager.Models.TrackedResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public SchedulerData(Azure.Core.AzureLocation location) { } + public Azure.ResourceManager.DurableTask.Models.SchedulerProperties Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DurableTask.SchedulerData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DurableTask.SchedulerData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class SchedulerResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected SchedulerResource() { } + public virtual Azure.ResourceManager.DurableTask.SchedulerData 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 schedulerName) { 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.DurableTask.RetentionPolicyResource GetRetentionPolicy() { throw null; } + public virtual Azure.Response GetTaskHub(string taskHubName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetTaskHubAsync(string taskHubName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.DurableTask.TaskHubCollection GetTaskHubs() { 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.DurableTask.SchedulerData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DurableTask.SchedulerData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.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.DurableTask.Models.SchedulerPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.DurableTask.Models.SchedulerPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class TaskHubCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected TaskHubCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string taskHubName, Azure.ResourceManager.DurableTask.TaskHubData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string taskHubName, Azure.ResourceManager.DurableTask.TaskHubData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string taskHubName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string taskHubName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string taskHubName, 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 taskHubName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string taskHubName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string taskHubName, 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 TaskHubData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public TaskHubData() { } + public Azure.ResourceManager.DurableTask.Models.TaskHubProperties Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DurableTask.TaskHubData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DurableTask.TaskHubData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class TaskHubResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected TaskHubResource() { } + public virtual Azure.ResourceManager.DurableTask.TaskHubData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string schedulerName, string taskHubName) { 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.DurableTask.TaskHubData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DurableTask.TaskHubData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.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.DurableTask.TaskHubData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.DurableTask.TaskHubData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } +} +namespace Azure.ResourceManager.DurableTask.Mocking +{ + public partial class MockableDurableTaskArmClient : Azure.ResourceManager.ArmResource + { + protected MockableDurableTaskArmClient() { } + public virtual Azure.ResourceManager.DurableTask.RetentionPolicyResource GetRetentionPolicyResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.DurableTask.SchedulerResource GetSchedulerResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.DurableTask.TaskHubResource GetTaskHubResource(Azure.Core.ResourceIdentifier id) { throw null; } + } + public partial class MockableDurableTaskResourceGroupResource : Azure.ResourceManager.ArmResource + { + protected MockableDurableTaskResourceGroupResource() { } + public virtual Azure.Response GetScheduler(string schedulerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetSchedulerAsync(string schedulerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.DurableTask.SchedulerCollection GetSchedulers() { throw null; } + } + public partial class MockableDurableTaskSubscriptionResource : Azure.ResourceManager.ArmResource + { + protected MockableDurableTaskSubscriptionResource() { } + public virtual Azure.Pageable GetSchedulers(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetSchedulersAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } +} +namespace Azure.ResourceManager.DurableTask.Models +{ + public static partial class ArmDurableTaskModelFactory + { + public static Azure.ResourceManager.DurableTask.RetentionPolicyData RetentionPolicyData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.DurableTask.Models.RetentionPolicyProperties properties = null) { throw null; } + public static Azure.ResourceManager.DurableTask.Models.RetentionPolicyProperties RetentionPolicyProperties(Azure.ResourceManager.DurableTask.Models.ProvisioningState? provisioningState = default(Azure.ResourceManager.DurableTask.Models.ProvisioningState?), System.Collections.Generic.IEnumerable retentionPolicies = null) { throw null; } + public static Azure.ResourceManager.DurableTask.SchedulerData SchedulerData(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.DurableTask.Models.SchedulerProperties properties = null) { throw null; } + public static Azure.ResourceManager.DurableTask.Models.SchedulerProperties SchedulerProperties(Azure.ResourceManager.DurableTask.Models.ProvisioningState? provisioningState = default(Azure.ResourceManager.DurableTask.Models.ProvisioningState?), string endpoint = null, System.Collections.Generic.IEnumerable ipAllowlist = null, Azure.ResourceManager.DurableTask.Models.SchedulerSku sku = null) { throw null; } + public static Azure.ResourceManager.DurableTask.Models.SchedulerPropertiesUpdate SchedulerPropertiesUpdate(Azure.ResourceManager.DurableTask.Models.ProvisioningState? provisioningState = default(Azure.ResourceManager.DurableTask.Models.ProvisioningState?), string endpoint = null, System.Collections.Generic.IEnumerable ipAllowlist = null, Azure.ResourceManager.DurableTask.Models.SchedulerSkuUpdate sku = null) { throw null; } + public static Azure.ResourceManager.DurableTask.Models.SchedulerSku SchedulerSku(string name = null, int? capacity = default(int?), Azure.ResourceManager.DurableTask.Models.RedundancyState? redundancyState = default(Azure.ResourceManager.DurableTask.Models.RedundancyState?)) { throw null; } + public static Azure.ResourceManager.DurableTask.Models.SchedulerSkuUpdate SchedulerSkuUpdate(string name = null, int? capacity = default(int?), Azure.ResourceManager.DurableTask.Models.RedundancyState? redundancyState = default(Azure.ResourceManager.DurableTask.Models.RedundancyState?)) { throw null; } + public static Azure.ResourceManager.DurableTask.TaskHubData TaskHubData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.DurableTask.Models.TaskHubProperties properties = null) { throw null; } + public static Azure.ResourceManager.DurableTask.Models.TaskHubProperties TaskHubProperties(Azure.ResourceManager.DurableTask.Models.ProvisioningState? provisioningState = default(Azure.ResourceManager.DurableTask.Models.ProvisioningState?), System.Uri dashboardUri = null) { 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.DurableTask.Models.ProvisioningState Accepted { get { throw null; } } + public static Azure.ResourceManager.DurableTask.Models.ProvisioningState Canceled { get { throw null; } } + public static Azure.ResourceManager.DurableTask.Models.ProvisioningState Deleting { get { throw null; } } + public static Azure.ResourceManager.DurableTask.Models.ProvisioningState Failed { get { throw null; } } + public static Azure.ResourceManager.DurableTask.Models.ProvisioningState Provisioning { get { throw null; } } + public static Azure.ResourceManager.DurableTask.Models.ProvisioningState Succeeded { get { throw null; } } + public static Azure.ResourceManager.DurableTask.Models.ProvisioningState Updating { get { throw null; } } + public bool Equals(Azure.ResourceManager.DurableTask.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.DurableTask.Models.ProvisioningState left, Azure.ResourceManager.DurableTask.Models.ProvisioningState right) { throw null; } + public static implicit operator Azure.ResourceManager.DurableTask.Models.ProvisioningState (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.DurableTask.Models.ProvisioningState left, Azure.ResourceManager.DurableTask.Models.ProvisioningState right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct PurgeableOrchestrationState : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public PurgeableOrchestrationState(string value) { throw null; } + public static Azure.ResourceManager.DurableTask.Models.PurgeableOrchestrationState Canceled { get { throw null; } } + public static Azure.ResourceManager.DurableTask.Models.PurgeableOrchestrationState Completed { get { throw null; } } + public static Azure.ResourceManager.DurableTask.Models.PurgeableOrchestrationState Failed { get { throw null; } } + public static Azure.ResourceManager.DurableTask.Models.PurgeableOrchestrationState Terminated { get { throw null; } } + public bool Equals(Azure.ResourceManager.DurableTask.Models.PurgeableOrchestrationState 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.DurableTask.Models.PurgeableOrchestrationState left, Azure.ResourceManager.DurableTask.Models.PurgeableOrchestrationState right) { throw null; } + public static implicit operator Azure.ResourceManager.DurableTask.Models.PurgeableOrchestrationState (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.DurableTask.Models.PurgeableOrchestrationState left, Azure.ResourceManager.DurableTask.Models.PurgeableOrchestrationState right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct RedundancyState : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public RedundancyState(string value) { throw null; } + public static Azure.ResourceManager.DurableTask.Models.RedundancyState None { get { throw null; } } + public static Azure.ResourceManager.DurableTask.Models.RedundancyState Zone { get { throw null; } } + public bool Equals(Azure.ResourceManager.DurableTask.Models.RedundancyState 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.DurableTask.Models.RedundancyState left, Azure.ResourceManager.DurableTask.Models.RedundancyState right) { throw null; } + public static implicit operator Azure.ResourceManager.DurableTask.Models.RedundancyState (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.DurableTask.Models.RedundancyState left, Azure.ResourceManager.DurableTask.Models.RedundancyState right) { throw null; } + public override string ToString() { throw null; } + } + public partial class RetentionPolicyDetails : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public RetentionPolicyDetails(int retentionPeriodInDays) { } + public Azure.ResourceManager.DurableTask.Models.PurgeableOrchestrationState? OrchestrationState { get { throw null; } set { } } + public int RetentionPeriodInDays { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DurableTask.Models.RetentionPolicyDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DurableTask.Models.RetentionPolicyDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class RetentionPolicyProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public RetentionPolicyProperties() { } + public Azure.ResourceManager.DurableTask.Models.ProvisioningState? ProvisioningState { get { throw null; } } + public System.Collections.Generic.IList RetentionPolicies { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DurableTask.Models.RetentionPolicyProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DurableTask.Models.RetentionPolicyProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class SchedulerPatch : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public SchedulerPatch() { } + public Azure.ResourceManager.DurableTask.Models.SchedulerPropertiesUpdate 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.DurableTask.Models.SchedulerPatch System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DurableTask.Models.SchedulerPatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class SchedulerProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public SchedulerProperties(System.Collections.Generic.IEnumerable ipAllowlist, Azure.ResourceManager.DurableTask.Models.SchedulerSku sku) { } + public string Endpoint { get { throw null; } } + public System.Collections.Generic.IList IPAllowlist { get { throw null; } } + public Azure.ResourceManager.DurableTask.Models.ProvisioningState? ProvisioningState { get { throw null; } } + public Azure.ResourceManager.DurableTask.Models.SchedulerSku Sku { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DurableTask.Models.SchedulerProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DurableTask.Models.SchedulerProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class SchedulerPropertiesUpdate : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public SchedulerPropertiesUpdate() { } + public string Endpoint { get { throw null; } } + public System.Collections.Generic.IList IPAllowlist { get { throw null; } } + public Azure.ResourceManager.DurableTask.Models.ProvisioningState? ProvisioningState { get { throw null; } } + public Azure.ResourceManager.DurableTask.Models.SchedulerSkuUpdate Sku { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DurableTask.Models.SchedulerPropertiesUpdate System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DurableTask.Models.SchedulerPropertiesUpdate System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class SchedulerSku : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public SchedulerSku(string name) { } + public int? Capacity { get { throw null; } set { } } + public string Name { get { throw null; } set { } } + public Azure.ResourceManager.DurableTask.Models.RedundancyState? RedundancyState { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DurableTask.Models.SchedulerSku System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DurableTask.Models.SchedulerSku System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class SchedulerSkuUpdate : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public SchedulerSkuUpdate() { } + public int? Capacity { get { throw null; } set { } } + public string Name { get { throw null; } set { } } + public Azure.ResourceManager.DurableTask.Models.RedundancyState? RedundancyState { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DurableTask.Models.SchedulerSkuUpdate System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DurableTask.Models.SchedulerSkuUpdate System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class TaskHubProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public TaskHubProperties() { } + public System.Uri DashboardUri { get { throw null; } } + public Azure.ResourceManager.DurableTask.Models.ProvisioningState? ProvisioningState { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DurableTask.Models.TaskHubProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DurableTask.Models.TaskHubProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.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/durabletask/Azure.ResourceManager.DurableTask/api/Azure.ResourceManager.DurableTask.netstandard2.0.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/api/Azure.ResourceManager.DurableTask.netstandard2.0.cs new file mode 100644 index 000000000000..a6004dc50874 --- /dev/null +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/api/Azure.ResourceManager.DurableTask.netstandard2.0.cs @@ -0,0 +1,351 @@ +namespace Azure.ResourceManager.DurableTask +{ + public static partial class DurableTaskExtensions + { + public static Azure.ResourceManager.DurableTask.RetentionPolicyResource GetRetentionPolicyResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.Response GetScheduler(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string schedulerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static System.Threading.Tasks.Task> GetSchedulerAsync(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string schedulerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.ResourceManager.DurableTask.SchedulerResource GetSchedulerResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.DurableTask.SchedulerCollection GetSchedulers(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource) { throw null; } + public static Azure.Pageable GetSchedulers(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.AsyncPageable GetSchedulersAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.ResourceManager.DurableTask.TaskHubResource GetTaskHubResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + } + public partial class RetentionPolicyData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public RetentionPolicyData() { } + public Azure.ResourceManager.DurableTask.Models.RetentionPolicyProperties Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DurableTask.RetentionPolicyData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DurableTask.RetentionPolicyData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class RetentionPolicyResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected RetentionPolicyResource() { } + public virtual Azure.ResourceManager.DurableTask.RetentionPolicyData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, Azure.ResourceManager.DurableTask.RetentionPolicyData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.DurableTask.RetentionPolicyData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string schedulerName) { 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.DurableTask.RetentionPolicyData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DurableTask.RetentionPolicyData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.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.DurableTask.RetentionPolicyData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.DurableTask.RetentionPolicyData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class SchedulerCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected SchedulerCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string schedulerName, Azure.ResourceManager.DurableTask.SchedulerData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string schedulerName, Azure.ResourceManager.DurableTask.SchedulerData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string schedulerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string schedulerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string schedulerName, 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 schedulerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string schedulerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string schedulerName, 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 SchedulerData : Azure.ResourceManager.Models.TrackedResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public SchedulerData(Azure.Core.AzureLocation location) { } + public Azure.ResourceManager.DurableTask.Models.SchedulerProperties Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DurableTask.SchedulerData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DurableTask.SchedulerData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class SchedulerResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected SchedulerResource() { } + public virtual Azure.ResourceManager.DurableTask.SchedulerData 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 schedulerName) { 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.DurableTask.RetentionPolicyResource GetRetentionPolicy() { throw null; } + public virtual Azure.Response GetTaskHub(string taskHubName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetTaskHubAsync(string taskHubName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.DurableTask.TaskHubCollection GetTaskHubs() { 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.DurableTask.SchedulerData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DurableTask.SchedulerData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.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.DurableTask.Models.SchedulerPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.DurableTask.Models.SchedulerPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class TaskHubCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected TaskHubCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string taskHubName, Azure.ResourceManager.DurableTask.TaskHubData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string taskHubName, Azure.ResourceManager.DurableTask.TaskHubData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string taskHubName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string taskHubName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string taskHubName, 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 taskHubName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string taskHubName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string taskHubName, 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 TaskHubData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public TaskHubData() { } + public Azure.ResourceManager.DurableTask.Models.TaskHubProperties Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DurableTask.TaskHubData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DurableTask.TaskHubData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class TaskHubResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected TaskHubResource() { } + public virtual Azure.ResourceManager.DurableTask.TaskHubData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string schedulerName, string taskHubName) { 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.DurableTask.TaskHubData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DurableTask.TaskHubData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.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.DurableTask.TaskHubData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.DurableTask.TaskHubData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } +} +namespace Azure.ResourceManager.DurableTask.Mocking +{ + public partial class MockableDurableTaskArmClient : Azure.ResourceManager.ArmResource + { + protected MockableDurableTaskArmClient() { } + public virtual Azure.ResourceManager.DurableTask.RetentionPolicyResource GetRetentionPolicyResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.DurableTask.SchedulerResource GetSchedulerResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.DurableTask.TaskHubResource GetTaskHubResource(Azure.Core.ResourceIdentifier id) { throw null; } + } + public partial class MockableDurableTaskResourceGroupResource : Azure.ResourceManager.ArmResource + { + protected MockableDurableTaskResourceGroupResource() { } + public virtual Azure.Response GetScheduler(string schedulerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetSchedulerAsync(string schedulerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.DurableTask.SchedulerCollection GetSchedulers() { throw null; } + } + public partial class MockableDurableTaskSubscriptionResource : Azure.ResourceManager.ArmResource + { + protected MockableDurableTaskSubscriptionResource() { } + public virtual Azure.Pageable GetSchedulers(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetSchedulersAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } +} +namespace Azure.ResourceManager.DurableTask.Models +{ + public static partial class ArmDurableTaskModelFactory + { + public static Azure.ResourceManager.DurableTask.RetentionPolicyData RetentionPolicyData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.DurableTask.Models.RetentionPolicyProperties properties = null) { throw null; } + public static Azure.ResourceManager.DurableTask.Models.RetentionPolicyProperties RetentionPolicyProperties(Azure.ResourceManager.DurableTask.Models.ProvisioningState? provisioningState = default(Azure.ResourceManager.DurableTask.Models.ProvisioningState?), System.Collections.Generic.IEnumerable retentionPolicies = null) { throw null; } + public static Azure.ResourceManager.DurableTask.SchedulerData SchedulerData(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.DurableTask.Models.SchedulerProperties properties = null) { throw null; } + public static Azure.ResourceManager.DurableTask.Models.SchedulerProperties SchedulerProperties(Azure.ResourceManager.DurableTask.Models.ProvisioningState? provisioningState = default(Azure.ResourceManager.DurableTask.Models.ProvisioningState?), string endpoint = null, System.Collections.Generic.IEnumerable ipAllowlist = null, Azure.ResourceManager.DurableTask.Models.SchedulerSku sku = null) { throw null; } + public static Azure.ResourceManager.DurableTask.Models.SchedulerPropertiesUpdate SchedulerPropertiesUpdate(Azure.ResourceManager.DurableTask.Models.ProvisioningState? provisioningState = default(Azure.ResourceManager.DurableTask.Models.ProvisioningState?), string endpoint = null, System.Collections.Generic.IEnumerable ipAllowlist = null, Azure.ResourceManager.DurableTask.Models.SchedulerSkuUpdate sku = null) { throw null; } + public static Azure.ResourceManager.DurableTask.Models.SchedulerSku SchedulerSku(string name = null, int? capacity = default(int?), Azure.ResourceManager.DurableTask.Models.RedundancyState? redundancyState = default(Azure.ResourceManager.DurableTask.Models.RedundancyState?)) { throw null; } + public static Azure.ResourceManager.DurableTask.Models.SchedulerSkuUpdate SchedulerSkuUpdate(string name = null, int? capacity = default(int?), Azure.ResourceManager.DurableTask.Models.RedundancyState? redundancyState = default(Azure.ResourceManager.DurableTask.Models.RedundancyState?)) { throw null; } + public static Azure.ResourceManager.DurableTask.TaskHubData TaskHubData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.DurableTask.Models.TaskHubProperties properties = null) { throw null; } + public static Azure.ResourceManager.DurableTask.Models.TaskHubProperties TaskHubProperties(Azure.ResourceManager.DurableTask.Models.ProvisioningState? provisioningState = default(Azure.ResourceManager.DurableTask.Models.ProvisioningState?), System.Uri dashboardUri = null) { 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.DurableTask.Models.ProvisioningState Accepted { get { throw null; } } + public static Azure.ResourceManager.DurableTask.Models.ProvisioningState Canceled { get { throw null; } } + public static Azure.ResourceManager.DurableTask.Models.ProvisioningState Deleting { get { throw null; } } + public static Azure.ResourceManager.DurableTask.Models.ProvisioningState Failed { get { throw null; } } + public static Azure.ResourceManager.DurableTask.Models.ProvisioningState Provisioning { get { throw null; } } + public static Azure.ResourceManager.DurableTask.Models.ProvisioningState Succeeded { get { throw null; } } + public static Azure.ResourceManager.DurableTask.Models.ProvisioningState Updating { get { throw null; } } + public bool Equals(Azure.ResourceManager.DurableTask.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.DurableTask.Models.ProvisioningState left, Azure.ResourceManager.DurableTask.Models.ProvisioningState right) { throw null; } + public static implicit operator Azure.ResourceManager.DurableTask.Models.ProvisioningState (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.DurableTask.Models.ProvisioningState left, Azure.ResourceManager.DurableTask.Models.ProvisioningState right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct PurgeableOrchestrationState : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public PurgeableOrchestrationState(string value) { throw null; } + public static Azure.ResourceManager.DurableTask.Models.PurgeableOrchestrationState Canceled { get { throw null; } } + public static Azure.ResourceManager.DurableTask.Models.PurgeableOrchestrationState Completed { get { throw null; } } + public static Azure.ResourceManager.DurableTask.Models.PurgeableOrchestrationState Failed { get { throw null; } } + public static Azure.ResourceManager.DurableTask.Models.PurgeableOrchestrationState Terminated { get { throw null; } } + public bool Equals(Azure.ResourceManager.DurableTask.Models.PurgeableOrchestrationState 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.DurableTask.Models.PurgeableOrchestrationState left, Azure.ResourceManager.DurableTask.Models.PurgeableOrchestrationState right) { throw null; } + public static implicit operator Azure.ResourceManager.DurableTask.Models.PurgeableOrchestrationState (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.DurableTask.Models.PurgeableOrchestrationState left, Azure.ResourceManager.DurableTask.Models.PurgeableOrchestrationState right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct RedundancyState : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public RedundancyState(string value) { throw null; } + public static Azure.ResourceManager.DurableTask.Models.RedundancyState None { get { throw null; } } + public static Azure.ResourceManager.DurableTask.Models.RedundancyState Zone { get { throw null; } } + public bool Equals(Azure.ResourceManager.DurableTask.Models.RedundancyState 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.DurableTask.Models.RedundancyState left, Azure.ResourceManager.DurableTask.Models.RedundancyState right) { throw null; } + public static implicit operator Azure.ResourceManager.DurableTask.Models.RedundancyState (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.DurableTask.Models.RedundancyState left, Azure.ResourceManager.DurableTask.Models.RedundancyState right) { throw null; } + public override string ToString() { throw null; } + } + public partial class RetentionPolicyDetails : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public RetentionPolicyDetails(int retentionPeriodInDays) { } + public Azure.ResourceManager.DurableTask.Models.PurgeableOrchestrationState? OrchestrationState { get { throw null; } set { } } + public int RetentionPeriodInDays { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DurableTask.Models.RetentionPolicyDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DurableTask.Models.RetentionPolicyDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class RetentionPolicyProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public RetentionPolicyProperties() { } + public Azure.ResourceManager.DurableTask.Models.ProvisioningState? ProvisioningState { get { throw null; } } + public System.Collections.Generic.IList RetentionPolicies { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DurableTask.Models.RetentionPolicyProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DurableTask.Models.RetentionPolicyProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class SchedulerPatch : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public SchedulerPatch() { } + public Azure.ResourceManager.DurableTask.Models.SchedulerPropertiesUpdate 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.DurableTask.Models.SchedulerPatch System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DurableTask.Models.SchedulerPatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class SchedulerProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public SchedulerProperties(System.Collections.Generic.IEnumerable ipAllowlist, Azure.ResourceManager.DurableTask.Models.SchedulerSku sku) { } + public string Endpoint { get { throw null; } } + public System.Collections.Generic.IList IPAllowlist { get { throw null; } } + public Azure.ResourceManager.DurableTask.Models.ProvisioningState? ProvisioningState { get { throw null; } } + public Azure.ResourceManager.DurableTask.Models.SchedulerSku Sku { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DurableTask.Models.SchedulerProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DurableTask.Models.SchedulerProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class SchedulerPropertiesUpdate : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public SchedulerPropertiesUpdate() { } + public string Endpoint { get { throw null; } } + public System.Collections.Generic.IList IPAllowlist { get { throw null; } } + public Azure.ResourceManager.DurableTask.Models.ProvisioningState? ProvisioningState { get { throw null; } } + public Azure.ResourceManager.DurableTask.Models.SchedulerSkuUpdate Sku { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DurableTask.Models.SchedulerPropertiesUpdate System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DurableTask.Models.SchedulerPropertiesUpdate System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class SchedulerSku : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public SchedulerSku(string name) { } + public int? Capacity { get { throw null; } set { } } + public string Name { get { throw null; } set { } } + public Azure.ResourceManager.DurableTask.Models.RedundancyState? RedundancyState { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DurableTask.Models.SchedulerSku System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DurableTask.Models.SchedulerSku System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class SchedulerSkuUpdate : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public SchedulerSkuUpdate() { } + public int? Capacity { get { throw null; } set { } } + public string Name { get { throw null; } set { } } + public Azure.ResourceManager.DurableTask.Models.RedundancyState? RedundancyState { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DurableTask.Models.SchedulerSkuUpdate System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DurableTask.Models.SchedulerSkuUpdate System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class TaskHubProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public TaskHubProperties() { } + public System.Uri DashboardUri { get { throw null; } } + public Azure.ResourceManager.DurableTask.Models.ProvisioningState? ProvisioningState { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DurableTask.Models.TaskHubProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DurableTask.Models.TaskHubProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.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/durabletask/Azure.ResourceManager.DurableTask/assets.json b/sdk/durabletask/Azure.ResourceManager.DurableTask/assets.json new file mode 100644 index 000000000000..56671aacf0f5 --- /dev/null +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/assets.json @@ -0,0 +1,7 @@ + +{ + "AssetsRepo": "Azure/azure-sdk-assets", + "AssetsRepoPrefixPath": "net", + "TagPrefix": "net/durabletask/Azure.ResourceManager.DurableTask", + "Tag": "" +} diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/samples/Azure.ResourceManager.DurableTask.Samples.csproj b/sdk/durabletask/Azure.ResourceManager.DurableTask/samples/Azure.ResourceManager.DurableTask.Samples.csproj new file mode 100644 index 000000000000..536ac11ce49a --- /dev/null +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/samples/Azure.ResourceManager.DurableTask.Samples.csproj @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/samples/Generated/Samples/Sample_RetentionPolicyResource.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/samples/Generated/Samples/Sample_RetentionPolicyResource.cs new file mode 100644 index 000000000000..bd9f503a60e6 --- /dev/null +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/samples/Generated/Samples/Sample_RetentionPolicyResource.cs @@ -0,0 +1,160 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.DurableTask.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.DurableTask.Samples +{ + public partial class Sample_RetentionPolicyResource + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_RetentionPoliciesGetMaximumSet() + { + // Generated from example definition: 2025-04-01-preview/RetentionPolicies_Get_MaximumSet_Gen.json + // this example is just showing the usage of "RetentionPolicy_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this RetentionPolicyResource created on azure + // for more information of creating RetentionPolicyResource, please refer to the document of RetentionPolicyResource + string subscriptionId = "194D3C1E-462F-4738-9025-092A628C06EB"; + string resourceGroupName = "rgdurabletask"; + string schedulerName = "testscheduler"; + ResourceIdentifier retentionPolicyResourceId = RetentionPolicyResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, schedulerName); + RetentionPolicyResource retentionPolicy = client.GetRetentionPolicyResource(retentionPolicyResourceId); + + // invoke the operation + RetentionPolicyResource result = await retentionPolicy.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 + RetentionPolicyData resourceData = result.Data; + // for 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_RetentionPoliciesDeleteMaximumSet() + { + // Generated from example definition: 2025-04-01-preview/RetentionPolicies_Delete_MaximumSet_Gen.json + // this example is just showing the usage of "RetentionPolicy_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 RetentionPolicyResource created on azure + // for more information of creating RetentionPolicyResource, please refer to the document of RetentionPolicyResource + string subscriptionId = "194D3C1E-462F-4738-9025-092A628C06EB"; + string resourceGroupName = "rgdurabletask"; + string schedulerName = "testcheduler"; + ResourceIdentifier retentionPolicyResourceId = RetentionPolicyResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, schedulerName); + RetentionPolicyResource retentionPolicy = client.GetRetentionPolicyResource(retentionPolicyResourceId); + + // invoke the operation + await retentionPolicy.DeleteAsync(WaitUntil.Completed); + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Update_RetentionPoliciesUpdateMaximumSet() + { + // Generated from example definition: 2025-04-01-preview/RetentionPolicies_Update_MaximumSet_Gen.json + // this example is just showing the usage of "RetentionPolicy_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 RetentionPolicyResource created on azure + // for more information of creating RetentionPolicyResource, please refer to the document of RetentionPolicyResource + string subscriptionId = "194D3C1E-462F-4738-9025-092A628C06EB"; + string resourceGroupName = "rgdurabletask"; + string schedulerName = "testscheduler"; + ResourceIdentifier retentionPolicyResourceId = RetentionPolicyResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, schedulerName); + RetentionPolicyResource retentionPolicy = client.GetRetentionPolicyResource(retentionPolicyResourceId); + + // invoke the operation + RetentionPolicyData data = new RetentionPolicyData + { + Properties = new RetentionPolicyProperties + { + RetentionPolicies = {new RetentionPolicyDetails(30), new RetentionPolicyDetails(10) +{ +OrchestrationState = PurgeableOrchestrationState.Failed, +}, new RetentionPolicyDetails(24) +{ +OrchestrationState = PurgeableOrchestrationState.Completed, +}}, + }, + }; + ArmOperation lro = await retentionPolicy.UpdateAsync(WaitUntil.Completed, data); + RetentionPolicyResource 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 + RetentionPolicyData resourceData = result.Data; + // for 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_RetentionPoliciesCreateOrReplaceMaximumSet() + { + // Generated from example definition: 2025-04-01-preview/RetentionPolicies_CreateOrReplace_MaximumSet_Gen.json + // this example is just showing the usage of "RetentionPolicy_CreateOrReplace" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this RetentionPolicyResource created on azure + // for more information of creating RetentionPolicyResource, please refer to the document of RetentionPolicyResource + string subscriptionId = "194D3C1E-462F-4738-9025-092A628C06EB"; + string resourceGroupName = "rgdurabletask"; + string schedulerName = "testscheduler"; + ResourceIdentifier retentionPolicyResourceId = RetentionPolicyResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, schedulerName); + RetentionPolicyResource retentionPolicy = client.GetRetentionPolicyResource(retentionPolicyResourceId); + + // invoke the operation + RetentionPolicyData data = new RetentionPolicyData + { + Properties = new RetentionPolicyProperties + { + RetentionPolicies = {new RetentionPolicyDetails(30), new RetentionPolicyDetails(10) +{ +OrchestrationState = PurgeableOrchestrationState.Failed, +}}, + }, + }; + ArmOperation lro = await retentionPolicy.CreateOrUpdateAsync(WaitUntil.Completed, data); + RetentionPolicyResource 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 + RetentionPolicyData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/samples/Generated/Samples/Sample_SchedulerCollection.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/samples/Generated/Samples/Sample_SchedulerCollection.cs new file mode 100644 index 000000000000..7e78ce42eacc --- /dev/null +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/samples/Generated/Samples/Sample_SchedulerCollection.cs @@ -0,0 +1,201 @@ +// 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.DurableTask.Models; +using Azure.ResourceManager.Resources; +using NUnit.Framework; + +namespace Azure.ResourceManager.DurableTask.Samples +{ + public partial class Sample_SchedulerCollection + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_SchedulersCreateOrUpdate() + { + // Generated from example definition: 2025-04-01-preview/Schedulers_CreateOrUpdate.json + // this example is just showing the usage of "Scheduler_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 = "EE9BD735-67CE-4A90-89C4-439D3F6A4C93"; + string resourceGroupName = "rgopenapi"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this SchedulerResource + SchedulerCollection collection = resourceGroupResource.GetSchedulers(); + + // invoke the operation + string schedulerName = "testscheduler"; + SchedulerData data = new SchedulerData(new AzureLocation("northcentralus")) + { + Properties = new SchedulerProperties(new string[] { "10.0.0.0/8" }, new SchedulerSku("Dedicated")), + Tags = +{ +["department"] = "research", +["development"] = "true" +}, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, schedulerName, data); + SchedulerResource 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 + SchedulerData resourceData = result.Data; + // for 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_SchedulersGet() + { + // Generated from example definition: 2025-04-01-preview/Schedulers_Get.json + // this example is just showing the usage of "Scheduler_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/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 = "EE9BD735-67CE-4A90-89C4-439D3F6A4C93"; + string resourceGroupName = "rgopenapi"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this SchedulerResource + SchedulerCollection collection = resourceGroupResource.GetSchedulers(); + + // invoke the operation + string schedulerName = "testscheduler"; + SchedulerResource result = await collection.GetAsync(schedulerName); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + SchedulerData resourceData = result.Data; + // for 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_SchedulersListByResourceGroup() + { + // Generated from example definition: 2025-04-01-preview/Schedulers_ListByResourceGroup.json + // this example is just showing the usage of "Scheduler_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 = "EE9BD735-67CE-4A90-89C4-439D3F6A4C93"; + string resourceGroupName = "rgopenapi"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this SchedulerResource + SchedulerCollection collection = resourceGroupResource.GetSchedulers(); + + // invoke the operation and iterate over the result + await foreach (SchedulerResource 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 + SchedulerData 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_SchedulersGet() + { + // Generated from example definition: 2025-04-01-preview/Schedulers_Get.json + // this example is just showing the usage of "Scheduler_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/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 = "EE9BD735-67CE-4A90-89C4-439D3F6A4C93"; + string resourceGroupName = "rgopenapi"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this SchedulerResource + SchedulerCollection collection = resourceGroupResource.GetSchedulers(); + + // invoke the operation + string schedulerName = "testscheduler"; + bool result = await collection.ExistsAsync(schedulerName); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetIfExists_SchedulersGet() + { + // Generated from example definition: 2025-04-01-preview/Schedulers_Get.json + // this example is just showing the usage of "Scheduler_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/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 = "EE9BD735-67CE-4A90-89C4-439D3F6A4C93"; + string resourceGroupName = "rgopenapi"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this SchedulerResource + SchedulerCollection collection = resourceGroupResource.GetSchedulers(); + + // invoke the operation + string schedulerName = "testscheduler"; + NullableResponse response = await collection.GetIfExistsAsync(schedulerName); + SchedulerResource 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 + SchedulerData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + } +} diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/samples/Generated/Samples/Sample_SchedulerResource.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/samples/Generated/Samples/Sample_SchedulerResource.cs new file mode 100644 index 000000000000..30bbea1d0264 --- /dev/null +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/samples/Generated/Samples/Sample_SchedulerResource.cs @@ -0,0 +1,122 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.DurableTask.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.DurableTask.Samples +{ + public partial class Sample_SchedulerResource + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_SchedulersGet() + { + // Generated from example definition: 2025-04-01-preview/Schedulers_Get.json + // this example is just showing the usage of "Scheduler_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SchedulerResource created on azure + // for more information of creating SchedulerResource, please refer to the document of SchedulerResource + string subscriptionId = "EE9BD735-67CE-4A90-89C4-439D3F6A4C93"; + string resourceGroupName = "rgopenapi"; + string schedulerName = "testscheduler"; + ResourceIdentifier schedulerResourceId = SchedulerResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, schedulerName); + SchedulerResource scheduler = client.GetSchedulerResource(schedulerResourceId); + + // invoke the operation + SchedulerResource result = await scheduler.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 + SchedulerData resourceData = result.Data; + // for 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_SchedulersDelete() + { + // Generated from example definition: 2025-04-01-preview/Schedulers_Delete.json + // this example is just showing the usage of "Scheduler_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 SchedulerResource created on azure + // for more information of creating SchedulerResource, please refer to the document of SchedulerResource + string subscriptionId = "EE9BD735-67CE-4A90-89C4-439D3F6A4C93"; + string resourceGroupName = "rgopenapi"; + string schedulerName = "testscheduler"; + ResourceIdentifier schedulerResourceId = SchedulerResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, schedulerName); + SchedulerResource scheduler = client.GetSchedulerResource(schedulerResourceId); + + // invoke the operation + await scheduler.DeleteAsync(WaitUntil.Completed); + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Update_SchedulersUpdate() + { + // Generated from example definition: 2025-04-01-preview/Schedulers_Update.json + // this example is just showing the usage of "Scheduler_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 SchedulerResource created on azure + // for more information of creating SchedulerResource, please refer to the document of SchedulerResource + string subscriptionId = "EE9BD735-67CE-4A90-89C4-439D3F6A4C93"; + string resourceGroupName = "rgopenapi"; + string schedulerName = "testscheduler"; + ResourceIdentifier schedulerResourceId = SchedulerResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, schedulerName); + SchedulerResource scheduler = client.GetSchedulerResource(schedulerResourceId); + + // invoke the operation + SchedulerPatch patch = new SchedulerPatch + { + Properties = new SchedulerPropertiesUpdate + { + IPAllowlist = { "10.0.0.0/8" }, + Sku = new SchedulerSkuUpdate + { + Name = "Dedicated", + Capacity = 3, + }, + }, + Tags = +{ +["hello"] = "world" +}, + }; + ArmOperation lro = await scheduler.UpdateAsync(WaitUntil.Completed, patch); + SchedulerResource 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 + SchedulerData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs new file mode 100644 index 000000000000..b783d5d5c7e7 --- /dev/null +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/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.DurableTask.Samples +{ + public partial class Sample_SubscriptionResourceExtensions + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetSchedulers_SchedulersListBySubscription() + { + // Generated from example definition: 2025-04-01-preview/Schedulers_ListBySubscription.json + // this example is just showing the usage of "Scheduler_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 = "EE9BD735-67CE-4A90-89C4-439D3F6A4C93"; + ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); + SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); + + // invoke the operation and iterate over the result + await foreach (SchedulerResource item in subscriptionResource.GetSchedulersAsync()) + { + // 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 + SchedulerData 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/durabletask/Azure.ResourceManager.DurableTask/samples/Generated/Samples/Sample_TaskHubCollection.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/samples/Generated/Samples/Sample_TaskHubCollection.cs new file mode 100644 index 000000000000..1a6f6b7cb0da --- /dev/null +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/samples/Generated/Samples/Sample_TaskHubCollection.cs @@ -0,0 +1,200 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.DurableTask.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.DurableTask.Samples +{ + public partial class Sample_TaskHubCollection + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_TaskHubsCreateOrUpdate() + { + // Generated from example definition: 2025-04-01-preview/TaskHubs_CreateOrUpdate.json + // this example is just showing the usage of "TaskHub_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 SchedulerResource created on azure + // for more information of creating SchedulerResource, please refer to the document of SchedulerResource + string subscriptionId = "EE9BD735-67CE-4A90-89C4-439D3F6A4C93"; + string resourceGroupName = "rgopenapi"; + string schedulerName = "testscheduler"; + ResourceIdentifier schedulerResourceId = SchedulerResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, schedulerName); + SchedulerResource scheduler = client.GetSchedulerResource(schedulerResourceId); + + // get the collection of this TaskHubResource + TaskHubCollection collection = scheduler.GetTaskHubs(); + + // invoke the operation + string taskHubName = "testtaskhub"; + TaskHubData data = new TaskHubData + { + Properties = new TaskHubProperties(), + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, taskHubName, data); + TaskHubResource 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 + TaskHubData resourceData = result.Data; + // for 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_TaskHubsGet() + { + // Generated from example definition: 2025-04-01-preview/TaskHubs_Get.json + // this example is just showing the usage of "TaskHub_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SchedulerResource created on azure + // for more information of creating SchedulerResource, please refer to the document of SchedulerResource + string subscriptionId = "EE9BD735-67CE-4A90-89C4-439D3F6A4C93"; + string resourceGroupName = "rgopenapi"; + string schedulerName = "testscheduler"; + ResourceIdentifier schedulerResourceId = SchedulerResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, schedulerName); + SchedulerResource scheduler = client.GetSchedulerResource(schedulerResourceId); + + // get the collection of this TaskHubResource + TaskHubCollection collection = scheduler.GetTaskHubs(); + + // invoke the operation + string taskHubName = "testtaskhub"; + TaskHubResource result = await collection.GetAsync(taskHubName); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + TaskHubData resourceData = result.Data; + // for 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_TaskHubsListByScheduler() + { + // Generated from example definition: 2025-04-01-preview/TaskHubs_ListByScheduler.json + // this example is just showing the usage of "TaskHub_ListByScheduler" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SchedulerResource created on azure + // for more information of creating SchedulerResource, please refer to the document of SchedulerResource + string subscriptionId = "EE9BD735-67CE-4A90-89C4-439D3F6A4C93"; + string resourceGroupName = "rgopenapi"; + string schedulerName = "testscheduler"; + ResourceIdentifier schedulerResourceId = SchedulerResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, schedulerName); + SchedulerResource scheduler = client.GetSchedulerResource(schedulerResourceId); + + // get the collection of this TaskHubResource + TaskHubCollection collection = scheduler.GetTaskHubs(); + + // invoke the operation and iterate over the result + await foreach (TaskHubResource 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 + TaskHubData 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_TaskHubsGet() + { + // Generated from example definition: 2025-04-01-preview/TaskHubs_Get.json + // this example is just showing the usage of "TaskHub_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SchedulerResource created on azure + // for more information of creating SchedulerResource, please refer to the document of SchedulerResource + string subscriptionId = "EE9BD735-67CE-4A90-89C4-439D3F6A4C93"; + string resourceGroupName = "rgopenapi"; + string schedulerName = "testscheduler"; + ResourceIdentifier schedulerResourceId = SchedulerResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, schedulerName); + SchedulerResource scheduler = client.GetSchedulerResource(schedulerResourceId); + + // get the collection of this TaskHubResource + TaskHubCollection collection = scheduler.GetTaskHubs(); + + // invoke the operation + string taskHubName = "testtaskhub"; + bool result = await collection.ExistsAsync(taskHubName); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetIfExists_TaskHubsGet() + { + // Generated from example definition: 2025-04-01-preview/TaskHubs_Get.json + // this example is just showing the usage of "TaskHub_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SchedulerResource created on azure + // for more information of creating SchedulerResource, please refer to the document of SchedulerResource + string subscriptionId = "EE9BD735-67CE-4A90-89C4-439D3F6A4C93"; + string resourceGroupName = "rgopenapi"; + string schedulerName = "testscheduler"; + ResourceIdentifier schedulerResourceId = SchedulerResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, schedulerName); + SchedulerResource scheduler = client.GetSchedulerResource(schedulerResourceId); + + // get the collection of this TaskHubResource + TaskHubCollection collection = scheduler.GetTaskHubs(); + + // invoke the operation + string taskHubName = "testtaskhub"; + NullableResponse response = await collection.GetIfExistsAsync(taskHubName); + TaskHubResource 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 + TaskHubData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + } +} diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/samples/Generated/Samples/Sample_TaskHubResource.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/samples/Generated/Samples/Sample_TaskHubResource.cs new file mode 100644 index 000000000000..cf9563528661 --- /dev/null +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/samples/Generated/Samples/Sample_TaskHubResource.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.DurableTask.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.DurableTask.Samples +{ + public partial class Sample_TaskHubResource + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_TaskHubsGet() + { + // Generated from example definition: 2025-04-01-preview/TaskHubs_Get.json + // this example is just showing the usage of "TaskHub_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this TaskHubResource created on azure + // for more information of creating TaskHubResource, please refer to the document of TaskHubResource + string subscriptionId = "EE9BD735-67CE-4A90-89C4-439D3F6A4C93"; + string resourceGroupName = "rgopenapi"; + string schedulerName = "testscheduler"; + string taskHubName = "testtaskhub"; + ResourceIdentifier taskHubResourceId = TaskHubResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, schedulerName, taskHubName); + TaskHubResource taskHub = client.GetTaskHubResource(taskHubResourceId); + + // invoke the operation + TaskHubResource result = await taskHub.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 + TaskHubData resourceData = result.Data; + // for 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_TaskHubsDelete() + { + // Generated from example definition: 2025-04-01-preview/TaskHubs_Delete.json + // this example is just showing the usage of "TaskHub_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 TaskHubResource created on azure + // for more information of creating TaskHubResource, please refer to the document of TaskHubResource + string subscriptionId = "EE9BD735-67CE-4A90-89C4-439D3F6A4C93"; + string resourceGroupName = "rgopenapi"; + string schedulerName = "testscheduler"; + string taskHubName = "testtaskhub"; + ResourceIdentifier taskHubResourceId = TaskHubResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, schedulerName, taskHubName); + TaskHubResource taskHub = client.GetTaskHubResource(taskHubResourceId); + + // invoke the operation + await taskHub.DeleteAsync(WaitUntil.Completed); + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Update_TaskHubsCreateOrUpdate() + { + // Generated from example definition: 2025-04-01-preview/TaskHubs_CreateOrUpdate.json + // this example is just showing the usage of "TaskHub_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 TaskHubResource created on azure + // for more information of creating TaskHubResource, please refer to the document of TaskHubResource + string subscriptionId = "EE9BD735-67CE-4A90-89C4-439D3F6A4C93"; + string resourceGroupName = "rgopenapi"; + string schedulerName = "testscheduler"; + string taskHubName = "testtaskhub"; + ResourceIdentifier taskHubResourceId = TaskHubResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, schedulerName, taskHubName); + TaskHubResource taskHub = client.GetTaskHubResource(taskHubResourceId); + + // invoke the operation + TaskHubData data = new TaskHubData + { + Properties = new TaskHubProperties(), + }; + ArmOperation lro = await taskHub.UpdateAsync(WaitUntil.Completed, data); + TaskHubResource 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 + TaskHubData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Azure.ResourceManager.DurableTask.csproj b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Azure.ResourceManager.DurableTask.csproj new file mode 100644 index 000000000000..eef34dffbc5f --- /dev/null +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Azure.ResourceManager.DurableTask.csproj @@ -0,0 +1,8 @@ + + + Azure Resource Manager client SDK for Azure resource provider DurableTask. + 1.0.0-beta.1 + azure;management;arm;resource manager;durabletask + Azure.ResourceManager.DurableTask + + diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/ArmDurableTaskModelFactory.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/ArmDurableTaskModelFactory.cs new file mode 100644 index 000000000000..d26e62a5296f --- /dev/null +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/ArmDurableTaskModelFactory.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 System.Linq; +using Azure.Core; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.DurableTask.Models +{ + /// Model factory for models. + public static partial class ArmDurableTaskModelFactory + { + /// 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 SchedulerData SchedulerData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, SchedulerProperties properties = null) + { + tags ??= new Dictionary(); + + return new SchedulerData( + id, + name, + resourceType, + systemData, + tags, + location, + properties, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The status of the last operation. + /// URL of the durable task scheduler. + /// IP allow list for durable task scheduler. Values can be IPv4, IPv6 or CIDR. + /// SKU of the durable task scheduler. + /// A new instance for mocking. + public static SchedulerProperties SchedulerProperties(ProvisioningState? provisioningState = null, string endpoint = null, IEnumerable ipAllowlist = null, SchedulerSku sku = null) + { + ipAllowlist ??= new List(); + + return new SchedulerProperties(provisioningState, endpoint, ipAllowlist?.ToList(), sku, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The name of the SKU. + /// The SKU capacity. This allows scale out/in for the resource and impacts zone redundancy. + /// Indicates whether the current SKU configuration is zone redundant. + /// A new instance for mocking. + public static SchedulerSku SchedulerSku(string name = null, int? capacity = null, RedundancyState? redundancyState = null) + { + return new SchedulerSku(name, capacity, redundancyState, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The status of the last operation. + /// URL of the durable task scheduler. + /// IP allow list for durable task scheduler. Values can be IPv4, IPv6 or CIDR. + /// SKU of the durable task scheduler. + /// A new instance for mocking. + public static SchedulerPropertiesUpdate SchedulerPropertiesUpdate(ProvisioningState? provisioningState = null, string endpoint = null, IEnumerable ipAllowlist = null, SchedulerSkuUpdate sku = null) + { + ipAllowlist ??= new List(); + + return new SchedulerPropertiesUpdate(provisioningState, endpoint, ipAllowlist?.ToList(), sku, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The name of the SKU. + /// The SKU capacity. This allows scale out/in for the resource and impacts zone redundancy. + /// Indicates whether the current SKU configuration is zone redundant. + /// A new instance for mocking. + public static SchedulerSkuUpdate SchedulerSkuUpdate(string name = null, int? capacity = null, RedundancyState? redundancyState = null) + { + return new SchedulerSkuUpdate(name, capacity, redundancyState, 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 TaskHubData TaskHubData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, TaskHubProperties properties = null) + { + return new TaskHubData( + id, + name, + resourceType, + systemData, + properties, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The status of the last operation. + /// URL of the durable task scheduler dashboard. + /// A new instance for mocking. + public static TaskHubProperties TaskHubProperties(ProvisioningState? provisioningState = null, Uri dashboardUri = null) + { + return new TaskHubProperties(provisioningState, dashboardUri, 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 RetentionPolicyData RetentionPolicyData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, RetentionPolicyProperties properties = null) + { + return new RetentionPolicyData( + id, + name, + resourceType, + systemData, + properties, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The status of the last operation. + /// The orchestration retention policies. + /// A new instance for mocking. + public static RetentionPolicyProperties RetentionPolicyProperties(ProvisioningState? provisioningState = null, IEnumerable retentionPolicies = null) + { + retentionPolicies ??= new List(); + + return new RetentionPolicyProperties(provisioningState, retentionPolicies?.ToList(), serializedAdditionalRawData: null); + } + } +} diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Extensions/DurableTaskExtensions.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Extensions/DurableTaskExtensions.cs new file mode 100644 index 000000000000..d9f979ba88c0 --- /dev/null +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Extensions/DurableTaskExtensions.cs @@ -0,0 +1,257 @@ +// 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.DurableTask.Mocking; +using Azure.ResourceManager.Resources; + +namespace Azure.ResourceManager.DurableTask +{ + /// A class to add extension methods to Azure.ResourceManager.DurableTask. + public static partial class DurableTaskExtensions + { + private static MockableDurableTaskArmClient GetMockableDurableTaskArmClient(ArmClient client) + { + return client.GetCachedClient(client0 => new MockableDurableTaskArmClient(client0)); + } + + private static MockableDurableTaskResourceGroupResource GetMockableDurableTaskResourceGroupResource(ArmResource resource) + { + return resource.GetCachedClient(client => new MockableDurableTaskResourceGroupResource(client, resource.Id)); + } + + private static MockableDurableTaskSubscriptionResource GetMockableDurableTaskSubscriptionResource(ArmResource resource) + { + return resource.GetCachedClient(client => new MockableDurableTaskSubscriptionResource(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 SchedulerResource GetSchedulerResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableDurableTaskArmClient(client).GetSchedulerResource(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 TaskHubResource GetTaskHubResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableDurableTaskArmClient(client).GetTaskHubResource(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 RetentionPolicyResource GetRetentionPolicyResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableDurableTaskArmClient(client).GetRetentionPolicyResource(id); + } + + /// + /// Gets a collection of SchedulerResources 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 SchedulerResources and their operations over a SchedulerResource. + public static SchedulerCollection GetSchedulers(this ResourceGroupResource resourceGroupResource) + { + Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); + + return GetMockableDurableTaskResourceGroupResource(resourceGroupResource).GetSchedulers(); + } + + /// + /// Get a Scheduler + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DurableTask/schedulers/{schedulerName} + /// + /// + /// Operation Id + /// Scheduler_Get + /// + /// + /// Default Api Version + /// 2025-04-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The name of the Scheduler. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public static async Task> GetSchedulerAsync(this ResourceGroupResource resourceGroupResource, string schedulerName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); + + return await GetMockableDurableTaskResourceGroupResource(resourceGroupResource).GetSchedulerAsync(schedulerName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get a Scheduler + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DurableTask/schedulers/{schedulerName} + /// + /// + /// Operation Id + /// Scheduler_Get + /// + /// + /// Default Api Version + /// 2025-04-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The name of the Scheduler. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public static Response GetScheduler(this ResourceGroupResource resourceGroupResource, string schedulerName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); + + return GetMockableDurableTaskResourceGroupResource(resourceGroupResource).GetScheduler(schedulerName, cancellationToken); + } + + /// + /// List Schedulers by subscription + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.DurableTask/schedulers + /// + /// + /// Operation Id + /// Scheduler_ListBySubscription + /// + /// + /// Default Api Version + /// 2025-04-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 GetSchedulersAsync(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); + + return GetMockableDurableTaskSubscriptionResource(subscriptionResource).GetSchedulersAsync(cancellationToken); + } + + /// + /// List Schedulers by subscription + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.DurableTask/schedulers + /// + /// + /// Operation Id + /// Scheduler_ListBySubscription + /// + /// + /// Default Api Version + /// 2025-04-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 GetSchedulers(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); + + return GetMockableDurableTaskSubscriptionResource(subscriptionResource).GetSchedulers(cancellationToken); + } + } +} diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Extensions/MockableDurableTaskArmClient.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Extensions/MockableDurableTaskArmClient.cs new file mode 100644 index 000000000000..9809cb364077 --- /dev/null +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Extensions/MockableDurableTaskArmClient.cs @@ -0,0 +1,73 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using Azure.Core; + +namespace Azure.ResourceManager.DurableTask.Mocking +{ + /// A class to add extension methods to ArmClient. + public partial class MockableDurableTaskArmClient : ArmResource + { + /// Initializes a new instance of the class for mocking. + protected MockableDurableTaskArmClient() + { + } + + /// 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 MockableDurableTaskArmClient(ArmClient client, ResourceIdentifier id) : base(client, id) + { + } + + internal MockableDurableTaskArmClient(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 SchedulerResource GetSchedulerResource(ResourceIdentifier id) + { + SchedulerResource.ValidateResourceId(id); + return new SchedulerResource(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 TaskHubResource GetTaskHubResource(ResourceIdentifier id) + { + TaskHubResource.ValidateResourceId(id); + return new TaskHubResource(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 RetentionPolicyResource GetRetentionPolicyResource(ResourceIdentifier id) + { + RetentionPolicyResource.ValidateResourceId(id); + return new RetentionPolicyResource(Client, id); + } + } +} diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Extensions/MockableDurableTaskResourceGroupResource.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Extensions/MockableDurableTaskResourceGroupResource.cs new file mode 100644 index 000000000000..7a274c6e0614 --- /dev/null +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Extensions/MockableDurableTaskResourceGroupResource.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.DurableTask.Mocking +{ + /// A class to add extension methods to ResourceGroupResource. + public partial class MockableDurableTaskResourceGroupResource : ArmResource + { + /// Initializes a new instance of the class for mocking. + protected MockableDurableTaskResourceGroupResource() + { + } + + /// 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 MockableDurableTaskResourceGroupResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + } + + private string GetApiVersionOrNull(ResourceType resourceType) + { + TryGetApiVersion(resourceType, out string apiVersion); + return apiVersion; + } + + /// Gets a collection of SchedulerResources in the ResourceGroupResource. + /// An object representing collection of SchedulerResources and their operations over a SchedulerResource. + public virtual SchedulerCollection GetSchedulers() + { + return GetCachedClient(client => new SchedulerCollection(client, Id)); + } + + /// + /// Get a Scheduler + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DurableTask/schedulers/{schedulerName} + /// + /// + /// Operation Id + /// Scheduler_Get + /// + /// + /// Default Api Version + /// 2025-04-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Scheduler. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetSchedulerAsync(string schedulerName, CancellationToken cancellationToken = default) + { + return await GetSchedulers().GetAsync(schedulerName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get a Scheduler + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DurableTask/schedulers/{schedulerName} + /// + /// + /// Operation Id + /// Scheduler_Get + /// + /// + /// Default Api Version + /// 2025-04-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Scheduler. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetScheduler(string schedulerName, CancellationToken cancellationToken = default) + { + return GetSchedulers().Get(schedulerName, cancellationToken); + } + } +} diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Extensions/MockableDurableTaskSubscriptionResource.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Extensions/MockableDurableTaskSubscriptionResource.cs new file mode 100644 index 000000000000..234b309efcea --- /dev/null +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Extensions/MockableDurableTaskSubscriptionResource.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.DurableTask.Mocking +{ + /// A class to add extension methods to SubscriptionResource. + public partial class MockableDurableTaskSubscriptionResource : ArmResource + { + private ClientDiagnostics _schedulerClientDiagnostics; + private SchedulersRestOperations _schedulerRestClient; + + /// Initializes a new instance of the class for mocking. + protected MockableDurableTaskSubscriptionResource() + { + } + + /// 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 MockableDurableTaskSubscriptionResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + } + + private ClientDiagnostics SchedulerClientDiagnostics => _schedulerClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.DurableTask", SchedulerResource.ResourceType.Namespace, Diagnostics); + private SchedulersRestOperations SchedulerRestClient => _schedulerRestClient ??= new SchedulersRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, GetApiVersionOrNull(SchedulerResource.ResourceType)); + + private string GetApiVersionOrNull(ResourceType resourceType) + { + TryGetApiVersion(resourceType, out string apiVersion); + return apiVersion; + } + + /// + /// List Schedulers by subscription + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.DurableTask/schedulers + /// + /// + /// Operation Id + /// Scheduler_ListBySubscription + /// + /// + /// Default Api Version + /// 2025-04-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetSchedulersAsync(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => SchedulerRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => SchedulerRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new SchedulerResource(Client, SchedulerData.DeserializeSchedulerData(e)), SchedulerClientDiagnostics, Pipeline, "MockableDurableTaskSubscriptionResource.GetSchedulers", "value", "nextLink", cancellationToken); + } + + /// + /// List Schedulers by subscription + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.DurableTask/schedulers + /// + /// + /// Operation Id + /// Scheduler_ListBySubscription + /// + /// + /// Default Api Version + /// 2025-04-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetSchedulers(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => SchedulerRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => SchedulerRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new SchedulerResource(Client, SchedulerData.DeserializeSchedulerData(e)), SchedulerClientDiagnostics, Pipeline, "MockableDurableTaskSubscriptionResource.GetSchedulers", "value", "nextLink", cancellationToken); + } + } +} diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Internal/Argument.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Internal/Argument.cs new file mode 100644 index 000000000000..d15981d33b18 --- /dev/null +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/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.DurableTask +{ + 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/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Internal/ChangeTrackingDictionary.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Internal/ChangeTrackingDictionary.cs new file mode 100644 index 000000000000..001cb5f61046 --- /dev/null +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/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.DurableTask +{ + 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/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Internal/ChangeTrackingList.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Internal/ChangeTrackingList.cs new file mode 100644 index 000000000000..5ce8ee7ec441 --- /dev/null +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/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.DurableTask +{ + 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/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Internal/ModelSerializationExtensions.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Internal/ModelSerializationExtensions.cs new file mode 100644 index 000000000000..7548acaf9b19 --- /dev/null +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/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.DurableTask +{ + 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/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Internal/Optional.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Internal/Optional.cs new file mode 100644 index 000000000000..dd8a99d7dd47 --- /dev/null +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/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.DurableTask +{ + 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/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Internal/Utf8JsonRequestContent.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Internal/Utf8JsonRequestContent.cs new file mode 100644 index 000000000000..491ccbbaaf8c --- /dev/null +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/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.DurableTask +{ + 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/durabletask/Azure.ResourceManager.DurableTask/src/Generated/LongRunningOperation/DurableTaskArmOperation.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/LongRunningOperation/DurableTaskArmOperation.cs new file mode 100644 index 000000000000..34ba48f6a7cb --- /dev/null +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/LongRunningOperation/DurableTaskArmOperation.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.DurableTask +{ +#pragma warning disable SA1649 // File name should match first type name + internal class DurableTaskArmOperation : 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 DurableTaskArmOperation for mocking. + protected DurableTaskArmOperation() + { + } + + internal DurableTaskArmOperation(Response response, RehydrationToken? rehydrationToken = null) + { + _operation = OperationInternal.Succeeded(response); + _completeRehydrationToken = rehydrationToken; + _operationId = GetOperationId(rehydrationToken); + } + + internal DurableTaskArmOperation(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, "DurableTaskArmOperation", 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/durabletask/Azure.ResourceManager.DurableTask/src/Generated/LongRunningOperation/DurableTaskArmOperationOfT.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/LongRunningOperation/DurableTaskArmOperationOfT.cs new file mode 100644 index 000000000000..dbab97aea54e --- /dev/null +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/LongRunningOperation/DurableTaskArmOperationOfT.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.DurableTask +{ +#pragma warning disable SA1649 // File name should match first type name + internal class DurableTaskArmOperation : 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 DurableTaskArmOperation for mocking. + protected DurableTaskArmOperation() + { + } + + internal DurableTaskArmOperation(Response response, RehydrationToken? rehydrationToken = null) + { + _operation = OperationInternal.Succeeded(response.GetRawResponse(), response.Value); + _completeRehydrationToken = rehydrationToken; + _operationId = GetOperationId(rehydrationToken); + } + + internal DurableTaskArmOperation(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, "DurableTaskArmOperation", 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/durabletask/Azure.ResourceManager.DurableTask/src/Generated/LongRunningOperation/RetentionPolicyOperationSource.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/LongRunningOperation/RetentionPolicyOperationSource.cs new file mode 100644 index 000000000000..9e7f7200acfc --- /dev/null +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/LongRunningOperation/RetentionPolicyOperationSource.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.DurableTask +{ + internal class RetentionPolicyOperationSource : IOperationSource + { + private readonly ArmClient _client; + + internal RetentionPolicyOperationSource(ArmClient client) + { + _client = client; + } + + RetentionPolicyResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + var data = ModelReaderWriter.Read(response.Content); + return new RetentionPolicyResource(_client, data); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + var data = ModelReaderWriter.Read(response.Content); + return await Task.FromResult(new RetentionPolicyResource(_client, data)).ConfigureAwait(false); + } + } +} diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/LongRunningOperation/SchedulerOperationSource.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/LongRunningOperation/SchedulerOperationSource.cs new file mode 100644 index 000000000000..42ece9ff12c1 --- /dev/null +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/LongRunningOperation/SchedulerOperationSource.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.DurableTask +{ + internal class SchedulerOperationSource : IOperationSource + { + private readonly ArmClient _client; + + internal SchedulerOperationSource(ArmClient client) + { + _client = client; + } + + SchedulerResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + var data = ModelReaderWriter.Read(response.Content); + return new SchedulerResource(_client, data); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + var data = ModelReaderWriter.Read(response.Content); + return await Task.FromResult(new SchedulerResource(_client, data)).ConfigureAwait(false); + } + } +} diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/LongRunningOperation/TaskHubOperationSource.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/LongRunningOperation/TaskHubOperationSource.cs new file mode 100644 index 000000000000..cf7b9d83c7b6 --- /dev/null +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/LongRunningOperation/TaskHubOperationSource.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.DurableTask +{ + internal class TaskHubOperationSource : IOperationSource + { + private readonly ArmClient _client; + + internal TaskHubOperationSource(ArmClient client) + { + _client = client; + } + + TaskHubResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + var data = ModelReaderWriter.Read(response.Content); + return new TaskHubResource(_client, data); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + var data = ModelReaderWriter.Read(response.Content); + return await Task.FromResult(new TaskHubResource(_client, data)).ConfigureAwait(false); + } + } +} diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/ProvisioningState.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/ProvisioningState.cs new file mode 100644 index 000000000000..2705a701b11f --- /dev/null +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/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.DurableTask.Models +{ + /// The status of the current operation. + 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/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/PurgeableOrchestrationState.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/PurgeableOrchestrationState.cs new file mode 100644 index 000000000000..f1f1203f25dc --- /dev/null +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/PurgeableOrchestrationState.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.DurableTask.Models +{ + /// Purgeable orchestration state to be used in retention policies. + public readonly partial struct PurgeableOrchestrationState : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public PurgeableOrchestrationState(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string CompletedValue = "Completed"; + private const string FailedValue = "Failed"; + private const string TerminatedValue = "Terminated"; + private const string CanceledValue = "Canceled"; + + /// The orchestration is completed. + public static PurgeableOrchestrationState Completed { get; } = new PurgeableOrchestrationState(CompletedValue); + /// The orchestration is failed. + public static PurgeableOrchestrationState Failed { get; } = new PurgeableOrchestrationState(FailedValue); + /// The orchestration is terminated. + public static PurgeableOrchestrationState Terminated { get; } = new PurgeableOrchestrationState(TerminatedValue); + /// The orchestration is terminated. + public static PurgeableOrchestrationState Canceled { get; } = new PurgeableOrchestrationState(CanceledValue); + /// Determines if two values are the same. + public static bool operator ==(PurgeableOrchestrationState left, PurgeableOrchestrationState right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(PurgeableOrchestrationState left, PurgeableOrchestrationState right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator PurgeableOrchestrationState(string value) => new PurgeableOrchestrationState(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is PurgeableOrchestrationState other && Equals(other); + /// + public bool Equals(PurgeableOrchestrationState 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/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/RedundancyState.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/RedundancyState.cs new file mode 100644 index 000000000000..cab76ba363c0 --- /dev/null +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/RedundancyState.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.DurableTask.Models +{ + /// The state of the resource redundancy. + public readonly partial struct RedundancyState : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public RedundancyState(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string NoneValue = "None"; + private const string ZoneValue = "Zone"; + + /// The resource is not redundant. + public static RedundancyState None { get; } = new RedundancyState(NoneValue); + /// The resource is zone redundant. + public static RedundancyState Zone { get; } = new RedundancyState(ZoneValue); + /// Determines if two values are the same. + public static bool operator ==(RedundancyState left, RedundancyState right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(RedundancyState left, RedundancyState right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator RedundancyState(string value) => new RedundancyState(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is RedundancyState other && Equals(other); + /// + public bool Equals(RedundancyState 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/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/RetentionPolicyDetails.Serialization.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/RetentionPolicyDetails.Serialization.cs new file mode 100644 index 000000000000..a7d8868976ba --- /dev/null +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/RetentionPolicyDetails.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.DurableTask.Models +{ + public partial class RetentionPolicyDetails : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(RetentionPolicyDetails)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("retentionPeriodInDays"u8); + writer.WriteNumberValue(RetentionPeriodInDays); + if (Optional.IsDefined(OrchestrationState)) + { + writer.WritePropertyName("orchestrationState"u8); + writer.WriteStringValue(OrchestrationState.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 + } + } + } + + RetentionPolicyDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(RetentionPolicyDetails)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeRetentionPolicyDetails(document.RootElement, options); + } + + internal static RetentionPolicyDetails DeserializeRetentionPolicyDetails(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + int retentionPeriodInDays = default; + PurgeableOrchestrationState? orchestrationState = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("retentionPeriodInDays"u8)) + { + retentionPeriodInDays = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("orchestrationState"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + orchestrationState = new PurgeableOrchestrationState(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new RetentionPolicyDetails(retentionPeriodInDays, orchestrationState, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(RetentionPolicyDetails)} does not support writing '{options.Format}' format."); + } + } + + RetentionPolicyDetails IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeRetentionPolicyDetails(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(RetentionPolicyDetails)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/RetentionPolicyDetails.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/RetentionPolicyDetails.cs new file mode 100644 index 000000000000..dde8a132bc30 --- /dev/null +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/RetentionPolicyDetails.cs @@ -0,0 +1,76 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.DurableTask.Models +{ + /// The properties of a retention policy. + public partial class RetentionPolicyDetails + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// 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 retention period in days after which the orchestration will be purged automatically. + public RetentionPolicyDetails(int retentionPeriodInDays) + { + RetentionPeriodInDays = retentionPeriodInDays; + } + + /// Initializes a new instance of . + /// The retention period in days after which the orchestration will be purged automatically. + /// The orchestration state to which this policy applies. If omitted, the policy applies to all purgeable orchestration states. + /// Keeps track of any properties unknown to the library. + internal RetentionPolicyDetails(int retentionPeriodInDays, PurgeableOrchestrationState? orchestrationState, IDictionary serializedAdditionalRawData) + { + RetentionPeriodInDays = retentionPeriodInDays; + OrchestrationState = orchestrationState; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal RetentionPolicyDetails() + { + } + + /// The retention period in days after which the orchestration will be purged automatically. + public int RetentionPeriodInDays { get; set; } + /// The orchestration state to which this policy applies. If omitted, the policy applies to all purgeable orchestration states. + public PurgeableOrchestrationState? OrchestrationState { get; set; } + } +} diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/RetentionPolicyListResult.Serialization.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/RetentionPolicyListResult.Serialization.cs new file mode 100644 index 000000000000..630a7bca9816 --- /dev/null +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/RetentionPolicyListResult.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.DurableTask.Models +{ + internal partial class RetentionPolicyListResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(RetentionPolicyListResult)} 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 + } + } + } + + RetentionPolicyListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(RetentionPolicyListResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeRetentionPolicyListResult(document.RootElement, options); + } + + internal static RetentionPolicyListResult DeserializeRetentionPolicyListResult(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(RetentionPolicyData.DeserializeRetentionPolicyData(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 RetentionPolicyListResult(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(RetentionPolicyListResult)} does not support writing '{options.Format}' format."); + } + } + + RetentionPolicyListResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeRetentionPolicyListResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(RetentionPolicyListResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/RetentionPolicyListResult.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/RetentionPolicyListResult.cs new file mode 100644 index 000000000000..f5c9bc5b5ac5 --- /dev/null +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/RetentionPolicyListResult.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.DurableTask.Models +{ + /// The response of a RetentionPolicy list operation. + internal partial class RetentionPolicyListResult + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// 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 RetentionPolicy items on this page. + /// is null. + internal RetentionPolicyListResult(IEnumerable value) + { + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); + } + + /// Initializes a new instance of . + /// The RetentionPolicy items on this page. + /// The link to the next page of items. + /// Keeps track of any properties unknown to the library. + internal RetentionPolicyListResult(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) + { + Value = value; + NextLink = nextLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal RetentionPolicyListResult() + { + } + + /// The RetentionPolicy items on this page. + public IReadOnlyList Value { get; } + /// The link to the next page of items. + public Uri NextLink { get; } + } +} diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/RetentionPolicyProperties.Serialization.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/RetentionPolicyProperties.Serialization.cs new file mode 100644 index 000000000000..96ccf10a92e6 --- /dev/null +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/RetentionPolicyProperties.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.DurableTask.Models +{ + public partial class RetentionPolicyProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(RetentionPolicyProperties)} does not support writing '{format}' format."); + } + + if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) + { + writer.WritePropertyName("provisioningState"u8); + writer.WriteStringValue(ProvisioningState.Value.ToString()); + } + if (Optional.IsCollectionDefined(RetentionPolicies)) + { + writer.WritePropertyName("retentionPolicies"u8); + writer.WriteStartArray(); + foreach (var item in RetentionPolicies) + { + 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 + } + } + } + + RetentionPolicyProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(RetentionPolicyProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeRetentionPolicyProperties(document.RootElement, options); + } + + internal static RetentionPolicyProperties DeserializeRetentionPolicyProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ProvisioningState? provisioningState = default; + IList retentionPolicies = 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 ProvisioningState(property.Value.GetString()); + continue; + } + if (property.NameEquals("retentionPolicies"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(RetentionPolicyDetails.DeserializeRetentionPolicyDetails(item, options)); + } + retentionPolicies = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new RetentionPolicyProperties(provisioningState, retentionPolicies ?? 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(RetentionPolicyProperties)} does not support writing '{options.Format}' format."); + } + } + + RetentionPolicyProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeRetentionPolicyProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(RetentionPolicyProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/RetentionPolicyProperties.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/RetentionPolicyProperties.cs new file mode 100644 index 000000000000..3346103fedc2 --- /dev/null +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/RetentionPolicyProperties.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.DurableTask.Models +{ + /// The retention policy settings for the resource. + public partial class RetentionPolicyProperties + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// 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 RetentionPolicyProperties() + { + RetentionPolicies = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// The status of the last operation. + /// The orchestration retention policies. + /// Keeps track of any properties unknown to the library. + internal RetentionPolicyProperties(ProvisioningState? provisioningState, IList retentionPolicies, IDictionary serializedAdditionalRawData) + { + ProvisioningState = provisioningState; + RetentionPolicies = retentionPolicies; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The status of the last operation. + public ProvisioningState? ProvisioningState { get; } + /// The orchestration retention policies. + public IList RetentionPolicies { get; } + } +} diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/SchedulerListResult.Serialization.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/SchedulerListResult.Serialization.cs new file mode 100644 index 000000000000..807d24dc9971 --- /dev/null +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/SchedulerListResult.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.DurableTask.Models +{ + internal partial class SchedulerListResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SchedulerListResult)} 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 + } + } + } + + SchedulerListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SchedulerListResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSchedulerListResult(document.RootElement, options); + } + + internal static SchedulerListResult DeserializeSchedulerListResult(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(SchedulerData.DeserializeSchedulerData(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 SchedulerListResult(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(SchedulerListResult)} does not support writing '{options.Format}' format."); + } + } + + SchedulerListResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeSchedulerListResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SchedulerListResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/SchedulerListResult.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/SchedulerListResult.cs new file mode 100644 index 000000000000..85a9ef186815 --- /dev/null +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/SchedulerListResult.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.DurableTask.Models +{ + /// The response of a Scheduler list operation. + internal partial class SchedulerListResult + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// 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 Scheduler items on this page. + /// is null. + internal SchedulerListResult(IEnumerable value) + { + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); + } + + /// Initializes a new instance of . + /// The Scheduler items on this page. + /// The link to the next page of items. + /// Keeps track of any properties unknown to the library. + internal SchedulerListResult(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) + { + Value = value; + NextLink = nextLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal SchedulerListResult() + { + } + + /// The Scheduler items on this page. + public IReadOnlyList Value { get; } + /// The link to the next page of items. + public Uri NextLink { get; } + } +} diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/SchedulerPatch.Serialization.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/SchedulerPatch.Serialization.cs new file mode 100644 index 000000000000..f7210c8c994d --- /dev/null +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/SchedulerPatch.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.DurableTask.Models +{ + public partial class SchedulerPatch : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SchedulerPatch)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties, options); + } + if (Optional.IsCollectionDefined(Tags)) + { + writer.WritePropertyName("tags"u8); + writer.WriteStartObject(); + foreach (var item in Tags) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + SchedulerPatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SchedulerPatch)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSchedulerPatch(document.RootElement, options); + } + + internal static SchedulerPatch DeserializeSchedulerPatch(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + SchedulerPropertiesUpdate properties = default; + IDictionary tags = 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 = SchedulerPropertiesUpdate.DeserializeSchedulerPropertiesUpdate(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 (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new SchedulerPatch(properties, 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(SchedulerPatch)} does not support writing '{options.Format}' format."); + } + } + + SchedulerPatch IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeSchedulerPatch(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SchedulerPatch)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/SchedulerPatch.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/SchedulerPatch.cs new file mode 100644 index 000000000000..1ba9640a8146 --- /dev/null +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/SchedulerPatch.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.DurableTask.Models +{ + /// The update request model for the Scheduler resource. + public partial class SchedulerPatch + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// 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 SchedulerPatch() + { + Tags = new ChangeTrackingDictionary(); + } + + /// Initializes a new instance of . + /// The resource-specific properties for this resource. + /// Resource tags. + /// Keeps track of any properties unknown to the library. + internal SchedulerPatch(SchedulerPropertiesUpdate properties, IDictionary tags, IDictionary serializedAdditionalRawData) + { + Properties = properties; + Tags = tags; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The resource-specific properties for this resource. + public SchedulerPropertiesUpdate Properties { get; set; } + /// Resource tags. + public IDictionary Tags { get; } + } +} diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/SchedulerProperties.Serialization.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/SchedulerProperties.Serialization.cs new file mode 100644 index 000000000000..2133da08804c --- /dev/null +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/SchedulerProperties.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.DurableTask.Models +{ + public partial class SchedulerProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SchedulerProperties)} 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(Endpoint)) + { + writer.WritePropertyName("endpoint"u8); + writer.WriteStringValue(Endpoint); + } + writer.WritePropertyName("ipAllowlist"u8); + writer.WriteStartArray(); + foreach (var item in IPAllowlist) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + 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 + } + } + } + + SchedulerProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SchedulerProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSchedulerProperties(document.RootElement, options); + } + + internal static SchedulerProperties DeserializeSchedulerProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ProvisioningState? provisioningState = default; + string endpoint = default; + IList ipAllowlist = default; + SchedulerSku sku = 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 ProvisioningState(property.Value.GetString()); + continue; + } + if (property.NameEquals("endpoint"u8)) + { + endpoint = property.Value.GetString(); + continue; + } + if (property.NameEquals("ipAllowlist"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + ipAllowlist = array; + continue; + } + if (property.NameEquals("sku"u8)) + { + sku = SchedulerSku.DeserializeSchedulerSku(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new SchedulerProperties(provisioningState, endpoint, ipAllowlist, 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(SchedulerProperties)} does not support writing '{options.Format}' format."); + } + } + + SchedulerProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeSchedulerProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SchedulerProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/SchedulerProperties.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/SchedulerProperties.cs new file mode 100644 index 000000000000..622f09dfc0bb --- /dev/null +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/SchedulerProperties.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 System.Linq; + +namespace Azure.ResourceManager.DurableTask.Models +{ + /// Details of the Scheduler. + public partial class SchedulerProperties + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// IP allow list for durable task scheduler. Values can be IPv4, IPv6 or CIDR. + /// SKU of the durable task scheduler. + /// or is null. + public SchedulerProperties(IEnumerable ipAllowlist, SchedulerSku sku) + { + Argument.AssertNotNull(ipAllowlist, nameof(ipAllowlist)); + Argument.AssertNotNull(sku, nameof(sku)); + + IPAllowlist = ipAllowlist.ToList(); + Sku = sku; + } + + /// Initializes a new instance of . + /// The status of the last operation. + /// URL of the durable task scheduler. + /// IP allow list for durable task scheduler. Values can be IPv4, IPv6 or CIDR. + /// SKU of the durable task scheduler. + /// Keeps track of any properties unknown to the library. + internal SchedulerProperties(ProvisioningState? provisioningState, string endpoint, IList ipAllowlist, SchedulerSku sku, IDictionary serializedAdditionalRawData) + { + ProvisioningState = provisioningState; + Endpoint = endpoint; + IPAllowlist = ipAllowlist; + Sku = sku; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal SchedulerProperties() + { + } + + /// The status of the last operation. + public ProvisioningState? ProvisioningState { get; } + /// URL of the durable task scheduler. + public string Endpoint { get; } + /// IP allow list for durable task scheduler. Values can be IPv4, IPv6 or CIDR. + public IList IPAllowlist { get; } + /// SKU of the durable task scheduler. + public SchedulerSku Sku { get; set; } + } +} diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/SchedulerPropertiesUpdate.Serialization.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/SchedulerPropertiesUpdate.Serialization.cs new file mode 100644 index 000000000000..d6ea1112424f --- /dev/null +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/SchedulerPropertiesUpdate.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.DurableTask.Models +{ + public partial class SchedulerPropertiesUpdate : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SchedulerPropertiesUpdate)} 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(Endpoint)) + { + writer.WritePropertyName("endpoint"u8); + writer.WriteStringValue(Endpoint); + } + if (Optional.IsCollectionDefined(IPAllowlist)) + { + writer.WritePropertyName("ipAllowlist"u8); + writer.WriteStartArray(); + foreach (var item in IPAllowlist) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + 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 + } + } + } + + SchedulerPropertiesUpdate IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SchedulerPropertiesUpdate)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSchedulerPropertiesUpdate(document.RootElement, options); + } + + internal static SchedulerPropertiesUpdate DeserializeSchedulerPropertiesUpdate(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ProvisioningState? provisioningState = default; + string endpoint = default; + IList ipAllowlist = default; + SchedulerSkuUpdate sku = 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 ProvisioningState(property.Value.GetString()); + continue; + } + if (property.NameEquals("endpoint"u8)) + { + endpoint = property.Value.GetString(); + continue; + } + if (property.NameEquals("ipAllowlist"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + ipAllowlist = array; + continue; + } + if (property.NameEquals("sku"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + sku = SchedulerSkuUpdate.DeserializeSchedulerSkuUpdate(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new SchedulerPropertiesUpdate(provisioningState, endpoint, ipAllowlist ?? new ChangeTrackingList(), 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(SchedulerPropertiesUpdate)} does not support writing '{options.Format}' format."); + } + } + + SchedulerPropertiesUpdate IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeSchedulerPropertiesUpdate(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SchedulerPropertiesUpdate)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/SchedulerPropertiesUpdate.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/SchedulerPropertiesUpdate.cs new file mode 100644 index 000000000000..d366144b270e --- /dev/null +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/SchedulerPropertiesUpdate.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.DurableTask.Models +{ + /// The Scheduler resource properties to be updated. + public partial class SchedulerPropertiesUpdate + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// 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 SchedulerPropertiesUpdate() + { + IPAllowlist = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// The status of the last operation. + /// URL of the durable task scheduler. + /// IP allow list for durable task scheduler. Values can be IPv4, IPv6 or CIDR. + /// SKU of the durable task scheduler. + /// Keeps track of any properties unknown to the library. + internal SchedulerPropertiesUpdate(ProvisioningState? provisioningState, string endpoint, IList ipAllowlist, SchedulerSkuUpdate sku, IDictionary serializedAdditionalRawData) + { + ProvisioningState = provisioningState; + Endpoint = endpoint; + IPAllowlist = ipAllowlist; + Sku = sku; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The status of the last operation. + public ProvisioningState? ProvisioningState { get; } + /// URL of the durable task scheduler. + public string Endpoint { get; } + /// IP allow list for durable task scheduler. Values can be IPv4, IPv6 or CIDR. + public IList IPAllowlist { get; } + /// SKU of the durable task scheduler. + public SchedulerSkuUpdate Sku { get; set; } + } +} diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/SchedulerSku.Serialization.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/SchedulerSku.Serialization.cs new file mode 100644 index 000000000000..e9a1ac002035 --- /dev/null +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/SchedulerSku.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.DurableTask.Models +{ + public partial class SchedulerSku : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SchedulerSku)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + if (Optional.IsDefined(Capacity)) + { + writer.WritePropertyName("capacity"u8); + writer.WriteNumberValue(Capacity.Value); + } + if (options.Format != "W" && Optional.IsDefined(RedundancyState)) + { + writer.WritePropertyName("redundancyState"u8); + writer.WriteStringValue(RedundancyState.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 + } + } + } + + SchedulerSku IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SchedulerSku)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSchedulerSku(document.RootElement, options); + } + + internal static SchedulerSku DeserializeSchedulerSku(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string name = default; + int? capacity = default; + RedundancyState? redundancyState = 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("capacity"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + capacity = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("redundancyState"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + redundancyState = new RedundancyState(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new SchedulerSku(name, capacity, redundancyState, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(SchedulerSku)} does not support writing '{options.Format}' format."); + } + } + + SchedulerSku IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeSchedulerSku(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SchedulerSku)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/SchedulerSku.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/SchedulerSku.cs new file mode 100644 index 000000000000..9da3588373ca --- /dev/null +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/SchedulerSku.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.DurableTask.Models +{ + /// The SKU (Stock Keeping Unit) assigned to this durable task scheduler. + public partial class SchedulerSku + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// 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 SKU. + /// is null. + public SchedulerSku(string name) + { + Argument.AssertNotNull(name, nameof(name)); + + Name = name; + } + + /// Initializes a new instance of . + /// The name of the SKU. + /// The SKU capacity. This allows scale out/in for the resource and impacts zone redundancy. + /// Indicates whether the current SKU configuration is zone redundant. + /// Keeps track of any properties unknown to the library. + internal SchedulerSku(string name, int? capacity, RedundancyState? redundancyState, IDictionary serializedAdditionalRawData) + { + Name = name; + Capacity = capacity; + RedundancyState = redundancyState; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal SchedulerSku() + { + } + + /// The name of the SKU. + public string Name { get; set; } + /// The SKU capacity. This allows scale out/in for the resource and impacts zone redundancy. + public int? Capacity { get; set; } + /// Indicates whether the current SKU configuration is zone redundant. + public RedundancyState? RedundancyState { get; } + } +} diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/SchedulerSkuUpdate.Serialization.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/SchedulerSkuUpdate.Serialization.cs new file mode 100644 index 000000000000..758a088411bc --- /dev/null +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/SchedulerSkuUpdate.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.DurableTask.Models +{ + public partial class SchedulerSkuUpdate : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SchedulerSkuUpdate)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(Name)) + { + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + } + if (Optional.IsDefined(Capacity)) + { + writer.WritePropertyName("capacity"u8); + writer.WriteNumberValue(Capacity.Value); + } + if (options.Format != "W" && Optional.IsDefined(RedundancyState)) + { + writer.WritePropertyName("redundancyState"u8); + writer.WriteStringValue(RedundancyState.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 + } + } + } + + SchedulerSkuUpdate IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SchedulerSkuUpdate)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSchedulerSkuUpdate(document.RootElement, options); + } + + internal static SchedulerSkuUpdate DeserializeSchedulerSkuUpdate(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string name = default; + int? capacity = default; + RedundancyState? redundancyState = 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("capacity"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + capacity = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("redundancyState"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + redundancyState = new RedundancyState(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new SchedulerSkuUpdate(name, capacity, redundancyState, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(SchedulerSkuUpdate)} does not support writing '{options.Format}' format."); + } + } + + SchedulerSkuUpdate IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeSchedulerSkuUpdate(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SchedulerSkuUpdate)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/SchedulerSkuUpdate.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/SchedulerSkuUpdate.cs new file mode 100644 index 000000000000..9b2280a02d6e --- /dev/null +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/SchedulerSkuUpdate.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.DurableTask.Models +{ + /// The SKU (Stock Keeping Unit) properties to be updated. + public partial class SchedulerSkuUpdate + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// 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 SchedulerSkuUpdate() + { + } + + /// Initializes a new instance of . + /// The name of the SKU. + /// The SKU capacity. This allows scale out/in for the resource and impacts zone redundancy. + /// Indicates whether the current SKU configuration is zone redundant. + /// Keeps track of any properties unknown to the library. + internal SchedulerSkuUpdate(string name, int? capacity, RedundancyState? redundancyState, IDictionary serializedAdditionalRawData) + { + Name = name; + Capacity = capacity; + RedundancyState = redundancyState; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The name of the SKU. + public string Name { get; set; } + /// The SKU capacity. This allows scale out/in for the resource and impacts zone redundancy. + public int? Capacity { get; set; } + /// Indicates whether the current SKU configuration is zone redundant. + public RedundancyState? RedundancyState { get; } + } +} diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/TaskHubListResult.Serialization.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/TaskHubListResult.Serialization.cs new file mode 100644 index 000000000000..706f23c82194 --- /dev/null +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/TaskHubListResult.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.DurableTask.Models +{ + internal partial class TaskHubListResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(TaskHubListResult)} 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 + } + } + } + + TaskHubListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(TaskHubListResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeTaskHubListResult(document.RootElement, options); + } + + internal static TaskHubListResult DeserializeTaskHubListResult(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(TaskHubData.DeserializeTaskHubData(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 TaskHubListResult(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(TaskHubListResult)} does not support writing '{options.Format}' format."); + } + } + + TaskHubListResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeTaskHubListResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(TaskHubListResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/TaskHubListResult.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/TaskHubListResult.cs new file mode 100644 index 000000000000..a15dd30e019b --- /dev/null +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/TaskHubListResult.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.DurableTask.Models +{ + /// The response of a TaskHub list operation. + internal partial class TaskHubListResult + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// 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 TaskHub items on this page. + /// is null. + internal TaskHubListResult(IEnumerable value) + { + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); + } + + /// Initializes a new instance of . + /// The TaskHub items on this page. + /// The link to the next page of items. + /// Keeps track of any properties unknown to the library. + internal TaskHubListResult(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) + { + Value = value; + NextLink = nextLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal TaskHubListResult() + { + } + + /// The TaskHub items on this page. + public IReadOnlyList Value { get; } + /// The link to the next page of items. + public Uri NextLink { get; } + } +} diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/TaskHubProperties.Serialization.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/TaskHubProperties.Serialization.cs new file mode 100644 index 000000000000..a11a47a6a039 --- /dev/null +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/TaskHubProperties.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.DurableTask.Models +{ + public partial class TaskHubProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(TaskHubProperties)} 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(DashboardUri)) + { + writer.WritePropertyName("dashboardUrl"u8); + writer.WriteStringValue(DashboardUri.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 + } + } + } + + TaskHubProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(TaskHubProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeTaskHubProperties(document.RootElement, options); + } + + internal static TaskHubProperties DeserializeTaskHubProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ProvisioningState? provisioningState = default; + Uri dashboardUrl = 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 ProvisioningState(property.Value.GetString()); + continue; + } + if (property.NameEquals("dashboardUrl"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + dashboardUrl = new Uri(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new TaskHubProperties(provisioningState, dashboardUrl, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(TaskHubProperties)} does not support writing '{options.Format}' format."); + } + } + + TaskHubProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeTaskHubProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(TaskHubProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/TaskHubProperties.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/TaskHubProperties.cs new file mode 100644 index 000000000000..97074a8f32f9 --- /dev/null +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/TaskHubProperties.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.DurableTask.Models +{ + /// The properties of Task Hub. + public partial class TaskHubProperties + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// 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 TaskHubProperties() + { + } + + /// Initializes a new instance of . + /// The status of the last operation. + /// URL of the durable task scheduler dashboard. + /// Keeps track of any properties unknown to the library. + internal TaskHubProperties(ProvisioningState? provisioningState, Uri dashboardUri, IDictionary serializedAdditionalRawData) + { + ProvisioningState = provisioningState; + DashboardUri = dashboardUri; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The status of the last operation. + public ProvisioningState? ProvisioningState { get; } + /// URL of the durable task scheduler dashboard. + public Uri DashboardUri { get; } + } +} diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/ProviderConstants.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/ProviderConstants.cs new file mode 100644 index 000000000000..6cb750df8d05 --- /dev/null +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/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.DurableTask +{ + internal static class ProviderConstants + { + public static string DefaultProviderNamespace { get; } = ClientDiagnostics.GetResourceProviderNamespace(typeof(ProviderConstants).Assembly); + } +} diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/RestOperations/RetentionPoliciesRestOperations.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/RestOperations/RetentionPoliciesRestOperations.cs new file mode 100644 index 000000000000..db8eaf67abc7 --- /dev/null +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/RestOperations/RetentionPoliciesRestOperations.cs @@ -0,0 +1,589 @@ +// 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.DurableTask.Models; + +namespace Azure.ResourceManager.DurableTask +{ + internal partial class RetentionPoliciesRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of RetentionPoliciesRestOperations. + /// 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 RetentionPoliciesRestOperations(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-04-01-preview"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string schedulerName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DurableTask/schedulers/", false); + uri.AppendPath(schedulerName, true); + uri.AppendPath("/retentionPolicies/default", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string schedulerName) + { + 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.DurableTask/schedulers/", false); + uri.AppendPath(schedulerName, true); + uri.AppendPath("/retentionPolicies/default", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get a Retention Policy. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the Scheduler. + /// 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 schedulerName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(schedulerName, nameof(schedulerName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, schedulerName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + RetentionPolicyData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = RetentionPolicyData.DeserializeRetentionPolicyData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((RetentionPolicyData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get a Retention Policy. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the Scheduler. + /// 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 schedulerName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(schedulerName, nameof(schedulerName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, schedulerName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + RetentionPolicyData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = RetentionPolicyData.DeserializeRetentionPolicyData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((RetentionPolicyData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateCreateOrReplaceRequestUri(string subscriptionId, string resourceGroupName, string schedulerName, RetentionPolicyData 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.DurableTask/schedulers/", false); + uri.AppendPath(schedulerName, true); + uri.AppendPath("/retentionPolicies/default", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateCreateOrReplaceRequest(string subscriptionId, string resourceGroupName, string schedulerName, RetentionPolicyData 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.DurableTask/schedulers/", false); + uri.AppendPath(schedulerName, true); + uri.AppendPath("/retentionPolicies/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 or Update a Retention Policy. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the Scheduler. + /// 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 CreateOrReplaceAsync(string subscriptionId, string resourceGroupName, string schedulerName, RetentionPolicyData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(schedulerName, nameof(schedulerName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrReplaceRequest(subscriptionId, resourceGroupName, schedulerName, data); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 201: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Create or Update a Retention Policy. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the Scheduler. + /// 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 CreateOrReplace(string subscriptionId, string resourceGroupName, string schedulerName, RetentionPolicyData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(schedulerName, nameof(schedulerName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrReplaceRequest(subscriptionId, resourceGroupName, schedulerName, 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 schedulerName, RetentionPolicyData 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.DurableTask/schedulers/", false); + uri.AppendPath(schedulerName, true); + uri.AppendPath("/retentionPolicies/default", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string schedulerName, RetentionPolicyData 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.DurableTask/schedulers/", false); + uri.AppendPath(schedulerName, true); + uri.AppendPath("/retentionPolicies/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; + } + + /// Update a Retention Policy. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the Scheduler. + /// 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 schedulerName, RetentionPolicyData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(schedulerName, nameof(schedulerName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, schedulerName, 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 Retention Policy. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the Scheduler. + /// 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 schedulerName, RetentionPolicyData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(schedulerName, nameof(schedulerName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, schedulerName, 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 schedulerName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DurableTask/schedulers/", false); + uri.AppendPath(schedulerName, true); + uri.AppendPath("/retentionPolicies/default", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string schedulerName) + { + 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.DurableTask/schedulers/", false); + uri.AppendPath(schedulerName, true); + uri.AppendPath("/retentionPolicies/default", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Delete a Retention Policy. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the Scheduler. + /// 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 schedulerName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(schedulerName, nameof(schedulerName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, schedulerName); + 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 Retention Policy. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the Scheduler. + /// 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 schedulerName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(schedulerName, nameof(schedulerName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, schedulerName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListBySchedulerRequestUri(string subscriptionId, string resourceGroupName, string schedulerName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DurableTask/schedulers/", false); + uri.AppendPath(schedulerName, true); + uri.AppendPath("/retentionPolicies", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListBySchedulerRequest(string subscriptionId, string resourceGroupName, string schedulerName) + { + 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.DurableTask/schedulers/", false); + uri.AppendPath(schedulerName, true); + uri.AppendPath("/retentionPolicies", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List Retention Policies. + /// 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 Scheduler. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListBySchedulerAsync(string subscriptionId, string resourceGroupName, string schedulerName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(schedulerName, nameof(schedulerName)); + + using var message = CreateListBySchedulerRequest(subscriptionId, resourceGroupName, schedulerName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + RetentionPolicyListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = RetentionPolicyListResult.DeserializeRetentionPolicyListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List Retention Policies. + /// 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 Scheduler. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ListByScheduler(string subscriptionId, string resourceGroupName, string schedulerName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(schedulerName, nameof(schedulerName)); + + using var message = CreateListBySchedulerRequest(subscriptionId, resourceGroupName, schedulerName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + RetentionPolicyListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = RetentionPolicyListResult.DeserializeRetentionPolicyListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListBySchedulerNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string schedulerName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListBySchedulerNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string schedulerName) + { + 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 Retention Policies. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the Scheduler. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListBySchedulerNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string schedulerName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(schedulerName, nameof(schedulerName)); + + using var message = CreateListBySchedulerNextPageRequest(nextLink, subscriptionId, resourceGroupName, schedulerName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + RetentionPolicyListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = RetentionPolicyListResult.DeserializeRetentionPolicyListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List Retention Policies. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the Scheduler. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ListBySchedulerNextPage(string nextLink, string subscriptionId, string resourceGroupName, string schedulerName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(schedulerName, nameof(schedulerName)); + + using var message = CreateListBySchedulerNextPageRequest(nextLink, subscriptionId, resourceGroupName, schedulerName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + RetentionPolicyListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = RetentionPolicyListResult.DeserializeRetentionPolicyListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/RestOperations/SchedulersRestOperations.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/RestOperations/SchedulersRestOperations.cs new file mode 100644 index 000000000000..2c2836c2f463 --- /dev/null +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/RestOperations/SchedulersRestOperations.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.DurableTask.Models; + +namespace Azure.ResourceManager.DurableTask +{ + internal partial class SchedulersRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of SchedulersRestOperations. + /// 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 SchedulersRestOperations(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-04-01-preview"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string schedulerName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DurableTask/schedulers/", false); + uri.AppendPath(schedulerName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string schedulerName) + { + 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.DurableTask/schedulers/", false); + uri.AppendPath(schedulerName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get a Scheduler. + /// 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 Scheduler. + /// 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 schedulerName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(schedulerName, nameof(schedulerName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, schedulerName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + SchedulerData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = SchedulerData.DeserializeSchedulerData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((SchedulerData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get a Scheduler. + /// 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 Scheduler. + /// 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 schedulerName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(schedulerName, nameof(schedulerName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, schedulerName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + SchedulerData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = SchedulerData.DeserializeSchedulerData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((SchedulerData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, string resourceGroupName, string schedulerName, SchedulerData 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.DurableTask/schedulers/", false); + uri.AppendPath(schedulerName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string schedulerName, SchedulerData 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.DurableTask/schedulers/", false); + uri.AppendPath(schedulerName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(data, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Create or update a Scheduler. + /// 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 Scheduler. + /// 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 schedulerName, SchedulerData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(schedulerName, nameof(schedulerName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, schedulerName, data); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 201: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Create or update a Scheduler. + /// 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 Scheduler. + /// 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 schedulerName, SchedulerData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(schedulerName, nameof(schedulerName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, schedulerName, 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 schedulerName, SchedulerPatch 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.DurableTask/schedulers/", false); + uri.AppendPath(schedulerName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string schedulerName, SchedulerPatch 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.DurableTask/schedulers/", false); + uri.AppendPath(schedulerName, 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 Scheduler. + /// 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 Scheduler. + /// 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 schedulerName, SchedulerPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(schedulerName, nameof(schedulerName)); + Argument.AssertNotNull(patch, nameof(patch)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, schedulerName, 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 Scheduler. + /// 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 Scheduler. + /// 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 schedulerName, SchedulerPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(schedulerName, nameof(schedulerName)); + Argument.AssertNotNull(patch, nameof(patch)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, schedulerName, 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 schedulerName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DurableTask/schedulers/", false); + uri.AppendPath(schedulerName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string schedulerName) + { + 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.DurableTask/schedulers/", false); + uri.AppendPath(schedulerName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Delete a Scheduler. + /// 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 Scheduler. + /// 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 schedulerName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(schedulerName, nameof(schedulerName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, schedulerName); + 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 Scheduler. + /// 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 Scheduler. + /// 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 schedulerName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(schedulerName, nameof(schedulerName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, schedulerName); + _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.DurableTask/schedulers", 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.DurableTask/schedulers", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List Schedulers 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: + { + SchedulerListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = SchedulerListResult.DeserializeSchedulerListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List Schedulers 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: + { + SchedulerListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = SchedulerListResult.DeserializeSchedulerListResult(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.DurableTask/schedulers", 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.DurableTask/schedulers", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List Schedulers by 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: + { + SchedulerListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = SchedulerListResult.DeserializeSchedulerListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List Schedulers by 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: + { + SchedulerListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = SchedulerListResult.DeserializeSchedulerListResult(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 Schedulers 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: + { + SchedulerListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = SchedulerListResult.DeserializeSchedulerListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List Schedulers 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: + { + SchedulerListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = SchedulerListResult.DeserializeSchedulerListResult(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 Schedulers by 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: + { + SchedulerListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = SchedulerListResult.DeserializeSchedulerListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List Schedulers by 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: + { + SchedulerListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = SchedulerListResult.DeserializeSchedulerListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/RestOperations/TaskHubsRestOperations.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/RestOperations/TaskHubsRestOperations.cs new file mode 100644 index 000000000000..9b02d01a3cc0 --- /dev/null +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/RestOperations/TaskHubsRestOperations.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.DurableTask.Models; + +namespace Azure.ResourceManager.DurableTask +{ + internal partial class TaskHubsRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of TaskHubsRestOperations. + /// 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 TaskHubsRestOperations(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-04-01-preview"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string schedulerName, string taskHubName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DurableTask/schedulers/", false); + uri.AppendPath(schedulerName, true); + uri.AppendPath("/taskHubs/", false); + uri.AppendPath(taskHubName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string schedulerName, string taskHubName) + { + 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.DurableTask/schedulers/", false); + uri.AppendPath(schedulerName, true); + uri.AppendPath("/taskHubs/", false); + uri.AppendPath(taskHubName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get a Task Hub. + /// 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 Scheduler. + /// The name of the TaskHub. + /// 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 schedulerName, string taskHubName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(schedulerName, nameof(schedulerName)); + Argument.AssertNotNullOrEmpty(taskHubName, nameof(taskHubName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, schedulerName, taskHubName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + TaskHubData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = TaskHubData.DeserializeTaskHubData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((TaskHubData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get a Task Hub. + /// 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 Scheduler. + /// The name of the TaskHub. + /// 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 schedulerName, string taskHubName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(schedulerName, nameof(schedulerName)); + Argument.AssertNotNullOrEmpty(taskHubName, nameof(taskHubName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, schedulerName, taskHubName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + TaskHubData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = TaskHubData.DeserializeTaskHubData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((TaskHubData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, string resourceGroupName, string schedulerName, string taskHubName, TaskHubData 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.DurableTask/schedulers/", false); + uri.AppendPath(schedulerName, true); + uri.AppendPath("/taskHubs/", false); + uri.AppendPath(taskHubName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string schedulerName, string taskHubName, TaskHubData 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.DurableTask/schedulers/", false); + uri.AppendPath(schedulerName, true); + uri.AppendPath("/taskHubs/", false); + uri.AppendPath(taskHubName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(data, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Create or Update a Task Hub. + /// 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 Scheduler. + /// The name of the TaskHub. + /// 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 schedulerName, string taskHubName, TaskHubData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(schedulerName, nameof(schedulerName)); + Argument.AssertNotNullOrEmpty(taskHubName, nameof(taskHubName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, schedulerName, taskHubName, data); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 201: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Create or Update a Task Hub. + /// 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 Scheduler. + /// The name of the TaskHub. + /// 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 schedulerName, string taskHubName, TaskHubData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(schedulerName, nameof(schedulerName)); + Argument.AssertNotNullOrEmpty(taskHubName, nameof(taskHubName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, schedulerName, taskHubName, 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 schedulerName, string taskHubName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DurableTask/schedulers/", false); + uri.AppendPath(schedulerName, true); + uri.AppendPath("/taskHubs/", false); + uri.AppendPath(taskHubName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string schedulerName, string taskHubName) + { + 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.DurableTask/schedulers/", false); + uri.AppendPath(schedulerName, true); + uri.AppendPath("/taskHubs/", false); + uri.AppendPath(taskHubName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Delete a Task Hub. + /// 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 Scheduler. + /// The name of the TaskHub. + /// 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 schedulerName, string taskHubName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(schedulerName, nameof(schedulerName)); + Argument.AssertNotNullOrEmpty(taskHubName, nameof(taskHubName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, schedulerName, taskHubName); + 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 Task Hub. + /// 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 Scheduler. + /// The name of the TaskHub. + /// 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 schedulerName, string taskHubName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(schedulerName, nameof(schedulerName)); + Argument.AssertNotNullOrEmpty(taskHubName, nameof(taskHubName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, schedulerName, taskHubName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListBySchedulerRequestUri(string subscriptionId, string resourceGroupName, string schedulerName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DurableTask/schedulers/", false); + uri.AppendPath(schedulerName, true); + uri.AppendPath("/taskHubs", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListBySchedulerRequest(string subscriptionId, string resourceGroupName, string schedulerName) + { + 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.DurableTask/schedulers/", false); + uri.AppendPath(schedulerName, true); + uri.AppendPath("/taskHubs", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List Task Hubs. + /// 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 Scheduler. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListBySchedulerAsync(string subscriptionId, string resourceGroupName, string schedulerName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(schedulerName, nameof(schedulerName)); + + using var message = CreateListBySchedulerRequest(subscriptionId, resourceGroupName, schedulerName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + TaskHubListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = TaskHubListResult.DeserializeTaskHubListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List Task Hubs. + /// 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 Scheduler. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ListByScheduler(string subscriptionId, string resourceGroupName, string schedulerName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(schedulerName, nameof(schedulerName)); + + using var message = CreateListBySchedulerRequest(subscriptionId, resourceGroupName, schedulerName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + TaskHubListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = TaskHubListResult.DeserializeTaskHubListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListBySchedulerNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string schedulerName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListBySchedulerNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string schedulerName) + { + 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 Task Hubs. + /// 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 Scheduler. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListBySchedulerNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string schedulerName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(schedulerName, nameof(schedulerName)); + + using var message = CreateListBySchedulerNextPageRequest(nextLink, subscriptionId, resourceGroupName, schedulerName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + TaskHubListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = TaskHubListResult.DeserializeTaskHubListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List Task Hubs. + /// 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 Scheduler. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ListBySchedulerNextPage(string nextLink, string subscriptionId, string resourceGroupName, string schedulerName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(schedulerName, nameof(schedulerName)); + + using var message = CreateListBySchedulerNextPageRequest(nextLink, subscriptionId, resourceGroupName, schedulerName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + TaskHubListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = TaskHubListResult.DeserializeTaskHubListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/RetentionPolicyData.Serialization.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/RetentionPolicyData.Serialization.cs new file mode 100644 index 000000000000..3a4d1a22384b --- /dev/null +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/RetentionPolicyData.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.DurableTask.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.DurableTask +{ + public partial class RetentionPolicyData : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.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(RetentionPolicyData)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties, options); + } + } + + RetentionPolicyData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(RetentionPolicyData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeRetentionPolicyData(document.RootElement, options); + } + + internal static RetentionPolicyData DeserializeRetentionPolicyData(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + RetentionPolicyProperties 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 = RetentionPolicyProperties.DeserializeRetentionPolicyProperties(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 RetentionPolicyData( + 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(RetentionPolicyData)} does not support writing '{options.Format}' format."); + } + } + + RetentionPolicyData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeRetentionPolicyData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(RetentionPolicyData)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/RetentionPolicyData.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/RetentionPolicyData.cs new file mode 100644 index 000000000000..36aab8b38c9d --- /dev/null +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/RetentionPolicyData.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.DurableTask.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.DurableTask +{ + /// + /// A class representing the RetentionPolicy data model. + /// A retention policy resource belonging to the scheduler + /// + public partial class RetentionPolicyData : 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 RetentionPolicyData() + { + } + + /// 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 RetentionPolicyData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, RetentionPolicyProperties properties, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + { + Properties = properties; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The resource-specific properties for this resource. + public RetentionPolicyProperties Properties { get; set; } + } +} diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/RetentionPolicyResource.Serialization.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/RetentionPolicyResource.Serialization.cs new file mode 100644 index 000000000000..05b68346eea8 --- /dev/null +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/RetentionPolicyResource.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.DurableTask +{ + public partial class RetentionPolicyResource : IJsonModel + { + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + RetentionPolicyData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options); + + RetentionPolicyData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + } +} diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/RetentionPolicyResource.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/RetentionPolicyResource.cs new file mode 100644 index 000000000000..6b054ddc4d68 --- /dev/null +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/RetentionPolicyResource.cs @@ -0,0 +1,438 @@ +// 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.DurableTask +{ + /// + /// A Class representing a RetentionPolicy 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 GetRetentionPolicyResource method. + /// Otherwise you can get one from its parent resource using the GetRetentionPolicy method. + /// + public partial class RetentionPolicyResource : ArmResource + { + /// Generate the resource identifier of a instance. + /// The subscriptionId. + /// The resourceGroupName. + /// The schedulerName. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string schedulerName) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DurableTask/schedulers/{schedulerName}/retentionPolicies/default"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _retentionPolicyClientDiagnostics; + private readonly RetentionPoliciesRestOperations _retentionPolicyRestClient; + private readonly RetentionPolicyData _data; + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.DurableTask/schedulers/retentionPolicies"; + + /// Initializes a new instance of the class for mocking. + protected RetentionPolicyResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal RetentionPolicyResource(ArmClient client, RetentionPolicyData 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 RetentionPolicyResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _retentionPolicyClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.DurableTask", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string retentionPolicyApiVersion); + _retentionPolicyRestClient = new RetentionPoliciesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, retentionPolicyApiVersion); +#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 RetentionPolicyData 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 Retention Policy + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DurableTask/schedulers/{schedulerName}/retentionPolicies/default + /// + /// + /// Operation Id + /// RetentionPolicy_Get + /// + /// + /// Default Api Version + /// 2025-04-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _retentionPolicyClientDiagnostics.CreateScope("RetentionPolicyResource.Get"); + scope.Start(); + try + { + var response = await _retentionPolicyRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new RetentionPolicyResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a Retention Policy + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DurableTask/schedulers/{schedulerName}/retentionPolicies/default + /// + /// + /// Operation Id + /// RetentionPolicy_Get + /// + /// + /// Default Api Version + /// 2025-04-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _retentionPolicyClientDiagnostics.CreateScope("RetentionPolicyResource.Get"); + scope.Start(); + try + { + var response = _retentionPolicyRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new RetentionPolicyResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete a Retention Policy + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DurableTask/schedulers/{schedulerName}/retentionPolicies/default + /// + /// + /// Operation Id + /// RetentionPolicy_Delete + /// + /// + /// Default Api Version + /// 2025-04-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 = _retentionPolicyClientDiagnostics.CreateScope("RetentionPolicyResource.Delete"); + scope.Start(); + try + { + var response = await _retentionPolicyRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, cancellationToken).ConfigureAwait(false); + var operation = new DurableTaskArmOperation(_retentionPolicyClientDiagnostics, Pipeline, _retentionPolicyRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.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 Retention Policy + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DurableTask/schedulers/{schedulerName}/retentionPolicies/default + /// + /// + /// Operation Id + /// RetentionPolicy_Delete + /// + /// + /// Default Api Version + /// 2025-04-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 = _retentionPolicyClientDiagnostics.CreateScope("RetentionPolicyResource.Delete"); + scope.Start(); + try + { + var response = _retentionPolicyRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, cancellationToken); + var operation = new DurableTaskArmOperation(_retentionPolicyClientDiagnostics, Pipeline, _retentionPolicyRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Update a Retention Policy + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DurableTask/schedulers/{schedulerName}/retentionPolicies/default + /// + /// + /// Operation Id + /// RetentionPolicy_Update + /// + /// + /// Default Api Version + /// 2025-04-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, RetentionPolicyData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _retentionPolicyClientDiagnostics.CreateScope("RetentionPolicyResource.Update"); + scope.Start(); + try + { + var response = await _retentionPolicyRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, data, cancellationToken).ConfigureAwait(false); + var operation = new DurableTaskArmOperation(new RetentionPolicyOperationSource(Client), _retentionPolicyClientDiagnostics, Pipeline, _retentionPolicyRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.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 Retention Policy + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DurableTask/schedulers/{schedulerName}/retentionPolicies/default + /// + /// + /// Operation Id + /// RetentionPolicy_Update + /// + /// + /// Default Api Version + /// 2025-04-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, RetentionPolicyData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _retentionPolicyClientDiagnostics.CreateScope("RetentionPolicyResource.Update"); + scope.Start(); + try + { + var response = _retentionPolicyRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, data, cancellationToken); + var operation = new DurableTaskArmOperation(new RetentionPolicyOperationSource(Client), _retentionPolicyClientDiagnostics, Pipeline, _retentionPolicyRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, data).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Create or Update a Retention Policy + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DurableTask/schedulers/{schedulerName}/retentionPolicies/default + /// + /// + /// Operation Id + /// RetentionPolicy_CreateOrReplace + /// + /// + /// Default Api Version + /// 2025-04-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. + /// Resource create parameters. + /// The cancellation token to use. + /// is null. + public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, RetentionPolicyData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _retentionPolicyClientDiagnostics.CreateScope("RetentionPolicyResource.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _retentionPolicyRestClient.CreateOrReplaceAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, data, cancellationToken).ConfigureAwait(false); + var operation = new DurableTaskArmOperation(new RetentionPolicyOperationSource(Client), _retentionPolicyClientDiagnostics, Pipeline, _retentionPolicyRestClient.CreateCreateOrReplaceRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.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 or Update a Retention Policy + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DurableTask/schedulers/{schedulerName}/retentionPolicies/default + /// + /// + /// Operation Id + /// RetentionPolicy_CreateOrReplace + /// + /// + /// Default Api Version + /// 2025-04-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. + /// Resource create parameters. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, RetentionPolicyData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _retentionPolicyClientDiagnostics.CreateScope("RetentionPolicyResource.CreateOrUpdate"); + scope.Start(); + try + { + var response = _retentionPolicyRestClient.CreateOrReplace(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, data, cancellationToken); + var operation = new DurableTaskArmOperation(new RetentionPolicyOperationSource(Client), _retentionPolicyClientDiagnostics, Pipeline, _retentionPolicyRestClient.CreateCreateOrReplaceRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.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/durabletask/Azure.ResourceManager.DurableTask/src/Generated/SchedulerCollection.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/SchedulerCollection.cs new file mode 100644 index 000000000000..a0d6ad7ff7fc --- /dev/null +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/SchedulerCollection.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.DurableTask +{ + /// + /// 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 GetSchedulers method from an instance of . + /// + public partial class SchedulerCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _schedulerClientDiagnostics; + private readonly SchedulersRestOperations _schedulerRestClient; + + /// Initializes a new instance of the class for mocking. + protected SchedulerCollection() + { + } + + /// 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 SchedulerCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _schedulerClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.DurableTask", SchedulerResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(SchedulerResource.ResourceType, out string schedulerApiVersion); + _schedulerRestClient = new SchedulersRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, schedulerApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceGroupResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceGroupResource.ResourceType), nameof(id)); + } + + /// + /// Create or update a Scheduler + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DurableTask/schedulers/{schedulerName} + /// + /// + /// Operation Id + /// Scheduler_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2025-04-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 name of the Scheduler. + /// 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 schedulerName, SchedulerData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(schedulerName, nameof(schedulerName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _schedulerClientDiagnostics.CreateScope("SchedulerCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _schedulerRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, schedulerName, data, cancellationToken).ConfigureAwait(false); + var operation = new DurableTaskArmOperation(new SchedulerOperationSource(Client), _schedulerClientDiagnostics, Pipeline, _schedulerRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, schedulerName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Create or update a Scheduler + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DurableTask/schedulers/{schedulerName} + /// + /// + /// Operation Id + /// Scheduler_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2025-04-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 name of the Scheduler. + /// 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 schedulerName, SchedulerData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(schedulerName, nameof(schedulerName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _schedulerClientDiagnostics.CreateScope("SchedulerCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _schedulerRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, schedulerName, data, cancellationToken); + var operation = new DurableTaskArmOperation(new SchedulerOperationSource(Client), _schedulerClientDiagnostics, Pipeline, _schedulerRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, schedulerName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a Scheduler + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DurableTask/schedulers/{schedulerName} + /// + /// + /// Operation Id + /// Scheduler_Get + /// + /// + /// Default Api Version + /// 2025-04-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Scheduler. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string schedulerName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(schedulerName, nameof(schedulerName)); + + using var scope = _schedulerClientDiagnostics.CreateScope("SchedulerCollection.Get"); + scope.Start(); + try + { + var response = await _schedulerRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, schedulerName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new SchedulerResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a Scheduler + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DurableTask/schedulers/{schedulerName} + /// + /// + /// Operation Id + /// Scheduler_Get + /// + /// + /// Default Api Version + /// 2025-04-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Scheduler. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string schedulerName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(schedulerName, nameof(schedulerName)); + + using var scope = _schedulerClientDiagnostics.CreateScope("SchedulerCollection.Get"); + scope.Start(); + try + { + var response = _schedulerRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, schedulerName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new SchedulerResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// List Schedulers by resource group + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DurableTask/schedulers + /// + /// + /// Operation Id + /// Scheduler_ListByResourceGroup + /// + /// + /// Default Api Version + /// 2025-04-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) => _schedulerRestClient.CreateListByResourceGroupRequest(Id.SubscriptionId, Id.ResourceGroupName); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _schedulerRestClient.CreateListByResourceGroupNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new SchedulerResource(Client, SchedulerData.DeserializeSchedulerData(e)), _schedulerClientDiagnostics, Pipeline, "SchedulerCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// List Schedulers by resource group + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DurableTask/schedulers + /// + /// + /// Operation Id + /// Scheduler_ListByResourceGroup + /// + /// + /// Default Api Version + /// 2025-04-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) => _schedulerRestClient.CreateListByResourceGroupRequest(Id.SubscriptionId, Id.ResourceGroupName); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _schedulerRestClient.CreateListByResourceGroupNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new SchedulerResource(Client, SchedulerData.DeserializeSchedulerData(e)), _schedulerClientDiagnostics, Pipeline, "SchedulerCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DurableTask/schedulers/{schedulerName} + /// + /// + /// Operation Id + /// Scheduler_Get + /// + /// + /// Default Api Version + /// 2025-04-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Scheduler. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string schedulerName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(schedulerName, nameof(schedulerName)); + + using var scope = _schedulerClientDiagnostics.CreateScope("SchedulerCollection.Exists"); + scope.Start(); + try + { + var response = await _schedulerRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, schedulerName, 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.DurableTask/schedulers/{schedulerName} + /// + /// + /// Operation Id + /// Scheduler_Get + /// + /// + /// Default Api Version + /// 2025-04-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Scheduler. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string schedulerName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(schedulerName, nameof(schedulerName)); + + using var scope = _schedulerClientDiagnostics.CreateScope("SchedulerCollection.Exists"); + scope.Start(); + try + { + var response = _schedulerRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, schedulerName, 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.DurableTask/schedulers/{schedulerName} + /// + /// + /// Operation Id + /// Scheduler_Get + /// + /// + /// Default Api Version + /// 2025-04-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Scheduler. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetIfExistsAsync(string schedulerName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(schedulerName, nameof(schedulerName)); + + using var scope = _schedulerClientDiagnostics.CreateScope("SchedulerCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _schedulerRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, schedulerName, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new SchedulerResource(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.DurableTask/schedulers/{schedulerName} + /// + /// + /// Operation Id + /// Scheduler_Get + /// + /// + /// Default Api Version + /// 2025-04-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Scheduler. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string schedulerName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(schedulerName, nameof(schedulerName)); + + using var scope = _schedulerClientDiagnostics.CreateScope("SchedulerCollection.GetIfExists"); + scope.Start(); + try + { + var response = _schedulerRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, schedulerName, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new SchedulerResource(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/durabletask/Azure.ResourceManager.DurableTask/src/Generated/SchedulerData.Serialization.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/SchedulerData.Serialization.cs new file mode 100644 index 000000000000..b3df03072f2b --- /dev/null +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/SchedulerData.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.DurableTask.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.DurableTask +{ + public partial class SchedulerData : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.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(SchedulerData)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties, options); + } + } + + SchedulerData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SchedulerData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSchedulerData(document.RootElement, options); + } + + internal static SchedulerData DeserializeSchedulerData(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + SchedulerProperties 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 = SchedulerProperties.DeserializeSchedulerProperties(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 SchedulerData( + 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(SchedulerData)} does not support writing '{options.Format}' format."); + } + } + + SchedulerData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeSchedulerData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SchedulerData)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/SchedulerData.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/SchedulerData.cs new file mode 100644 index 000000000000..b0efc6bb0c8b --- /dev/null +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/SchedulerData.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.DurableTask.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.DurableTask +{ + /// + /// A class representing the Scheduler data model. + /// A Durable Task Scheduler resource + /// + public partial class SchedulerData : 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 SchedulerData(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 SchedulerData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, SchedulerProperties properties, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) + { + Properties = properties; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal SchedulerData() + { + } + + /// The resource-specific properties for this resource. + public SchedulerProperties Properties { get; set; } + } +} diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/SchedulerResource.Serialization.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/SchedulerResource.Serialization.cs new file mode 100644 index 000000000000..ee2bf83f4e2f --- /dev/null +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/SchedulerResource.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.DurableTask +{ + public partial class SchedulerResource : IJsonModel + { + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + SchedulerData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options); + + SchedulerData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + } +} diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/SchedulerResource.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/SchedulerResource.cs new file mode 100644 index 000000000000..b6dc27420417 --- /dev/null +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/SchedulerResource.cs @@ -0,0 +1,783 @@ +// 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.DurableTask.Models; +using Azure.ResourceManager.Resources; + +namespace Azure.ResourceManager.DurableTask +{ + /// + /// A Class representing a Scheduler 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 GetSchedulerResource method. + /// Otherwise you can get one from its parent resource using the GetScheduler method. + /// + public partial class SchedulerResource : ArmResource + { + /// Generate the resource identifier of a instance. + /// The subscriptionId. + /// The resourceGroupName. + /// The schedulerName. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string schedulerName) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DurableTask/schedulers/{schedulerName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _schedulerClientDiagnostics; + private readonly SchedulersRestOperations _schedulerRestClient; + private readonly SchedulerData _data; + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.DurableTask/schedulers"; + + /// Initializes a new instance of the class for mocking. + protected SchedulerResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal SchedulerResource(ArmClient client, SchedulerData 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 SchedulerResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _schedulerClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.DurableTask", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string schedulerApiVersion); + _schedulerRestClient = new SchedulersRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, schedulerApiVersion); +#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 SchedulerData 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 TaskHubResources in the Scheduler. + /// An object representing collection of TaskHubResources and their operations over a TaskHubResource. + public virtual TaskHubCollection GetTaskHubs() + { + return GetCachedClient(client => new TaskHubCollection(client, Id)); + } + + /// + /// Get a Task Hub + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DurableTask/schedulers/{schedulerName}/taskHubs/{taskHubName} + /// + /// + /// Operation Id + /// TaskHub_Get + /// + /// + /// Default Api Version + /// 2025-04-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the TaskHub. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetTaskHubAsync(string taskHubName, CancellationToken cancellationToken = default) + { + return await GetTaskHubs().GetAsync(taskHubName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get a Task Hub + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DurableTask/schedulers/{schedulerName}/taskHubs/{taskHubName} + /// + /// + /// Operation Id + /// TaskHub_Get + /// + /// + /// Default Api Version + /// 2025-04-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the TaskHub. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetTaskHub(string taskHubName, CancellationToken cancellationToken = default) + { + return GetTaskHubs().Get(taskHubName, cancellationToken); + } + + /// Gets an object representing a RetentionPolicyResource along with the instance operations that can be performed on it in the Scheduler. + /// Returns a object. + public virtual RetentionPolicyResource GetRetentionPolicy() + { + return new RetentionPolicyResource(Client, Id.AppendChildResource("retentionPolicies", "default")); + } + + /// + /// Get a Scheduler + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DurableTask/schedulers/{schedulerName} + /// + /// + /// Operation Id + /// Scheduler_Get + /// + /// + /// Default Api Version + /// 2025-04-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _schedulerClientDiagnostics.CreateScope("SchedulerResource.Get"); + scope.Start(); + try + { + var response = await _schedulerRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new SchedulerResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a Scheduler + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DurableTask/schedulers/{schedulerName} + /// + /// + /// Operation Id + /// Scheduler_Get + /// + /// + /// Default Api Version + /// 2025-04-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _schedulerClientDiagnostics.CreateScope("SchedulerResource.Get"); + scope.Start(); + try + { + var response = _schedulerRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new SchedulerResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete a Scheduler + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DurableTask/schedulers/{schedulerName} + /// + /// + /// Operation Id + /// Scheduler_Delete + /// + /// + /// Default Api Version + /// 2025-04-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 = _schedulerClientDiagnostics.CreateScope("SchedulerResource.Delete"); + scope.Start(); + try + { + var response = await _schedulerRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new DurableTaskArmOperation(_schedulerClientDiagnostics, Pipeline, _schedulerRestClient.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 Scheduler + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DurableTask/schedulers/{schedulerName} + /// + /// + /// Operation Id + /// Scheduler_Delete + /// + /// + /// Default Api Version + /// 2025-04-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 = _schedulerClientDiagnostics.CreateScope("SchedulerResource.Delete"); + scope.Start(); + try + { + var response = _schedulerRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + var operation = new DurableTaskArmOperation(_schedulerClientDiagnostics, Pipeline, _schedulerRestClient.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 Scheduler + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DurableTask/schedulers/{schedulerName} + /// + /// + /// Operation Id + /// Scheduler_Update + /// + /// + /// Default Api Version + /// 2025-04-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, SchedulerPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(patch, nameof(patch)); + + using var scope = _schedulerClientDiagnostics.CreateScope("SchedulerResource.Update"); + scope.Start(); + try + { + var response = await _schedulerRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch, cancellationToken).ConfigureAwait(false); + var operation = new DurableTaskArmOperation(new SchedulerOperationSource(Client), _schedulerClientDiagnostics, Pipeline, _schedulerRestClient.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 Scheduler + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DurableTask/schedulers/{schedulerName} + /// + /// + /// Operation Id + /// Scheduler_Update + /// + /// + /// Default Api Version + /// 2025-04-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, SchedulerPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(patch, nameof(patch)); + + using var scope = _schedulerClientDiagnostics.CreateScope("SchedulerResource.Update"); + scope.Start(); + try + { + var response = _schedulerRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch, cancellationToken); + var operation = new DurableTaskArmOperation(new SchedulerOperationSource(Client), _schedulerClientDiagnostics, Pipeline, _schedulerRestClient.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.DurableTask/schedulers/{schedulerName} + /// + /// + /// Operation Id + /// Scheduler_Get + /// + /// + /// Default Api Version + /// 2025-04-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 = _schedulerClientDiagnostics.CreateScope("SchedulerResource.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 _schedulerRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new SchedulerResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new SchedulerPatch(); + 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.DurableTask/schedulers/{schedulerName} + /// + /// + /// Operation Id + /// Scheduler_Get + /// + /// + /// Default Api Version + /// 2025-04-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 = _schedulerClientDiagnostics.CreateScope("SchedulerResource.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 = _schedulerRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + return Response.FromValue(new SchedulerResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new SchedulerPatch(); + 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.DurableTask/schedulers/{schedulerName} + /// + /// + /// Operation Id + /// Scheduler_Get + /// + /// + /// Default Api Version + /// 2025-04-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 = _schedulerClientDiagnostics.CreateScope("SchedulerResource.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 _schedulerRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new SchedulerResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new SchedulerPatch(); + 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.DurableTask/schedulers/{schedulerName} + /// + /// + /// Operation Id + /// Scheduler_Get + /// + /// + /// Default Api Version + /// 2025-04-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 = _schedulerClientDiagnostics.CreateScope("SchedulerResource.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 = _schedulerRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + return Response.FromValue(new SchedulerResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new SchedulerPatch(); + 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.DurableTask/schedulers/{schedulerName} + /// + /// + /// Operation Id + /// Scheduler_Get + /// + /// + /// Default Api Version + /// 2025-04-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 = _schedulerClientDiagnostics.CreateScope("SchedulerResource.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 _schedulerRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new SchedulerResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new SchedulerPatch(); + 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.DurableTask/schedulers/{schedulerName} + /// + /// + /// Operation Id + /// Scheduler_Get + /// + /// + /// Default Api Version + /// 2025-04-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 = _schedulerClientDiagnostics.CreateScope("SchedulerResource.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 = _schedulerRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + return Response.FromValue(new SchedulerResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new SchedulerPatch(); + 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/durabletask/Azure.ResourceManager.DurableTask/src/Generated/TaskHubCollection.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/TaskHubCollection.cs new file mode 100644 index 000000000000..3b1b20e0b086 --- /dev/null +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/TaskHubCollection.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.DurableTask +{ + /// + /// 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 GetTaskHubs method from an instance of . + /// + public partial class TaskHubCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _taskHubClientDiagnostics; + private readonly TaskHubsRestOperations _taskHubRestClient; + + /// Initializes a new instance of the class for mocking. + protected TaskHubCollection() + { + } + + /// 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 TaskHubCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _taskHubClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.DurableTask", TaskHubResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(TaskHubResource.ResourceType, out string taskHubApiVersion); + _taskHubRestClient = new TaskHubsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, taskHubApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != SchedulerResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, SchedulerResource.ResourceType), nameof(id)); + } + + /// + /// Create or Update a Task Hub + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DurableTask/schedulers/{schedulerName}/taskHubs/{taskHubName} + /// + /// + /// Operation Id + /// TaskHub_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2025-04-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 name of the TaskHub. + /// 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 taskHubName, TaskHubData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(taskHubName, nameof(taskHubName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _taskHubClientDiagnostics.CreateScope("TaskHubCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _taskHubRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, taskHubName, data, cancellationToken).ConfigureAwait(false); + var operation = new DurableTaskArmOperation(new TaskHubOperationSource(Client), _taskHubClientDiagnostics, Pipeline, _taskHubRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, taskHubName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Create or Update a Task Hub + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DurableTask/schedulers/{schedulerName}/taskHubs/{taskHubName} + /// + /// + /// Operation Id + /// TaskHub_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2025-04-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 name of the TaskHub. + /// 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 taskHubName, TaskHubData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(taskHubName, nameof(taskHubName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _taskHubClientDiagnostics.CreateScope("TaskHubCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _taskHubRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, taskHubName, data, cancellationToken); + var operation = new DurableTaskArmOperation(new TaskHubOperationSource(Client), _taskHubClientDiagnostics, Pipeline, _taskHubRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, taskHubName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a Task Hub + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DurableTask/schedulers/{schedulerName}/taskHubs/{taskHubName} + /// + /// + /// Operation Id + /// TaskHub_Get + /// + /// + /// Default Api Version + /// 2025-04-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the TaskHub. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string taskHubName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(taskHubName, nameof(taskHubName)); + + using var scope = _taskHubClientDiagnostics.CreateScope("TaskHubCollection.Get"); + scope.Start(); + try + { + var response = await _taskHubRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, taskHubName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new TaskHubResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a Task Hub + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DurableTask/schedulers/{schedulerName}/taskHubs/{taskHubName} + /// + /// + /// Operation Id + /// TaskHub_Get + /// + /// + /// Default Api Version + /// 2025-04-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the TaskHub. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string taskHubName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(taskHubName, nameof(taskHubName)); + + using var scope = _taskHubClientDiagnostics.CreateScope("TaskHubCollection.Get"); + scope.Start(); + try + { + var response = _taskHubRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, taskHubName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new TaskHubResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// List Task Hubs + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DurableTask/schedulers/{schedulerName}/taskHubs + /// + /// + /// Operation Id + /// TaskHub_ListByScheduler + /// + /// + /// Default Api Version + /// 2025-04-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) => _taskHubRestClient.CreateListBySchedulerRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _taskHubRestClient.CreateListBySchedulerNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new TaskHubResource(Client, TaskHubData.DeserializeTaskHubData(e)), _taskHubClientDiagnostics, Pipeline, "TaskHubCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// List Task Hubs + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DurableTask/schedulers/{schedulerName}/taskHubs + /// + /// + /// Operation Id + /// TaskHub_ListByScheduler + /// + /// + /// Default Api Version + /// 2025-04-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) => _taskHubRestClient.CreateListBySchedulerRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _taskHubRestClient.CreateListBySchedulerNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new TaskHubResource(Client, TaskHubData.DeserializeTaskHubData(e)), _taskHubClientDiagnostics, Pipeline, "TaskHubCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DurableTask/schedulers/{schedulerName}/taskHubs/{taskHubName} + /// + /// + /// Operation Id + /// TaskHub_Get + /// + /// + /// Default Api Version + /// 2025-04-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the TaskHub. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string taskHubName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(taskHubName, nameof(taskHubName)); + + using var scope = _taskHubClientDiagnostics.CreateScope("TaskHubCollection.Exists"); + scope.Start(); + try + { + var response = await _taskHubRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, taskHubName, 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.DurableTask/schedulers/{schedulerName}/taskHubs/{taskHubName} + /// + /// + /// Operation Id + /// TaskHub_Get + /// + /// + /// Default Api Version + /// 2025-04-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the TaskHub. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string taskHubName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(taskHubName, nameof(taskHubName)); + + using var scope = _taskHubClientDiagnostics.CreateScope("TaskHubCollection.Exists"); + scope.Start(); + try + { + var response = _taskHubRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, taskHubName, 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.DurableTask/schedulers/{schedulerName}/taskHubs/{taskHubName} + /// + /// + /// Operation Id + /// TaskHub_Get + /// + /// + /// Default Api Version + /// 2025-04-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the TaskHub. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetIfExistsAsync(string taskHubName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(taskHubName, nameof(taskHubName)); + + using var scope = _taskHubClientDiagnostics.CreateScope("TaskHubCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _taskHubRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, taskHubName, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new TaskHubResource(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.DurableTask/schedulers/{schedulerName}/taskHubs/{taskHubName} + /// + /// + /// Operation Id + /// TaskHub_Get + /// + /// + /// Default Api Version + /// 2025-04-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the TaskHub. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string taskHubName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(taskHubName, nameof(taskHubName)); + + using var scope = _taskHubClientDiagnostics.CreateScope("TaskHubCollection.GetIfExists"); + scope.Start(); + try + { + var response = _taskHubRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, taskHubName, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new TaskHubResource(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/durabletask/Azure.ResourceManager.DurableTask/src/Generated/TaskHubData.Serialization.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/TaskHubData.Serialization.cs new file mode 100644 index 000000000000..ebedcde70af3 --- /dev/null +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/TaskHubData.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.DurableTask.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.DurableTask +{ + public partial class TaskHubData : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.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(TaskHubData)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties, options); + } + } + + TaskHubData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(TaskHubData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeTaskHubData(document.RootElement, options); + } + + internal static TaskHubData DeserializeTaskHubData(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + TaskHubProperties 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 = TaskHubProperties.DeserializeTaskHubProperties(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 TaskHubData( + 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(TaskHubData)} does not support writing '{options.Format}' format."); + } + } + + TaskHubData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeTaskHubData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(TaskHubData)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/TaskHubData.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/TaskHubData.cs new file mode 100644 index 000000000000..32ccf2cef315 --- /dev/null +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/TaskHubData.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.DurableTask.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.DurableTask +{ + /// + /// A class representing the TaskHub data model. + /// A Task Hub resource belonging to the scheduler + /// + public partial class TaskHubData : 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 TaskHubData() + { + } + + /// 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 TaskHubData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, TaskHubProperties properties, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + { + Properties = properties; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The resource-specific properties for this resource. + public TaskHubProperties Properties { get; set; } + } +} diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/TaskHubResource.Serialization.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/TaskHubResource.Serialization.cs new file mode 100644 index 000000000000..dbb7d1eccb6a --- /dev/null +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/TaskHubResource.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.DurableTask +{ + public partial class TaskHubResource : IJsonModel + { + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + TaskHubData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options); + + TaskHubData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + } +} diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/TaskHubResource.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/TaskHubResource.cs new file mode 100644 index 000000000000..2f5bed6b65f4 --- /dev/null +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/TaskHubResource.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.DurableTask +{ + /// + /// A Class representing a TaskHub 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 GetTaskHubResource method. + /// Otherwise you can get one from its parent resource using the GetTaskHub method. + /// + public partial class TaskHubResource : ArmResource + { + /// Generate the resource identifier of a instance. + /// The subscriptionId. + /// The resourceGroupName. + /// The schedulerName. + /// The taskHubName. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string schedulerName, string taskHubName) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DurableTask/schedulers/{schedulerName}/taskHubs/{taskHubName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _taskHubClientDiagnostics; + private readonly TaskHubsRestOperations _taskHubRestClient; + private readonly TaskHubData _data; + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.DurableTask/schedulers/taskHubs"; + + /// Initializes a new instance of the class for mocking. + protected TaskHubResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal TaskHubResource(ArmClient client, TaskHubData 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 TaskHubResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _taskHubClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.DurableTask", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string taskHubApiVersion); + _taskHubRestClient = new TaskHubsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, taskHubApiVersion); +#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 TaskHubData 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 Task Hub + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DurableTask/schedulers/{schedulerName}/taskHubs/{taskHubName} + /// + /// + /// Operation Id + /// TaskHub_Get + /// + /// + /// Default Api Version + /// 2025-04-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _taskHubClientDiagnostics.CreateScope("TaskHubResource.Get"); + scope.Start(); + try + { + var response = await _taskHubRestClient.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 TaskHubResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a Task Hub + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DurableTask/schedulers/{schedulerName}/taskHubs/{taskHubName} + /// + /// + /// Operation Id + /// TaskHub_Get + /// + /// + /// Default Api Version + /// 2025-04-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _taskHubClientDiagnostics.CreateScope("TaskHubResource.Get"); + scope.Start(); + try + { + var response = _taskHubRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new TaskHubResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete a Task Hub + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DurableTask/schedulers/{schedulerName}/taskHubs/{taskHubName} + /// + /// + /// Operation Id + /// TaskHub_Delete + /// + /// + /// Default Api Version + /// 2025-04-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 = _taskHubClientDiagnostics.CreateScope("TaskHubResource.Delete"); + scope.Start(); + try + { + var response = await _taskHubRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new DurableTaskArmOperation(_taskHubClientDiagnostics, Pipeline, _taskHubRestClient.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 Task Hub + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DurableTask/schedulers/{schedulerName}/taskHubs/{taskHubName} + /// + /// + /// Operation Id + /// TaskHub_Delete + /// + /// + /// Default Api Version + /// 2025-04-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 = _taskHubClientDiagnostics.CreateScope("TaskHubResource.Delete"); + scope.Start(); + try + { + var response = _taskHubRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + var operation = new DurableTaskArmOperation(_taskHubClientDiagnostics, Pipeline, _taskHubRestClient.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 or Update a Task Hub + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DurableTask/schedulers/{schedulerName}/taskHubs/{taskHubName} + /// + /// + /// Operation Id + /// TaskHub_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2025-04-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. + /// Resource create parameters. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(WaitUntil waitUntil, TaskHubData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _taskHubClientDiagnostics.CreateScope("TaskHubResource.Update"); + scope.Start(); + try + { + var response = await _taskHubRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken).ConfigureAwait(false); + var operation = new DurableTaskArmOperation(new TaskHubOperationSource(Client), _taskHubClientDiagnostics, Pipeline, _taskHubRestClient.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 or Update a Task Hub + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DurableTask/schedulers/{schedulerName}/taskHubs/{taskHubName} + /// + /// + /// Operation Id + /// TaskHub_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2025-04-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. + /// Resource create parameters. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation Update(WaitUntil waitUntil, TaskHubData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _taskHubClientDiagnostics.CreateScope("TaskHubResource.Update"); + scope.Start(); + try + { + var response = _taskHubRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken); + var operation = new DurableTaskArmOperation(new TaskHubOperationSource(Client), _taskHubClientDiagnostics, Pipeline, _taskHubRestClient.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/durabletask/Azure.ResourceManager.DurableTask/src/Properties/AssemblyInfo.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Properties/AssemblyInfo.cs new file mode 100644 index 000000000000..f4ddd8db408b --- /dev/null +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/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.DurableTask.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("DurableTask")] diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/tests/Azure.ResourceManager.DurableTask.Tests.csproj b/sdk/durabletask/Azure.ResourceManager.DurableTask/tests/Azure.ResourceManager.DurableTask.Tests.csproj new file mode 100644 index 000000000000..c0676a62c635 --- /dev/null +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/tests/Azure.ResourceManager.DurableTask.Tests.csproj @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/tests/DurableTaskManagementTestBase.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/tests/DurableTaskManagementTestBase.cs new file mode 100644 index 000000000000..f71a1438b58a --- /dev/null +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/tests/DurableTaskManagementTestBase.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.DurableTask.Tests +{ + public class DurableTaskManagementTestBase : ManagementRecordedTestBase + { + protected ArmClient Client { get; private set; } + protected SubscriptionResource DefaultSubscription { get; private set; } + + protected DurableTaskManagementTestBase(bool isAsync, RecordedTestMode mode) + : base(isAsync, mode) + { + } + + protected DurableTaskManagementTestBase(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/durabletask/Azure.ResourceManager.DurableTask/tests/DurableTaskManagementTestEnvironment.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/tests/DurableTaskManagementTestEnvironment.cs new file mode 100644 index 000000000000..e95562b17623 --- /dev/null +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/tests/DurableTaskManagementTestEnvironment.cs @@ -0,0 +1,11 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using Azure.Core.TestFramework; + +namespace Azure.ResourceManager.DurableTask.Tests +{ + public class DurableTaskManagementTestEnvironment : TestEnvironment + { + } +} diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/tsp-location.yaml b/sdk/durabletask/Azure.ResourceManager.DurableTask/tsp-location.yaml new file mode 100644 index 000000000000..5e0344b8ab4a --- /dev/null +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/tsp-location.yaml @@ -0,0 +1,4 @@ +directory: specification/durabletask/DurableTask.Management +commit: af51fab0cc00ba3eaee7e4710e8fec5894d4bb0c +repo: Azure/azure-rest-api-specs +additionalDirectories: diff --git a/sdk/durabletask/ci.mgmt.yml b/sdk/durabletask/ci.mgmt.yml new file mode 100644 index 000000000000..8e58a086dadf --- /dev/null +++ b/sdk/durabletask/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/durabletask /ci.mgmt.yml + - sdk/durabletask /Azure.ResourceManager.DurableTask / + + +extends: + template: /eng/pipelines/templates/stages/archetype-sdk-client.yml + parameters: + ServiceDirectory: durabletask + ArtifactName: packages + LimitForPullRequest: true + Artifacts: + - name: Azure.ResourceManager.DurableTask + safeName: AzureResourceManagerDurableTask diff --git a/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/tsp-location.yaml b/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/tsp-location.yaml index 2b3e253ddbf3..77bb89259fdf 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: af51fab0cc00ba3eaee7e4710e8fec5894d4bb0c +repo: Azure/azure-rest-api-specs +additionalDirectories: diff --git a/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/api/Azure.ResourceManager.NeonPostgres.net8.0.cs b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/api/Azure.ResourceManager.NeonPostgres.net8.0.cs index f6e35086e51c..1243878c8c01 100644 --- a/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/api/Azure.ResourceManager.NeonPostgres.net8.0.cs +++ b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/api/Azure.ResourceManager.NeonPostgres.net8.0.cs @@ -1,5 +1,205 @@ namespace Azure.ResourceManager.NeonPostgres { + public partial class BranchCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected BranchCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string branchName, Azure.ResourceManager.NeonPostgres.BranchData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string branchName, Azure.ResourceManager.NeonPostgres.BranchData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string branchName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string branchName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string branchName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string branchName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string branchName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string branchName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class BranchData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public BranchData() { } + public Azure.ResourceManager.NeonPostgres.Models.BranchProperties Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NeonPostgres.BranchData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NeonPostgres.BranchData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class BranchResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected BranchResource() { } + public virtual Azure.ResourceManager.NeonPostgres.BranchData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string organizationName, string projectName, string branchName) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetCompute(string computeName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetComputeAsync(string computeName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.NeonPostgres.ComputeCollection GetComputes() { throw null; } + public virtual Azure.Response GetEndpoint(string endpointName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetEndpointAsync(string endpointName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.NeonPostgres.EndpointCollection GetEndpoints() { throw null; } + public virtual Azure.Response GetNeonDatabase(string neonDatabaseName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetNeonDatabaseAsync(string neonDatabaseName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.NeonPostgres.NeonDatabaseCollection GetNeonDatabases() { throw null; } + public virtual Azure.Response GetNeonRole(string neonRoleName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetNeonRoleAsync(string neonRoleName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.NeonPostgres.NeonRoleCollection GetNeonRoles() { throw null; } + Azure.ResourceManager.NeonPostgres.BranchData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NeonPostgres.BranchData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.NeonPostgres.BranchData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.NeonPostgres.BranchData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class ComputeCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected ComputeCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string computeName, Azure.ResourceManager.NeonPostgres.ComputeData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string computeName, Azure.ResourceManager.NeonPostgres.ComputeData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string computeName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string computeName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string computeName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string computeName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string computeName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string computeName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class ComputeData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ComputeData() { } + public Azure.ResourceManager.NeonPostgres.Models.ComputeProperties Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NeonPostgres.ComputeData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NeonPostgres.ComputeData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ComputeResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected ComputeResource() { } + public virtual Azure.ResourceManager.NeonPostgres.ComputeData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string organizationName, string projectName, string branchName, string computeName) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + Azure.ResourceManager.NeonPostgres.ComputeData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NeonPostgres.ComputeData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.NeonPostgres.ComputeData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.NeonPostgres.ComputeData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class EndpointCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected EndpointCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string endpointName, Azure.ResourceManager.NeonPostgres.EndpointData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string endpointName, Azure.ResourceManager.NeonPostgres.EndpointData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string endpointName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string endpointName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string endpointName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string endpointName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string endpointName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string endpointName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class EndpointData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public EndpointData() { } + public Azure.ResourceManager.NeonPostgres.Models.EndpointProperties Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NeonPostgres.EndpointData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NeonPostgres.EndpointData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class EndpointResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected EndpointResource() { } + public virtual Azure.ResourceManager.NeonPostgres.EndpointData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string organizationName, string projectName, string branchName, string endpointName) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + Azure.ResourceManager.NeonPostgres.EndpointData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NeonPostgres.EndpointData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.NeonPostgres.EndpointData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.NeonPostgres.EndpointData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class NeonDatabaseCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected NeonDatabaseCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string neonDatabaseName, Azure.ResourceManager.NeonPostgres.NeonDatabaseData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string neonDatabaseName, Azure.ResourceManager.NeonPostgres.NeonDatabaseData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string neonDatabaseName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string neonDatabaseName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string neonDatabaseName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string neonDatabaseName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string neonDatabaseName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string neonDatabaseName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class NeonDatabaseData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public NeonDatabaseData() { } + public Azure.ResourceManager.NeonPostgres.Models.NeonDatabaseProperties Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NeonPostgres.NeonDatabaseData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NeonPostgres.NeonDatabaseData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class NeonDatabaseResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected NeonDatabaseResource() { } + public virtual Azure.ResourceManager.NeonPostgres.NeonDatabaseData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string organizationName, string projectName, string branchName, string neonDatabaseName) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + Azure.ResourceManager.NeonPostgres.NeonDatabaseData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NeonPostgres.NeonDatabaseData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.NeonPostgres.NeonDatabaseData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.NeonPostgres.NeonDatabaseData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } public partial class NeonOrganizationCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable { protected NeonOrganizationCollection() { } @@ -41,6 +241,9 @@ protected NeonOrganizationResource() { } public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetProject(string projectName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetProjectAsync(string projectName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.NeonPostgres.ProjectCollection GetProjects() { throw null; } public virtual Azure.Response RemoveTag(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> RemoveTagAsync(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response SetTags(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -55,12 +258,119 @@ protected NeonOrganizationResource() { } } public static partial class NeonPostgresExtensions { + public static Azure.ResourceManager.NeonPostgres.BranchResource GetBranchResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.NeonPostgres.ComputeResource GetComputeResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.NeonPostgres.EndpointResource GetEndpointResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.NeonPostgres.NeonDatabaseResource GetNeonDatabaseResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.Response GetNeonOrganization(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string organizationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static System.Threading.Tasks.Task> GetNeonOrganizationAsync(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string organizationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.ResourceManager.NeonPostgres.NeonOrganizationResource GetNeonOrganizationResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.NeonPostgres.NeonOrganizationCollection GetNeonOrganizations(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource) { throw null; } public static Azure.Pageable GetNeonOrganizations(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.AsyncPageable GetNeonOrganizationsAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.ResourceManager.NeonPostgres.NeonRoleResource GetNeonRoleResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.Response GetPostgresVersionsOrganization(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, Azure.ResourceManager.NeonPostgres.Models.PgVersion pgVersion = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static System.Threading.Tasks.Task> GetPostgresVersionsOrganizationAsync(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, Azure.ResourceManager.NeonPostgres.Models.PgVersion pgVersion = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.ResourceManager.NeonPostgres.ProjectResource GetProjectResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + } + public partial class NeonRoleCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected NeonRoleCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string neonRoleName, Azure.ResourceManager.NeonPostgres.NeonRoleData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string neonRoleName, Azure.ResourceManager.NeonPostgres.NeonRoleData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string neonRoleName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string neonRoleName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string neonRoleName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string neonRoleName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string neonRoleName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string neonRoleName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class NeonRoleData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public NeonRoleData() { } + public Azure.ResourceManager.NeonPostgres.Models.NeonRoleProperties Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NeonPostgres.NeonRoleData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NeonPostgres.NeonRoleData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class NeonRoleResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected NeonRoleResource() { } + public virtual Azure.ResourceManager.NeonPostgres.NeonRoleData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string organizationName, string projectName, string branchName, string neonRoleName) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + Azure.ResourceManager.NeonPostgres.NeonRoleData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NeonPostgres.NeonRoleData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.NeonPostgres.NeonRoleData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.NeonPostgres.NeonRoleData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class ProjectCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected ProjectCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string projectName, Azure.ResourceManager.NeonPostgres.ProjectData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string projectName, Azure.ResourceManager.NeonPostgres.ProjectData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string projectName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string projectName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string projectName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string projectName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string projectName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string projectName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class ProjectData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ProjectData() { } + public Azure.ResourceManager.NeonPostgres.Models.ProjectProperties Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NeonPostgres.ProjectData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NeonPostgres.ProjectData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ProjectResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected ProjectResource() { } + public virtual Azure.ResourceManager.NeonPostgres.ProjectData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string organizationName, string projectName) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetBranch(string branchName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetBranchAsync(string branchName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.NeonPostgres.BranchCollection GetBranches() { throw null; } + public virtual Azure.Response GetConnectionUri(Azure.ResourceManager.NeonPostgres.Models.ConnectionUriProperties connectionUriParameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetConnectionUriAsync(Azure.ResourceManager.NeonPostgres.Models.ConnectionUriProperties connectionUriParameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + Azure.ResourceManager.NeonPostgres.ProjectData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NeonPostgres.ProjectData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.NeonPostgres.ProjectData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.NeonPostgres.ProjectData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } } namespace Azure.ResourceManager.NeonPostgres.Mocking @@ -68,7 +378,13 @@ namespace Azure.ResourceManager.NeonPostgres.Mocking public partial class MockableNeonPostgresArmClient : Azure.ResourceManager.ArmResource { protected MockableNeonPostgresArmClient() { } + public virtual Azure.ResourceManager.NeonPostgres.BranchResource GetBranchResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.NeonPostgres.ComputeResource GetComputeResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.NeonPostgres.EndpointResource GetEndpointResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.NeonPostgres.NeonDatabaseResource GetNeonDatabaseResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.NeonPostgres.NeonOrganizationResource GetNeonOrganizationResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.NeonPostgres.NeonRoleResource GetNeonRoleResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.NeonPostgres.ProjectResource GetProjectResource(Azure.Core.ResourceIdentifier id) { throw null; } } public partial class MockableNeonPostgresResourceGroupResource : Azure.ResourceManager.ArmResource { @@ -76,6 +392,8 @@ protected MockableNeonPostgresResourceGroupResource() { } public virtual Azure.Response GetNeonOrganization(string organizationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetNeonOrganizationAsync(string organizationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.NeonPostgres.NeonOrganizationCollection GetNeonOrganizations() { throw null; } + public virtual Azure.Response GetPostgresVersionsOrganization(Azure.ResourceManager.NeonPostgres.Models.PgVersion pgVersion = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetPostgresVersionsOrganizationAsync(Azure.ResourceManager.NeonPostgres.Models.PgVersion pgVersion = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } public partial class MockableNeonPostgresSubscriptionResource : Azure.ResourceManager.ArmResource { @@ -88,8 +406,140 @@ namespace Azure.ResourceManager.NeonPostgres.Models { public static partial class ArmNeonPostgresModelFactory { + public static Azure.ResourceManager.NeonPostgres.BranchData BranchData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.NeonPostgres.Models.BranchProperties properties = null) { throw null; } + public static Azure.ResourceManager.NeonPostgres.Models.BranchProperties BranchProperties(string entityId = null, string entityName = null, string createdAt = null, Azure.ResourceManager.NeonPostgres.Models.NeonResourceProvisioningState? provisioningState = default(Azure.ResourceManager.NeonPostgres.Models.NeonResourceProvisioningState?), System.Collections.Generic.IEnumerable attributes = null, string projectId = null, string parentId = null, string roleName = null, string databaseName = null, System.Collections.Generic.IEnumerable roles = null, System.Collections.Generic.IEnumerable databases = null, System.Collections.Generic.IEnumerable endpoints = null) { throw null; } + public static Azure.ResourceManager.NeonPostgres.ComputeData ComputeData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.NeonPostgres.Models.ComputeProperties properties = null) { throw null; } + public static Azure.ResourceManager.NeonPostgres.Models.ComputeProperties ComputeProperties(string entityId = null, string entityName = null, string createdAt = null, Azure.ResourceManager.NeonPostgres.Models.NeonResourceProvisioningState? provisioningState = default(Azure.ResourceManager.NeonPostgres.Models.NeonResourceProvisioningState?), System.Collections.Generic.IEnumerable attributes = null, string region = null, int? cpuCores = default(int?), int? memory = default(int?), string status = null) { throw null; } + public static Azure.ResourceManager.NeonPostgres.Models.ConnectionUriProperties ConnectionUriProperties(string projectId = null, string branchId = null, string databaseName = null, string roleName = null, string endpointId = null, bool? isPooled = default(bool?), string connectionStringUri = null) { throw null; } + public static Azure.ResourceManager.NeonPostgres.EndpointData EndpointData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.NeonPostgres.Models.EndpointProperties properties = null) { throw null; } + public static Azure.ResourceManager.NeonPostgres.Models.EndpointProperties EndpointProperties(string entityId = null, string entityName = null, string createdAt = null, Azure.ResourceManager.NeonPostgres.Models.NeonResourceProvisioningState? provisioningState = default(Azure.ResourceManager.NeonPostgres.Models.NeonResourceProvisioningState?), System.Collections.Generic.IEnumerable attributes = null, string projectId = null, string branchId = null, Azure.ResourceManager.NeonPostgres.Models.EndpointType? endpointType = default(Azure.ResourceManager.NeonPostgres.Models.EndpointType?)) { throw null; } + public static Azure.ResourceManager.NeonPostgres.NeonDatabaseData NeonDatabaseData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.NeonPostgres.Models.NeonDatabaseProperties properties = null) { throw null; } + public static Azure.ResourceManager.NeonPostgres.Models.NeonDatabaseProperties NeonDatabaseProperties(string entityId = null, string entityName = null, string createdAt = null, Azure.ResourceManager.NeonPostgres.Models.NeonResourceProvisioningState? provisioningState = default(Azure.ResourceManager.NeonPostgres.Models.NeonResourceProvisioningState?), System.Collections.Generic.IEnumerable attributes = null, string branchId = null, string ownerName = null) { throw null; } public static Azure.ResourceManager.NeonPostgres.NeonOrganizationData NeonOrganizationData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.NeonPostgres.Models.NeonOrganizationProperties properties = null) { throw null; } - public static Azure.ResourceManager.NeonPostgres.Models.NeonOrganizationProperties NeonOrganizationProperties(Azure.ResourceManager.NeonPostgres.Models.NeonMarketplaceDetails marketplaceDetails = null, Azure.ResourceManager.NeonPostgres.Models.NeonUserDetails userDetails = null, Azure.ResourceManager.NeonPostgres.Models.NeonCompanyDetails companyDetails = null, Azure.ResourceManager.NeonPostgres.Models.NeonResourceProvisioningState? provisioningState = default(Azure.ResourceManager.NeonPostgres.Models.NeonResourceProvisioningState?), Azure.ResourceManager.NeonPostgres.Models.PartnerOrganizationProperties partnerOrganizationProperties = null) { throw null; } + public static Azure.ResourceManager.NeonPostgres.Models.NeonOrganizationProperties NeonOrganizationProperties(Azure.ResourceManager.NeonPostgres.Models.NeonMarketplaceDetails marketplaceDetails = null, Azure.ResourceManager.NeonPostgres.Models.NeonUserDetails userDetails = null, Azure.ResourceManager.NeonPostgres.Models.NeonCompanyDetails companyDetails = null, Azure.ResourceManager.NeonPostgres.Models.NeonResourceProvisioningState? provisioningState = default(Azure.ResourceManager.NeonPostgres.Models.NeonResourceProvisioningState?), Azure.ResourceManager.NeonPostgres.Models.PartnerOrganizationProperties partnerOrganizationProperties = null, Azure.ResourceManager.NeonPostgres.Models.ProjectProperties projectProperties = null) { throw null; } + public static Azure.ResourceManager.NeonPostgres.NeonRoleData NeonRoleData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.NeonPostgres.Models.NeonRoleProperties properties = null) { throw null; } + public static Azure.ResourceManager.NeonPostgres.Models.NeonRoleProperties NeonRoleProperties(string entityId = null, string entityName = null, string createdAt = null, Azure.ResourceManager.NeonPostgres.Models.NeonResourceProvisioningState? provisioningState = default(Azure.ResourceManager.NeonPostgres.Models.NeonResourceProvisioningState?), System.Collections.Generic.IEnumerable attributes = null, string branchId = null, System.Collections.Generic.IEnumerable permissions = null, bool? isSuperUser = default(bool?)) { throw null; } + public static Azure.ResourceManager.NeonPostgres.Models.PgVersionsResult PgVersionsResult(System.Collections.Generic.IEnumerable versions = null) { throw null; } + public static Azure.ResourceManager.NeonPostgres.ProjectData ProjectData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.NeonPostgres.Models.ProjectProperties properties = null) { throw null; } + public static Azure.ResourceManager.NeonPostgres.Models.ProjectProperties ProjectProperties(string entityId = null, string entityName = null, string createdAt = null, Azure.ResourceManager.NeonPostgres.Models.NeonResourceProvisioningState? provisioningState = default(Azure.ResourceManager.NeonPostgres.Models.NeonResourceProvisioningState?), System.Collections.Generic.IEnumerable attributes = null, string regionId = null, long? storage = default(long?), int? pgVersion = default(int?), int? historyRetention = default(int?), Azure.ResourceManager.NeonPostgres.Models.DefaultEndpointSettings defaultEndpointSettings = null, Azure.ResourceManager.NeonPostgres.Models.BranchProperties branch = null, System.Collections.Generic.IEnumerable roles = null, System.Collections.Generic.IEnumerable databases = null, System.Collections.Generic.IEnumerable endpoints = null) { throw null; } + } + public partial class Attributes : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public Attributes(string name, string value) { } + public string Name { get { throw null; } set { } } + public string Value { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NeonPostgres.Models.Attributes System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NeonPostgres.Models.Attributes System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class BranchProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public BranchProperties() { } + public System.Collections.Generic.IList Attributes { get { throw null; } } + public string CreatedAt { get { throw null; } } + public string DatabaseName { get { throw null; } set { } } + public System.Collections.Generic.IList Databases { get { throw null; } } + public System.Collections.Generic.IList Endpoints { get { throw null; } } + public string EntityId { get { throw null; } } + public string EntityName { get { throw null; } set { } } + public string ParentId { get { throw null; } set { } } + public string ProjectId { get { throw null; } set { } } + public Azure.ResourceManager.NeonPostgres.Models.NeonResourceProvisioningState? ProvisioningState { get { throw null; } } + public string RoleName { get { throw null; } set { } } + public System.Collections.Generic.IList Roles { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NeonPostgres.Models.BranchProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NeonPostgres.Models.BranchProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ComputeProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ComputeProperties() { } + public System.Collections.Generic.IList Attributes { get { throw null; } } + public int? CpuCores { get { throw null; } set { } } + public string CreatedAt { get { throw null; } } + public string EntityId { get { throw null; } } + public string EntityName { get { throw null; } set { } } + public int? Memory { get { throw null; } set { } } + public Azure.ResourceManager.NeonPostgres.Models.NeonResourceProvisioningState? ProvisioningState { get { throw null; } } + public string Region { get { throw null; } set { } } + public string Status { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NeonPostgres.Models.ComputeProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NeonPostgres.Models.ComputeProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ConnectionUriProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ConnectionUriProperties() { } + public string BranchId { get { throw null; } set { } } + public string ConnectionStringUri { get { throw null; } } + public string DatabaseName { get { throw null; } set { } } + public string EndpointId { get { throw null; } set { } } + public bool? IsPooled { get { throw null; } set { } } + public string ProjectId { get { throw null; } set { } } + public string RoleName { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NeonPostgres.Models.ConnectionUriProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NeonPostgres.Models.ConnectionUriProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DefaultEndpointSettings : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DefaultEndpointSettings(float autoscalingLimitMinCu, float autoscalingLimitMaxCu) { } + public float AutoscalingLimitMaxCu { get { throw null; } set { } } + public float AutoscalingLimitMinCu { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NeonPostgres.Models.DefaultEndpointSettings System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NeonPostgres.Models.DefaultEndpointSettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class EndpointProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public EndpointProperties() { } + public System.Collections.Generic.IList Attributes { get { throw null; } } + public string BranchId { get { throw null; } set { } } + public string CreatedAt { get { throw null; } } + public Azure.ResourceManager.NeonPostgres.Models.EndpointType? EndpointType { get { throw null; } set { } } + public string EntityId { get { throw null; } } + public string EntityName { get { throw null; } set { } } + public string ProjectId { get { throw null; } set { } } + public Azure.ResourceManager.NeonPostgres.Models.NeonResourceProvisioningState? ProvisioningState { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NeonPostgres.Models.EndpointProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NeonPostgres.Models.EndpointProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct EndpointType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public EndpointType(string value) { throw null; } + public static Azure.ResourceManager.NeonPostgres.Models.EndpointType ReadOnly { get { throw null; } } + public static Azure.ResourceManager.NeonPostgres.Models.EndpointType ReadWrite { get { throw null; } } + public bool Equals(Azure.ResourceManager.NeonPostgres.Models.EndpointType other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.NeonPostgres.Models.EndpointType left, Azure.ResourceManager.NeonPostgres.Models.EndpointType right) { throw null; } + public static implicit operator Azure.ResourceManager.NeonPostgres.Models.EndpointType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.NeonPostgres.Models.EndpointType left, Azure.ResourceManager.NeonPostgres.Models.EndpointType right) { throw null; } + public override string ToString() { throw null; } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct MarketplaceSubscriptionStatus : System.IEquatable @@ -127,6 +577,23 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public partial class NeonDatabaseProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public NeonDatabaseProperties() { } + public System.Collections.Generic.IList Attributes { get { throw null; } } + public string BranchId { get { throw null; } set { } } + public string CreatedAt { get { throw null; } } + public string EntityId { get { throw null; } } + public string EntityName { get { throw null; } set { } } + public string OwnerName { get { throw null; } set { } } + public Azure.ResourceManager.NeonPostgres.Models.NeonResourceProvisioningState? ProvisioningState { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NeonPostgres.Models.NeonDatabaseProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NeonPostgres.Models.NeonDatabaseProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class NeonMarketplaceDetails : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public NeonMarketplaceDetails(Azure.ResourceManager.NeonPostgres.Models.NeonOfferDetails offerDetails) { } @@ -162,6 +629,7 @@ public NeonOrganizationProperties(Azure.ResourceManager.NeonPostgres.Models.Neon public Azure.ResourceManager.NeonPostgres.Models.NeonCompanyDetails CompanyDetails { get { throw null; } set { } } public Azure.ResourceManager.NeonPostgres.Models.NeonMarketplaceDetails MarketplaceDetails { get { throw null; } set { } } public Azure.ResourceManager.NeonPostgres.Models.PartnerOrganizationProperties PartnerOrganizationProperties { get { throw null; } set { } } + public Azure.ResourceManager.NeonPostgres.Models.ProjectProperties ProjectProperties { get { throw null; } set { } } public Azure.ResourceManager.NeonPostgres.Models.NeonResourceProvisioningState? ProvisioningState { get { throw null; } } public Azure.ResourceManager.NeonPostgres.Models.NeonUserDetails UserDetails { get { throw null; } set { } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -190,6 +658,24 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public static bool operator !=(Azure.ResourceManager.NeonPostgres.Models.NeonResourceProvisioningState left, Azure.ResourceManager.NeonPostgres.Models.NeonResourceProvisioningState right) { throw null; } public override string ToString() { throw null; } } + public partial class NeonRoleProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public NeonRoleProperties() { } + public System.Collections.Generic.IList Attributes { get { throw null; } } + public string BranchId { get { throw null; } set { } } + public string CreatedAt { get { throw null; } } + public string EntityId { get { throw null; } } + public string EntityName { get { throw null; } set { } } + public bool? IsSuperUser { get { throw null; } set { } } + public System.Collections.Generic.IList Permissions { get { throw null; } } + public Azure.ResourceManager.NeonPostgres.Models.NeonResourceProvisioningState? ProvisioningState { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NeonPostgres.Models.NeonRoleProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NeonPostgres.Models.NeonRoleProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class NeonSingleSignOnProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public NeonSingleSignOnProperties() { } @@ -251,4 +737,50 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public partial class PgVersion : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public PgVersion() { } + public int? Version { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NeonPostgres.Models.PgVersion System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NeonPostgres.Models.PgVersion System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class PgVersionsResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal PgVersionsResult() { } + public System.Collections.Generic.IReadOnlyList Versions { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NeonPostgres.Models.PgVersionsResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NeonPostgres.Models.PgVersionsResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ProjectProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ProjectProperties() { } + public System.Collections.Generic.IList Attributes { get { throw null; } } + public Azure.ResourceManager.NeonPostgres.Models.BranchProperties Branch { get { throw null; } set { } } + public string CreatedAt { get { throw null; } } + public System.Collections.Generic.IList Databases { get { throw null; } } + public Azure.ResourceManager.NeonPostgres.Models.DefaultEndpointSettings DefaultEndpointSettings { get { throw null; } set { } } + public System.Collections.Generic.IList Endpoints { get { throw null; } } + public string EntityId { get { throw null; } } + public string EntityName { get { throw null; } set { } } + public int? HistoryRetention { get { throw null; } set { } } + public int? PgVersion { get { throw null; } set { } } + public Azure.ResourceManager.NeonPostgres.Models.NeonResourceProvisioningState? ProvisioningState { get { throw null; } } + public string RegionId { get { throw null; } set { } } + public System.Collections.Generic.IList Roles { get { throw null; } } + public long? Storage { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NeonPostgres.Models.ProjectProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NeonPostgres.Models.ProjectProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } } diff --git a/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/api/Azure.ResourceManager.NeonPostgres.netstandard2.0.cs b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/api/Azure.ResourceManager.NeonPostgres.netstandard2.0.cs index f6e35086e51c..1243878c8c01 100644 --- a/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/api/Azure.ResourceManager.NeonPostgres.netstandard2.0.cs +++ b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/api/Azure.ResourceManager.NeonPostgres.netstandard2.0.cs @@ -1,5 +1,205 @@ namespace Azure.ResourceManager.NeonPostgres { + public partial class BranchCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected BranchCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string branchName, Azure.ResourceManager.NeonPostgres.BranchData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string branchName, Azure.ResourceManager.NeonPostgres.BranchData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string branchName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string branchName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string branchName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string branchName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string branchName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string branchName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class BranchData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public BranchData() { } + public Azure.ResourceManager.NeonPostgres.Models.BranchProperties Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NeonPostgres.BranchData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NeonPostgres.BranchData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class BranchResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected BranchResource() { } + public virtual Azure.ResourceManager.NeonPostgres.BranchData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string organizationName, string projectName, string branchName) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetCompute(string computeName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetComputeAsync(string computeName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.NeonPostgres.ComputeCollection GetComputes() { throw null; } + public virtual Azure.Response GetEndpoint(string endpointName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetEndpointAsync(string endpointName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.NeonPostgres.EndpointCollection GetEndpoints() { throw null; } + public virtual Azure.Response GetNeonDatabase(string neonDatabaseName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetNeonDatabaseAsync(string neonDatabaseName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.NeonPostgres.NeonDatabaseCollection GetNeonDatabases() { throw null; } + public virtual Azure.Response GetNeonRole(string neonRoleName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetNeonRoleAsync(string neonRoleName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.NeonPostgres.NeonRoleCollection GetNeonRoles() { throw null; } + Azure.ResourceManager.NeonPostgres.BranchData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NeonPostgres.BranchData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.NeonPostgres.BranchData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.NeonPostgres.BranchData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class ComputeCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected ComputeCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string computeName, Azure.ResourceManager.NeonPostgres.ComputeData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string computeName, Azure.ResourceManager.NeonPostgres.ComputeData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string computeName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string computeName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string computeName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string computeName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string computeName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string computeName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class ComputeData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ComputeData() { } + public Azure.ResourceManager.NeonPostgres.Models.ComputeProperties Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NeonPostgres.ComputeData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NeonPostgres.ComputeData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ComputeResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected ComputeResource() { } + public virtual Azure.ResourceManager.NeonPostgres.ComputeData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string organizationName, string projectName, string branchName, string computeName) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + Azure.ResourceManager.NeonPostgres.ComputeData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NeonPostgres.ComputeData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.NeonPostgres.ComputeData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.NeonPostgres.ComputeData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class EndpointCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected EndpointCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string endpointName, Azure.ResourceManager.NeonPostgres.EndpointData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string endpointName, Azure.ResourceManager.NeonPostgres.EndpointData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string endpointName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string endpointName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string endpointName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string endpointName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string endpointName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string endpointName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class EndpointData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public EndpointData() { } + public Azure.ResourceManager.NeonPostgres.Models.EndpointProperties Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NeonPostgres.EndpointData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NeonPostgres.EndpointData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class EndpointResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected EndpointResource() { } + public virtual Azure.ResourceManager.NeonPostgres.EndpointData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string organizationName, string projectName, string branchName, string endpointName) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + Azure.ResourceManager.NeonPostgres.EndpointData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NeonPostgres.EndpointData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.NeonPostgres.EndpointData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.NeonPostgres.EndpointData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class NeonDatabaseCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected NeonDatabaseCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string neonDatabaseName, Azure.ResourceManager.NeonPostgres.NeonDatabaseData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string neonDatabaseName, Azure.ResourceManager.NeonPostgres.NeonDatabaseData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string neonDatabaseName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string neonDatabaseName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string neonDatabaseName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string neonDatabaseName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string neonDatabaseName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string neonDatabaseName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class NeonDatabaseData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public NeonDatabaseData() { } + public Azure.ResourceManager.NeonPostgres.Models.NeonDatabaseProperties Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NeonPostgres.NeonDatabaseData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NeonPostgres.NeonDatabaseData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class NeonDatabaseResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected NeonDatabaseResource() { } + public virtual Azure.ResourceManager.NeonPostgres.NeonDatabaseData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string organizationName, string projectName, string branchName, string neonDatabaseName) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + Azure.ResourceManager.NeonPostgres.NeonDatabaseData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NeonPostgres.NeonDatabaseData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.NeonPostgres.NeonDatabaseData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.NeonPostgres.NeonDatabaseData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } public partial class NeonOrganizationCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable { protected NeonOrganizationCollection() { } @@ -41,6 +241,9 @@ protected NeonOrganizationResource() { } public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetProject(string projectName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetProjectAsync(string projectName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.NeonPostgres.ProjectCollection GetProjects() { throw null; } public virtual Azure.Response RemoveTag(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> RemoveTagAsync(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response SetTags(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -55,12 +258,119 @@ protected NeonOrganizationResource() { } } public static partial class NeonPostgresExtensions { + public static Azure.ResourceManager.NeonPostgres.BranchResource GetBranchResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.NeonPostgres.ComputeResource GetComputeResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.NeonPostgres.EndpointResource GetEndpointResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.NeonPostgres.NeonDatabaseResource GetNeonDatabaseResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.Response GetNeonOrganization(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string organizationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static System.Threading.Tasks.Task> GetNeonOrganizationAsync(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string organizationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.ResourceManager.NeonPostgres.NeonOrganizationResource GetNeonOrganizationResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.NeonPostgres.NeonOrganizationCollection GetNeonOrganizations(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource) { throw null; } public static Azure.Pageable GetNeonOrganizations(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.AsyncPageable GetNeonOrganizationsAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.ResourceManager.NeonPostgres.NeonRoleResource GetNeonRoleResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.Response GetPostgresVersionsOrganization(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, Azure.ResourceManager.NeonPostgres.Models.PgVersion pgVersion = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static System.Threading.Tasks.Task> GetPostgresVersionsOrganizationAsync(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, Azure.ResourceManager.NeonPostgres.Models.PgVersion pgVersion = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.ResourceManager.NeonPostgres.ProjectResource GetProjectResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + } + public partial class NeonRoleCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected NeonRoleCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string neonRoleName, Azure.ResourceManager.NeonPostgres.NeonRoleData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string neonRoleName, Azure.ResourceManager.NeonPostgres.NeonRoleData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string neonRoleName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string neonRoleName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string neonRoleName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string neonRoleName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string neonRoleName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string neonRoleName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class NeonRoleData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public NeonRoleData() { } + public Azure.ResourceManager.NeonPostgres.Models.NeonRoleProperties Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NeonPostgres.NeonRoleData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NeonPostgres.NeonRoleData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class NeonRoleResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected NeonRoleResource() { } + public virtual Azure.ResourceManager.NeonPostgres.NeonRoleData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string organizationName, string projectName, string branchName, string neonRoleName) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + Azure.ResourceManager.NeonPostgres.NeonRoleData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NeonPostgres.NeonRoleData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.NeonPostgres.NeonRoleData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.NeonPostgres.NeonRoleData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class ProjectCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected ProjectCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string projectName, Azure.ResourceManager.NeonPostgres.ProjectData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string projectName, Azure.ResourceManager.NeonPostgres.ProjectData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string projectName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string projectName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string projectName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string projectName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string projectName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string projectName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class ProjectData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ProjectData() { } + public Azure.ResourceManager.NeonPostgres.Models.ProjectProperties Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NeonPostgres.ProjectData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NeonPostgres.ProjectData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ProjectResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected ProjectResource() { } + public virtual Azure.ResourceManager.NeonPostgres.ProjectData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string organizationName, string projectName) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetBranch(string branchName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetBranchAsync(string branchName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.NeonPostgres.BranchCollection GetBranches() { throw null; } + public virtual Azure.Response GetConnectionUri(Azure.ResourceManager.NeonPostgres.Models.ConnectionUriProperties connectionUriParameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetConnectionUriAsync(Azure.ResourceManager.NeonPostgres.Models.ConnectionUriProperties connectionUriParameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + Azure.ResourceManager.NeonPostgres.ProjectData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NeonPostgres.ProjectData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.NeonPostgres.ProjectData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.NeonPostgres.ProjectData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } } namespace Azure.ResourceManager.NeonPostgres.Mocking @@ -68,7 +378,13 @@ namespace Azure.ResourceManager.NeonPostgres.Mocking public partial class MockableNeonPostgresArmClient : Azure.ResourceManager.ArmResource { protected MockableNeonPostgresArmClient() { } + public virtual Azure.ResourceManager.NeonPostgres.BranchResource GetBranchResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.NeonPostgres.ComputeResource GetComputeResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.NeonPostgres.EndpointResource GetEndpointResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.NeonPostgres.NeonDatabaseResource GetNeonDatabaseResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.NeonPostgres.NeonOrganizationResource GetNeonOrganizationResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.NeonPostgres.NeonRoleResource GetNeonRoleResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.NeonPostgres.ProjectResource GetProjectResource(Azure.Core.ResourceIdentifier id) { throw null; } } public partial class MockableNeonPostgresResourceGroupResource : Azure.ResourceManager.ArmResource { @@ -76,6 +392,8 @@ protected MockableNeonPostgresResourceGroupResource() { } public virtual Azure.Response GetNeonOrganization(string organizationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetNeonOrganizationAsync(string organizationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.NeonPostgres.NeonOrganizationCollection GetNeonOrganizations() { throw null; } + public virtual Azure.Response GetPostgresVersionsOrganization(Azure.ResourceManager.NeonPostgres.Models.PgVersion pgVersion = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetPostgresVersionsOrganizationAsync(Azure.ResourceManager.NeonPostgres.Models.PgVersion pgVersion = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } public partial class MockableNeonPostgresSubscriptionResource : Azure.ResourceManager.ArmResource { @@ -88,8 +406,140 @@ namespace Azure.ResourceManager.NeonPostgres.Models { public static partial class ArmNeonPostgresModelFactory { + public static Azure.ResourceManager.NeonPostgres.BranchData BranchData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.NeonPostgres.Models.BranchProperties properties = null) { throw null; } + public static Azure.ResourceManager.NeonPostgres.Models.BranchProperties BranchProperties(string entityId = null, string entityName = null, string createdAt = null, Azure.ResourceManager.NeonPostgres.Models.NeonResourceProvisioningState? provisioningState = default(Azure.ResourceManager.NeonPostgres.Models.NeonResourceProvisioningState?), System.Collections.Generic.IEnumerable attributes = null, string projectId = null, string parentId = null, string roleName = null, string databaseName = null, System.Collections.Generic.IEnumerable roles = null, System.Collections.Generic.IEnumerable databases = null, System.Collections.Generic.IEnumerable endpoints = null) { throw null; } + public static Azure.ResourceManager.NeonPostgres.ComputeData ComputeData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.NeonPostgres.Models.ComputeProperties properties = null) { throw null; } + public static Azure.ResourceManager.NeonPostgres.Models.ComputeProperties ComputeProperties(string entityId = null, string entityName = null, string createdAt = null, Azure.ResourceManager.NeonPostgres.Models.NeonResourceProvisioningState? provisioningState = default(Azure.ResourceManager.NeonPostgres.Models.NeonResourceProvisioningState?), System.Collections.Generic.IEnumerable attributes = null, string region = null, int? cpuCores = default(int?), int? memory = default(int?), string status = null) { throw null; } + public static Azure.ResourceManager.NeonPostgres.Models.ConnectionUriProperties ConnectionUriProperties(string projectId = null, string branchId = null, string databaseName = null, string roleName = null, string endpointId = null, bool? isPooled = default(bool?), string connectionStringUri = null) { throw null; } + public static Azure.ResourceManager.NeonPostgres.EndpointData EndpointData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.NeonPostgres.Models.EndpointProperties properties = null) { throw null; } + public static Azure.ResourceManager.NeonPostgres.Models.EndpointProperties EndpointProperties(string entityId = null, string entityName = null, string createdAt = null, Azure.ResourceManager.NeonPostgres.Models.NeonResourceProvisioningState? provisioningState = default(Azure.ResourceManager.NeonPostgres.Models.NeonResourceProvisioningState?), System.Collections.Generic.IEnumerable attributes = null, string projectId = null, string branchId = null, Azure.ResourceManager.NeonPostgres.Models.EndpointType? endpointType = default(Azure.ResourceManager.NeonPostgres.Models.EndpointType?)) { throw null; } + public static Azure.ResourceManager.NeonPostgres.NeonDatabaseData NeonDatabaseData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.NeonPostgres.Models.NeonDatabaseProperties properties = null) { throw null; } + public static Azure.ResourceManager.NeonPostgres.Models.NeonDatabaseProperties NeonDatabaseProperties(string entityId = null, string entityName = null, string createdAt = null, Azure.ResourceManager.NeonPostgres.Models.NeonResourceProvisioningState? provisioningState = default(Azure.ResourceManager.NeonPostgres.Models.NeonResourceProvisioningState?), System.Collections.Generic.IEnumerable attributes = null, string branchId = null, string ownerName = null) { throw null; } public static Azure.ResourceManager.NeonPostgres.NeonOrganizationData NeonOrganizationData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.NeonPostgres.Models.NeonOrganizationProperties properties = null) { throw null; } - public static Azure.ResourceManager.NeonPostgres.Models.NeonOrganizationProperties NeonOrganizationProperties(Azure.ResourceManager.NeonPostgres.Models.NeonMarketplaceDetails marketplaceDetails = null, Azure.ResourceManager.NeonPostgres.Models.NeonUserDetails userDetails = null, Azure.ResourceManager.NeonPostgres.Models.NeonCompanyDetails companyDetails = null, Azure.ResourceManager.NeonPostgres.Models.NeonResourceProvisioningState? provisioningState = default(Azure.ResourceManager.NeonPostgres.Models.NeonResourceProvisioningState?), Azure.ResourceManager.NeonPostgres.Models.PartnerOrganizationProperties partnerOrganizationProperties = null) { throw null; } + public static Azure.ResourceManager.NeonPostgres.Models.NeonOrganizationProperties NeonOrganizationProperties(Azure.ResourceManager.NeonPostgres.Models.NeonMarketplaceDetails marketplaceDetails = null, Azure.ResourceManager.NeonPostgres.Models.NeonUserDetails userDetails = null, Azure.ResourceManager.NeonPostgres.Models.NeonCompanyDetails companyDetails = null, Azure.ResourceManager.NeonPostgres.Models.NeonResourceProvisioningState? provisioningState = default(Azure.ResourceManager.NeonPostgres.Models.NeonResourceProvisioningState?), Azure.ResourceManager.NeonPostgres.Models.PartnerOrganizationProperties partnerOrganizationProperties = null, Azure.ResourceManager.NeonPostgres.Models.ProjectProperties projectProperties = null) { throw null; } + public static Azure.ResourceManager.NeonPostgres.NeonRoleData NeonRoleData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.NeonPostgres.Models.NeonRoleProperties properties = null) { throw null; } + public static Azure.ResourceManager.NeonPostgres.Models.NeonRoleProperties NeonRoleProperties(string entityId = null, string entityName = null, string createdAt = null, Azure.ResourceManager.NeonPostgres.Models.NeonResourceProvisioningState? provisioningState = default(Azure.ResourceManager.NeonPostgres.Models.NeonResourceProvisioningState?), System.Collections.Generic.IEnumerable attributes = null, string branchId = null, System.Collections.Generic.IEnumerable permissions = null, bool? isSuperUser = default(bool?)) { throw null; } + public static Azure.ResourceManager.NeonPostgres.Models.PgVersionsResult PgVersionsResult(System.Collections.Generic.IEnumerable versions = null) { throw null; } + public static Azure.ResourceManager.NeonPostgres.ProjectData ProjectData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.NeonPostgres.Models.ProjectProperties properties = null) { throw null; } + public static Azure.ResourceManager.NeonPostgres.Models.ProjectProperties ProjectProperties(string entityId = null, string entityName = null, string createdAt = null, Azure.ResourceManager.NeonPostgres.Models.NeonResourceProvisioningState? provisioningState = default(Azure.ResourceManager.NeonPostgres.Models.NeonResourceProvisioningState?), System.Collections.Generic.IEnumerable attributes = null, string regionId = null, long? storage = default(long?), int? pgVersion = default(int?), int? historyRetention = default(int?), Azure.ResourceManager.NeonPostgres.Models.DefaultEndpointSettings defaultEndpointSettings = null, Azure.ResourceManager.NeonPostgres.Models.BranchProperties branch = null, System.Collections.Generic.IEnumerable roles = null, System.Collections.Generic.IEnumerable databases = null, System.Collections.Generic.IEnumerable endpoints = null) { throw null; } + } + public partial class Attributes : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public Attributes(string name, string value) { } + public string Name { get { throw null; } set { } } + public string Value { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NeonPostgres.Models.Attributes System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NeonPostgres.Models.Attributes System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class BranchProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public BranchProperties() { } + public System.Collections.Generic.IList Attributes { get { throw null; } } + public string CreatedAt { get { throw null; } } + public string DatabaseName { get { throw null; } set { } } + public System.Collections.Generic.IList Databases { get { throw null; } } + public System.Collections.Generic.IList Endpoints { get { throw null; } } + public string EntityId { get { throw null; } } + public string EntityName { get { throw null; } set { } } + public string ParentId { get { throw null; } set { } } + public string ProjectId { get { throw null; } set { } } + public Azure.ResourceManager.NeonPostgres.Models.NeonResourceProvisioningState? ProvisioningState { get { throw null; } } + public string RoleName { get { throw null; } set { } } + public System.Collections.Generic.IList Roles { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NeonPostgres.Models.BranchProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NeonPostgres.Models.BranchProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ComputeProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ComputeProperties() { } + public System.Collections.Generic.IList Attributes { get { throw null; } } + public int? CpuCores { get { throw null; } set { } } + public string CreatedAt { get { throw null; } } + public string EntityId { get { throw null; } } + public string EntityName { get { throw null; } set { } } + public int? Memory { get { throw null; } set { } } + public Azure.ResourceManager.NeonPostgres.Models.NeonResourceProvisioningState? ProvisioningState { get { throw null; } } + public string Region { get { throw null; } set { } } + public string Status { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NeonPostgres.Models.ComputeProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NeonPostgres.Models.ComputeProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ConnectionUriProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ConnectionUriProperties() { } + public string BranchId { get { throw null; } set { } } + public string ConnectionStringUri { get { throw null; } } + public string DatabaseName { get { throw null; } set { } } + public string EndpointId { get { throw null; } set { } } + public bool? IsPooled { get { throw null; } set { } } + public string ProjectId { get { throw null; } set { } } + public string RoleName { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NeonPostgres.Models.ConnectionUriProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NeonPostgres.Models.ConnectionUriProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DefaultEndpointSettings : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DefaultEndpointSettings(float autoscalingLimitMinCu, float autoscalingLimitMaxCu) { } + public float AutoscalingLimitMaxCu { get { throw null; } set { } } + public float AutoscalingLimitMinCu { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NeonPostgres.Models.DefaultEndpointSettings System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NeonPostgres.Models.DefaultEndpointSettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class EndpointProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public EndpointProperties() { } + public System.Collections.Generic.IList Attributes { get { throw null; } } + public string BranchId { get { throw null; } set { } } + public string CreatedAt { get { throw null; } } + public Azure.ResourceManager.NeonPostgres.Models.EndpointType? EndpointType { get { throw null; } set { } } + public string EntityId { get { throw null; } } + public string EntityName { get { throw null; } set { } } + public string ProjectId { get { throw null; } set { } } + public Azure.ResourceManager.NeonPostgres.Models.NeonResourceProvisioningState? ProvisioningState { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NeonPostgres.Models.EndpointProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NeonPostgres.Models.EndpointProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct EndpointType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public EndpointType(string value) { throw null; } + public static Azure.ResourceManager.NeonPostgres.Models.EndpointType ReadOnly { get { throw null; } } + public static Azure.ResourceManager.NeonPostgres.Models.EndpointType ReadWrite { get { throw null; } } + public bool Equals(Azure.ResourceManager.NeonPostgres.Models.EndpointType other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.NeonPostgres.Models.EndpointType left, Azure.ResourceManager.NeonPostgres.Models.EndpointType right) { throw null; } + public static implicit operator Azure.ResourceManager.NeonPostgres.Models.EndpointType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.NeonPostgres.Models.EndpointType left, Azure.ResourceManager.NeonPostgres.Models.EndpointType right) { throw null; } + public override string ToString() { throw null; } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct MarketplaceSubscriptionStatus : System.IEquatable @@ -127,6 +577,23 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public partial class NeonDatabaseProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public NeonDatabaseProperties() { } + public System.Collections.Generic.IList Attributes { get { throw null; } } + public string BranchId { get { throw null; } set { } } + public string CreatedAt { get { throw null; } } + public string EntityId { get { throw null; } } + public string EntityName { get { throw null; } set { } } + public string OwnerName { get { throw null; } set { } } + public Azure.ResourceManager.NeonPostgres.Models.NeonResourceProvisioningState? ProvisioningState { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NeonPostgres.Models.NeonDatabaseProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NeonPostgres.Models.NeonDatabaseProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class NeonMarketplaceDetails : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public NeonMarketplaceDetails(Azure.ResourceManager.NeonPostgres.Models.NeonOfferDetails offerDetails) { } @@ -162,6 +629,7 @@ public NeonOrganizationProperties(Azure.ResourceManager.NeonPostgres.Models.Neon public Azure.ResourceManager.NeonPostgres.Models.NeonCompanyDetails CompanyDetails { get { throw null; } set { } } public Azure.ResourceManager.NeonPostgres.Models.NeonMarketplaceDetails MarketplaceDetails { get { throw null; } set { } } public Azure.ResourceManager.NeonPostgres.Models.PartnerOrganizationProperties PartnerOrganizationProperties { get { throw null; } set { } } + public Azure.ResourceManager.NeonPostgres.Models.ProjectProperties ProjectProperties { get { throw null; } set { } } public Azure.ResourceManager.NeonPostgres.Models.NeonResourceProvisioningState? ProvisioningState { get { throw null; } } public Azure.ResourceManager.NeonPostgres.Models.NeonUserDetails UserDetails { get { throw null; } set { } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -190,6 +658,24 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public static bool operator !=(Azure.ResourceManager.NeonPostgres.Models.NeonResourceProvisioningState left, Azure.ResourceManager.NeonPostgres.Models.NeonResourceProvisioningState right) { throw null; } public override string ToString() { throw null; } } + public partial class NeonRoleProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public NeonRoleProperties() { } + public System.Collections.Generic.IList Attributes { get { throw null; } } + public string BranchId { get { throw null; } set { } } + public string CreatedAt { get { throw null; } } + public string EntityId { get { throw null; } } + public string EntityName { get { throw null; } set { } } + public bool? IsSuperUser { get { throw null; } set { } } + public System.Collections.Generic.IList Permissions { get { throw null; } } + public Azure.ResourceManager.NeonPostgres.Models.NeonResourceProvisioningState? ProvisioningState { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NeonPostgres.Models.NeonRoleProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NeonPostgres.Models.NeonRoleProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class NeonSingleSignOnProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public NeonSingleSignOnProperties() { } @@ -251,4 +737,50 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public partial class PgVersion : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public PgVersion() { } + public int? Version { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NeonPostgres.Models.PgVersion System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NeonPostgres.Models.PgVersion System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class PgVersionsResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal PgVersionsResult() { } + public System.Collections.Generic.IReadOnlyList Versions { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NeonPostgres.Models.PgVersionsResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NeonPostgres.Models.PgVersionsResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ProjectProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ProjectProperties() { } + public System.Collections.Generic.IList Attributes { get { throw null; } } + public Azure.ResourceManager.NeonPostgres.Models.BranchProperties Branch { get { throw null; } set { } } + public string CreatedAt { get { throw null; } } + public System.Collections.Generic.IList Databases { get { throw null; } } + public Azure.ResourceManager.NeonPostgres.Models.DefaultEndpointSettings DefaultEndpointSettings { get { throw null; } set { } } + public System.Collections.Generic.IList Endpoints { get { throw null; } } + public string EntityId { get { throw null; } } + public string EntityName { get { throw null; } set { } } + public int? HistoryRetention { get { throw null; } set { } } + public int? PgVersion { get { throw null; } set { } } + public Azure.ResourceManager.NeonPostgres.Models.NeonResourceProvisioningState? ProvisioningState { get { throw null; } } + public string RegionId { get { throw null; } set { } } + public System.Collections.Generic.IList Roles { get { throw null; } } + public long? Storage { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NeonPostgres.Models.ProjectProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NeonPostgres.Models.ProjectProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } } diff --git a/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/ArmNeonPostgresModelFactory.cs b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/ArmNeonPostgresModelFactory.cs index 3c3215cb7d69..eff34655bf2c 100644 --- a/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/ArmNeonPostgresModelFactory.cs +++ b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/ArmNeonPostgresModelFactory.cs @@ -45,9 +45,10 @@ public static NeonOrganizationData NeonOrganizationData(ResourceIdentifier id = /// Details of the user. /// Details of the company. /// Provisioning state of the resource. - /// Organization properties. + /// Neon Organization properties. + /// Neon Project Properties. /// A new instance for mocking. - public static NeonOrganizationProperties NeonOrganizationProperties(NeonMarketplaceDetails marketplaceDetails = null, NeonUserDetails userDetails = null, NeonCompanyDetails companyDetails = null, NeonResourceProvisioningState? provisioningState = null, PartnerOrganizationProperties partnerOrganizationProperties = null) + public static NeonOrganizationProperties NeonOrganizationProperties(NeonMarketplaceDetails marketplaceDetails = null, NeonUserDetails userDetails = null, NeonCompanyDetails companyDetails = null, NeonResourceProvisioningState? provisioningState = null, PartnerOrganizationProperties partnerOrganizationProperties = null, ProjectProperties projectProperties = null) { return new NeonOrganizationProperties( marketplaceDetails, @@ -55,6 +56,330 @@ public static NeonOrganizationProperties NeonOrganizationProperties(NeonMarketpl companyDetails, provisioningState, partnerOrganizationProperties, + projectProperties, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Unique identifier for the entity. + /// Name of the resource. + /// Timestamp indicating when the entity was created. + /// Provisioning state of the resource. + /// Additional attributes for the entity. + /// Region where the project is created. + /// Data Storage bytes per hour for the project. + /// Postgres version for the project. + /// The retention period for project history in seconds. + /// Default endpoint settings for the project. + /// The Branch properties of the project. This is optional. + /// Roles associated with the project. + /// Neon Databases associated with the project. + /// Endpoints associated with the project. + /// A new instance for mocking. + public static ProjectProperties ProjectProperties(string entityId = null, string entityName = null, string createdAt = null, NeonResourceProvisioningState? provisioningState = null, IEnumerable attributes = null, string regionId = null, long? storage = null, int? pgVersion = null, int? historyRetention = null, DefaultEndpointSettings defaultEndpointSettings = null, BranchProperties branch = null, IEnumerable roles = null, IEnumerable databases = null, IEnumerable endpoints = null) + { + attributes ??= new List(); + roles ??= new List(); + databases ??= new List(); + endpoints ??= new List(); + + return new ProjectProperties( + entityId, + entityName, + createdAt, + provisioningState, + attributes?.ToList(), + regionId, + storage, + pgVersion, + historyRetention, + defaultEndpointSettings, + branch, + roles?.ToList(), + databases?.ToList(), + endpoints?.ToList(), + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Unique identifier for the entity. + /// Name of the resource. + /// Timestamp indicating when the entity was created. + /// Provisioning state of the resource. + /// Additional attributes for the entity. + /// The ID of the project this branch belongs to. + /// The ID of the parent branch. + /// Role name associated with the branch. + /// Database name associated with the branch. + /// Roles associated with the branch. + /// Neon Databases associated with the branch. + /// Endpoints associated with the branch. + /// A new instance for mocking. + public static BranchProperties BranchProperties(string entityId = null, string entityName = null, string createdAt = null, NeonResourceProvisioningState? provisioningState = null, IEnumerable attributes = null, string projectId = null, string parentId = null, string roleName = null, string databaseName = null, IEnumerable roles = null, IEnumerable databases = null, IEnumerable endpoints = null) + { + attributes ??= new List(); + roles ??= new List(); + databases ??= new List(); + endpoints ??= new List(); + + return new BranchProperties( + entityId, + entityName, + createdAt, + provisioningState, + attributes?.ToList(), + projectId, + parentId, + roleName, + databaseName, + roles?.ToList(), + databases?.ToList(), + endpoints?.ToList(), + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Unique identifier for the entity. + /// Name of the resource. + /// Timestamp indicating when the entity was created. + /// Provisioning state of the resource. + /// Additional attributes for the entity. + /// The ID of the branch this role belongs to. + /// Permissions assigned to the role. + /// Indicates whether the role has superuser privileges. + /// A new instance for mocking. + public static NeonRoleProperties NeonRoleProperties(string entityId = null, string entityName = null, string createdAt = null, NeonResourceProvisioningState? provisioningState = null, IEnumerable attributes = null, string branchId = null, IEnumerable permissions = null, bool? isSuperUser = null) + { + attributes ??= new List(); + permissions ??= new List(); + + return new NeonRoleProperties( + entityId, + entityName, + createdAt, + provisioningState, + attributes?.ToList(), + branchId, + permissions?.ToList(), + isSuperUser, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Unique identifier for the entity. + /// Name of the resource. + /// Timestamp indicating when the entity was created. + /// Provisioning state of the resource. + /// Additional attributes for the entity. + /// The ID of the branch this database belongs to. + /// The name of the role that owns the database. + /// A new instance for mocking. + public static NeonDatabaseProperties NeonDatabaseProperties(string entityId = null, string entityName = null, string createdAt = null, NeonResourceProvisioningState? provisioningState = null, IEnumerable attributes = null, string branchId = null, string ownerName = null) + { + attributes ??= new List(); + + return new NeonDatabaseProperties( + entityId, + entityName, + createdAt, + provisioningState, + attributes?.ToList(), + branchId, + ownerName, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Unique identifier for the entity. + /// Name of the resource. + /// Timestamp indicating when the entity was created. + /// Provisioning state of the resource. + /// Additional attributes for the entity. + /// The ID of the project this endpoint belongs to. + /// The ID of the branch this endpoint belongs to. + /// The type of the endpoint. + /// A new instance for mocking. + public static EndpointProperties EndpointProperties(string entityId = null, string entityName = null, string createdAt = null, NeonResourceProvisioningState? provisioningState = null, IEnumerable attributes = null, string projectId = null, string branchId = null, EndpointType? endpointType = null) + { + attributes ??= new List(); + + return new EndpointProperties( + entityId, + entityName, + createdAt, + provisioningState, + attributes?.ToList(), + projectId, + branchId, + endpointType, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// List of PostgreSQL versions. + /// A new instance for mocking. + public static PgVersionsResult PgVersionsResult(IEnumerable versions = null) + { + versions ??= new List(); + + return new PgVersionsResult(versions?.ToList(), serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The resource-specific properties for this resource. + /// A new instance for mocking. + public static ProjectData ProjectData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, ProjectProperties properties = null) + { + return new ProjectData( + id, + name, + resourceType, + systemData, + properties, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Project Id associated with this connection. + /// Branch Id associated with this connection. + /// Database name associated with this connection. + /// The role name used for authentication. + /// the endpoint Id with this connection. + /// Indicates if the connection is pooled. + /// connection uri returned for the database. + /// A new instance for mocking. + public static ConnectionUriProperties ConnectionUriProperties(string projectId = null, string branchId = null, string databaseName = null, string roleName = null, string endpointId = null, bool? isPooled = null, string connectionStringUri = null) + { + return new ConnectionUriProperties( + projectId, + branchId, + databaseName, + roleName, + endpointId, + isPooled, + connectionStringUri, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The resource-specific properties for this resource. + /// A new instance for mocking. + public static BranchData BranchData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, BranchProperties properties = null) + { + return new BranchData( + id, + name, + resourceType, + systemData, + properties, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The resource-specific properties for this resource. + /// A new instance for mocking. + public static ComputeData ComputeData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, ComputeProperties properties = null) + { + return new ComputeData( + id, + name, + resourceType, + systemData, + properties, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Unique identifier for the entity. + /// Name of the resource. + /// Timestamp indicating when the entity was created. + /// Provisioning state of the resource. + /// Additional attributes for the entity. + /// Region where the compute instance is located. + /// Number of allocated CPU cores. + /// Memory allocated in GB. + /// Current status of the compute instance. + /// A new instance for mocking. + public static ComputeProperties ComputeProperties(string entityId = null, string entityName = null, string createdAt = null, NeonResourceProvisioningState? provisioningState = null, IEnumerable attributes = null, string region = null, int? cpuCores = null, int? memory = null, string status = null) + { + attributes ??= new List(); + + return new ComputeProperties( + entityId, + entityName, + createdAt, + provisioningState, + attributes?.ToList(), + region, + cpuCores, + memory, + status, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The resource-specific properties for this resource. + /// A new instance for mocking. + public static NeonDatabaseData NeonDatabaseData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, NeonDatabaseProperties properties = null) + { + return new NeonDatabaseData( + id, + name, + resourceType, + systemData, + properties, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The resource-specific properties for this resource. + /// A new instance for mocking. + public static NeonRoleData NeonRoleData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, NeonRoleProperties properties = null) + { + return new NeonRoleData( + id, + name, + resourceType, + systemData, + properties, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The resource-specific properties for this resource. + /// A new instance for mocking. + public static EndpointData EndpointData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, EndpointProperties properties = null) + { + return new EndpointData( + id, + name, + resourceType, + systemData, + properties, serializedAdditionalRawData: null); } } diff --git a/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/BranchCollection.cs b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/BranchCollection.cs new file mode 100644 index 000000000000..c71300f0428f --- /dev/null +++ b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/BranchCollection.cs @@ -0,0 +1,493 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Autorest.CSharp.Core; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.NeonPostgres +{ + /// + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get a instance call the GetBranches method from an instance of . + /// + public partial class BranchCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _branchClientDiagnostics; + private readonly BranchesRestOperations _branchRestClient; + + /// Initializes a new instance of the class for mocking. + protected BranchCollection() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the parent resource that is the target of operations. + internal BranchCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _branchClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.NeonPostgres", BranchResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(BranchResource.ResourceType, out string branchApiVersion); + _branchRestClient = new BranchesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, branchApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ProjectResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ProjectResource.ResourceType), nameof(id)); + } + + /// + /// Create a Branch + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName}/branches/{branchName} + /// + /// + /// Operation Id + /// Branch_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The name of the Branch. + /// Resource create parameters. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string branchName, BranchData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(branchName, nameof(branchName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _branchClientDiagnostics.CreateScope("BranchCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _branchRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, branchName, data, cancellationToken).ConfigureAwait(false); + var operation = new NeonPostgresArmOperation(new BranchOperationSource(Client), _branchClientDiagnostics, Pipeline, _branchRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, branchName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Create a Branch + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName}/branches/{branchName} + /// + /// + /// Operation Id + /// Branch_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The name of the Branch. + /// Resource create parameters. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string branchName, BranchData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(branchName, nameof(branchName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _branchClientDiagnostics.CreateScope("BranchCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _branchRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, branchName, data, cancellationToken); + var operation = new NeonPostgresArmOperation(new BranchOperationSource(Client), _branchClientDiagnostics, Pipeline, _branchRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, branchName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a Branch + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName}/branches/{branchName} + /// + /// + /// Operation Id + /// Branch_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Branch. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string branchName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(branchName, nameof(branchName)); + + using var scope = _branchClientDiagnostics.CreateScope("BranchCollection.Get"); + scope.Start(); + try + { + var response = await _branchRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, branchName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new BranchResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a Branch + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName}/branches/{branchName} + /// + /// + /// Operation Id + /// Branch_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Branch. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string branchName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(branchName, nameof(branchName)); + + using var scope = _branchClientDiagnostics.CreateScope("BranchCollection.Get"); + scope.Start(); + try + { + var response = _branchRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, branchName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new BranchResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// List Branch resources by Project + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName}/branches + /// + /// + /// Operation Id + /// Branch_List + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _branchRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _branchRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new BranchResource(Client, BranchData.DeserializeBranchData(e)), _branchClientDiagnostics, Pipeline, "BranchCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// List Branch resources by Project + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName}/branches + /// + /// + /// Operation Id + /// Branch_List + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _branchRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _branchRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new BranchResource(Client, BranchData.DeserializeBranchData(e)), _branchClientDiagnostics, Pipeline, "BranchCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName}/branches/{branchName} + /// + /// + /// Operation Id + /// Branch_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Branch. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string branchName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(branchName, nameof(branchName)); + + using var scope = _branchClientDiagnostics.CreateScope("BranchCollection.Exists"); + scope.Start(); + try + { + var response = await _branchRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, branchName, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName}/branches/{branchName} + /// + /// + /// Operation Id + /// Branch_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Branch. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string branchName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(branchName, nameof(branchName)); + + using var scope = _branchClientDiagnostics.CreateScope("BranchCollection.Exists"); + scope.Start(); + try + { + var response = _branchRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, branchName, cancellationToken: cancellationToken); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName}/branches/{branchName} + /// + /// + /// Operation Id + /// Branch_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Branch. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetIfExistsAsync(string branchName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(branchName, nameof(branchName)); + + using var scope = _branchClientDiagnostics.CreateScope("BranchCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _branchRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, branchName, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new BranchResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName}/branches/{branchName} + /// + /// + /// Operation Id + /// Branch_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Branch. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string branchName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(branchName, nameof(branchName)); + + using var scope = _branchClientDiagnostics.CreateScope("BranchCollection.GetIfExists"); + scope.Start(); + try + { + var response = _branchRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, branchName, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new BranchResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) + { + return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); + } + } +} diff --git a/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/BranchData.Serialization.cs b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/BranchData.Serialization.cs new file mode 100644 index 000000000000..69d2168ac85c --- /dev/null +++ b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/BranchData.Serialization.cs @@ -0,0 +1,155 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.Models; +using Azure.ResourceManager.NeonPostgres.Models; + +namespace Azure.ResourceManager.NeonPostgres +{ + public partial class BranchData : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(BranchData)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties, options); + } + } + + BranchData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(BranchData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeBranchData(document.RootElement, options); + } + + internal static BranchData DeserializeBranchData(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + BranchProperties properties = default; + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + SystemData systemData = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + properties = BranchProperties.DeserializeBranchProperties(property.Value, options); + continue; + } + if (property.NameEquals("id"u8)) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new BranchData( + id, + name, + type, + systemData, + properties, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(BranchData)} does not support writing '{options.Format}' format."); + } + } + + BranchData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeBranchData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(BranchData)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/BranchData.cs b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/BranchData.cs new file mode 100644 index 000000000000..4c2fc0bffd98 --- /dev/null +++ b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/BranchData.cs @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.Models; +using Azure.ResourceManager.NeonPostgres.Models; + +namespace Azure.ResourceManager.NeonPostgres +{ + /// + /// A class representing the Branch data model. + /// The Branch resource type. + /// + public partial class BranchData : ResourceData + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public BranchData() + { + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The resource-specific properties for this resource. + /// Keeps track of any properties unknown to the library. + internal BranchData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, BranchProperties properties, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + { + Properties = properties; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The resource-specific properties for this resource. + public BranchProperties Properties { get; set; } + } +} diff --git a/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/BranchResource.Serialization.cs b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/BranchResource.Serialization.cs new file mode 100644 index 000000000000..8745b3ad778d --- /dev/null +++ b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/BranchResource.Serialization.cs @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text.Json; + +namespace Azure.ResourceManager.NeonPostgres +{ + public partial class BranchResource : IJsonModel + { + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + BranchData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options); + + BranchData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + } +} diff --git a/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/BranchResource.cs b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/BranchResource.cs new file mode 100644 index 000000000000..f9896f3d0323 --- /dev/null +++ b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/BranchResource.cs @@ -0,0 +1,628 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.NeonPostgres +{ + /// + /// A Class representing a Branch along with the instance operations that can be performed on it. + /// If you have a you can construct a + /// from an instance of using the GetBranchResource method. + /// Otherwise you can get one from its parent resource using the GetBranch method. + /// + public partial class BranchResource : ArmResource + { + /// Generate the resource identifier of a instance. + /// The subscriptionId. + /// The resourceGroupName. + /// The organizationName. + /// The projectName. + /// The branchName. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string organizationName, string projectName, string branchName) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName}/branches/{branchName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _branchClientDiagnostics; + private readonly BranchesRestOperations _branchRestClient; + private readonly BranchData _data; + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Neon.Postgres/organizations/projects/branches"; + + /// Initializes a new instance of the class for mocking. + protected BranchResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal BranchResource(ArmClient client, BranchData data) : this(client, data.Id) + { + HasData = true; + _data = data; + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the resource that is the target of operations. + internal BranchResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _branchClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.NeonPostgres", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string branchApiVersion); + _branchRestClient = new BranchesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, branchApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets whether or not the current instance has data. + public virtual bool HasData { get; } + + /// Gets the data representing this Feature. + /// Throws if there is no data loaded in the current instance. + public virtual BranchData Data + { + get + { + if (!HasData) + throw new InvalidOperationException("The current instance does not have data, you must call Get first."); + return _data; + } + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); + } + + /// Gets a collection of ComputeResources in the Branch. + /// An object representing collection of ComputeResources and their operations over a ComputeResource. + public virtual ComputeCollection GetComputes() + { + return GetCachedClient(client => new ComputeCollection(client, Id)); + } + + /// + /// Get a Compute + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName}/branches/{branchName}/computes/{computeName} + /// + /// + /// Operation Id + /// Compute_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Compute. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetComputeAsync(string computeName, CancellationToken cancellationToken = default) + { + return await GetComputes().GetAsync(computeName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get a Compute + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName}/branches/{branchName}/computes/{computeName} + /// + /// + /// Operation Id + /// Compute_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Compute. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetCompute(string computeName, CancellationToken cancellationToken = default) + { + return GetComputes().Get(computeName, cancellationToken); + } + + /// Gets a collection of NeonDatabaseResources in the Branch. + /// An object representing collection of NeonDatabaseResources and their operations over a NeonDatabaseResource. + public virtual NeonDatabaseCollection GetNeonDatabases() + { + return GetCachedClient(client => new NeonDatabaseCollection(client, Id)); + } + + /// + /// Get a NeonDatabase + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName}/branches/{branchName}/neonDatabases/{neonDatabaseName} + /// + /// + /// Operation Id + /// NeonDatabase_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the NeonDatabase. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetNeonDatabaseAsync(string neonDatabaseName, CancellationToken cancellationToken = default) + { + return await GetNeonDatabases().GetAsync(neonDatabaseName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get a NeonDatabase + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName}/branches/{branchName}/neonDatabases/{neonDatabaseName} + /// + /// + /// Operation Id + /// NeonDatabase_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the NeonDatabase. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetNeonDatabase(string neonDatabaseName, CancellationToken cancellationToken = default) + { + return GetNeonDatabases().Get(neonDatabaseName, cancellationToken); + } + + /// Gets a collection of NeonRoleResources in the Branch. + /// An object representing collection of NeonRoleResources and their operations over a NeonRoleResource. + public virtual NeonRoleCollection GetNeonRoles() + { + return GetCachedClient(client => new NeonRoleCollection(client, Id)); + } + + /// + /// Get a NeonRole + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName}/branches/{branchName}/neonRoles/{neonRoleName} + /// + /// + /// Operation Id + /// NeonRole_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the NeonRole. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetNeonRoleAsync(string neonRoleName, CancellationToken cancellationToken = default) + { + return await GetNeonRoles().GetAsync(neonRoleName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get a NeonRole + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName}/branches/{branchName}/neonRoles/{neonRoleName} + /// + /// + /// Operation Id + /// NeonRole_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the NeonRole. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetNeonRole(string neonRoleName, CancellationToken cancellationToken = default) + { + return GetNeonRoles().Get(neonRoleName, cancellationToken); + } + + /// Gets a collection of EndpointResources in the Branch. + /// An object representing collection of EndpointResources and their operations over a EndpointResource. + public virtual EndpointCollection GetEndpoints() + { + return GetCachedClient(client => new EndpointCollection(client, Id)); + } + + /// + /// Get a Endpoint + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName}/branches/{branchName}/endpoints/{endpointName} + /// + /// + /// Operation Id + /// Endpoint_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Endpoint. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetEndpointAsync(string endpointName, CancellationToken cancellationToken = default) + { + return await GetEndpoints().GetAsync(endpointName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get a Endpoint + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName}/branches/{branchName}/endpoints/{endpointName} + /// + /// + /// Operation Id + /// Endpoint_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Endpoint. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetEndpoint(string endpointName, CancellationToken cancellationToken = default) + { + return GetEndpoints().Get(endpointName, cancellationToken); + } + + /// + /// Get a Branch + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName}/branches/{branchName} + /// + /// + /// Operation Id + /// Branch_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _branchClientDiagnostics.CreateScope("BranchResource.Get"); + scope.Start(); + try + { + var response = await _branchRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new BranchResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a Branch + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName}/branches/{branchName} + /// + /// + /// Operation Id + /// Branch_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _branchClientDiagnostics.CreateScope("BranchResource.Get"); + scope.Start(); + try + { + var response = _branchRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new BranchResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete a Branch + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName}/branches/{branchName} + /// + /// + /// Operation Id + /// Branch_Delete + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _branchClientDiagnostics.CreateScope("BranchResource.Delete"); + scope.Start(); + try + { + var response = await _branchRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var uri = _branchRestClient.CreateDeleteRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Delete, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new NeonPostgresArmOperation(response, rehydrationToken); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete a Branch + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName}/branches/{branchName} + /// + /// + /// Operation Id + /// Branch_Delete + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _branchClientDiagnostics.CreateScope("BranchResource.Delete"); + scope.Start(); + try + { + var response = _branchRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); + var uri = _branchRestClient.CreateDeleteRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Delete, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new NeonPostgresArmOperation(response, rehydrationToken); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Update a Branch + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName}/branches/{branchName} + /// + /// + /// Operation Id + /// Branch_Update + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The resource properties to be updated. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(WaitUntil waitUntil, BranchData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _branchClientDiagnostics.CreateScope("BranchResource.Update"); + scope.Start(); + try + { + var response = await _branchRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data, cancellationToken).ConfigureAwait(false); + var operation = new NeonPostgresArmOperation(new BranchOperationSource(Client), _branchClientDiagnostics, Pipeline, _branchRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Update a Branch + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName}/branches/{branchName} + /// + /// + /// Operation Id + /// Branch_Update + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The resource properties to be updated. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation Update(WaitUntil waitUntil, BranchData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _branchClientDiagnostics.CreateScope("BranchResource.Update"); + scope.Start(); + try + { + var response = _branchRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data, cancellationToken); + var operation = new NeonPostgresArmOperation(new BranchOperationSource(Client), _branchClientDiagnostics, Pipeline, _branchRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/ComputeCollection.cs b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/ComputeCollection.cs new file mode 100644 index 000000000000..6bb9c42be75a --- /dev/null +++ b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/ComputeCollection.cs @@ -0,0 +1,493 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Autorest.CSharp.Core; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.NeonPostgres +{ + /// + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get a instance call the GetComputes method from an instance of . + /// + public partial class ComputeCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _computeClientDiagnostics; + private readonly ComputesRestOperations _computeRestClient; + + /// Initializes a new instance of the class for mocking. + protected ComputeCollection() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the parent resource that is the target of operations. + internal ComputeCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _computeClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.NeonPostgres", ComputeResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ComputeResource.ResourceType, out string computeApiVersion); + _computeRestClient = new ComputesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, computeApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != BranchResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, BranchResource.ResourceType), nameof(id)); + } + + /// + /// Create a Compute + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName}/branches/{branchName}/computes/{computeName} + /// + /// + /// Operation Id + /// Compute_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The name of the Compute. + /// Resource create parameters. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string computeName, ComputeData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(computeName, nameof(computeName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _computeClientDiagnostics.CreateScope("ComputeCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _computeRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, computeName, data, cancellationToken).ConfigureAwait(false); + var operation = new NeonPostgresArmOperation(new ComputeOperationSource(Client), _computeClientDiagnostics, Pipeline, _computeRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, computeName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Create a Compute + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName}/branches/{branchName}/computes/{computeName} + /// + /// + /// Operation Id + /// Compute_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The name of the Compute. + /// Resource create parameters. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string computeName, ComputeData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(computeName, nameof(computeName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _computeClientDiagnostics.CreateScope("ComputeCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _computeRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, computeName, data, cancellationToken); + var operation = new NeonPostgresArmOperation(new ComputeOperationSource(Client), _computeClientDiagnostics, Pipeline, _computeRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, computeName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a Compute + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName}/branches/{branchName}/computes/{computeName} + /// + /// + /// Operation Id + /// Compute_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Compute. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string computeName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(computeName, nameof(computeName)); + + using var scope = _computeClientDiagnostics.CreateScope("ComputeCollection.Get"); + scope.Start(); + try + { + var response = await _computeRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, computeName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new ComputeResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a Compute + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName}/branches/{branchName}/computes/{computeName} + /// + /// + /// Operation Id + /// Compute_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Compute. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string computeName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(computeName, nameof(computeName)); + + using var scope = _computeClientDiagnostics.CreateScope("ComputeCollection.Get"); + scope.Start(); + try + { + var response = _computeRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, computeName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new ComputeResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// List Compute resources by Branch + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName}/branches/{branchName}/computes + /// + /// + /// Operation Id + /// Compute_List + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _computeRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _computeRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new ComputeResource(Client, ComputeData.DeserializeComputeData(e)), _computeClientDiagnostics, Pipeline, "ComputeCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// List Compute resources by Branch + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName}/branches/{branchName}/computes + /// + /// + /// Operation Id + /// Compute_List + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _computeRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _computeRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new ComputeResource(Client, ComputeData.DeserializeComputeData(e)), _computeClientDiagnostics, Pipeline, "ComputeCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName}/branches/{branchName}/computes/{computeName} + /// + /// + /// Operation Id + /// Compute_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Compute. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string computeName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(computeName, nameof(computeName)); + + using var scope = _computeClientDiagnostics.CreateScope("ComputeCollection.Exists"); + scope.Start(); + try + { + var response = await _computeRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, computeName, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName}/branches/{branchName}/computes/{computeName} + /// + /// + /// Operation Id + /// Compute_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Compute. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string computeName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(computeName, nameof(computeName)); + + using var scope = _computeClientDiagnostics.CreateScope("ComputeCollection.Exists"); + scope.Start(); + try + { + var response = _computeRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, computeName, cancellationToken: cancellationToken); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName}/branches/{branchName}/computes/{computeName} + /// + /// + /// Operation Id + /// Compute_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Compute. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetIfExistsAsync(string computeName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(computeName, nameof(computeName)); + + using var scope = _computeClientDiagnostics.CreateScope("ComputeCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _computeRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, computeName, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new ComputeResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName}/branches/{branchName}/computes/{computeName} + /// + /// + /// Operation Id + /// Compute_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Compute. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string computeName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(computeName, nameof(computeName)); + + using var scope = _computeClientDiagnostics.CreateScope("ComputeCollection.GetIfExists"); + scope.Start(); + try + { + var response = _computeRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, computeName, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new ComputeResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) + { + return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); + } + } +} diff --git a/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/ComputeData.Serialization.cs b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/ComputeData.Serialization.cs new file mode 100644 index 000000000000..bcfed354ff83 --- /dev/null +++ b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/ComputeData.Serialization.cs @@ -0,0 +1,155 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.Models; +using Azure.ResourceManager.NeonPostgres.Models; + +namespace Azure.ResourceManager.NeonPostgres +{ + public partial class ComputeData : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ComputeData)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties, options); + } + } + + ComputeData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ComputeData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeComputeData(document.RootElement, options); + } + + internal static ComputeData DeserializeComputeData(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ComputeProperties properties = default; + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + SystemData systemData = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + properties = ComputeProperties.DeserializeComputeProperties(property.Value, options); + continue; + } + if (property.NameEquals("id"u8)) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ComputeData( + id, + name, + type, + systemData, + properties, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ComputeData)} does not support writing '{options.Format}' format."); + } + } + + ComputeData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeComputeData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ComputeData)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/ComputeData.cs b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/ComputeData.cs new file mode 100644 index 000000000000..68cb9c0b20cf --- /dev/null +++ b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/ComputeData.cs @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.Models; +using Azure.ResourceManager.NeonPostgres.Models; + +namespace Azure.ResourceManager.NeonPostgres +{ + /// + /// A class representing the Compute data model. + /// The Compute resource type. + /// + public partial class ComputeData : ResourceData + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public ComputeData() + { + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The resource-specific properties for this resource. + /// Keeps track of any properties unknown to the library. + internal ComputeData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, ComputeProperties properties, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + { + Properties = properties; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The resource-specific properties for this resource. + public ComputeProperties Properties { get; set; } + } +} diff --git a/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/ComputeResource.Serialization.cs b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/ComputeResource.Serialization.cs new file mode 100644 index 000000000000..9c710e176b72 --- /dev/null +++ b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/ComputeResource.Serialization.cs @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text.Json; + +namespace Azure.ResourceManager.NeonPostgres +{ + public partial class ComputeResource : IJsonModel + { + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + ComputeData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options); + + ComputeData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + } +} diff --git a/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/ComputeResource.cs b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/ComputeResource.cs new file mode 100644 index 000000000000..24ae7eac9236 --- /dev/null +++ b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/ComputeResource.cs @@ -0,0 +1,353 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.NeonPostgres +{ + /// + /// A Class representing a Compute along with the instance operations that can be performed on it. + /// If you have a you can construct a + /// from an instance of using the GetComputeResource method. + /// Otherwise you can get one from its parent resource using the GetCompute method. + /// + public partial class ComputeResource : ArmResource + { + /// Generate the resource identifier of a instance. + /// The subscriptionId. + /// The resourceGroupName. + /// The organizationName. + /// The projectName. + /// The branchName. + /// The computeName. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string organizationName, string projectName, string branchName, string computeName) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName}/branches/{branchName}/computes/{computeName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _computeClientDiagnostics; + private readonly ComputesRestOperations _computeRestClient; + private readonly ComputeData _data; + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Neon.Postgres/organizations/projects/branches/computes"; + + /// Initializes a new instance of the class for mocking. + protected ComputeResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal ComputeResource(ArmClient client, ComputeData data) : this(client, data.Id) + { + HasData = true; + _data = data; + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the resource that is the target of operations. + internal ComputeResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _computeClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.NeonPostgres", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string computeApiVersion); + _computeRestClient = new ComputesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, computeApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets whether or not the current instance has data. + public virtual bool HasData { get; } + + /// Gets the data representing this Feature. + /// Throws if there is no data loaded in the current instance. + public virtual ComputeData Data + { + get + { + if (!HasData) + throw new InvalidOperationException("The current instance does not have data, you must call Get first."); + return _data; + } + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); + } + + /// + /// Get a Compute + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName}/branches/{branchName}/computes/{computeName} + /// + /// + /// Operation Id + /// Compute_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _computeClientDiagnostics.CreateScope("ComputeResource.Get"); + scope.Start(); + try + { + var response = await _computeRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new ComputeResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a Compute + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName}/branches/{branchName}/computes/{computeName} + /// + /// + /// Operation Id + /// Compute_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _computeClientDiagnostics.CreateScope("ComputeResource.Get"); + scope.Start(); + try + { + var response = _computeRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new ComputeResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete a Compute + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName}/branches/{branchName}/computes/{computeName} + /// + /// + /// Operation Id + /// Compute_Delete + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _computeClientDiagnostics.CreateScope("ComputeResource.Delete"); + scope.Start(); + try + { + var response = await _computeRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var uri = _computeRestClient.CreateDeleteRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Delete, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new NeonPostgresArmOperation(response, rehydrationToken); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete a Compute + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName}/branches/{branchName}/computes/{computeName} + /// + /// + /// Operation Id + /// Compute_Delete + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _computeClientDiagnostics.CreateScope("ComputeResource.Delete"); + scope.Start(); + try + { + var response = _computeRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); + var uri = _computeRestClient.CreateDeleteRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Delete, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new NeonPostgresArmOperation(response, rehydrationToken); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Update a Compute + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName}/branches/{branchName}/computes/{computeName} + /// + /// + /// Operation Id + /// Compute_Update + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The resource properties to be updated. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(WaitUntil waitUntil, ComputeData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _computeClientDiagnostics.CreateScope("ComputeResource.Update"); + scope.Start(); + try + { + var response = await _computeRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data, cancellationToken).ConfigureAwait(false); + var operation = new NeonPostgresArmOperation(new ComputeOperationSource(Client), _computeClientDiagnostics, Pipeline, _computeRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Update a Compute + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName}/branches/{branchName}/computes/{computeName} + /// + /// + /// Operation Id + /// Compute_Update + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The resource properties to be updated. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation Update(WaitUntil waitUntil, ComputeData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _computeClientDiagnostics.CreateScope("ComputeResource.Update"); + scope.Start(); + try + { + var response = _computeRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data, cancellationToken); + var operation = new NeonPostgresArmOperation(new ComputeOperationSource(Client), _computeClientDiagnostics, Pipeline, _computeRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/EndpointCollection.cs b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/EndpointCollection.cs new file mode 100644 index 000000000000..685bc88c86b9 --- /dev/null +++ b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/EndpointCollection.cs @@ -0,0 +1,493 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Autorest.CSharp.Core; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.NeonPostgres +{ + /// + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get an instance call the GetEndpoints method from an instance of . + /// + public partial class EndpointCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _endpointClientDiagnostics; + private readonly EndpointsRestOperations _endpointRestClient; + + /// Initializes a new instance of the class for mocking. + protected EndpointCollection() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the parent resource that is the target of operations. + internal EndpointCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _endpointClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.NeonPostgres", EndpointResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(EndpointResource.ResourceType, out string endpointApiVersion); + _endpointRestClient = new EndpointsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, endpointApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != BranchResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, BranchResource.ResourceType), nameof(id)); + } + + /// + /// Create a Endpoint + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName}/branches/{branchName}/endpoints/{endpointName} + /// + /// + /// Operation Id + /// Endpoint_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The name of the Endpoint. + /// Resource create parameters. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string endpointName, EndpointData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(endpointName, nameof(endpointName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _endpointClientDiagnostics.CreateScope("EndpointCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _endpointRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, endpointName, data, cancellationToken).ConfigureAwait(false); + var operation = new NeonPostgresArmOperation(new EndpointOperationSource(Client), _endpointClientDiagnostics, Pipeline, _endpointRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, endpointName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Create a Endpoint + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName}/branches/{branchName}/endpoints/{endpointName} + /// + /// + /// Operation Id + /// Endpoint_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The name of the Endpoint. + /// Resource create parameters. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string endpointName, EndpointData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(endpointName, nameof(endpointName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _endpointClientDiagnostics.CreateScope("EndpointCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _endpointRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, endpointName, data, cancellationToken); + var operation = new NeonPostgresArmOperation(new EndpointOperationSource(Client), _endpointClientDiagnostics, Pipeline, _endpointRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, endpointName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a Endpoint + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName}/branches/{branchName}/endpoints/{endpointName} + /// + /// + /// Operation Id + /// Endpoint_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Endpoint. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string endpointName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(endpointName, nameof(endpointName)); + + using var scope = _endpointClientDiagnostics.CreateScope("EndpointCollection.Get"); + scope.Start(); + try + { + var response = await _endpointRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, endpointName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new EndpointResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a Endpoint + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName}/branches/{branchName}/endpoints/{endpointName} + /// + /// + /// Operation Id + /// Endpoint_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Endpoint. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string endpointName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(endpointName, nameof(endpointName)); + + using var scope = _endpointClientDiagnostics.CreateScope("EndpointCollection.Get"); + scope.Start(); + try + { + var response = _endpointRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, endpointName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new EndpointResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// List Endpoint resources by Branch + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName}/branches/{branchName}/endpoints + /// + /// + /// Operation Id + /// Endpoint_List + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _endpointRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _endpointRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new EndpointResource(Client, EndpointData.DeserializeEndpointData(e)), _endpointClientDiagnostics, Pipeline, "EndpointCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// List Endpoint resources by Branch + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName}/branches/{branchName}/endpoints + /// + /// + /// Operation Id + /// Endpoint_List + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _endpointRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _endpointRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new EndpointResource(Client, EndpointData.DeserializeEndpointData(e)), _endpointClientDiagnostics, Pipeline, "EndpointCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName}/branches/{branchName}/endpoints/{endpointName} + /// + /// + /// Operation Id + /// Endpoint_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Endpoint. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string endpointName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(endpointName, nameof(endpointName)); + + using var scope = _endpointClientDiagnostics.CreateScope("EndpointCollection.Exists"); + scope.Start(); + try + { + var response = await _endpointRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, endpointName, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName}/branches/{branchName}/endpoints/{endpointName} + /// + /// + /// Operation Id + /// Endpoint_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Endpoint. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string endpointName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(endpointName, nameof(endpointName)); + + using var scope = _endpointClientDiagnostics.CreateScope("EndpointCollection.Exists"); + scope.Start(); + try + { + var response = _endpointRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, endpointName, cancellationToken: cancellationToken); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName}/branches/{branchName}/endpoints/{endpointName} + /// + /// + /// Operation Id + /// Endpoint_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Endpoint. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetIfExistsAsync(string endpointName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(endpointName, nameof(endpointName)); + + using var scope = _endpointClientDiagnostics.CreateScope("EndpointCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _endpointRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, endpointName, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new EndpointResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName}/branches/{branchName}/endpoints/{endpointName} + /// + /// + /// Operation Id + /// Endpoint_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Endpoint. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string endpointName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(endpointName, nameof(endpointName)); + + using var scope = _endpointClientDiagnostics.CreateScope("EndpointCollection.GetIfExists"); + scope.Start(); + try + { + var response = _endpointRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, endpointName, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new EndpointResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) + { + return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); + } + } +} diff --git a/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/EndpointData.Serialization.cs b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/EndpointData.Serialization.cs new file mode 100644 index 000000000000..2c65b28b3aa2 --- /dev/null +++ b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/EndpointData.Serialization.cs @@ -0,0 +1,155 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.Models; +using Azure.ResourceManager.NeonPostgres.Models; + +namespace Azure.ResourceManager.NeonPostgres +{ + public partial class EndpointData : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(EndpointData)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties, options); + } + } + + EndpointData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(EndpointData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeEndpointData(document.RootElement, options); + } + + internal static EndpointData DeserializeEndpointData(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + EndpointProperties properties = default; + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + SystemData systemData = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + properties = EndpointProperties.DeserializeEndpointProperties(property.Value, options); + continue; + } + if (property.NameEquals("id"u8)) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new EndpointData( + id, + name, + type, + systemData, + properties, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(EndpointData)} does not support writing '{options.Format}' format."); + } + } + + EndpointData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeEndpointData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(EndpointData)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/EndpointData.cs b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/EndpointData.cs new file mode 100644 index 000000000000..215adf9f9384 --- /dev/null +++ b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/EndpointData.cs @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.Models; +using Azure.ResourceManager.NeonPostgres.Models; + +namespace Azure.ResourceManager.NeonPostgres +{ + /// + /// A class representing the Endpoint data model. + /// The Neon compute endpoint resource type. + /// + public partial class EndpointData : ResourceData + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public EndpointData() + { + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The resource-specific properties for this resource. + /// Keeps track of any properties unknown to the library. + internal EndpointData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, EndpointProperties properties, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + { + Properties = properties; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The resource-specific properties for this resource. + public EndpointProperties Properties { get; set; } + } +} diff --git a/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/EndpointResource.Serialization.cs b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/EndpointResource.Serialization.cs new file mode 100644 index 000000000000..cd1b4e5bae4a --- /dev/null +++ b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/EndpointResource.Serialization.cs @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text.Json; + +namespace Azure.ResourceManager.NeonPostgres +{ + public partial class EndpointResource : IJsonModel + { + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + EndpointData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options); + + EndpointData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + } +} diff --git a/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/EndpointResource.cs b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/EndpointResource.cs new file mode 100644 index 000000000000..bb5a489144f1 --- /dev/null +++ b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/EndpointResource.cs @@ -0,0 +1,353 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.NeonPostgres +{ + /// + /// A Class representing an Endpoint along with the instance operations that can be performed on it. + /// If you have a you can construct an + /// from an instance of using the GetEndpointResource method. + /// Otherwise you can get one from its parent resource using the GetEndpoint method. + /// + public partial class EndpointResource : ArmResource + { + /// Generate the resource identifier of a instance. + /// The subscriptionId. + /// The resourceGroupName. + /// The organizationName. + /// The projectName. + /// The branchName. + /// The endpointName. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string organizationName, string projectName, string branchName, string endpointName) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName}/branches/{branchName}/endpoints/{endpointName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _endpointClientDiagnostics; + private readonly EndpointsRestOperations _endpointRestClient; + private readonly EndpointData _data; + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Neon.Postgres/organizations/projects/branches/endpoints"; + + /// Initializes a new instance of the class for mocking. + protected EndpointResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal EndpointResource(ArmClient client, EndpointData data) : this(client, data.Id) + { + HasData = true; + _data = data; + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the resource that is the target of operations. + internal EndpointResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _endpointClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.NeonPostgres", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string endpointApiVersion); + _endpointRestClient = new EndpointsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, endpointApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets whether or not the current instance has data. + public virtual bool HasData { get; } + + /// Gets the data representing this Feature. + /// Throws if there is no data loaded in the current instance. + public virtual EndpointData Data + { + get + { + if (!HasData) + throw new InvalidOperationException("The current instance does not have data, you must call Get first."); + return _data; + } + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); + } + + /// + /// Get a Endpoint + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName}/branches/{branchName}/endpoints/{endpointName} + /// + /// + /// Operation Id + /// Endpoint_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _endpointClientDiagnostics.CreateScope("EndpointResource.Get"); + scope.Start(); + try + { + var response = await _endpointRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new EndpointResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a Endpoint + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName}/branches/{branchName}/endpoints/{endpointName} + /// + /// + /// Operation Id + /// Endpoint_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _endpointClientDiagnostics.CreateScope("EndpointResource.Get"); + scope.Start(); + try + { + var response = _endpointRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new EndpointResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete a Endpoint + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName}/branches/{branchName}/endpoints/{endpointName} + /// + /// + /// Operation Id + /// Endpoint_Delete + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _endpointClientDiagnostics.CreateScope("EndpointResource.Delete"); + scope.Start(); + try + { + var response = await _endpointRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var uri = _endpointRestClient.CreateDeleteRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Delete, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new NeonPostgresArmOperation(response, rehydrationToken); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete a Endpoint + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName}/branches/{branchName}/endpoints/{endpointName} + /// + /// + /// Operation Id + /// Endpoint_Delete + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _endpointClientDiagnostics.CreateScope("EndpointResource.Delete"); + scope.Start(); + try + { + var response = _endpointRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); + var uri = _endpointRestClient.CreateDeleteRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Delete, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new NeonPostgresArmOperation(response, rehydrationToken); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Update a Endpoint + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName}/branches/{branchName}/endpoints/{endpointName} + /// + /// + /// Operation Id + /// Endpoint_Update + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The resource properties to be updated. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(WaitUntil waitUntil, EndpointData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _endpointClientDiagnostics.CreateScope("EndpointResource.Update"); + scope.Start(); + try + { + var response = await _endpointRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data, cancellationToken).ConfigureAwait(false); + var operation = new NeonPostgresArmOperation(new EndpointOperationSource(Client), _endpointClientDiagnostics, Pipeline, _endpointRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Update a Endpoint + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName}/branches/{branchName}/endpoints/{endpointName} + /// + /// + /// Operation Id + /// Endpoint_Update + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The resource properties to be updated. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation Update(WaitUntil waitUntil, EndpointData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _endpointClientDiagnostics.CreateScope("EndpointResource.Update"); + scope.Start(); + try + { + var response = _endpointRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data, cancellationToken); + var operation = new NeonPostgresArmOperation(new EndpointOperationSource(Client), _endpointClientDiagnostics, Pipeline, _endpointRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/Extensions/MockableNeonPostgresArmClient.cs b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/Extensions/MockableNeonPostgresArmClient.cs index 5a92c8fc6b3a..9771deb7e5d0 100644 --- a/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/Extensions/MockableNeonPostgresArmClient.cs +++ b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/Extensions/MockableNeonPostgresArmClient.cs @@ -45,5 +45,77 @@ public virtual NeonOrganizationResource GetNeonOrganizationResource(ResourceIden NeonOrganizationResource.ValidateResourceId(id); return new NeonOrganizationResource(Client, id); } + + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// The resource ID of the resource to get. + /// Returns a object. + public virtual ProjectResource GetProjectResource(ResourceIdentifier id) + { + ProjectResource.ValidateResourceId(id); + return new ProjectResource(Client, id); + } + + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// The resource ID of the resource to get. + /// Returns a object. + public virtual BranchResource GetBranchResource(ResourceIdentifier id) + { + BranchResource.ValidateResourceId(id); + return new BranchResource(Client, id); + } + + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// The resource ID of the resource to get. + /// Returns a object. + public virtual ComputeResource GetComputeResource(ResourceIdentifier id) + { + ComputeResource.ValidateResourceId(id); + return new ComputeResource(Client, id); + } + + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// The resource ID of the resource to get. + /// Returns a object. + public virtual NeonDatabaseResource GetNeonDatabaseResource(ResourceIdentifier id) + { + NeonDatabaseResource.ValidateResourceId(id); + return new NeonDatabaseResource(Client, id); + } + + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// The resource ID of the resource to get. + /// Returns a object. + public virtual NeonRoleResource GetNeonRoleResource(ResourceIdentifier id) + { + NeonRoleResource.ValidateResourceId(id); + return new NeonRoleResource(Client, id); + } + + /// + /// Gets an object representing an along with the instance operations that can be performed on it but with no data. + /// You can use to create an from its components. + /// + /// The resource ID of the resource to get. + /// Returns a object. + public virtual EndpointResource GetEndpointResource(ResourceIdentifier id) + { + EndpointResource.ValidateResourceId(id); + return new EndpointResource(Client, id); + } } } diff --git a/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/Extensions/MockableNeonPostgresResourceGroupResource.cs b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/Extensions/MockableNeonPostgresResourceGroupResource.cs index 54b0de3692f3..8c33caacd526 100644 --- a/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/Extensions/MockableNeonPostgresResourceGroupResource.cs +++ b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/Extensions/MockableNeonPostgresResourceGroupResource.cs @@ -9,12 +9,17 @@ using System.Threading; using System.Threading.Tasks; using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.NeonPostgres.Models; namespace Azure.ResourceManager.NeonPostgres.Mocking { /// A class to add extension methods to ResourceGroupResource. public partial class MockableNeonPostgresResourceGroupResource : ArmResource { + private ClientDiagnostics _neonOrganizationOrganizationsClientDiagnostics; + private OrganizationsRestOperations _neonOrganizationOrganizationsRestClient; + /// Initializes a new instance of the class for mocking. protected MockableNeonPostgresResourceGroupResource() { @@ -27,6 +32,9 @@ internal MockableNeonPostgresResourceGroupResource(ArmClient client, ResourceIde { } + private ClientDiagnostics NeonOrganizationOrganizationsClientDiagnostics => _neonOrganizationOrganizationsClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.NeonPostgres", NeonOrganizationResource.ResourceType.Namespace, Diagnostics); + private OrganizationsRestOperations NeonOrganizationOrganizationsRestClient => _neonOrganizationOrganizationsRestClient ??= new OrganizationsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, GetApiVersionOrNull(NeonOrganizationResource.ResourceType)); + private string GetApiVersionOrNull(ResourceType resourceType) { TryGetApiVersion(resourceType, out string apiVersion); @@ -53,7 +61,7 @@ public virtual NeonOrganizationCollection GetNeonOrganizations() /// /// /// Default Api Version - /// 2024-08-01-preview + /// 2025-03-01 /// /// /// Resource @@ -84,7 +92,7 @@ public virtual async Task> GetNeonOrganizatio /// /// /// Default Api Version - /// 2024-08-01-preview + /// 2025-03-01 /// /// /// Resource @@ -101,5 +109,83 @@ public virtual Response GetNeonOrganization(string org { return GetNeonOrganizations().Get(organizationName, cancellationToken); } + + /// + /// Action to retrieve the PostgreSQL versions. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/getPostgresVersions + /// + /// + /// Operation Id + /// Organizations_GetPostgresVersions + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Post Action to retrieve the PostgreSQL versions. + /// The cancellation token to use. + public virtual async Task> GetPostgresVersionsOrganizationAsync(PgVersion pgVersion = null, CancellationToken cancellationToken = default) + { + using var scope = NeonOrganizationOrganizationsClientDiagnostics.CreateScope("MockableNeonPostgresResourceGroupResource.GetPostgresVersionsOrganization"); + scope.Start(); + try + { + var response = await NeonOrganizationOrganizationsRestClient.GetPostgresVersionsAsync(Id.SubscriptionId, Id.ResourceGroupName, pgVersion, cancellationToken).ConfigureAwait(false); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Action to retrieve the PostgreSQL versions. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/getPostgresVersions + /// + /// + /// Operation Id + /// Organizations_GetPostgresVersions + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Post Action to retrieve the PostgreSQL versions. + /// The cancellation token to use. + public virtual Response GetPostgresVersionsOrganization(PgVersion pgVersion = null, CancellationToken cancellationToken = default) + { + using var scope = NeonOrganizationOrganizationsClientDiagnostics.CreateScope("MockableNeonPostgresResourceGroupResource.GetPostgresVersionsOrganization"); + scope.Start(); + try + { + var response = NeonOrganizationOrganizationsRestClient.GetPostgresVersions(Id.SubscriptionId, Id.ResourceGroupName, pgVersion, cancellationToken); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } } } diff --git a/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/Extensions/MockableNeonPostgresSubscriptionResource.cs b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/Extensions/MockableNeonPostgresSubscriptionResource.cs index abc57a2d6f31..71ebd2216522 100644 --- a/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/Extensions/MockableNeonPostgresSubscriptionResource.cs +++ b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/Extensions/MockableNeonPostgresSubscriptionResource.cs @@ -52,7 +52,7 @@ private string GetApiVersionOrNull(ResourceType resourceType) /// /// /// Default Api Version - /// 2024-08-01-preview + /// 2025-03-01 /// /// /// Resource @@ -82,7 +82,7 @@ public virtual AsyncPageable GetNeonOrganizationsAsync /// /// /// Default Api Version - /// 2024-08-01-preview + /// 2025-03-01 /// /// /// Resource diff --git a/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/Extensions/NeonPostgresExtensions.cs b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/Extensions/NeonPostgresExtensions.cs index 9037e7c839eb..07ff05441fb8 100644 --- a/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/Extensions/NeonPostgresExtensions.cs +++ b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/Extensions/NeonPostgresExtensions.cs @@ -10,6 +10,7 @@ using System.Threading.Tasks; using Azure.Core; using Azure.ResourceManager.NeonPostgres.Mocking; +using Azure.ResourceManager.NeonPostgres.Models; using Azure.ResourceManager.Resources; namespace Azure.ResourceManager.NeonPostgres @@ -51,6 +52,120 @@ public static NeonOrganizationResource GetNeonOrganizationResource(this ArmClien return GetMockableNeonPostgresArmClient(client).GetNeonOrganizationResource(id); } + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// is null. + /// Returns a object. + public static ProjectResource GetProjectResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableNeonPostgresArmClient(client).GetProjectResource(id); + } + + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// is null. + /// Returns a object. + public static BranchResource GetBranchResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableNeonPostgresArmClient(client).GetBranchResource(id); + } + + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// is null. + /// Returns a object. + public static ComputeResource GetComputeResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableNeonPostgresArmClient(client).GetComputeResource(id); + } + + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// is null. + /// Returns a object. + public static NeonDatabaseResource GetNeonDatabaseResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableNeonPostgresArmClient(client).GetNeonDatabaseResource(id); + } + + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// is null. + /// Returns a object. + public static NeonRoleResource GetNeonRoleResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableNeonPostgresArmClient(client).GetNeonRoleResource(id); + } + + /// + /// Gets an object representing an along with the instance operations that can be performed on it but with no data. + /// You can use to create an from its components. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// is null. + /// Returns a object. + public static EndpointResource GetEndpointResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableNeonPostgresArmClient(client).GetEndpointResource(id); + } + /// /// Gets a collection of NeonOrganizationResources in the ResourceGroupResource. /// @@ -81,7 +196,7 @@ public static NeonOrganizationCollection GetNeonOrganizations(this ResourceGroup /// /// /// Default Api Version - /// 2024-08-01-preview + /// 2025-03-01 /// /// /// Resource @@ -119,7 +234,7 @@ public static async Task> GetNeonOrganization /// /// /// Default Api Version - /// 2024-08-01-preview + /// 2025-03-01 /// /// /// Resource @@ -144,6 +259,78 @@ public static Response GetNeonOrganization(this Resour return GetMockableNeonPostgresResourceGroupResource(resourceGroupResource).GetNeonOrganization(organizationName, cancellationToken); } + /// + /// Action to retrieve the PostgreSQL versions. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/getPostgresVersions + /// + /// + /// Operation Id + /// Organizations_GetPostgresVersions + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// Post Action to retrieve the PostgreSQL versions. + /// The cancellation token to use. + /// is null. + public static async Task> GetPostgresVersionsOrganizationAsync(this ResourceGroupResource resourceGroupResource, PgVersion pgVersion = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); + + return await GetMockableNeonPostgresResourceGroupResource(resourceGroupResource).GetPostgresVersionsOrganizationAsync(pgVersion, cancellationToken).ConfigureAwait(false); + } + + /// + /// Action to retrieve the PostgreSQL versions. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/getPostgresVersions + /// + /// + /// Operation Id + /// Organizations_GetPostgresVersions + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// Post Action to retrieve the PostgreSQL versions. + /// The cancellation token to use. + /// is null. + public static Response GetPostgresVersionsOrganization(this ResourceGroupResource resourceGroupResource, PgVersion pgVersion = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); + + return GetMockableNeonPostgresResourceGroupResource(resourceGroupResource).GetPostgresVersionsOrganization(pgVersion, cancellationToken); + } + /// /// List OrganizationResource resources by subscription ID /// @@ -157,7 +344,7 @@ public static Response GetNeonOrganization(this Resour /// /// /// Default Api Version - /// 2024-08-01-preview + /// 2025-03-01 /// /// /// Resource @@ -193,7 +380,7 @@ public static AsyncPageable GetNeonOrganizationsAsync( /// /// /// Default Api Version - /// 2024-08-01-preview + /// 2025-03-01 /// /// /// Resource diff --git a/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/LongRunningOperation/BranchOperationSource.cs b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/LongRunningOperation/BranchOperationSource.cs new file mode 100644 index 000000000000..e4baf5ec50eb --- /dev/null +++ b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/LongRunningOperation/BranchOperationSource.cs @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.ClientModel.Primitives; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; + +namespace Azure.ResourceManager.NeonPostgres +{ + internal class BranchOperationSource : IOperationSource + { + private readonly ArmClient _client; + + internal BranchOperationSource(ArmClient client) + { + _client = client; + } + + BranchResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + var data = ModelReaderWriter.Read(response.Content); + return new BranchResource(_client, data); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + var data = ModelReaderWriter.Read(response.Content); + return await Task.FromResult(new BranchResource(_client, data)).ConfigureAwait(false); + } + } +} diff --git a/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/LongRunningOperation/ComputeOperationSource.cs b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/LongRunningOperation/ComputeOperationSource.cs new file mode 100644 index 000000000000..6bc57eba36f5 --- /dev/null +++ b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/LongRunningOperation/ComputeOperationSource.cs @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.ClientModel.Primitives; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; + +namespace Azure.ResourceManager.NeonPostgres +{ + internal class ComputeOperationSource : IOperationSource + { + private readonly ArmClient _client; + + internal ComputeOperationSource(ArmClient client) + { + _client = client; + } + + ComputeResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + var data = ModelReaderWriter.Read(response.Content); + return new ComputeResource(_client, data); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + var data = ModelReaderWriter.Read(response.Content); + return await Task.FromResult(new ComputeResource(_client, data)).ConfigureAwait(false); + } + } +} diff --git a/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/LongRunningOperation/EndpointOperationSource.cs b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/LongRunningOperation/EndpointOperationSource.cs new file mode 100644 index 000000000000..26483546690a --- /dev/null +++ b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/LongRunningOperation/EndpointOperationSource.cs @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.ClientModel.Primitives; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; + +namespace Azure.ResourceManager.NeonPostgres +{ + internal class EndpointOperationSource : IOperationSource + { + private readonly ArmClient _client; + + internal EndpointOperationSource(ArmClient client) + { + _client = client; + } + + EndpointResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + var data = ModelReaderWriter.Read(response.Content); + return new EndpointResource(_client, data); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + var data = ModelReaderWriter.Read(response.Content); + return await Task.FromResult(new EndpointResource(_client, data)).ConfigureAwait(false); + } + } +} diff --git a/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/LongRunningOperation/NeonDatabaseOperationSource.cs b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/LongRunningOperation/NeonDatabaseOperationSource.cs new file mode 100644 index 000000000000..4a137f0d87d7 --- /dev/null +++ b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/LongRunningOperation/NeonDatabaseOperationSource.cs @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.ClientModel.Primitives; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; + +namespace Azure.ResourceManager.NeonPostgres +{ + internal class NeonDatabaseOperationSource : IOperationSource + { + private readonly ArmClient _client; + + internal NeonDatabaseOperationSource(ArmClient client) + { + _client = client; + } + + NeonDatabaseResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + var data = ModelReaderWriter.Read(response.Content); + return new NeonDatabaseResource(_client, data); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + var data = ModelReaderWriter.Read(response.Content); + return await Task.FromResult(new NeonDatabaseResource(_client, data)).ConfigureAwait(false); + } + } +} diff --git a/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/LongRunningOperation/NeonRoleOperationSource.cs b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/LongRunningOperation/NeonRoleOperationSource.cs new file mode 100644 index 000000000000..6c7a4cb58057 --- /dev/null +++ b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/LongRunningOperation/NeonRoleOperationSource.cs @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.ClientModel.Primitives; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; + +namespace Azure.ResourceManager.NeonPostgres +{ + internal class NeonRoleOperationSource : IOperationSource + { + private readonly ArmClient _client; + + internal NeonRoleOperationSource(ArmClient client) + { + _client = client; + } + + NeonRoleResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + var data = ModelReaderWriter.Read(response.Content); + return new NeonRoleResource(_client, data); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + var data = ModelReaderWriter.Read(response.Content); + return await Task.FromResult(new NeonRoleResource(_client, data)).ConfigureAwait(false); + } + } +} diff --git a/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/LongRunningOperation/ProjectOperationSource.cs b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/LongRunningOperation/ProjectOperationSource.cs new file mode 100644 index 000000000000..75d0702c7378 --- /dev/null +++ b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/LongRunningOperation/ProjectOperationSource.cs @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.ClientModel.Primitives; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; + +namespace Azure.ResourceManager.NeonPostgres +{ + internal class ProjectOperationSource : IOperationSource + { + private readonly ArmClient _client; + + internal ProjectOperationSource(ArmClient client) + { + _client = client; + } + + ProjectResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + var data = ModelReaderWriter.Read(response.Content); + return new ProjectResource(_client, data); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + var data = ModelReaderWriter.Read(response.Content); + return await Task.FromResult(new ProjectResource(_client, data)).ConfigureAwait(false); + } + } +} diff --git a/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/Models/Attributes.Serialization.cs b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/Models/Attributes.Serialization.cs new file mode 100644 index 000000000000..49b17d0dc60b --- /dev/null +++ b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/Models/Attributes.Serialization.cs @@ -0,0 +1,134 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.NeonPostgres.Models +{ + public partial class Attributes : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(Attributes)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + writer.WritePropertyName("value"u8); + writer.WriteStringValue(Value); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + Attributes IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(Attributes)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAttributes(document.RootElement, options); + } + + internal static Attributes DeserializeAttributes(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string name = default; + string value = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("value"u8)) + { + value = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new Attributes(name, value, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(Attributes)} does not support writing '{options.Format}' format."); + } + } + + Attributes IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeAttributes(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(Attributes)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/Models/Attributes.cs b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/Models/Attributes.cs new file mode 100644 index 000000000000..31082f4bd0ba --- /dev/null +++ b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/Models/Attributes.cs @@ -0,0 +1,82 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.NeonPostgres.Models +{ + /// Additional attributes specific to Neon Resources. + public partial class Attributes + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Name of the attribute. + /// Value of the attribute. + /// or is null. + public Attributes(string name, string value) + { + Argument.AssertNotNull(name, nameof(name)); + Argument.AssertNotNull(value, nameof(value)); + + Name = name; + Value = value; + } + + /// Initializes a new instance of . + /// Name of the attribute. + /// Value of the attribute. + /// Keeps track of any properties unknown to the library. + internal Attributes(string name, string value, IDictionary serializedAdditionalRawData) + { + Name = name; + Value = value; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal Attributes() + { + } + + /// Name of the attribute. + public string Name { get; set; } + /// Value of the attribute. + public string Value { get; set; } + } +} diff --git a/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/Models/BranchListResult.Serialization.cs b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/Models/BranchListResult.Serialization.cs new file mode 100644 index 000000000000..102dc1d72766 --- /dev/null +++ b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/Models/BranchListResult.Serialization.cs @@ -0,0 +1,151 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.NeonPostgres.Models +{ + internal partial class BranchListResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(BranchListResult)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("value"u8); + writer.WriteStartArray(); + foreach (var item in Value) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + if (Optional.IsDefined(NextLink)) + { + writer.WritePropertyName("nextLink"u8); + writer.WriteStringValue(NextLink.AbsoluteUri); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + BranchListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(BranchListResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeBranchListResult(document.RootElement, options); + } + + internal static BranchListResult DeserializeBranchListResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList value = default; + Uri nextLink = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(BranchData.DeserializeBranchData(item, options)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nextLink = new Uri(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new BranchListResult(value, nextLink, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(BranchListResult)} does not support writing '{options.Format}' format."); + } + } + + BranchListResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeBranchListResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(BranchListResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/Models/BranchListResult.cs b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/Models/BranchListResult.cs new file mode 100644 index 000000000000..a02461bcf393 --- /dev/null +++ b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/Models/BranchListResult.cs @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Azure.ResourceManager.NeonPostgres.Models +{ + /// The response of a Branch list operation. + internal partial class BranchListResult + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The Branch items on this page. + /// is null. + internal BranchListResult(IEnumerable value) + { + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); + } + + /// Initializes a new instance of . + /// The Branch items on this page. + /// The link to the next page of items. + /// Keeps track of any properties unknown to the library. + internal BranchListResult(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) + { + Value = value; + NextLink = nextLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal BranchListResult() + { + } + + /// The Branch items on this page. + public IReadOnlyList Value { get; } + /// The link to the next page of items. + public Uri NextLink { get; } + } +} diff --git a/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/Models/BranchProperties.Serialization.cs b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/Models/BranchProperties.Serialization.cs new file mode 100644 index 000000000000..ff30821dc250 --- /dev/null +++ b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/Models/BranchProperties.Serialization.cs @@ -0,0 +1,323 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.NeonPostgres.Models +{ + public partial class BranchProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(BranchProperties)} does not support writing '{format}' format."); + } + + if (options.Format != "W" && Optional.IsDefined(EntityId)) + { + writer.WritePropertyName("entityId"u8); + writer.WriteStringValue(EntityId); + } + if (Optional.IsDefined(EntityName)) + { + writer.WritePropertyName("entityName"u8); + writer.WriteStringValue(EntityName); + } + if (options.Format != "W" && Optional.IsDefined(CreatedAt)) + { + writer.WritePropertyName("createdAt"u8); + writer.WriteStringValue(CreatedAt); + } + if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) + { + writer.WritePropertyName("provisioningState"u8); + writer.WriteStringValue(ProvisioningState.Value.ToString()); + } + if (Optional.IsCollectionDefined(Attributes)) + { + writer.WritePropertyName("attributes"u8); + writer.WriteStartArray(); + foreach (var item in Attributes) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(ProjectId)) + { + writer.WritePropertyName("projectId"u8); + writer.WriteStringValue(ProjectId); + } + if (Optional.IsDefined(ParentId)) + { + writer.WritePropertyName("parentId"u8); + writer.WriteStringValue(ParentId); + } + if (Optional.IsDefined(RoleName)) + { + writer.WritePropertyName("roleName"u8); + writer.WriteStringValue(RoleName); + } + if (Optional.IsDefined(DatabaseName)) + { + writer.WritePropertyName("databaseName"u8); + writer.WriteStringValue(DatabaseName); + } + if (Optional.IsCollectionDefined(Roles)) + { + writer.WritePropertyName("roles"u8); + writer.WriteStartArray(); + foreach (var item in Roles) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(Databases)) + { + writer.WritePropertyName("databases"u8); + writer.WriteStartArray(); + foreach (var item in Databases) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(Endpoints)) + { + writer.WritePropertyName("endpoints"u8); + writer.WriteStartArray(); + foreach (var item in Endpoints) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + BranchProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(BranchProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeBranchProperties(document.RootElement, options); + } + + internal static BranchProperties DeserializeBranchProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string entityId = default; + string entityName = default; + string createdAt = default; + NeonResourceProvisioningState? provisioningState = default; + IList attributes = default; + string projectId = default; + string parentId = default; + string roleName = default; + string databaseName = default; + IList roles = default; + IList databases = default; + IList endpoints = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("entityId"u8)) + { + entityId = property.Value.GetString(); + continue; + } + if (property.NameEquals("entityName"u8)) + { + entityName = property.Value.GetString(); + continue; + } + if (property.NameEquals("createdAt"u8)) + { + createdAt = property.Value.GetString(); + continue; + } + if (property.NameEquals("provisioningState"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + provisioningState = new NeonResourceProvisioningState(property.Value.GetString()); + continue; + } + if (property.NameEquals("attributes"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(Models.Attributes.DeserializeAttributes(item, options)); + } + attributes = array; + continue; + } + if (property.NameEquals("projectId"u8)) + { + projectId = property.Value.GetString(); + continue; + } + if (property.NameEquals("parentId"u8)) + { + parentId = property.Value.GetString(); + continue; + } + if (property.NameEquals("roleName"u8)) + { + roleName = property.Value.GetString(); + continue; + } + if (property.NameEquals("databaseName"u8)) + { + databaseName = property.Value.GetString(); + continue; + } + if (property.NameEquals("roles"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(NeonRoleProperties.DeserializeNeonRoleProperties(item, options)); + } + roles = array; + continue; + } + if (property.NameEquals("databases"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(NeonDatabaseProperties.DeserializeNeonDatabaseProperties(item, options)); + } + databases = array; + continue; + } + if (property.NameEquals("endpoints"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(EndpointProperties.DeserializeEndpointProperties(item, options)); + } + endpoints = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new BranchProperties( + entityId, + entityName, + createdAt, + provisioningState, + attributes ?? new ChangeTrackingList(), + projectId, + parentId, + roleName, + databaseName, + roles ?? new ChangeTrackingList(), + databases ?? new ChangeTrackingList(), + endpoints ?? new ChangeTrackingList(), + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(BranchProperties)} does not support writing '{options.Format}' format."); + } + } + + BranchProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeBranchProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(BranchProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/Models/BranchProperties.cs b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/Models/BranchProperties.cs new file mode 100644 index 000000000000..758a2eb9f576 --- /dev/null +++ b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/Models/BranchProperties.cs @@ -0,0 +1,113 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.NeonPostgres.Models +{ + /// Properties specific to Branch. + public partial class BranchProperties + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public BranchProperties() + { + Attributes = new ChangeTrackingList(); + Roles = new ChangeTrackingList(); + Databases = new ChangeTrackingList(); + Endpoints = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// Unique identifier for the entity. + /// Name of the resource. + /// Timestamp indicating when the entity was created. + /// Provisioning state of the resource. + /// Additional attributes for the entity. + /// The ID of the project this branch belongs to. + /// The ID of the parent branch. + /// Role name associated with the branch. + /// Database name associated with the branch. + /// Roles associated with the branch. + /// Neon Databases associated with the branch. + /// Endpoints associated with the branch. + /// Keeps track of any properties unknown to the library. + internal BranchProperties(string entityId, string entityName, string createdAt, NeonResourceProvisioningState? provisioningState, IList attributes, string projectId, string parentId, string roleName, string databaseName, IList roles, IList databases, IList endpoints, IDictionary serializedAdditionalRawData) + { + EntityId = entityId; + EntityName = entityName; + CreatedAt = createdAt; + ProvisioningState = provisioningState; + Attributes = attributes; + ProjectId = projectId; + ParentId = parentId; + RoleName = roleName; + DatabaseName = databaseName; + Roles = roles; + Databases = databases; + Endpoints = endpoints; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Unique identifier for the entity. + public string EntityId { get; } + /// Name of the resource. + public string EntityName { get; set; } + /// Timestamp indicating when the entity was created. + public string CreatedAt { get; } + /// Provisioning state of the resource. + public NeonResourceProvisioningState? ProvisioningState { get; } + /// Additional attributes for the entity. + public IList Attributes { get; } + /// The ID of the project this branch belongs to. + public string ProjectId { get; set; } + /// The ID of the parent branch. + public string ParentId { get; set; } + /// Role name associated with the branch. + public string RoleName { get; set; } + /// Database name associated with the branch. + public string DatabaseName { get; set; } + /// Roles associated with the branch. + public IList Roles { get; } + /// Neon Databases associated with the branch. + public IList Databases { get; } + /// Endpoints associated with the branch. + public IList Endpoints { get; } + } +} diff --git a/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/Models/ComputeListResult.Serialization.cs b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/Models/ComputeListResult.Serialization.cs new file mode 100644 index 000000000000..b65a7c1810cd --- /dev/null +++ b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/Models/ComputeListResult.Serialization.cs @@ -0,0 +1,151 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.NeonPostgres.Models +{ + internal partial class ComputeListResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ComputeListResult)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("value"u8); + writer.WriteStartArray(); + foreach (var item in Value) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + if (Optional.IsDefined(NextLink)) + { + writer.WritePropertyName("nextLink"u8); + writer.WriteStringValue(NextLink.AbsoluteUri); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ComputeListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ComputeListResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeComputeListResult(document.RootElement, options); + } + + internal static ComputeListResult DeserializeComputeListResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList value = default; + Uri nextLink = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(ComputeData.DeserializeComputeData(item, options)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nextLink = new Uri(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ComputeListResult(value, nextLink, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ComputeListResult)} does not support writing '{options.Format}' format."); + } + } + + ComputeListResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeComputeListResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ComputeListResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/Models/ComputeListResult.cs b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/Models/ComputeListResult.cs new file mode 100644 index 000000000000..03aa9c0f3709 --- /dev/null +++ b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/Models/ComputeListResult.cs @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Azure.ResourceManager.NeonPostgres.Models +{ + /// The response of a Compute list operation. + internal partial class ComputeListResult + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The Compute items on this page. + /// is null. + internal ComputeListResult(IEnumerable value) + { + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); + } + + /// Initializes a new instance of . + /// The Compute items on this page. + /// The link to the next page of items. + /// Keeps track of any properties unknown to the library. + internal ComputeListResult(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) + { + Value = value; + NextLink = nextLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal ComputeListResult() + { + } + + /// The Compute items on this page. + public IReadOnlyList Value { get; } + /// The link to the next page of items. + public Uri NextLink { get; } + } +} diff --git a/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/Models/ComputeProperties.Serialization.cs b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/Models/ComputeProperties.Serialization.cs new file mode 100644 index 000000000000..cb49bd16ed83 --- /dev/null +++ b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/Models/ComputeProperties.Serialization.cs @@ -0,0 +1,253 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.NeonPostgres.Models +{ + public partial class ComputeProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ComputeProperties)} does not support writing '{format}' format."); + } + + if (options.Format != "W" && Optional.IsDefined(EntityId)) + { + writer.WritePropertyName("entityId"u8); + writer.WriteStringValue(EntityId); + } + if (Optional.IsDefined(EntityName)) + { + writer.WritePropertyName("entityName"u8); + writer.WriteStringValue(EntityName); + } + if (options.Format != "W" && Optional.IsDefined(CreatedAt)) + { + writer.WritePropertyName("createdAt"u8); + writer.WriteStringValue(CreatedAt); + } + if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) + { + writer.WritePropertyName("provisioningState"u8); + writer.WriteStringValue(ProvisioningState.Value.ToString()); + } + if (Optional.IsCollectionDefined(Attributes)) + { + writer.WritePropertyName("attributes"u8); + writer.WriteStartArray(); + foreach (var item in Attributes) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(Region)) + { + writer.WritePropertyName("region"u8); + writer.WriteStringValue(Region); + } + if (Optional.IsDefined(CpuCores)) + { + writer.WritePropertyName("cpuCores"u8); + writer.WriteNumberValue(CpuCores.Value); + } + if (Optional.IsDefined(Memory)) + { + writer.WritePropertyName("memory"u8); + writer.WriteNumberValue(Memory.Value); + } + if (Optional.IsDefined(Status)) + { + writer.WritePropertyName("status"u8); + writer.WriteStringValue(Status); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ComputeProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ComputeProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeComputeProperties(document.RootElement, options); + } + + internal static ComputeProperties DeserializeComputeProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string entityId = default; + string entityName = default; + string createdAt = default; + NeonResourceProvisioningState? provisioningState = default; + IList attributes = default; + string region = default; + int? cpuCores = default; + int? memory = default; + string status = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("entityId"u8)) + { + entityId = property.Value.GetString(); + continue; + } + if (property.NameEquals("entityName"u8)) + { + entityName = property.Value.GetString(); + continue; + } + if (property.NameEquals("createdAt"u8)) + { + createdAt = property.Value.GetString(); + continue; + } + if (property.NameEquals("provisioningState"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + provisioningState = new NeonResourceProvisioningState(property.Value.GetString()); + continue; + } + if (property.NameEquals("attributes"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(Models.Attributes.DeserializeAttributes(item, options)); + } + attributes = array; + continue; + } + if (property.NameEquals("region"u8)) + { + region = property.Value.GetString(); + continue; + } + if (property.NameEquals("cpuCores"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + cpuCores = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("memory"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + memory = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("status"u8)) + { + status = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ComputeProperties( + entityId, + entityName, + createdAt, + provisioningState, + attributes ?? new ChangeTrackingList(), + region, + cpuCores, + memory, + status, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ComputeProperties)} does not support writing '{options.Format}' format."); + } + } + + ComputeProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeComputeProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ComputeProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/Models/ComputeProperties.cs b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/Models/ComputeProperties.cs new file mode 100644 index 000000000000..be9fd44e721c --- /dev/null +++ b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/Models/ComputeProperties.cs @@ -0,0 +1,98 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.NeonPostgres.Models +{ + /// Properties specific to Compute. + public partial class ComputeProperties + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public ComputeProperties() + { + Attributes = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// Unique identifier for the entity. + /// Name of the resource. + /// Timestamp indicating when the entity was created. + /// Provisioning state of the resource. + /// Additional attributes for the entity. + /// Region where the compute instance is located. + /// Number of allocated CPU cores. + /// Memory allocated in GB. + /// Current status of the compute instance. + /// Keeps track of any properties unknown to the library. + internal ComputeProperties(string entityId, string entityName, string createdAt, NeonResourceProvisioningState? provisioningState, IList attributes, string region, int? cpuCores, int? memory, string status, IDictionary serializedAdditionalRawData) + { + EntityId = entityId; + EntityName = entityName; + CreatedAt = createdAt; + ProvisioningState = provisioningState; + Attributes = attributes; + Region = region; + CpuCores = cpuCores; + Memory = memory; + Status = status; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Unique identifier for the entity. + public string EntityId { get; } + /// Name of the resource. + public string EntityName { get; set; } + /// Timestamp indicating when the entity was created. + public string CreatedAt { get; } + /// Provisioning state of the resource. + public NeonResourceProvisioningState? ProvisioningState { get; } + /// Additional attributes for the entity. + public IList Attributes { get; } + /// Region where the compute instance is located. + public string Region { get; set; } + /// Number of allocated CPU cores. + public int? CpuCores { get; set; } + /// Memory allocated in GB. + public int? Memory { get; set; } + /// Current status of the compute instance. + public string Status { get; set; } + } +} diff --git a/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/Models/ConnectionUriProperties.Serialization.cs b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/Models/ConnectionUriProperties.Serialization.cs new file mode 100644 index 000000000000..c4623a1eb444 --- /dev/null +++ b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/Models/ConnectionUriProperties.Serialization.cs @@ -0,0 +1,207 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.NeonPostgres.Models +{ + public partial class ConnectionUriProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ConnectionUriProperties)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(ProjectId)) + { + writer.WritePropertyName("projectId"u8); + writer.WriteStringValue(ProjectId); + } + if (Optional.IsDefined(BranchId)) + { + writer.WritePropertyName("branchId"u8); + writer.WriteStringValue(BranchId); + } + if (Optional.IsDefined(DatabaseName)) + { + writer.WritePropertyName("databaseName"u8); + writer.WriteStringValue(DatabaseName); + } + if (Optional.IsDefined(RoleName)) + { + writer.WritePropertyName("roleName"u8); + writer.WriteStringValue(RoleName); + } + if (Optional.IsDefined(EndpointId)) + { + writer.WritePropertyName("endpointId"u8); + writer.WriteStringValue(EndpointId); + } + if (Optional.IsDefined(IsPooled)) + { + writer.WritePropertyName("isPooled"u8); + writer.WriteBooleanValue(IsPooled.Value); + } + if (options.Format != "W" && Optional.IsDefined(ConnectionStringUri)) + { + writer.WritePropertyName("connectionStringUri"u8); + writer.WriteStringValue(ConnectionStringUri); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ConnectionUriProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ConnectionUriProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeConnectionUriProperties(document.RootElement, options); + } + + internal static ConnectionUriProperties DeserializeConnectionUriProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string projectId = default; + string branchId = default; + string databaseName = default; + string roleName = default; + string endpointId = default; + bool? isPooled = default; + string connectionStringUri = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("projectId"u8)) + { + projectId = property.Value.GetString(); + continue; + } + if (property.NameEquals("branchId"u8)) + { + branchId = property.Value.GetString(); + continue; + } + if (property.NameEquals("databaseName"u8)) + { + databaseName = property.Value.GetString(); + continue; + } + if (property.NameEquals("roleName"u8)) + { + roleName = property.Value.GetString(); + continue; + } + if (property.NameEquals("endpointId"u8)) + { + endpointId = property.Value.GetString(); + continue; + } + if (property.NameEquals("isPooled"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isPooled = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("connectionStringUri"u8)) + { + connectionStringUri = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ConnectionUriProperties( + projectId, + branchId, + databaseName, + roleName, + endpointId, + isPooled, + connectionStringUri, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ConnectionUriProperties)} does not support writing '{options.Format}' format."); + } + } + + ConnectionUriProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeConnectionUriProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ConnectionUriProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/Models/ConnectionUriProperties.cs b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/Models/ConnectionUriProperties.cs new file mode 100644 index 000000000000..3de24453b5ac --- /dev/null +++ b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/Models/ConnectionUriProperties.cs @@ -0,0 +1,89 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.NeonPostgres.Models +{ + /// Connection uri parameters for the associated database. + public partial class ConnectionUriProperties + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public ConnectionUriProperties() + { + } + + /// Initializes a new instance of . + /// Project Id associated with this connection. + /// Branch Id associated with this connection. + /// Database name associated with this connection. + /// The role name used for authentication. + /// the endpoint Id with this connection. + /// Indicates if the connection is pooled. + /// connection uri returned for the database. + /// Keeps track of any properties unknown to the library. + internal ConnectionUriProperties(string projectId, string branchId, string databaseName, string roleName, string endpointId, bool? isPooled, string connectionStringUri, IDictionary serializedAdditionalRawData) + { + ProjectId = projectId; + BranchId = branchId; + DatabaseName = databaseName; + RoleName = roleName; + EndpointId = endpointId; + IsPooled = isPooled; + ConnectionStringUri = connectionStringUri; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Project Id associated with this connection. + public string ProjectId { get; set; } + /// Branch Id associated with this connection. + public string BranchId { get; set; } + /// Database name associated with this connection. + public string DatabaseName { get; set; } + /// The role name used for authentication. + public string RoleName { get; set; } + /// the endpoint Id with this connection. + public string EndpointId { get; set; } + /// Indicates if the connection is pooled. + public bool? IsPooled { get; set; } + /// connection uri returned for the database. + public string ConnectionStringUri { get; } + } +} diff --git a/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/Models/DefaultEndpointSettings.Serialization.cs b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/Models/DefaultEndpointSettings.Serialization.cs new file mode 100644 index 000000000000..8002a758b0a9 --- /dev/null +++ b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/Models/DefaultEndpointSettings.Serialization.cs @@ -0,0 +1,134 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.NeonPostgres.Models +{ + public partial class DefaultEndpointSettings : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DefaultEndpointSettings)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("autoscalingLimitMinCu"u8); + writer.WriteNumberValue(AutoscalingLimitMinCu); + writer.WritePropertyName("autoscalingLimitMaxCu"u8); + writer.WriteNumberValue(AutoscalingLimitMaxCu); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + DefaultEndpointSettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DefaultEndpointSettings)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDefaultEndpointSettings(document.RootElement, options); + } + + internal static DefaultEndpointSettings DeserializeDefaultEndpointSettings(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + float autoscalingLimitMinCu = default; + float autoscalingLimitMaxCu = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("autoscalingLimitMinCu"u8)) + { + autoscalingLimitMinCu = property.Value.GetSingle(); + continue; + } + if (property.NameEquals("autoscalingLimitMaxCu"u8)) + { + autoscalingLimitMaxCu = property.Value.GetSingle(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DefaultEndpointSettings(autoscalingLimitMinCu, autoscalingLimitMaxCu, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(DefaultEndpointSettings)} does not support writing '{options.Format}' format."); + } + } + + DefaultEndpointSettings IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeDefaultEndpointSettings(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DefaultEndpointSettings)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/Models/DefaultEndpointSettings.cs b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/Models/DefaultEndpointSettings.cs new file mode 100644 index 000000000000..ea7accff0b69 --- /dev/null +++ b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/Models/DefaultEndpointSettings.cs @@ -0,0 +1,78 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.NeonPostgres.Models +{ + /// Default Endpoint Settings for the project. + public partial class DefaultEndpointSettings + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Minimum compute units for autoscaling. + /// Maximum compute units for autoscaling. + public DefaultEndpointSettings(float autoscalingLimitMinCu, float autoscalingLimitMaxCu) + { + AutoscalingLimitMinCu = autoscalingLimitMinCu; + AutoscalingLimitMaxCu = autoscalingLimitMaxCu; + } + + /// Initializes a new instance of . + /// Minimum compute units for autoscaling. + /// Maximum compute units for autoscaling. + /// Keeps track of any properties unknown to the library. + internal DefaultEndpointSettings(float autoscalingLimitMinCu, float autoscalingLimitMaxCu, IDictionary serializedAdditionalRawData) + { + AutoscalingLimitMinCu = autoscalingLimitMinCu; + AutoscalingLimitMaxCu = autoscalingLimitMaxCu; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal DefaultEndpointSettings() + { + } + + /// Minimum compute units for autoscaling. + public float AutoscalingLimitMinCu { get; set; } + /// Maximum compute units for autoscaling. + public float AutoscalingLimitMaxCu { get; set; } + } +} diff --git a/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/Models/EndpointListResult.Serialization.cs b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/Models/EndpointListResult.Serialization.cs new file mode 100644 index 000000000000..0ea58d5338da --- /dev/null +++ b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/Models/EndpointListResult.Serialization.cs @@ -0,0 +1,151 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.NeonPostgres.Models +{ + internal partial class EndpointListResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(EndpointListResult)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("value"u8); + writer.WriteStartArray(); + foreach (var item in Value) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + if (Optional.IsDefined(NextLink)) + { + writer.WritePropertyName("nextLink"u8); + writer.WriteStringValue(NextLink.AbsoluteUri); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + EndpointListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(EndpointListResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeEndpointListResult(document.RootElement, options); + } + + internal static EndpointListResult DeserializeEndpointListResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList value = default; + Uri nextLink = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(EndpointData.DeserializeEndpointData(item, options)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nextLink = new Uri(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new EndpointListResult(value, nextLink, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(EndpointListResult)} does not support writing '{options.Format}' format."); + } + } + + EndpointListResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeEndpointListResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(EndpointListResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/Models/EndpointListResult.cs b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/Models/EndpointListResult.cs new file mode 100644 index 000000000000..b8475a400a97 --- /dev/null +++ b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/Models/EndpointListResult.cs @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Azure.ResourceManager.NeonPostgres.Models +{ + /// The response of a Endpoint list operation. + internal partial class EndpointListResult + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The Endpoint items on this page. + /// is null. + internal EndpointListResult(IEnumerable value) + { + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); + } + + /// Initializes a new instance of . + /// The Endpoint items on this page. + /// The link to the next page of items. + /// Keeps track of any properties unknown to the library. + internal EndpointListResult(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) + { + Value = value; + NextLink = nextLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal EndpointListResult() + { + } + + /// The Endpoint items on this page. + public IReadOnlyList Value { get; } + /// The link to the next page of items. + public Uri NextLink { get; } + } +} diff --git a/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/Models/EndpointProperties.Serialization.cs b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/Models/EndpointProperties.Serialization.cs new file mode 100644 index 000000000000..aa501d932dd8 --- /dev/null +++ b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/Models/EndpointProperties.Serialization.cs @@ -0,0 +1,237 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.NeonPostgres.Models +{ + public partial class EndpointProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(EndpointProperties)} does not support writing '{format}' format."); + } + + if (options.Format != "W" && Optional.IsDefined(EntityId)) + { + writer.WritePropertyName("entityId"u8); + writer.WriteStringValue(EntityId); + } + if (Optional.IsDefined(EntityName)) + { + writer.WritePropertyName("entityName"u8); + writer.WriteStringValue(EntityName); + } + if (options.Format != "W" && Optional.IsDefined(CreatedAt)) + { + writer.WritePropertyName("createdAt"u8); + writer.WriteStringValue(CreatedAt); + } + if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) + { + writer.WritePropertyName("provisioningState"u8); + writer.WriteStringValue(ProvisioningState.Value.ToString()); + } + if (Optional.IsCollectionDefined(Attributes)) + { + writer.WritePropertyName("attributes"u8); + writer.WriteStartArray(); + foreach (var item in Attributes) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(ProjectId)) + { + writer.WritePropertyName("projectId"u8); + writer.WriteStringValue(ProjectId); + } + if (Optional.IsDefined(BranchId)) + { + writer.WritePropertyName("branchId"u8); + writer.WriteStringValue(BranchId); + } + if (Optional.IsDefined(EndpointType)) + { + writer.WritePropertyName("endpointType"u8); + writer.WriteStringValue(EndpointType.Value.ToString()); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + EndpointProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(EndpointProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeEndpointProperties(document.RootElement, options); + } + + internal static EndpointProperties DeserializeEndpointProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string entityId = default; + string entityName = default; + string createdAt = default; + NeonResourceProvisioningState? provisioningState = default; + IList attributes = default; + string projectId = default; + string branchId = default; + EndpointType? endpointType = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("entityId"u8)) + { + entityId = property.Value.GetString(); + continue; + } + if (property.NameEquals("entityName"u8)) + { + entityName = property.Value.GetString(); + continue; + } + if (property.NameEquals("createdAt"u8)) + { + createdAt = property.Value.GetString(); + continue; + } + if (property.NameEquals("provisioningState"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + provisioningState = new NeonResourceProvisioningState(property.Value.GetString()); + continue; + } + if (property.NameEquals("attributes"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(Models.Attributes.DeserializeAttributes(item, options)); + } + attributes = array; + continue; + } + if (property.NameEquals("projectId"u8)) + { + projectId = property.Value.GetString(); + continue; + } + if (property.NameEquals("branchId"u8)) + { + branchId = property.Value.GetString(); + continue; + } + if (property.NameEquals("endpointType"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + endpointType = new EndpointType(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new EndpointProperties( + entityId, + entityName, + createdAt, + provisioningState, + attributes ?? new ChangeTrackingList(), + projectId, + branchId, + endpointType, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(EndpointProperties)} does not support writing '{options.Format}' format."); + } + } + + EndpointProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeEndpointProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(EndpointProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/Models/EndpointProperties.cs b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/Models/EndpointProperties.cs new file mode 100644 index 000000000000..77cd2eb4a655 --- /dev/null +++ b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/Models/EndpointProperties.cs @@ -0,0 +1,94 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.NeonPostgres.Models +{ + /// Properties specific to Endpoints. + public partial class EndpointProperties + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public EndpointProperties() + { + Attributes = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// Unique identifier for the entity. + /// Name of the resource. + /// Timestamp indicating when the entity was created. + /// Provisioning state of the resource. + /// Additional attributes for the entity. + /// The ID of the project this endpoint belongs to. + /// The ID of the branch this endpoint belongs to. + /// The type of the endpoint. + /// Keeps track of any properties unknown to the library. + internal EndpointProperties(string entityId, string entityName, string createdAt, NeonResourceProvisioningState? provisioningState, IList attributes, string projectId, string branchId, EndpointType? endpointType, IDictionary serializedAdditionalRawData) + { + EntityId = entityId; + EntityName = entityName; + CreatedAt = createdAt; + ProvisioningState = provisioningState; + Attributes = attributes; + ProjectId = projectId; + BranchId = branchId; + EndpointType = endpointType; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Unique identifier for the entity. + public string EntityId { get; } + /// Name of the resource. + public string EntityName { get; set; } + /// Timestamp indicating when the entity was created. + public string CreatedAt { get; } + /// Provisioning state of the resource. + public NeonResourceProvisioningState? ProvisioningState { get; } + /// Additional attributes for the entity. + public IList Attributes { get; } + /// The ID of the project this endpoint belongs to. + public string ProjectId { get; set; } + /// The ID of the branch this endpoint belongs to. + public string BranchId { get; set; } + /// The type of the endpoint. + public EndpointType? EndpointType { get; set; } + } +} diff --git a/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/Models/EndpointType.cs b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/Models/EndpointType.cs new file mode 100644 index 000000000000..eeffb601434b --- /dev/null +++ b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/Models/EndpointType.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.NeonPostgres.Models +{ + /// The compute endpoint type. Either read_write or read_only. + public readonly partial struct EndpointType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public EndpointType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string ReadOnlyValue = "read_only"; + private const string ReadWriteValue = "read_write"; + + /// ReadOnly compute endpoint type. + public static EndpointType ReadOnly { get; } = new EndpointType(ReadOnlyValue); + /// ReadWrite compute endpoint type. + public static EndpointType ReadWrite { get; } = new EndpointType(ReadWriteValue); + /// Determines if two values are the same. + public static bool operator ==(EndpointType left, EndpointType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(EndpointType left, EndpointType right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator EndpointType(string value) => new EndpointType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is EndpointType other && Equals(other); + /// + public bool Equals(EndpointType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/Models/NeonDatabaseListResult.Serialization.cs b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/Models/NeonDatabaseListResult.Serialization.cs new file mode 100644 index 000000000000..ad8612b934b4 --- /dev/null +++ b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/Models/NeonDatabaseListResult.Serialization.cs @@ -0,0 +1,151 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.NeonPostgres.Models +{ + internal partial class NeonDatabaseListResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(NeonDatabaseListResult)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("value"u8); + writer.WriteStartArray(); + foreach (var item in Value) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + if (Optional.IsDefined(NextLink)) + { + writer.WritePropertyName("nextLink"u8); + writer.WriteStringValue(NextLink.AbsoluteUri); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + NeonDatabaseListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(NeonDatabaseListResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeNeonDatabaseListResult(document.RootElement, options); + } + + internal static NeonDatabaseListResult DeserializeNeonDatabaseListResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList value = default; + Uri nextLink = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(NeonDatabaseData.DeserializeNeonDatabaseData(item, options)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nextLink = new Uri(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new NeonDatabaseListResult(value, nextLink, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(NeonDatabaseListResult)} does not support writing '{options.Format}' format."); + } + } + + NeonDatabaseListResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeNeonDatabaseListResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(NeonDatabaseListResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/Models/NeonDatabaseListResult.cs b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/Models/NeonDatabaseListResult.cs new file mode 100644 index 000000000000..40a7670ee975 --- /dev/null +++ b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/Models/NeonDatabaseListResult.cs @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Azure.ResourceManager.NeonPostgres.Models +{ + /// The response of a NeonDatabase list operation. + internal partial class NeonDatabaseListResult + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The NeonDatabase items on this page. + /// is null. + internal NeonDatabaseListResult(IEnumerable value) + { + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); + } + + /// Initializes a new instance of . + /// The NeonDatabase items on this page. + /// The link to the next page of items. + /// Keeps track of any properties unknown to the library. + internal NeonDatabaseListResult(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) + { + Value = value; + NextLink = nextLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal NeonDatabaseListResult() + { + } + + /// The NeonDatabase items on this page. + public IReadOnlyList Value { get; } + /// The link to the next page of items. + public Uri NextLink { get; } + } +} diff --git a/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/Models/NeonDatabaseProperties.Serialization.cs b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/Models/NeonDatabaseProperties.Serialization.cs new file mode 100644 index 000000000000..9a9fb45a241e --- /dev/null +++ b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/Models/NeonDatabaseProperties.Serialization.cs @@ -0,0 +1,221 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.NeonPostgres.Models +{ + public partial class NeonDatabaseProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(NeonDatabaseProperties)} does not support writing '{format}' format."); + } + + if (options.Format != "W" && Optional.IsDefined(EntityId)) + { + writer.WritePropertyName("entityId"u8); + writer.WriteStringValue(EntityId); + } + if (Optional.IsDefined(EntityName)) + { + writer.WritePropertyName("entityName"u8); + writer.WriteStringValue(EntityName); + } + if (options.Format != "W" && Optional.IsDefined(CreatedAt)) + { + writer.WritePropertyName("createdAt"u8); + writer.WriteStringValue(CreatedAt); + } + if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) + { + writer.WritePropertyName("provisioningState"u8); + writer.WriteStringValue(ProvisioningState.Value.ToString()); + } + if (Optional.IsCollectionDefined(Attributes)) + { + writer.WritePropertyName("attributes"u8); + writer.WriteStartArray(); + foreach (var item in Attributes) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(BranchId)) + { + writer.WritePropertyName("branchId"u8); + writer.WriteStringValue(BranchId); + } + if (Optional.IsDefined(OwnerName)) + { + writer.WritePropertyName("ownerName"u8); + writer.WriteStringValue(OwnerName); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + NeonDatabaseProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(NeonDatabaseProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeNeonDatabaseProperties(document.RootElement, options); + } + + internal static NeonDatabaseProperties DeserializeNeonDatabaseProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string entityId = default; + string entityName = default; + string createdAt = default; + NeonResourceProvisioningState? provisioningState = default; + IList attributes = default; + string branchId = default; + string ownerName = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("entityId"u8)) + { + entityId = property.Value.GetString(); + continue; + } + if (property.NameEquals("entityName"u8)) + { + entityName = property.Value.GetString(); + continue; + } + if (property.NameEquals("createdAt"u8)) + { + createdAt = property.Value.GetString(); + continue; + } + if (property.NameEquals("provisioningState"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + provisioningState = new NeonResourceProvisioningState(property.Value.GetString()); + continue; + } + if (property.NameEquals("attributes"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(Models.Attributes.DeserializeAttributes(item, options)); + } + attributes = array; + continue; + } + if (property.NameEquals("branchId"u8)) + { + branchId = property.Value.GetString(); + continue; + } + if (property.NameEquals("ownerName"u8)) + { + ownerName = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new NeonDatabaseProperties( + entityId, + entityName, + createdAt, + provisioningState, + attributes ?? new ChangeTrackingList(), + branchId, + ownerName, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(NeonDatabaseProperties)} does not support writing '{options.Format}' format."); + } + } + + NeonDatabaseProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeNeonDatabaseProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(NeonDatabaseProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/Models/NeonDatabaseProperties.cs b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/Models/NeonDatabaseProperties.cs new file mode 100644 index 000000000000..c156854ffa74 --- /dev/null +++ b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/Models/NeonDatabaseProperties.cs @@ -0,0 +1,90 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.NeonPostgres.Models +{ + /// Properties specific to Databases. + public partial class NeonDatabaseProperties + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public NeonDatabaseProperties() + { + Attributes = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// Unique identifier for the entity. + /// Name of the resource. + /// Timestamp indicating when the entity was created. + /// Provisioning state of the resource. + /// Additional attributes for the entity. + /// The ID of the branch this database belongs to. + /// The name of the role that owns the database. + /// Keeps track of any properties unknown to the library. + internal NeonDatabaseProperties(string entityId, string entityName, string createdAt, NeonResourceProvisioningState? provisioningState, IList attributes, string branchId, string ownerName, IDictionary serializedAdditionalRawData) + { + EntityId = entityId; + EntityName = entityName; + CreatedAt = createdAt; + ProvisioningState = provisioningState; + Attributes = attributes; + BranchId = branchId; + OwnerName = ownerName; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Unique identifier for the entity. + public string EntityId { get; } + /// Name of the resource. + public string EntityName { get; set; } + /// Timestamp indicating when the entity was created. + public string CreatedAt { get; } + /// Provisioning state of the resource. + public NeonResourceProvisioningState? ProvisioningState { get; } + /// Additional attributes for the entity. + public IList Attributes { get; } + /// The ID of the branch this database belongs to. + public string BranchId { get; set; } + /// The name of the role that owns the database. + public string OwnerName { get; set; } + } +} diff --git a/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/Models/NeonOrganizationProperties.Serialization.cs b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/Models/NeonOrganizationProperties.Serialization.cs index a4fc8025f83f..e3a5bcd0ce6f 100644 --- a/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/Models/NeonOrganizationProperties.Serialization.cs +++ b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/Models/NeonOrganizationProperties.Serialization.cs @@ -50,6 +50,11 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("partnerOrganizationProperties"u8); writer.WriteObjectValue(PartnerOrganizationProperties, options); } + if (Optional.IsDefined(ProjectProperties)) + { + writer.WritePropertyName("projectProperties"u8); + writer.WriteObjectValue(ProjectProperties, options); + } if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -92,6 +97,7 @@ internal static NeonOrganizationProperties DeserializeNeonOrganizationProperties NeonCompanyDetails companyDetails = default; NeonResourceProvisioningState? provisioningState = default; PartnerOrganizationProperties partnerOrganizationProperties = default; + ProjectProperties projectProperties = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -129,6 +135,15 @@ internal static NeonOrganizationProperties DeserializeNeonOrganizationProperties partnerOrganizationProperties = PartnerOrganizationProperties.DeserializePartnerOrganizationProperties(property.Value, options); continue; } + if (property.NameEquals("projectProperties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + projectProperties = ProjectProperties.DeserializeProjectProperties(property.Value, options); + continue; + } if (options.Format != "W") { rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); @@ -141,6 +156,7 @@ internal static NeonOrganizationProperties DeserializeNeonOrganizationProperties companyDetails, provisioningState, partnerOrganizationProperties, + projectProperties, serializedAdditionalRawData); } diff --git a/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/Models/NeonOrganizationProperties.cs b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/Models/NeonOrganizationProperties.cs index 90a25e7a9c58..ad634351c56c 100644 --- a/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/Models/NeonOrganizationProperties.cs +++ b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/Models/NeonOrganizationProperties.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.NeonPostgres.Models { - /// Properties specific to Data Organization resource. + /// Properties specific to Neon Organization resource. public partial class NeonOrganizationProperties { /// @@ -66,15 +66,17 @@ public NeonOrganizationProperties(NeonMarketplaceDetails marketplaceDetails, Neo /// Details of the user. /// Details of the company. /// Provisioning state of the resource. - /// Organization properties. + /// Neon Organization properties. + /// Neon Project Properties. /// Keeps track of any properties unknown to the library. - internal NeonOrganizationProperties(NeonMarketplaceDetails marketplaceDetails, NeonUserDetails userDetails, NeonCompanyDetails companyDetails, NeonResourceProvisioningState? provisioningState, PartnerOrganizationProperties partnerOrganizationProperties, IDictionary serializedAdditionalRawData) + internal NeonOrganizationProperties(NeonMarketplaceDetails marketplaceDetails, NeonUserDetails userDetails, NeonCompanyDetails companyDetails, NeonResourceProvisioningState? provisioningState, PartnerOrganizationProperties partnerOrganizationProperties, ProjectProperties projectProperties, IDictionary serializedAdditionalRawData) { MarketplaceDetails = marketplaceDetails; UserDetails = userDetails; CompanyDetails = companyDetails; ProvisioningState = provisioningState; PartnerOrganizationProperties = partnerOrganizationProperties; + ProjectProperties = projectProperties; _serializedAdditionalRawData = serializedAdditionalRawData; } @@ -91,7 +93,9 @@ internal NeonOrganizationProperties() public NeonCompanyDetails CompanyDetails { get; set; } /// Provisioning state of the resource. public NeonResourceProvisioningState? ProvisioningState { get; } - /// Organization properties. + /// Neon Organization properties. public PartnerOrganizationProperties PartnerOrganizationProperties { get; set; } + /// Neon Project Properties. + public ProjectProperties ProjectProperties { get; set; } } } diff --git a/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/Models/NeonRoleListResult.Serialization.cs b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/Models/NeonRoleListResult.Serialization.cs new file mode 100644 index 000000000000..17a286c67479 --- /dev/null +++ b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/Models/NeonRoleListResult.Serialization.cs @@ -0,0 +1,151 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.NeonPostgres.Models +{ + internal partial class NeonRoleListResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(NeonRoleListResult)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("value"u8); + writer.WriteStartArray(); + foreach (var item in Value) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + if (Optional.IsDefined(NextLink)) + { + writer.WritePropertyName("nextLink"u8); + writer.WriteStringValue(NextLink.AbsoluteUri); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + NeonRoleListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(NeonRoleListResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeNeonRoleListResult(document.RootElement, options); + } + + internal static NeonRoleListResult DeserializeNeonRoleListResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList value = default; + Uri nextLink = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(NeonRoleData.DeserializeNeonRoleData(item, options)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nextLink = new Uri(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new NeonRoleListResult(value, nextLink, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(NeonRoleListResult)} does not support writing '{options.Format}' format."); + } + } + + NeonRoleListResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeNeonRoleListResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(NeonRoleListResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/Models/NeonRoleListResult.cs b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/Models/NeonRoleListResult.cs new file mode 100644 index 000000000000..b4130ba1b902 --- /dev/null +++ b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/Models/NeonRoleListResult.cs @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Azure.ResourceManager.NeonPostgres.Models +{ + /// The response of a NeonRole list operation. + internal partial class NeonRoleListResult + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The NeonRole items on this page. + /// is null. + internal NeonRoleListResult(IEnumerable value) + { + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); + } + + /// Initializes a new instance of . + /// The NeonRole items on this page. + /// The link to the next page of items. + /// Keeps track of any properties unknown to the library. + internal NeonRoleListResult(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) + { + Value = value; + NextLink = nextLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal NeonRoleListResult() + { + } + + /// The NeonRole items on this page. + public IReadOnlyList Value { get; } + /// The link to the next page of items. + public Uri NextLink { get; } + } +} diff --git a/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/Models/NeonRoleProperties.Serialization.cs b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/Models/NeonRoleProperties.Serialization.cs new file mode 100644 index 000000000000..8931ed3bdb1d --- /dev/null +++ b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/Models/NeonRoleProperties.Serialization.cs @@ -0,0 +1,251 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.NeonPostgres.Models +{ + public partial class NeonRoleProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(NeonRoleProperties)} does not support writing '{format}' format."); + } + + if (options.Format != "W" && Optional.IsDefined(EntityId)) + { + writer.WritePropertyName("entityId"u8); + writer.WriteStringValue(EntityId); + } + if (Optional.IsDefined(EntityName)) + { + writer.WritePropertyName("entityName"u8); + writer.WriteStringValue(EntityName); + } + if (options.Format != "W" && Optional.IsDefined(CreatedAt)) + { + writer.WritePropertyName("createdAt"u8); + writer.WriteStringValue(CreatedAt); + } + if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) + { + writer.WritePropertyName("provisioningState"u8); + writer.WriteStringValue(ProvisioningState.Value.ToString()); + } + if (Optional.IsCollectionDefined(Attributes)) + { + writer.WritePropertyName("attributes"u8); + writer.WriteStartArray(); + foreach (var item in Attributes) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(BranchId)) + { + writer.WritePropertyName("branchId"u8); + writer.WriteStringValue(BranchId); + } + if (Optional.IsCollectionDefined(Permissions)) + { + writer.WritePropertyName("permissions"u8); + writer.WriteStartArray(); + foreach (var item in Permissions) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(IsSuperUser)) + { + writer.WritePropertyName("isSuperUser"u8); + writer.WriteBooleanValue(IsSuperUser.Value); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + NeonRoleProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(NeonRoleProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeNeonRoleProperties(document.RootElement, options); + } + + internal static NeonRoleProperties DeserializeNeonRoleProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string entityId = default; + string entityName = default; + string createdAt = default; + NeonResourceProvisioningState? provisioningState = default; + IList attributes = default; + string branchId = default; + IList permissions = default; + bool? isSuperUser = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("entityId"u8)) + { + entityId = property.Value.GetString(); + continue; + } + if (property.NameEquals("entityName"u8)) + { + entityName = property.Value.GetString(); + continue; + } + if (property.NameEquals("createdAt"u8)) + { + createdAt = property.Value.GetString(); + continue; + } + if (property.NameEquals("provisioningState"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + provisioningState = new NeonResourceProvisioningState(property.Value.GetString()); + continue; + } + if (property.NameEquals("attributes"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(Models.Attributes.DeserializeAttributes(item, options)); + } + attributes = array; + continue; + } + if (property.NameEquals("branchId"u8)) + { + branchId = property.Value.GetString(); + continue; + } + if (property.NameEquals("permissions"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + permissions = array; + continue; + } + if (property.NameEquals("isSuperUser"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isSuperUser = property.Value.GetBoolean(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new NeonRoleProperties( + entityId, + entityName, + createdAt, + provisioningState, + attributes ?? new ChangeTrackingList(), + branchId, + permissions ?? new ChangeTrackingList(), + isSuperUser, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(NeonRoleProperties)} does not support writing '{options.Format}' format."); + } + } + + NeonRoleProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeNeonRoleProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(NeonRoleProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/Models/NeonRoleProperties.cs b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/Models/NeonRoleProperties.cs new file mode 100644 index 000000000000..d19464e943da --- /dev/null +++ b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/Models/NeonRoleProperties.cs @@ -0,0 +1,95 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.NeonPostgres.Models +{ + /// Properties specific to Roles. + public partial class NeonRoleProperties + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public NeonRoleProperties() + { + Attributes = new ChangeTrackingList(); + Permissions = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// Unique identifier for the entity. + /// Name of the resource. + /// Timestamp indicating when the entity was created. + /// Provisioning state of the resource. + /// Additional attributes for the entity. + /// The ID of the branch this role belongs to. + /// Permissions assigned to the role. + /// Indicates whether the role has superuser privileges. + /// Keeps track of any properties unknown to the library. + internal NeonRoleProperties(string entityId, string entityName, string createdAt, NeonResourceProvisioningState? provisioningState, IList attributes, string branchId, IList permissions, bool? isSuperUser, IDictionary serializedAdditionalRawData) + { + EntityId = entityId; + EntityName = entityName; + CreatedAt = createdAt; + ProvisioningState = provisioningState; + Attributes = attributes; + BranchId = branchId; + Permissions = permissions; + IsSuperUser = isSuperUser; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Unique identifier for the entity. + public string EntityId { get; } + /// Name of the resource. + public string EntityName { get; set; } + /// Timestamp indicating when the entity was created. + public string CreatedAt { get; } + /// Provisioning state of the resource. + public NeonResourceProvisioningState? ProvisioningState { get; } + /// Additional attributes for the entity. + public IList Attributes { get; } + /// The ID of the branch this role belongs to. + public string BranchId { get; set; } + /// Permissions assigned to the role. + public IList Permissions { get; } + /// Indicates whether the role has superuser privileges. + public bool? IsSuperUser { get; set; } + } +} diff --git a/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/Models/PgVersion.Serialization.cs b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/Models/PgVersion.Serialization.cs new file mode 100644 index 000000000000..4e7d3b310594 --- /dev/null +++ b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/Models/PgVersion.Serialization.cs @@ -0,0 +1,133 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.NeonPostgres.Models +{ + public partial class PgVersion : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(PgVersion)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(Version)) + { + writer.WritePropertyName("version"u8); + writer.WriteNumberValue(Version.Value); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + PgVersion IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(PgVersion)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializePgVersion(document.RootElement, options); + } + + internal static PgVersion DeserializePgVersion(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + int? version = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("version"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + version = property.Value.GetInt32(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new PgVersion(version, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(PgVersion)} does not support writing '{options.Format}' format."); + } + } + + PgVersion IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializePgVersion(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(PgVersion)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/Models/PgVersion.cs b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/Models/PgVersion.cs new file mode 100644 index 000000000000..ece8eba8f59e --- /dev/null +++ b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/Models/PgVersion.cs @@ -0,0 +1,65 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.NeonPostgres.Models +{ + /// PostgreSQL Version model. + public partial class PgVersion + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public PgVersion() + { + } + + /// Initializes a new instance of . + /// The major PostgreSQL version number. + /// Keeps track of any properties unknown to the library. + internal PgVersion(int? version, IDictionary serializedAdditionalRawData) + { + Version = version; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The major PostgreSQL version number. + public int? Version { get; set; } + } +} diff --git a/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/Models/PgVersionsResult.Serialization.cs b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/Models/PgVersionsResult.Serialization.cs new file mode 100644 index 000000000000..800c3245dc86 --- /dev/null +++ b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/Models/PgVersionsResult.Serialization.cs @@ -0,0 +1,136 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.NeonPostgres.Models +{ + public partial class PgVersionsResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(PgVersionsResult)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("versions"u8); + writer.WriteStartArray(); + foreach (var item in Versions) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + PgVersionsResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(PgVersionsResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializePgVersionsResult(document.RootElement, options); + } + + internal static PgVersionsResult DeserializePgVersionsResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList versions = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("versions"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(PgVersion.DeserializePgVersion(item, options)); + } + versions = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new PgVersionsResult(versions, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(PgVersionsResult)} does not support writing '{options.Format}' format."); + } + } + + PgVersionsResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializePgVersionsResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(PgVersionsResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/Models/PgVersionsResult.cs b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/Models/PgVersionsResult.cs new file mode 100644 index 000000000000..deea19e022be --- /dev/null +++ b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/Models/PgVersionsResult.cs @@ -0,0 +1,76 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Azure.ResourceManager.NeonPostgres.Models +{ + /// Response model for PostgreSQL versions. + public partial class PgVersionsResult + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// List of PostgreSQL versions. + /// is null. + internal PgVersionsResult(IEnumerable versions) + { + Argument.AssertNotNull(versions, nameof(versions)); + + Versions = versions.ToList(); + } + + /// Initializes a new instance of . + /// List of PostgreSQL versions. + /// Keeps track of any properties unknown to the library. + internal PgVersionsResult(IReadOnlyList versions, IDictionary serializedAdditionalRawData) + { + Versions = versions; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal PgVersionsResult() + { + } + + /// List of PostgreSQL versions. + public IReadOnlyList Versions { get; } + } +} diff --git a/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/Models/ProjectListResult.Serialization.cs b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/Models/ProjectListResult.Serialization.cs new file mode 100644 index 000000000000..05ee8440c730 --- /dev/null +++ b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/Models/ProjectListResult.Serialization.cs @@ -0,0 +1,151 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.NeonPostgres.Models +{ + internal partial class ProjectListResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ProjectListResult)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("value"u8); + writer.WriteStartArray(); + foreach (var item in Value) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + if (Optional.IsDefined(NextLink)) + { + writer.WritePropertyName("nextLink"u8); + writer.WriteStringValue(NextLink.AbsoluteUri); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ProjectListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ProjectListResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeProjectListResult(document.RootElement, options); + } + + internal static ProjectListResult DeserializeProjectListResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList value = default; + Uri nextLink = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(ProjectData.DeserializeProjectData(item, options)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nextLink = new Uri(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ProjectListResult(value, nextLink, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ProjectListResult)} does not support writing '{options.Format}' format."); + } + } + + ProjectListResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeProjectListResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ProjectListResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/Models/ProjectListResult.cs b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/Models/ProjectListResult.cs new file mode 100644 index 000000000000..939c66f610d1 --- /dev/null +++ b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/Models/ProjectListResult.cs @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Azure.ResourceManager.NeonPostgres.Models +{ + /// The response of a Project list operation. + internal partial class ProjectListResult + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The Project items on this page. + /// is null. + internal ProjectListResult(IEnumerable value) + { + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); + } + + /// Initializes a new instance of . + /// The Project items on this page. + /// The link to the next page of items. + /// Keeps track of any properties unknown to the library. + internal ProjectListResult(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) + { + Value = value; + NextLink = nextLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal ProjectListResult() + { + } + + /// The Project items on this page. + public IReadOnlyList Value { get; } + /// The link to the next page of items. + public Uri NextLink { get; } + } +} diff --git a/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/Models/ProjectProperties.Serialization.cs b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/Models/ProjectProperties.Serialization.cs new file mode 100644 index 000000000000..5ff0e32a62f4 --- /dev/null +++ b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/Models/ProjectProperties.Serialization.cs @@ -0,0 +1,367 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.NeonPostgres.Models +{ + public partial class ProjectProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ProjectProperties)} does not support writing '{format}' format."); + } + + if (options.Format != "W" && Optional.IsDefined(EntityId)) + { + writer.WritePropertyName("entityId"u8); + writer.WriteStringValue(EntityId); + } + if (Optional.IsDefined(EntityName)) + { + writer.WritePropertyName("entityName"u8); + writer.WriteStringValue(EntityName); + } + if (options.Format != "W" && Optional.IsDefined(CreatedAt)) + { + writer.WritePropertyName("createdAt"u8); + writer.WriteStringValue(CreatedAt); + } + if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) + { + writer.WritePropertyName("provisioningState"u8); + writer.WriteStringValue(ProvisioningState.Value.ToString()); + } + if (Optional.IsCollectionDefined(Attributes)) + { + writer.WritePropertyName("attributes"u8); + writer.WriteStartArray(); + foreach (var item in Attributes) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(RegionId)) + { + writer.WritePropertyName("regionId"u8); + writer.WriteStringValue(RegionId); + } + if (Optional.IsDefined(Storage)) + { + writer.WritePropertyName("storage"u8); + writer.WriteNumberValue(Storage.Value); + } + if (Optional.IsDefined(PgVersion)) + { + writer.WritePropertyName("pgVersion"u8); + writer.WriteNumberValue(PgVersion.Value); + } + if (Optional.IsDefined(HistoryRetention)) + { + writer.WritePropertyName("historyRetention"u8); + writer.WriteNumberValue(HistoryRetention.Value); + } + if (Optional.IsDefined(DefaultEndpointSettings)) + { + writer.WritePropertyName("defaultEndpointSettings"u8); + writer.WriteObjectValue(DefaultEndpointSettings, options); + } + if (Optional.IsDefined(Branch)) + { + writer.WritePropertyName("branch"u8); + writer.WriteObjectValue(Branch, options); + } + if (Optional.IsCollectionDefined(Roles)) + { + writer.WritePropertyName("roles"u8); + writer.WriteStartArray(); + foreach (var item in Roles) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(Databases)) + { + writer.WritePropertyName("databases"u8); + writer.WriteStartArray(); + foreach (var item in Databases) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(Endpoints)) + { + writer.WritePropertyName("endpoints"u8); + writer.WriteStartArray(); + foreach (var item in Endpoints) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ProjectProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ProjectProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeProjectProperties(document.RootElement, options); + } + + internal static ProjectProperties DeserializeProjectProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string entityId = default; + string entityName = default; + string createdAt = default; + NeonResourceProvisioningState? provisioningState = default; + IList attributes = default; + string regionId = default; + long? storage = default; + int? pgVersion = default; + int? historyRetention = default; + DefaultEndpointSettings defaultEndpointSettings = default; + BranchProperties branch = default; + IList roles = default; + IList databases = default; + IList endpoints = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("entityId"u8)) + { + entityId = property.Value.GetString(); + continue; + } + if (property.NameEquals("entityName"u8)) + { + entityName = property.Value.GetString(); + continue; + } + if (property.NameEquals("createdAt"u8)) + { + createdAt = property.Value.GetString(); + continue; + } + if (property.NameEquals("provisioningState"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + provisioningState = new NeonResourceProvisioningState(property.Value.GetString()); + continue; + } + if (property.NameEquals("attributes"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(Models.Attributes.DeserializeAttributes(item, options)); + } + attributes = array; + continue; + } + if (property.NameEquals("regionId"u8)) + { + regionId = property.Value.GetString(); + continue; + } + if (property.NameEquals("storage"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + storage = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("pgVersion"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + pgVersion = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("historyRetention"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + historyRetention = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("defaultEndpointSettings"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + defaultEndpointSettings = DefaultEndpointSettings.DeserializeDefaultEndpointSettings(property.Value, options); + continue; + } + if (property.NameEquals("branch"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + branch = BranchProperties.DeserializeBranchProperties(property.Value, options); + continue; + } + if (property.NameEquals("roles"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(NeonRoleProperties.DeserializeNeonRoleProperties(item, options)); + } + roles = array; + continue; + } + if (property.NameEquals("databases"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(NeonDatabaseProperties.DeserializeNeonDatabaseProperties(item, options)); + } + databases = array; + continue; + } + if (property.NameEquals("endpoints"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(EndpointProperties.DeserializeEndpointProperties(item, options)); + } + endpoints = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ProjectProperties( + entityId, + entityName, + createdAt, + provisioningState, + attributes ?? new ChangeTrackingList(), + regionId, + storage, + pgVersion, + historyRetention, + defaultEndpointSettings, + branch, + roles ?? new ChangeTrackingList(), + databases ?? new ChangeTrackingList(), + endpoints ?? new ChangeTrackingList(), + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ProjectProperties)} does not support writing '{options.Format}' format."); + } + } + + ProjectProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeProjectProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ProjectProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/Models/ProjectProperties.cs b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/Models/ProjectProperties.cs new file mode 100644 index 000000000000..30b27f112c59 --- /dev/null +++ b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/Models/ProjectProperties.cs @@ -0,0 +1,121 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.NeonPostgres.Models +{ + /// Properties specific to Project. + public partial class ProjectProperties + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public ProjectProperties() + { + Attributes = new ChangeTrackingList(); + Roles = new ChangeTrackingList(); + Databases = new ChangeTrackingList(); + Endpoints = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// Unique identifier for the entity. + /// Name of the resource. + /// Timestamp indicating when the entity was created. + /// Provisioning state of the resource. + /// Additional attributes for the entity. + /// Region where the project is created. + /// Data Storage bytes per hour for the project. + /// Postgres version for the project. + /// The retention period for project history in seconds. + /// Default endpoint settings for the project. + /// The Branch properties of the project. This is optional. + /// Roles associated with the project. + /// Neon Databases associated with the project. + /// Endpoints associated with the project. + /// Keeps track of any properties unknown to the library. + internal ProjectProperties(string entityId, string entityName, string createdAt, NeonResourceProvisioningState? provisioningState, IList attributes, string regionId, long? storage, int? pgVersion, int? historyRetention, DefaultEndpointSettings defaultEndpointSettings, BranchProperties branch, IList roles, IList databases, IList endpoints, IDictionary serializedAdditionalRawData) + { + EntityId = entityId; + EntityName = entityName; + CreatedAt = createdAt; + ProvisioningState = provisioningState; + Attributes = attributes; + RegionId = regionId; + Storage = storage; + PgVersion = pgVersion; + HistoryRetention = historyRetention; + DefaultEndpointSettings = defaultEndpointSettings; + Branch = branch; + Roles = roles; + Databases = databases; + Endpoints = endpoints; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Unique identifier for the entity. + public string EntityId { get; } + /// Name of the resource. + public string EntityName { get; set; } + /// Timestamp indicating when the entity was created. + public string CreatedAt { get; } + /// Provisioning state of the resource. + public NeonResourceProvisioningState? ProvisioningState { get; } + /// Additional attributes for the entity. + public IList Attributes { get; } + /// Region where the project is created. + public string RegionId { get; set; } + /// Data Storage bytes per hour for the project. + public long? Storage { get; set; } + /// Postgres version for the project. + public int? PgVersion { get; set; } + /// The retention period for project history in seconds. + public int? HistoryRetention { get; set; } + /// Default endpoint settings for the project. + public DefaultEndpointSettings DefaultEndpointSettings { get; set; } + /// The Branch properties of the project. This is optional. + public BranchProperties Branch { get; set; } + /// Roles associated with the project. + public IList Roles { get; } + /// Neon Databases associated with the project. + public IList Databases { get; } + /// Endpoints associated with the project. + public IList Endpoints { get; } + } +} diff --git a/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/NeonDatabaseCollection.cs b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/NeonDatabaseCollection.cs new file mode 100644 index 000000000000..6c6e5bb61efa --- /dev/null +++ b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/NeonDatabaseCollection.cs @@ -0,0 +1,493 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Autorest.CSharp.Core; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.NeonPostgres +{ + /// + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get a instance call the GetNeonDatabases method from an instance of . + /// + public partial class NeonDatabaseCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _neonDatabaseClientDiagnostics; + private readonly NeonDatabasesRestOperations _neonDatabaseRestClient; + + /// Initializes a new instance of the class for mocking. + protected NeonDatabaseCollection() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the parent resource that is the target of operations. + internal NeonDatabaseCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _neonDatabaseClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.NeonPostgres", NeonDatabaseResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(NeonDatabaseResource.ResourceType, out string neonDatabaseApiVersion); + _neonDatabaseRestClient = new NeonDatabasesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, neonDatabaseApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != BranchResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, BranchResource.ResourceType), nameof(id)); + } + + /// + /// Create a NeonDatabase + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName}/branches/{branchName}/neonDatabases/{neonDatabaseName} + /// + /// + /// Operation Id + /// NeonDatabase_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The name of the NeonDatabase. + /// Resource create parameters. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string neonDatabaseName, NeonDatabaseData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(neonDatabaseName, nameof(neonDatabaseName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _neonDatabaseClientDiagnostics.CreateScope("NeonDatabaseCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _neonDatabaseRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, neonDatabaseName, data, cancellationToken).ConfigureAwait(false); + var operation = new NeonPostgresArmOperation(new NeonDatabaseOperationSource(Client), _neonDatabaseClientDiagnostics, Pipeline, _neonDatabaseRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, neonDatabaseName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Create a NeonDatabase + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName}/branches/{branchName}/neonDatabases/{neonDatabaseName} + /// + /// + /// Operation Id + /// NeonDatabase_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The name of the NeonDatabase. + /// Resource create parameters. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string neonDatabaseName, NeonDatabaseData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(neonDatabaseName, nameof(neonDatabaseName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _neonDatabaseClientDiagnostics.CreateScope("NeonDatabaseCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _neonDatabaseRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, neonDatabaseName, data, cancellationToken); + var operation = new NeonPostgresArmOperation(new NeonDatabaseOperationSource(Client), _neonDatabaseClientDiagnostics, Pipeline, _neonDatabaseRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, neonDatabaseName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a NeonDatabase + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName}/branches/{branchName}/neonDatabases/{neonDatabaseName} + /// + /// + /// Operation Id + /// NeonDatabase_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the NeonDatabase. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string neonDatabaseName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(neonDatabaseName, nameof(neonDatabaseName)); + + using var scope = _neonDatabaseClientDiagnostics.CreateScope("NeonDatabaseCollection.Get"); + scope.Start(); + try + { + var response = await _neonDatabaseRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, neonDatabaseName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new NeonDatabaseResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a NeonDatabase + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName}/branches/{branchName}/neonDatabases/{neonDatabaseName} + /// + /// + /// Operation Id + /// NeonDatabase_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the NeonDatabase. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string neonDatabaseName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(neonDatabaseName, nameof(neonDatabaseName)); + + using var scope = _neonDatabaseClientDiagnostics.CreateScope("NeonDatabaseCollection.Get"); + scope.Start(); + try + { + var response = _neonDatabaseRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, neonDatabaseName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new NeonDatabaseResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// List NeonDatabase resources by Branch + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName}/branches/{branchName}/neonDatabases + /// + /// + /// Operation Id + /// NeonDatabase_List + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _neonDatabaseRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _neonDatabaseRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new NeonDatabaseResource(Client, NeonDatabaseData.DeserializeNeonDatabaseData(e)), _neonDatabaseClientDiagnostics, Pipeline, "NeonDatabaseCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// List NeonDatabase resources by Branch + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName}/branches/{branchName}/neonDatabases + /// + /// + /// Operation Id + /// NeonDatabase_List + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _neonDatabaseRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _neonDatabaseRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new NeonDatabaseResource(Client, NeonDatabaseData.DeserializeNeonDatabaseData(e)), _neonDatabaseClientDiagnostics, Pipeline, "NeonDatabaseCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName}/branches/{branchName}/neonDatabases/{neonDatabaseName} + /// + /// + /// Operation Id + /// NeonDatabase_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the NeonDatabase. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string neonDatabaseName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(neonDatabaseName, nameof(neonDatabaseName)); + + using var scope = _neonDatabaseClientDiagnostics.CreateScope("NeonDatabaseCollection.Exists"); + scope.Start(); + try + { + var response = await _neonDatabaseRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, neonDatabaseName, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName}/branches/{branchName}/neonDatabases/{neonDatabaseName} + /// + /// + /// Operation Id + /// NeonDatabase_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the NeonDatabase. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string neonDatabaseName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(neonDatabaseName, nameof(neonDatabaseName)); + + using var scope = _neonDatabaseClientDiagnostics.CreateScope("NeonDatabaseCollection.Exists"); + scope.Start(); + try + { + var response = _neonDatabaseRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, neonDatabaseName, cancellationToken: cancellationToken); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName}/branches/{branchName}/neonDatabases/{neonDatabaseName} + /// + /// + /// Operation Id + /// NeonDatabase_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the NeonDatabase. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetIfExistsAsync(string neonDatabaseName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(neonDatabaseName, nameof(neonDatabaseName)); + + using var scope = _neonDatabaseClientDiagnostics.CreateScope("NeonDatabaseCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _neonDatabaseRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, neonDatabaseName, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new NeonDatabaseResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName}/branches/{branchName}/neonDatabases/{neonDatabaseName} + /// + /// + /// Operation Id + /// NeonDatabase_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the NeonDatabase. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string neonDatabaseName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(neonDatabaseName, nameof(neonDatabaseName)); + + using var scope = _neonDatabaseClientDiagnostics.CreateScope("NeonDatabaseCollection.GetIfExists"); + scope.Start(); + try + { + var response = _neonDatabaseRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, neonDatabaseName, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new NeonDatabaseResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) + { + return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); + } + } +} diff --git a/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/NeonDatabaseData.Serialization.cs b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/NeonDatabaseData.Serialization.cs new file mode 100644 index 000000000000..64dcdf487f97 --- /dev/null +++ b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/NeonDatabaseData.Serialization.cs @@ -0,0 +1,155 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.Models; +using Azure.ResourceManager.NeonPostgres.Models; + +namespace Azure.ResourceManager.NeonPostgres +{ + public partial class NeonDatabaseData : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(NeonDatabaseData)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties, options); + } + } + + NeonDatabaseData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(NeonDatabaseData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeNeonDatabaseData(document.RootElement, options); + } + + internal static NeonDatabaseData DeserializeNeonDatabaseData(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + NeonDatabaseProperties properties = default; + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + SystemData systemData = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + properties = NeonDatabaseProperties.DeserializeNeonDatabaseProperties(property.Value, options); + continue; + } + if (property.NameEquals("id"u8)) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new NeonDatabaseData( + id, + name, + type, + systemData, + properties, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(NeonDatabaseData)} does not support writing '{options.Format}' format."); + } + } + + NeonDatabaseData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeNeonDatabaseData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(NeonDatabaseData)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/NeonDatabaseData.cs b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/NeonDatabaseData.cs new file mode 100644 index 000000000000..5ea8c17cbac3 --- /dev/null +++ b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/NeonDatabaseData.cs @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.Models; +using Azure.ResourceManager.NeonPostgres.Models; + +namespace Azure.ResourceManager.NeonPostgres +{ + /// + /// A class representing the NeonDatabase data model. + /// The Neon Database resource type. + /// + public partial class NeonDatabaseData : ResourceData + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public NeonDatabaseData() + { + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The resource-specific properties for this resource. + /// Keeps track of any properties unknown to the library. + internal NeonDatabaseData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, NeonDatabaseProperties properties, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + { + Properties = properties; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The resource-specific properties for this resource. + public NeonDatabaseProperties Properties { get; set; } + } +} diff --git a/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/NeonDatabaseResource.Serialization.cs b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/NeonDatabaseResource.Serialization.cs new file mode 100644 index 000000000000..0defd6d6acc4 --- /dev/null +++ b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/NeonDatabaseResource.Serialization.cs @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text.Json; + +namespace Azure.ResourceManager.NeonPostgres +{ + public partial class NeonDatabaseResource : IJsonModel + { + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + NeonDatabaseData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options); + + NeonDatabaseData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + } +} diff --git a/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/NeonDatabaseResource.cs b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/NeonDatabaseResource.cs new file mode 100644 index 000000000000..54b31f98c454 --- /dev/null +++ b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/NeonDatabaseResource.cs @@ -0,0 +1,353 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.NeonPostgres +{ + /// + /// A Class representing a NeonDatabase along with the instance operations that can be performed on it. + /// If you have a you can construct a + /// from an instance of using the GetNeonDatabaseResource method. + /// Otherwise you can get one from its parent resource using the GetNeonDatabase method. + /// + public partial class NeonDatabaseResource : ArmResource + { + /// Generate the resource identifier of a instance. + /// The subscriptionId. + /// The resourceGroupName. + /// The organizationName. + /// The projectName. + /// The branchName. + /// The neonDatabaseName. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string organizationName, string projectName, string branchName, string neonDatabaseName) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName}/branches/{branchName}/neonDatabases/{neonDatabaseName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _neonDatabaseClientDiagnostics; + private readonly NeonDatabasesRestOperations _neonDatabaseRestClient; + private readonly NeonDatabaseData _data; + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Neon.Postgres/organizations/projects/branches/neonDatabases"; + + /// Initializes a new instance of the class for mocking. + protected NeonDatabaseResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal NeonDatabaseResource(ArmClient client, NeonDatabaseData data) : this(client, data.Id) + { + HasData = true; + _data = data; + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the resource that is the target of operations. + internal NeonDatabaseResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _neonDatabaseClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.NeonPostgres", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string neonDatabaseApiVersion); + _neonDatabaseRestClient = new NeonDatabasesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, neonDatabaseApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets whether or not the current instance has data. + public virtual bool HasData { get; } + + /// Gets the data representing this Feature. + /// Throws if there is no data loaded in the current instance. + public virtual NeonDatabaseData Data + { + get + { + if (!HasData) + throw new InvalidOperationException("The current instance does not have data, you must call Get first."); + return _data; + } + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); + } + + /// + /// Get a NeonDatabase + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName}/branches/{branchName}/neonDatabases/{neonDatabaseName} + /// + /// + /// Operation Id + /// NeonDatabase_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _neonDatabaseClientDiagnostics.CreateScope("NeonDatabaseResource.Get"); + scope.Start(); + try + { + var response = await _neonDatabaseRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new NeonDatabaseResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a NeonDatabase + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName}/branches/{branchName}/neonDatabases/{neonDatabaseName} + /// + /// + /// Operation Id + /// NeonDatabase_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _neonDatabaseClientDiagnostics.CreateScope("NeonDatabaseResource.Get"); + scope.Start(); + try + { + var response = _neonDatabaseRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new NeonDatabaseResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete a NeonDatabase + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName}/branches/{branchName}/neonDatabases/{neonDatabaseName} + /// + /// + /// Operation Id + /// NeonDatabase_Delete + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _neonDatabaseClientDiagnostics.CreateScope("NeonDatabaseResource.Delete"); + scope.Start(); + try + { + var response = await _neonDatabaseRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var uri = _neonDatabaseRestClient.CreateDeleteRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Delete, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new NeonPostgresArmOperation(response, rehydrationToken); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete a NeonDatabase + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName}/branches/{branchName}/neonDatabases/{neonDatabaseName} + /// + /// + /// Operation Id + /// NeonDatabase_Delete + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _neonDatabaseClientDiagnostics.CreateScope("NeonDatabaseResource.Delete"); + scope.Start(); + try + { + var response = _neonDatabaseRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); + var uri = _neonDatabaseRestClient.CreateDeleteRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Delete, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new NeonPostgresArmOperation(response, rehydrationToken); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Update a NeonDatabase + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName}/branches/{branchName}/neonDatabases/{neonDatabaseName} + /// + /// + /// Operation Id + /// NeonDatabase_Update + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The resource properties to be updated. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(WaitUntil waitUntil, NeonDatabaseData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _neonDatabaseClientDiagnostics.CreateScope("NeonDatabaseResource.Update"); + scope.Start(); + try + { + var response = await _neonDatabaseRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data, cancellationToken).ConfigureAwait(false); + var operation = new NeonPostgresArmOperation(new NeonDatabaseOperationSource(Client), _neonDatabaseClientDiagnostics, Pipeline, _neonDatabaseRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Update a NeonDatabase + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName}/branches/{branchName}/neonDatabases/{neonDatabaseName} + /// + /// + /// Operation Id + /// NeonDatabase_Update + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The resource properties to be updated. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation Update(WaitUntil waitUntil, NeonDatabaseData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _neonDatabaseClientDiagnostics.CreateScope("NeonDatabaseResource.Update"); + scope.Start(); + try + { + var response = _neonDatabaseRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data, cancellationToken); + var operation = new NeonPostgresArmOperation(new NeonDatabaseOperationSource(Client), _neonDatabaseClientDiagnostics, Pipeline, _neonDatabaseRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/NeonOrganizationCollection.cs b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/NeonOrganizationCollection.cs index 29184c380db9..c4259daa0a47 100644 --- a/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/NeonOrganizationCollection.cs +++ b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/NeonOrganizationCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-08-01-preview + /// 2025-03-01 /// /// /// Resource @@ -114,7 +114,7 @@ public virtual async Task> CreateOrUpdate /// /// /// Default Api Version - /// 2024-08-01-preview + /// 2025-03-01 /// /// /// Resource @@ -163,7 +163,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil w /// /// /// Default Api Version - /// 2024-08-01-preview + /// 2025-03-01 /// /// /// Resource @@ -208,7 +208,7 @@ public virtual async Task> GetAsync(string or /// /// /// Default Api Version - /// 2024-08-01-preview + /// 2025-03-01 /// /// /// Resource @@ -253,7 +253,7 @@ public virtual Response Get(string organizationName, C /// /// /// Default Api Version - /// 2024-08-01-preview + /// 2025-03-01 /// /// /// Resource @@ -283,7 +283,7 @@ public virtual AsyncPageable GetAllAsync(CancellationT /// /// /// Default Api Version - /// 2024-08-01-preview + /// 2025-03-01 /// /// /// Resource @@ -313,7 +313,7 @@ public virtual Pageable GetAll(CancellationToken cance /// /// /// Default Api Version - /// 2024-08-01-preview + /// 2025-03-01 /// /// /// Resource @@ -356,7 +356,7 @@ public virtual async Task> ExistsAsync(string organizationName, C /// /// /// Default Api Version - /// 2024-08-01-preview + /// 2025-03-01 /// /// /// Resource @@ -399,7 +399,7 @@ public virtual Response Exists(string organizationName, CancellationToken /// /// /// Default Api Version - /// 2024-08-01-preview + /// 2025-03-01 /// /// /// Resource @@ -444,7 +444,7 @@ public virtual async Task> GetIfExist /// /// /// Default Api Version - /// 2024-08-01-preview + /// 2025-03-01 /// /// /// Resource diff --git a/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/NeonOrganizationResource.cs b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/NeonOrganizationResource.cs index ac4517a26e4a..e1cc6035b1fc 100644 --- a/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/NeonOrganizationResource.cs +++ b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/NeonOrganizationResource.cs @@ -89,6 +89,75 @@ internal static void ValidateResourceId(ResourceIdentifier id) throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); } + /// Gets a collection of ProjectResources in the NeonOrganization. + /// An object representing collection of ProjectResources and their operations over a ProjectResource. + public virtual ProjectCollection GetProjects() + { + return GetCachedClient(client => new ProjectCollection(client, Id)); + } + + /// + /// Get a Project + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName} + /// + /// + /// Operation Id + /// Project_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Project. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetProjectAsync(string projectName, CancellationToken cancellationToken = default) + { + return await GetProjects().GetAsync(projectName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get a Project + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName} + /// + /// + /// Operation Id + /// Project_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Project. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetProject(string projectName, CancellationToken cancellationToken = default) + { + return GetProjects().Get(projectName, cancellationToken); + } + /// /// Get a OrganizationResource /// @@ -102,7 +171,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-08-01-preview + /// 2025-03-01 /// /// /// Resource @@ -142,7 +211,7 @@ public virtual async Task> GetAsync(Cancellat /// /// /// Default Api Version - /// 2024-08-01-preview + /// 2025-03-01 /// /// /// Resource @@ -182,7 +251,7 @@ public virtual Response Get(CancellationToken cancella /// /// /// Default Api Version - /// 2024-08-01-preview + /// 2025-03-01 /// /// /// Resource @@ -224,7 +293,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2024-08-01-preview + /// 2025-03-01 /// /// /// Resource @@ -266,7 +335,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2024-08-01-preview + /// 2025-03-01 /// /// /// Resource @@ -312,7 +381,7 @@ public virtual async Task> UpdateAsync(Wa /// /// /// Default Api Version - /// 2024-08-01-preview + /// 2025-03-01 /// /// /// Resource @@ -358,7 +427,7 @@ public virtual ArmOperation Update(WaitUntil waitUntil /// /// /// Default Api Version - /// 2024-08-01-preview + /// 2025-03-01 /// /// /// Resource @@ -420,7 +489,7 @@ public virtual async Task> AddTagAsync(string /// /// /// Default Api Version - /// 2024-08-01-preview + /// 2025-03-01 /// /// /// Resource @@ -482,7 +551,7 @@ public virtual Response AddTag(string key, string valu /// /// /// Default Api Version - /// 2024-08-01-preview + /// 2025-03-01 /// /// /// Resource @@ -539,7 +608,7 @@ public virtual async Task> SetTagsAsync(IDict /// /// /// Default Api Version - /// 2024-08-01-preview + /// 2025-03-01 /// /// /// Resource @@ -596,7 +665,7 @@ public virtual Response SetTags(IDictionary /// /// Default Api Version - /// 2024-08-01-preview + /// 2025-03-01 /// /// /// Resource @@ -656,7 +725,7 @@ public virtual async Task> RemoveTagAsync(str /// /// /// Default Api Version - /// 2024-08-01-preview + /// 2025-03-01 /// /// /// Resource diff --git a/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/NeonRoleCollection.cs b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/NeonRoleCollection.cs new file mode 100644 index 000000000000..cbf7b17cca45 --- /dev/null +++ b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/NeonRoleCollection.cs @@ -0,0 +1,493 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Autorest.CSharp.Core; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.NeonPostgres +{ + /// + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get a instance call the GetNeonRoles method from an instance of . + /// + public partial class NeonRoleCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _neonRoleClientDiagnostics; + private readonly NeonRolesRestOperations _neonRoleRestClient; + + /// Initializes a new instance of the class for mocking. + protected NeonRoleCollection() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the parent resource that is the target of operations. + internal NeonRoleCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _neonRoleClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.NeonPostgres", NeonRoleResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(NeonRoleResource.ResourceType, out string neonRoleApiVersion); + _neonRoleRestClient = new NeonRolesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, neonRoleApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != BranchResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, BranchResource.ResourceType), nameof(id)); + } + + /// + /// Create a NeonRole + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName}/branches/{branchName}/neonRoles/{neonRoleName} + /// + /// + /// Operation Id + /// NeonRole_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The name of the NeonRole. + /// Resource create parameters. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string neonRoleName, NeonRoleData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(neonRoleName, nameof(neonRoleName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _neonRoleClientDiagnostics.CreateScope("NeonRoleCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _neonRoleRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, neonRoleName, data, cancellationToken).ConfigureAwait(false); + var operation = new NeonPostgresArmOperation(new NeonRoleOperationSource(Client), _neonRoleClientDiagnostics, Pipeline, _neonRoleRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, neonRoleName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Create a NeonRole + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName}/branches/{branchName}/neonRoles/{neonRoleName} + /// + /// + /// Operation Id + /// NeonRole_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The name of the NeonRole. + /// Resource create parameters. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string neonRoleName, NeonRoleData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(neonRoleName, nameof(neonRoleName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _neonRoleClientDiagnostics.CreateScope("NeonRoleCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _neonRoleRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, neonRoleName, data, cancellationToken); + var operation = new NeonPostgresArmOperation(new NeonRoleOperationSource(Client), _neonRoleClientDiagnostics, Pipeline, _neonRoleRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, neonRoleName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a NeonRole + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName}/branches/{branchName}/neonRoles/{neonRoleName} + /// + /// + /// Operation Id + /// NeonRole_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the NeonRole. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string neonRoleName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(neonRoleName, nameof(neonRoleName)); + + using var scope = _neonRoleClientDiagnostics.CreateScope("NeonRoleCollection.Get"); + scope.Start(); + try + { + var response = await _neonRoleRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, neonRoleName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new NeonRoleResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a NeonRole + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName}/branches/{branchName}/neonRoles/{neonRoleName} + /// + /// + /// Operation Id + /// NeonRole_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the NeonRole. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string neonRoleName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(neonRoleName, nameof(neonRoleName)); + + using var scope = _neonRoleClientDiagnostics.CreateScope("NeonRoleCollection.Get"); + scope.Start(); + try + { + var response = _neonRoleRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, neonRoleName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new NeonRoleResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// List NeonRole resources by Branch + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName}/branches/{branchName}/neonRoles + /// + /// + /// Operation Id + /// NeonRole_List + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _neonRoleRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _neonRoleRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new NeonRoleResource(Client, NeonRoleData.DeserializeNeonRoleData(e)), _neonRoleClientDiagnostics, Pipeline, "NeonRoleCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// List NeonRole resources by Branch + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName}/branches/{branchName}/neonRoles + /// + /// + /// Operation Id + /// NeonRole_List + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _neonRoleRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _neonRoleRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new NeonRoleResource(Client, NeonRoleData.DeserializeNeonRoleData(e)), _neonRoleClientDiagnostics, Pipeline, "NeonRoleCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName}/branches/{branchName}/neonRoles/{neonRoleName} + /// + /// + /// Operation Id + /// NeonRole_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the NeonRole. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string neonRoleName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(neonRoleName, nameof(neonRoleName)); + + using var scope = _neonRoleClientDiagnostics.CreateScope("NeonRoleCollection.Exists"); + scope.Start(); + try + { + var response = await _neonRoleRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, neonRoleName, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName}/branches/{branchName}/neonRoles/{neonRoleName} + /// + /// + /// Operation Id + /// NeonRole_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the NeonRole. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string neonRoleName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(neonRoleName, nameof(neonRoleName)); + + using var scope = _neonRoleClientDiagnostics.CreateScope("NeonRoleCollection.Exists"); + scope.Start(); + try + { + var response = _neonRoleRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, neonRoleName, cancellationToken: cancellationToken); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName}/branches/{branchName}/neonRoles/{neonRoleName} + /// + /// + /// Operation Id + /// NeonRole_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the NeonRole. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetIfExistsAsync(string neonRoleName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(neonRoleName, nameof(neonRoleName)); + + using var scope = _neonRoleClientDiagnostics.CreateScope("NeonRoleCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _neonRoleRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, neonRoleName, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new NeonRoleResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName}/branches/{branchName}/neonRoles/{neonRoleName} + /// + /// + /// Operation Id + /// NeonRole_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the NeonRole. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string neonRoleName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(neonRoleName, nameof(neonRoleName)); + + using var scope = _neonRoleClientDiagnostics.CreateScope("NeonRoleCollection.GetIfExists"); + scope.Start(); + try + { + var response = _neonRoleRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, neonRoleName, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new NeonRoleResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) + { + return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); + } + } +} diff --git a/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/NeonRoleData.Serialization.cs b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/NeonRoleData.Serialization.cs new file mode 100644 index 000000000000..2e7407d61ac3 --- /dev/null +++ b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/NeonRoleData.Serialization.cs @@ -0,0 +1,155 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.Models; +using Azure.ResourceManager.NeonPostgres.Models; + +namespace Azure.ResourceManager.NeonPostgres +{ + public partial class NeonRoleData : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(NeonRoleData)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties, options); + } + } + + NeonRoleData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(NeonRoleData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeNeonRoleData(document.RootElement, options); + } + + internal static NeonRoleData DeserializeNeonRoleData(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + NeonRoleProperties properties = default; + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + SystemData systemData = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + properties = NeonRoleProperties.DeserializeNeonRoleProperties(property.Value, options); + continue; + } + if (property.NameEquals("id"u8)) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new NeonRoleData( + id, + name, + type, + systemData, + properties, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(NeonRoleData)} does not support writing '{options.Format}' format."); + } + } + + NeonRoleData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeNeonRoleData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(NeonRoleData)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/NeonRoleData.cs b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/NeonRoleData.cs new file mode 100644 index 000000000000..f40f18133a1d --- /dev/null +++ b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/NeonRoleData.cs @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.Models; +using Azure.ResourceManager.NeonPostgres.Models; + +namespace Azure.ResourceManager.NeonPostgres +{ + /// + /// A class representing the NeonRole data model. + /// The Neon Role resource type. + /// + public partial class NeonRoleData : ResourceData + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public NeonRoleData() + { + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The resource-specific properties for this resource. + /// Keeps track of any properties unknown to the library. + internal NeonRoleData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, NeonRoleProperties properties, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + { + Properties = properties; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The resource-specific properties for this resource. + public NeonRoleProperties Properties { get; set; } + } +} diff --git a/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/NeonRoleResource.Serialization.cs b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/NeonRoleResource.Serialization.cs new file mode 100644 index 000000000000..13c6c17c0a84 --- /dev/null +++ b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/NeonRoleResource.Serialization.cs @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text.Json; + +namespace Azure.ResourceManager.NeonPostgres +{ + public partial class NeonRoleResource : IJsonModel + { + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + NeonRoleData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options); + + NeonRoleData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + } +} diff --git a/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/NeonRoleResource.cs b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/NeonRoleResource.cs new file mode 100644 index 000000000000..c61b903a5ef7 --- /dev/null +++ b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/NeonRoleResource.cs @@ -0,0 +1,353 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.NeonPostgres +{ + /// + /// A Class representing a NeonRole along with the instance operations that can be performed on it. + /// If you have a you can construct a + /// from an instance of using the GetNeonRoleResource method. + /// Otherwise you can get one from its parent resource using the GetNeonRole method. + /// + public partial class NeonRoleResource : ArmResource + { + /// Generate the resource identifier of a instance. + /// The subscriptionId. + /// The resourceGroupName. + /// The organizationName. + /// The projectName. + /// The branchName. + /// The neonRoleName. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string organizationName, string projectName, string branchName, string neonRoleName) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName}/branches/{branchName}/neonRoles/{neonRoleName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _neonRoleClientDiagnostics; + private readonly NeonRolesRestOperations _neonRoleRestClient; + private readonly NeonRoleData _data; + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Neon.Postgres/organizations/projects/branches/neonRoles"; + + /// Initializes a new instance of the class for mocking. + protected NeonRoleResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal NeonRoleResource(ArmClient client, NeonRoleData data) : this(client, data.Id) + { + HasData = true; + _data = data; + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the resource that is the target of operations. + internal NeonRoleResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _neonRoleClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.NeonPostgres", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string neonRoleApiVersion); + _neonRoleRestClient = new NeonRolesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, neonRoleApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets whether or not the current instance has data. + public virtual bool HasData { get; } + + /// Gets the data representing this Feature. + /// Throws if there is no data loaded in the current instance. + public virtual NeonRoleData Data + { + get + { + if (!HasData) + throw new InvalidOperationException("The current instance does not have data, you must call Get first."); + return _data; + } + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); + } + + /// + /// Get a NeonRole + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName}/branches/{branchName}/neonRoles/{neonRoleName} + /// + /// + /// Operation Id + /// NeonRole_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _neonRoleClientDiagnostics.CreateScope("NeonRoleResource.Get"); + scope.Start(); + try + { + var response = await _neonRoleRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new NeonRoleResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a NeonRole + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName}/branches/{branchName}/neonRoles/{neonRoleName} + /// + /// + /// Operation Id + /// NeonRole_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _neonRoleClientDiagnostics.CreateScope("NeonRoleResource.Get"); + scope.Start(); + try + { + var response = _neonRoleRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new NeonRoleResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete a NeonRole + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName}/branches/{branchName}/neonRoles/{neonRoleName} + /// + /// + /// Operation Id + /// NeonRole_Delete + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _neonRoleClientDiagnostics.CreateScope("NeonRoleResource.Delete"); + scope.Start(); + try + { + var response = await _neonRoleRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var uri = _neonRoleRestClient.CreateDeleteRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Delete, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new NeonPostgresArmOperation(response, rehydrationToken); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete a NeonRole + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName}/branches/{branchName}/neonRoles/{neonRoleName} + /// + /// + /// Operation Id + /// NeonRole_Delete + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _neonRoleClientDiagnostics.CreateScope("NeonRoleResource.Delete"); + scope.Start(); + try + { + var response = _neonRoleRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); + var uri = _neonRoleRestClient.CreateDeleteRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Delete, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new NeonPostgresArmOperation(response, rehydrationToken); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Update a NeonRole + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName}/branches/{branchName}/neonRoles/{neonRoleName} + /// + /// + /// Operation Id + /// NeonRole_Update + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The resource properties to be updated. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(WaitUntil waitUntil, NeonRoleData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _neonRoleClientDiagnostics.CreateScope("NeonRoleResource.Update"); + scope.Start(); + try + { + var response = await _neonRoleRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data, cancellationToken).ConfigureAwait(false); + var operation = new NeonPostgresArmOperation(new NeonRoleOperationSource(Client), _neonRoleClientDiagnostics, Pipeline, _neonRoleRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Update a NeonRole + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName}/branches/{branchName}/neonRoles/{neonRoleName} + /// + /// + /// Operation Id + /// NeonRole_Update + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The resource properties to be updated. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation Update(WaitUntil waitUntil, NeonRoleData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _neonRoleClientDiagnostics.CreateScope("NeonRoleResource.Update"); + scope.Start(); + try + { + var response = _neonRoleRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data, cancellationToken); + var operation = new NeonPostgresArmOperation(new NeonRoleOperationSource(Client), _neonRoleClientDiagnostics, Pipeline, _neonRoleRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/ProjectCollection.cs b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/ProjectCollection.cs new file mode 100644 index 000000000000..638454ab0ed7 --- /dev/null +++ b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/ProjectCollection.cs @@ -0,0 +1,493 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Autorest.CSharp.Core; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.NeonPostgres +{ + /// + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get a instance call the GetProjects method from an instance of . + /// + public partial class ProjectCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _projectClientDiagnostics; + private readonly ProjectsRestOperations _projectRestClient; + + /// Initializes a new instance of the class for mocking. + protected ProjectCollection() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the parent resource that is the target of operations. + internal ProjectCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _projectClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.NeonPostgres", ProjectResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ProjectResource.ResourceType, out string projectApiVersion); + _projectRestClient = new ProjectsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, projectApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != NeonOrganizationResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, NeonOrganizationResource.ResourceType), nameof(id)); + } + + /// + /// Create a Project + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName} + /// + /// + /// Operation Id + /// Project_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The name of the Project. + /// Resource create parameters. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string projectName, ProjectData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _projectClientDiagnostics.CreateScope("ProjectCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _projectRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, projectName, data, cancellationToken).ConfigureAwait(false); + var operation = new NeonPostgresArmOperation(new ProjectOperationSource(Client), _projectClientDiagnostics, Pipeline, _projectRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, projectName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Create a Project + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName} + /// + /// + /// Operation Id + /// Project_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The name of the Project. + /// Resource create parameters. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string projectName, ProjectData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _projectClientDiagnostics.CreateScope("ProjectCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _projectRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, projectName, data, cancellationToken); + var operation = new NeonPostgresArmOperation(new ProjectOperationSource(Client), _projectClientDiagnostics, Pipeline, _projectRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, projectName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a Project + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName} + /// + /// + /// Operation Id + /// Project_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Project. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string projectName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + + using var scope = _projectClientDiagnostics.CreateScope("ProjectCollection.Get"); + scope.Start(); + try + { + var response = await _projectRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, projectName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new ProjectResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a Project + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName} + /// + /// + /// Operation Id + /// Project_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Project. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string projectName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + + using var scope = _projectClientDiagnostics.CreateScope("ProjectCollection.Get"); + scope.Start(); + try + { + var response = _projectRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, projectName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new ProjectResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// List Project resources by OrganizationResource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects + /// + /// + /// Operation Id + /// Project_List + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _projectRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _projectRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new ProjectResource(Client, ProjectData.DeserializeProjectData(e)), _projectClientDiagnostics, Pipeline, "ProjectCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// List Project resources by OrganizationResource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects + /// + /// + /// Operation Id + /// Project_List + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _projectRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _projectRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new ProjectResource(Client, ProjectData.DeserializeProjectData(e)), _projectClientDiagnostics, Pipeline, "ProjectCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName} + /// + /// + /// Operation Id + /// Project_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Project. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string projectName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + + using var scope = _projectClientDiagnostics.CreateScope("ProjectCollection.Exists"); + scope.Start(); + try + { + var response = await _projectRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, projectName, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName} + /// + /// + /// Operation Id + /// Project_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Project. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string projectName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + + using var scope = _projectClientDiagnostics.CreateScope("ProjectCollection.Exists"); + scope.Start(); + try + { + var response = _projectRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, projectName, cancellationToken: cancellationToken); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName} + /// + /// + /// Operation Id + /// Project_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Project. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetIfExistsAsync(string projectName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + + using var scope = _projectClientDiagnostics.CreateScope("ProjectCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _projectRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, projectName, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new ProjectResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName} + /// + /// + /// Operation Id + /// Project_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Project. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string projectName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + + using var scope = _projectClientDiagnostics.CreateScope("ProjectCollection.GetIfExists"); + scope.Start(); + try + { + var response = _projectRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, projectName, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new ProjectResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) + { + return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); + } + } +} diff --git a/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/ProjectData.Serialization.cs b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/ProjectData.Serialization.cs new file mode 100644 index 000000000000..92c23ce3d306 --- /dev/null +++ b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/ProjectData.Serialization.cs @@ -0,0 +1,155 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.Models; +using Azure.ResourceManager.NeonPostgres.Models; + +namespace Azure.ResourceManager.NeonPostgres +{ + public partial class ProjectData : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ProjectData)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties, options); + } + } + + ProjectData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ProjectData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeProjectData(document.RootElement, options); + } + + internal static ProjectData DeserializeProjectData(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ProjectProperties properties = default; + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + SystemData systemData = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + properties = ProjectProperties.DeserializeProjectProperties(property.Value, options); + continue; + } + if (property.NameEquals("id"u8)) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ProjectData( + id, + name, + type, + systemData, + properties, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ProjectData)} does not support writing '{options.Format}' format."); + } + } + + ProjectData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeProjectData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ProjectData)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/ProjectData.cs b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/ProjectData.cs new file mode 100644 index 000000000000..eaefd7e47597 --- /dev/null +++ b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/ProjectData.cs @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.Models; +using Azure.ResourceManager.NeonPostgres.Models; + +namespace Azure.ResourceManager.NeonPostgres +{ + /// + /// A class representing the Project data model. + /// The Project resource type. + /// + public partial class ProjectData : ResourceData + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public ProjectData() + { + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The resource-specific properties for this resource. + /// Keeps track of any properties unknown to the library. + internal ProjectData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, ProjectProperties properties, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + { + Properties = properties; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The resource-specific properties for this resource. + public ProjectProperties Properties { get; set; } + } +} diff --git a/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/ProjectResource.Serialization.cs b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/ProjectResource.Serialization.cs new file mode 100644 index 000000000000..4e45bb94f0ef --- /dev/null +++ b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/ProjectResource.Serialization.cs @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text.Json; + +namespace Azure.ResourceManager.NeonPostgres +{ + public partial class ProjectResource : IJsonModel + { + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + ProjectData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options); + + ProjectData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + } +} diff --git a/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/ProjectResource.cs b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/ProjectResource.cs new file mode 100644 index 000000000000..6c0f6085231d --- /dev/null +++ b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/ProjectResource.cs @@ -0,0 +1,505 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.NeonPostgres.Models; + +namespace Azure.ResourceManager.NeonPostgres +{ + /// + /// A Class representing a Project along with the instance operations that can be performed on it. + /// If you have a you can construct a + /// from an instance of using the GetProjectResource method. + /// Otherwise you can get one from its parent resource using the GetProject method. + /// + public partial class ProjectResource : ArmResource + { + /// Generate the resource identifier of a instance. + /// The subscriptionId. + /// The resourceGroupName. + /// The organizationName. + /// The projectName. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string organizationName, string projectName) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _projectClientDiagnostics; + private readonly ProjectsRestOperations _projectRestClient; + private readonly ProjectData _data; + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Neon.Postgres/organizations/projects"; + + /// Initializes a new instance of the class for mocking. + protected ProjectResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal ProjectResource(ArmClient client, ProjectData data) : this(client, data.Id) + { + HasData = true; + _data = data; + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the resource that is the target of operations. + internal ProjectResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _projectClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.NeonPostgres", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string projectApiVersion); + _projectRestClient = new ProjectsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, projectApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets whether or not the current instance has data. + public virtual bool HasData { get; } + + /// Gets the data representing this Feature. + /// Throws if there is no data loaded in the current instance. + public virtual ProjectData Data + { + get + { + if (!HasData) + throw new InvalidOperationException("The current instance does not have data, you must call Get first."); + return _data; + } + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); + } + + /// Gets a collection of BranchResources in the Project. + /// An object representing collection of BranchResources and their operations over a BranchResource. + public virtual BranchCollection GetBranches() + { + return GetCachedClient(client => new BranchCollection(client, Id)); + } + + /// + /// Get a Branch + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName}/branches/{branchName} + /// + /// + /// Operation Id + /// Branch_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Branch. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetBranchAsync(string branchName, CancellationToken cancellationToken = default) + { + return await GetBranches().GetAsync(branchName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get a Branch + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName}/branches/{branchName} + /// + /// + /// Operation Id + /// Branch_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Branch. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetBranch(string branchName, CancellationToken cancellationToken = default) + { + return GetBranches().Get(branchName, cancellationToken); + } + + /// + /// Get a Project + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName} + /// + /// + /// Operation Id + /// Project_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _projectClientDiagnostics.CreateScope("ProjectResource.Get"); + scope.Start(); + try + { + var response = await _projectRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new ProjectResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a Project + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName} + /// + /// + /// Operation Id + /// Project_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _projectClientDiagnostics.CreateScope("ProjectResource.Get"); + scope.Start(); + try + { + var response = _projectRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new ProjectResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete a Project + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName} + /// + /// + /// Operation Id + /// Project_Delete + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _projectClientDiagnostics.CreateScope("ProjectResource.Delete"); + scope.Start(); + try + { + var response = await _projectRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var uri = _projectRestClient.CreateDeleteRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Delete, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new NeonPostgresArmOperation(response, rehydrationToken); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete a Project + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName} + /// + /// + /// Operation Id + /// Project_Delete + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _projectClientDiagnostics.CreateScope("ProjectResource.Delete"); + scope.Start(); + try + { + var response = _projectRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + var uri = _projectRestClient.CreateDeleteRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Delete, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new NeonPostgresArmOperation(response, rehydrationToken); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Update a Project + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName} + /// + /// + /// Operation Id + /// Project_Update + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The resource properties to be updated. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(WaitUntil waitUntil, ProjectData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _projectClientDiagnostics.CreateScope("ProjectResource.Update"); + scope.Start(); + try + { + var response = await _projectRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken).ConfigureAwait(false); + var operation = new NeonPostgresArmOperation(new ProjectOperationSource(Client), _projectClientDiagnostics, Pipeline, _projectRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Update a Project + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName} + /// + /// + /// Operation Id + /// Project_Update + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The resource properties to be updated. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation Update(WaitUntil waitUntil, ProjectData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _projectClientDiagnostics.CreateScope("ProjectResource.Update"); + scope.Start(); + try + { + var response = _projectRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken); + var operation = new NeonPostgresArmOperation(new ProjectOperationSource(Client), _projectClientDiagnostics, Pipeline, _projectRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Action to retrieve the connection URI for the Neon Database. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName}/getConnectionUri + /// + /// + /// Operation Id + /// Projects_GetConnectionUri + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Additional parameters for retrieving the database connection URI. + /// The cancellation token to use. + /// is null. + public virtual async Task> GetConnectionUriAsync(ConnectionUriProperties connectionUriParameters, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(connectionUriParameters, nameof(connectionUriParameters)); + + using var scope = _projectClientDiagnostics.CreateScope("ProjectResource.GetConnectionUri"); + scope.Start(); + try + { + var response = await _projectRestClient.GetConnectionUriAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, connectionUriParameters, cancellationToken).ConfigureAwait(false); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Action to retrieve the connection URI for the Neon Database. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName}/getConnectionUri + /// + /// + /// Operation Id + /// Projects_GetConnectionUri + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Additional parameters for retrieving the database connection URI. + /// The cancellation token to use. + /// is null. + public virtual Response GetConnectionUri(ConnectionUriProperties connectionUriParameters, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(connectionUriParameters, nameof(connectionUriParameters)); + + using var scope = _projectClientDiagnostics.CreateScope("ProjectResource.GetConnectionUri"); + scope.Start(); + try + { + var response = _projectRestClient.GetConnectionUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, connectionUriParameters, cancellationToken); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/RestOperations/BranchesRestOperations.cs b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/RestOperations/BranchesRestOperations.cs new file mode 100644 index 000000000000..8137b0dd41c9 --- /dev/null +++ b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/RestOperations/BranchesRestOperations.cs @@ -0,0 +1,657 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.NeonPostgres.Models; + +namespace Azure.ResourceManager.NeonPostgres +{ + internal partial class BranchesRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of BranchesRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// Service host. + /// The API version to use for this operation. + /// or is null. + public BranchesRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + { + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? new Uri("https://management.azure.com"); + _apiVersion = apiVersion ?? "2025-03-01"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string organizationName, string projectName, string branchName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Neon.Postgres/organizations/", false); + uri.AppendPath(organizationName, true); + uri.AppendPath("/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/branches/", false); + uri.AppendPath(branchName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string organizationName, string projectName, string branchName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Neon.Postgres/organizations/", false); + uri.AppendPath(organizationName, true); + uri.AppendPath("/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/branches/", false); + uri.AppendPath(branchName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get a Branch. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Neon Organizations resource. + /// The name of the Project. + /// The name of the Branch. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string organizationName, string projectName, string branchName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(organizationName, nameof(organizationName)); + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(branchName, nameof(branchName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, organizationName, projectName, branchName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + BranchData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = BranchData.DeserializeBranchData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((BranchData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get a Branch. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Neon Organizations resource. + /// The name of the Project. + /// The name of the Branch. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response Get(string subscriptionId, string resourceGroupName, string organizationName, string projectName, string branchName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(organizationName, nameof(organizationName)); + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(branchName, nameof(branchName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, organizationName, projectName, branchName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + BranchData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = BranchData.DeserializeBranchData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((BranchData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, string resourceGroupName, string organizationName, string projectName, string branchName, BranchData data) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Neon.Postgres/organizations/", false); + uri.AppendPath(organizationName, true); + uri.AppendPath("/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/branches/", false); + uri.AppendPath(branchName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string organizationName, string projectName, string branchName, BranchData data) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Put; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Neon.Postgres/organizations/", false); + uri.AppendPath(organizationName, true); + uri.AppendPath("/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/branches/", false); + uri.AppendPath(branchName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(data, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Create a Branch. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Neon Organizations resource. + /// The name of the Project. + /// The name of the Branch. + /// Resource create parameters. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string organizationName, string projectName, string branchName, BranchData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(organizationName, nameof(organizationName)); + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(branchName, nameof(branchName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, organizationName, projectName, branchName, data); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 201: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Create a Branch. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Neon Organizations resource. + /// The name of the Project. + /// The name of the Branch. + /// Resource create parameters. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string organizationName, string projectName, string branchName, BranchData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(organizationName, nameof(organizationName)); + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(branchName, nameof(branchName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, organizationName, projectName, branchName, data); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 201: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateUpdateRequestUri(string subscriptionId, string resourceGroupName, string organizationName, string projectName, string branchName, BranchData data) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Neon.Postgres/organizations/", false); + uri.AppendPath(organizationName, true); + uri.AppendPath("/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/branches/", false); + uri.AppendPath(branchName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string organizationName, string projectName, string branchName, BranchData data) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Patch; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Neon.Postgres/organizations/", false); + uri.AppendPath(organizationName, true); + uri.AppendPath("/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/branches/", false); + uri.AppendPath(branchName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(data, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Update a Branch. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Neon Organizations resource. + /// The name of the Project. + /// The name of the Branch. + /// The resource properties to be updated. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task UpdateAsync(string subscriptionId, string resourceGroupName, string organizationName, string projectName, string branchName, BranchData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(organizationName, nameof(organizationName)); + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(branchName, nameof(branchName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, organizationName, projectName, branchName, data); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Update a Branch. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Neon Organizations resource. + /// The name of the Project. + /// The name of the Branch. + /// The resource properties to be updated. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response Update(string subscriptionId, string resourceGroupName, string organizationName, string projectName, string branchName, BranchData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(organizationName, nameof(organizationName)); + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(branchName, nameof(branchName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, organizationName, projectName, branchName, data); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string organizationName, string projectName, string branchName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Neon.Postgres/organizations/", false); + uri.AppendPath(organizationName, true); + uri.AppendPath("/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/branches/", false); + uri.AppendPath(branchName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string organizationName, string projectName, string branchName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Delete; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Neon.Postgres/organizations/", false); + uri.AppendPath(organizationName, true); + uri.AppendPath("/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/branches/", false); + uri.AppendPath(branchName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Delete a Branch. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Neon Organizations resource. + /// The name of the Project. + /// The name of the Branch. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string organizationName, string projectName, string branchName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(organizationName, nameof(organizationName)); + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(branchName, nameof(branchName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, organizationName, projectName, branchName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Delete a Branch. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Neon Organizations resource. + /// The name of the Project. + /// The name of the Branch. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response Delete(string subscriptionId, string resourceGroupName, string organizationName, string projectName, string branchName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(organizationName, nameof(organizationName)); + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(branchName, nameof(branchName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, organizationName, projectName, branchName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListRequestUri(string subscriptionId, string resourceGroupName, string organizationName, string projectName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Neon.Postgres/organizations/", false); + uri.AppendPath(organizationName, true); + uri.AppendPath("/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/branches", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListRequest(string subscriptionId, string resourceGroupName, string organizationName, string projectName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Neon.Postgres/organizations/", false); + uri.AppendPath(organizationName, true); + uri.AppendPath("/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/branches", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List Branch resources by Project. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Neon Organizations resource. + /// The name of the Project. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> ListAsync(string subscriptionId, string resourceGroupName, string organizationName, string projectName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(organizationName, nameof(organizationName)); + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + + using var message = CreateListRequest(subscriptionId, resourceGroupName, organizationName, projectName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + BranchListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = BranchListResult.DeserializeBranchListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List Branch resources by Project. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Neon Organizations resource. + /// The name of the Project. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response List(string subscriptionId, string resourceGroupName, string organizationName, string projectName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(organizationName, nameof(organizationName)); + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + + using var message = CreateListRequest(subscriptionId, resourceGroupName, organizationName, projectName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + BranchListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = BranchListResult.DeserializeBranchListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string organizationName, string projectName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string organizationName, string projectName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List Branch resources by Project. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Neon Organizations resource. + /// The name of the Project. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> ListNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string organizationName, string projectName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(organizationName, nameof(organizationName)); + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, organizationName, projectName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + BranchListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = BranchListResult.DeserializeBranchListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List Branch resources by Project. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Neon Organizations resource. + /// The name of the Project. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response ListNextPage(string nextLink, string subscriptionId, string resourceGroupName, string organizationName, string projectName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(organizationName, nameof(organizationName)); + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, organizationName, projectName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + BranchListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = BranchListResult.DeserializeBranchListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/RestOperations/ComputesRestOperations.cs b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/RestOperations/ComputesRestOperations.cs new file mode 100644 index 000000000000..9eb97c7a32e8 --- /dev/null +++ b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/RestOperations/ComputesRestOperations.cs @@ -0,0 +1,701 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.NeonPostgres.Models; + +namespace Azure.ResourceManager.NeonPostgres +{ + internal partial class ComputesRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of ComputesRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// Service host. + /// The API version to use for this operation. + /// or is null. + public ComputesRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + { + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? new Uri("https://management.azure.com"); + _apiVersion = apiVersion ?? "2025-03-01"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string organizationName, string projectName, string branchName, string computeName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Neon.Postgres/organizations/", false); + uri.AppendPath(organizationName, true); + uri.AppendPath("/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/branches/", false); + uri.AppendPath(branchName, true); + uri.AppendPath("/computes/", false); + uri.AppendPath(computeName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string organizationName, string projectName, string branchName, string computeName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Neon.Postgres/organizations/", false); + uri.AppendPath(organizationName, true); + uri.AppendPath("/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/branches/", false); + uri.AppendPath(branchName, true); + uri.AppendPath("/computes/", false); + uri.AppendPath(computeName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get a Compute. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Neon Organizations resource. + /// The name of the Project. + /// The name of the Branch. + /// The name of the Compute. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , , or is an empty string, and was expected to be non-empty. + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string organizationName, string projectName, string branchName, string computeName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(organizationName, nameof(organizationName)); + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(branchName, nameof(branchName)); + Argument.AssertNotNullOrEmpty(computeName, nameof(computeName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, organizationName, projectName, branchName, computeName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ComputeData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = ComputeData.DeserializeComputeData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((ComputeData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get a Compute. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Neon Organizations resource. + /// The name of the Project. + /// The name of the Branch. + /// The name of the Compute. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , , or is an empty string, and was expected to be non-empty. + public Response Get(string subscriptionId, string resourceGroupName, string organizationName, string projectName, string branchName, string computeName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(organizationName, nameof(organizationName)); + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(branchName, nameof(branchName)); + Argument.AssertNotNullOrEmpty(computeName, nameof(computeName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, organizationName, projectName, branchName, computeName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ComputeData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = ComputeData.DeserializeComputeData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((ComputeData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, string resourceGroupName, string organizationName, string projectName, string branchName, string computeName, ComputeData data) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Neon.Postgres/organizations/", false); + uri.AppendPath(organizationName, true); + uri.AppendPath("/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/branches/", false); + uri.AppendPath(branchName, true); + uri.AppendPath("/computes/", false); + uri.AppendPath(computeName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string organizationName, string projectName, string branchName, string computeName, ComputeData data) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Put; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Neon.Postgres/organizations/", false); + uri.AppendPath(organizationName, true); + uri.AppendPath("/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/branches/", false); + uri.AppendPath(branchName, true); + uri.AppendPath("/computes/", false); + uri.AppendPath(computeName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(data, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Create a Compute. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Neon Organizations resource. + /// The name of the Project. + /// The name of the Branch. + /// The name of the Compute. + /// Resource create parameters. + /// The cancellation token to use. + /// , , , , , or is null. + /// , , , , or is an empty string, and was expected to be non-empty. + public async Task CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string organizationName, string projectName, string branchName, string computeName, ComputeData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(organizationName, nameof(organizationName)); + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(branchName, nameof(branchName)); + Argument.AssertNotNullOrEmpty(computeName, nameof(computeName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, organizationName, projectName, branchName, computeName, data); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 201: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Create a Compute. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Neon Organizations resource. + /// The name of the Project. + /// The name of the Branch. + /// The name of the Compute. + /// Resource create parameters. + /// The cancellation token to use. + /// , , , , , or is null. + /// , , , , or is an empty string, and was expected to be non-empty. + public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string organizationName, string projectName, string branchName, string computeName, ComputeData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(organizationName, nameof(organizationName)); + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(branchName, nameof(branchName)); + Argument.AssertNotNullOrEmpty(computeName, nameof(computeName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, organizationName, projectName, branchName, computeName, data); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 201: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateUpdateRequestUri(string subscriptionId, string resourceGroupName, string organizationName, string projectName, string branchName, string computeName, ComputeData data) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Neon.Postgres/organizations/", false); + uri.AppendPath(organizationName, true); + uri.AppendPath("/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/branches/", false); + uri.AppendPath(branchName, true); + uri.AppendPath("/computes/", false); + uri.AppendPath(computeName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string organizationName, string projectName, string branchName, string computeName, ComputeData data) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Patch; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Neon.Postgres/organizations/", false); + uri.AppendPath(organizationName, true); + uri.AppendPath("/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/branches/", false); + uri.AppendPath(branchName, true); + uri.AppendPath("/computes/", false); + uri.AppendPath(computeName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(data, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Update a Compute. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Neon Organizations resource. + /// The name of the Project. + /// The name of the Branch. + /// The name of the Compute. + /// The resource properties to be updated. + /// The cancellation token to use. + /// , , , , , or is null. + /// , , , , or is an empty string, and was expected to be non-empty. + public async Task UpdateAsync(string subscriptionId, string resourceGroupName, string organizationName, string projectName, string branchName, string computeName, ComputeData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(organizationName, nameof(organizationName)); + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(branchName, nameof(branchName)); + Argument.AssertNotNullOrEmpty(computeName, nameof(computeName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, organizationName, projectName, branchName, computeName, data); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Update a Compute. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Neon Organizations resource. + /// The name of the Project. + /// The name of the Branch. + /// The name of the Compute. + /// The resource properties to be updated. + /// The cancellation token to use. + /// , , , , , or is null. + /// , , , , or is an empty string, and was expected to be non-empty. + public Response Update(string subscriptionId, string resourceGroupName, string organizationName, string projectName, string branchName, string computeName, ComputeData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(organizationName, nameof(organizationName)); + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(branchName, nameof(branchName)); + Argument.AssertNotNullOrEmpty(computeName, nameof(computeName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, organizationName, projectName, branchName, computeName, data); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string organizationName, string projectName, string branchName, string computeName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Neon.Postgres/organizations/", false); + uri.AppendPath(organizationName, true); + uri.AppendPath("/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/branches/", false); + uri.AppendPath(branchName, true); + uri.AppendPath("/computes/", false); + uri.AppendPath(computeName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string organizationName, string projectName, string branchName, string computeName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Delete; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Neon.Postgres/organizations/", false); + uri.AppendPath(organizationName, true); + uri.AppendPath("/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/branches/", false); + uri.AppendPath(branchName, true); + uri.AppendPath("/computes/", false); + uri.AppendPath(computeName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Delete a Compute. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Neon Organizations resource. + /// The name of the Project. + /// The name of the Branch. + /// The name of the Compute. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , , or is an empty string, and was expected to be non-empty. + public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string organizationName, string projectName, string branchName, string computeName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(organizationName, nameof(organizationName)); + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(branchName, nameof(branchName)); + Argument.AssertNotNullOrEmpty(computeName, nameof(computeName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, organizationName, projectName, branchName, computeName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Delete a Compute. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Neon Organizations resource. + /// The name of the Project. + /// The name of the Branch. + /// The name of the Compute. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , , or is an empty string, and was expected to be non-empty. + public Response Delete(string subscriptionId, string resourceGroupName, string organizationName, string projectName, string branchName, string computeName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(organizationName, nameof(organizationName)); + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(branchName, nameof(branchName)); + Argument.AssertNotNullOrEmpty(computeName, nameof(computeName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, organizationName, projectName, branchName, computeName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListRequestUri(string subscriptionId, string resourceGroupName, string organizationName, string projectName, string branchName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Neon.Postgres/organizations/", false); + uri.AppendPath(organizationName, true); + uri.AppendPath("/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/branches/", false); + uri.AppendPath(branchName, true); + uri.AppendPath("/computes", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListRequest(string subscriptionId, string resourceGroupName, string organizationName, string projectName, string branchName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Neon.Postgres/organizations/", false); + uri.AppendPath(organizationName, true); + uri.AppendPath("/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/branches/", false); + uri.AppendPath(branchName, true); + uri.AppendPath("/computes", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List Compute resources by Branch. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Neon Organizations resource. + /// The name of the Project. + /// The name of the Branch. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task> ListAsync(string subscriptionId, string resourceGroupName, string organizationName, string projectName, string branchName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(organizationName, nameof(organizationName)); + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(branchName, nameof(branchName)); + + using var message = CreateListRequest(subscriptionId, resourceGroupName, organizationName, projectName, branchName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ComputeListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = ComputeListResult.DeserializeComputeListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List Compute resources by Branch. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Neon Organizations resource. + /// The name of the Project. + /// The name of the Branch. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response List(string subscriptionId, string resourceGroupName, string organizationName, string projectName, string branchName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(organizationName, nameof(organizationName)); + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(branchName, nameof(branchName)); + + using var message = CreateListRequest(subscriptionId, resourceGroupName, organizationName, projectName, branchName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ComputeListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = ComputeListResult.DeserializeComputeListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string organizationName, string projectName, string branchName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string organizationName, string projectName, string branchName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List Compute resources by Branch. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Neon Organizations resource. + /// The name of the Project. + /// The name of the Branch. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task> ListNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string organizationName, string projectName, string branchName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(organizationName, nameof(organizationName)); + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(branchName, nameof(branchName)); + + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, organizationName, projectName, branchName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ComputeListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = ComputeListResult.DeserializeComputeListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List Compute resources by Branch. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Neon Organizations resource. + /// The name of the Project. + /// The name of the Branch. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response ListNextPage(string nextLink, string subscriptionId, string resourceGroupName, string organizationName, string projectName, string branchName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(organizationName, nameof(organizationName)); + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(branchName, nameof(branchName)); + + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, organizationName, projectName, branchName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ComputeListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = ComputeListResult.DeserializeComputeListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/RestOperations/EndpointsRestOperations.cs b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/RestOperations/EndpointsRestOperations.cs new file mode 100644 index 000000000000..fd46a6bfa0aa --- /dev/null +++ b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/RestOperations/EndpointsRestOperations.cs @@ -0,0 +1,701 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.NeonPostgres.Models; + +namespace Azure.ResourceManager.NeonPostgres +{ + internal partial class EndpointsRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of EndpointsRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// Service host. + /// The API version to use for this operation. + /// or is null. + public EndpointsRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + { + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? new Uri("https://management.azure.com"); + _apiVersion = apiVersion ?? "2025-03-01"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string organizationName, string projectName, string branchName, string endpointName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Neon.Postgres/organizations/", false); + uri.AppendPath(organizationName, true); + uri.AppendPath("/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/branches/", false); + uri.AppendPath(branchName, true); + uri.AppendPath("/endpoints/", false); + uri.AppendPath(endpointName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string organizationName, string projectName, string branchName, string endpointName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Neon.Postgres/organizations/", false); + uri.AppendPath(organizationName, true); + uri.AppendPath("/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/branches/", false); + uri.AppendPath(branchName, true); + uri.AppendPath("/endpoints/", false); + uri.AppendPath(endpointName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get a Endpoint. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Neon Organizations resource. + /// The name of the Project. + /// The name of the Branch. + /// The name of the Endpoint. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , , or is an empty string, and was expected to be non-empty. + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string organizationName, string projectName, string branchName, string endpointName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(organizationName, nameof(organizationName)); + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(branchName, nameof(branchName)); + Argument.AssertNotNullOrEmpty(endpointName, nameof(endpointName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, organizationName, projectName, branchName, endpointName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + EndpointData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = EndpointData.DeserializeEndpointData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((EndpointData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get a Endpoint. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Neon Organizations resource. + /// The name of the Project. + /// The name of the Branch. + /// The name of the Endpoint. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , , or is an empty string, and was expected to be non-empty. + public Response Get(string subscriptionId, string resourceGroupName, string organizationName, string projectName, string branchName, string endpointName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(organizationName, nameof(organizationName)); + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(branchName, nameof(branchName)); + Argument.AssertNotNullOrEmpty(endpointName, nameof(endpointName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, organizationName, projectName, branchName, endpointName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + EndpointData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = EndpointData.DeserializeEndpointData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((EndpointData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, string resourceGroupName, string organizationName, string projectName, string branchName, string endpointName, EndpointData data) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Neon.Postgres/organizations/", false); + uri.AppendPath(organizationName, true); + uri.AppendPath("/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/branches/", false); + uri.AppendPath(branchName, true); + uri.AppendPath("/endpoints/", false); + uri.AppendPath(endpointName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string organizationName, string projectName, string branchName, string endpointName, EndpointData data) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Put; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Neon.Postgres/organizations/", false); + uri.AppendPath(organizationName, true); + uri.AppendPath("/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/branches/", false); + uri.AppendPath(branchName, true); + uri.AppendPath("/endpoints/", false); + uri.AppendPath(endpointName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(data, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Create a Endpoint. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Neon Organizations resource. + /// The name of the Project. + /// The name of the Branch. + /// The name of the Endpoint. + /// Resource create parameters. + /// The cancellation token to use. + /// , , , , , or is null. + /// , , , , or is an empty string, and was expected to be non-empty. + public async Task CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string organizationName, string projectName, string branchName, string endpointName, EndpointData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(organizationName, nameof(organizationName)); + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(branchName, nameof(branchName)); + Argument.AssertNotNullOrEmpty(endpointName, nameof(endpointName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, organizationName, projectName, branchName, endpointName, data); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 201: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Create a Endpoint. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Neon Organizations resource. + /// The name of the Project. + /// The name of the Branch. + /// The name of the Endpoint. + /// Resource create parameters. + /// The cancellation token to use. + /// , , , , , or is null. + /// , , , , or is an empty string, and was expected to be non-empty. + public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string organizationName, string projectName, string branchName, string endpointName, EndpointData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(organizationName, nameof(organizationName)); + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(branchName, nameof(branchName)); + Argument.AssertNotNullOrEmpty(endpointName, nameof(endpointName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, organizationName, projectName, branchName, endpointName, data); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 201: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateUpdateRequestUri(string subscriptionId, string resourceGroupName, string organizationName, string projectName, string branchName, string endpointName, EndpointData data) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Neon.Postgres/organizations/", false); + uri.AppendPath(organizationName, true); + uri.AppendPath("/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/branches/", false); + uri.AppendPath(branchName, true); + uri.AppendPath("/endpoints/", false); + uri.AppendPath(endpointName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string organizationName, string projectName, string branchName, string endpointName, EndpointData data) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Patch; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Neon.Postgres/organizations/", false); + uri.AppendPath(organizationName, true); + uri.AppendPath("/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/branches/", false); + uri.AppendPath(branchName, true); + uri.AppendPath("/endpoints/", false); + uri.AppendPath(endpointName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(data, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Update a Endpoint. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Neon Organizations resource. + /// The name of the Project. + /// The name of the Branch. + /// The name of the Endpoint. + /// The resource properties to be updated. + /// The cancellation token to use. + /// , , , , , or is null. + /// , , , , or is an empty string, and was expected to be non-empty. + public async Task UpdateAsync(string subscriptionId, string resourceGroupName, string organizationName, string projectName, string branchName, string endpointName, EndpointData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(organizationName, nameof(organizationName)); + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(branchName, nameof(branchName)); + Argument.AssertNotNullOrEmpty(endpointName, nameof(endpointName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, organizationName, projectName, branchName, endpointName, data); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Update a Endpoint. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Neon Organizations resource. + /// The name of the Project. + /// The name of the Branch. + /// The name of the Endpoint. + /// The resource properties to be updated. + /// The cancellation token to use. + /// , , , , , or is null. + /// , , , , or is an empty string, and was expected to be non-empty. + public Response Update(string subscriptionId, string resourceGroupName, string organizationName, string projectName, string branchName, string endpointName, EndpointData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(organizationName, nameof(organizationName)); + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(branchName, nameof(branchName)); + Argument.AssertNotNullOrEmpty(endpointName, nameof(endpointName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, organizationName, projectName, branchName, endpointName, data); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string organizationName, string projectName, string branchName, string endpointName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Neon.Postgres/organizations/", false); + uri.AppendPath(organizationName, true); + uri.AppendPath("/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/branches/", false); + uri.AppendPath(branchName, true); + uri.AppendPath("/endpoints/", false); + uri.AppendPath(endpointName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string organizationName, string projectName, string branchName, string endpointName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Delete; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Neon.Postgres/organizations/", false); + uri.AppendPath(organizationName, true); + uri.AppendPath("/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/branches/", false); + uri.AppendPath(branchName, true); + uri.AppendPath("/endpoints/", false); + uri.AppendPath(endpointName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Delete a Endpoint. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Neon Organizations resource. + /// The name of the Project. + /// The name of the Branch. + /// The name of the Endpoint. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , , or is an empty string, and was expected to be non-empty. + public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string organizationName, string projectName, string branchName, string endpointName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(organizationName, nameof(organizationName)); + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(branchName, nameof(branchName)); + Argument.AssertNotNullOrEmpty(endpointName, nameof(endpointName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, organizationName, projectName, branchName, endpointName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Delete a Endpoint. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Neon Organizations resource. + /// The name of the Project. + /// The name of the Branch. + /// The name of the Endpoint. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , , or is an empty string, and was expected to be non-empty. + public Response Delete(string subscriptionId, string resourceGroupName, string organizationName, string projectName, string branchName, string endpointName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(organizationName, nameof(organizationName)); + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(branchName, nameof(branchName)); + Argument.AssertNotNullOrEmpty(endpointName, nameof(endpointName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, organizationName, projectName, branchName, endpointName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListRequestUri(string subscriptionId, string resourceGroupName, string organizationName, string projectName, string branchName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Neon.Postgres/organizations/", false); + uri.AppendPath(organizationName, true); + uri.AppendPath("/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/branches/", false); + uri.AppendPath(branchName, true); + uri.AppendPath("/endpoints", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListRequest(string subscriptionId, string resourceGroupName, string organizationName, string projectName, string branchName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Neon.Postgres/organizations/", false); + uri.AppendPath(organizationName, true); + uri.AppendPath("/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/branches/", false); + uri.AppendPath(branchName, true); + uri.AppendPath("/endpoints", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List Endpoint resources by Branch. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Neon Organizations resource. + /// The name of the Project. + /// The name of the Branch. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task> ListAsync(string subscriptionId, string resourceGroupName, string organizationName, string projectName, string branchName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(organizationName, nameof(organizationName)); + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(branchName, nameof(branchName)); + + using var message = CreateListRequest(subscriptionId, resourceGroupName, organizationName, projectName, branchName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + EndpointListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = EndpointListResult.DeserializeEndpointListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List Endpoint resources by Branch. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Neon Organizations resource. + /// The name of the Project. + /// The name of the Branch. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response List(string subscriptionId, string resourceGroupName, string organizationName, string projectName, string branchName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(organizationName, nameof(organizationName)); + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(branchName, nameof(branchName)); + + using var message = CreateListRequest(subscriptionId, resourceGroupName, organizationName, projectName, branchName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + EndpointListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = EndpointListResult.DeserializeEndpointListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string organizationName, string projectName, string branchName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string organizationName, string projectName, string branchName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List Endpoint resources by Branch. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Neon Organizations resource. + /// The name of the Project. + /// The name of the Branch. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task> ListNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string organizationName, string projectName, string branchName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(organizationName, nameof(organizationName)); + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(branchName, nameof(branchName)); + + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, organizationName, projectName, branchName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + EndpointListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = EndpointListResult.DeserializeEndpointListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List Endpoint resources by Branch. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Neon Organizations resource. + /// The name of the Project. + /// The name of the Branch. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response ListNextPage(string nextLink, string subscriptionId, string resourceGroupName, string organizationName, string projectName, string branchName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(organizationName, nameof(organizationName)); + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(branchName, nameof(branchName)); + + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, organizationName, projectName, branchName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + EndpointListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = EndpointListResult.DeserializeEndpointListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/RestOperations/NeonDatabasesRestOperations.cs b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/RestOperations/NeonDatabasesRestOperations.cs new file mode 100644 index 000000000000..42c8d8e8fdfa --- /dev/null +++ b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/RestOperations/NeonDatabasesRestOperations.cs @@ -0,0 +1,701 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.NeonPostgres.Models; + +namespace Azure.ResourceManager.NeonPostgres +{ + internal partial class NeonDatabasesRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of NeonDatabasesRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// Service host. + /// The API version to use for this operation. + /// or is null. + public NeonDatabasesRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + { + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? new Uri("https://management.azure.com"); + _apiVersion = apiVersion ?? "2025-03-01"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string organizationName, string projectName, string branchName, string neonDatabaseName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Neon.Postgres/organizations/", false); + uri.AppendPath(organizationName, true); + uri.AppendPath("/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/branches/", false); + uri.AppendPath(branchName, true); + uri.AppendPath("/neonDatabases/", false); + uri.AppendPath(neonDatabaseName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string organizationName, string projectName, string branchName, string neonDatabaseName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Neon.Postgres/organizations/", false); + uri.AppendPath(organizationName, true); + uri.AppendPath("/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/branches/", false); + uri.AppendPath(branchName, true); + uri.AppendPath("/neonDatabases/", false); + uri.AppendPath(neonDatabaseName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get a NeonDatabase. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Neon Organizations resource. + /// The name of the Project. + /// The name of the Branch. + /// The name of the NeonDatabase. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , , or is an empty string, and was expected to be non-empty. + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string organizationName, string projectName, string branchName, string neonDatabaseName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(organizationName, nameof(organizationName)); + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(branchName, nameof(branchName)); + Argument.AssertNotNullOrEmpty(neonDatabaseName, nameof(neonDatabaseName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, organizationName, projectName, branchName, neonDatabaseName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + NeonDatabaseData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = NeonDatabaseData.DeserializeNeonDatabaseData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((NeonDatabaseData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get a NeonDatabase. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Neon Organizations resource. + /// The name of the Project. + /// The name of the Branch. + /// The name of the NeonDatabase. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , , or is an empty string, and was expected to be non-empty. + public Response Get(string subscriptionId, string resourceGroupName, string organizationName, string projectName, string branchName, string neonDatabaseName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(organizationName, nameof(organizationName)); + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(branchName, nameof(branchName)); + Argument.AssertNotNullOrEmpty(neonDatabaseName, nameof(neonDatabaseName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, organizationName, projectName, branchName, neonDatabaseName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + NeonDatabaseData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = NeonDatabaseData.DeserializeNeonDatabaseData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((NeonDatabaseData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, string resourceGroupName, string organizationName, string projectName, string branchName, string neonDatabaseName, NeonDatabaseData data) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Neon.Postgres/organizations/", false); + uri.AppendPath(organizationName, true); + uri.AppendPath("/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/branches/", false); + uri.AppendPath(branchName, true); + uri.AppendPath("/neonDatabases/", false); + uri.AppendPath(neonDatabaseName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string organizationName, string projectName, string branchName, string neonDatabaseName, NeonDatabaseData data) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Put; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Neon.Postgres/organizations/", false); + uri.AppendPath(organizationName, true); + uri.AppendPath("/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/branches/", false); + uri.AppendPath(branchName, true); + uri.AppendPath("/neonDatabases/", false); + uri.AppendPath(neonDatabaseName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(data, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Create a NeonDatabase. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Neon Organizations resource. + /// The name of the Project. + /// The name of the Branch. + /// The name of the NeonDatabase. + /// Resource create parameters. + /// The cancellation token to use. + /// , , , , , or is null. + /// , , , , or is an empty string, and was expected to be non-empty. + public async Task CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string organizationName, string projectName, string branchName, string neonDatabaseName, NeonDatabaseData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(organizationName, nameof(organizationName)); + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(branchName, nameof(branchName)); + Argument.AssertNotNullOrEmpty(neonDatabaseName, nameof(neonDatabaseName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, organizationName, projectName, branchName, neonDatabaseName, data); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 201: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Create a NeonDatabase. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Neon Organizations resource. + /// The name of the Project. + /// The name of the Branch. + /// The name of the NeonDatabase. + /// Resource create parameters. + /// The cancellation token to use. + /// , , , , , or is null. + /// , , , , or is an empty string, and was expected to be non-empty. + public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string organizationName, string projectName, string branchName, string neonDatabaseName, NeonDatabaseData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(organizationName, nameof(organizationName)); + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(branchName, nameof(branchName)); + Argument.AssertNotNullOrEmpty(neonDatabaseName, nameof(neonDatabaseName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, organizationName, projectName, branchName, neonDatabaseName, data); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 201: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateUpdateRequestUri(string subscriptionId, string resourceGroupName, string organizationName, string projectName, string branchName, string neonDatabaseName, NeonDatabaseData data) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Neon.Postgres/organizations/", false); + uri.AppendPath(organizationName, true); + uri.AppendPath("/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/branches/", false); + uri.AppendPath(branchName, true); + uri.AppendPath("/neonDatabases/", false); + uri.AppendPath(neonDatabaseName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string organizationName, string projectName, string branchName, string neonDatabaseName, NeonDatabaseData data) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Patch; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Neon.Postgres/organizations/", false); + uri.AppendPath(organizationName, true); + uri.AppendPath("/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/branches/", false); + uri.AppendPath(branchName, true); + uri.AppendPath("/neonDatabases/", false); + uri.AppendPath(neonDatabaseName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(data, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Update a NeonDatabase. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Neon Organizations resource. + /// The name of the Project. + /// The name of the Branch. + /// The name of the NeonDatabase. + /// The resource properties to be updated. + /// The cancellation token to use. + /// , , , , , or is null. + /// , , , , or is an empty string, and was expected to be non-empty. + public async Task UpdateAsync(string subscriptionId, string resourceGroupName, string organizationName, string projectName, string branchName, string neonDatabaseName, NeonDatabaseData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(organizationName, nameof(organizationName)); + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(branchName, nameof(branchName)); + Argument.AssertNotNullOrEmpty(neonDatabaseName, nameof(neonDatabaseName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, organizationName, projectName, branchName, neonDatabaseName, data); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Update a NeonDatabase. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Neon Organizations resource. + /// The name of the Project. + /// The name of the Branch. + /// The name of the NeonDatabase. + /// The resource properties to be updated. + /// The cancellation token to use. + /// , , , , , or is null. + /// , , , , or is an empty string, and was expected to be non-empty. + public Response Update(string subscriptionId, string resourceGroupName, string organizationName, string projectName, string branchName, string neonDatabaseName, NeonDatabaseData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(organizationName, nameof(organizationName)); + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(branchName, nameof(branchName)); + Argument.AssertNotNullOrEmpty(neonDatabaseName, nameof(neonDatabaseName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, organizationName, projectName, branchName, neonDatabaseName, data); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string organizationName, string projectName, string branchName, string neonDatabaseName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Neon.Postgres/organizations/", false); + uri.AppendPath(organizationName, true); + uri.AppendPath("/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/branches/", false); + uri.AppendPath(branchName, true); + uri.AppendPath("/neonDatabases/", false); + uri.AppendPath(neonDatabaseName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string organizationName, string projectName, string branchName, string neonDatabaseName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Delete; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Neon.Postgres/organizations/", false); + uri.AppendPath(organizationName, true); + uri.AppendPath("/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/branches/", false); + uri.AppendPath(branchName, true); + uri.AppendPath("/neonDatabases/", false); + uri.AppendPath(neonDatabaseName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Delete a NeonDatabase. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Neon Organizations resource. + /// The name of the Project. + /// The name of the Branch. + /// The name of the NeonDatabase. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , , or is an empty string, and was expected to be non-empty. + public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string organizationName, string projectName, string branchName, string neonDatabaseName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(organizationName, nameof(organizationName)); + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(branchName, nameof(branchName)); + Argument.AssertNotNullOrEmpty(neonDatabaseName, nameof(neonDatabaseName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, organizationName, projectName, branchName, neonDatabaseName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Delete a NeonDatabase. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Neon Organizations resource. + /// The name of the Project. + /// The name of the Branch. + /// The name of the NeonDatabase. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , , or is an empty string, and was expected to be non-empty. + public Response Delete(string subscriptionId, string resourceGroupName, string organizationName, string projectName, string branchName, string neonDatabaseName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(organizationName, nameof(organizationName)); + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(branchName, nameof(branchName)); + Argument.AssertNotNullOrEmpty(neonDatabaseName, nameof(neonDatabaseName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, organizationName, projectName, branchName, neonDatabaseName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListRequestUri(string subscriptionId, string resourceGroupName, string organizationName, string projectName, string branchName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Neon.Postgres/organizations/", false); + uri.AppendPath(organizationName, true); + uri.AppendPath("/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/branches/", false); + uri.AppendPath(branchName, true); + uri.AppendPath("/neonDatabases", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListRequest(string subscriptionId, string resourceGroupName, string organizationName, string projectName, string branchName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Neon.Postgres/organizations/", false); + uri.AppendPath(organizationName, true); + uri.AppendPath("/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/branches/", false); + uri.AppendPath(branchName, true); + uri.AppendPath("/neonDatabases", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List NeonDatabase resources by Branch. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Neon Organizations resource. + /// The name of the Project. + /// The name of the Branch. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task> ListAsync(string subscriptionId, string resourceGroupName, string organizationName, string projectName, string branchName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(organizationName, nameof(organizationName)); + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(branchName, nameof(branchName)); + + using var message = CreateListRequest(subscriptionId, resourceGroupName, organizationName, projectName, branchName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + NeonDatabaseListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = NeonDatabaseListResult.DeserializeNeonDatabaseListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List NeonDatabase resources by Branch. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Neon Organizations resource. + /// The name of the Project. + /// The name of the Branch. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response List(string subscriptionId, string resourceGroupName, string organizationName, string projectName, string branchName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(organizationName, nameof(organizationName)); + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(branchName, nameof(branchName)); + + using var message = CreateListRequest(subscriptionId, resourceGroupName, organizationName, projectName, branchName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + NeonDatabaseListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = NeonDatabaseListResult.DeserializeNeonDatabaseListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string organizationName, string projectName, string branchName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string organizationName, string projectName, string branchName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List NeonDatabase resources by Branch. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Neon Organizations resource. + /// The name of the Project. + /// The name of the Branch. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task> ListNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string organizationName, string projectName, string branchName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(organizationName, nameof(organizationName)); + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(branchName, nameof(branchName)); + + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, organizationName, projectName, branchName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + NeonDatabaseListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = NeonDatabaseListResult.DeserializeNeonDatabaseListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List NeonDatabase resources by Branch. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Neon Organizations resource. + /// The name of the Project. + /// The name of the Branch. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response ListNextPage(string nextLink, string subscriptionId, string resourceGroupName, string organizationName, string projectName, string branchName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(organizationName, nameof(organizationName)); + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(branchName, nameof(branchName)); + + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, organizationName, projectName, branchName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + NeonDatabaseListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = NeonDatabaseListResult.DeserializeNeonDatabaseListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/RestOperations/NeonRolesRestOperations.cs b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/RestOperations/NeonRolesRestOperations.cs new file mode 100644 index 000000000000..c0db69d7c50f --- /dev/null +++ b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/RestOperations/NeonRolesRestOperations.cs @@ -0,0 +1,701 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.NeonPostgres.Models; + +namespace Azure.ResourceManager.NeonPostgres +{ + internal partial class NeonRolesRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of NeonRolesRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// Service host. + /// The API version to use for this operation. + /// or is null. + public NeonRolesRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + { + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? new Uri("https://management.azure.com"); + _apiVersion = apiVersion ?? "2025-03-01"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string organizationName, string projectName, string branchName, string neonRoleName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Neon.Postgres/organizations/", false); + uri.AppendPath(organizationName, true); + uri.AppendPath("/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/branches/", false); + uri.AppendPath(branchName, true); + uri.AppendPath("/neonRoles/", false); + uri.AppendPath(neonRoleName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string organizationName, string projectName, string branchName, string neonRoleName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Neon.Postgres/organizations/", false); + uri.AppendPath(organizationName, true); + uri.AppendPath("/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/branches/", false); + uri.AppendPath(branchName, true); + uri.AppendPath("/neonRoles/", false); + uri.AppendPath(neonRoleName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get a NeonRole. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Neon Organizations resource. + /// The name of the Project. + /// The name of the Branch. + /// The name of the NeonRole. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , , or is an empty string, and was expected to be non-empty. + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string organizationName, string projectName, string branchName, string neonRoleName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(organizationName, nameof(organizationName)); + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(branchName, nameof(branchName)); + Argument.AssertNotNullOrEmpty(neonRoleName, nameof(neonRoleName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, organizationName, projectName, branchName, neonRoleName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + NeonRoleData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = NeonRoleData.DeserializeNeonRoleData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((NeonRoleData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get a NeonRole. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Neon Organizations resource. + /// The name of the Project. + /// The name of the Branch. + /// The name of the NeonRole. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , , or is an empty string, and was expected to be non-empty. + public Response Get(string subscriptionId, string resourceGroupName, string organizationName, string projectName, string branchName, string neonRoleName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(organizationName, nameof(organizationName)); + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(branchName, nameof(branchName)); + Argument.AssertNotNullOrEmpty(neonRoleName, nameof(neonRoleName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, organizationName, projectName, branchName, neonRoleName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + NeonRoleData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = NeonRoleData.DeserializeNeonRoleData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((NeonRoleData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, string resourceGroupName, string organizationName, string projectName, string branchName, string neonRoleName, NeonRoleData data) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Neon.Postgres/organizations/", false); + uri.AppendPath(organizationName, true); + uri.AppendPath("/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/branches/", false); + uri.AppendPath(branchName, true); + uri.AppendPath("/neonRoles/", false); + uri.AppendPath(neonRoleName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string organizationName, string projectName, string branchName, string neonRoleName, NeonRoleData data) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Put; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Neon.Postgres/organizations/", false); + uri.AppendPath(organizationName, true); + uri.AppendPath("/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/branches/", false); + uri.AppendPath(branchName, true); + uri.AppendPath("/neonRoles/", false); + uri.AppendPath(neonRoleName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(data, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Create a NeonRole. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Neon Organizations resource. + /// The name of the Project. + /// The name of the Branch. + /// The name of the NeonRole. + /// Resource create parameters. + /// The cancellation token to use. + /// , , , , , or is null. + /// , , , , or is an empty string, and was expected to be non-empty. + public async Task CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string organizationName, string projectName, string branchName, string neonRoleName, NeonRoleData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(organizationName, nameof(organizationName)); + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(branchName, nameof(branchName)); + Argument.AssertNotNullOrEmpty(neonRoleName, nameof(neonRoleName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, organizationName, projectName, branchName, neonRoleName, data); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 201: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Create a NeonRole. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Neon Organizations resource. + /// The name of the Project. + /// The name of the Branch. + /// The name of the NeonRole. + /// Resource create parameters. + /// The cancellation token to use. + /// , , , , , or is null. + /// , , , , or is an empty string, and was expected to be non-empty. + public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string organizationName, string projectName, string branchName, string neonRoleName, NeonRoleData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(organizationName, nameof(organizationName)); + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(branchName, nameof(branchName)); + Argument.AssertNotNullOrEmpty(neonRoleName, nameof(neonRoleName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, organizationName, projectName, branchName, neonRoleName, data); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 201: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateUpdateRequestUri(string subscriptionId, string resourceGroupName, string organizationName, string projectName, string branchName, string neonRoleName, NeonRoleData data) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Neon.Postgres/organizations/", false); + uri.AppendPath(organizationName, true); + uri.AppendPath("/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/branches/", false); + uri.AppendPath(branchName, true); + uri.AppendPath("/neonRoles/", false); + uri.AppendPath(neonRoleName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string organizationName, string projectName, string branchName, string neonRoleName, NeonRoleData data) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Patch; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Neon.Postgres/organizations/", false); + uri.AppendPath(organizationName, true); + uri.AppendPath("/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/branches/", false); + uri.AppendPath(branchName, true); + uri.AppendPath("/neonRoles/", false); + uri.AppendPath(neonRoleName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(data, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Update a NeonRole. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Neon Organizations resource. + /// The name of the Project. + /// The name of the Branch. + /// The name of the NeonRole. + /// The resource properties to be updated. + /// The cancellation token to use. + /// , , , , , or is null. + /// , , , , or is an empty string, and was expected to be non-empty. + public async Task UpdateAsync(string subscriptionId, string resourceGroupName, string organizationName, string projectName, string branchName, string neonRoleName, NeonRoleData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(organizationName, nameof(organizationName)); + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(branchName, nameof(branchName)); + Argument.AssertNotNullOrEmpty(neonRoleName, nameof(neonRoleName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, organizationName, projectName, branchName, neonRoleName, data); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Update a NeonRole. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Neon Organizations resource. + /// The name of the Project. + /// The name of the Branch. + /// The name of the NeonRole. + /// The resource properties to be updated. + /// The cancellation token to use. + /// , , , , , or is null. + /// , , , , or is an empty string, and was expected to be non-empty. + public Response Update(string subscriptionId, string resourceGroupName, string organizationName, string projectName, string branchName, string neonRoleName, NeonRoleData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(organizationName, nameof(organizationName)); + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(branchName, nameof(branchName)); + Argument.AssertNotNullOrEmpty(neonRoleName, nameof(neonRoleName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, organizationName, projectName, branchName, neonRoleName, data); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string organizationName, string projectName, string branchName, string neonRoleName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Neon.Postgres/organizations/", false); + uri.AppendPath(organizationName, true); + uri.AppendPath("/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/branches/", false); + uri.AppendPath(branchName, true); + uri.AppendPath("/neonRoles/", false); + uri.AppendPath(neonRoleName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string organizationName, string projectName, string branchName, string neonRoleName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Delete; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Neon.Postgres/organizations/", false); + uri.AppendPath(organizationName, true); + uri.AppendPath("/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/branches/", false); + uri.AppendPath(branchName, true); + uri.AppendPath("/neonRoles/", false); + uri.AppendPath(neonRoleName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Delete a NeonRole. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Neon Organizations resource. + /// The name of the Project. + /// The name of the Branch. + /// The name of the NeonRole. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , , or is an empty string, and was expected to be non-empty. + public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string organizationName, string projectName, string branchName, string neonRoleName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(organizationName, nameof(organizationName)); + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(branchName, nameof(branchName)); + Argument.AssertNotNullOrEmpty(neonRoleName, nameof(neonRoleName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, organizationName, projectName, branchName, neonRoleName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Delete a NeonRole. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Neon Organizations resource. + /// The name of the Project. + /// The name of the Branch. + /// The name of the NeonRole. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , , or is an empty string, and was expected to be non-empty. + public Response Delete(string subscriptionId, string resourceGroupName, string organizationName, string projectName, string branchName, string neonRoleName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(organizationName, nameof(organizationName)); + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(branchName, nameof(branchName)); + Argument.AssertNotNullOrEmpty(neonRoleName, nameof(neonRoleName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, organizationName, projectName, branchName, neonRoleName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListRequestUri(string subscriptionId, string resourceGroupName, string organizationName, string projectName, string branchName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Neon.Postgres/organizations/", false); + uri.AppendPath(organizationName, true); + uri.AppendPath("/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/branches/", false); + uri.AppendPath(branchName, true); + uri.AppendPath("/neonRoles", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListRequest(string subscriptionId, string resourceGroupName, string organizationName, string projectName, string branchName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Neon.Postgres/organizations/", false); + uri.AppendPath(organizationName, true); + uri.AppendPath("/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/branches/", false); + uri.AppendPath(branchName, true); + uri.AppendPath("/neonRoles", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List NeonRole resources by Branch. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Neon Organizations resource. + /// The name of the Project. + /// The name of the Branch. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task> ListAsync(string subscriptionId, string resourceGroupName, string organizationName, string projectName, string branchName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(organizationName, nameof(organizationName)); + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(branchName, nameof(branchName)); + + using var message = CreateListRequest(subscriptionId, resourceGroupName, organizationName, projectName, branchName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + NeonRoleListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = NeonRoleListResult.DeserializeNeonRoleListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List NeonRole resources by Branch. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Neon Organizations resource. + /// The name of the Project. + /// The name of the Branch. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response List(string subscriptionId, string resourceGroupName, string organizationName, string projectName, string branchName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(organizationName, nameof(organizationName)); + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(branchName, nameof(branchName)); + + using var message = CreateListRequest(subscriptionId, resourceGroupName, organizationName, projectName, branchName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + NeonRoleListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = NeonRoleListResult.DeserializeNeonRoleListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string organizationName, string projectName, string branchName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string organizationName, string projectName, string branchName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List NeonRole resources by Branch. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Neon Organizations resource. + /// The name of the Project. + /// The name of the Branch. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task> ListNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string organizationName, string projectName, string branchName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(organizationName, nameof(organizationName)); + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(branchName, nameof(branchName)); + + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, organizationName, projectName, branchName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + NeonRoleListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = NeonRoleListResult.DeserializeNeonRoleListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List NeonRole resources by Branch. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Neon Organizations resource. + /// The name of the Project. + /// The name of the Branch. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response ListNextPage(string nextLink, string subscriptionId, string resourceGroupName, string organizationName, string projectName, string branchName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(organizationName, nameof(organizationName)); + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(branchName, nameof(branchName)); + + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, organizationName, projectName, branchName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + NeonRoleListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = NeonRoleListResult.DeserializeNeonRoleListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/RestOperations/OrganizationsRestOperations.cs b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/RestOperations/OrganizationsRestOperations.cs index e528c86be1c8..c63d449c2906 100644 --- a/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/RestOperations/OrganizationsRestOperations.cs +++ b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/RestOperations/OrganizationsRestOperations.cs @@ -32,7 +32,7 @@ public OrganizationsRestOperations(HttpPipeline pipeline, string applicationId, { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-08-01-preview"; + _apiVersion = apiVersion ?? "2025-03-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -564,6 +564,101 @@ public Response ListBySubscription(string subscr } } + internal RequestUriBuilder CreateGetPostgresVersionsRequestUri(string subscriptionId, string resourceGroupName, PgVersion pgVersion) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Neon.Postgres/getPostgresVersions", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetPostgresVersionsRequest(string subscriptionId, string resourceGroupName, PgVersion pgVersion) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Neon.Postgres/getPostgresVersions", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + if (pgVersion != null) + { + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(pgVersion, ModelSerializationExtensions.WireOptions); + request.Content = content; + } + _userAgent.Apply(message); + return message; + } + + /// Action to retrieve the PostgreSQL versions. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Post Action to retrieve the PostgreSQL versions. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + public async Task> GetPostgresVersionsAsync(string subscriptionId, string resourceGroupName, PgVersion pgVersion = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + + using var message = CreateGetPostgresVersionsRequest(subscriptionId, resourceGroupName, pgVersion); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + PgVersionsResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = PgVersionsResult.DeserializePgVersionsResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Action to retrieve the PostgreSQL versions. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Post Action to retrieve the PostgreSQL versions. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + public Response GetPostgresVersions(string subscriptionId, string resourceGroupName, PgVersion pgVersion = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + + using var message = CreateGetPostgresVersionsRequest(subscriptionId, resourceGroupName, pgVersion); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + PgVersionsResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = PgVersionsResult.DeserializePgVersionsResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + internal RequestUriBuilder CreateListByResourceGroupNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName) { var uri = new RawRequestUriBuilder(); diff --git a/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/RestOperations/ProjectsRestOperations.cs b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/RestOperations/ProjectsRestOperations.cs new file mode 100644 index 000000000000..efb9ed1700bb --- /dev/null +++ b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/RestOperations/ProjectsRestOperations.cs @@ -0,0 +1,723 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.NeonPostgres.Models; + +namespace Azure.ResourceManager.NeonPostgres +{ + internal partial class ProjectsRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of ProjectsRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// Service host. + /// The API version to use for this operation. + /// or is null. + public ProjectsRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + { + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? new Uri("https://management.azure.com"); + _apiVersion = apiVersion ?? "2025-03-01"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string organizationName, string projectName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Neon.Postgres/organizations/", false); + uri.AppendPath(organizationName, true); + uri.AppendPath("/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string organizationName, string projectName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Neon.Postgres/organizations/", false); + uri.AppendPath(organizationName, true); + uri.AppendPath("/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get a Project. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Neon Organizations resource. + /// The name of the Project. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string organizationName, string projectName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(organizationName, nameof(organizationName)); + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, organizationName, projectName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ProjectData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = ProjectData.DeserializeProjectData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((ProjectData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get a Project. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Neon Organizations resource. + /// The name of the Project. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Get(string subscriptionId, string resourceGroupName, string organizationName, string projectName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(organizationName, nameof(organizationName)); + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, organizationName, projectName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ProjectData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = ProjectData.DeserializeProjectData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((ProjectData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, string resourceGroupName, string organizationName, string projectName, ProjectData data) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Neon.Postgres/organizations/", false); + uri.AppendPath(organizationName, true); + uri.AppendPath("/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string organizationName, string projectName, ProjectData data) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Put; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Neon.Postgres/organizations/", false); + uri.AppendPath(organizationName, true); + uri.AppendPath("/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(data, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Create a Project. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Neon Organizations resource. + /// The name of the Project. + /// Resource create parameters. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string organizationName, string projectName, ProjectData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(organizationName, nameof(organizationName)); + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, organizationName, projectName, data); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 201: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Create a Project. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Neon Organizations resource. + /// The name of the Project. + /// Resource create parameters. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string organizationName, string projectName, ProjectData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(organizationName, nameof(organizationName)); + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, organizationName, projectName, data); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 201: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateUpdateRequestUri(string subscriptionId, string resourceGroupName, string organizationName, string projectName, ProjectData data) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Neon.Postgres/organizations/", false); + uri.AppendPath(organizationName, true); + uri.AppendPath("/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string organizationName, string projectName, ProjectData data) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Patch; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Neon.Postgres/organizations/", false); + uri.AppendPath(organizationName, true); + uri.AppendPath("/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(data, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Update a Project. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Neon Organizations resource. + /// The name of the Project. + /// The resource properties to be updated. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task UpdateAsync(string subscriptionId, string resourceGroupName, string organizationName, string projectName, ProjectData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(organizationName, nameof(organizationName)); + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, organizationName, projectName, data); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Update a Project. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Neon Organizations resource. + /// The name of the Project. + /// The resource properties to be updated. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Update(string subscriptionId, string resourceGroupName, string organizationName, string projectName, ProjectData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(organizationName, nameof(organizationName)); + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, organizationName, projectName, data); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string organizationName, string projectName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Neon.Postgres/organizations/", false); + uri.AppendPath(organizationName, true); + uri.AppendPath("/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string organizationName, string projectName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Delete; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Neon.Postgres/organizations/", false); + uri.AppendPath(organizationName, true); + uri.AppendPath("/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Delete a Project. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Neon Organizations resource. + /// The name of the Project. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string organizationName, string projectName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(organizationName, nameof(organizationName)); + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, organizationName, projectName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Delete a Project. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Neon Organizations resource. + /// The name of the Project. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Delete(string subscriptionId, string resourceGroupName, string organizationName, string projectName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(organizationName, nameof(organizationName)); + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, organizationName, projectName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListRequestUri(string subscriptionId, string resourceGroupName, string organizationName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Neon.Postgres/organizations/", false); + uri.AppendPath(organizationName, true); + uri.AppendPath("/projects", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListRequest(string subscriptionId, string resourceGroupName, string organizationName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Neon.Postgres/organizations/", false); + uri.AppendPath(organizationName, true); + uri.AppendPath("/projects", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List Project resources by OrganizationResource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Neon Organizations resource. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListAsync(string subscriptionId, string resourceGroupName, string organizationName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(organizationName, nameof(organizationName)); + + using var message = CreateListRequest(subscriptionId, resourceGroupName, organizationName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ProjectListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = ProjectListResult.DeserializeProjectListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List Project resources by OrganizationResource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Neon Organizations resource. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response List(string subscriptionId, string resourceGroupName, string organizationName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(organizationName, nameof(organizationName)); + + using var message = CreateListRequest(subscriptionId, resourceGroupName, organizationName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ProjectListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = ProjectListResult.DeserializeProjectListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateGetConnectionUriRequestUri(string subscriptionId, string resourceGroupName, string organizationName, string projectName, ConnectionUriProperties connectionUriParameters) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Neon.Postgres/organizations/", false); + uri.AppendPath(organizationName, true); + uri.AppendPath("/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/getConnectionUri", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetConnectionUriRequest(string subscriptionId, string resourceGroupName, string organizationName, string projectName, ConnectionUriProperties connectionUriParameters) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Neon.Postgres/organizations/", false); + uri.AppendPath(organizationName, true); + uri.AppendPath("/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/getConnectionUri", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(connectionUriParameters, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Action to retrieve the connection URI for the Neon Database. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Neon Organizations resource. + /// The name of the Project. + /// Additional parameters for retrieving the database connection URI. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> GetConnectionUriAsync(string subscriptionId, string resourceGroupName, string organizationName, string projectName, ConnectionUriProperties connectionUriParameters, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(organizationName, nameof(organizationName)); + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNull(connectionUriParameters, nameof(connectionUriParameters)); + + using var message = CreateGetConnectionUriRequest(subscriptionId, resourceGroupName, organizationName, projectName, connectionUriParameters); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ConnectionUriProperties value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = ConnectionUriProperties.DeserializeConnectionUriProperties(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Action to retrieve the connection URI for the Neon Database. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Neon Organizations resource. + /// The name of the Project. + /// Additional parameters for retrieving the database connection URI. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response GetConnectionUri(string subscriptionId, string resourceGroupName, string organizationName, string projectName, ConnectionUriProperties connectionUriParameters, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(organizationName, nameof(organizationName)); + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNull(connectionUriParameters, nameof(connectionUriParameters)); + + using var message = CreateGetConnectionUriRequest(subscriptionId, resourceGroupName, organizationName, projectName, connectionUriParameters); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ConnectionUriProperties value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = ConnectionUriProperties.DeserializeConnectionUriProperties(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string organizationName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string organizationName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List Project resources by OrganizationResource. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Neon Organizations resource. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string organizationName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(organizationName, nameof(organizationName)); + + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, organizationName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ProjectListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = ProjectListResult.DeserializeProjectListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List Project resources by OrganizationResource. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Neon Organizations resource. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ListNextPage(string nextLink, string subscriptionId, string resourceGroupName, string organizationName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(organizationName, nameof(organizationName)); + + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, organizationName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ProjectListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = ProjectListResult.DeserializeProjectListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/tsp-location.yaml b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/tsp-location.yaml index 4216dd4fa9fb..7f6e9ab0ff15 100644 --- a/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/tsp-location.yaml +++ b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/tsp-location.yaml @@ -1,3 +1,4 @@ directory: specification/liftrneon/Neon.Postgres.Management -commit: 462574dbd02088c209bb1da3eef0d93f699e8de2 +commit: af51fab0cc00ba3eaee7e4710e8fec5894d4bb0c repo: Azure/azure-rest-api-specs +additionalDirectories: diff --git a/sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDb/tsp-location.yaml b/sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDb/tsp-location.yaml new file mode 100644 index 000000000000..03d9677c7eab --- /dev/null +++ b/sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDb/tsp-location.yaml @@ -0,0 +1,4 @@ +directory: specification/liftrpinecone/Pinecone.VectorDb.Management +commit: af51fab0cc00ba3eaee7e4710e8fec5894d4bb0c +repo: Azure/azure-rest-api-specs +additionalDirectories: 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..8fda09b7d62f 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: af51fab0cc00ba3eaee7e4710e8fec5894d4bb0c 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/resourcemanager/ci.mgmt.yml b/sdk/resourcemanager/ci.mgmt.yml index 4e3c032f60a4..466f1335c58e 100644 --- a/sdk/resourcemanager/ci.mgmt.yml +++ b/sdk/resourcemanager/ci.mgmt.yml @@ -79,6 +79,7 @@ trigger: - sdk/digitaltwins/Azure.ResourceManager.DigitalTwins - sdk/dns/Azure.ResourceManager.Dns - sdk/dnsresolver/Azure.ResourceManager.DnsResolver + - sdk/durabletask/Azure.ResourceManager.DurableTask - sdk/dynatrace/Azure.ResourceManager.Dynatrace - sdk/edgeorder/Azure.ResourceManager.EdgeOrder - sdk/edgezones/Azure.ResourceManager.EdgeZones @@ -288,6 +289,7 @@ pr: - sdk/digitaltwins/Azure.ResourceManager.DigitalTwins - sdk/dns/Azure.ResourceManager.Dns - sdk/dnsresolver/Azure.ResourceManager.DnsResolver + - sdk/durabletask/Azure.ResourceManager.DurableTask - sdk/dynatrace/Azure.ResourceManager.Dynatrace - sdk/edgeorder/Azure.ResourceManager.EdgeOrder - sdk/edgezones/Azure.ResourceManager.EdgeZones 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..00cc06a754c4 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: af51fab0cc00ba3eaee7e4710e8fec5894d4bb0c 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/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 2a73ebd28170..936a49c51d54 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: 7bc390ce48e29aeb16d6521472b781813b146343 -repo: Azure/azure-rest-api-specs \ No newline at end of file +directory: specification/standbypool/StandbyPool.Management +commit: af51fab0cc00ba3eaee7e4710e8fec5894d4bb0c +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/