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..d01dcd19bdb3 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: 5cc63ed55e6f4769b156f767154839d0d18a7d05 +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..ebe6576c636f --- /dev/null +++ b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/tspCodeModel.json @@ -0,0 +1,15757 @@ +{ + "$id": "1", + "name": "Microsoft.ComputeSchedule", + "apiVersions": [ + "2024-10-01", + "2025-05-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": [] + }, + { + "$id": "64", + "kind": "enumvalue", + "name": "2025-05-01", + "value": "2025-05-01", + "valueType": { + "$id": "65", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "60" + }, + "doc": "2025-05-01 version", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.ComputeSchedule", + "doc": "ComputeSchedule API versions", + "isFixed": true, + "isFlags": false, + "usage": "ApiVersionEnum", + "decorators": [] + } + ], + "models": [ + { + "$id": "66", + "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": "67", + "kind": "property", + "name": "value", + "serializedName": "value", + "doc": "The Operation items on this page", + "type": { + "$id": "68", + "kind": "array", + "name": "ArrayOperation", + "valueType": { + "$id": "69", + "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": "70", + "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": "71", + "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": "72", + "json": { + "$id": "73", + "name": "name" + } + } + }, + { + "$id": "74", + "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": "75", + "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": "76", + "json": { + "$id": "77", + "name": "isDataAction" + } + } + }, + { + "$id": "78", + "kind": "property", + "name": "display", + "serializedName": "display", + "doc": "Localized display information for this particular operation.", + "type": { + "$id": "79", + "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": "80", + "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": "81", + "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": "82", + "json": { + "$id": "83", + "name": "provider" + } + } + }, + { + "$id": "84", + "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": "85", + "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": "86", + "json": { + "$id": "87", + "name": "resource" + } + } + }, + { + "$id": "88", + "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": "89", + "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": "90", + "json": { + "$id": "91", + "name": "operation" + } + } + }, + { + "$id": "92", + "kind": "property", + "name": "description", + "serializedName": "description", + "doc": "The short, localized friendly description of the operation; suitable for tool tips and detailed views.", + "type": { + "$id": "93", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.OperationDisplay.description", + "serializationOptions": { + "$id": "94", + "json": { + "$id": "95", + "name": "description" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.Operation.display", + "serializationOptions": { + "$id": "96", + "json": { + "$id": "97", + "name": "display" + } + } + }, + { + "$id": "98", + "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": "99", + "json": { + "$id": "100", + "name": "origin" + } + } + }, + { + "$id": "101", + "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": "102", + "json": { + "$id": "103", + "name": "actionType" + } + } + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.OperationListResult.value", + "serializationOptions": { + "$id": "104", + "json": { + "$id": "105", + "name": "value" + } + } + }, + { + "$id": "106", + "kind": "property", + "name": "nextLink", + "serializedName": "nextLink", + "doc": "The link to the next page of items", + "type": { + "$id": "107", + "kind": "url", + "name": "ResourceLocation", + "crossLanguageDefinitionId": "TypeSpec.Rest.ResourceLocation", + "baseType": { + "$id": "108", + "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": "109", + "json": { + "$id": "110", + "name": "nextLink" + } + } + } + ] + }, + { + "$ref": "69" + }, + { + "$ref": "79" + }, + { + "$id": "111", + "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": "112", + "kind": "property", + "name": "error", + "serializedName": "error", + "doc": "The error object.", + "type": { + "$id": "113", + "kind": "model", + "name": "ErrorDetail", + "namespace": "Azure.ResourceManager.ComputeSchedule", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorDetail", + "usage": "Json,Exception", + "doc": "The error detail.", + "decorators": [], + "properties": [ + { + "$id": "114", + "kind": "property", + "name": "code", + "serializedName": "code", + "doc": "The error code.", + "type": { + "$id": "115", + "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": "116", + "json": { + "$id": "117", + "name": "code" + } + } + }, + { + "$id": "118", + "kind": "property", + "name": "message", + "serializedName": "message", + "doc": "The error message.", + "type": { + "$id": "119", + "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": "120", + "json": { + "$id": "121", + "name": "message" + } + } + }, + { + "$id": "122", + "kind": "property", + "name": "target", + "serializedName": "target", + "doc": "The error target.", + "type": { + "$id": "123", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorDetail.target", + "serializationOptions": { + "$id": "124", + "json": { + "$id": "125", + "name": "target" + } + } + }, + { + "$id": "126", + "kind": "property", + "name": "details", + "serializedName": "details", + "doc": "The error details.", + "type": { + "$id": "127", + "kind": "array", + "name": "ArrayErrorDetail", + "valueType": { + "$ref": "113" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorDetail.details", + "serializationOptions": { + "$id": "128", + "json": { + "$id": "129", + "name": "details" + } + } + }, + { + "$id": "130", + "kind": "property", + "name": "additionalInfo", + "serializedName": "additionalInfo", + "doc": "The error additional info.", + "type": { + "$id": "131", + "kind": "array", + "name": "ArrayErrorAdditionalInfo", + "valueType": { + "$id": "132", + "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": "133", + "kind": "property", + "name": "type", + "serializedName": "type", + "doc": "The additional info type.", + "type": { + "$id": "134", + "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": "135", + "json": { + "$id": "136", + "name": "type" + } + } + }, + { + "$id": "137", + "kind": "property", + "name": "info", + "serializedName": "info", + "doc": "The additional info.", + "type": { + "$id": "138", + "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": "139", + "json": { + "$id": "140", + "name": "info" + } + } + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorDetail.additionalInfo", + "serializationOptions": { + "$id": "141", + "json": { + "$id": "142", + "name": "additionalInfo" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorResponse.error", + "serializationOptions": { + "$id": "143", + "json": { + "$id": "144", + "name": "error" + } + } + } + ] + }, + { + "$ref": "113" + }, + { + "$ref": "132" + }, + { + "$ref": "138" + }, + { + "$id": "145", + "kind": "model", + "name": "SubmitDeallocateRequest", + "namespace": "Azure.ResourceManager.ComputeSchedule", + "crossLanguageDefinitionId": "Microsoft.ComputeSchedule.SubmitDeallocateRequest", + "usage": "Input,Json", + "doc": "The deallocate request for resources", + "decorators": [], + "properties": [ + { + "$id": "146", + "kind": "property", + "name": "schedule", + "serializedName": "schedule", + "doc": "The schedule for the request", + "type": { + "$id": "147", + "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": "148", + "kind": "property", + "name": "deadline", + "serializedName": "deadline", + "doc": "The deadline for the operation", + "type": { + "$id": "149", + "kind": "offsetDateTime", + "name": "offsetDateTime", + "encode": "rfc3339", + "wireType": { + "$id": "150", + "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": "151", + "json": { + "$id": "152", + "name": "deadline" + } + } + }, + { + "$id": "153", + "kind": "property", + "name": "userRequestDeadline", + "serializedName": "deadLine", + "doc": "The deadline for the operation", + "type": { + "$id": "154", + "kind": "offsetDateTime", + "name": "offsetDateTime", + "encode": "rfc3339", + "wireType": { + "$id": "155", + "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": "156", + "json": { + "$id": "157", + "name": "deadLine" + } + } + }, + { + "$id": "158", + "kind": "property", + "name": "timezone", + "serializedName": "timezone", + "doc": "The timezone for the operation", + "type": { + "$id": "159", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ComputeSchedule.Schedule.timezone", + "serializationOptions": { + "$id": "160", + "json": { + "$id": "161", + "name": "timezone" + } + } + }, + { + "$id": "162", + "kind": "property", + "name": "userRequestTimezone", + "serializedName": "timeZone", + "doc": "The timezone for the operation", + "type": { + "$id": "163", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ComputeSchedule.Schedule.timeZone", + "serializationOptions": { + "$id": "164", + "json": { + "$id": "165", + "name": "timeZone" + } + } + }, + { + "$id": "166", + "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": "167", + "json": { + "$id": "168", + "name": "deadlineType" + } + } + } + ] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ComputeSchedule.SubmitDeallocateRequest.schedule", + "serializationOptions": { + "$id": "169", + "json": { + "$id": "170", + "name": "schedule" + } + } + }, + { + "$id": "171", + "kind": "property", + "name": "executionParameters", + "serializedName": "executionParameters", + "doc": "The execution parameters for the request", + "type": { + "$id": "172", + "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": "173", + "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": "174", + "json": { + "$id": "175", + "name": "optimizationPreference" + } + } + }, + { + "$id": "176", + "kind": "property", + "name": "retryPolicy", + "serializedName": "retryPolicy", + "doc": "Retry policy the user can pass", + "type": { + "$id": "177", + "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": "178", + "kind": "property", + "name": "retryCount", + "serializedName": "retryCount", + "doc": "Retry count for user request", + "type": { + "$id": "179", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ComputeSchedule.RetryPolicy.retryCount", + "serializationOptions": { + "$id": "180", + "json": { + "$id": "181", + "name": "retryCount" + } + } + }, + { + "$id": "182", + "kind": "property", + "name": "retryWindowInMinutes", + "serializedName": "retryWindowInMinutes", + "doc": "Retry window in minutes for user request", + "type": { + "$id": "183", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ComputeSchedule.RetryPolicy.retryWindowInMinutes", + "serializationOptions": { + "$id": "184", + "json": { + "$id": "185", + "name": "retryWindowInMinutes" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ComputeSchedule.ExecutionParameters.retryPolicy", + "serializationOptions": { + "$id": "186", + "json": { + "$id": "187", + "name": "retryPolicy" + } + } + } + ] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ComputeSchedule.SubmitDeallocateRequest.executionParameters", + "serializationOptions": { + "$id": "188", + "json": { + "$id": "189", + "name": "executionParameters" + } + } + }, + { + "$id": "190", + "kind": "property", + "name": "resources", + "serializedName": "resources", + "doc": "The resources for the request", + "type": { + "$id": "191", + "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": "192", + "kind": "property", + "name": "ids", + "serializedName": "ids", + "doc": "The resource ids used for the request", + "type": { + "$id": "193", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "194", + "kind": "string", + "name": "armResourceIdentifier", + "crossLanguageDefinitionId": "Azure.Core.armResourceIdentifier", + "baseType": { + "$id": "195", + "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": "196", + "json": { + "$id": "197", + "name": "ids" + } + } + } + ] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ComputeSchedule.SubmitDeallocateRequest.resources", + "serializationOptions": { + "$id": "198", + "json": { + "$id": "199", + "name": "resources" + } + } + }, + { + "$id": "200", + "kind": "property", + "name": "correlationId", + "serializedName": "correlationid", + "doc": "CorrelationId item", + "type": { + "$id": "201", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ComputeSchedule.SubmitDeallocateRequest.correlationid", + "serializationOptions": { + "$id": "202", + "json": { + "$id": "203", + "name": "correlationid" + } + } + } + ] + }, + { + "$ref": "147" + }, + { + "$ref": "172" + }, + { + "$ref": "177" + }, + { + "$ref": "191" + }, + { + "$id": "204", + "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": "205", + "kind": "property", + "name": "description", + "serializedName": "description", + "doc": "The description of the operation response", + "type": { + "$id": "206", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ComputeSchedule.DeallocateResourceOperationResponse.description", + "serializationOptions": { + "$id": "207", + "json": { + "$id": "208", + "name": "description" + } + } + }, + { + "$id": "209", + "kind": "property", + "name": "ResourceType", + "serializedName": "type", + "doc": "The type of resources used in the deallocate request eg virtual machines", + "type": { + "$id": "210", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ComputeSchedule.DeallocateResourceOperationResponse.type", + "serializationOptions": { + "$id": "211", + "json": { + "$id": "212", + "name": "type" + } + } + }, + { + "$id": "213", + "kind": "property", + "name": "location", + "serializedName": "location", + "doc": "The location of the deallocate request eg westus", + "type": { + "$id": "214", + "kind": "string", + "name": "azureLocation", + "crossLanguageDefinitionId": "Azure.Core.azureLocation", + "baseType": { + "$id": "215", + "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": "216", + "json": { + "$id": "217", + "name": "location" + } + } + }, + { + "$id": "218", + "kind": "property", + "name": "results", + "serializedName": "results", + "doc": "The results from the deallocate request if no errors exist", + "type": { + "$id": "219", + "kind": "array", + "name": "ArrayResourceOperation", + "valueType": { + "$id": "220", + "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": "221", + "kind": "property", + "name": "resourceId", + "serializedName": "resourceId", + "doc": "Unique identifier for the resource involved in the operation, eg ArmId", + "type": { + "$id": "222", + "kind": "string", + "name": "armResourceIdentifier", + "crossLanguageDefinitionId": "Azure.Core.armResourceIdentifier", + "baseType": { + "$id": "223", + "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": "224", + "json": { + "$id": "225", + "name": "resourceId" + } + } + }, + { + "$id": "226", + "kind": "property", + "name": "errorCode", + "serializedName": "errorCode", + "doc": "Resource level error code if it exists", + "type": { + "$id": "227", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ComputeSchedule.ResourceOperation.errorCode", + "serializationOptions": { + "$id": "228", + "json": { + "$id": "229", + "name": "errorCode" + } + } + }, + { + "$id": "230", + "kind": "property", + "name": "errorDetails", + "serializedName": "errorDetails", + "doc": "Resource level error details if they exist", + "type": { + "$id": "231", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ComputeSchedule.ResourceOperation.errorDetails", + "serializationOptions": { + "$id": "232", + "json": { + "$id": "233", + "name": "errorDetails" + } + } + }, + { + "$id": "234", + "kind": "property", + "name": "operation", + "serializedName": "operation", + "doc": "Details of the operation performed on a resource", + "type": { + "$id": "235", + "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": "236", + "kind": "property", + "name": "operationId", + "serializedName": "operationId", + "doc": "Operation identifier for the unique operation", + "type": { + "$id": "237", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ComputeSchedule.ResourceOperationDetails.operationId", + "serializationOptions": { + "$id": "238", + "json": { + "$id": "239", + "name": "operationId" + } + } + }, + { + "$id": "240", + "kind": "property", + "name": "resourceId", + "serializedName": "resourceId", + "doc": "Unique identifier for the resource involved in the operation, eg ArmId", + "type": { + "$id": "241", + "kind": "string", + "name": "armResourceIdentifier", + "crossLanguageDefinitionId": "Azure.Core.armResourceIdentifier", + "baseType": { + "$id": "242", + "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": "243", + "json": { + "$id": "244", + "name": "resourceId" + } + } + }, + { + "$id": "245", + "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": "246", + "json": { + "$id": "247", + "name": "opType" + } + } + }, + { + "$id": "248", + "kind": "property", + "name": "subscriptionId", + "serializedName": "subscriptionId", + "doc": "Subscription id attached to the request", + "type": { + "$id": "249", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ComputeSchedule.ResourceOperationDetails.subscriptionId", + "serializationOptions": { + "$id": "250", + "json": { + "$id": "251", + "name": "subscriptionId" + } + } + }, + { + "$id": "252", + "kind": "property", + "name": "deadline", + "serializedName": "deadline", + "doc": "Deadline for the operation", + "type": { + "$id": "253", + "kind": "offsetDateTime", + "name": "offsetDateTime", + "encode": "rfc3339", + "wireType": { + "$id": "254", + "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": "255", + "json": { + "$id": "256", + "name": "deadline" + } + } + }, + { + "$id": "257", + "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": "258", + "json": { + "$id": "259", + "name": "deadlineType" + } + } + }, + { + "$id": "260", + "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": "261", + "json": { + "$id": "262", + "name": "state" + } + } + }, + { + "$id": "263", + "kind": "property", + "name": "timezone", + "serializedName": "timezone", + "doc": "Timezone for the operation", + "type": { + "$id": "264", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ComputeSchedule.ResourceOperationDetails.timezone", + "serializationOptions": { + "$id": "265", + "json": { + "$id": "266", + "name": "timezone" + } + } + }, + { + "$id": "267", + "kind": "property", + "name": "operationTimezone", + "serializedName": "timeZone", + "doc": "Timezone for the operation", + "type": { + "$id": "268", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ComputeSchedule.ResourceOperationDetails.timeZone", + "serializationOptions": { + "$id": "269", + "json": { + "$id": "270", + "name": "timeZone" + } + } + }, + { + "$id": "271", + "kind": "property", + "name": "resourceOperationError", + "serializedName": "resourceOperationError", + "doc": "Operation level errors if they exist", + "type": { + "$id": "272", + "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": "273", + "kind": "property", + "name": "errorCode", + "serializedName": "errorCode", + "doc": "Code for the error eg 404, 500", + "type": { + "$id": "274", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ComputeSchedule.ResourceOperationError.errorCode", + "serializationOptions": { + "$id": "275", + "json": { + "$id": "276", + "name": "errorCode" + } + } + }, + { + "$id": "277", + "kind": "property", + "name": "errorDetails", + "serializedName": "errorDetails", + "doc": "Detailed message about the error", + "type": { + "$id": "278", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ComputeSchedule.ResourceOperationError.errorDetails", + "serializationOptions": { + "$id": "279", + "json": { + "$id": "280", + "name": "errorDetails" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ComputeSchedule.ResourceOperationDetails.resourceOperationError", + "serializationOptions": { + "$id": "281", + "json": { + "$id": "282", + "name": "resourceOperationError" + } + } + }, + { + "$id": "283", + "kind": "property", + "name": "completedAt", + "serializedName": "completedAt", + "doc": "Time the operation was complete if errors are null", + "type": { + "$id": "284", + "kind": "offsetDateTime", + "name": "offsetDateTime", + "encode": "rfc3339", + "wireType": { + "$id": "285", + "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": "286", + "json": { + "$id": "287", + "name": "completedAt" + } + } + }, + { + "$id": "288", + "kind": "property", + "name": "retryPolicy", + "serializedName": "retryPolicy", + "doc": "Retry policy the user can pass", + "type": { + "$ref": "177" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ComputeSchedule.ResourceOperationDetails.retryPolicy", + "serializationOptions": { + "$id": "289", + "json": { + "$id": "290", + "name": "retryPolicy" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ComputeSchedule.ResourceOperation.operation", + "serializationOptions": { + "$id": "291", + "json": { + "$id": "292", + "name": "operation" + } + } + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ComputeSchedule.DeallocateResourceOperationResponse.results", + "serializationOptions": { + "$id": "293", + "json": { + "$id": "294", + "name": "results" + } + } + } + ] + }, + { + "$ref": "220" + }, + { + "$ref": "235" + }, + { + "$ref": "272" + }, + { + "$id": "295", + "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": "296", + "kind": "property", + "name": "schedule", + "serializedName": "schedule", + "doc": "The schedule for the request", + "type": { + "$ref": "147" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ComputeSchedule.SubmitHibernateRequest.schedule", + "serializationOptions": { + "$id": "297", + "json": { + "$id": "298", + "name": "schedule" + } + } + }, + { + "$id": "299", + "kind": "property", + "name": "executionParameters", + "serializedName": "executionParameters", + "doc": "The execution parameters for the request", + "type": { + "$ref": "172" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ComputeSchedule.SubmitHibernateRequest.executionParameters", + "serializationOptions": { + "$id": "300", + "json": { + "$id": "301", + "name": "executionParameters" + } + } + }, + { + "$id": "302", + "kind": "property", + "name": "resources", + "serializedName": "resources", + "doc": "The resources for the request", + "type": { + "$ref": "191" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ComputeSchedule.SubmitHibernateRequest.resources", + "serializationOptions": { + "$id": "303", + "json": { + "$id": "304", + "name": "resources" + } + } + }, + { + "$id": "305", + "kind": "property", + "name": "correlationId", + "serializedName": "correlationid", + "doc": "CorrelationId item", + "type": { + "$id": "306", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ComputeSchedule.SubmitHibernateRequest.correlationid", + "serializationOptions": { + "$id": "307", + "json": { + "$id": "308", + "name": "correlationid" + } + } + } + ] + }, + { + "$id": "309", + "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": "310", + "kind": "property", + "name": "description", + "serializedName": "description", + "doc": "The description of the operation response", + "type": { + "$id": "311", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ComputeSchedule.HibernateResourceOperationResponse.description", + "serializationOptions": { + "$id": "312", + "json": { + "$id": "313", + "name": "description" + } + } + }, + { + "$id": "314", + "kind": "property", + "name": "ResourceType", + "serializedName": "type", + "doc": "The type of resources used in the Hibernate request eg virtual machines", + "type": { + "$id": "315", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ComputeSchedule.HibernateResourceOperationResponse.type", + "serializationOptions": { + "$id": "316", + "json": { + "$id": "317", + "name": "type" + } + } + }, + { + "$id": "318", + "kind": "property", + "name": "location", + "serializedName": "location", + "doc": "The location of the Hibernate request eg westus", + "type": { + "$id": "319", + "kind": "string", + "name": "azureLocation", + "crossLanguageDefinitionId": "Azure.Core.azureLocation", + "baseType": { + "$id": "320", + "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": "321", + "json": { + "$id": "322", + "name": "location" + } + } + }, + { + "$id": "323", + "kind": "property", + "name": "results", + "serializedName": "results", + "doc": "The results from the Hibernate request if no errors exist", + "type": { + "$id": "324", + "kind": "array", + "name": "ArrayResourceOperation", + "valueType": { + "$ref": "220" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ComputeSchedule.HibernateResourceOperationResponse.results", + "serializationOptions": { + "$id": "325", + "json": { + "$id": "326", + "name": "results" + } + } + } + ] + }, + { + "$id": "327", + "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": "328", + "kind": "property", + "name": "schedule", + "serializedName": "schedule", + "doc": "The schedule for the request", + "type": { + "$ref": "147" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ComputeSchedule.SubmitStartRequest.schedule", + "serializationOptions": { + "$id": "329", + "json": { + "$id": "330", + "name": "schedule" + } + } + }, + { + "$id": "331", + "kind": "property", + "name": "executionParameters", + "serializedName": "executionParameters", + "doc": "The execution parameters for the request", + "type": { + "$ref": "172" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ComputeSchedule.SubmitStartRequest.executionParameters", + "serializationOptions": { + "$id": "332", + "json": { + "$id": "333", + "name": "executionParameters" + } + } + }, + { + "$id": "334", + "kind": "property", + "name": "resources", + "serializedName": "resources", + "doc": "The resources for the request", + "type": { + "$ref": "191" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ComputeSchedule.SubmitStartRequest.resources", + "serializationOptions": { + "$id": "335", + "json": { + "$id": "336", + "name": "resources" + } + } + }, + { + "$id": "337", + "kind": "property", + "name": "correlationId", + "serializedName": "correlationid", + "doc": "CorrelationId item", + "type": { + "$id": "338", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ComputeSchedule.SubmitStartRequest.correlationid", + "serializationOptions": { + "$id": "339", + "json": { + "$id": "340", + "name": "correlationid" + } + } + } + ] + }, + { + "$id": "341", + "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": "342", + "kind": "property", + "name": "description", + "serializedName": "description", + "doc": "The description of the operation response", + "type": { + "$id": "343", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ComputeSchedule.StartResourceOperationResponse.description", + "serializationOptions": { + "$id": "344", + "json": { + "$id": "345", + "name": "description" + } + } + }, + { + "$id": "346", + "kind": "property", + "name": "ResourceType", + "serializedName": "type", + "doc": "The type of resources used in the start request eg virtual machines", + "type": { + "$id": "347", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ComputeSchedule.StartResourceOperationResponse.type", + "serializationOptions": { + "$id": "348", + "json": { + "$id": "349", + "name": "type" + } + } + }, + { + "$id": "350", + "kind": "property", + "name": "location", + "serializedName": "location", + "doc": "The location of the start request eg westus", + "type": { + "$id": "351", + "kind": "string", + "name": "azureLocation", + "crossLanguageDefinitionId": "Azure.Core.azureLocation", + "baseType": { + "$id": "352", + "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": "353", + "json": { + "$id": "354", + "name": "location" + } + } + }, + { + "$id": "355", + "kind": "property", + "name": "results", + "serializedName": "results", + "doc": "The results from the start request if no errors exist", + "type": { + "$id": "356", + "kind": "array", + "name": "ArrayResourceOperation", + "valueType": { + "$ref": "220" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ComputeSchedule.StartResourceOperationResponse.results", + "serializationOptions": { + "$id": "357", + "json": { + "$id": "358", + "name": "results" + } + } + } + ] + }, + { + "$id": "359", + "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": "360", + "kind": "property", + "name": "executionParameters", + "serializedName": "executionParameters", + "doc": "The execution parameters for the request", + "type": { + "$ref": "172" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ComputeSchedule.ExecuteDeallocateRequest.executionParameters", + "serializationOptions": { + "$id": "361", + "json": { + "$id": "362", + "name": "executionParameters" + } + } + }, + { + "$id": "363", + "kind": "property", + "name": "resources", + "serializedName": "resources", + "doc": "The resources for the request", + "type": { + "$ref": "191" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ComputeSchedule.ExecuteDeallocateRequest.resources", + "serializationOptions": { + "$id": "364", + "json": { + "$id": "365", + "name": "resources" + } + } + }, + { + "$id": "366", + "kind": "property", + "name": "correlationId", + "serializedName": "correlationid", + "doc": "CorrelationId item", + "type": { + "$id": "367", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ComputeSchedule.ExecuteDeallocateRequest.correlationid", + "serializationOptions": { + "$id": "368", + "json": { + "$id": "369", + "name": "correlationid" + } + } + } + ] + }, + { + "$id": "370", + "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": "371", + "kind": "property", + "name": "executionParameters", + "serializedName": "executionParameters", + "doc": "The execution parameters for the request", + "type": { + "$ref": "172" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ComputeSchedule.ExecuteHibernateRequest.executionParameters", + "serializationOptions": { + "$id": "372", + "json": { + "$id": "373", + "name": "executionParameters" + } + } + }, + { + "$id": "374", + "kind": "property", + "name": "resources", + "serializedName": "resources", + "doc": "The resources for the request", + "type": { + "$ref": "191" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ComputeSchedule.ExecuteHibernateRequest.resources", + "serializationOptions": { + "$id": "375", + "json": { + "$id": "376", + "name": "resources" + } + } + }, + { + "$id": "377", + "kind": "property", + "name": "correlationId", + "serializedName": "correlationid", + "doc": "CorrelationId item", + "type": { + "$id": "378", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ComputeSchedule.ExecuteHibernateRequest.correlationid", + "serializationOptions": { + "$id": "379", + "json": { + "$id": "380", + "name": "correlationid" + } + } + } + ] + }, + { + "$id": "381", + "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": "382", + "kind": "property", + "name": "executionParameters", + "serializedName": "executionParameters", + "doc": "The execution parameters for the request", + "type": { + "$ref": "172" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ComputeSchedule.ExecuteStartRequest.executionParameters", + "serializationOptions": { + "$id": "383", + "json": { + "$id": "384", + "name": "executionParameters" + } + } + }, + { + "$id": "385", + "kind": "property", + "name": "resources", + "serializedName": "resources", + "doc": "The resources for the request", + "type": { + "$ref": "191" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ComputeSchedule.ExecuteStartRequest.resources", + "serializationOptions": { + "$id": "386", + "json": { + "$id": "387", + "name": "resources" + } + } + }, + { + "$id": "388", + "kind": "property", + "name": "correlationId", + "serializedName": "correlationid", + "doc": "CorrelationId item", + "type": { + "$id": "389", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ComputeSchedule.ExecuteStartRequest.correlationid", + "serializationOptions": { + "$id": "390", + "json": { + "$id": "391", + "name": "correlationid" + } + } + } + ] + }, + { + "$id": "392", + "kind": "model", + "name": "ExecuteCreateRequest", + "namespace": "Azure.ResourceManager.ComputeSchedule", + "crossLanguageDefinitionId": "Microsoft.ComputeSchedule.ExecuteCreateRequest", + "usage": "Input,Json", + "doc": "The ExecuteCreateRequest request for create operations", + "decorators": [], + "properties": [ + { + "$id": "393", + "kind": "property", + "name": "resourceConfigParameters", + "serializedName": "resourceConfigParameters", + "doc": "resource creation payload", + "type": { + "$id": "394", + "kind": "model", + "name": "ResourceProvisionPayload", + "namespace": "Azure.ResourceManager.ComputeSchedule", + "crossLanguageDefinitionId": "Microsoft.ComputeSchedule.ResourceProvisionPayload", + "usage": "Input,Json", + "doc": "Resource creation data model", + "decorators": [], + "properties": [ + { + "$id": "395", + "kind": "property", + "name": "baseProfile", + "serializedName": "baseProfile", + "doc": "baseProfile, Resource properties that common across all resources ", + "type": { + "$id": "396", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ComputeSchedule.ResourceProvisionPayload.baseProfile", + "serializationOptions": { + "$id": "397", + "json": { + "$id": "398", + "name": "baseProfile" + } + } + }, + { + "$id": "399", + "kind": "property", + "name": "resourceOverrides", + "serializedName": "resourceOverrides", + "doc": "resourceOverrides, properties per resource that needs to be overwritted from baseProfile", + "type": { + "$id": "400", + "kind": "array", + "name": "Array1", + "valueType": { + "$id": "401", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ComputeSchedule.ResourceProvisionPayload.resourceOverrides", + "serializationOptions": { + "$id": "402", + "json": { + "$id": "403", + "name": "resourceOverrides" + } + } + }, + { + "$id": "404", + "kind": "property", + "name": "resourceCount", + "serializedName": "resourceCount", + "doc": "Number of resources to be created", + "type": { + "$id": "405", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ComputeSchedule.ResourceProvisionPayload.resourceCount", + "serializationOptions": { + "$id": "406", + "json": { + "$id": "407", + "name": "resourceCount" + } + } + }, + { + "$id": "408", + "kind": "property", + "name": "resourcePrefix", + "serializedName": "resourcePrefix", + "doc": "if resourceOverrides doesn't contain \"name\", service will create name based of prefix and ResourceCount e.g. resourceprefix-0,resourceprefix-1..", + "type": { + "$id": "409", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ComputeSchedule.ResourceProvisionPayload.resourcePrefix", + "serializationOptions": { + "$id": "410", + "json": { + "$id": "411", + "name": "resourcePrefix" + } + } + } + ] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ComputeSchedule.ExecuteCreateRequest.resourceConfigParameters", + "serializationOptions": { + "$id": "412", + "json": { + "$id": "413", + "name": "resourceConfigParameters" + } + } + }, + { + "$id": "414", + "kind": "property", + "name": "executionParameters", + "serializedName": "executionParameters", + "doc": "The execution parameters for the request", + "type": { + "$ref": "172" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ComputeSchedule.ExecuteCreateRequest.executionParameters", + "serializationOptions": { + "$id": "415", + "json": { + "$id": "416", + "name": "executionParameters" + } + } + }, + { + "$id": "417", + "kind": "property", + "name": "correlationid", + "serializedName": "correlationid", + "doc": "CorrelationId item", + "type": { + "$id": "418", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ComputeSchedule.ExecuteCreateRequest.correlationid", + "serializationOptions": { + "$id": "419", + "json": { + "$id": "420", + "name": "correlationid" + } + } + } + ] + }, + { + "$ref": "394" + }, + { + "$id": "421", + "kind": "model", + "name": "CreateResourceOperationResponse", + "namespace": "Azure.ResourceManager.ComputeSchedule", + "crossLanguageDefinitionId": "Microsoft.ComputeSchedule.CreateResourceOperationResponse", + "usage": "Output,Json", + "doc": "The response from a create request", + "decorators": [], + "properties": [ + { + "$id": "422", + "kind": "property", + "name": "description", + "serializedName": "description", + "doc": "The description of the operation response", + "type": { + "$id": "423", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ComputeSchedule.CreateResourceOperationResponse.description", + "serializationOptions": { + "$id": "424", + "json": { + "$id": "425", + "name": "description" + } + } + }, + { + "$id": "426", + "kind": "property", + "name": "type", + "serializedName": "type", + "doc": "The type of resources used in the create request eg virtual machines", + "type": { + "$id": "427", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ComputeSchedule.CreateResourceOperationResponse.type", + "serializationOptions": { + "$id": "428", + "json": { + "$id": "429", + "name": "type" + } + } + }, + { + "$id": "430", + "kind": "property", + "name": "location", + "serializedName": "location", + "doc": "The location of the start request eg westus", + "type": { + "$id": "431", + "kind": "string", + "name": "azureLocation", + "crossLanguageDefinitionId": "Azure.Core.azureLocation", + "baseType": { + "$id": "432", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ComputeSchedule.CreateResourceOperationResponse.location", + "serializationOptions": { + "$id": "433", + "json": { + "$id": "434", + "name": "location" + } + } + }, + { + "$id": "435", + "kind": "property", + "name": "results", + "serializedName": "results", + "doc": "The results from the start request if no errors exist", + "type": { + "$id": "436", + "kind": "array", + "name": "ArrayResourceOperation", + "valueType": { + "$ref": "220" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ComputeSchedule.CreateResourceOperationResponse.results", + "serializationOptions": { + "$id": "437", + "json": { + "$id": "438", + "name": "results" + } + } + } + ] + }, + { + "$id": "439", + "kind": "model", + "name": "ExecuteDeleteRequest", + "namespace": "Azure.ResourceManager.ComputeSchedule", + "crossLanguageDefinitionId": "Microsoft.ComputeSchedule.ExecuteDeleteRequest", + "usage": "Input,Json", + "doc": "The ExecuteDeleteRequest request for delete operations", + "decorators": [], + "properties": [ + { + "$id": "440", + "kind": "property", + "name": "executionParameters", + "serializedName": "executionParameters", + "doc": "The execution parameters for the request", + "type": { + "$ref": "172" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ComputeSchedule.ExecuteDeleteRequest.executionParameters", + "serializationOptions": { + "$id": "441", + "json": { + "$id": "442", + "name": "executionParameters" + } + } + }, + { + "$id": "443", + "kind": "property", + "name": "resources", + "serializedName": "resources", + "doc": "The resources for the request", + "type": { + "$ref": "191" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ComputeSchedule.ExecuteDeleteRequest.resources", + "serializationOptions": { + "$id": "444", + "json": { + "$id": "445", + "name": "resources" + } + } + }, + { + "$id": "446", + "kind": "property", + "name": "correlationid", + "serializedName": "correlationid", + "doc": "CorrelationId item", + "type": { + "$id": "447", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ComputeSchedule.ExecuteDeleteRequest.correlationid", + "serializationOptions": { + "$id": "448", + "json": { + "$id": "449", + "name": "correlationid" + } + } + }, + { + "$id": "450", + "kind": "property", + "name": "forceDeletion", + "serializedName": "forceDeletion", + "doc": "Forced delete resource item", + "type": { + "$id": "451", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ComputeSchedule.ExecuteDeleteRequest.forceDeletion", + "serializationOptions": { + "$id": "452", + "json": { + "$id": "453", + "name": "forceDeletion" + } + } + } + ] + }, + { + "$id": "454", + "kind": "model", + "name": "DeleteResourceOperationResponse", + "namespace": "Azure.ResourceManager.ComputeSchedule", + "crossLanguageDefinitionId": "Microsoft.ComputeSchedule.DeleteResourceOperationResponse", + "usage": "Output,Json", + "doc": "The response from a delete request", + "decorators": [], + "properties": [ + { + "$id": "455", + "kind": "property", + "name": "description", + "serializedName": "description", + "doc": "The description of the operation response", + "type": { + "$id": "456", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ComputeSchedule.DeleteResourceOperationResponse.description", + "serializationOptions": { + "$id": "457", + "json": { + "$id": "458", + "name": "description" + } + } + }, + { + "$id": "459", + "kind": "property", + "name": "type", + "serializedName": "type", + "doc": "The type of resources used in the delete request eg virtual machines", + "type": { + "$id": "460", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ComputeSchedule.DeleteResourceOperationResponse.type", + "serializationOptions": { + "$id": "461", + "json": { + "$id": "462", + "name": "type" + } + } + }, + { + "$id": "463", + "kind": "property", + "name": "location", + "serializedName": "location", + "doc": "The location of the start request eg westus", + "type": { + "$id": "464", + "kind": "string", + "name": "azureLocation", + "crossLanguageDefinitionId": "Azure.Core.azureLocation", + "baseType": { + "$id": "465", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ComputeSchedule.DeleteResourceOperationResponse.location", + "serializationOptions": { + "$id": "466", + "json": { + "$id": "467", + "name": "location" + } + } + }, + { + "$id": "468", + "kind": "property", + "name": "results", + "serializedName": "results", + "doc": "The results from the start request if no errors exist", + "type": { + "$id": "469", + "kind": "array", + "name": "ArrayResourceOperation", + "valueType": { + "$ref": "220" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ComputeSchedule.DeleteResourceOperationResponse.results", + "serializationOptions": { + "$id": "470", + "json": { + "$id": "471", + "name": "results" + } + } + } + ] + }, + { + "$id": "472", + "kind": "model", + "name": "SubmitCreateRequest", + "namespace": "Azure.ResourceManager.ComputeSchedule", + "crossLanguageDefinitionId": "Microsoft.ComputeSchedule.SubmitCreateRequest", + "usage": "Input,Json", + "doc": "The SubmitCreateRequest request for create operations", + "decorators": [], + "properties": [ + { + "$id": "473", + "kind": "property", + "name": "schedule", + "serializedName": "schedule", + "doc": "The schedule for the request", + "type": { + "$ref": "147" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ComputeSchedule.SubmitCreateRequest.schedule", + "serializationOptions": { + "$id": "474", + "json": { + "$id": "475", + "name": "schedule" + } + } + }, + { + "$id": "476", + "kind": "property", + "name": "resourceConfigParameters", + "serializedName": "resourceConfigParameters", + "doc": "resource creation payload", + "type": { + "$ref": "394" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ComputeSchedule.SubmitCreateRequest.resourceConfigParameters", + "serializationOptions": { + "$id": "477", + "json": { + "$id": "478", + "name": "resourceConfigParameters" + } + } + }, + { + "$id": "479", + "kind": "property", + "name": "executionParameters", + "serializedName": "executionParameters", + "doc": "The execution parameters for the request", + "type": { + "$ref": "172" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ComputeSchedule.SubmitCreateRequest.executionParameters", + "serializationOptions": { + "$id": "480", + "json": { + "$id": "481", + "name": "executionParameters" + } + } + }, + { + "$id": "482", + "kind": "property", + "name": "correlationid", + "serializedName": "correlationid", + "doc": "CorrelationId item", + "type": { + "$id": "483", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ComputeSchedule.SubmitCreateRequest.correlationid", + "serializationOptions": { + "$id": "484", + "json": { + "$id": "485", + "name": "correlationid" + } + } + } + ] + }, + { + "$id": "486", + "kind": "model", + "name": "SubmitDeleteRequest", + "namespace": "Azure.ResourceManager.ComputeSchedule", + "crossLanguageDefinitionId": "Microsoft.ComputeSchedule.SubmitDeleteRequest", + "usage": "Input,Json", + "doc": "The SubmitDeleteRequest request for delete operations", + "decorators": [], + "properties": [ + { + "$id": "487", + "kind": "property", + "name": "schedule", + "serializedName": "schedule", + "doc": "The schedule for the request", + "type": { + "$ref": "147" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ComputeSchedule.SubmitDeleteRequest.schedule", + "serializationOptions": { + "$id": "488", + "json": { + "$id": "489", + "name": "schedule" + } + } + }, + { + "$id": "490", + "kind": "property", + "name": "executionParameters", + "serializedName": "executionParameters", + "doc": "The execution parameters for the request", + "type": { + "$ref": "172" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ComputeSchedule.SubmitDeleteRequest.executionParameters", + "serializationOptions": { + "$id": "491", + "json": { + "$id": "492", + "name": "executionParameters" + } + } + }, + { + "$id": "493", + "kind": "property", + "name": "resources", + "serializedName": "resources", + "doc": "The resources for the request", + "type": { + "$ref": "191" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ComputeSchedule.SubmitDeleteRequest.resources", + "serializationOptions": { + "$id": "494", + "json": { + "$id": "495", + "name": "resources" + } + } + }, + { + "$id": "496", + "kind": "property", + "name": "correlationid", + "serializedName": "correlationid", + "doc": "CorrelationId item", + "type": { + "$id": "497", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ComputeSchedule.SubmitDeleteRequest.correlationid", + "serializationOptions": { + "$id": "498", + "json": { + "$id": "499", + "name": "correlationid" + } + } + }, + { + "$id": "500", + "kind": "property", + "name": "forceDeletion", + "serializedName": "forceDeletion", + "doc": "Forced delete resource item", + "type": { + "$id": "501", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ComputeSchedule.SubmitDeleteRequest.forceDeletion", + "serializationOptions": { + "$id": "502", + "json": { + "$id": "503", + "name": "forceDeletion" + } + } + } + ] + }, + { + "$id": "504", + "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": "505", + "kind": "property", + "name": "operationIds", + "serializedName": "operationIds", + "doc": "The list of operation ids to get the status of", + "type": { + "$id": "506", + "kind": "array", + "name": "Array1", + "valueType": { + "$id": "507", + "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": "508", + "json": { + "$id": "509", + "name": "operationIds" + } + } + }, + { + "$id": "510", + "kind": "property", + "name": "correlationId", + "serializedName": "correlationid", + "doc": "CorrelationId item", + "type": { + "$id": "511", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ComputeSchedule.GetOperationStatusRequest.correlationid", + "serializationOptions": { + "$id": "512", + "json": { + "$id": "513", + "name": "correlationid" + } + } + } + ] + }, + { + "$id": "514", + "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": "515", + "kind": "property", + "name": "results", + "serializedName": "results", + "doc": "An array of resource operations based on their operation ids", + "type": { + "$id": "516", + "kind": "array", + "name": "ArrayResourceOperation", + "valueType": { + "$ref": "220" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ComputeSchedule.GetOperationStatusResponse.results", + "serializationOptions": { + "$id": "517", + "json": { + "$id": "518", + "name": "results" + } + } + } + ] + }, + { + "$id": "519", + "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": "520", + "kind": "property", + "name": "operationIds", + "serializedName": "operationIds", + "doc": "The list of operation ids to cancel operations on", + "type": { + "$id": "521", + "kind": "array", + "name": "Array1", + "valueType": { + "$id": "522", + "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": "523", + "json": { + "$id": "524", + "name": "operationIds" + } + } + }, + { + "$id": "525", + "kind": "property", + "name": "correlationId", + "serializedName": "correlationid", + "doc": "CorrelationId item", + "type": { + "$id": "526", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ComputeSchedule.CancelOperationsRequest.correlationid", + "serializationOptions": { + "$id": "527", + "json": { + "$id": "528", + "name": "correlationid" + } + } + } + ] + }, + { + "$id": "529", + "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": "530", + "kind": "property", + "name": "results", + "serializedName": "results", + "doc": "An array of resource operations that were successfully cancelled", + "type": { + "$id": "531", + "kind": "array", + "name": "ArrayResourceOperation", + "valueType": { + "$ref": "220" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ComputeSchedule.CancelOperationsResponse.results", + "serializationOptions": { + "$id": "532", + "json": { + "$id": "533", + "name": "results" + } + } + } + ] + }, + { + "$id": "534", + "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": "535", + "kind": "property", + "name": "operationIds", + "serializedName": "operationIds", + "doc": "The list of operation ids to query errors of", + "type": { + "$id": "536", + "kind": "array", + "name": "Array1", + "valueType": { + "$id": "537", + "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": "538", + "json": { + "$id": "539", + "name": "operationIds" + } + } + } + ] + }, + { + "$id": "540", + "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": "541", + "kind": "property", + "name": "results", + "serializedName": "results", + "doc": "An array of operationids and their corresponding errors if any", + "type": { + "$id": "542", + "kind": "array", + "name": "ArrayOperationErrorsResult", + "valueType": { + "$id": "543", + "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": "544", + "kind": "property", + "name": "operationId", + "serializedName": "operationId", + "doc": "The operationId identifying a vm operation", + "type": { + "$id": "545", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ComputeSchedule.OperationErrorsResult.operationId", + "serializationOptions": { + "$id": "546", + "json": { + "$id": "547", + "name": "operationId" + } + } + }, + { + "$id": "548", + "kind": "property", + "name": "creationTime", + "serializedName": "creationTime", + "doc": "The creation time of the error result", + "type": { + "$id": "549", + "kind": "offsetDateTime", + "name": "offsetDateTime", + "encode": "rfc3339", + "wireType": { + "$id": "550", + "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": "551", + "json": { + "$id": "552", + "name": "creationTime" + } + } + }, + { + "$id": "553", + "kind": "property", + "name": "activationTime", + "serializedName": "activationTime", + "doc": "The activation time of a vm operation", + "type": { + "$id": "554", + "kind": "offsetDateTime", + "name": "offsetDateTime", + "encode": "rfc3339", + "wireType": { + "$id": "555", + "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": "556", + "json": { + "$id": "557", + "name": "activationTime" + } + } + }, + { + "$id": "558", + "kind": "property", + "name": "completedAt", + "serializedName": "completedAt", + "doc": "The completion time of the operation if the operation was completed", + "type": { + "$id": "559", + "kind": "offsetDateTime", + "name": "offsetDateTime", + "encode": "rfc3339", + "wireType": { + "$id": "560", + "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": "561", + "json": { + "$id": "562", + "name": "completedAt" + } + } + }, + { + "$id": "563", + "kind": "property", + "name": "operationErrors", + "serializedName": "operationErrors", + "doc": "A list of errors associated with the operationid", + "type": { + "$id": "564", + "kind": "array", + "name": "ArrayOperationErrorDetails", + "valueType": { + "$id": "565", + "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": "566", + "kind": "property", + "name": "errorCode", + "serializedName": "errorCode", + "doc": "The error code of the operation", + "type": { + "$id": "567", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ComputeSchedule.OperationErrorDetails.errorCode", + "serializationOptions": { + "$id": "568", + "json": { + "$id": "569", + "name": "errorCode" + } + } + }, + { + "$id": "570", + "kind": "property", + "name": "errorDetails", + "serializedName": "errorDetails", + "doc": "The error details of the operation", + "type": { + "$id": "571", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ComputeSchedule.OperationErrorDetails.errorDetails", + "serializationOptions": { + "$id": "572", + "json": { + "$id": "573", + "name": "errorDetails" + } + } + }, + { + "$id": "574", + "kind": "property", + "name": "timestamp", + "serializedName": "timestamp", + "doc": "The timestamp of the error occurence", + "type": { + "$id": "575", + "kind": "offsetDateTime", + "name": "offsetDateTime", + "encode": "rfc3339", + "wireType": { + "$id": "576", + "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": "577", + "json": { + "$id": "578", + "name": "timestamp" + } + } + }, + { + "$id": "579", + "kind": "property", + "name": "errorDetailsTimestamp", + "serializedName": "timeStamp", + "doc": "The timestamp of the error occurence", + "type": { + "$id": "580", + "kind": "offsetDateTime", + "name": "offsetDateTime", + "encode": "rfc3339", + "wireType": { + "$id": "581", + "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": "582", + "json": { + "$id": "583", + "name": "timeStamp" + } + } + }, + { + "$id": "584", + "kind": "property", + "name": "azureOperationName", + "serializedName": "azureOperationName", + "doc": "The compute operationid of the Start/Deallocate/Hibernate request", + "type": { + "$id": "585", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ComputeSchedule.OperationErrorDetails.azureOperationName", + "serializationOptions": { + "$id": "586", + "json": { + "$id": "587", + "name": "azureOperationName" + } + } + }, + { + "$id": "588", + "kind": "property", + "name": "crpOperationId", + "serializedName": "crpOperationId", + "doc": "The compute operationid of the Start/Deallocate/Hibernate request", + "type": { + "$id": "589", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ComputeSchedule.OperationErrorDetails.crpOperationId", + "serializationOptions": { + "$id": "590", + "json": { + "$id": "591", + "name": "crpOperationId" + } + } + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ComputeSchedule.OperationErrorsResult.operationErrors", + "serializationOptions": { + "$id": "592", + "json": { + "$id": "593", + "name": "operationErrors" + } + } + }, + { + "$id": "594", + "kind": "property", + "name": "requestErrorCode", + "serializedName": "requestErrorCode", + "doc": "Request level error code", + "type": { + "$id": "595", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ComputeSchedule.OperationErrorsResult.requestErrorCode", + "serializationOptions": { + "$id": "596", + "json": { + "$id": "597", + "name": "requestErrorCode" + } + } + }, + { + "$id": "598", + "kind": "property", + "name": "requestErrorDetails", + "serializedName": "requestErrorDetails", + "doc": "Request level error details", + "type": { + "$id": "599", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ComputeSchedule.OperationErrorsResult.requestErrorDetails", + "serializationOptions": { + "$id": "600", + "json": { + "$id": "601", + "name": "requestErrorDetails" + } + } + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ComputeSchedule.GetOperationErrorsResponse.results", + "serializationOptions": { + "$id": "602", + "json": { + "$id": "603", + "name": "results" + } + } + } + ] + }, + { + "$ref": "543" + }, + { + "$ref": "565" + } + ], + "clients": [ + { + "$id": "604", + "kind": "client", + "name": "ComputeScheduleClient", + "namespace": "Azure.ResourceManager.ComputeSchedule", + "doc": "Microsoft.ComputeSchedule Resource Provider management API.", + "methods": [], + "parameters": [ + { + "$id": "605", + "name": "endpoint", + "nameInRequest": "endpoint", + "doc": "Service host", + "type": { + "$id": "606", + "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": "607", + "type": { + "$id": "608", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "https://management.azure.com" + } + } + ], + "decorators": [ + { + "$id": "609", + "name": "TypeSpec.@service", + "arguments": { + "$id": "610", + "options": { + "$id": "611", + "title": "Microsoft.ComputeSchedule" + } + } + } + ], + "crossLanguageDefinitionId": "Microsoft.ComputeSchedule", + "apiVersions": [ + "2024-08-15-preview", + "2024-10-01", + "2025-05-01" + ], + "children": [ + { + "$id": "612", + "kind": "client", + "name": "Operations", + "namespace": "Azure.ResourceManager.ComputeSchedule", + "methods": [ + { + "$id": "613", + "kind": "paging", + "name": "list", + "accessibility": "public", + "apiVersions": [ + "2024-08-15-preview", + "2024-10-01", + "2025-05-01" + ], + "doc": "List the operations for the provider", + "operation": { + "$id": "614", + "name": "list", + "resourceName": "Operations", + "doc": "List the operations for the provider", + "accessibility": "public", + "parameters": [ + { + "$id": "615", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "616", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "617", + "type": { + "$id": "618", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-05-01" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "619", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "620", + "kind": "constant", + "valueType": { + "$id": "621", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "622", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "66" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "GET", + "uri": "{endpoint}", + "path": "/providers/Microsoft.ComputeSchedule/operations", + "bufferResponse": true, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Azure.ResourceManager.Operations.list", + "decorators": [], + "examples": [ + { + "$id": "623", + "kind": "http", + "name": "Operations_List_MaximumSet_Gen - generated by [MaximumSet] rule - generated by [MaximumSet] rule - generated by [MaximumSet] rule", + "description": "Operations_List_MaximumSet_Gen - generated by [MaximumSet] rule - generated by [MaximumSet] rule - generated by [MaximumSet] rule", + "filePath": "2025-05-01/Operations_List_MaximumSet_Gen.json", + "parameters": [ + { + "$id": "624", + "parameter": { + "$ref": "615" + }, + "value": { + "$id": "625", + "kind": "string", + "type": { + "$ref": "616" + }, + "value": "2025-05-01" + } + } + ], + "responses": [ + { + "$id": "626", + "response": { + "$ref": "622" + }, + "statusCode": 200, + "bodyValue": { + "$id": "627", + "kind": "model", + "type": { + "$ref": "66" + }, + "value": { + "$id": "628", + "value": { + "$id": "629", + "kind": "array", + "type": { + "$ref": "68" + }, + "value": [ + { + "$id": "630", + "kind": "model", + "type": { + "$ref": "69" + }, + "value": { + "$id": "631", + "name": { + "$id": "632", + "kind": "string", + "type": { + "$ref": "71" + }, + "value": "ldqzcrujeitsnm" + }, + "isDataAction": { + "$id": "633", + "kind": "boolean", + "type": { + "$ref": "75" + }, + "value": true + }, + "display": { + "$id": "634", + "kind": "model", + "type": { + "$ref": "79" + }, + "value": { + "$id": "635", + "provider": { + "$id": "636", + "kind": "string", + "type": { + "$ref": "81" + }, + "value": "oxdxyfefyvtxexszpvt" + }, + "resource": { + "$id": "637", + "kind": "string", + "type": { + "$ref": "85" + }, + "value": "icchvmkobgsviwonpruioyd" + }, + "operation": { + "$id": "638", + "kind": "string", + "type": { + "$ref": "89" + }, + "value": "ibqrspiv" + }, + "description": { + "$id": "639", + "kind": "string", + "type": { + "$ref": "93" + }, + "value": "gbqvalxlkg" + } + } + }, + "origin": { + "$id": "640", + "kind": "string", + "type": { + "$ref": "2" + }, + "value": "user" + }, + "actionType": { + "$id": "641", + "kind": "string", + "type": { + "$ref": "10" + }, + "value": "Internal" + } + } + } + ] + }, + "nextLink": { + "$id": "642", + "kind": "string", + "type": { + "$ref": "107" + }, + "value": "https://microsoft.com/a" + } + } + } + } + ] + }, + { + "$id": "643", + "kind": "http", + "name": "Operations_List_MaximumSet_Gen - generated by [MaximumSet] rule - generated by [MaximumSet] rule - generated by [MinimumSet] rule", + "description": "Operations_List_MaximumSet_Gen - generated by [MaximumSet] rule - generated by [MaximumSet] rule - generated by [MinimumSet] rule", + "filePath": "2025-05-01/Operations_List_MinimumSet_Gen.json", + "parameters": [ + { + "$id": "644", + "parameter": { + "$ref": "615" + }, + "value": { + "$id": "645", + "kind": "string", + "type": { + "$ref": "616" + }, + "value": "2025-05-01" + } + } + ], + "responses": [ + { + "$id": "646", + "response": { + "$ref": "622" + }, + "statusCode": 200, + "bodyValue": { + "$id": "647", + "kind": "model", + "type": { + "$ref": "66" + }, + "value": { + "$id": "648" + } + } + } + ] + } + ] + }, + "parameters": [ + { + "$id": "649", + "name": "accept", + "nameInRequest": "accept", + "type": { + "$ref": "620" + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "response": { + "$id": "650", + "type": { + "$id": "651", + "kind": "array", + "name": "ArrayOperation", + "valueType": { + "$ref": "69" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "resultSegments": [ + "value" + ] + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Azure.ResourceManager.Operations.list", + "pagingMetadata": { + "$id": "652", + "itemPropertySegments": [ + "value" + ], + "nextLink": { + "$id": "653", + "responseSegments": [ + "nextLink" + ], + "responseLocation": "Body" + } + } + } + ], + "parameters": [ + { + "$id": "654", + "name": "endpoint", + "nameInRequest": "endpoint", + "doc": "Service host", + "type": { + "$id": "655", + "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": "656", + "type": { + "$id": "657", + "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", + "2025-05-01" + ], + "parent": { + "$ref": "604" + } + }, + { + "$id": "658", + "kind": "client", + "name": "ScheduledActions", + "namespace": "Azure.ResourceManager.ComputeSchedule", + "methods": [ + { + "$id": "659", + "kind": "basic", + "name": "SubmitVirtualMachineDeallocate", + "accessibility": "public", + "apiVersions": [ + "2024-08-15-preview", + "2024-10-01", + "2025-05-01" + ], + "doc": "VirtualMachinesSubmitDeallocate: Schedule deallocate operation for a batch of virtual machines at datetime in future.", + "operation": { + "$id": "660", + "name": "SubmitVirtualMachineDeallocate", + "resourceName": "ScheduledActions", + "doc": "VirtualMachinesSubmitDeallocate: Schedule deallocate operation for a batch of virtual machines at datetime in future.", + "accessibility": "public", + "parameters": [ + { + "$id": "661", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "662", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "663", + "type": { + "$id": "664", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-05-01" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "665", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "666", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "667", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "668", + "name": "locationparameter", + "nameInRequest": "locationparameter", + "doc": "The location name.", + "type": { + "$id": "669", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "670", + "name": "contentType", + "nameInRequest": "Content-Type", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$id": "671", + "kind": "constant", + "valueType": { + "$id": "672", + "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": "673", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "674", + "kind": "constant", + "valueType": { + "$id": "675", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "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": "676", + "name": "requestBody", + "nameInRequest": "requestBody", + "doc": "The request body", + "type": { + "$ref": "145" + }, + "location": "Body", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "677", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "204" + }, + "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": "678", + "kind": "http", + "name": "ScheduledActions_VirtualMachinesSubmitDeallocate_MaximumSet_Gen - generated by [MaximumSet] rule - generated by [MaximumSet] rule - generated by [MaximumSet] rule", + "description": "ScheduledActions_VirtualMachinesSubmitDeallocate_MaximumSet_Gen - generated by [MaximumSet] rule - generated by [MaximumSet] rule - generated by [MaximumSet] rule", + "filePath": "2025-05-01/ScheduledActions_VirtualMachinesSubmitDeallocate_MaximumSet_Gen.json", + "parameters": [ + { + "$id": "679", + "parameter": { + "$ref": "661" + }, + "value": { + "$id": "680", + "kind": "string", + "type": { + "$ref": "662" + }, + "value": "2025-05-01" + } + }, + { + "$id": "681", + "parameter": { + "$ref": "665" + }, + "value": { + "$id": "682", + "kind": "string", + "type": { + "$ref": "666" + }, + "value": "0505D8E4-D41A-48FB-9CA5-4AF8D93BE75F" + } + }, + { + "$id": "683", + "parameter": { + "$ref": "668" + }, + "value": { + "$id": "684", + "kind": "string", + "type": { + "$ref": "669" + }, + "value": "mqlftjjfnzubxpricsgstgjojaoah" + } + }, + { + "$id": "685", + "parameter": { + "$ref": "676" + }, + "value": { + "$id": "686", + "kind": "model", + "type": { + "$ref": "145" + }, + "value": { + "$id": "687", + "schedule": { + "$id": "688", + "kind": "model", + "type": { + "$ref": "147" + }, + "value": { + "$id": "689", + "deadline": { + "$id": "690", + "kind": "string", + "type": { + "$ref": "149" + }, + "value": "2025-04-15T19:47:04.403Z" + }, + "deadLine": { + "$id": "691", + "kind": "string", + "type": { + "$ref": "154" + }, + "value": "2025-04-15T19:47:04.403Z" + }, + "timezone": { + "$id": "692", + "kind": "string", + "type": { + "$ref": "159" + }, + "value": "qacufsmctpgjozovlsihrzoctatcsj" + }, + "timeZone": { + "$id": "693", + "kind": "string", + "type": { + "$ref": "163" + }, + "value": "upnmayfebiadztdktxzq" + }, + "deadlineType": { + "$id": "694", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Unknown" + } + } + }, + "executionParameters": { + "$id": "695", + "kind": "model", + "type": { + "$ref": "172" + }, + "value": { + "$id": "696", + "optimizationPreference": { + "$id": "697", + "kind": "string", + "type": { + "$ref": "22" + }, + "value": "Cost" + }, + "retryPolicy": { + "$id": "698", + "kind": "model", + "type": { + "$ref": "177" + }, + "value": { + "$id": "699", + "retryCount": { + "$id": "700", + "kind": "number", + "type": { + "$ref": "179" + }, + "value": 25 + }, + "retryWindowInMinutes": { + "$id": "701", + "kind": "number", + "type": { + "$ref": "183" + }, + "value": 4 + } + } + } + } + }, + "resources": { + "$id": "702", + "kind": "model", + "type": { + "$ref": "191" + }, + "value": { + "$id": "703", + "ids": { + "$id": "704", + "kind": "array", + "type": { + "$ref": "193" + }, + "value": [ + { + "$id": "705", + "kind": "string", + "type": { + "$ref": "194" + }, + "value": "/subscriptions/YourSubscriptionId/resourceGroups/YourResourceGroupName/providers/Microsoft.Compute/virtualMachines/testResource3" + } + ] + } + } + }, + "correlationid": { + "$id": "706", + "kind": "string", + "type": { + "$ref": "201" + }, + "value": "evmwonebfzxenjdpucgcwdjdya" + } + } + } + } + ], + "responses": [ + { + "$id": "707", + "response": { + "$ref": "677" + }, + "statusCode": 200, + "bodyValue": { + "$id": "708", + "kind": "model", + "type": { + "$ref": "204" + }, + "value": { + "$id": "709", + "type": { + "$id": "710", + "kind": "string", + "type": { + "$ref": "210" + }, + "value": "fpnhqvrtbqizlylnwy" + }, + "location": { + "$id": "711", + "kind": "string", + "type": { + "$ref": "214" + }, + "value": "hhioerbsucdqayxk" + }, + "results": { + "$id": "712", + "kind": "array", + "type": { + "$ref": "219" + }, + "value": [ + { + "$id": "713", + "kind": "model", + "type": { + "$ref": "220" + }, + "value": { + "$id": "714", + "resourceId": { + "$id": "715", + "kind": "string", + "type": { + "$ref": "222" + }, + "value": "/subscriptions/YourSubscriptionId/resourceGroups/YourResourceGroupName/providers/Microsoft.Compute/virtualMachines/testResource3" + }, + "errorCode": { + "$id": "716", + "kind": "string", + "type": { + "$ref": "227" + }, + "value": "ynukyltendgmn" + }, + "errorDetails": { + "$id": "717", + "kind": "string", + "type": { + "$ref": "231" + }, + "value": "tifeuh" + }, + "operation": { + "$id": "718", + "kind": "model", + "type": { + "$ref": "235" + }, + "value": { + "$id": "719", + "operationId": { + "$id": "720", + "kind": "string", + "type": { + "$ref": "237" + }, + "value": "vppyaxq" + }, + "resourceId": { + "$id": "721", + "kind": "string", + "type": { + "$ref": "241" + }, + "value": "/subscriptions/YourSubscriptionId/resourceGroups/YourResourceGroupName/providers/Microsoft.Compute/virtualMachines/testResource3" + }, + "opType": { + "$id": "722", + "kind": "string", + "type": { + "$ref": "30" + }, + "value": "Unknown" + }, + "subscriptionId": { + "$id": "723", + "kind": "string", + "type": { + "$ref": "249" + }, + "value": "vofvsus" + }, + "deadline": { + "$id": "724", + "kind": "string", + "type": { + "$ref": "253" + }, + "value": "2025-04-15T19:47:03.591Z" + }, + "deadlineType": { + "$id": "725", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Unknown" + }, + "state": { + "$id": "726", + "kind": "string", + "type": { + "$ref": "40" + }, + "value": "Unknown" + }, + "timezone": { + "$id": "727", + "kind": "string", + "type": { + "$ref": "264" + }, + "value": "nwugsooykqggcokphgdj" + }, + "timeZone": { + "$id": "728", + "kind": "string", + "type": { + "$ref": "268" + }, + "value": "qkxnxnumvfqmsmpyccv" + }, + "resourceOperationError": { + "$id": "729", + "kind": "model", + "type": { + "$ref": "272" + }, + "value": { + "$id": "730", + "errorCode": { + "$id": "731", + "kind": "string", + "type": { + "$ref": "274" + }, + "value": "fagfsojftlff" + }, + "errorDetails": { + "$id": "732", + "kind": "string", + "type": { + "$ref": "278" + }, + "value": "rtihrkjasrjkllqccuysjrg" + } + } + }, + "completedAt": { + "$id": "733", + "kind": "string", + "type": { + "$ref": "284" + }, + "value": "2025-04-15T19:47:03.591Z" + }, + "retryPolicy": { + "$id": "734", + "kind": "model", + "type": { + "$ref": "177" + }, + "value": { + "$id": "735", + "retryCount": { + "$id": "736", + "kind": "number", + "type": { + "$ref": "179" + }, + "value": 25 + }, + "retryWindowInMinutes": { + "$id": "737", + "kind": "number", + "type": { + "$ref": "183" + }, + "value": 4 + } + } + } + } + } + } + } + ] + }, + "description": { + "$id": "738", + "kind": "string", + "type": { + "$ref": "206" + }, + "value": "zknbxgebvymhzzmsbrlaqreub" + } + } + } + } + ] + }, + { + "$id": "739", + "kind": "http", + "name": "ScheduledActions_VirtualMachinesSubmitDeallocate_MaximumSet_Gen - generated by [MaximumSet] rule - generated by [MaximumSet] rule - generated by [MinimumSet] rule", + "description": "ScheduledActions_VirtualMachinesSubmitDeallocate_MaximumSet_Gen - generated by [MaximumSet] rule - generated by [MaximumSet] rule - generated by [MinimumSet] rule", + "filePath": "2025-05-01/ScheduledActions_VirtualMachinesSubmitDeallocate_MinimumSet_Gen.json", + "parameters": [ + { + "$id": "740", + "parameter": { + "$ref": "661" + }, + "value": { + "$id": "741", + "kind": "string", + "type": { + "$ref": "662" + }, + "value": "2025-05-01" + } + }, + { + "$id": "742", + "parameter": { + "$ref": "665" + }, + "value": { + "$id": "743", + "kind": "string", + "type": { + "$ref": "666" + }, + "value": "0505D8E4-D41A-48FB-9CA5-4AF8D93BE75F" + } + }, + { + "$id": "744", + "parameter": { + "$ref": "668" + }, + "value": { + "$id": "745", + "kind": "string", + "type": { + "$ref": "669" + }, + "value": "xrcabowpojl" + } + }, + { + "$id": "746", + "parameter": { + "$ref": "676" + }, + "value": { + "$id": "747", + "kind": "model", + "type": { + "$ref": "145" + }, + "value": { + "$id": "748", + "schedule": { + "$id": "749", + "kind": "model", + "type": { + "$ref": "147" + }, + "value": { + "$id": "750", + "deadlineType": { + "$id": "751", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Unknown" + } + } + }, + "executionParameters": { + "$id": "752", + "kind": "model", + "type": { + "$ref": "172" + }, + "value": { + "$id": "753" + } + }, + "resources": { + "$id": "754", + "kind": "model", + "type": { + "$ref": "191" + }, + "value": { + "$id": "755", + "ids": { + "$id": "756", + "kind": "array", + "type": { + "$ref": "193" + }, + "value": [ + { + "$id": "757", + "kind": "string", + "type": { + "$ref": "194" + }, + "value": "/subscriptions/YourSubscriptionId/resourceGroups/YourResourceGroupName/providers/Microsoft.Compute/virtualMachines/testResource3" + } + ] + } + } + }, + "correlationid": { + "$id": "758", + "kind": "string", + "type": { + "$ref": "201" + }, + "value": "evmwonebfzxenjdpucgcwdjdya" + } + } + } + } + ], + "responses": [ + { + "$id": "759", + "response": { + "$ref": "677" + }, + "statusCode": 200, + "bodyValue": { + "$id": "760", + "kind": "model", + "type": { + "$ref": "204" + }, + "value": { + "$id": "761", + "type": { + "$id": "762", + "kind": "string", + "type": { + "$ref": "210" + }, + "value": "fpnhqvrtbqizlylnwy" + }, + "location": { + "$id": "763", + "kind": "string", + "type": { + "$ref": "214" + }, + "value": "hhioerbsucdqayxk" + }, + "description": { + "$id": "764", + "kind": "string", + "type": { + "$ref": "206" + }, + "value": "zknbxgebvymhzzmsbrlaqreub" + } + } + } + } + ] + } + ] + }, + "parameters": [ + { + "$id": "765", + "name": "locationparameter", + "nameInRequest": "locationparameter", + "doc": "The location name.", + "type": { + "$id": "766", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "767", + "name": "requestBody", + "nameInRequest": "requestBody", + "doc": "The request body", + "type": { + "$ref": "145" + }, + "location": "Body", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "768", + "name": "contentType", + "nameInRequest": "contentType", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$ref": "671" + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "769", + "name": "accept", + "nameInRequest": "accept", + "type": { + "$ref": "674" + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "response": { + "$id": "770", + "type": { + "$ref": "204" + } + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Microsoft.ComputeSchedule.ScheduledActions.virtualMachinesSubmitDeallocate" + }, + { + "$id": "771", + "kind": "basic", + "name": "SubmitVirtualMachineHibernate", + "accessibility": "public", + "apiVersions": [ + "2024-08-15-preview", + "2024-10-01", + "2025-05-01" + ], + "doc": "VirtualMachinesSubmitHibernate: Schedule hibernate operation for a batch of virtual machines at datetime in future.", + "operation": { + "$id": "772", + "name": "SubmitVirtualMachineHibernate", + "resourceName": "ScheduledActions", + "doc": "VirtualMachinesSubmitHibernate: Schedule hibernate operation for a batch of virtual machines at datetime in future.", + "accessibility": "public", + "parameters": [ + { + "$id": "773", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "774", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "775", + "type": { + "$id": "776", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-05-01" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "777", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "778", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "779", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "780", + "name": "locationparameter", + "nameInRequest": "locationparameter", + "doc": "The location name.", + "type": { + "$id": "781", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "782", + "name": "contentType", + "nameInRequest": "Content-Type", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$id": "783", + "kind": "constant", + "valueType": { + "$id": "784", + "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": "785", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "786", + "kind": "constant", + "valueType": { + "$id": "787", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "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": "788", + "name": "requestBody", + "nameInRequest": "requestBody", + "doc": "The request body", + "type": { + "$ref": "295" + }, + "location": "Body", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "789", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "309" + }, + "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": "790", + "kind": "http", + "name": "ScheduledActions_VirtualMachinesSubmitHibernate_MaximumSet_Gen - generated by [MaximumSet] rule - generated by [MaximumSet] rule - generated by [MaximumSet] rule", + "description": "ScheduledActions_VirtualMachinesSubmitHibernate_MaximumSet_Gen - generated by [MaximumSet] rule - generated by [MaximumSet] rule - generated by [MaximumSet] rule", + "filePath": "2025-05-01/ScheduledActions_VirtualMachinesSubmitHibernate_MaximumSet_Gen.json", + "parameters": [ + { + "$id": "791", + "parameter": { + "$ref": "773" + }, + "value": { + "$id": "792", + "kind": "string", + "type": { + "$ref": "774" + }, + "value": "2025-05-01" + } + }, + { + "$id": "793", + "parameter": { + "$ref": "777" + }, + "value": { + "$id": "794", + "kind": "string", + "type": { + "$ref": "778" + }, + "value": "0505D8E4-D41A-48FB-9CA5-4AF8D93BE75F" + } + }, + { + "$id": "795", + "parameter": { + "$ref": "780" + }, + "value": { + "$id": "796", + "kind": "string", + "type": { + "$ref": "781" + }, + "value": "hiceqzwkjmijxdfw" + } + }, + { + "$id": "797", + "parameter": { + "$ref": "788" + }, + "value": { + "$id": "798", + "kind": "model", + "type": { + "$ref": "295" + }, + "value": { + "$id": "799", + "schedule": { + "$id": "800", + "kind": "model", + "type": { + "$ref": "147" + }, + "value": { + "$id": "801", + "deadline": { + "$id": "802", + "kind": "string", + "type": { + "$ref": "149" + }, + "value": "2025-04-15T19:47:04.403Z" + }, + "deadLine": { + "$id": "803", + "kind": "string", + "type": { + "$ref": "154" + }, + "value": "2025-04-15T19:47:04.403Z" + }, + "timezone": { + "$id": "804", + "kind": "string", + "type": { + "$ref": "159" + }, + "value": "qacufsmctpgjozovlsihrzoctatcsj" + }, + "timeZone": { + "$id": "805", + "kind": "string", + "type": { + "$ref": "163" + }, + "value": "upnmayfebiadztdktxzq" + }, + "deadlineType": { + "$id": "806", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Unknown" + } + } + }, + "executionParameters": { + "$id": "807", + "kind": "model", + "type": { + "$ref": "172" + }, + "value": { + "$id": "808", + "optimizationPreference": { + "$id": "809", + "kind": "string", + "type": { + "$ref": "22" + }, + "value": "Cost" + }, + "retryPolicy": { + "$id": "810", + "kind": "model", + "type": { + "$ref": "177" + }, + "value": { + "$id": "811", + "retryCount": { + "$id": "812", + "kind": "number", + "type": { + "$ref": "179" + }, + "value": 25 + }, + "retryWindowInMinutes": { + "$id": "813", + "kind": "number", + "type": { + "$ref": "183" + }, + "value": 4 + } + } + } + } + }, + "resources": { + "$id": "814", + "kind": "model", + "type": { + "$ref": "191" + }, + "value": { + "$id": "815", + "ids": { + "$id": "816", + "kind": "array", + "type": { + "$ref": "193" + }, + "value": [ + { + "$id": "817", + "kind": "string", + "type": { + "$ref": "194" + }, + "value": "/subscriptions/YourSubscriptionId/resourceGroups/YourResourceGroupName/providers/Microsoft.Compute/virtualMachines/testResource3" + } + ] + } + } + }, + "correlationid": { + "$id": "818", + "kind": "string", + "type": { + "$ref": "306" + }, + "value": "htqivutynuoslvbp" + } + } + } + } + ], + "responses": [ + { + "$id": "819", + "response": { + "$ref": "789" + }, + "statusCode": 200, + "bodyValue": { + "$id": "820", + "kind": "model", + "type": { + "$ref": "309" + }, + "value": { + "$id": "821", + "type": { + "$id": "822", + "kind": "string", + "type": { + "$ref": "315" + }, + "value": "yrmuumqaqiyotst" + }, + "location": { + "$id": "823", + "kind": "string", + "type": { + "$ref": "319" + }, + "value": "hhioerbsucdqayxk" + }, + "results": { + "$id": "824", + "kind": "array", + "type": { + "$ref": "324" + }, + "value": [ + { + "$id": "825", + "kind": "model", + "type": { + "$ref": "220" + }, + "value": { + "$id": "826", + "resourceId": { + "$id": "827", + "kind": "string", + "type": { + "$ref": "222" + }, + "value": "/subscriptions/YourSubscriptionId/resourceGroups/YourResourceGroupName/providers/Microsoft.Compute/virtualMachines/testResource3" + }, + "errorCode": { + "$id": "828", + "kind": "string", + "type": { + "$ref": "227" + }, + "value": "ynukyltendgmn" + }, + "errorDetails": { + "$id": "829", + "kind": "string", + "type": { + "$ref": "231" + }, + "value": "tifeuh" + }, + "operation": { + "$id": "830", + "kind": "model", + "type": { + "$ref": "235" + }, + "value": { + "$id": "831", + "operationId": { + "$id": "832", + "kind": "string", + "type": { + "$ref": "237" + }, + "value": "vppyaxq" + }, + "resourceId": { + "$id": "833", + "kind": "string", + "type": { + "$ref": "241" + }, + "value": "/subscriptions/YourSubscriptionId/resourceGroups/YourResourceGroupName/providers/Microsoft.Compute/virtualMachines/testResource3" + }, + "opType": { + "$id": "834", + "kind": "string", + "type": { + "$ref": "30" + }, + "value": "Unknown" + }, + "subscriptionId": { + "$id": "835", + "kind": "string", + "type": { + "$ref": "249" + }, + "value": "vofvsus" + }, + "deadline": { + "$id": "836", + "kind": "string", + "type": { + "$ref": "253" + }, + "value": "2025-04-15T19:47:03.591Z" + }, + "deadlineType": { + "$id": "837", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Unknown" + }, + "state": { + "$id": "838", + "kind": "string", + "type": { + "$ref": "40" + }, + "value": "Unknown" + }, + "timezone": { + "$id": "839", + "kind": "string", + "type": { + "$ref": "264" + }, + "value": "nwugsooykqggcokphgdj" + }, + "timeZone": { + "$id": "840", + "kind": "string", + "type": { + "$ref": "268" + }, + "value": "qkxnxnumvfqmsmpyccv" + }, + "resourceOperationError": { + "$id": "841", + "kind": "model", + "type": { + "$ref": "272" + }, + "value": { + "$id": "842", + "errorCode": { + "$id": "843", + "kind": "string", + "type": { + "$ref": "274" + }, + "value": "fagfsojftlff" + }, + "errorDetails": { + "$id": "844", + "kind": "string", + "type": { + "$ref": "278" + }, + "value": "rtihrkjasrjkllqccuysjrg" + } + } + }, + "completedAt": { + "$id": "845", + "kind": "string", + "type": { + "$ref": "284" + }, + "value": "2025-04-15T19:47:03.591Z" + }, + "retryPolicy": { + "$id": "846", + "kind": "model", + "type": { + "$ref": "177" + }, + "value": { + "$id": "847", + "retryCount": { + "$id": "848", + "kind": "number", + "type": { + "$ref": "179" + }, + "value": 25 + }, + "retryWindowInMinutes": { + "$id": "849", + "kind": "number", + "type": { + "$ref": "183" + }, + "value": 4 + } + } + } + } + } + } + } + ] + }, + "description": { + "$id": "850", + "kind": "string", + "type": { + "$ref": "311" + }, + "value": "ogyqdzdslyvxslrykb" + } + } + } + } + ] + }, + { + "$id": "851", + "kind": "http", + "name": "ScheduledActions_VirtualMachinesSubmitHibernate_MaximumSet_Gen - generated by [MaximumSet] rule - generated by [MaximumSet] rule - generated by [MinimumSet] rule", + "description": "ScheduledActions_VirtualMachinesSubmitHibernate_MaximumSet_Gen - generated by [MaximumSet] rule - generated by [MaximumSet] rule - generated by [MinimumSet] rule", + "filePath": "2025-05-01/ScheduledActions_VirtualMachinesSubmitHibernate_MinimumSet_Gen.json", + "parameters": [ + { + "$id": "852", + "parameter": { + "$ref": "773" + }, + "value": { + "$id": "853", + "kind": "string", + "type": { + "$ref": "774" + }, + "value": "2025-05-01" + } + }, + { + "$id": "854", + "parameter": { + "$ref": "777" + }, + "value": { + "$id": "855", + "kind": "string", + "type": { + "$ref": "778" + }, + "value": "0505D8E4-D41A-48FB-9CA5-4AF8D93BE75F" + } + }, + { + "$id": "856", + "parameter": { + "$ref": "780" + }, + "value": { + "$id": "857", + "kind": "string", + "type": { + "$ref": "781" + }, + "value": "jsbmestfaqxxejcgrs" + } + }, + { + "$id": "858", + "parameter": { + "$ref": "788" + }, + "value": { + "$id": "859", + "kind": "model", + "type": { + "$ref": "295" + }, + "value": { + "$id": "860", + "schedule": { + "$id": "861", + "kind": "model", + "type": { + "$ref": "147" + }, + "value": { + "$id": "862", + "deadlineType": { + "$id": "863", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Unknown" + } + } + }, + "executionParameters": { + "$id": "864", + "kind": "model", + "type": { + "$ref": "172" + }, + "value": { + "$id": "865" + } + }, + "resources": { + "$id": "866", + "kind": "model", + "type": { + "$ref": "191" + }, + "value": { + "$id": "867", + "ids": { + "$id": "868", + "kind": "array", + "type": { + "$ref": "193" + }, + "value": [ + { + "$id": "869", + "kind": "string", + "type": { + "$ref": "194" + }, + "value": "/subscriptions/YourSubscriptionId/resourceGroups/YourResourceGroupName/providers/Microsoft.Compute/virtualMachines/testResource3" + } + ] + } + } + }, + "correlationid": { + "$id": "870", + "kind": "string", + "type": { + "$ref": "306" + }, + "value": "htqivutynuoslvbp" + } + } + } + } + ], + "responses": [ + { + "$id": "871", + "response": { + "$ref": "789" + }, + "statusCode": 200, + "bodyValue": { + "$id": "872", + "kind": "model", + "type": { + "$ref": "309" + }, + "value": { + "$id": "873", + "type": { + "$id": "874", + "kind": "string", + "type": { + "$ref": "315" + }, + "value": "yrmuumqaqiyotst" + }, + "location": { + "$id": "875", + "kind": "string", + "type": { + "$ref": "319" + }, + "value": "hhioerbsucdqayxk" + }, + "description": { + "$id": "876", + "kind": "string", + "type": { + "$ref": "311" + }, + "value": "ogyqdzdslyvxslrykb" + } + } + } + } + ] + } + ] + }, + "parameters": [ + { + "$id": "877", + "name": "locationparameter", + "nameInRequest": "locationparameter", + "doc": "The location name.", + "type": { + "$id": "878", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "879", + "name": "requestBody", + "nameInRequest": "requestBody", + "doc": "The request body", + "type": { + "$ref": "295" + }, + "location": "Body", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "880", + "name": "contentType", + "nameInRequest": "contentType", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$ref": "783" + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "881", + "name": "accept", + "nameInRequest": "accept", + "type": { + "$ref": "786" + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "response": { + "$id": "882", + "type": { + "$ref": "309" + } + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Microsoft.ComputeSchedule.ScheduledActions.virtualMachinesSubmitHibernate" + }, + { + "$id": "883", + "kind": "basic", + "name": "SubmitVirtualMachineStart", + "accessibility": "public", + "apiVersions": [ + "2024-08-15-preview", + "2024-10-01", + "2025-05-01" + ], + "doc": "VirtualMachinesSubmitStart: Schedule start operation for a batch of virtual machines at datetime in future.", + "operation": { + "$id": "884", + "name": "SubmitVirtualMachineStart", + "resourceName": "ScheduledActions", + "doc": "VirtualMachinesSubmitStart: Schedule start operation for a batch of virtual machines at datetime in future.", + "accessibility": "public", + "parameters": [ + { + "$id": "885", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "886", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "887", + "type": { + "$id": "888", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-05-01" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "889", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "890", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "891", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "892", + "name": "locationparameter", + "nameInRequest": "locationparameter", + "doc": "The location name.", + "type": { + "$id": "893", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "894", + "name": "contentType", + "nameInRequest": "Content-Type", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$id": "895", + "kind": "constant", + "valueType": { + "$id": "896", + "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": "897", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "898", + "kind": "constant", + "valueType": { + "$id": "899", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "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": "900", + "name": "requestBody", + "nameInRequest": "requestBody", + "doc": "The request body", + "type": { + "$ref": "327" + }, + "location": "Body", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "901", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "341" + }, + "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": "902", + "kind": "http", + "name": "ScheduledActions_VirtualMachinesSubmitStart_MaximumSet_Gen - generated by [MaximumSet] rule - generated by [MaximumSet] rule - generated by [MaximumSet] rule", + "description": "ScheduledActions_VirtualMachinesSubmitStart_MaximumSet_Gen - generated by [MaximumSet] rule - generated by [MaximumSet] rule - generated by [MaximumSet] rule", + "filePath": "2025-05-01/ScheduledActions_VirtualMachinesSubmitStart_MaximumSet_Gen.json", + "parameters": [ + { + "$id": "903", + "parameter": { + "$ref": "885" + }, + "value": { + "$id": "904", + "kind": "string", + "type": { + "$ref": "886" + }, + "value": "2025-05-01" + } + }, + { + "$id": "905", + "parameter": { + "$ref": "889" + }, + "value": { + "$id": "906", + "kind": "string", + "type": { + "$ref": "890" + }, + "value": "0505D8E4-D41A-48FB-9CA5-4AF8D93BE75F" + } + }, + { + "$id": "907", + "parameter": { + "$ref": "892" + }, + "value": { + "$id": "908", + "kind": "string", + "type": { + "$ref": "893" + }, + "value": "klvdoznxekrxhuvgeels" + } + }, + { + "$id": "909", + "parameter": { + "$ref": "900" + }, + "value": { + "$id": "910", + "kind": "model", + "type": { + "$ref": "327" + }, + "value": { + "$id": "911", + "schedule": { + "$id": "912", + "kind": "model", + "type": { + "$ref": "147" + }, + "value": { + "$id": "913", + "deadline": { + "$id": "914", + "kind": "string", + "type": { + "$ref": "149" + }, + "value": "2025-04-15T19:47:04.403Z" + }, + "deadLine": { + "$id": "915", + "kind": "string", + "type": { + "$ref": "154" + }, + "value": "2025-04-15T19:47:04.403Z" + }, + "timezone": { + "$id": "916", + "kind": "string", + "type": { + "$ref": "159" + }, + "value": "qacufsmctpgjozovlsihrzoctatcsj" + }, + "timeZone": { + "$id": "917", + "kind": "string", + "type": { + "$ref": "163" + }, + "value": "upnmayfebiadztdktxzq" + }, + "deadlineType": { + "$id": "918", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Unknown" + } + } + }, + "executionParameters": { + "$id": "919", + "kind": "model", + "type": { + "$ref": "172" + }, + "value": { + "$id": "920", + "optimizationPreference": { + "$id": "921", + "kind": "string", + "type": { + "$ref": "22" + }, + "value": "Cost" + }, + "retryPolicy": { + "$id": "922", + "kind": "model", + "type": { + "$ref": "177" + }, + "value": { + "$id": "923", + "retryCount": { + "$id": "924", + "kind": "number", + "type": { + "$ref": "179" + }, + "value": 25 + }, + "retryWindowInMinutes": { + "$id": "925", + "kind": "number", + "type": { + "$ref": "183" + }, + "value": 4 + } + } + } + } + }, + "resources": { + "$id": "926", + "kind": "model", + "type": { + "$ref": "191" + }, + "value": { + "$id": "927", + "ids": { + "$id": "928", + "kind": "array", + "type": { + "$ref": "193" + }, + "value": [ + { + "$id": "929", + "kind": "string", + "type": { + "$ref": "194" + }, + "value": "/subscriptions/YourSubscriptionId/resourceGroups/YourResourceGroupName/providers/Microsoft.Compute/virtualMachines/testResource3" + } + ] + } + } + }, + "correlationid": { + "$id": "930", + "kind": "string", + "type": { + "$ref": "338" + }, + "value": "bvmpxvbd" + } + } + } + } + ], + "responses": [ + { + "$id": "931", + "response": { + "$ref": "901" + }, + "statusCode": 200, + "bodyValue": { + "$id": "932", + "kind": "model", + "type": { + "$ref": "341" + }, + "value": { + "$id": "933", + "type": { + "$id": "934", + "kind": "string", + "type": { + "$ref": "347" + }, + "value": "lcikdomhndewkiqpf" + }, + "location": { + "$id": "935", + "kind": "string", + "type": { + "$ref": "351" + }, + "value": "hhioerbsucdqayxk" + }, + "results": { + "$id": "936", + "kind": "array", + "type": { + "$ref": "356" + }, + "value": [ + { + "$id": "937", + "kind": "model", + "type": { + "$ref": "220" + }, + "value": { + "$id": "938", + "resourceId": { + "$id": "939", + "kind": "string", + "type": { + "$ref": "222" + }, + "value": "/subscriptions/YourSubscriptionId/resourceGroups/YourResourceGroupName/providers/Microsoft.Compute/virtualMachines/testResource3" + }, + "errorCode": { + "$id": "940", + "kind": "string", + "type": { + "$ref": "227" + }, + "value": "ynukyltendgmn" + }, + "errorDetails": { + "$id": "941", + "kind": "string", + "type": { + "$ref": "231" + }, + "value": "tifeuh" + }, + "operation": { + "$id": "942", + "kind": "model", + "type": { + "$ref": "235" + }, + "value": { + "$id": "943", + "operationId": { + "$id": "944", + "kind": "string", + "type": { + "$ref": "237" + }, + "value": "vppyaxq" + }, + "resourceId": { + "$id": "945", + "kind": "string", + "type": { + "$ref": "241" + }, + "value": "/subscriptions/YourSubscriptionId/resourceGroups/YourResourceGroupName/providers/Microsoft.Compute/virtualMachines/testResource3" + }, + "opType": { + "$id": "946", + "kind": "string", + "type": { + "$ref": "30" + }, + "value": "Unknown" + }, + "subscriptionId": { + "$id": "947", + "kind": "string", + "type": { + "$ref": "249" + }, + "value": "vofvsus" + }, + "deadline": { + "$id": "948", + "kind": "string", + "type": { + "$ref": "253" + }, + "value": "2025-04-15T19:47:03.591Z" + }, + "deadlineType": { + "$id": "949", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Unknown" + }, + "state": { + "$id": "950", + "kind": "string", + "type": { + "$ref": "40" + }, + "value": "Unknown" + }, + "timezone": { + "$id": "951", + "kind": "string", + "type": { + "$ref": "264" + }, + "value": "nwugsooykqggcokphgdj" + }, + "timeZone": { + "$id": "952", + "kind": "string", + "type": { + "$ref": "268" + }, + "value": "qkxnxnumvfqmsmpyccv" + }, + "resourceOperationError": { + "$id": "953", + "kind": "model", + "type": { + "$ref": "272" + }, + "value": { + "$id": "954", + "errorCode": { + "$id": "955", + "kind": "string", + "type": { + "$ref": "274" + }, + "value": "fagfsojftlff" + }, + "errorDetails": { + "$id": "956", + "kind": "string", + "type": { + "$ref": "278" + }, + "value": "rtihrkjasrjkllqccuysjrg" + } + } + }, + "completedAt": { + "$id": "957", + "kind": "string", + "type": { + "$ref": "284" + }, + "value": "2025-04-15T19:47:03.591Z" + }, + "retryPolicy": { + "$id": "958", + "kind": "model", + "type": { + "$ref": "177" + }, + "value": { + "$id": "959", + "retryCount": { + "$id": "960", + "kind": "number", + "type": { + "$ref": "179" + }, + "value": 25 + }, + "retryWindowInMinutes": { + "$id": "961", + "kind": "number", + "type": { + "$ref": "183" + }, + "value": 4 + } + } + } + } + } + } + } + ] + }, + "description": { + "$id": "962", + "kind": "string", + "type": { + "$ref": "343" + }, + "value": "mqfxdgracoxwwpoegjryov" + } + } + } + } + ] + }, + { + "$id": "963", + "kind": "http", + "name": "ScheduledActions_VirtualMachinesSubmitStart_MaximumSet_Gen - generated by [MaximumSet] rule - generated by [MaximumSet] rule - generated by [MinimumSet] rule", + "description": "ScheduledActions_VirtualMachinesSubmitStart_MaximumSet_Gen - generated by [MaximumSet] rule - generated by [MaximumSet] rule - generated by [MinimumSet] rule", + "filePath": "2025-05-01/ScheduledActions_VirtualMachinesSubmitStart_MinimumSet_Gen.json", + "parameters": [ + { + "$id": "964", + "parameter": { + "$ref": "885" + }, + "value": { + "$id": "965", + "kind": "string", + "type": { + "$ref": "886" + }, + "value": "2025-05-01" + } + }, + { + "$id": "966", + "parameter": { + "$ref": "889" + }, + "value": { + "$id": "967", + "kind": "string", + "type": { + "$ref": "890" + }, + "value": "0505D8E4-D41A-48FB-9CA5-4AF8D93BE75F" + } + }, + { + "$id": "968", + "parameter": { + "$ref": "892" + }, + "value": { + "$id": "969", + "kind": "string", + "type": { + "$ref": "893" + }, + "value": "rbsdwsfprygqqwqhwapovusm" + } + }, + { + "$id": "970", + "parameter": { + "$ref": "900" + }, + "value": { + "$id": "971", + "kind": "model", + "type": { + "$ref": "327" + }, + "value": { + "$id": "972", + "schedule": { + "$id": "973", + "kind": "model", + "type": { + "$ref": "147" + }, + "value": { + "$id": "974", + "deadlineType": { + "$id": "975", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Unknown" + } + } + }, + "executionParameters": { + "$id": "976", + "kind": "model", + "type": { + "$ref": "172" + }, + "value": { + "$id": "977" + } + }, + "resources": { + "$id": "978", + "kind": "model", + "type": { + "$ref": "191" + }, + "value": { + "$id": "979", + "ids": { + "$id": "980", + "kind": "array", + "type": { + "$ref": "193" + }, + "value": [ + { + "$id": "981", + "kind": "string", + "type": { + "$ref": "194" + }, + "value": "/subscriptions/YourSubscriptionId/resourceGroups/YourResourceGroupName/providers/Microsoft.Compute/virtualMachines/testResource3" + } + ] + } + } + }, + "correlationid": { + "$id": "982", + "kind": "string", + "type": { + "$ref": "338" + }, + "value": "bvmpxvbd" + } + } + } + } + ], + "responses": [ + { + "$id": "983", + "response": { + "$ref": "901" + }, + "statusCode": 200, + "bodyValue": { + "$id": "984", + "kind": "model", + "type": { + "$ref": "341" + }, + "value": { + "$id": "985", + "type": { + "$id": "986", + "kind": "string", + "type": { + "$ref": "347" + }, + "value": "lcikdomhndewkiqpf" + }, + "location": { + "$id": "987", + "kind": "string", + "type": { + "$ref": "351" + }, + "value": "hhioerbsucdqayxk" + }, + "description": { + "$id": "988", + "kind": "string", + "type": { + "$ref": "343" + }, + "value": "mqfxdgracoxwwpoegjryov" + } + } + } + } + ] + } + ] + }, + "parameters": [ + { + "$id": "989", + "name": "locationparameter", + "nameInRequest": "locationparameter", + "doc": "The location name.", + "type": { + "$id": "990", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "991", + "name": "requestBody", + "nameInRequest": "requestBody", + "doc": "The request body", + "type": { + "$ref": "327" + }, + "location": "Body", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "992", + "name": "contentType", + "nameInRequest": "contentType", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$ref": "895" + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "993", + "name": "accept", + "nameInRequest": "accept", + "type": { + "$ref": "898" + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "response": { + "$id": "994", + "type": { + "$ref": "341" + } + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Microsoft.ComputeSchedule.ScheduledActions.virtualMachinesSubmitStart" + }, + { + "$id": "995", + "kind": "basic", + "name": "ExecuteVirtualMachineDeallocate", + "accessibility": "public", + "apiVersions": [ + "2024-08-15-preview", + "2024-10-01", + "2025-05-01" + ], + "doc": "VirtualMachinesExecuteDeallocate: Execute deallocate operation for a batch of virtual machines, this operation is triggered as soon as Computeschedule receives it.", + "operation": { + "$id": "996", + "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": "997", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "998", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "999", + "type": { + "$id": "1000", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-05-01" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1001", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "1002", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "1003", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1004", + "name": "locationparameter", + "nameInRequest": "locationparameter", + "doc": "The location name.", + "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": "contentType", + "nameInRequest": "Content-Type", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$id": "1007", + "kind": "constant", + "valueType": { + "$id": "1008", + "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": "1009", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "1010", + "kind": "constant", + "valueType": { + "$id": "1011", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "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": "1012", + "name": "requestBody", + "nameInRequest": "requestBody", + "doc": "The request body", + "type": { + "$ref": "359" + }, + "location": "Body", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "1013", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "204" + }, + "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": "1014", + "kind": "http", + "name": "ScheduledActions_VirtualMachinesExecuteDeallocate_MaximumSet_Gen - generated by [MaximumSet] rule - generated by [MaximumSet] rule - generated by [MaximumSet] rule", + "description": "ScheduledActions_VirtualMachinesExecuteDeallocate_MaximumSet_Gen - generated by [MaximumSet] rule - generated by [MaximumSet] rule - generated by [MaximumSet] rule", + "filePath": "2025-05-01/ScheduledActions_VirtualMachinesExecuteDeallocate_MaximumSet_Gen.json", + "parameters": [ + { + "$id": "1015", + "parameter": { + "$ref": "997" + }, + "value": { + "$id": "1016", + "kind": "string", + "type": { + "$ref": "998" + }, + "value": "2025-05-01" + } + }, + { + "$id": "1017", + "parameter": { + "$ref": "1001" + }, + "value": { + "$id": "1018", + "kind": "string", + "type": { + "$ref": "1002" + }, + "value": "0505D8E4-D41A-48FB-9CA5-4AF8D93BE75F" + } + }, + { + "$id": "1019", + "parameter": { + "$ref": "1004" + }, + "value": { + "$id": "1020", + "kind": "string", + "type": { + "$ref": "1005" + }, + "value": "ykpowbmjexmsv" + } + }, + { + "$id": "1021", + "parameter": { + "$ref": "1012" + }, + "value": { + "$id": "1022", + "kind": "model", + "type": { + "$ref": "359" + }, + "value": { + "$id": "1023", + "executionParameters": { + "$id": "1024", + "kind": "model", + "type": { + "$ref": "172" + }, + "value": { + "$id": "1025", + "optimizationPreference": { + "$id": "1026", + "kind": "string", + "type": { + "$ref": "22" + }, + "value": "Cost" + }, + "retryPolicy": { + "$id": "1027", + "kind": "model", + "type": { + "$ref": "177" + }, + "value": { + "$id": "1028", + "retryCount": { + "$id": "1029", + "kind": "number", + "type": { + "$ref": "179" + }, + "value": 25 + }, + "retryWindowInMinutes": { + "$id": "1030", + "kind": "number", + "type": { + "$ref": "183" + }, + "value": 4 + } + } + } + } + }, + "resources": { + "$id": "1031", + "kind": "model", + "type": { + "$ref": "191" + }, + "value": { + "$id": "1032", + "ids": { + "$id": "1033", + "kind": "array", + "type": { + "$ref": "193" + }, + "value": [ + { + "$id": "1034", + "kind": "string", + "type": { + "$ref": "194" + }, + "value": "/subscriptions/YourSubscriptionId/resourceGroups/YourResourceGroupName/providers/Microsoft.Compute/virtualMachines/testResource3" + } + ] + } + } + }, + "correlationid": { + "$id": "1035", + "kind": "string", + "type": { + "$ref": "367" + }, + "value": "dsszhmrdsczkv" + } + } + } + } + ], + "responses": [ + { + "$id": "1036", + "response": { + "$ref": "1013" + }, + "statusCode": 200, + "bodyValue": { + "$id": "1037", + "kind": "model", + "type": { + "$ref": "204" + }, + "value": { + "$id": "1038", + "type": { + "$id": "1039", + "kind": "string", + "type": { + "$ref": "210" + }, + "value": "fpnhqvrtbqizlylnwy" + }, + "location": { + "$id": "1040", + "kind": "string", + "type": { + "$ref": "214" + }, + "value": "hhioerbsucdqayxk" + }, + "results": { + "$id": "1041", + "kind": "array", + "type": { + "$ref": "219" + }, + "value": [ + { + "$id": "1042", + "kind": "model", + "type": { + "$ref": "220" + }, + "value": { + "$id": "1043", + "resourceId": { + "$id": "1044", + "kind": "string", + "type": { + "$ref": "222" + }, + "value": "/subscriptions/YourSubscriptionId/resourceGroups/YourResourceGroupName/providers/Microsoft.Compute/virtualMachines/testResource3" + }, + "errorCode": { + "$id": "1045", + "kind": "string", + "type": { + "$ref": "227" + }, + "value": "ynukyltendgmn" + }, + "errorDetails": { + "$id": "1046", + "kind": "string", + "type": { + "$ref": "231" + }, + "value": "tifeuh" + }, + "operation": { + "$id": "1047", + "kind": "model", + "type": { + "$ref": "235" + }, + "value": { + "$id": "1048", + "operationId": { + "$id": "1049", + "kind": "string", + "type": { + "$ref": "237" + }, + "value": "vppyaxq" + }, + "resourceId": { + "$id": "1050", + "kind": "string", + "type": { + "$ref": "241" + }, + "value": "/subscriptions/YourSubscriptionId/resourceGroups/YourResourceGroupName/providers/Microsoft.Compute/virtualMachines/testResource3" + }, + "opType": { + "$id": "1051", + "kind": "string", + "type": { + "$ref": "30" + }, + "value": "Unknown" + }, + "subscriptionId": { + "$id": "1052", + "kind": "string", + "type": { + "$ref": "249" + }, + "value": "vofvsus" + }, + "deadline": { + "$id": "1053", + "kind": "string", + "type": { + "$ref": "253" + }, + "value": "2025-04-15T19:47:03.591Z" + }, + "deadlineType": { + "$id": "1054", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Unknown" + }, + "state": { + "$id": "1055", + "kind": "string", + "type": { + "$ref": "40" + }, + "value": "Unknown" + }, + "timezone": { + "$id": "1056", + "kind": "string", + "type": { + "$ref": "264" + }, + "value": "nwugsooykqggcokphgdj" + }, + "timeZone": { + "$id": "1057", + "kind": "string", + "type": { + "$ref": "268" + }, + "value": "qkxnxnumvfqmsmpyccv" + }, + "resourceOperationError": { + "$id": "1058", + "kind": "model", + "type": { + "$ref": "272" + }, + "value": { + "$id": "1059", + "errorCode": { + "$id": "1060", + "kind": "string", + "type": { + "$ref": "274" + }, + "value": "fagfsojftlff" + }, + "errorDetails": { + "$id": "1061", + "kind": "string", + "type": { + "$ref": "278" + }, + "value": "rtihrkjasrjkllqccuysjrg" + } + } + }, + "completedAt": { + "$id": "1062", + "kind": "string", + "type": { + "$ref": "284" + }, + "value": "2025-04-15T19:47:03.591Z" + }, + "retryPolicy": { + "$id": "1063", + "kind": "model", + "type": { + "$ref": "177" + }, + "value": { + "$id": "1064", + "retryCount": { + "$id": "1065", + "kind": "number", + "type": { + "$ref": "179" + }, + "value": 25 + }, + "retryWindowInMinutes": { + "$id": "1066", + "kind": "number", + "type": { + "$ref": "183" + }, + "value": 4 + } + } + } + } + } + } + } + ] + }, + "description": { + "$id": "1067", + "kind": "string", + "type": { + "$ref": "206" + }, + "value": "zknbxgebvymhzzmsbrlaqreub" + } + } + } + } + ] + }, + { + "$id": "1068", + "kind": "http", + "name": "ScheduledActions_VirtualMachinesExecuteDeallocate_MaximumSet_Gen - generated by [MaximumSet] rule - generated by [MaximumSet] rule - generated by [MinimumSet] rule", + "description": "ScheduledActions_VirtualMachinesExecuteDeallocate_MaximumSet_Gen - generated by [MaximumSet] rule - generated by [MaximumSet] rule - generated by [MinimumSet] rule", + "filePath": "2025-05-01/ScheduledActions_VirtualMachinesExecuteDeallocate_MinimumSet_Gen.json", + "parameters": [ + { + "$id": "1069", + "parameter": { + "$ref": "997" + }, + "value": { + "$id": "1070", + "kind": "string", + "type": { + "$ref": "998" + }, + "value": "2025-05-01" + } + }, + { + "$id": "1071", + "parameter": { + "$ref": "1001" + }, + "value": { + "$id": "1072", + "kind": "string", + "type": { + "$ref": "1002" + }, + "value": "0505D8E4-D41A-48FB-9CA5-4AF8D93BE75F" + } + }, + { + "$id": "1073", + "parameter": { + "$ref": "1004" + }, + "value": { + "$id": "1074", + "kind": "string", + "type": { + "$ref": "1005" + }, + "value": "bfldnxffvllwvqa" + } + }, + { + "$id": "1075", + "parameter": { + "$ref": "1012" + }, + "value": { + "$id": "1076", + "kind": "model", + "type": { + "$ref": "359" + }, + "value": { + "$id": "1077", + "executionParameters": { + "$id": "1078", + "kind": "model", + "type": { + "$ref": "172" + }, + "value": { + "$id": "1079" + } + }, + "resources": { + "$id": "1080", + "kind": "model", + "type": { + "$ref": "191" + }, + "value": { + "$id": "1081", + "ids": { + "$id": "1082", + "kind": "array", + "type": { + "$ref": "193" + }, + "value": [ + { + "$id": "1083", + "kind": "string", + "type": { + "$ref": "194" + }, + "value": "/subscriptions/YourSubscriptionId/resourceGroups/YourResourceGroupName/providers/Microsoft.Compute/virtualMachines/testResource3" + } + ] + } + } + }, + "correlationid": { + "$id": "1084", + "kind": "string", + "type": { + "$ref": "367" + }, + "value": "dsszhmrdsczkv" + } + } + } + } + ], + "responses": [ + { + "$id": "1085", + "response": { + "$ref": "1013" + }, + "statusCode": 200, + "bodyValue": { + "$id": "1086", + "kind": "model", + "type": { + "$ref": "204" + }, + "value": { + "$id": "1087", + "type": { + "$id": "1088", + "kind": "string", + "type": { + "$ref": "210" + }, + "value": "fpnhqvrtbqizlylnwy" + }, + "location": { + "$id": "1089", + "kind": "string", + "type": { + "$ref": "214" + }, + "value": "hhioerbsucdqayxk" + }, + "description": { + "$id": "1090", + "kind": "string", + "type": { + "$ref": "206" + }, + "value": "zknbxgebvymhzzmsbrlaqreub" + } + } + } + } + ] + } + ] + }, + "parameters": [ + { + "$id": "1091", + "name": "locationparameter", + "nameInRequest": "locationparameter", + "doc": "The location name.", + "type": { + "$id": "1092", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1093", + "name": "requestBody", + "nameInRequest": "requestBody", + "doc": "The request body", + "type": { + "$ref": "359" + }, + "location": "Body", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1094", + "name": "contentType", + "nameInRequest": "contentType", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$ref": "1007" + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1095", + "name": "accept", + "nameInRequest": "accept", + "type": { + "$ref": "1010" + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "response": { + "$id": "1096", + "type": { + "$ref": "204" + } + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Microsoft.ComputeSchedule.ScheduledActions.virtualMachinesExecuteDeallocate" + }, + { + "$id": "1097", + "kind": "basic", + "name": "ExecuteVirtualMachineHibernate", + "accessibility": "public", + "apiVersions": [ + "2024-08-15-preview", + "2024-10-01", + "2025-05-01" + ], + "doc": "VirtualMachinesExecuteHibernate: Execute hibernate operation for a batch of virtual machines, this operation is triggered as soon as Computeschedule receives it.", + "operation": { + "$id": "1098", + "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": "1099", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "1100", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "1101", + "type": { + "$id": "1102", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-05-01" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1103", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "1104", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "1105", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1106", + "name": "locationparameter", + "nameInRequest": "locationparameter", + "doc": "The location name.", + "type": { + "$id": "1107", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1108", + "name": "contentType", + "nameInRequest": "Content-Type", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$id": "1109", + "kind": "constant", + "valueType": { + "$id": "1110", + "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": "1111", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "1112", + "kind": "constant", + "valueType": { + "$id": "1113", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "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": "1114", + "name": "requestBody", + "nameInRequest": "requestBody", + "doc": "The request body", + "type": { + "$ref": "370" + }, + "location": "Body", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "1115", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "309" + }, + "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": "1116", + "kind": "http", + "name": "ScheduledActions_VirtualMachinesExecuteHibernate_MaximumSet_Gen - generated by [MaximumSet] rule - generated by [MaximumSet] rule - generated by [MaximumSet] rule", + "description": "ScheduledActions_VirtualMachinesExecuteHibernate_MaximumSet_Gen - generated by [MaximumSet] rule - generated by [MaximumSet] rule - generated by [MaximumSet] rule", + "filePath": "2025-05-01/ScheduledActions_VirtualMachinesExecuteHibernate_MaximumSet_Gen.json", + "parameters": [ + { + "$id": "1117", + "parameter": { + "$ref": "1099" + }, + "value": { + "$id": "1118", + "kind": "string", + "type": { + "$ref": "1100" + }, + "value": "2025-05-01" + } + }, + { + "$id": "1119", + "parameter": { + "$ref": "1103" + }, + "value": { + "$id": "1120", + "kind": "string", + "type": { + "$ref": "1104" + }, + "value": "0505D8E4-D41A-48FB-9CA5-4AF8D93BE75F" + } + }, + { + "$id": "1121", + "parameter": { + "$ref": "1106" + }, + "value": { + "$id": "1122", + "kind": "string", + "type": { + "$ref": "1107" + }, + "value": "aojgnzdqrphhygchir" + } + }, + { + "$id": "1123", + "parameter": { + "$ref": "1114" + }, + "value": { + "$id": "1124", + "kind": "model", + "type": { + "$ref": "370" + }, + "value": { + "$id": "1125", + "executionParameters": { + "$id": "1126", + "kind": "model", + "type": { + "$ref": "172" + }, + "value": { + "$id": "1127", + "optimizationPreference": { + "$id": "1128", + "kind": "string", + "type": { + "$ref": "22" + }, + "value": "Cost" + }, + "retryPolicy": { + "$id": "1129", + "kind": "model", + "type": { + "$ref": "177" + }, + "value": { + "$id": "1130", + "retryCount": { + "$id": "1131", + "kind": "number", + "type": { + "$ref": "179" + }, + "value": 25 + }, + "retryWindowInMinutes": { + "$id": "1132", + "kind": "number", + "type": { + "$ref": "183" + }, + "value": 4 + } + } + } + } + }, + "resources": { + "$id": "1133", + "kind": "model", + "type": { + "$ref": "191" + }, + "value": { + "$id": "1134", + "ids": { + "$id": "1135", + "kind": "array", + "type": { + "$ref": "193" + }, + "value": [ + { + "$id": "1136", + "kind": "string", + "type": { + "$ref": "194" + }, + "value": "/subscriptions/YourSubscriptionId/resourceGroups/YourResourceGroupName/providers/Microsoft.Compute/virtualMachines/testResource3" + } + ] + } + } + }, + "correlationid": { + "$id": "1137", + "kind": "string", + "type": { + "$ref": "378" + }, + "value": "jmdiz" + } + } + } + } + ], + "responses": [ + { + "$id": "1138", + "response": { + "$ref": "1115" + }, + "statusCode": 200, + "bodyValue": { + "$id": "1139", + "kind": "model", + "type": { + "$ref": "309" + }, + "value": { + "$id": "1140", + "type": { + "$id": "1141", + "kind": "string", + "type": { + "$ref": "315" + }, + "value": "yrmuumqaqiyotst" + }, + "location": { + "$id": "1142", + "kind": "string", + "type": { + "$ref": "319" + }, + "value": "hhioerbsucdqayxk" + }, + "results": { + "$id": "1143", + "kind": "array", + "type": { + "$ref": "324" + }, + "value": [ + { + "$id": "1144", + "kind": "model", + "type": { + "$ref": "220" + }, + "value": { + "$id": "1145", + "resourceId": { + "$id": "1146", + "kind": "string", + "type": { + "$ref": "222" + }, + "value": "/subscriptions/YourSubscriptionId/resourceGroups/YourResourceGroupName/providers/Microsoft.Compute/virtualMachines/testResource3" + }, + "errorCode": { + "$id": "1147", + "kind": "string", + "type": { + "$ref": "227" + }, + "value": "ynukyltendgmn" + }, + "errorDetails": { + "$id": "1148", + "kind": "string", + "type": { + "$ref": "231" + }, + "value": "tifeuh" + }, + "operation": { + "$id": "1149", + "kind": "model", + "type": { + "$ref": "235" + }, + "value": { + "$id": "1150", + "operationId": { + "$id": "1151", + "kind": "string", + "type": { + "$ref": "237" + }, + "value": "vppyaxq" + }, + "resourceId": { + "$id": "1152", + "kind": "string", + "type": { + "$ref": "241" + }, + "value": "/subscriptions/YourSubscriptionId/resourceGroups/YourResourceGroupName/providers/Microsoft.Compute/virtualMachines/testResource3" + }, + "opType": { + "$id": "1153", + "kind": "string", + "type": { + "$ref": "30" + }, + "value": "Unknown" + }, + "subscriptionId": { + "$id": "1154", + "kind": "string", + "type": { + "$ref": "249" + }, + "value": "vofvsus" + }, + "deadline": { + "$id": "1155", + "kind": "string", + "type": { + "$ref": "253" + }, + "value": "2025-04-15T19:47:03.591Z" + }, + "deadlineType": { + "$id": "1156", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Unknown" + }, + "state": { + "$id": "1157", + "kind": "string", + "type": { + "$ref": "40" + }, + "value": "Unknown" + }, + "timezone": { + "$id": "1158", + "kind": "string", + "type": { + "$ref": "264" + }, + "value": "nwugsooykqggcokphgdj" + }, + "timeZone": { + "$id": "1159", + "kind": "string", + "type": { + "$ref": "268" + }, + "value": "qkxnxnumvfqmsmpyccv" + }, + "resourceOperationError": { + "$id": "1160", + "kind": "model", + "type": { + "$ref": "272" + }, + "value": { + "$id": "1161", + "errorCode": { + "$id": "1162", + "kind": "string", + "type": { + "$ref": "274" + }, + "value": "fagfsojftlff" + }, + "errorDetails": { + "$id": "1163", + "kind": "string", + "type": { + "$ref": "278" + }, + "value": "rtihrkjasrjkllqccuysjrg" + } + } + }, + "completedAt": { + "$id": "1164", + "kind": "string", + "type": { + "$ref": "284" + }, + "value": "2025-04-15T19:47:03.591Z" + }, + "retryPolicy": { + "$id": "1165", + "kind": "model", + "type": { + "$ref": "177" + }, + "value": { + "$id": "1166", + "retryCount": { + "$id": "1167", + "kind": "number", + "type": { + "$ref": "179" + }, + "value": 25 + }, + "retryWindowInMinutes": { + "$id": "1168", + "kind": "number", + "type": { + "$ref": "183" + }, + "value": 4 + } + } + } + } + } + } + } + ] + }, + "description": { + "$id": "1169", + "kind": "string", + "type": { + "$ref": "311" + }, + "value": "ogyqdzdslyvxslrykb" + } + } + } + } + ] + }, + { + "$id": "1170", + "kind": "http", + "name": "ScheduledActions_VirtualMachinesExecuteHibernate_MaximumSet_Gen - generated by [MaximumSet] rule - generated by [MaximumSet] rule - generated by [MinimumSet] rule", + "description": "ScheduledActions_VirtualMachinesExecuteHibernate_MaximumSet_Gen - generated by [MaximumSet] rule - generated by [MaximumSet] rule - generated by [MinimumSet] rule", + "filePath": "2025-05-01/ScheduledActions_VirtualMachinesExecuteHibernate_MinimumSet_Gen.json", + "parameters": [ + { + "$id": "1171", + "parameter": { + "$ref": "1099" + }, + "value": { + "$id": "1172", + "kind": "string", + "type": { + "$ref": "1100" + }, + "value": "2025-05-01" + } + }, + { + "$id": "1173", + "parameter": { + "$ref": "1103" + }, + "value": { + "$id": "1174", + "kind": "string", + "type": { + "$ref": "1104" + }, + "value": "0505D8E4-D41A-48FB-9CA5-4AF8D93BE75F" + } + }, + { + "$id": "1175", + "parameter": { + "$ref": "1106" + }, + "value": { + "$id": "1176", + "kind": "string", + "type": { + "$ref": "1107" + }, + "value": "gmflbqliyjrhmrjvqrxrgocbxzjr" + } + }, + { + "$id": "1177", + "parameter": { + "$ref": "1114" + }, + "value": { + "$id": "1178", + "kind": "model", + "type": { + "$ref": "370" + }, + "value": { + "$id": "1179", + "executionParameters": { + "$id": "1180", + "kind": "model", + "type": { + "$ref": "172" + }, + "value": { + "$id": "1181" + } + }, + "resources": { + "$id": "1182", + "kind": "model", + "type": { + "$ref": "191" + }, + "value": { + "$id": "1183", + "ids": { + "$id": "1184", + "kind": "array", + "type": { + "$ref": "193" + }, + "value": [ + { + "$id": "1185", + "kind": "string", + "type": { + "$ref": "194" + }, + "value": "/subscriptions/YourSubscriptionId/resourceGroups/YourResourceGroupName/providers/Microsoft.Compute/virtualMachines/testResource3" + } + ] + } + } + }, + "correlationid": { + "$id": "1186", + "kind": "string", + "type": { + "$ref": "378" + }, + "value": "jmdiz" + } + } + } + } + ], + "responses": [ + { + "$id": "1187", + "response": { + "$ref": "1115" + }, + "statusCode": 200, + "bodyValue": { + "$id": "1188", + "kind": "model", + "type": { + "$ref": "309" + }, + "value": { + "$id": "1189", + "type": { + "$id": "1190", + "kind": "string", + "type": { + "$ref": "315" + }, + "value": "yrmuumqaqiyotst" + }, + "location": { + "$id": "1191", + "kind": "string", + "type": { + "$ref": "319" + }, + "value": "hhioerbsucdqayxk" + }, + "description": { + "$id": "1192", + "kind": "string", + "type": { + "$ref": "311" + }, + "value": "ogyqdzdslyvxslrykb" + } + } + } + } + ] + } + ] + }, + "parameters": [ + { + "$id": "1193", + "name": "locationparameter", + "nameInRequest": "locationparameter", + "doc": "The location name.", + "type": { + "$id": "1194", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1195", + "name": "requestBody", + "nameInRequest": "requestBody", + "doc": "The request body", + "type": { + "$ref": "370" + }, + "location": "Body", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1196", + "name": "contentType", + "nameInRequest": "contentType", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$ref": "1109" + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1197", + "name": "accept", + "nameInRequest": "accept", + "type": { + "$ref": "1112" + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "response": { + "$id": "1198", + "type": { + "$ref": "309" + } + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Microsoft.ComputeSchedule.ScheduledActions.virtualMachinesExecuteHibernate" + }, + { + "$id": "1199", + "kind": "basic", + "name": "ExecuteVirtualMachineStart", + "accessibility": "public", + "apiVersions": [ + "2024-08-15-preview", + "2024-10-01", + "2025-05-01" + ], + "doc": "VirtualMachinesExecuteStart: Execute start operation for a batch of virtual machines, this operation is triggered as soon as Computeschedule receives it.", + "operation": { + "$id": "1200", + "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": "1201", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "1202", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "1203", + "type": { + "$id": "1204", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-05-01" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1205", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "1206", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "1207", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1208", + "name": "locationparameter", + "nameInRequest": "locationparameter", + "doc": "The location name.", + "type": { + "$id": "1209", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1210", + "name": "contentType", + "nameInRequest": "Content-Type", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$id": "1211", + "kind": "constant", + "valueType": { + "$id": "1212", + "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": "1213", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "1214", + "kind": "constant", + "valueType": { + "$id": "1215", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "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": "1216", + "name": "requestBody", + "nameInRequest": "requestBody", + "doc": "The request body", + "type": { + "$ref": "381" + }, + "location": "Body", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "1217", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "341" + }, + "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": "1218", + "kind": "http", + "name": "ScheduledActions_VirtualMachinesExecuteStart_MaximumSet_Gen - generated by [MaximumSet] rule - generated by [MaximumSet] rule - generated by [MaximumSet] rule", + "description": "ScheduledActions_VirtualMachinesExecuteStart_MaximumSet_Gen - generated by [MaximumSet] rule - generated by [MaximumSet] rule - generated by [MaximumSet] rule", + "filePath": "2025-05-01/ScheduledActions_VirtualMachinesExecuteStart_MaximumSet_Gen.json", + "parameters": [ + { + "$id": "1219", + "parameter": { + "$ref": "1201" + }, + "value": { + "$id": "1220", + "kind": "string", + "type": { + "$ref": "1202" + }, + "value": "2025-05-01" + } + }, + { + "$id": "1221", + "parameter": { + "$ref": "1205" + }, + "value": { + "$id": "1222", + "kind": "string", + "type": { + "$ref": "1206" + }, + "value": "0505D8E4-D41A-48FB-9CA5-4AF8D93BE75F" + } + }, + { + "$id": "1223", + "parameter": { + "$ref": "1208" + }, + "value": { + "$id": "1224", + "kind": "string", + "type": { + "$ref": "1209" + }, + "value": "jwybvpf" + } + }, + { + "$id": "1225", + "parameter": { + "$ref": "1216" + }, + "value": { + "$id": "1226", + "kind": "model", + "type": { + "$ref": "381" + }, + "value": { + "$id": "1227", + "executionParameters": { + "$id": "1228", + "kind": "model", + "type": { + "$ref": "172" + }, + "value": { + "$id": "1229", + "optimizationPreference": { + "$id": "1230", + "kind": "string", + "type": { + "$ref": "22" + }, + "value": "Cost" + }, + "retryPolicy": { + "$id": "1231", + "kind": "model", + "type": { + "$ref": "177" + }, + "value": { + "$id": "1232", + "retryCount": { + "$id": "1233", + "kind": "number", + "type": { + "$ref": "179" + }, + "value": 25 + }, + "retryWindowInMinutes": { + "$id": "1234", + "kind": "number", + "type": { + "$ref": "183" + }, + "value": 4 + } + } + } + } + }, + "resources": { + "$id": "1235", + "kind": "model", + "type": { + "$ref": "191" + }, + "value": { + "$id": "1236", + "ids": { + "$id": "1237", + "kind": "array", + "type": { + "$ref": "193" + }, + "value": [ + { + "$id": "1238", + "kind": "string", + "type": { + "$ref": "194" + }, + "value": "/subscriptions/YourSubscriptionId/resourceGroups/YourResourceGroupName/providers/Microsoft.Compute/virtualMachines/testResource3" + } + ] + } + } + }, + "correlationid": { + "$id": "1239", + "kind": "string", + "type": { + "$ref": "389" + }, + "value": "vwpcrwowcfgjuwnxzvvdma" + } + } + } + } + ], + "responses": [ + { + "$id": "1240", + "response": { + "$ref": "1217" + }, + "statusCode": 200, + "bodyValue": { + "$id": "1241", + "kind": "model", + "type": { + "$ref": "341" + }, + "value": { + "$id": "1242", + "type": { + "$id": "1243", + "kind": "string", + "type": { + "$ref": "347" + }, + "value": "lcikdomhndewkiqpf" + }, + "location": { + "$id": "1244", + "kind": "string", + "type": { + "$ref": "351" + }, + "value": "hhioerbsucdqayxk" + }, + "results": { + "$id": "1245", + "kind": "array", + "type": { + "$ref": "356" + }, + "value": [ + { + "$id": "1246", + "kind": "model", + "type": { + "$ref": "220" + }, + "value": { + "$id": "1247", + "resourceId": { + "$id": "1248", + "kind": "string", + "type": { + "$ref": "222" + }, + "value": "/subscriptions/YourSubscriptionId/resourceGroups/YourResourceGroupName/providers/Microsoft.Compute/virtualMachines/testResource3" + }, + "errorCode": { + "$id": "1249", + "kind": "string", + "type": { + "$ref": "227" + }, + "value": "ynukyltendgmn" + }, + "errorDetails": { + "$id": "1250", + "kind": "string", + "type": { + "$ref": "231" + }, + "value": "tifeuh" + }, + "operation": { + "$id": "1251", + "kind": "model", + "type": { + "$ref": "235" + }, + "value": { + "$id": "1252", + "operationId": { + "$id": "1253", + "kind": "string", + "type": { + "$ref": "237" + }, + "value": "vppyaxq" + }, + "resourceId": { + "$id": "1254", + "kind": "string", + "type": { + "$ref": "241" + }, + "value": "/subscriptions/YourSubscriptionId/resourceGroups/YourResourceGroupName/providers/Microsoft.Compute/virtualMachines/testResource3" + }, + "opType": { + "$id": "1255", + "kind": "string", + "type": { + "$ref": "30" + }, + "value": "Unknown" + }, + "subscriptionId": { + "$id": "1256", + "kind": "string", + "type": { + "$ref": "249" + }, + "value": "vofvsus" + }, + "deadline": { + "$id": "1257", + "kind": "string", + "type": { + "$ref": "253" + }, + "value": "2025-04-15T19:47:03.591Z" + }, + "deadlineType": { + "$id": "1258", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Unknown" + }, + "state": { + "$id": "1259", + "kind": "string", + "type": { + "$ref": "40" + }, + "value": "Unknown" + }, + "timezone": { + "$id": "1260", + "kind": "string", + "type": { + "$ref": "264" + }, + "value": "nwugsooykqggcokphgdj" + }, + "timeZone": { + "$id": "1261", + "kind": "string", + "type": { + "$ref": "268" + }, + "value": "qkxnxnumvfqmsmpyccv" + }, + "resourceOperationError": { + "$id": "1262", + "kind": "model", + "type": { + "$ref": "272" + }, + "value": { + "$id": "1263", + "errorCode": { + "$id": "1264", + "kind": "string", + "type": { + "$ref": "274" + }, + "value": "fagfsojftlff" + }, + "errorDetails": { + "$id": "1265", + "kind": "string", + "type": { + "$ref": "278" + }, + "value": "rtihrkjasrjkllqccuysjrg" + } + } + }, + "completedAt": { + "$id": "1266", + "kind": "string", + "type": { + "$ref": "284" + }, + "value": "2025-04-15T19:47:03.591Z" + }, + "retryPolicy": { + "$id": "1267", + "kind": "model", + "type": { + "$ref": "177" + }, + "value": { + "$id": "1268", + "retryCount": { + "$id": "1269", + "kind": "number", + "type": { + "$ref": "179" + }, + "value": 25 + }, + "retryWindowInMinutes": { + "$id": "1270", + "kind": "number", + "type": { + "$ref": "183" + }, + "value": 4 + } + } + } + } + } + } + } + ] + }, + "description": { + "$id": "1271", + "kind": "string", + "type": { + "$ref": "343" + }, + "value": "mqfxdgracoxwwpoegjryov" + } + } + } + } + ] + }, + { + "$id": "1272", + "kind": "http", + "name": "ScheduledActions_VirtualMachinesExecuteStart_MaximumSet_Gen - generated by [MaximumSet] rule - generated by [MaximumSet] rule - generated by [MinimumSet] rule", + "description": "ScheduledActions_VirtualMachinesExecuteStart_MaximumSet_Gen - generated by [MaximumSet] rule - generated by [MaximumSet] rule - generated by [MinimumSet] rule", + "filePath": "2025-05-01/ScheduledActions_VirtualMachinesExecuteStart_MinimumSet_Gen.json", + "parameters": [ + { + "$id": "1273", + "parameter": { + "$ref": "1201" + }, + "value": { + "$id": "1274", + "kind": "string", + "type": { + "$ref": "1202" + }, + "value": "2025-05-01" + } + }, + { + "$id": "1275", + "parameter": { + "$ref": "1205" + }, + "value": { + "$id": "1276", + "kind": "string", + "type": { + "$ref": "1206" + }, + "value": "0505D8E4-D41A-48FB-9CA5-4AF8D93BE75F" + } + }, + { + "$id": "1277", + "parameter": { + "$ref": "1208" + }, + "value": { + "$id": "1278", + "kind": "string", + "type": { + "$ref": "1209" + }, + "value": "ksfzuak" + } + }, + { + "$id": "1279", + "parameter": { + "$ref": "1216" + }, + "value": { + "$id": "1280", + "kind": "model", + "type": { + "$ref": "381" + }, + "value": { + "$id": "1281", + "executionParameters": { + "$id": "1282", + "kind": "model", + "type": { + "$ref": "172" + }, + "value": { + "$id": "1283" + } + }, + "resources": { + "$id": "1284", + "kind": "model", + "type": { + "$ref": "191" + }, + "value": { + "$id": "1285", + "ids": { + "$id": "1286", + "kind": "array", + "type": { + "$ref": "193" + }, + "value": [ + { + "$id": "1287", + "kind": "string", + "type": { + "$ref": "194" + }, + "value": "/subscriptions/YourSubscriptionId/resourceGroups/YourResourceGroupName/providers/Microsoft.Compute/virtualMachines/testResource3" + } + ] + } + } + }, + "correlationid": { + "$id": "1288", + "kind": "string", + "type": { + "$ref": "389" + }, + "value": "vwpcrwowcfgjuwnxzvvdma" + } + } + } + } + ], + "responses": [ + { + "$id": "1289", + "response": { + "$ref": "1217" + }, + "statusCode": 200, + "bodyValue": { + "$id": "1290", + "kind": "model", + "type": { + "$ref": "341" + }, + "value": { + "$id": "1291", + "type": { + "$id": "1292", + "kind": "string", + "type": { + "$ref": "347" + }, + "value": "lcikdomhndewkiqpf" + }, + "location": { + "$id": "1293", + "kind": "string", + "type": { + "$ref": "351" + }, + "value": "hhioerbsucdqayxk" + }, + "description": { + "$id": "1294", + "kind": "string", + "type": { + "$ref": "343" + }, + "value": "mqfxdgracoxwwpoegjryov" + } + } + } + } + ] + } + ] + }, + "parameters": [ + { + "$id": "1295", + "name": "locationparameter", + "nameInRequest": "locationparameter", + "doc": "The location name.", + "type": { + "$id": "1296", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1297", + "name": "requestBody", + "nameInRequest": "requestBody", + "doc": "The request body", + "type": { + "$ref": "381" + }, + "location": "Body", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1298", + "name": "contentType", + "nameInRequest": "contentType", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$ref": "1211" + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1299", + "name": "accept", + "nameInRequest": "accept", + "type": { + "$ref": "1214" + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "response": { + "$id": "1300", + "type": { + "$ref": "341" + } + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Microsoft.ComputeSchedule.ScheduledActions.virtualMachinesExecuteStart" + }, + { + "$id": "1301", + "kind": "basic", + "name": "virtualMachinesExecuteCreate", + "accessibility": "public", + "apiVersions": [ + "2025-05-01" + ], + "doc": "VirtualMachinesExecuteCreate: Execute create operation for a batch of virtual machines, this operation is triggered as soon as Computeschedule receives it.", + "operation": { + "$id": "1302", + "name": "virtualMachinesExecuteCreate", + "resourceName": "ScheduledActions", + "doc": "VirtualMachinesExecuteCreate: Execute create operation for a batch of virtual machines, this operation is triggered as soon as Computeschedule receives it.", + "accessibility": "public", + "parameters": [ + { + "$id": "1303", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "1304", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "1305", + "type": { + "$id": "1306", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-05-01" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1307", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "1308", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "1309", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1310", + "name": "locationparameter", + "nameInRequest": "locationparameter", + "doc": "The location name.", + "type": { + "$id": "1311", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1312", + "name": "contentType", + "nameInRequest": "Content-Type", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$id": "1313", + "kind": "constant", + "valueType": { + "$id": "1314", + "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": "1315", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "1316", + "kind": "constant", + "valueType": { + "$id": "1317", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "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": "1318", + "name": "requestBody", + "nameInRequest": "requestBody", + "doc": "The request body", + "type": { + "$ref": "392" + }, + "location": "Body", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "1319", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "421" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "POST", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/providers/Microsoft.ComputeSchedule/locations/{locationparameter}/virtualMachinesExecuteCreate", + "requestMediaTypes": [ + "application/json" + ], + "bufferResponse": true, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.ComputeSchedule.ScheduledActions.virtualMachinesExecuteCreate", + "decorators": [], + "examples": [ + { + "$id": "1320", + "kind": "http", + "name": "ScheduledActions_VirtualMachinesExecuteCreate_MaximumSet_Gen - generated by [MaximumSet] rule - generated by [MaximumSet] rule - generated by [MaximumSet] rule", + "description": "ScheduledActions_VirtualMachinesExecuteCreate_MaximumSet_Gen - generated by [MaximumSet] rule - generated by [MaximumSet] rule - generated by [MaximumSet] rule", + "filePath": "2025-05-01/ScheduledActions_VirtualMachinesExecuteCreate_MaximumSet_Gen.json", + "parameters": [ + { + "$id": "1321", + "parameter": { + "$ref": "1303" + }, + "value": { + "$id": "1322", + "kind": "string", + "type": { + "$ref": "1304" + }, + "value": "2025-05-01" + } + }, + { + "$id": "1323", + "parameter": { + "$ref": "1307" + }, + "value": { + "$id": "1324", + "kind": "string", + "type": { + "$ref": "1308" + }, + "value": "0505D8E4-D41A-48FB-9CA5-4AF8D93BE75F" + } + }, + { + "$id": "1325", + "parameter": { + "$ref": "1310" + }, + "value": { + "$id": "1326", + "kind": "string", + "type": { + "$ref": "1311" + }, + "value": "nxbiupqfkijjq" + } + }, + { + "$id": "1327", + "parameter": { + "$ref": "1318" + }, + "value": { + "$id": "1328", + "kind": "model", + "type": { + "$ref": "392" + }, + "value": { + "$id": "1329", + "resourceConfigParameters": { + "$id": "1330", + "kind": "model", + "type": { + "$ref": "394" + }, + "value": { + "$id": "1331", + "baseProfile": { + "$id": "1332", + "kind": "string", + "type": { + "$ref": "396" + }, + "value": "tfgrulcuneopmbdjydzofmhpa" + }, + "resourceOverrides": { + "$id": "1333", + "kind": "array", + "type": { + "$ref": "400" + }, + "value": [ + { + "$id": "1334", + "kind": "string", + "type": { + "$ref": "401" + }, + "value": "hsqtjgsobjaffl" + } + ] + }, + "resourceCount": { + "$id": "1335", + "kind": "number", + "type": { + "$ref": "405" + }, + "value": 28 + }, + "resourcePrefix": { + "$id": "1336", + "kind": "string", + "type": { + "$ref": "409" + }, + "value": "rqlxavviucrxfjj" + } + } + }, + "executionParameters": { + "$id": "1337", + "kind": "model", + "type": { + "$ref": "172" + }, + "value": { + "$id": "1338", + "optimizationPreference": { + "$id": "1339", + "kind": "string", + "type": { + "$ref": "22" + }, + "value": "Cost" + }, + "retryPolicy": { + "$id": "1340", + "kind": "model", + "type": { + "$ref": "177" + }, + "value": { + "$id": "1341", + "retryCount": { + "$id": "1342", + "kind": "number", + "type": { + "$ref": "179" + }, + "value": 25 + }, + "retryWindowInMinutes": { + "$id": "1343", + "kind": "number", + "type": { + "$ref": "183" + }, + "value": 4 + } + } + } + } + }, + "correlationid": { + "$id": "1344", + "kind": "string", + "type": { + "$ref": "418" + }, + "value": "erpswvxajdpqgxfpgmzy" + } + } + } + } + ], + "responses": [ + { + "$id": "1345", + "response": { + "$ref": "1319" + }, + "statusCode": 200, + "bodyValue": { + "$id": "1346", + "kind": "model", + "type": { + "$ref": "421" + }, + "value": { + "$id": "1347", + "type": { + "$id": "1348", + "kind": "string", + "type": { + "$ref": "427" + }, + "value": "avmbqoatro" + }, + "location": { + "$id": "1349", + "kind": "string", + "type": { + "$ref": "431" + }, + "value": "hhioerbsucdqayxk" + }, + "results": { + "$id": "1350", + "kind": "array", + "type": { + "$ref": "436" + }, + "value": [ + { + "$id": "1351", + "kind": "model", + "type": { + "$ref": "220" + }, + "value": { + "$id": "1352", + "resourceId": { + "$id": "1353", + "kind": "string", + "type": { + "$ref": "222" + }, + "value": "/subscriptions/YourSubscriptionId/resourceGroups/YourResourceGroupName/providers/Microsoft.Compute/virtualMachines/testResource3" + }, + "errorCode": { + "$id": "1354", + "kind": "string", + "type": { + "$ref": "227" + }, + "value": "ynukyltendgmn" + }, + "errorDetails": { + "$id": "1355", + "kind": "string", + "type": { + "$ref": "231" + }, + "value": "tifeuh" + }, + "operation": { + "$id": "1356", + "kind": "model", + "type": { + "$ref": "235" + }, + "value": { + "$id": "1357", + "operationId": { + "$id": "1358", + "kind": "string", + "type": { + "$ref": "237" + }, + "value": "vppyaxq" + }, + "resourceId": { + "$id": "1359", + "kind": "string", + "type": { + "$ref": "241" + }, + "value": "/subscriptions/YourSubscriptionId/resourceGroups/YourResourceGroupName/providers/Microsoft.Compute/virtualMachines/testResource3" + }, + "opType": { + "$id": "1360", + "kind": "string", + "type": { + "$ref": "30" + }, + "value": "Unknown" + }, + "subscriptionId": { + "$id": "1361", + "kind": "string", + "type": { + "$ref": "249" + }, + "value": "vofvsus" + }, + "deadline": { + "$id": "1362", + "kind": "string", + "type": { + "$ref": "253" + }, + "value": "2025-04-15T19:47:03.591Z" + }, + "deadlineType": { + "$id": "1363", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Unknown" + }, + "state": { + "$id": "1364", + "kind": "string", + "type": { + "$ref": "40" + }, + "value": "Unknown" + }, + "timezone": { + "$id": "1365", + "kind": "string", + "type": { + "$ref": "264" + }, + "value": "nwugsooykqggcokphgdj" + }, + "timeZone": { + "$id": "1366", + "kind": "string", + "type": { + "$ref": "268" + }, + "value": "qkxnxnumvfqmsmpyccv" + }, + "resourceOperationError": { + "$id": "1367", + "kind": "model", + "type": { + "$ref": "272" + }, + "value": { + "$id": "1368", + "errorCode": { + "$id": "1369", + "kind": "string", + "type": { + "$ref": "274" + }, + "value": "fagfsojftlff" + }, + "errorDetails": { + "$id": "1370", + "kind": "string", + "type": { + "$ref": "278" + }, + "value": "rtihrkjasrjkllqccuysjrg" + } + } + }, + "completedAt": { + "$id": "1371", + "kind": "string", + "type": { + "$ref": "284" + }, + "value": "2025-04-15T19:47:03.591Z" + }, + "retryPolicy": { + "$id": "1372", + "kind": "model", + "type": { + "$ref": "177" + }, + "value": { + "$id": "1373", + "retryCount": { + "$id": "1374", + "kind": "number", + "type": { + "$ref": "179" + }, + "value": 25 + }, + "retryWindowInMinutes": { + "$id": "1375", + "kind": "number", + "type": { + "$ref": "183" + }, + "value": 4 + } + } + } + } + } + } + } + ] + }, + "description": { + "$id": "1376", + "kind": "string", + "type": { + "$ref": "423" + }, + "value": "plfajalcmjcxmfuvsbnnoabdqxclto" + } + } + } + } + ] + }, + { + "$id": "1377", + "kind": "http", + "name": "ScheduledActions_VirtualMachinesExecuteCreate_MaximumSet_Gen - generated by [MaximumSet] rule - generated by [MaximumSet] rule - generated by [MinimumSet] rule", + "description": "ScheduledActions_VirtualMachinesExecuteCreate_MaximumSet_Gen - generated by [MaximumSet] rule - generated by [MaximumSet] rule - generated by [MinimumSet] rule", + "filePath": "2025-05-01/ScheduledActions_VirtualMachinesExecuteCreate_MinimumSet_Gen.json", + "parameters": [ + { + "$id": "1378", + "parameter": { + "$ref": "1303" + }, + "value": { + "$id": "1379", + "kind": "string", + "type": { + "$ref": "1304" + }, + "value": "2025-05-01" + } + }, + { + "$id": "1380", + "parameter": { + "$ref": "1307" + }, + "value": { + "$id": "1381", + "kind": "string", + "type": { + "$ref": "1308" + }, + "value": "0505D8E4-D41A-48FB-9CA5-4AF8D93BE75F" + } + }, + { + "$id": "1382", + "parameter": { + "$ref": "1310" + }, + "value": { + "$id": "1383", + "kind": "string", + "type": { + "$ref": "1311" + }, + "value": "aiqyytlqsikciuxzocihxb" + } + }, + { + "$id": "1384", + "parameter": { + "$ref": "1318" + }, + "value": { + "$id": "1385", + "kind": "model", + "type": { + "$ref": "392" + }, + "value": { + "$id": "1386", + "resourceConfigParameters": { + "$id": "1387", + "kind": "model", + "type": { + "$ref": "394" + }, + "value": { + "$id": "1388", + "resourceCount": { + "$id": "1389", + "kind": "number", + "type": { + "$ref": "405" + }, + "value": 28 + } + } + }, + "executionParameters": { + "$id": "1390", + "kind": "model", + "type": { + "$ref": "172" + }, + "value": { + "$id": "1391" + } + } + } + } + } + ], + "responses": [ + { + "$id": "1392", + "response": { + "$ref": "1319" + }, + "statusCode": 200, + "bodyValue": { + "$id": "1393", + "kind": "model", + "type": { + "$ref": "421" + }, + "value": { + "$id": "1394", + "type": { + "$id": "1395", + "kind": "string", + "type": { + "$ref": "427" + }, + "value": "avmbqoatro" + }, + "location": { + "$id": "1396", + "kind": "string", + "type": { + "$ref": "431" + }, + "value": "hhioerbsucdqayxk" + }, + "description": { + "$id": "1397", + "kind": "string", + "type": { + "$ref": "423" + }, + "value": "plfajalcmjcxmfuvsbnnoabdqxclto" + } + } + } + } + ] + } + ] + }, + "parameters": [ + { + "$id": "1398", + "name": "locationparameter", + "nameInRequest": "locationparameter", + "doc": "The location name.", + "type": { + "$id": "1399", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1400", + "name": "requestBody", + "nameInRequest": "requestBody", + "doc": "The request body", + "type": { + "$ref": "392" + }, + "location": "Body", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1401", + "name": "contentType", + "nameInRequest": "contentType", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$ref": "1313" + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1402", + "name": "accept", + "nameInRequest": "accept", + "type": { + "$ref": "1316" + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "response": { + "$id": "1403", + "type": { + "$ref": "421" + } + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Microsoft.ComputeSchedule.ScheduledActions.virtualMachinesExecuteCreate" + }, + { + "$id": "1404", + "kind": "basic", + "name": "virtualMachinesExecuteDelete", + "accessibility": "public", + "apiVersions": [ + "2025-05-01" + ], + "doc": "VirtualMachinesExecuteDelete: Execute delete operation for a batch of virtual machines, this operation is triggered as soon as Computeschedule receives it.", + "operation": { + "$id": "1405", + "name": "virtualMachinesExecuteDelete", + "resourceName": "ScheduledActions", + "doc": "VirtualMachinesExecuteDelete: Execute delete operation for a batch of virtual machines, this operation is triggered as soon as Computeschedule receives it.", + "accessibility": "public", + "parameters": [ + { + "$id": "1406", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "1407", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "1408", + "type": { + "$id": "1409", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-05-01" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1410", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "1411", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "1412", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1413", + "name": "locationparameter", + "nameInRequest": "locationparameter", + "doc": "The location name.", + "type": { + "$id": "1414", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1415", + "name": "contentType", + "nameInRequest": "Content-Type", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$id": "1416", + "kind": "constant", + "valueType": { + "$id": "1417", + "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": "1418", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "1419", + "kind": "constant", + "valueType": { + "$id": "1420", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "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": "1421", + "name": "requestBody", + "nameInRequest": "requestBody", + "doc": "The request body", + "type": { + "$ref": "439" + }, + "location": "Body", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "1422", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "454" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "POST", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/providers/Microsoft.ComputeSchedule/locations/{locationparameter}/virtualMachinesExecuteDelete", + "requestMediaTypes": [ + "application/json" + ], + "bufferResponse": true, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.ComputeSchedule.ScheduledActions.virtualMachinesExecuteDelete", + "decorators": [], + "examples": [ + { + "$id": "1423", + "kind": "http", + "name": "ScheduledActions_VirtualMachinesExecuteDelete_MaximumSet_Gen - generated by [MaximumSet] rule - generated by [MaximumSet] rule - generated by [MaximumSet] rule", + "description": "ScheduledActions_VirtualMachinesExecuteDelete_MaximumSet_Gen - generated by [MaximumSet] rule - generated by [MaximumSet] rule - generated by [MaximumSet] rule", + "filePath": "2025-05-01/ScheduledActions_VirtualMachinesExecuteDelete_MaximumSet_Gen.json", + "parameters": [ + { + "$id": "1424", + "parameter": { + "$ref": "1406" + }, + "value": { + "$id": "1425", + "kind": "string", + "type": { + "$ref": "1407" + }, + "value": "2025-05-01" + } + }, + { + "$id": "1426", + "parameter": { + "$ref": "1410" + }, + "value": { + "$id": "1427", + "kind": "string", + "type": { + "$ref": "1411" + }, + "value": "0505D8E4-D41A-48FB-9CA5-4AF8D93BE75F" + } + }, + { + "$id": "1428", + "parameter": { + "$ref": "1413" + }, + "value": { + "$id": "1429", + "kind": "string", + "type": { + "$ref": "1414" + }, + "value": "yrngwxkxxxbifqyc" + } + }, + { + "$id": "1430", + "parameter": { + "$ref": "1421" + }, + "value": { + "$id": "1431", + "kind": "model", + "type": { + "$ref": "439" + }, + "value": { + "$id": "1432", + "executionParameters": { + "$id": "1433", + "kind": "model", + "type": { + "$ref": "172" + }, + "value": { + "$id": "1434", + "optimizationPreference": { + "$id": "1435", + "kind": "string", + "type": { + "$ref": "22" + }, + "value": "Cost" + }, + "retryPolicy": { + "$id": "1436", + "kind": "model", + "type": { + "$ref": "177" + }, + "value": { + "$id": "1437", + "retryCount": { + "$id": "1438", + "kind": "number", + "type": { + "$ref": "179" + }, + "value": 25 + }, + "retryWindowInMinutes": { + "$id": "1439", + "kind": "number", + "type": { + "$ref": "183" + }, + "value": 4 + } + } + } + } + }, + "resources": { + "$id": "1440", + "kind": "model", + "type": { + "$ref": "191" + }, + "value": { + "$id": "1441", + "ids": { + "$id": "1442", + "kind": "array", + "type": { + "$ref": "193" + }, + "value": [ + { + "$id": "1443", + "kind": "string", + "type": { + "$ref": "194" + }, + "value": "/subscriptions/YourSubscriptionId/resourceGroups/YourResourceGroupName/providers/Microsoft.Compute/virtualMachines/testResource3" + } + ] + } + } + }, + "correlationid": { + "$id": "1444", + "kind": "string", + "type": { + "$ref": "447" + }, + "value": "lgxsiioaybtjexssjzw" + }, + "forceDeletion": { + "$id": "1445", + "kind": "boolean", + "type": { + "$ref": "451" + }, + "value": true + } + } + } + } + ], + "responses": [ + { + "$id": "1446", + "response": { + "$ref": "1422" + }, + "statusCode": 200, + "bodyValue": { + "$id": "1447", + "kind": "model", + "type": { + "$ref": "454" + }, + "value": { + "$id": "1448", + "type": { + "$id": "1449", + "kind": "string", + "type": { + "$ref": "460" + }, + "value": "tauhekvwziataptcsyqtfpq" + }, + "location": { + "$id": "1450", + "kind": "string", + "type": { + "$ref": "464" + }, + "value": "hhioerbsucdqayxk" + }, + "results": { + "$id": "1451", + "kind": "array", + "type": { + "$ref": "469" + }, + "value": [ + { + "$id": "1452", + "kind": "model", + "type": { + "$ref": "220" + }, + "value": { + "$id": "1453", + "resourceId": { + "$id": "1454", + "kind": "string", + "type": { + "$ref": "222" + }, + "value": "/subscriptions/YourSubscriptionId/resourceGroups/YourResourceGroupName/providers/Microsoft.Compute/virtualMachines/testResource3" + }, + "errorCode": { + "$id": "1455", + "kind": "string", + "type": { + "$ref": "227" + }, + "value": "ynukyltendgmn" + }, + "errorDetails": { + "$id": "1456", + "kind": "string", + "type": { + "$ref": "231" + }, + "value": "tifeuh" + }, + "operation": { + "$id": "1457", + "kind": "model", + "type": { + "$ref": "235" + }, + "value": { + "$id": "1458", + "operationId": { + "$id": "1459", + "kind": "string", + "type": { + "$ref": "237" + }, + "value": "vppyaxq" + }, + "resourceId": { + "$id": "1460", + "kind": "string", + "type": { + "$ref": "241" + }, + "value": "/subscriptions/YourSubscriptionId/resourceGroups/YourResourceGroupName/providers/Microsoft.Compute/virtualMachines/testResource3" + }, + "opType": { + "$id": "1461", + "kind": "string", + "type": { + "$ref": "30" + }, + "value": "Unknown" + }, + "subscriptionId": { + "$id": "1462", + "kind": "string", + "type": { + "$ref": "249" + }, + "value": "vofvsus" + }, + "deadline": { + "$id": "1463", + "kind": "string", + "type": { + "$ref": "253" + }, + "value": "2025-04-15T19:47:03.591Z" + }, + "deadlineType": { + "$id": "1464", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Unknown" + }, + "state": { + "$id": "1465", + "kind": "string", + "type": { + "$ref": "40" + }, + "value": "Unknown" + }, + "timezone": { + "$id": "1466", + "kind": "string", + "type": { + "$ref": "264" + }, + "value": "nwugsooykqggcokphgdj" + }, + "timeZone": { + "$id": "1467", + "kind": "string", + "type": { + "$ref": "268" + }, + "value": "qkxnxnumvfqmsmpyccv" + }, + "resourceOperationError": { + "$id": "1468", + "kind": "model", + "type": { + "$ref": "272" + }, + "value": { + "$id": "1469", + "errorCode": { + "$id": "1470", + "kind": "string", + "type": { + "$ref": "274" + }, + "value": "fagfsojftlff" + }, + "errorDetails": { + "$id": "1471", + "kind": "string", + "type": { + "$ref": "278" + }, + "value": "rtihrkjasrjkllqccuysjrg" + } + } + }, + "completedAt": { + "$id": "1472", + "kind": "string", + "type": { + "$ref": "284" + }, + "value": "2025-04-15T19:47:03.591Z" + }, + "retryPolicy": { + "$id": "1473", + "kind": "model", + "type": { + "$ref": "177" + }, + "value": { + "$id": "1474", + "retryCount": { + "$id": "1475", + "kind": "number", + "type": { + "$ref": "179" + }, + "value": 25 + }, + "retryWindowInMinutes": { + "$id": "1476", + "kind": "number", + "type": { + "$ref": "183" + }, + "value": 4 + } + } + } + } + } + } + } + ] + }, + "description": { + "$id": "1477", + "kind": "string", + "type": { + "$ref": "456" + }, + "value": "fxgbwqglaskyb" + } + } + } + } + ] + }, + { + "$id": "1478", + "kind": "http", + "name": "ScheduledActions_VirtualMachinesExecuteDelete_MaximumSet_Gen - generated by [MaximumSet] rule - generated by [MaximumSet] rule - generated by [MinimumSet] rule", + "description": "ScheduledActions_VirtualMachinesExecuteDelete_MaximumSet_Gen - generated by [MaximumSet] rule - generated by [MaximumSet] rule - generated by [MinimumSet] rule", + "filePath": "2025-05-01/ScheduledActions_VirtualMachinesExecuteDelete_MinimumSet_Gen.json", + "parameters": [ + { + "$id": "1479", + "parameter": { + "$ref": "1406" + }, + "value": { + "$id": "1480", + "kind": "string", + "type": { + "$ref": "1407" + }, + "value": "2025-05-01" + } + }, + { + "$id": "1481", + "parameter": { + "$ref": "1410" + }, + "value": { + "$id": "1482", + "kind": "string", + "type": { + "$ref": "1411" + }, + "value": "0505D8E4-D41A-48FB-9CA5-4AF8D93BE75F" + } + }, + { + "$id": "1483", + "parameter": { + "$ref": "1413" + }, + "value": { + "$id": "1484", + "kind": "string", + "type": { + "$ref": "1414" + }, + "value": "urzqnogieubgnjsyadipeyqegdomtm" + } + }, + { + "$id": "1485", + "parameter": { + "$ref": "1421" + }, + "value": { + "$id": "1486", + "kind": "model", + "type": { + "$ref": "439" + }, + "value": { + "$id": "1487", + "executionParameters": { + "$id": "1488", + "kind": "model", + "type": { + "$ref": "172" + }, + "value": { + "$id": "1489" + } + }, + "resources": { + "$id": "1490", + "kind": "model", + "type": { + "$ref": "191" + }, + "value": { + "$id": "1491", + "ids": { + "$id": "1492", + "kind": "array", + "type": { + "$ref": "193" + }, + "value": [ + { + "$id": "1493", + "kind": "string", + "type": { + "$ref": "194" + }, + "value": "/subscriptions/YourSubscriptionId/resourceGroups/YourResourceGroupName/providers/Microsoft.Compute/virtualMachines/testResource3" + } + ] + } + } + } + } + } + } + ], + "responses": [ + { + "$id": "1494", + "response": { + "$ref": "1422" + }, + "statusCode": 200, + "bodyValue": { + "$id": "1495", + "kind": "model", + "type": { + "$ref": "454" + }, + "value": { + "$id": "1496", + "type": { + "$id": "1497", + "kind": "string", + "type": { + "$ref": "460" + }, + "value": "tauhekvwziataptcsyqtfpq" + }, + "location": { + "$id": "1498", + "kind": "string", + "type": { + "$ref": "464" + }, + "value": "hhioerbsucdqayxk" + }, + "description": { + "$id": "1499", + "kind": "string", + "type": { + "$ref": "456" + }, + "value": "fxgbwqglaskyb" + } + } + } + } + ] + } + ] + }, + "parameters": [ + { + "$id": "1500", + "name": "locationparameter", + "nameInRequest": "locationparameter", + "doc": "The location name.", + "type": { + "$id": "1501", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1502", + "name": "requestBody", + "nameInRequest": "requestBody", + "doc": "The request body", + "type": { + "$ref": "439" + }, + "location": "Body", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1503", + "name": "contentType", + "nameInRequest": "contentType", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$ref": "1416" + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1504", + "name": "accept", + "nameInRequest": "accept", + "type": { + "$ref": "1419" + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "response": { + "$id": "1505", + "type": { + "$ref": "454" + } + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Microsoft.ComputeSchedule.ScheduledActions.virtualMachinesExecuteDelete" + }, + { + "$id": "1506", + "kind": "basic", + "name": "virtualMachinesSubmitCreate", + "accessibility": "public", + "apiVersions": [ + "2025-05-01" + ], + "doc": "VirtualMachinesSubmitCreate: submit create operation for a batch of virtual machines, at datetime in future.", + "operation": { + "$id": "1507", + "name": "virtualMachinesSubmitCreate", + "resourceName": "ScheduledActions", + "doc": "VirtualMachinesSubmitCreate: submit create operation for a batch of virtual machines, at datetime in future.", + "accessibility": "public", + "parameters": [ + { + "$id": "1508", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "1509", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "1510", + "type": { + "$id": "1511", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-05-01" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1512", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "1513", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "1514", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1515", + "name": "locationparameter", + "nameInRequest": "locationparameter", + "doc": "The location name.", + "type": { + "$id": "1516", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1517", + "name": "contentType", + "nameInRequest": "Content-Type", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$id": "1518", + "kind": "constant", + "valueType": { + "$id": "1519", + "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": "1520", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "1521", + "kind": "constant", + "valueType": { + "$id": "1522", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "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": "1523", + "name": "requestBody", + "nameInRequest": "requestBody", + "doc": "The request body", + "type": { + "$ref": "472" + }, + "location": "Body", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "1524", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "421" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "POST", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/providers/Microsoft.ComputeSchedule/locations/{locationparameter}/virtualMachinesSubmitCreate", + "requestMediaTypes": [ + "application/json" + ], + "bufferResponse": true, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.ComputeSchedule.ScheduledActions.virtualMachinesSubmitCreate", + "decorators": [], + "examples": [ + { + "$id": "1525", + "kind": "http", + "name": "ScheduledActions_VirtualMachinesSubmitCreate - generated by [MaximumSet] rule", + "description": "ScheduledActions_VirtualMachinesSubmitCreate - generated by [MaximumSet] rule", + "filePath": "2025-05-01/ScheduledActions_VirtualMachinesSubmitCreate_MaximumSet_Gen.json", + "parameters": [ + { + "$id": "1526", + "parameter": { + "$ref": "1508" + }, + "value": { + "$id": "1527", + "kind": "string", + "type": { + "$ref": "1509" + }, + "value": "2025-05-01" + } + }, + { + "$id": "1528", + "parameter": { + "$ref": "1512" + }, + "value": { + "$id": "1529", + "kind": "string", + "type": { + "$ref": "1513" + }, + "value": "0505D8E4-D41A-48FB-9CA5-4AF8D93BE75F" + } + }, + { + "$id": "1530", + "parameter": { + "$ref": "1515" + }, + "value": { + "$id": "1531", + "kind": "string", + "type": { + "$ref": "1516" + }, + "value": "msbmrhcjsqsydsq" + } + }, + { + "$id": "1532", + "parameter": { + "$ref": "1523" + }, + "value": { + "$id": "1533", + "kind": "model", + "type": { + "$ref": "472" + }, + "value": { + "$id": "1534", + "schedule": { + "$id": "1535", + "kind": "model", + "type": { + "$ref": "147" + }, + "value": { + "$id": "1536", + "deadline": { + "$id": "1537", + "kind": "string", + "type": { + "$ref": "149" + }, + "value": "2025-04-15T19:47:04.403Z" + }, + "deadLine": { + "$id": "1538", + "kind": "string", + "type": { + "$ref": "154" + }, + "value": "2025-04-15T19:47:04.403Z" + }, + "timezone": { + "$id": "1539", + "kind": "string", + "type": { + "$ref": "159" + }, + "value": "qacufsmctpgjozovlsihrzoctatcsj" + }, + "timeZone": { + "$id": "1540", + "kind": "string", + "type": { + "$ref": "163" + }, + "value": "upnmayfebiadztdktxzq" + }, + "deadlineType": { + "$id": "1541", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Unknown" + } + } + }, + "resourceConfigParameters": { + "$id": "1542", + "kind": "model", + "type": { + "$ref": "394" + }, + "value": { + "$id": "1543", + "baseProfile": { + "$id": "1544", + "kind": "string", + "type": { + "$ref": "396" + }, + "value": "tfgrulcuneopmbdjydzofmhpa" + }, + "resourceOverrides": { + "$id": "1545", + "kind": "array", + "type": { + "$ref": "400" + }, + "value": [ + { + "$id": "1546", + "kind": "string", + "type": { + "$ref": "401" + }, + "value": "hsqtjgsobjaffl" + } + ] + }, + "resourceCount": { + "$id": "1547", + "kind": "number", + "type": { + "$ref": "405" + }, + "value": 28 + }, + "resourcePrefix": { + "$id": "1548", + "kind": "string", + "type": { + "$ref": "409" + }, + "value": "rqlxavviucrxfjj" + } + } + }, + "executionParameters": { + "$id": "1549", + "kind": "model", + "type": { + "$ref": "172" + }, + "value": { + "$id": "1550", + "optimizationPreference": { + "$id": "1551", + "kind": "string", + "type": { + "$ref": "22" + }, + "value": "Cost" + }, + "retryPolicy": { + "$id": "1552", + "kind": "model", + "type": { + "$ref": "177" + }, + "value": { + "$id": "1553", + "retryCount": { + "$id": "1554", + "kind": "number", + "type": { + "$ref": "179" + }, + "value": 25 + }, + "retryWindowInMinutes": { + "$id": "1555", + "kind": "number", + "type": { + "$ref": "183" + }, + "value": 4 + } + } + } + } + }, + "correlationid": { + "$id": "1556", + "kind": "string", + "type": { + "$ref": "483" + }, + "value": "muxopzmvkxlowegf" + } + } + } + } + ], + "responses": [ + { + "$id": "1557", + "response": { + "$ref": "1524" + }, + "statusCode": 200, + "bodyValue": { + "$id": "1558", + "kind": "model", + "type": { + "$ref": "421" + }, + "value": { + "$id": "1559", + "type": { + "$id": "1560", + "kind": "string", + "type": { + "$ref": "427" + }, + "value": "avmbqoatro" + }, + "location": { + "$id": "1561", + "kind": "string", + "type": { + "$ref": "431" + }, + "value": "hhioerbsucdqayxk" + }, + "results": { + "$id": "1562", + "kind": "array", + "type": { + "$ref": "436" + }, + "value": [ + { + "$id": "1563", + "kind": "model", + "type": { + "$ref": "220" + }, + "value": { + "$id": "1564", + "resourceId": { + "$id": "1565", + "kind": "string", + "type": { + "$ref": "222" + }, + "value": "/subscriptions/YourSubscriptionId/resourceGroups/YourResourceGroupName/providers/Microsoft.Compute/virtualMachines/testResource3" + }, + "errorCode": { + "$id": "1566", + "kind": "string", + "type": { + "$ref": "227" + }, + "value": "ynukyltendgmn" + }, + "errorDetails": { + "$id": "1567", + "kind": "string", + "type": { + "$ref": "231" + }, + "value": "tifeuh" + }, + "operation": { + "$id": "1568", + "kind": "model", + "type": { + "$ref": "235" + }, + "value": { + "$id": "1569", + "operationId": { + "$id": "1570", + "kind": "string", + "type": { + "$ref": "237" + }, + "value": "vppyaxq" + }, + "resourceId": { + "$id": "1571", + "kind": "string", + "type": { + "$ref": "241" + }, + "value": "/subscriptions/YourSubscriptionId/resourceGroups/YourResourceGroupName/providers/Microsoft.Compute/virtualMachines/testResource3" + }, + "opType": { + "$id": "1572", + "kind": "string", + "type": { + "$ref": "30" + }, + "value": "Unknown" + }, + "subscriptionId": { + "$id": "1573", + "kind": "string", + "type": { + "$ref": "249" + }, + "value": "vofvsus" + }, + "deadline": { + "$id": "1574", + "kind": "string", + "type": { + "$ref": "253" + }, + "value": "2025-04-15T19:47:03.591Z" + }, + "deadlineType": { + "$id": "1575", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Unknown" + }, + "state": { + "$id": "1576", + "kind": "string", + "type": { + "$ref": "40" + }, + "value": "Unknown" + }, + "timezone": { + "$id": "1577", + "kind": "string", + "type": { + "$ref": "264" + }, + "value": "nwugsooykqggcokphgdj" + }, + "timeZone": { + "$id": "1578", + "kind": "string", + "type": { + "$ref": "268" + }, + "value": "qkxnxnumvfqmsmpyccv" + }, + "resourceOperationError": { + "$id": "1579", + "kind": "model", + "type": { + "$ref": "272" + }, + "value": { + "$id": "1580", + "errorCode": { + "$id": "1581", + "kind": "string", + "type": { + "$ref": "274" + }, + "value": "fagfsojftlff" + }, + "errorDetails": { + "$id": "1582", + "kind": "string", + "type": { + "$ref": "278" + }, + "value": "rtihrkjasrjkllqccuysjrg" + } + } + }, + "completedAt": { + "$id": "1583", + "kind": "string", + "type": { + "$ref": "284" + }, + "value": "2025-04-15T19:47:03.591Z" + }, + "retryPolicy": { + "$id": "1584", + "kind": "model", + "type": { + "$ref": "177" + }, + "value": { + "$id": "1585", + "retryCount": { + "$id": "1586", + "kind": "number", + "type": { + "$ref": "179" + }, + "value": 25 + }, + "retryWindowInMinutes": { + "$id": "1587", + "kind": "number", + "type": { + "$ref": "183" + }, + "value": 4 + } + } + } + } + } + } + } + ] + }, + "description": { + "$id": "1588", + "kind": "string", + "type": { + "$ref": "423" + }, + "value": "plfajalcmjcxmfuvsbnnoabdqxclto" + } + } + } + } + ] + }, + { + "$id": "1589", + "kind": "http", + "name": "ScheduledActions_VirtualMachinesSubmitCreate - generated by [MinimumSet] rule", + "description": "ScheduledActions_VirtualMachinesSubmitCreate - generated by [MinimumSet] rule", + "filePath": "2025-05-01/ScheduledActions_VirtualMachinesSubmitCreate_MinimumSet_Gen.json", + "parameters": [ + { + "$id": "1590", + "parameter": { + "$ref": "1508" + }, + "value": { + "$id": "1591", + "kind": "string", + "type": { + "$ref": "1509" + }, + "value": "2025-05-01" + } + }, + { + "$id": "1592", + "parameter": { + "$ref": "1512" + }, + "value": { + "$id": "1593", + "kind": "string", + "type": { + "$ref": "1513" + }, + "value": "0505D8E4-D41A-48FB-9CA5-4AF8D93BE75F" + } + }, + { + "$id": "1594", + "parameter": { + "$ref": "1515" + }, + "value": { + "$id": "1595", + "kind": "string", + "type": { + "$ref": "1516" + }, + "value": "hrktusuzoncwpnwohurwlmxfbndt" + } + }, + { + "$id": "1596", + "parameter": { + "$ref": "1523" + }, + "value": { + "$id": "1597", + "kind": "model", + "type": { + "$ref": "472" + }, + "value": { + "$id": "1598", + "schedule": { + "$id": "1599", + "kind": "model", + "type": { + "$ref": "147" + }, + "value": { + "$id": "1600", + "deadlineType": { + "$id": "1601", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Unknown" + } + } + }, + "resourceConfigParameters": { + "$id": "1602", + "kind": "model", + "type": { + "$ref": "394" + }, + "value": { + "$id": "1603", + "resourceCount": { + "$id": "1604", + "kind": "number", + "type": { + "$ref": "405" + }, + "value": 28 + } + } + } + } + } + } + ], + "responses": [ + { + "$id": "1605", + "response": { + "$ref": "1524" + }, + "statusCode": 200, + "bodyValue": { + "$id": "1606", + "kind": "model", + "type": { + "$ref": "421" + }, + "value": { + "$id": "1607", + "type": { + "$id": "1608", + "kind": "string", + "type": { + "$ref": "427" + }, + "value": "avmbqoatro" + }, + "location": { + "$id": "1609", + "kind": "string", + "type": { + "$ref": "431" + }, + "value": "hhioerbsucdqayxk" + }, + "description": { + "$id": "1610", + "kind": "string", + "type": { + "$ref": "423" + }, + "value": "plfajalcmjcxmfuvsbnnoabdqxclto" + } + } + } + } + ] + } + ] + }, + "parameters": [ + { + "$id": "1611", + "name": "locationparameter", + "nameInRequest": "locationparameter", + "doc": "The location name.", + "type": { + "$id": "1612", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1613", + "name": "requestBody", + "nameInRequest": "requestBody", + "doc": "The request body", + "type": { + "$ref": "472" + }, + "location": "Body", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1614", + "name": "contentType", + "nameInRequest": "contentType", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$ref": "1518" + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1615", + "name": "accept", + "nameInRequest": "accept", + "type": { + "$ref": "1521" + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "response": { + "$id": "1616", + "type": { + "$ref": "421" + } + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Microsoft.ComputeSchedule.ScheduledActions.virtualMachinesSubmitCreate" + }, + { + "$id": "1617", + "kind": "basic", + "name": "virtualMachinesSubmitDelete", + "accessibility": "public", + "apiVersions": [ + "2025-05-01" + ], + "doc": "VirtualMachinesSubmitDelete: submit delete operation for a batch of virtual machines, at datetime in future.", + "operation": { + "$id": "1618", + "name": "virtualMachinesSubmitDelete", + "resourceName": "ScheduledActions", + "doc": "VirtualMachinesSubmitDelete: submit delete operation for a batch of virtual machines, at datetime in future.", + "accessibility": "public", + "parameters": [ + { + "$id": "1619", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "1620", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "1621", + "type": { + "$id": "1622", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-05-01" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1623", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "1624", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "1625", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1626", + "name": "locationparameter", + "nameInRequest": "locationparameter", + "doc": "The location name.", + "type": { + "$id": "1627", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1628", + "name": "contentType", + "nameInRequest": "Content-Type", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$id": "1629", + "kind": "constant", + "valueType": { + "$id": "1630", + "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": "1631", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "1632", + "kind": "constant", + "valueType": { + "$id": "1633", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "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": "1634", + "name": "requestBody", + "nameInRequest": "requestBody", + "doc": "The request body", + "type": { + "$ref": "486" + }, + "location": "Body", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "1635", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "454" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "POST", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/providers/Microsoft.ComputeSchedule/locations/{locationparameter}/virtualMachinesSubmitDelete", + "requestMediaTypes": [ + "application/json" + ], + "bufferResponse": true, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.ComputeSchedule.ScheduledActions.virtualMachinesSubmitDelete", + "decorators": [], + "examples": [ + { + "$id": "1636", + "kind": "http", + "name": "ScheduledActions_VirtualMachinesSubmitDelete - generated by [MaximumSet] rule", + "description": "ScheduledActions_VirtualMachinesSubmitDelete - generated by [MaximumSet] rule", + "filePath": "2025-05-01/ScheduledActions_VirtualMachinesSubmitDelete_MaximumSet_Gen.json", + "parameters": [ + { + "$id": "1637", + "parameter": { + "$ref": "1619" + }, + "value": { + "$id": "1638", + "kind": "string", + "type": { + "$ref": "1620" + }, + "value": "2025-05-01" + } + }, + { + "$id": "1639", + "parameter": { + "$ref": "1623" + }, + "value": { + "$id": "1640", + "kind": "string", + "type": { + "$ref": "1624" + }, + "value": "0505D8E4-D41A-48FB-9CA5-4AF8D93BE75F" + } + }, + { + "$id": "1641", + "parameter": { + "$ref": "1626" + }, + "value": { + "$id": "1642", + "kind": "string", + "type": { + "$ref": "1627" + }, + "value": "ppjqysfqumddvzzs" + } + }, + { + "$id": "1643", + "parameter": { + "$ref": "1634" + }, + "value": { + "$id": "1644", + "kind": "model", + "type": { + "$ref": "486" + }, + "value": { + "$id": "1645", + "schedule": { + "$id": "1646", + "kind": "model", + "type": { + "$ref": "147" + }, + "value": { + "$id": "1647", + "deadline": { + "$id": "1648", + "kind": "string", + "type": { + "$ref": "149" + }, + "value": "2025-04-15T19:47:04.403Z" + }, + "deadLine": { + "$id": "1649", + "kind": "string", + "type": { + "$ref": "154" + }, + "value": "2025-04-15T19:47:04.403Z" + }, + "timezone": { + "$id": "1650", + "kind": "string", + "type": { + "$ref": "159" + }, + "value": "qacufsmctpgjozovlsihrzoctatcsj" + }, + "timeZone": { + "$id": "1651", + "kind": "string", + "type": { + "$ref": "163" + }, + "value": "upnmayfebiadztdktxzq" + }, + "deadlineType": { + "$id": "1652", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Unknown" + } + } + }, + "executionParameters": { + "$id": "1653", + "kind": "model", + "type": { + "$ref": "172" + }, + "value": { + "$id": "1654", + "optimizationPreference": { + "$id": "1655", + "kind": "string", + "type": { + "$ref": "22" + }, + "value": "Cost" + }, + "retryPolicy": { + "$id": "1656", + "kind": "model", + "type": { + "$ref": "177" + }, + "value": { + "$id": "1657", + "retryCount": { + "$id": "1658", + "kind": "number", + "type": { + "$ref": "179" + }, + "value": 25 + }, + "retryWindowInMinutes": { + "$id": "1659", + "kind": "number", + "type": { + "$ref": "183" + }, + "value": 4 + } + } + } + } + }, + "resources": { + "$id": "1660", + "kind": "model", + "type": { + "$ref": "191" + }, + "value": { + "$id": "1661", + "ids": { + "$id": "1662", + "kind": "array", + "type": { + "$ref": "193" + }, + "value": [ + { + "$id": "1663", + "kind": "string", + "type": { + "$ref": "194" + }, + "value": "/subscriptions/YourSubscriptionId/resourceGroups/YourResourceGroupName/providers/Microsoft.Compute/virtualMachines/testResource3" + } + ] + } + } + }, + "correlationid": { + "$id": "1664", + "kind": "string", + "type": { + "$ref": "497" + }, + "value": "e" + }, + "forceDeletion": { + "$id": "1665", + "kind": "boolean", + "type": { + "$ref": "501" + }, + "value": true + } + } + } + } + ], + "responses": [ + { + "$id": "1666", + "response": { + "$ref": "1635" + }, + "statusCode": 200, + "bodyValue": { + "$id": "1667", + "kind": "model", + "type": { + "$ref": "454" + }, + "value": { + "$id": "1668", + "type": { + "$id": "1669", + "kind": "string", + "type": { + "$ref": "460" + }, + "value": "tauhekvwziataptcsyqtfpq" + }, + "location": { + "$id": "1670", + "kind": "string", + "type": { + "$ref": "464" + }, + "value": "hhioerbsucdqayxk" + }, + "results": { + "$id": "1671", + "kind": "array", + "type": { + "$ref": "469" + }, + "value": [ + { + "$id": "1672", + "kind": "model", + "type": { + "$ref": "220" + }, + "value": { + "$id": "1673", + "resourceId": { + "$id": "1674", + "kind": "string", + "type": { + "$ref": "222" + }, + "value": "/subscriptions/YourSubscriptionId/resourceGroups/YourResourceGroupName/providers/Microsoft.Compute/virtualMachines/testResource3" + }, + "errorCode": { + "$id": "1675", + "kind": "string", + "type": { + "$ref": "227" + }, + "value": "ynukyltendgmn" + }, + "errorDetails": { + "$id": "1676", + "kind": "string", + "type": { + "$ref": "231" + }, + "value": "tifeuh" + }, + "operation": { + "$id": "1677", + "kind": "model", + "type": { + "$ref": "235" + }, + "value": { + "$id": "1678", + "operationId": { + "$id": "1679", + "kind": "string", + "type": { + "$ref": "237" + }, + "value": "vppyaxq" + }, + "resourceId": { + "$id": "1680", + "kind": "string", + "type": { + "$ref": "241" + }, + "value": "/subscriptions/YourSubscriptionId/resourceGroups/YourResourceGroupName/providers/Microsoft.Compute/virtualMachines/testResource3" + }, + "opType": { + "$id": "1681", + "kind": "string", + "type": { + "$ref": "30" + }, + "value": "Unknown" + }, + "subscriptionId": { + "$id": "1682", + "kind": "string", + "type": { + "$ref": "249" + }, + "value": "vofvsus" + }, + "deadline": { + "$id": "1683", + "kind": "string", + "type": { + "$ref": "253" + }, + "value": "2025-04-15T19:47:03.591Z" + }, + "deadlineType": { + "$id": "1684", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Unknown" + }, + "state": { + "$id": "1685", + "kind": "string", + "type": { + "$ref": "40" + }, + "value": "Unknown" + }, + "timezone": { + "$id": "1686", + "kind": "string", + "type": { + "$ref": "264" + }, + "value": "nwugsooykqggcokphgdj" + }, + "timeZone": { + "$id": "1687", + "kind": "string", + "type": { + "$ref": "268" + }, + "value": "qkxnxnumvfqmsmpyccv" + }, + "resourceOperationError": { + "$id": "1688", + "kind": "model", + "type": { + "$ref": "272" + }, + "value": { + "$id": "1689", + "errorCode": { + "$id": "1690", + "kind": "string", + "type": { + "$ref": "274" + }, + "value": "fagfsojftlff" + }, + "errorDetails": { + "$id": "1691", + "kind": "string", + "type": { + "$ref": "278" + }, + "value": "rtihrkjasrjkllqccuysjrg" + } + } + }, + "completedAt": { + "$id": "1692", + "kind": "string", + "type": { + "$ref": "284" + }, + "value": "2025-04-15T19:47:03.591Z" + }, + "retryPolicy": { + "$id": "1693", + "kind": "model", + "type": { + "$ref": "177" + }, + "value": { + "$id": "1694", + "retryCount": { + "$id": "1695", + "kind": "number", + "type": { + "$ref": "179" + }, + "value": 25 + }, + "retryWindowInMinutes": { + "$id": "1696", + "kind": "number", + "type": { + "$ref": "183" + }, + "value": 4 + } + } + } + } + } + } + } + ] + }, + "description": { + "$id": "1697", + "kind": "string", + "type": { + "$ref": "456" + }, + "value": "fxgbwqglaskyb" + } + } + } + } + ] + }, + { + "$id": "1698", + "kind": "http", + "name": "ScheduledActions_VirtualMachinesSubmitDelete - generated by [MinimumSet] rule", + "description": "ScheduledActions_VirtualMachinesSubmitDelete - generated by [MinimumSet] rule", + "filePath": "2025-05-01/ScheduledActions_VirtualMachinesSubmitDelete_MinimumSet_Gen.json", + "parameters": [ + { + "$id": "1699", + "parameter": { + "$ref": "1619" + }, + "value": { + "$id": "1700", + "kind": "string", + "type": { + "$ref": "1620" + }, + "value": "2025-05-01" + } + }, + { + "$id": "1701", + "parameter": { + "$ref": "1623" + }, + "value": { + "$id": "1702", + "kind": "string", + "type": { + "$ref": "1624" + }, + "value": "0505D8E4-D41A-48FB-9CA5-4AF8D93BE75F" + } + }, + { + "$id": "1703", + "parameter": { + "$ref": "1626" + }, + "value": { + "$id": "1704", + "kind": "string", + "type": { + "$ref": "1627" + }, + "value": "xsllpkyjquhhumdidsl" + } + }, + { + "$id": "1705", + "parameter": { + "$ref": "1634" + }, + "value": { + "$id": "1706", + "kind": "model", + "type": { + "$ref": "486" + }, + "value": { + "$id": "1707", + "schedule": { + "$id": "1708", + "kind": "model", + "type": { + "$ref": "147" + }, + "value": { + "$id": "1709", + "deadlineType": { + "$id": "1710", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Unknown" + } + } + }, + "executionParameters": { + "$id": "1711", + "kind": "model", + "type": { + "$ref": "172" + }, + "value": { + "$id": "1712" + } + }, + "resources": { + "$id": "1713", + "kind": "model", + "type": { + "$ref": "191" + }, + "value": { + "$id": "1714", + "ids": { + "$id": "1715", + "kind": "array", + "type": { + "$ref": "193" + }, + "value": [ + { + "$id": "1716", + "kind": "string", + "type": { + "$ref": "194" + }, + "value": "/subscriptions/YourSubscriptionId/resourceGroups/YourResourceGroupName/providers/Microsoft.Compute/virtualMachines/testResource3" + } + ] + } + } + } + } + } + } + ], + "responses": [ + { + "$id": "1717", + "response": { + "$ref": "1635" + }, + "statusCode": 200, + "bodyValue": { + "$id": "1718", + "kind": "model", + "type": { + "$ref": "454" + }, + "value": { + "$id": "1719", + "type": { + "$id": "1720", + "kind": "string", + "type": { + "$ref": "460" + }, + "value": "tauhekvwziataptcsyqtfpq" + }, + "location": { + "$id": "1721", + "kind": "string", + "type": { + "$ref": "464" + }, + "value": "hhioerbsucdqayxk" + }, + "description": { + "$id": "1722", + "kind": "string", + "type": { + "$ref": "456" + }, + "value": "fxgbwqglaskyb" + } + } + } + } + ] + } + ] + }, + "parameters": [ + { + "$id": "1723", + "name": "locationparameter", + "nameInRequest": "locationparameter", + "doc": "The location name.", + "type": { + "$id": "1724", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1725", + "name": "requestBody", + "nameInRequest": "requestBody", + "doc": "The request body", + "type": { + "$ref": "486" + }, + "location": "Body", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1726", + "name": "contentType", + "nameInRequest": "contentType", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$ref": "1629" + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1727", + "name": "accept", + "nameInRequest": "accept", + "type": { + "$ref": "1632" + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "response": { + "$id": "1728", + "type": { + "$ref": "454" + } + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Microsoft.ComputeSchedule.ScheduledActions.virtualMachinesSubmitDelete" + }, + { + "$id": "1729", + "kind": "basic", + "name": "GetVirtualMachineOperationStatus", + "accessibility": "public", + "apiVersions": [ + "2024-08-15-preview", + "2024-10-01", + "2025-05-01" + ], + "doc": "VirtualMachinesGetOperationStatus: Polling endpoint to read status of operations performed on virtual machines", + "operation": { + "$id": "1730", + "name": "GetVirtualMachineOperationStatus", + "resourceName": "ScheduledActions", + "doc": "VirtualMachinesGetOperationStatus: Polling endpoint to read status of operations performed on virtual machines", + "accessibility": "public", + "parameters": [ + { + "$id": "1731", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "1732", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "1733", + "type": { + "$id": "1734", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-05-01" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1735", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "1736", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "1737", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1738", + "name": "locationparameter", + "nameInRequest": "locationparameter", + "doc": "The location name.", + "type": { + "$id": "1739", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1740", + "name": "contentType", + "nameInRequest": "Content-Type", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$id": "1741", + "kind": "constant", + "valueType": { + "$id": "1742", + "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": "1743", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "1744", + "kind": "constant", + "valueType": { + "$id": "1745", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "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": "1746", + "name": "requestBody", + "nameInRequest": "requestBody", + "doc": "The request body", + "type": { + "$ref": "504" + }, + "location": "Body", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "1747", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "514" + }, + "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": "1748", + "kind": "http", + "name": "ScheduledActions_VirtualMachinesGetOperationStatus_MaximumSet_Gen - generated by [MaximumSet] rule - generated by [MaximumSet] rule - generated by [MaximumSet] rule", + "description": "ScheduledActions_VirtualMachinesGetOperationStatus_MaximumSet_Gen - generated by [MaximumSet] rule - generated by [MaximumSet] rule - generated by [MaximumSet] rule", + "filePath": "2025-05-01/ScheduledActions_VirtualMachinesGetOperationStatus_MaximumSet_Gen.json", + "parameters": [ + { + "$id": "1749", + "parameter": { + "$ref": "1731" + }, + "value": { + "$id": "1750", + "kind": "string", + "type": { + "$ref": "1732" + }, + "value": "2025-05-01" + } + }, + { + "$id": "1751", + "parameter": { + "$ref": "1735" + }, + "value": { + "$id": "1752", + "kind": "string", + "type": { + "$ref": "1736" + }, + "value": "0505D8E4-D41A-48FB-9CA5-4AF8D93BE75F" + } + }, + { + "$id": "1753", + "parameter": { + "$ref": "1738" + }, + "value": { + "$id": "1754", + "kind": "string", + "type": { + "$ref": "1739" + }, + "value": "xzbxygykutmvmxpfowdai" + } + }, + { + "$id": "1755", + "parameter": { + "$ref": "1746" + }, + "value": { + "$id": "1756", + "kind": "model", + "type": { + "$ref": "504" + }, + "value": { + "$id": "1757", + "operationIds": { + "$id": "1758", + "kind": "array", + "type": { + "$ref": "506" + }, + "value": [ + { + "$id": "1759", + "kind": "string", + "type": { + "$ref": "507" + }, + "value": "hswzfrierpxdgcuu" + } + ] + }, + "correlationid": { + "$id": "1760", + "kind": "string", + "type": { + "$ref": "511" + }, + "value": "jtlszorevrftvfhnqoxlwpiwcbmj" + } + } + } + } + ], + "responses": [ + { + "$id": "1761", + "response": { + "$ref": "1747" + }, + "statusCode": 200, + "bodyValue": { + "$id": "1762", + "kind": "model", + "type": { + "$ref": "514" + }, + "value": { + "$id": "1763", + "results": { + "$id": "1764", + "kind": "array", + "type": { + "$ref": "516" + }, + "value": [ + { + "$id": "1765", + "kind": "model", + "type": { + "$ref": "220" + }, + "value": { + "$id": "1766", + "resourceId": { + "$id": "1767", + "kind": "string", + "type": { + "$ref": "222" + }, + "value": "/subscriptions/YourSubscriptionId/resourceGroups/YourResourceGroupName/providers/Microsoft.Compute/virtualMachines/testResource3" + }, + "errorCode": { + "$id": "1768", + "kind": "string", + "type": { + "$ref": "227" + }, + "value": "ynukyltendgmn" + }, + "errorDetails": { + "$id": "1769", + "kind": "string", + "type": { + "$ref": "231" + }, + "value": "tifeuh" + }, + "operation": { + "$id": "1770", + "kind": "model", + "type": { + "$ref": "235" + }, + "value": { + "$id": "1771", + "operationId": { + "$id": "1772", + "kind": "string", + "type": { + "$ref": "237" + }, + "value": "vppyaxq" + }, + "resourceId": { + "$id": "1773", + "kind": "string", + "type": { + "$ref": "241" + }, + "value": "/subscriptions/YourSubscriptionId/resourceGroups/YourResourceGroupName/providers/Microsoft.Compute/virtualMachines/testResource3" + }, + "opType": { + "$id": "1774", + "kind": "string", + "type": { + "$ref": "30" + }, + "value": "Unknown" + }, + "subscriptionId": { + "$id": "1775", + "kind": "string", + "type": { + "$ref": "249" + }, + "value": "vofvsus" + }, + "deadline": { + "$id": "1776", + "kind": "string", + "type": { + "$ref": "253" + }, + "value": "2025-04-15T19:47:03.591Z" + }, + "deadlineType": { + "$id": "1777", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Unknown" + }, + "state": { + "$id": "1778", + "kind": "string", + "type": { + "$ref": "40" + }, + "value": "Unknown" + }, + "timezone": { + "$id": "1779", + "kind": "string", + "type": { + "$ref": "264" + }, + "value": "nwugsooykqggcokphgdj" + }, + "timeZone": { + "$id": "1780", + "kind": "string", + "type": { + "$ref": "268" + }, + "value": "qkxnxnumvfqmsmpyccv" + }, + "resourceOperationError": { + "$id": "1781", + "kind": "model", + "type": { + "$ref": "272" + }, + "value": { + "$id": "1782", + "errorCode": { + "$id": "1783", + "kind": "string", + "type": { + "$ref": "274" + }, + "value": "fagfsojftlff" + }, + "errorDetails": { + "$id": "1784", + "kind": "string", + "type": { + "$ref": "278" + }, + "value": "rtihrkjasrjkllqccuysjrg" + } + } + }, + "completedAt": { + "$id": "1785", + "kind": "string", + "type": { + "$ref": "284" + }, + "value": "2025-04-15T19:47:03.591Z" + }, + "retryPolicy": { + "$id": "1786", + "kind": "model", + "type": { + "$ref": "177" + }, + "value": { + "$id": "1787", + "retryCount": { + "$id": "1788", + "kind": "number", + "type": { + "$ref": "179" + }, + "value": 25 + }, + "retryWindowInMinutes": { + "$id": "1789", + "kind": "number", + "type": { + "$ref": "183" + }, + "value": 4 + } + } + } + } + } + } + } + ] + } + } + } + } + ] + }, + { + "$id": "1790", + "kind": "http", + "name": "ScheduledActions_VirtualMachinesGetOperationStatus_MaximumSet_Gen - generated by [MaximumSet] rule - generated by [MaximumSet] rule - generated by [MinimumSet] rule", + "description": "ScheduledActions_VirtualMachinesGetOperationStatus_MaximumSet_Gen - generated by [MaximumSet] rule - generated by [MaximumSet] rule - generated by [MinimumSet] rule", + "filePath": "2025-05-01/ScheduledActions_VirtualMachinesGetOperationStatus_MinimumSet_Gen.json", + "parameters": [ + { + "$id": "1791", + "parameter": { + "$ref": "1731" + }, + "value": { + "$id": "1792", + "kind": "string", + "type": { + "$ref": "1732" + }, + "value": "2025-05-01" + } + }, + { + "$id": "1793", + "parameter": { + "$ref": "1735" + }, + "value": { + "$id": "1794", + "kind": "string", + "type": { + "$ref": "1736" + }, + "value": "0505D8E4-D41A-48FB-9CA5-4AF8D93BE75F" + } + }, + { + "$id": "1795", + "parameter": { + "$ref": "1738" + }, + "value": { + "$id": "1796", + "kind": "string", + "type": { + "$ref": "1739" + }, + "value": "egz" + } + }, + { + "$id": "1797", + "parameter": { + "$ref": "1746" + }, + "value": { + "$id": "1798", + "kind": "model", + "type": { + "$ref": "504" + }, + "value": { + "$id": "1799", + "operationIds": { + "$id": "1800", + "kind": "array", + "type": { + "$ref": "506" + }, + "value": [ + { + "$id": "1801", + "kind": "string", + "type": { + "$ref": "507" + }, + "value": "hswzfrierpxdgcuu" + } + ] + }, + "correlationid": { + "$id": "1802", + "kind": "string", + "type": { + "$ref": "511" + }, + "value": "jtlszorevrftvfhnqoxlwpiwcbmj" + } + } + } + } + ], + "responses": [ + { + "$id": "1803", + "response": { + "$ref": "1747" + }, + "statusCode": 200, + "bodyValue": { + "$id": "1804", + "kind": "model", + "type": { + "$ref": "514" + }, + "value": { + "$id": "1805", + "results": { + "$id": "1806", + "kind": "array", + "type": { + "$ref": "516" + }, + "value": [ + { + "$id": "1807", + "kind": "model", + "type": { + "$ref": "220" + }, + "value": { + "$id": "1808" + } + } + ] + } + } + } + } + ] + } + ] + }, + "parameters": [ + { + "$id": "1809", + "name": "locationparameter", + "nameInRequest": "locationparameter", + "doc": "The location name.", + "type": { + "$id": "1810", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1811", + "name": "requestBody", + "nameInRequest": "requestBody", + "doc": "The request body", + "type": { + "$ref": "504" + }, + "location": "Body", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1812", + "name": "contentType", + "nameInRequest": "contentType", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$ref": "1741" + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1813", + "name": "accept", + "nameInRequest": "accept", + "type": { + "$ref": "1744" + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "response": { + "$id": "1814", + "type": { + "$ref": "514" + } + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Microsoft.ComputeSchedule.ScheduledActions.virtualMachinesGetOperationStatus" + }, + { + "$id": "1815", + "kind": "basic", + "name": "CancelVirtualMachineOperations", + "accessibility": "public", + "apiVersions": [ + "2024-08-15-preview", + "2024-10-01", + "2025-05-01" + ], + "doc": "VirtualMachinesCancelOperations: Cancel a previously submitted (start/deallocate/hibernate) request", + "operation": { + "$id": "1816", + "name": "CancelVirtualMachineOperations", + "resourceName": "ScheduledActions", + "doc": "VirtualMachinesCancelOperations: Cancel a previously submitted (start/deallocate/hibernate) request", + "accessibility": "public", + "parameters": [ + { + "$id": "1817", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "1818", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "1819", + "type": { + "$id": "1820", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-05-01" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1821", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "1822", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "1823", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1824", + "name": "locationparameter", + "nameInRequest": "locationparameter", + "doc": "The location name.", + "type": { + "$id": "1825", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1826", + "name": "contentType", + "nameInRequest": "Content-Type", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$id": "1827", + "kind": "constant", + "valueType": { + "$id": "1828", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": true, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1829", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "1830", + "kind": "constant", + "valueType": { + "$id": "1831", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "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": "1832", + "name": "requestBody", + "nameInRequest": "requestBody", + "doc": "The request body", + "type": { + "$ref": "519" + }, + "location": "Body", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "1833", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "529" + }, + "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": "1834", + "kind": "http", + "name": "ScheduledActions_VirtualMachinesCancelOperations_MaximumSet_Gen - generated by [MaximumSet] rule - generated by [MaximumSet] rule - generated by [MaximumSet] rule", + "description": "ScheduledActions_VirtualMachinesCancelOperations_MaximumSet_Gen - generated by [MaximumSet] rule - generated by [MaximumSet] rule - generated by [MaximumSet] rule", + "filePath": "2025-05-01/ScheduledActions_VirtualMachinesCancelOperations_MaximumSet_Gen.json", + "parameters": [ + { + "$id": "1835", + "parameter": { + "$ref": "1817" + }, + "value": { + "$id": "1836", + "kind": "string", + "type": { + "$ref": "1818" + }, + "value": "2025-05-01" + } + }, + { + "$id": "1837", + "parameter": { + "$ref": "1821" + }, + "value": { + "$id": "1838", + "kind": "string", + "type": { + "$ref": "1822" + }, + "value": "0505D8E4-D41A-48FB-9CA5-4AF8D93BE75F" + } + }, + { + "$id": "1839", + "parameter": { + "$ref": "1824" + }, + "value": { + "$id": "1840", + "kind": "string", + "type": { + "$ref": "1825" + }, + "value": "hwrogamrxmqmbhyksvvbpge" + } + }, + { + "$id": "1841", + "parameter": { + "$ref": "1832" + }, + "value": { + "$id": "1842", + "kind": "model", + "type": { + "$ref": "519" + }, + "value": { + "$id": "1843", + "operationIds": { + "$id": "1844", + "kind": "array", + "type": { + "$ref": "521" + }, + "value": [ + { + "$id": "1845", + "kind": "string", + "type": { + "$ref": "522" + }, + "value": "rcudibq" + } + ] + }, + "correlationid": { + "$id": "1846", + "kind": "string", + "type": { + "$ref": "526" + }, + "value": "lacjacfbxixdmg" + } + } + } + } + ], + "responses": [ + { + "$id": "1847", + "response": { + "$ref": "1833" + }, + "statusCode": 200, + "bodyValue": { + "$id": "1848", + "kind": "model", + "type": { + "$ref": "529" + }, + "value": { + "$id": "1849", + "results": { + "$id": "1850", + "kind": "array", + "type": { + "$ref": "531" + }, + "value": [ + { + "$id": "1851", + "kind": "model", + "type": { + "$ref": "220" + }, + "value": { + "$id": "1852", + "resourceId": { + "$id": "1853", + "kind": "string", + "type": { + "$ref": "222" + }, + "value": "/subscriptions/YourSubscriptionId/resourceGroups/YourResourceGroupName/providers/Microsoft.Compute/virtualMachines/testResource3" + }, + "errorCode": { + "$id": "1854", + "kind": "string", + "type": { + "$ref": "227" + }, + "value": "ynukyltendgmn" + }, + "errorDetails": { + "$id": "1855", + "kind": "string", + "type": { + "$ref": "231" + }, + "value": "tifeuh" + }, + "operation": { + "$id": "1856", + "kind": "model", + "type": { + "$ref": "235" + }, + "value": { + "$id": "1857", + "operationId": { + "$id": "1858", + "kind": "string", + "type": { + "$ref": "237" + }, + "value": "vppyaxq" + }, + "resourceId": { + "$id": "1859", + "kind": "string", + "type": { + "$ref": "241" + }, + "value": "/subscriptions/YourSubscriptionId/resourceGroups/YourResourceGroupName/providers/Microsoft.Compute/virtualMachines/testResource3" + }, + "opType": { + "$id": "1860", + "kind": "string", + "type": { + "$ref": "30" + }, + "value": "Unknown" + }, + "subscriptionId": { + "$id": "1861", + "kind": "string", + "type": { + "$ref": "249" + }, + "value": "vofvsus" + }, + "deadline": { + "$id": "1862", + "kind": "string", + "type": { + "$ref": "253" + }, + "value": "2025-04-15T19:47:03.591Z" + }, + "deadlineType": { + "$id": "1863", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Unknown" + }, + "state": { + "$id": "1864", + "kind": "string", + "type": { + "$ref": "40" + }, + "value": "Unknown" + }, + "timezone": { + "$id": "1865", + "kind": "string", + "type": { + "$ref": "264" + }, + "value": "nwugsooykqggcokphgdj" + }, + "timeZone": { + "$id": "1866", + "kind": "string", + "type": { + "$ref": "268" + }, + "value": "qkxnxnumvfqmsmpyccv" + }, + "resourceOperationError": { + "$id": "1867", + "kind": "model", + "type": { + "$ref": "272" + }, + "value": { + "$id": "1868", + "errorCode": { + "$id": "1869", + "kind": "string", + "type": { + "$ref": "274" + }, + "value": "fagfsojftlff" + }, + "errorDetails": { + "$id": "1870", + "kind": "string", + "type": { + "$ref": "278" + }, + "value": "rtihrkjasrjkllqccuysjrg" + } + } + }, + "completedAt": { + "$id": "1871", + "kind": "string", + "type": { + "$ref": "284" + }, + "value": "2025-04-15T19:47:03.591Z" + }, + "retryPolicy": { + "$id": "1872", + "kind": "model", + "type": { + "$ref": "177" + }, + "value": { + "$id": "1873", + "retryCount": { + "$id": "1874", + "kind": "number", + "type": { + "$ref": "179" + }, + "value": 25 + }, + "retryWindowInMinutes": { + "$id": "1875", + "kind": "number", + "type": { + "$ref": "183" + }, + "value": 4 + } + } + } + } + } + } + } + ] + } + } + } + } + ] + }, + { + "$id": "1876", + "kind": "http", + "name": "ScheduledActions_VirtualMachinesCancelOperations_MaximumSet_Gen - generated by [MaximumSet] rule - generated by [MaximumSet] rule - generated by [MinimumSet] rule", + "description": "ScheduledActions_VirtualMachinesCancelOperations_MaximumSet_Gen - generated by [MaximumSet] rule - generated by [MaximumSet] rule - generated by [MinimumSet] rule", + "filePath": "2025-05-01/ScheduledActions_VirtualMachinesCancelOperations_MinimumSet_Gen.json", + "parameters": [ + { + "$id": "1877", + "parameter": { + "$ref": "1817" + }, + "value": { + "$id": "1878", + "kind": "string", + "type": { + "$ref": "1818" + }, + "value": "2025-05-01" + } + }, + { + "$id": "1879", + "parameter": { + "$ref": "1821" + }, + "value": { + "$id": "1880", + "kind": "string", + "type": { + "$ref": "1822" + }, + "value": "0505D8E4-D41A-48FB-9CA5-4AF8D93BE75F" + } + }, + { + "$id": "1881", + "parameter": { + "$ref": "1824" + }, + "value": { + "$id": "1882", + "kind": "string", + "type": { + "$ref": "1825" + }, + "value": "pitwczrefdkzfrpphvbqrvbavgnfxl" + } + }, + { + "$id": "1883", + "parameter": { + "$ref": "1832" + }, + "value": { + "$id": "1884", + "kind": "model", + "type": { + "$ref": "519" + }, + "value": { + "$id": "1885", + "operationIds": { + "$id": "1886", + "kind": "array", + "type": { + "$ref": "521" + }, + "value": [ + { + "$id": "1887", + "kind": "string", + "type": { + "$ref": "522" + }, + "value": "rcudibq" + } + ] + }, + "correlationid": { + "$id": "1888", + "kind": "string", + "type": { + "$ref": "526" + }, + "value": "lacjacfbxixdmg" + } + } + } + } + ], + "responses": [ + { + "$id": "1889", + "response": { + "$ref": "1833" + }, + "statusCode": 200, + "bodyValue": { + "$id": "1890", + "kind": "model", + "type": { + "$ref": "529" + }, + "value": { + "$id": "1891", + "results": { + "$id": "1892", + "kind": "array", + "type": { + "$ref": "531" + }, + "value": [ + { + "$id": "1893", + "kind": "model", + "type": { + "$ref": "220" + }, + "value": { + "$id": "1894" + } + } + ] + } + } + } + } + ] + } + ] + }, + "parameters": [ + { + "$id": "1895", + "name": "locationparameter", + "nameInRequest": "locationparameter", + "doc": "The location name.", + "type": { + "$id": "1896", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1897", + "name": "requestBody", + "nameInRequest": "requestBody", + "doc": "The request body", + "type": { + "$ref": "519" + }, + "location": "Body", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1898", + "name": "contentType", + "nameInRequest": "contentType", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$ref": "1827" + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1899", + "name": "accept", + "nameInRequest": "accept", + "type": { + "$ref": "1830" + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "response": { + "$id": "1900", + "type": { + "$ref": "529" + } + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Microsoft.ComputeSchedule.ScheduledActions.virtualMachinesCancelOperations" + }, + { + "$id": "1901", + "kind": "basic", + "name": "GetVirtualMachineOperationErrors", + "accessibility": "public", + "apiVersions": [ + "2024-08-15-preview", + "2024-10-01", + "2025-05-01" + ], + "doc": "VirtualMachinesGetOperationErrors: Get error details on operation errors (like transient errors encountered, additional logs) if they exist.", + "operation": { + "$id": "1902", + "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": "1903", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "1904", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "1905", + "type": { + "$id": "1906", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-05-01" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1907", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "1908", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "1909", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1910", + "name": "locationparameter", + "nameInRequest": "locationparameter", + "doc": "The location name.", + "type": { + "$id": "1911", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1912", + "name": "contentType", + "nameInRequest": "Content-Type", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$id": "1913", + "kind": "constant", + "valueType": { + "$id": "1914", + "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": "1915", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "1916", + "kind": "constant", + "valueType": { + "$id": "1917", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "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": "1918", + "name": "requestBody", + "nameInRequest": "requestBody", + "doc": "The request body", + "type": { + "$ref": "534" + }, + "location": "Body", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "1919", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "540" + }, + "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": "1920", + "kind": "http", + "name": "ScheduledActions_VirtualMachinesGetOperationErrors_MaximumSet_Gen - generated by [MaximumSet] rule - generated by [MaximumSet] rule - generated by [MaximumSet] rule", + "description": "ScheduledActions_VirtualMachinesGetOperationErrors_MaximumSet_Gen - generated by [MaximumSet] rule - generated by [MaximumSet] rule - generated by [MaximumSet] rule", + "filePath": "2025-05-01/ScheduledActions_VirtualMachinesGetOperationErrors_MaximumSet_Gen.json", + "parameters": [ + { + "$id": "1921", + "parameter": { + "$ref": "1903" + }, + "value": { + "$id": "1922", + "kind": "string", + "type": { + "$ref": "1904" + }, + "value": "2025-05-01" + } + }, + { + "$id": "1923", + "parameter": { + "$ref": "1907" + }, + "value": { + "$id": "1924", + "kind": "string", + "type": { + "$ref": "1908" + }, + "value": "0505D8E4-D41A-48FB-9CA5-4AF8D93BE75F" + } + }, + { + "$id": "1925", + "parameter": { + "$ref": "1910" + }, + "value": { + "$id": "1926", + "kind": "string", + "type": { + "$ref": "1911" + }, + "value": "paluwjjcxtjeozpoxrnstls" + } + }, + { + "$id": "1927", + "parameter": { + "$ref": "1918" + }, + "value": { + "$id": "1928", + "kind": "model", + "type": { + "$ref": "534" + }, + "value": { + "$id": "1929", + "operationIds": { + "$id": "1930", + "kind": "array", + "type": { + "$ref": "536" + }, + "value": [ + { + "$id": "1931", + "kind": "string", + "type": { + "$ref": "537" + }, + "value": "ksufjznokhsbowdupyt" + } + ] + } + } + } + } + ], + "responses": [ + { + "$id": "1932", + "response": { + "$ref": "1919" + }, + "statusCode": 200, + "bodyValue": { + "$id": "1933", + "kind": "model", + "type": { + "$ref": "540" + }, + "value": { + "$id": "1934", + "results": { + "$id": "1935", + "kind": "array", + "type": { + "$ref": "542" + }, + "value": [ + { + "$id": "1936", + "kind": "model", + "type": { + "$ref": "543" + }, + "value": { + "$id": "1937", + "operationId": { + "$id": "1938", + "kind": "string", + "type": { + "$ref": "545" + }, + "value": "emftjglfbsxaboxqzxlpbjian" + }, + "creationTime": { + "$id": "1939", + "kind": "string", + "type": { + "$ref": "549" + }, + "value": "2025-04-15T19:47:04.130Z" + }, + "activationTime": { + "$id": "1940", + "kind": "string", + "type": { + "$ref": "554" + }, + "value": "2025-04-15T19:47:04.130Z" + }, + "completedAt": { + "$id": "1941", + "kind": "string", + "type": { + "$ref": "559" + }, + "value": "2025-04-15T19:47:04.130Z" + }, + "operationErrors": { + "$id": "1942", + "kind": "array", + "type": { + "$ref": "564" + }, + "value": [ + { + "$id": "1943", + "kind": "model", + "type": { + "$ref": "565" + }, + "value": { + "$id": "1944", + "errorCode": { + "$id": "1945", + "kind": "string", + "type": { + "$ref": "567" + }, + "value": "awrovoihpnqsotznapyrrb" + }, + "errorDetails": { + "$id": "1946", + "kind": "string", + "type": { + "$ref": "571" + }, + "value": "af" + }, + "timestamp": { + "$id": "1947", + "kind": "string", + "type": { + "$ref": "575" + }, + "value": "2025-04-15T19:47:04.131Z" + }, + "timeStamp": { + "$id": "1948", + "kind": "string", + "type": { + "$ref": "580" + }, + "value": "2025-04-15T19:47:04.131Z" + }, + "azureOperationName": { + "$id": "1949", + "kind": "string", + "type": { + "$ref": "585" + }, + "value": "ipsoybbslitmwsfkygfjhb" + }, + "crpOperationId": { + "$id": "1950", + "kind": "string", + "type": { + "$ref": "589" + }, + "value": "cqkmbfb" + } + } + } + ] + }, + "requestErrorCode": { + "$id": "1951", + "kind": "string", + "type": { + "$ref": "595" + }, + "value": "vzixjphgeygyhzpbbkgzcjol" + }, + "requestErrorDetails": { + "$id": "1952", + "kind": "string", + "type": { + "$ref": "599" + }, + "value": "ficjafazcvbmlbnqhffwtevkla" + } + } + } + ] + } + } + } + } + ] + }, + { + "$id": "1953", + "kind": "http", + "name": "ScheduledActions_VirtualMachinesGetOperationErrors_MaximumSet_Gen - generated by [MaximumSet] rule - generated by [MaximumSet] rule - generated by [MinimumSet] rule", + "description": "ScheduledActions_VirtualMachinesGetOperationErrors_MaximumSet_Gen - generated by [MaximumSet] rule - generated by [MaximumSet] rule - generated by [MinimumSet] rule", + "filePath": "2025-05-01/ScheduledActions_VirtualMachinesGetOperationErrors_MinimumSet_Gen.json", + "parameters": [ + { + "$id": "1954", + "parameter": { + "$ref": "1903" + }, + "value": { + "$id": "1955", + "kind": "string", + "type": { + "$ref": "1904" + }, + "value": "2025-05-01" + } + }, + { + "$id": "1956", + "parameter": { + "$ref": "1907" + }, + "value": { + "$id": "1957", + "kind": "string", + "type": { + "$ref": "1908" + }, + "value": "0505D8E4-D41A-48FB-9CA5-4AF8D93BE75F" + } + }, + { + "$id": "1958", + "parameter": { + "$ref": "1910" + }, + "value": { + "$id": "1959", + "kind": "string", + "type": { + "$ref": "1911" + }, + "value": "nqwtkslhoamsmxucgbljcz" + } + }, + { + "$id": "1960", + "parameter": { + "$ref": "1918" + }, + "value": { + "$id": "1961", + "kind": "model", + "type": { + "$ref": "534" + }, + "value": { + "$id": "1962", + "operationIds": { + "$id": "1963", + "kind": "array", + "type": { + "$ref": "536" + }, + "value": [ + { + "$id": "1964", + "kind": "string", + "type": { + "$ref": "537" + }, + "value": "ksufjznokhsbowdupyt" + } + ] + } + } + } + } + ], + "responses": [ + { + "$id": "1965", + "response": { + "$ref": "1919" + }, + "statusCode": 200, + "bodyValue": { + "$id": "1966", + "kind": "model", + "type": { + "$ref": "540" + }, + "value": { + "$id": "1967", + "results": { + "$id": "1968", + "kind": "array", + "type": { + "$ref": "542" + }, + "value": [ + { + "$id": "1969", + "kind": "model", + "type": { + "$ref": "543" + }, + "value": { + "$id": "1970" + } + } + ] + } + } + } + } + ] + } + ] + }, + "parameters": [ + { + "$id": "1971", + "name": "locationparameter", + "nameInRequest": "locationparameter", + "doc": "The location name.", + "type": { + "$id": "1972", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1973", + "name": "requestBody", + "nameInRequest": "requestBody", + "doc": "The request body", + "type": { + "$ref": "534" + }, + "location": "Body", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1974", + "name": "contentType", + "nameInRequest": "contentType", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$ref": "1913" + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1975", + "name": "accept", + "nameInRequest": "accept", + "type": { + "$ref": "1916" + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "response": { + "$id": "1976", + "type": { + "$ref": "540" + } + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Microsoft.ComputeSchedule.ScheduledActions.virtualMachinesGetOperationErrors" + } + ], + "parameters": [ + { + "$id": "1977", + "name": "endpoint", + "nameInRequest": "endpoint", + "doc": "Service host", + "type": { + "$id": "1978", + "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": "1979", + "type": { + "$id": "1980", + "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", + "2025-05-01" + ], + "parent": { + "$ref": "604" + } + } + ] + } + ], + "auth": { + "$id": "1981", + "oAuth2": { + "$id": "1982", + "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..6c05fbbbd866 --- /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.DurableTaskHubResource GetDurableTaskHubResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.DurableTask.DurableTaskRetentionPolicyResource GetDurableTaskRetentionPolicyResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.Response GetDurableTaskScheduler(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string schedulerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static System.Threading.Tasks.Task> GetDurableTaskSchedulerAsync(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string schedulerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.ResourceManager.DurableTask.DurableTaskSchedulerResource GetDurableTaskSchedulerResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.DurableTask.DurableTaskSchedulerCollection GetDurableTaskSchedulers(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource) { throw null; } + public static Azure.Pageable GetDurableTaskSchedulers(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.AsyncPageable GetDurableTaskSchedulersAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class DurableTaskHubCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected DurableTaskHubCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string taskHubName, Azure.ResourceManager.DurableTask.DurableTaskHubData 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.DurableTaskHubData 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 DurableTaskHubData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DurableTaskHubData() { } + public Azure.ResourceManager.DurableTask.Models.DurableTaskHubProperties Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DurableTask.DurableTaskHubData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.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.DurableTaskHubData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DurableTaskHubResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected DurableTaskHubResource() { } + public virtual Azure.ResourceManager.DurableTask.DurableTaskHubData 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.DurableTaskHubData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.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.DurableTaskHubData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.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.DurableTaskHubData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.DurableTask.DurableTaskHubData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class DurableTaskRetentionPolicyData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DurableTaskRetentionPolicyData() { } + public Azure.ResourceManager.DurableTask.Models.DurableTaskRetentionPolicyProperties Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DurableTask.DurableTaskRetentionPolicyData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.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.DurableTaskRetentionPolicyData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DurableTaskRetentionPolicyResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected DurableTaskRetentionPolicyResource() { } + public virtual Azure.ResourceManager.DurableTask.DurableTaskRetentionPolicyData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, Azure.ResourceManager.DurableTask.DurableTaskRetentionPolicyData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.DurableTask.DurableTaskRetentionPolicyData 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.DurableTaskRetentionPolicyData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.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.DurableTaskRetentionPolicyData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.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.DurableTaskRetentionPolicyData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.DurableTask.DurableTaskRetentionPolicyData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class DurableTaskSchedulerCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected DurableTaskSchedulerCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string schedulerName, Azure.ResourceManager.DurableTask.DurableTaskSchedulerData 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.DurableTaskSchedulerData 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 DurableTaskSchedulerData : Azure.ResourceManager.Models.TrackedResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DurableTaskSchedulerData(Azure.Core.AzureLocation location) { } + public Azure.ResourceManager.DurableTask.Models.DurableTaskSchedulerProperties Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DurableTask.DurableTaskSchedulerData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.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.DurableTaskSchedulerData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DurableTaskSchedulerResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected DurableTaskSchedulerResource() { } + public virtual Azure.ResourceManager.DurableTask.DurableTaskSchedulerData 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.Response GetDurableTaskHub(string taskHubName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetDurableTaskHubAsync(string taskHubName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.DurableTask.DurableTaskHubCollection GetDurableTaskHubs() { throw null; } + public virtual Azure.ResourceManager.DurableTask.DurableTaskRetentionPolicyResource GetDurableTaskRetentionPolicy() { 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.DurableTaskSchedulerData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.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.DurableTaskSchedulerData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.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.DurableTaskSchedulerPatch 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.DurableTaskSchedulerPatch patch, 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.DurableTaskHubResource GetDurableTaskHubResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.DurableTask.DurableTaskRetentionPolicyResource GetDurableTaskRetentionPolicyResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.DurableTask.DurableTaskSchedulerResource GetDurableTaskSchedulerResource(Azure.Core.ResourceIdentifier id) { throw null; } + } + public partial class MockableDurableTaskResourceGroupResource : Azure.ResourceManager.ArmResource + { + protected MockableDurableTaskResourceGroupResource() { } + public virtual Azure.Response GetDurableTaskScheduler(string schedulerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetDurableTaskSchedulerAsync(string schedulerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.DurableTask.DurableTaskSchedulerCollection GetDurableTaskSchedulers() { throw null; } + } + public partial class MockableDurableTaskSubscriptionResource : Azure.ResourceManager.ArmResource + { + protected MockableDurableTaskSubscriptionResource() { } + public virtual Azure.Pageable GetDurableTaskSchedulers(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetDurableTaskSchedulersAsync(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.DurableTaskHubData DurableTaskHubData(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.DurableTaskHubProperties properties = null) { throw null; } + public static Azure.ResourceManager.DurableTask.Models.DurableTaskHubProperties DurableTaskHubProperties(Azure.ResourceManager.DurableTask.Models.DurableTaskProvisioningState? provisioningState = default(Azure.ResourceManager.DurableTask.Models.DurableTaskProvisioningState?), System.Uri dashboardUri = null) { throw null; } + public static Azure.ResourceManager.DurableTask.DurableTaskRetentionPolicyData DurableTaskRetentionPolicyData(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.DurableTaskRetentionPolicyProperties properties = null) { throw null; } + public static Azure.ResourceManager.DurableTask.Models.DurableTaskRetentionPolicyProperties DurableTaskRetentionPolicyProperties(Azure.ResourceManager.DurableTask.Models.DurableTaskProvisioningState? provisioningState = default(Azure.ResourceManager.DurableTask.Models.DurableTaskProvisioningState?), System.Collections.Generic.IEnumerable retentionPolicies = null) { throw null; } + public static Azure.ResourceManager.DurableTask.DurableTaskSchedulerData DurableTaskSchedulerData(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.DurableTaskSchedulerProperties properties = null) { throw null; } + public static Azure.ResourceManager.DurableTask.Models.DurableTaskSchedulerPatchProperties DurableTaskSchedulerPatchProperties(Azure.ResourceManager.DurableTask.Models.DurableTaskProvisioningState? provisioningState = default(Azure.ResourceManager.DurableTask.Models.DurableTaskProvisioningState?), string endpoint = null, System.Collections.Generic.IEnumerable ipAllowlist = null, Azure.ResourceManager.DurableTask.Models.DurableTaskSchedulerSkuUpdate sku = null) { throw null; } + public static Azure.ResourceManager.DurableTask.Models.DurableTaskSchedulerProperties DurableTaskSchedulerProperties(Azure.ResourceManager.DurableTask.Models.DurableTaskProvisioningState? provisioningState = default(Azure.ResourceManager.DurableTask.Models.DurableTaskProvisioningState?), string endpoint = null, System.Collections.Generic.IEnumerable ipAllowlist = null, Azure.ResourceManager.DurableTask.Models.DurableTaskSchedulerSku sku = null) { throw null; } + public static Azure.ResourceManager.DurableTask.Models.DurableTaskSchedulerSku DurableTaskSchedulerSku(string name = null, int? capacity = default(int?), Azure.ResourceManager.DurableTask.Models.DurableTaskResourceRedundancyState? redundancyState = default(Azure.ResourceManager.DurableTask.Models.DurableTaskResourceRedundancyState?)) { throw null; } + public static Azure.ResourceManager.DurableTask.Models.DurableTaskSchedulerSkuUpdate DurableTaskSchedulerSkuUpdate(string name = null, int? capacity = default(int?), Azure.ResourceManager.DurableTask.Models.DurableTaskResourceRedundancyState? redundancyState = default(Azure.ResourceManager.DurableTask.Models.DurableTaskResourceRedundancyState?)) { throw null; } + } + public partial class DurableTaskHubProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DurableTaskHubProperties() { } + public System.Uri DashboardUri { get { throw null; } } + public Azure.ResourceManager.DurableTask.Models.DurableTaskProvisioningState? ProvisioningState { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DurableTask.Models.DurableTaskHubProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.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.DurableTaskHubProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.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 DurableTaskProvisioningState : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public DurableTaskProvisioningState(string value) { throw null; } + public static Azure.ResourceManager.DurableTask.Models.DurableTaskProvisioningState Accepted { get { throw null; } } + public static Azure.ResourceManager.DurableTask.Models.DurableTaskProvisioningState Canceled { get { throw null; } } + public static Azure.ResourceManager.DurableTask.Models.DurableTaskProvisioningState Deleting { get { throw null; } } + public static Azure.ResourceManager.DurableTask.Models.DurableTaskProvisioningState Failed { get { throw null; } } + public static Azure.ResourceManager.DurableTask.Models.DurableTaskProvisioningState Provisioning { get { throw null; } } + public static Azure.ResourceManager.DurableTask.Models.DurableTaskProvisioningState Succeeded { get { throw null; } } + public static Azure.ResourceManager.DurableTask.Models.DurableTaskProvisioningState Updating { get { throw null; } } + public bool Equals(Azure.ResourceManager.DurableTask.Models.DurableTaskProvisioningState 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.DurableTaskProvisioningState left, Azure.ResourceManager.DurableTask.Models.DurableTaskProvisioningState right) { throw null; } + public static implicit operator Azure.ResourceManager.DurableTask.Models.DurableTaskProvisioningState (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.DurableTask.Models.DurableTaskProvisioningState left, Azure.ResourceManager.DurableTask.Models.DurableTaskProvisioningState right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct DurableTaskPurgeableOrchestrationState : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public DurableTaskPurgeableOrchestrationState(string value) { throw null; } + public static Azure.ResourceManager.DurableTask.Models.DurableTaskPurgeableOrchestrationState Canceled { get { throw null; } } + public static Azure.ResourceManager.DurableTask.Models.DurableTaskPurgeableOrchestrationState Completed { get { throw null; } } + public static Azure.ResourceManager.DurableTask.Models.DurableTaskPurgeableOrchestrationState Failed { get { throw null; } } + public static Azure.ResourceManager.DurableTask.Models.DurableTaskPurgeableOrchestrationState Terminated { get { throw null; } } + public bool Equals(Azure.ResourceManager.DurableTask.Models.DurableTaskPurgeableOrchestrationState 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.DurableTaskPurgeableOrchestrationState left, Azure.ResourceManager.DurableTask.Models.DurableTaskPurgeableOrchestrationState right) { throw null; } + public static implicit operator Azure.ResourceManager.DurableTask.Models.DurableTaskPurgeableOrchestrationState (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.DurableTask.Models.DurableTaskPurgeableOrchestrationState left, Azure.ResourceManager.DurableTask.Models.DurableTaskPurgeableOrchestrationState right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct DurableTaskResourceRedundancyState : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public DurableTaskResourceRedundancyState(string value) { throw null; } + public static Azure.ResourceManager.DurableTask.Models.DurableTaskResourceRedundancyState None { get { throw null; } } + public static Azure.ResourceManager.DurableTask.Models.DurableTaskResourceRedundancyState Zone { get { throw null; } } + public bool Equals(Azure.ResourceManager.DurableTask.Models.DurableTaskResourceRedundancyState 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.DurableTaskResourceRedundancyState left, Azure.ResourceManager.DurableTask.Models.DurableTaskResourceRedundancyState right) { throw null; } + public static implicit operator Azure.ResourceManager.DurableTask.Models.DurableTaskResourceRedundancyState (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.DurableTask.Models.DurableTaskResourceRedundancyState left, Azure.ResourceManager.DurableTask.Models.DurableTaskResourceRedundancyState right) { throw null; } + public override string ToString() { throw null; } + } + public partial class DurableTaskRetentionPolicyDetails : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DurableTaskRetentionPolicyDetails(int retentionPeriodInDays) { } + public Azure.ResourceManager.DurableTask.Models.DurableTaskPurgeableOrchestrationState? 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.DurableTaskRetentionPolicyDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.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.DurableTaskRetentionPolicyDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DurableTaskRetentionPolicyProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DurableTaskRetentionPolicyProperties() { } + public Azure.ResourceManager.DurableTask.Models.DurableTaskProvisioningState? 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.DurableTaskRetentionPolicyProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.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.DurableTaskRetentionPolicyProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DurableTaskSchedulerPatch : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DurableTaskSchedulerPatch() { } + public Azure.ResourceManager.DurableTask.Models.DurableTaskSchedulerPatchProperties 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.DurableTaskSchedulerPatch System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.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.DurableTaskSchedulerPatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DurableTaskSchedulerPatchProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DurableTaskSchedulerPatchProperties() { } + public string Endpoint { get { throw null; } } + public System.Collections.Generic.IList IPAllowlist { get { throw null; } } + public Azure.ResourceManager.DurableTask.Models.DurableTaskProvisioningState? ProvisioningState { get { throw null; } } + public Azure.ResourceManager.DurableTask.Models.DurableTaskSchedulerSkuUpdate Sku { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DurableTask.Models.DurableTaskSchedulerPatchProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.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.DurableTaskSchedulerPatchProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DurableTaskSchedulerProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DurableTaskSchedulerProperties(System.Collections.Generic.IEnumerable ipAllowlist, Azure.ResourceManager.DurableTask.Models.DurableTaskSchedulerSku sku) { } + public string Endpoint { get { throw null; } } + public System.Collections.Generic.IList IPAllowlist { get { throw null; } } + public Azure.ResourceManager.DurableTask.Models.DurableTaskProvisioningState? ProvisioningState { get { throw null; } } + public Azure.ResourceManager.DurableTask.Models.DurableTaskSchedulerSku Sku { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DurableTask.Models.DurableTaskSchedulerProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.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.DurableTaskSchedulerProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DurableTaskSchedulerSku : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DurableTaskSchedulerSku(string name) { } + public int? Capacity { get { throw null; } set { } } + public string Name { get { throw null; } set { } } + public Azure.ResourceManager.DurableTask.Models.DurableTaskResourceRedundancyState? RedundancyState { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DurableTask.Models.DurableTaskSchedulerSku System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.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.DurableTaskSchedulerSku System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DurableTaskSchedulerSkuUpdate : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DurableTaskSchedulerSkuUpdate() { } + public int? Capacity { get { throw null; } set { } } + public string Name { get { throw null; } set { } } + public Azure.ResourceManager.DurableTask.Models.DurableTaskResourceRedundancyState? RedundancyState { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DurableTask.Models.DurableTaskSchedulerSkuUpdate System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.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.DurableTaskSchedulerSkuUpdate System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.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..6c05fbbbd866 --- /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.DurableTaskHubResource GetDurableTaskHubResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.DurableTask.DurableTaskRetentionPolicyResource GetDurableTaskRetentionPolicyResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.Response GetDurableTaskScheduler(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string schedulerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static System.Threading.Tasks.Task> GetDurableTaskSchedulerAsync(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string schedulerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.ResourceManager.DurableTask.DurableTaskSchedulerResource GetDurableTaskSchedulerResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.DurableTask.DurableTaskSchedulerCollection GetDurableTaskSchedulers(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource) { throw null; } + public static Azure.Pageable GetDurableTaskSchedulers(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.AsyncPageable GetDurableTaskSchedulersAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class DurableTaskHubCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected DurableTaskHubCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string taskHubName, Azure.ResourceManager.DurableTask.DurableTaskHubData 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.DurableTaskHubData 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 DurableTaskHubData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DurableTaskHubData() { } + public Azure.ResourceManager.DurableTask.Models.DurableTaskHubProperties Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DurableTask.DurableTaskHubData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.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.DurableTaskHubData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DurableTaskHubResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected DurableTaskHubResource() { } + public virtual Azure.ResourceManager.DurableTask.DurableTaskHubData 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.DurableTaskHubData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.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.DurableTaskHubData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.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.DurableTaskHubData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.DurableTask.DurableTaskHubData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class DurableTaskRetentionPolicyData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DurableTaskRetentionPolicyData() { } + public Azure.ResourceManager.DurableTask.Models.DurableTaskRetentionPolicyProperties Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DurableTask.DurableTaskRetentionPolicyData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.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.DurableTaskRetentionPolicyData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DurableTaskRetentionPolicyResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected DurableTaskRetentionPolicyResource() { } + public virtual Azure.ResourceManager.DurableTask.DurableTaskRetentionPolicyData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, Azure.ResourceManager.DurableTask.DurableTaskRetentionPolicyData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.DurableTask.DurableTaskRetentionPolicyData 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.DurableTaskRetentionPolicyData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.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.DurableTaskRetentionPolicyData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.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.DurableTaskRetentionPolicyData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.DurableTask.DurableTaskRetentionPolicyData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class DurableTaskSchedulerCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected DurableTaskSchedulerCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string schedulerName, Azure.ResourceManager.DurableTask.DurableTaskSchedulerData 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.DurableTaskSchedulerData 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 DurableTaskSchedulerData : Azure.ResourceManager.Models.TrackedResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DurableTaskSchedulerData(Azure.Core.AzureLocation location) { } + public Azure.ResourceManager.DurableTask.Models.DurableTaskSchedulerProperties Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DurableTask.DurableTaskSchedulerData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.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.DurableTaskSchedulerData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DurableTaskSchedulerResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected DurableTaskSchedulerResource() { } + public virtual Azure.ResourceManager.DurableTask.DurableTaskSchedulerData 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.Response GetDurableTaskHub(string taskHubName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetDurableTaskHubAsync(string taskHubName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.DurableTask.DurableTaskHubCollection GetDurableTaskHubs() { throw null; } + public virtual Azure.ResourceManager.DurableTask.DurableTaskRetentionPolicyResource GetDurableTaskRetentionPolicy() { 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.DurableTaskSchedulerData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.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.DurableTaskSchedulerData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.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.DurableTaskSchedulerPatch 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.DurableTaskSchedulerPatch patch, 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.DurableTaskHubResource GetDurableTaskHubResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.DurableTask.DurableTaskRetentionPolicyResource GetDurableTaskRetentionPolicyResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.DurableTask.DurableTaskSchedulerResource GetDurableTaskSchedulerResource(Azure.Core.ResourceIdentifier id) { throw null; } + } + public partial class MockableDurableTaskResourceGroupResource : Azure.ResourceManager.ArmResource + { + protected MockableDurableTaskResourceGroupResource() { } + public virtual Azure.Response GetDurableTaskScheduler(string schedulerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetDurableTaskSchedulerAsync(string schedulerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.DurableTask.DurableTaskSchedulerCollection GetDurableTaskSchedulers() { throw null; } + } + public partial class MockableDurableTaskSubscriptionResource : Azure.ResourceManager.ArmResource + { + protected MockableDurableTaskSubscriptionResource() { } + public virtual Azure.Pageable GetDurableTaskSchedulers(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetDurableTaskSchedulersAsync(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.DurableTaskHubData DurableTaskHubData(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.DurableTaskHubProperties properties = null) { throw null; } + public static Azure.ResourceManager.DurableTask.Models.DurableTaskHubProperties DurableTaskHubProperties(Azure.ResourceManager.DurableTask.Models.DurableTaskProvisioningState? provisioningState = default(Azure.ResourceManager.DurableTask.Models.DurableTaskProvisioningState?), System.Uri dashboardUri = null) { throw null; } + public static Azure.ResourceManager.DurableTask.DurableTaskRetentionPolicyData DurableTaskRetentionPolicyData(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.DurableTaskRetentionPolicyProperties properties = null) { throw null; } + public static Azure.ResourceManager.DurableTask.Models.DurableTaskRetentionPolicyProperties DurableTaskRetentionPolicyProperties(Azure.ResourceManager.DurableTask.Models.DurableTaskProvisioningState? provisioningState = default(Azure.ResourceManager.DurableTask.Models.DurableTaskProvisioningState?), System.Collections.Generic.IEnumerable retentionPolicies = null) { throw null; } + public static Azure.ResourceManager.DurableTask.DurableTaskSchedulerData DurableTaskSchedulerData(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.DurableTaskSchedulerProperties properties = null) { throw null; } + public static Azure.ResourceManager.DurableTask.Models.DurableTaskSchedulerPatchProperties DurableTaskSchedulerPatchProperties(Azure.ResourceManager.DurableTask.Models.DurableTaskProvisioningState? provisioningState = default(Azure.ResourceManager.DurableTask.Models.DurableTaskProvisioningState?), string endpoint = null, System.Collections.Generic.IEnumerable ipAllowlist = null, Azure.ResourceManager.DurableTask.Models.DurableTaskSchedulerSkuUpdate sku = null) { throw null; } + public static Azure.ResourceManager.DurableTask.Models.DurableTaskSchedulerProperties DurableTaskSchedulerProperties(Azure.ResourceManager.DurableTask.Models.DurableTaskProvisioningState? provisioningState = default(Azure.ResourceManager.DurableTask.Models.DurableTaskProvisioningState?), string endpoint = null, System.Collections.Generic.IEnumerable ipAllowlist = null, Azure.ResourceManager.DurableTask.Models.DurableTaskSchedulerSku sku = null) { throw null; } + public static Azure.ResourceManager.DurableTask.Models.DurableTaskSchedulerSku DurableTaskSchedulerSku(string name = null, int? capacity = default(int?), Azure.ResourceManager.DurableTask.Models.DurableTaskResourceRedundancyState? redundancyState = default(Azure.ResourceManager.DurableTask.Models.DurableTaskResourceRedundancyState?)) { throw null; } + public static Azure.ResourceManager.DurableTask.Models.DurableTaskSchedulerSkuUpdate DurableTaskSchedulerSkuUpdate(string name = null, int? capacity = default(int?), Azure.ResourceManager.DurableTask.Models.DurableTaskResourceRedundancyState? redundancyState = default(Azure.ResourceManager.DurableTask.Models.DurableTaskResourceRedundancyState?)) { throw null; } + } + public partial class DurableTaskHubProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DurableTaskHubProperties() { } + public System.Uri DashboardUri { get { throw null; } } + public Azure.ResourceManager.DurableTask.Models.DurableTaskProvisioningState? ProvisioningState { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DurableTask.Models.DurableTaskHubProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.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.DurableTaskHubProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.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 DurableTaskProvisioningState : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public DurableTaskProvisioningState(string value) { throw null; } + public static Azure.ResourceManager.DurableTask.Models.DurableTaskProvisioningState Accepted { get { throw null; } } + public static Azure.ResourceManager.DurableTask.Models.DurableTaskProvisioningState Canceled { get { throw null; } } + public static Azure.ResourceManager.DurableTask.Models.DurableTaskProvisioningState Deleting { get { throw null; } } + public static Azure.ResourceManager.DurableTask.Models.DurableTaskProvisioningState Failed { get { throw null; } } + public static Azure.ResourceManager.DurableTask.Models.DurableTaskProvisioningState Provisioning { get { throw null; } } + public static Azure.ResourceManager.DurableTask.Models.DurableTaskProvisioningState Succeeded { get { throw null; } } + public static Azure.ResourceManager.DurableTask.Models.DurableTaskProvisioningState Updating { get { throw null; } } + public bool Equals(Azure.ResourceManager.DurableTask.Models.DurableTaskProvisioningState 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.DurableTaskProvisioningState left, Azure.ResourceManager.DurableTask.Models.DurableTaskProvisioningState right) { throw null; } + public static implicit operator Azure.ResourceManager.DurableTask.Models.DurableTaskProvisioningState (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.DurableTask.Models.DurableTaskProvisioningState left, Azure.ResourceManager.DurableTask.Models.DurableTaskProvisioningState right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct DurableTaskPurgeableOrchestrationState : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public DurableTaskPurgeableOrchestrationState(string value) { throw null; } + public static Azure.ResourceManager.DurableTask.Models.DurableTaskPurgeableOrchestrationState Canceled { get { throw null; } } + public static Azure.ResourceManager.DurableTask.Models.DurableTaskPurgeableOrchestrationState Completed { get { throw null; } } + public static Azure.ResourceManager.DurableTask.Models.DurableTaskPurgeableOrchestrationState Failed { get { throw null; } } + public static Azure.ResourceManager.DurableTask.Models.DurableTaskPurgeableOrchestrationState Terminated { get { throw null; } } + public bool Equals(Azure.ResourceManager.DurableTask.Models.DurableTaskPurgeableOrchestrationState 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.DurableTaskPurgeableOrchestrationState left, Azure.ResourceManager.DurableTask.Models.DurableTaskPurgeableOrchestrationState right) { throw null; } + public static implicit operator Azure.ResourceManager.DurableTask.Models.DurableTaskPurgeableOrchestrationState (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.DurableTask.Models.DurableTaskPurgeableOrchestrationState left, Azure.ResourceManager.DurableTask.Models.DurableTaskPurgeableOrchestrationState right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct DurableTaskResourceRedundancyState : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public DurableTaskResourceRedundancyState(string value) { throw null; } + public static Azure.ResourceManager.DurableTask.Models.DurableTaskResourceRedundancyState None { get { throw null; } } + public static Azure.ResourceManager.DurableTask.Models.DurableTaskResourceRedundancyState Zone { get { throw null; } } + public bool Equals(Azure.ResourceManager.DurableTask.Models.DurableTaskResourceRedundancyState 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.DurableTaskResourceRedundancyState left, Azure.ResourceManager.DurableTask.Models.DurableTaskResourceRedundancyState right) { throw null; } + public static implicit operator Azure.ResourceManager.DurableTask.Models.DurableTaskResourceRedundancyState (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.DurableTask.Models.DurableTaskResourceRedundancyState left, Azure.ResourceManager.DurableTask.Models.DurableTaskResourceRedundancyState right) { throw null; } + public override string ToString() { throw null; } + } + public partial class DurableTaskRetentionPolicyDetails : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DurableTaskRetentionPolicyDetails(int retentionPeriodInDays) { } + public Azure.ResourceManager.DurableTask.Models.DurableTaskPurgeableOrchestrationState? 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.DurableTaskRetentionPolicyDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.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.DurableTaskRetentionPolicyDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DurableTaskRetentionPolicyProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DurableTaskRetentionPolicyProperties() { } + public Azure.ResourceManager.DurableTask.Models.DurableTaskProvisioningState? 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.DurableTaskRetentionPolicyProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.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.DurableTaskRetentionPolicyProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DurableTaskSchedulerPatch : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DurableTaskSchedulerPatch() { } + public Azure.ResourceManager.DurableTask.Models.DurableTaskSchedulerPatchProperties 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.DurableTaskSchedulerPatch System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.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.DurableTaskSchedulerPatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DurableTaskSchedulerPatchProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DurableTaskSchedulerPatchProperties() { } + public string Endpoint { get { throw null; } } + public System.Collections.Generic.IList IPAllowlist { get { throw null; } } + public Azure.ResourceManager.DurableTask.Models.DurableTaskProvisioningState? ProvisioningState { get { throw null; } } + public Azure.ResourceManager.DurableTask.Models.DurableTaskSchedulerSkuUpdate Sku { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DurableTask.Models.DurableTaskSchedulerPatchProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.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.DurableTaskSchedulerPatchProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DurableTaskSchedulerProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DurableTaskSchedulerProperties(System.Collections.Generic.IEnumerable ipAllowlist, Azure.ResourceManager.DurableTask.Models.DurableTaskSchedulerSku sku) { } + public string Endpoint { get { throw null; } } + public System.Collections.Generic.IList IPAllowlist { get { throw null; } } + public Azure.ResourceManager.DurableTask.Models.DurableTaskProvisioningState? ProvisioningState { get { throw null; } } + public Azure.ResourceManager.DurableTask.Models.DurableTaskSchedulerSku Sku { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DurableTask.Models.DurableTaskSchedulerProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.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.DurableTaskSchedulerProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DurableTaskSchedulerSku : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DurableTaskSchedulerSku(string name) { } + public int? Capacity { get { throw null; } set { } } + public string Name { get { throw null; } set { } } + public Azure.ResourceManager.DurableTask.Models.DurableTaskResourceRedundancyState? RedundancyState { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DurableTask.Models.DurableTaskSchedulerSku System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.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.DurableTaskSchedulerSku System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DurableTaskSchedulerSkuUpdate : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DurableTaskSchedulerSkuUpdate() { } + public int? Capacity { get { throw null; } set { } } + public string Name { get { throw null; } set { } } + public Azure.ResourceManager.DurableTask.Models.DurableTaskResourceRedundancyState? RedundancyState { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DurableTask.Models.DurableTaskSchedulerSkuUpdate System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.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.DurableTaskSchedulerSkuUpdate System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.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_DurableTaskHubCollection.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/samples/Generated/Samples/Sample_DurableTaskHubCollection.cs new file mode 100644 index 000000000000..8acb8e2e3f8e --- /dev/null +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/samples/Generated/Samples/Sample_DurableTaskHubCollection.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_DurableTaskHubCollection + { + [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 DurableTaskSchedulerResource created on azure + // for more information of creating DurableTaskSchedulerResource, please refer to the document of DurableTaskSchedulerResource + string subscriptionId = "EE9BD735-67CE-4A90-89C4-439D3F6A4C93"; + string resourceGroupName = "rgopenapi"; + string schedulerName = "testscheduler"; + ResourceIdentifier durableTaskSchedulerResourceId = DurableTaskSchedulerResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, schedulerName); + DurableTaskSchedulerResource durableTaskScheduler = client.GetDurableTaskSchedulerResource(durableTaskSchedulerResourceId); + + // get the collection of this DurableTaskHubResource + DurableTaskHubCollection collection = durableTaskScheduler.GetDurableTaskHubs(); + + // invoke the operation + string taskHubName = "testtaskhub"; + DurableTaskHubData data = new DurableTaskHubData + { + Properties = new DurableTaskHubProperties(), + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, taskHubName, data); + DurableTaskHubResource 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 + DurableTaskHubData resourceData = result.Data; + // for 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 DurableTaskSchedulerResource created on azure + // for more information of creating DurableTaskSchedulerResource, please refer to the document of DurableTaskSchedulerResource + string subscriptionId = "EE9BD735-67CE-4A90-89C4-439D3F6A4C93"; + string resourceGroupName = "rgopenapi"; + string schedulerName = "testscheduler"; + ResourceIdentifier durableTaskSchedulerResourceId = DurableTaskSchedulerResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, schedulerName); + DurableTaskSchedulerResource durableTaskScheduler = client.GetDurableTaskSchedulerResource(durableTaskSchedulerResourceId); + + // get the collection of this DurableTaskHubResource + DurableTaskHubCollection collection = durableTaskScheduler.GetDurableTaskHubs(); + + // invoke the operation + string taskHubName = "testtaskhub"; + DurableTaskHubResource 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 + DurableTaskHubData resourceData = result.Data; + // for 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 DurableTaskSchedulerResource created on azure + // for more information of creating DurableTaskSchedulerResource, please refer to the document of DurableTaskSchedulerResource + string subscriptionId = "EE9BD735-67CE-4A90-89C4-439D3F6A4C93"; + string resourceGroupName = "rgopenapi"; + string schedulerName = "testscheduler"; + ResourceIdentifier durableTaskSchedulerResourceId = DurableTaskSchedulerResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, schedulerName); + DurableTaskSchedulerResource durableTaskScheduler = client.GetDurableTaskSchedulerResource(durableTaskSchedulerResourceId); + + // get the collection of this DurableTaskHubResource + DurableTaskHubCollection collection = durableTaskScheduler.GetDurableTaskHubs(); + + // invoke the operation and iterate over the result + await foreach (DurableTaskHubResource 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 + DurableTaskHubData 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 DurableTaskSchedulerResource created on azure + // for more information of creating DurableTaskSchedulerResource, please refer to the document of DurableTaskSchedulerResource + string subscriptionId = "EE9BD735-67CE-4A90-89C4-439D3F6A4C93"; + string resourceGroupName = "rgopenapi"; + string schedulerName = "testscheduler"; + ResourceIdentifier durableTaskSchedulerResourceId = DurableTaskSchedulerResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, schedulerName); + DurableTaskSchedulerResource durableTaskScheduler = client.GetDurableTaskSchedulerResource(durableTaskSchedulerResourceId); + + // get the collection of this DurableTaskHubResource + DurableTaskHubCollection collection = durableTaskScheduler.GetDurableTaskHubs(); + + // 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 DurableTaskSchedulerResource created on azure + // for more information of creating DurableTaskSchedulerResource, please refer to the document of DurableTaskSchedulerResource + string subscriptionId = "EE9BD735-67CE-4A90-89C4-439D3F6A4C93"; + string resourceGroupName = "rgopenapi"; + string schedulerName = "testscheduler"; + ResourceIdentifier durableTaskSchedulerResourceId = DurableTaskSchedulerResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, schedulerName); + DurableTaskSchedulerResource durableTaskScheduler = client.GetDurableTaskSchedulerResource(durableTaskSchedulerResourceId); + + // get the collection of this DurableTaskHubResource + DurableTaskHubCollection collection = durableTaskScheduler.GetDurableTaskHubs(); + + // invoke the operation + string taskHubName = "testtaskhub"; + NullableResponse response = await collection.GetIfExistsAsync(taskHubName); + DurableTaskHubResource 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 + DurableTaskHubData 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_DurableTaskHubResource.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/samples/Generated/Samples/Sample_DurableTaskHubResource.cs new file mode 100644 index 000000000000..90bd28915fce --- /dev/null +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/samples/Generated/Samples/Sample_DurableTaskHubResource.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_DurableTaskHubResource + { + [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 DurableTaskHubResource created on azure + // for more information of creating DurableTaskHubResource, please refer to the document of DurableTaskHubResource + string subscriptionId = "EE9BD735-67CE-4A90-89C4-439D3F6A4C93"; + string resourceGroupName = "rgopenapi"; + string schedulerName = "testscheduler"; + string taskHubName = "testtaskhub"; + ResourceIdentifier durableTaskHubResourceId = DurableTaskHubResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, schedulerName, taskHubName); + DurableTaskHubResource durableTaskHub = client.GetDurableTaskHubResource(durableTaskHubResourceId); + + // invoke the operation + DurableTaskHubResource result = await durableTaskHub.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 + DurableTaskHubData resourceData = result.Data; + // for 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 DurableTaskHubResource created on azure + // for more information of creating DurableTaskHubResource, please refer to the document of DurableTaskHubResource + string subscriptionId = "EE9BD735-67CE-4A90-89C4-439D3F6A4C93"; + string resourceGroupName = "rgopenapi"; + string schedulerName = "testscheduler"; + string taskHubName = "testtaskhub"; + ResourceIdentifier durableTaskHubResourceId = DurableTaskHubResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, schedulerName, taskHubName); + DurableTaskHubResource durableTaskHub = client.GetDurableTaskHubResource(durableTaskHubResourceId); + + // invoke the operation + await durableTaskHub.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 DurableTaskHubResource created on azure + // for more information of creating DurableTaskHubResource, please refer to the document of DurableTaskHubResource + string subscriptionId = "EE9BD735-67CE-4A90-89C4-439D3F6A4C93"; + string resourceGroupName = "rgopenapi"; + string schedulerName = "testscheduler"; + string taskHubName = "testtaskhub"; + ResourceIdentifier durableTaskHubResourceId = DurableTaskHubResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, schedulerName, taskHubName); + DurableTaskHubResource durableTaskHub = client.GetDurableTaskHubResource(durableTaskHubResourceId); + + // invoke the operation + DurableTaskHubData data = new DurableTaskHubData + { + Properties = new DurableTaskHubProperties(), + }; + ArmOperation lro = await durableTaskHub.UpdateAsync(WaitUntil.Completed, data); + DurableTaskHubResource 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 + DurableTaskHubData 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_DurableTaskRetentionPolicyResource.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/samples/Generated/Samples/Sample_DurableTaskRetentionPolicyResource.cs new file mode 100644 index 000000000000..cbc18ddc14e4 --- /dev/null +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/samples/Generated/Samples/Sample_DurableTaskRetentionPolicyResource.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_DurableTaskRetentionPolicyResource + { + [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 DurableTaskRetentionPolicyResource created on azure + // for more information of creating DurableTaskRetentionPolicyResource, please refer to the document of DurableTaskRetentionPolicyResource + string subscriptionId = "194D3C1E-462F-4738-9025-092A628C06EB"; + string resourceGroupName = "rgdurabletask"; + string schedulerName = "testscheduler"; + ResourceIdentifier durableTaskRetentionPolicyResourceId = DurableTaskRetentionPolicyResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, schedulerName); + DurableTaskRetentionPolicyResource durableTaskRetentionPolicy = client.GetDurableTaskRetentionPolicyResource(durableTaskRetentionPolicyResourceId); + + // invoke the operation + DurableTaskRetentionPolicyResource result = await durableTaskRetentionPolicy.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 + DurableTaskRetentionPolicyData resourceData = result.Data; + // for 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 DurableTaskRetentionPolicyResource created on azure + // for more information of creating DurableTaskRetentionPolicyResource, please refer to the document of DurableTaskRetentionPolicyResource + string subscriptionId = "194D3C1E-462F-4738-9025-092A628C06EB"; + string resourceGroupName = "rgdurabletask"; + string schedulerName = "testcheduler"; + ResourceIdentifier durableTaskRetentionPolicyResourceId = DurableTaskRetentionPolicyResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, schedulerName); + DurableTaskRetentionPolicyResource durableTaskRetentionPolicy = client.GetDurableTaskRetentionPolicyResource(durableTaskRetentionPolicyResourceId); + + // invoke the operation + await durableTaskRetentionPolicy.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 DurableTaskRetentionPolicyResource created on azure + // for more information of creating DurableTaskRetentionPolicyResource, please refer to the document of DurableTaskRetentionPolicyResource + string subscriptionId = "194D3C1E-462F-4738-9025-092A628C06EB"; + string resourceGroupName = "rgdurabletask"; + string schedulerName = "testscheduler"; + ResourceIdentifier durableTaskRetentionPolicyResourceId = DurableTaskRetentionPolicyResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, schedulerName); + DurableTaskRetentionPolicyResource durableTaskRetentionPolicy = client.GetDurableTaskRetentionPolicyResource(durableTaskRetentionPolicyResourceId); + + // invoke the operation + DurableTaskRetentionPolicyData data = new DurableTaskRetentionPolicyData + { + Properties = new DurableTaskRetentionPolicyProperties + { + RetentionPolicies = {new DurableTaskRetentionPolicyDetails(30), new DurableTaskRetentionPolicyDetails(10) +{ +OrchestrationState = DurableTaskPurgeableOrchestrationState.Failed, +}, new DurableTaskRetentionPolicyDetails(24) +{ +OrchestrationState = DurableTaskPurgeableOrchestrationState.Completed, +}}, + }, + }; + ArmOperation lro = await durableTaskRetentionPolicy.UpdateAsync(WaitUntil.Completed, data); + DurableTaskRetentionPolicyResource 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 + DurableTaskRetentionPolicyData resourceData = result.Data; + // for 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 DurableTaskRetentionPolicyResource created on azure + // for more information of creating DurableTaskRetentionPolicyResource, please refer to the document of DurableTaskRetentionPolicyResource + string subscriptionId = "194D3C1E-462F-4738-9025-092A628C06EB"; + string resourceGroupName = "rgdurabletask"; + string schedulerName = "testscheduler"; + ResourceIdentifier durableTaskRetentionPolicyResourceId = DurableTaskRetentionPolicyResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, schedulerName); + DurableTaskRetentionPolicyResource durableTaskRetentionPolicy = client.GetDurableTaskRetentionPolicyResource(durableTaskRetentionPolicyResourceId); + + // invoke the operation + DurableTaskRetentionPolicyData data = new DurableTaskRetentionPolicyData + { + Properties = new DurableTaskRetentionPolicyProperties + { + RetentionPolicies = {new DurableTaskRetentionPolicyDetails(30), new DurableTaskRetentionPolicyDetails(10) +{ +OrchestrationState = DurableTaskPurgeableOrchestrationState.Failed, +}}, + }, + }; + ArmOperation lro = await durableTaskRetentionPolicy.CreateOrUpdateAsync(WaitUntil.Completed, data); + DurableTaskRetentionPolicyResource 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 + DurableTaskRetentionPolicyData 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_DurableTaskSchedulerCollection.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/samples/Generated/Samples/Sample_DurableTaskSchedulerCollection.cs new file mode 100644 index 000000000000..7260ba4edee9 --- /dev/null +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/samples/Generated/Samples/Sample_DurableTaskSchedulerCollection.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_DurableTaskSchedulerCollection + { + [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 DurableTaskSchedulerResource + DurableTaskSchedulerCollection collection = resourceGroupResource.GetDurableTaskSchedulers(); + + // invoke the operation + string schedulerName = "testscheduler"; + DurableTaskSchedulerData data = new DurableTaskSchedulerData(new AzureLocation("northcentralus")) + { + Properties = new DurableTaskSchedulerProperties(new string[] { "10.0.0.0/8" }, new DurableTaskSchedulerSku("Dedicated")), + Tags = +{ +["department"] = "research", +["development"] = "true" +}, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, schedulerName, data); + DurableTaskSchedulerResource 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 + DurableTaskSchedulerData resourceData = result.Data; + // for 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 DurableTaskSchedulerResource + DurableTaskSchedulerCollection collection = resourceGroupResource.GetDurableTaskSchedulers(); + + // invoke the operation + string schedulerName = "testscheduler"; + DurableTaskSchedulerResource 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 + DurableTaskSchedulerData resourceData = result.Data; + // for 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 DurableTaskSchedulerResource + DurableTaskSchedulerCollection collection = resourceGroupResource.GetDurableTaskSchedulers(); + + // invoke the operation and iterate over the result + await foreach (DurableTaskSchedulerResource 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 + DurableTaskSchedulerData 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 DurableTaskSchedulerResource + DurableTaskSchedulerCollection collection = resourceGroupResource.GetDurableTaskSchedulers(); + + // 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 DurableTaskSchedulerResource + DurableTaskSchedulerCollection collection = resourceGroupResource.GetDurableTaskSchedulers(); + + // invoke the operation + string schedulerName = "testscheduler"; + NullableResponse response = await collection.GetIfExistsAsync(schedulerName); + DurableTaskSchedulerResource 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 + DurableTaskSchedulerData 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_DurableTaskSchedulerResource.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/samples/Generated/Samples/Sample_DurableTaskSchedulerResource.cs new file mode 100644 index 000000000000..ae30e764fbe3 --- /dev/null +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/samples/Generated/Samples/Sample_DurableTaskSchedulerResource.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_DurableTaskSchedulerResource + { + [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 DurableTaskSchedulerResource created on azure + // for more information of creating DurableTaskSchedulerResource, please refer to the document of DurableTaskSchedulerResource + string subscriptionId = "EE9BD735-67CE-4A90-89C4-439D3F6A4C93"; + string resourceGroupName = "rgopenapi"; + string schedulerName = "testscheduler"; + ResourceIdentifier durableTaskSchedulerResourceId = DurableTaskSchedulerResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, schedulerName); + DurableTaskSchedulerResource durableTaskScheduler = client.GetDurableTaskSchedulerResource(durableTaskSchedulerResourceId); + + // invoke the operation + DurableTaskSchedulerResource result = await durableTaskScheduler.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 + DurableTaskSchedulerData resourceData = result.Data; + // for 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 DurableTaskSchedulerResource created on azure + // for more information of creating DurableTaskSchedulerResource, please refer to the document of DurableTaskSchedulerResource + string subscriptionId = "EE9BD735-67CE-4A90-89C4-439D3F6A4C93"; + string resourceGroupName = "rgopenapi"; + string schedulerName = "testscheduler"; + ResourceIdentifier durableTaskSchedulerResourceId = DurableTaskSchedulerResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, schedulerName); + DurableTaskSchedulerResource durableTaskScheduler = client.GetDurableTaskSchedulerResource(durableTaskSchedulerResourceId); + + // invoke the operation + await durableTaskScheduler.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 DurableTaskSchedulerResource created on azure + // for more information of creating DurableTaskSchedulerResource, please refer to the document of DurableTaskSchedulerResource + string subscriptionId = "EE9BD735-67CE-4A90-89C4-439D3F6A4C93"; + string resourceGroupName = "rgopenapi"; + string schedulerName = "testscheduler"; + ResourceIdentifier durableTaskSchedulerResourceId = DurableTaskSchedulerResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, schedulerName); + DurableTaskSchedulerResource durableTaskScheduler = client.GetDurableTaskSchedulerResource(durableTaskSchedulerResourceId); + + // invoke the operation + DurableTaskSchedulerPatch patch = new DurableTaskSchedulerPatch + { + Properties = new DurableTaskSchedulerPatchProperties + { + IPAllowlist = { "10.0.0.0/8" }, + Sku = new DurableTaskSchedulerSkuUpdate + { + Name = "Dedicated", + Capacity = 3, + }, + }, + Tags = +{ +["hello"] = "world" +}, + }; + ArmOperation lro = await durableTaskScheduler.UpdateAsync(WaitUntil.Completed, patch); + DurableTaskSchedulerResource 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 + DurableTaskSchedulerData 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..a104d4e7605c --- /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 GetDurableTaskSchedulers_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 (DurableTaskSchedulerResource item in subscriptionResource.GetDurableTaskSchedulersAsync()) + { + // 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 + DurableTaskSchedulerData 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/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..d0a12bc86209 --- /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 DurableTaskSchedulerData DurableTaskSchedulerData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, DurableTaskSchedulerProperties properties = null) + { + tags ??= new Dictionary(); + + return new DurableTaskSchedulerData( + 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 DurableTaskSchedulerProperties DurableTaskSchedulerProperties(DurableTaskProvisioningState? provisioningState = null, string endpoint = null, IEnumerable ipAllowlist = null, DurableTaskSchedulerSku sku = null) + { + ipAllowlist ??= new List(); + + return new DurableTaskSchedulerProperties(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 DurableTaskSchedulerSku DurableTaskSchedulerSku(string name = null, int? capacity = null, DurableTaskResourceRedundancyState? redundancyState = null) + { + return new DurableTaskSchedulerSku(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 DurableTaskSchedulerPatchProperties DurableTaskSchedulerPatchProperties(DurableTaskProvisioningState? provisioningState = null, string endpoint = null, IEnumerable ipAllowlist = null, DurableTaskSchedulerSkuUpdate sku = null) + { + ipAllowlist ??= new List(); + + return new DurableTaskSchedulerPatchProperties(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 DurableTaskSchedulerSkuUpdate DurableTaskSchedulerSkuUpdate(string name = null, int? capacity = null, DurableTaskResourceRedundancyState? redundancyState = null) + { + return new DurableTaskSchedulerSkuUpdate(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 DurableTaskHubData DurableTaskHubData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, DurableTaskHubProperties properties = null) + { + return new DurableTaskHubData( + 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 DurableTaskHubProperties DurableTaskHubProperties(DurableTaskProvisioningState? provisioningState = null, Uri dashboardUri = null) + { + return new DurableTaskHubProperties(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 DurableTaskRetentionPolicyData DurableTaskRetentionPolicyData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, DurableTaskRetentionPolicyProperties properties = null) + { + return new DurableTaskRetentionPolicyData( + 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 DurableTaskRetentionPolicyProperties DurableTaskRetentionPolicyProperties(DurableTaskProvisioningState? provisioningState = null, IEnumerable retentionPolicies = null) + { + retentionPolicies ??= new List(); + + return new DurableTaskRetentionPolicyProperties(provisioningState, retentionPolicies?.ToList(), serializedAdditionalRawData: null); + } + } +} diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/DurableTaskHubCollection.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/DurableTaskHubCollection.cs new file mode 100644 index 000000000000..2244a08bb3eb --- /dev/null +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/DurableTaskHubCollection.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 GetDurableTaskHubs method from an instance of . + /// + public partial class DurableTaskHubCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _durableTaskHubTaskHubsClientDiagnostics; + private readonly TaskHubsRestOperations _durableTaskHubTaskHubsRestClient; + + /// Initializes a new instance of the class for mocking. + protected DurableTaskHubCollection() + { + } + + /// 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 DurableTaskHubCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _durableTaskHubTaskHubsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.DurableTask", DurableTaskHubResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(DurableTaskHubResource.ResourceType, out string durableTaskHubTaskHubsApiVersion); + _durableTaskHubTaskHubsRestClient = new TaskHubsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, durableTaskHubTaskHubsApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != DurableTaskSchedulerResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, DurableTaskSchedulerResource.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, DurableTaskHubData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(taskHubName, nameof(taskHubName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _durableTaskHubTaskHubsClientDiagnostics.CreateScope("DurableTaskHubCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _durableTaskHubTaskHubsRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, taskHubName, data, cancellationToken).ConfigureAwait(false); + var operation = new DurableTaskArmOperation(new DurableTaskHubOperationSource(Client), _durableTaskHubTaskHubsClientDiagnostics, Pipeline, _durableTaskHubTaskHubsRestClient.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, DurableTaskHubData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(taskHubName, nameof(taskHubName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _durableTaskHubTaskHubsClientDiagnostics.CreateScope("DurableTaskHubCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _durableTaskHubTaskHubsRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, taskHubName, data, cancellationToken); + var operation = new DurableTaskArmOperation(new DurableTaskHubOperationSource(Client), _durableTaskHubTaskHubsClientDiagnostics, Pipeline, _durableTaskHubTaskHubsRestClient.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 = _durableTaskHubTaskHubsClientDiagnostics.CreateScope("DurableTaskHubCollection.Get"); + scope.Start(); + try + { + var response = await _durableTaskHubTaskHubsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, taskHubName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new DurableTaskHubResource(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 = _durableTaskHubTaskHubsClientDiagnostics.CreateScope("DurableTaskHubCollection.Get"); + scope.Start(); + try + { + var response = _durableTaskHubTaskHubsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, taskHubName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new DurableTaskHubResource(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) => _durableTaskHubTaskHubsRestClient.CreateListBySchedulerRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _durableTaskHubTaskHubsRestClient.CreateListBySchedulerNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new DurableTaskHubResource(Client, DurableTaskHubData.DeserializeDurableTaskHubData(e)), _durableTaskHubTaskHubsClientDiagnostics, Pipeline, "DurableTaskHubCollection.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) => _durableTaskHubTaskHubsRestClient.CreateListBySchedulerRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _durableTaskHubTaskHubsRestClient.CreateListBySchedulerNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new DurableTaskHubResource(Client, DurableTaskHubData.DeserializeDurableTaskHubData(e)), _durableTaskHubTaskHubsClientDiagnostics, Pipeline, "DurableTaskHubCollection.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 = _durableTaskHubTaskHubsClientDiagnostics.CreateScope("DurableTaskHubCollection.Exists"); + scope.Start(); + try + { + var response = await _durableTaskHubTaskHubsRestClient.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 = _durableTaskHubTaskHubsClientDiagnostics.CreateScope("DurableTaskHubCollection.Exists"); + scope.Start(); + try + { + var response = _durableTaskHubTaskHubsRestClient.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 = _durableTaskHubTaskHubsClientDiagnostics.CreateScope("DurableTaskHubCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _durableTaskHubTaskHubsRestClient.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 DurableTaskHubResource(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 = _durableTaskHubTaskHubsClientDiagnostics.CreateScope("DurableTaskHubCollection.GetIfExists"); + scope.Start(); + try + { + var response = _durableTaskHubTaskHubsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, taskHubName, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new DurableTaskHubResource(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/DurableTaskHubData.Serialization.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/DurableTaskHubData.Serialization.cs new file mode 100644 index 000000000000..4b0728cedf58 --- /dev/null +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/DurableTaskHubData.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 DurableTaskHubData : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.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(DurableTaskHubData)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties, options); + } + } + + DurableTaskHubData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DurableTaskHubData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDurableTaskHubData(document.RootElement, options); + } + + internal static DurableTaskHubData DeserializeDurableTaskHubData(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + DurableTaskHubProperties 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 = DurableTaskHubProperties.DeserializeDurableTaskHubProperties(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 DurableTaskHubData( + 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(DurableTaskHubData)} does not support writing '{options.Format}' format."); + } + } + + DurableTaskHubData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeDurableTaskHubData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DurableTaskHubData)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/DurableTaskHubData.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/DurableTaskHubData.cs new file mode 100644 index 000000000000..44f93fcb07a1 --- /dev/null +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/DurableTaskHubData.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 DurableTaskHub data model. + /// A Task Hub resource belonging to the scheduler + /// + public partial class DurableTaskHubData : 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 DurableTaskHubData() + { + } + + /// 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 DurableTaskHubData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, DurableTaskHubProperties properties, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + { + Properties = properties; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The resource-specific properties for this resource. + public DurableTaskHubProperties Properties { get; set; } + } +} diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/DurableTaskHubResource.Serialization.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/DurableTaskHubResource.Serialization.cs new file mode 100644 index 000000000000..a63564fbb0a3 --- /dev/null +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/DurableTaskHubResource.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 DurableTaskHubResource : IJsonModel + { + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + DurableTaskHubData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options); + + DurableTaskHubData 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/DurableTaskHubResource.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/DurableTaskHubResource.cs new file mode 100644 index 000000000000..e1d186d5fa23 --- /dev/null +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/DurableTaskHubResource.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 DurableTaskHub 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 GetDurableTaskHubResource method. + /// Otherwise you can get one from its parent resource using the GetDurableTaskHub method. + /// + public partial class DurableTaskHubResource : 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 _durableTaskHubTaskHubsClientDiagnostics; + private readonly TaskHubsRestOperations _durableTaskHubTaskHubsRestClient; + private readonly DurableTaskHubData _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 DurableTaskHubResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal DurableTaskHubResource(ArmClient client, DurableTaskHubData 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 DurableTaskHubResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _durableTaskHubTaskHubsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.DurableTask", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string durableTaskHubTaskHubsApiVersion); + _durableTaskHubTaskHubsRestClient = new TaskHubsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, durableTaskHubTaskHubsApiVersion); +#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 DurableTaskHubData 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 = _durableTaskHubTaskHubsClientDiagnostics.CreateScope("DurableTaskHubResource.Get"); + scope.Start(); + try + { + var response = await _durableTaskHubTaskHubsRestClient.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 DurableTaskHubResource(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 = _durableTaskHubTaskHubsClientDiagnostics.CreateScope("DurableTaskHubResource.Get"); + scope.Start(); + try + { + var response = _durableTaskHubTaskHubsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new DurableTaskHubResource(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 = _durableTaskHubTaskHubsClientDiagnostics.CreateScope("DurableTaskHubResource.Delete"); + scope.Start(); + try + { + var response = await _durableTaskHubTaskHubsRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new DurableTaskArmOperation(_durableTaskHubTaskHubsClientDiagnostics, Pipeline, _durableTaskHubTaskHubsRestClient.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 = _durableTaskHubTaskHubsClientDiagnostics.CreateScope("DurableTaskHubResource.Delete"); + scope.Start(); + try + { + var response = _durableTaskHubTaskHubsRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + var operation = new DurableTaskArmOperation(_durableTaskHubTaskHubsClientDiagnostics, Pipeline, _durableTaskHubTaskHubsRestClient.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, DurableTaskHubData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _durableTaskHubTaskHubsClientDiagnostics.CreateScope("DurableTaskHubResource.Update"); + scope.Start(); + try + { + var response = await _durableTaskHubTaskHubsRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken).ConfigureAwait(false); + var operation = new DurableTaskArmOperation(new DurableTaskHubOperationSource(Client), _durableTaskHubTaskHubsClientDiagnostics, Pipeline, _durableTaskHubTaskHubsRestClient.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, DurableTaskHubData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _durableTaskHubTaskHubsClientDiagnostics.CreateScope("DurableTaskHubResource.Update"); + scope.Start(); + try + { + var response = _durableTaskHubTaskHubsRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken); + var operation = new DurableTaskArmOperation(new DurableTaskHubOperationSource(Client), _durableTaskHubTaskHubsClientDiagnostics, Pipeline, _durableTaskHubTaskHubsRestClient.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/Generated/DurableTaskRetentionPolicyData.Serialization.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/DurableTaskRetentionPolicyData.Serialization.cs new file mode 100644 index 000000000000..828a6ccdc17c --- /dev/null +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/DurableTaskRetentionPolicyData.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 DurableTaskRetentionPolicyData : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.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(DurableTaskRetentionPolicyData)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties, options); + } + } + + DurableTaskRetentionPolicyData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DurableTaskRetentionPolicyData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDurableTaskRetentionPolicyData(document.RootElement, options); + } + + internal static DurableTaskRetentionPolicyData DeserializeDurableTaskRetentionPolicyData(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + DurableTaskRetentionPolicyProperties 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 = DurableTaskRetentionPolicyProperties.DeserializeDurableTaskRetentionPolicyProperties(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 DurableTaskRetentionPolicyData( + 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(DurableTaskRetentionPolicyData)} does not support writing '{options.Format}' format."); + } + } + + DurableTaskRetentionPolicyData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeDurableTaskRetentionPolicyData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DurableTaskRetentionPolicyData)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/DurableTaskRetentionPolicyData.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/DurableTaskRetentionPolicyData.cs new file mode 100644 index 000000000000..6b0d9e518b1e --- /dev/null +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/DurableTaskRetentionPolicyData.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 DurableTaskRetentionPolicy data model. + /// A retention policy resource belonging to the scheduler + /// + public partial class DurableTaskRetentionPolicyData : 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 DurableTaskRetentionPolicyData() + { + } + + /// 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 DurableTaskRetentionPolicyData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, DurableTaskRetentionPolicyProperties properties, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + { + Properties = properties; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The resource-specific properties for this resource. + public DurableTaskRetentionPolicyProperties Properties { get; set; } + } +} diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/DurableTaskRetentionPolicyResource.Serialization.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/DurableTaskRetentionPolicyResource.Serialization.cs new file mode 100644 index 000000000000..7871083038af --- /dev/null +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/DurableTaskRetentionPolicyResource.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 DurableTaskRetentionPolicyResource : IJsonModel + { + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + DurableTaskRetentionPolicyData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options); + + DurableTaskRetentionPolicyData 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/DurableTaskRetentionPolicyResource.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/DurableTaskRetentionPolicyResource.cs new file mode 100644 index 000000000000..a92cdeede84f --- /dev/null +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/DurableTaskRetentionPolicyResource.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 DurableTaskRetentionPolicy 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 GetDurableTaskRetentionPolicyResource method. + /// Otherwise you can get one from its parent resource using the GetDurableTaskRetentionPolicy method. + /// + public partial class DurableTaskRetentionPolicyResource : 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 _durableTaskRetentionPolicyRetentionPoliciesClientDiagnostics; + private readonly RetentionPoliciesRestOperations _durableTaskRetentionPolicyRetentionPoliciesRestClient; + private readonly DurableTaskRetentionPolicyData _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 DurableTaskRetentionPolicyResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal DurableTaskRetentionPolicyResource(ArmClient client, DurableTaskRetentionPolicyData 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 DurableTaskRetentionPolicyResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _durableTaskRetentionPolicyRetentionPoliciesClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.DurableTask", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string durableTaskRetentionPolicyRetentionPoliciesApiVersion); + _durableTaskRetentionPolicyRetentionPoliciesRestClient = new RetentionPoliciesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, durableTaskRetentionPolicyRetentionPoliciesApiVersion); +#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 DurableTaskRetentionPolicyData 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 = _durableTaskRetentionPolicyRetentionPoliciesClientDiagnostics.CreateScope("DurableTaskRetentionPolicyResource.Get"); + scope.Start(); + try + { + var response = await _durableTaskRetentionPolicyRetentionPoliciesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new DurableTaskRetentionPolicyResource(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 = _durableTaskRetentionPolicyRetentionPoliciesClientDiagnostics.CreateScope("DurableTaskRetentionPolicyResource.Get"); + scope.Start(); + try + { + var response = _durableTaskRetentionPolicyRetentionPoliciesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new DurableTaskRetentionPolicyResource(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 = _durableTaskRetentionPolicyRetentionPoliciesClientDiagnostics.CreateScope("DurableTaskRetentionPolicyResource.Delete"); + scope.Start(); + try + { + var response = await _durableTaskRetentionPolicyRetentionPoliciesRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, cancellationToken).ConfigureAwait(false); + var operation = new DurableTaskArmOperation(_durableTaskRetentionPolicyRetentionPoliciesClientDiagnostics, Pipeline, _durableTaskRetentionPolicyRetentionPoliciesRestClient.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 = _durableTaskRetentionPolicyRetentionPoliciesClientDiagnostics.CreateScope("DurableTaskRetentionPolicyResource.Delete"); + scope.Start(); + try + { + var response = _durableTaskRetentionPolicyRetentionPoliciesRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, cancellationToken); + var operation = new DurableTaskArmOperation(_durableTaskRetentionPolicyRetentionPoliciesClientDiagnostics, Pipeline, _durableTaskRetentionPolicyRetentionPoliciesRestClient.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, DurableTaskRetentionPolicyData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _durableTaskRetentionPolicyRetentionPoliciesClientDiagnostics.CreateScope("DurableTaskRetentionPolicyResource.Update"); + scope.Start(); + try + { + var response = await _durableTaskRetentionPolicyRetentionPoliciesRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, data, cancellationToken).ConfigureAwait(false); + var operation = new DurableTaskArmOperation(new DurableTaskRetentionPolicyOperationSource(Client), _durableTaskRetentionPolicyRetentionPoliciesClientDiagnostics, Pipeline, _durableTaskRetentionPolicyRetentionPoliciesRestClient.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, DurableTaskRetentionPolicyData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _durableTaskRetentionPolicyRetentionPoliciesClientDiagnostics.CreateScope("DurableTaskRetentionPolicyResource.Update"); + scope.Start(); + try + { + var response = _durableTaskRetentionPolicyRetentionPoliciesRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, data, cancellationToken); + var operation = new DurableTaskArmOperation(new DurableTaskRetentionPolicyOperationSource(Client), _durableTaskRetentionPolicyRetentionPoliciesClientDiagnostics, Pipeline, _durableTaskRetentionPolicyRetentionPoliciesRestClient.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, DurableTaskRetentionPolicyData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _durableTaskRetentionPolicyRetentionPoliciesClientDiagnostics.CreateScope("DurableTaskRetentionPolicyResource.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _durableTaskRetentionPolicyRetentionPoliciesRestClient.CreateOrReplaceAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, data, cancellationToken).ConfigureAwait(false); + var operation = new DurableTaskArmOperation(new DurableTaskRetentionPolicyOperationSource(Client), _durableTaskRetentionPolicyRetentionPoliciesClientDiagnostics, Pipeline, _durableTaskRetentionPolicyRetentionPoliciesRestClient.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, DurableTaskRetentionPolicyData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _durableTaskRetentionPolicyRetentionPoliciesClientDiagnostics.CreateScope("DurableTaskRetentionPolicyResource.CreateOrUpdate"); + scope.Start(); + try + { + var response = _durableTaskRetentionPolicyRetentionPoliciesRestClient.CreateOrReplace(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, data, cancellationToken); + var operation = new DurableTaskArmOperation(new DurableTaskRetentionPolicyOperationSource(Client), _durableTaskRetentionPolicyRetentionPoliciesClientDiagnostics, Pipeline, _durableTaskRetentionPolicyRetentionPoliciesRestClient.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/DurableTaskSchedulerCollection.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/DurableTaskSchedulerCollection.cs new file mode 100644 index 000000000000..566999c31dc3 --- /dev/null +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/DurableTaskSchedulerCollection.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 GetDurableTaskSchedulers method from an instance of . + /// + public partial class DurableTaskSchedulerCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _durableTaskSchedulerSchedulersClientDiagnostics; + private readonly SchedulersRestOperations _durableTaskSchedulerSchedulersRestClient; + + /// Initializes a new instance of the class for mocking. + protected DurableTaskSchedulerCollection() + { + } + + /// 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 DurableTaskSchedulerCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _durableTaskSchedulerSchedulersClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.DurableTask", DurableTaskSchedulerResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(DurableTaskSchedulerResource.ResourceType, out string durableTaskSchedulerSchedulersApiVersion); + _durableTaskSchedulerSchedulersRestClient = new SchedulersRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, durableTaskSchedulerSchedulersApiVersion); +#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, DurableTaskSchedulerData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(schedulerName, nameof(schedulerName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _durableTaskSchedulerSchedulersClientDiagnostics.CreateScope("DurableTaskSchedulerCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _durableTaskSchedulerSchedulersRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, schedulerName, data, cancellationToken).ConfigureAwait(false); + var operation = new DurableTaskArmOperation(new DurableTaskSchedulerOperationSource(Client), _durableTaskSchedulerSchedulersClientDiagnostics, Pipeline, _durableTaskSchedulerSchedulersRestClient.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, DurableTaskSchedulerData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(schedulerName, nameof(schedulerName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _durableTaskSchedulerSchedulersClientDiagnostics.CreateScope("DurableTaskSchedulerCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _durableTaskSchedulerSchedulersRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, schedulerName, data, cancellationToken); + var operation = new DurableTaskArmOperation(new DurableTaskSchedulerOperationSource(Client), _durableTaskSchedulerSchedulersClientDiagnostics, Pipeline, _durableTaskSchedulerSchedulersRestClient.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 = _durableTaskSchedulerSchedulersClientDiagnostics.CreateScope("DurableTaskSchedulerCollection.Get"); + scope.Start(); + try + { + var response = await _durableTaskSchedulerSchedulersRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, schedulerName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new DurableTaskSchedulerResource(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 = _durableTaskSchedulerSchedulersClientDiagnostics.CreateScope("DurableTaskSchedulerCollection.Get"); + scope.Start(); + try + { + var response = _durableTaskSchedulerSchedulersRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, schedulerName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new DurableTaskSchedulerResource(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) => _durableTaskSchedulerSchedulersRestClient.CreateListByResourceGroupRequest(Id.SubscriptionId, Id.ResourceGroupName); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _durableTaskSchedulerSchedulersRestClient.CreateListByResourceGroupNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new DurableTaskSchedulerResource(Client, DurableTaskSchedulerData.DeserializeDurableTaskSchedulerData(e)), _durableTaskSchedulerSchedulersClientDiagnostics, Pipeline, "DurableTaskSchedulerCollection.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) => _durableTaskSchedulerSchedulersRestClient.CreateListByResourceGroupRequest(Id.SubscriptionId, Id.ResourceGroupName); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _durableTaskSchedulerSchedulersRestClient.CreateListByResourceGroupNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new DurableTaskSchedulerResource(Client, DurableTaskSchedulerData.DeserializeDurableTaskSchedulerData(e)), _durableTaskSchedulerSchedulersClientDiagnostics, Pipeline, "DurableTaskSchedulerCollection.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 = _durableTaskSchedulerSchedulersClientDiagnostics.CreateScope("DurableTaskSchedulerCollection.Exists"); + scope.Start(); + try + { + var response = await _durableTaskSchedulerSchedulersRestClient.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 = _durableTaskSchedulerSchedulersClientDiagnostics.CreateScope("DurableTaskSchedulerCollection.Exists"); + scope.Start(); + try + { + var response = _durableTaskSchedulerSchedulersRestClient.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 = _durableTaskSchedulerSchedulersClientDiagnostics.CreateScope("DurableTaskSchedulerCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _durableTaskSchedulerSchedulersRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, schedulerName, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new DurableTaskSchedulerResource(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 = _durableTaskSchedulerSchedulersClientDiagnostics.CreateScope("DurableTaskSchedulerCollection.GetIfExists"); + scope.Start(); + try + { + var response = _durableTaskSchedulerSchedulersRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, schedulerName, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new DurableTaskSchedulerResource(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/DurableTaskSchedulerData.Serialization.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/DurableTaskSchedulerData.Serialization.cs new file mode 100644 index 000000000000..9c736447d006 --- /dev/null +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/DurableTaskSchedulerData.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 DurableTaskSchedulerData : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.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(DurableTaskSchedulerData)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties, options); + } + } + + DurableTaskSchedulerData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DurableTaskSchedulerData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDurableTaskSchedulerData(document.RootElement, options); + } + + internal static DurableTaskSchedulerData DeserializeDurableTaskSchedulerData(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + DurableTaskSchedulerProperties 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 = DurableTaskSchedulerProperties.DeserializeDurableTaskSchedulerProperties(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 DurableTaskSchedulerData( + 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(DurableTaskSchedulerData)} does not support writing '{options.Format}' format."); + } + } + + DurableTaskSchedulerData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeDurableTaskSchedulerData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DurableTaskSchedulerData)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/DurableTaskSchedulerData.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/DurableTaskSchedulerData.cs new file mode 100644 index 000000000000..71ff5eee7745 --- /dev/null +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/DurableTaskSchedulerData.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 DurableTaskScheduler data model. + /// A Durable Task Scheduler resource + /// + public partial class DurableTaskSchedulerData : 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 DurableTaskSchedulerData(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 DurableTaskSchedulerData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, DurableTaskSchedulerProperties properties, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) + { + Properties = properties; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal DurableTaskSchedulerData() + { + } + + /// The resource-specific properties for this resource. + public DurableTaskSchedulerProperties Properties { get; set; } + } +} diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/DurableTaskSchedulerResource.Serialization.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/DurableTaskSchedulerResource.Serialization.cs new file mode 100644 index 000000000000..b3a007fc78bc --- /dev/null +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/DurableTaskSchedulerResource.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 DurableTaskSchedulerResource : IJsonModel + { + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + DurableTaskSchedulerData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options); + + DurableTaskSchedulerData 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/DurableTaskSchedulerResource.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/DurableTaskSchedulerResource.cs new file mode 100644 index 000000000000..6733c66ae532 --- /dev/null +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/DurableTaskSchedulerResource.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 DurableTaskScheduler 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 GetDurableTaskSchedulerResource method. + /// Otherwise you can get one from its parent resource using the GetDurableTaskScheduler method. + /// + public partial class DurableTaskSchedulerResource : 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 _durableTaskSchedulerSchedulersClientDiagnostics; + private readonly SchedulersRestOperations _durableTaskSchedulerSchedulersRestClient; + private readonly DurableTaskSchedulerData _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 DurableTaskSchedulerResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal DurableTaskSchedulerResource(ArmClient client, DurableTaskSchedulerData 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 DurableTaskSchedulerResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _durableTaskSchedulerSchedulersClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.DurableTask", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string durableTaskSchedulerSchedulersApiVersion); + _durableTaskSchedulerSchedulersRestClient = new SchedulersRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, durableTaskSchedulerSchedulersApiVersion); +#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 DurableTaskSchedulerData 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 DurableTaskHubResources in the DurableTaskScheduler. + /// An object representing collection of DurableTaskHubResources and their operations over a DurableTaskHubResource. + public virtual DurableTaskHubCollection GetDurableTaskHubs() + { + return GetCachedClient(client => new DurableTaskHubCollection(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> GetDurableTaskHubAsync(string taskHubName, CancellationToken cancellationToken = default) + { + return await GetDurableTaskHubs().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 GetDurableTaskHub(string taskHubName, CancellationToken cancellationToken = default) + { + return GetDurableTaskHubs().Get(taskHubName, cancellationToken); + } + + /// Gets an object representing a DurableTaskRetentionPolicyResource along with the instance operations that can be performed on it in the DurableTaskScheduler. + /// Returns a object. + public virtual DurableTaskRetentionPolicyResource GetDurableTaskRetentionPolicy() + { + return new DurableTaskRetentionPolicyResource(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 = _durableTaskSchedulerSchedulersClientDiagnostics.CreateScope("DurableTaskSchedulerResource.Get"); + scope.Start(); + try + { + var response = await _durableTaskSchedulerSchedulersRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new DurableTaskSchedulerResource(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 = _durableTaskSchedulerSchedulersClientDiagnostics.CreateScope("DurableTaskSchedulerResource.Get"); + scope.Start(); + try + { + var response = _durableTaskSchedulerSchedulersRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new DurableTaskSchedulerResource(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 = _durableTaskSchedulerSchedulersClientDiagnostics.CreateScope("DurableTaskSchedulerResource.Delete"); + scope.Start(); + try + { + var response = await _durableTaskSchedulerSchedulersRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new DurableTaskArmOperation(_durableTaskSchedulerSchedulersClientDiagnostics, Pipeline, _durableTaskSchedulerSchedulersRestClient.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 = _durableTaskSchedulerSchedulersClientDiagnostics.CreateScope("DurableTaskSchedulerResource.Delete"); + scope.Start(); + try + { + var response = _durableTaskSchedulerSchedulersRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + var operation = new DurableTaskArmOperation(_durableTaskSchedulerSchedulersClientDiagnostics, Pipeline, _durableTaskSchedulerSchedulersRestClient.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, DurableTaskSchedulerPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(patch, nameof(patch)); + + using var scope = _durableTaskSchedulerSchedulersClientDiagnostics.CreateScope("DurableTaskSchedulerResource.Update"); + scope.Start(); + try + { + var response = await _durableTaskSchedulerSchedulersRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch, cancellationToken).ConfigureAwait(false); + var operation = new DurableTaskArmOperation(new DurableTaskSchedulerOperationSource(Client), _durableTaskSchedulerSchedulersClientDiagnostics, Pipeline, _durableTaskSchedulerSchedulersRestClient.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, DurableTaskSchedulerPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(patch, nameof(patch)); + + using var scope = _durableTaskSchedulerSchedulersClientDiagnostics.CreateScope("DurableTaskSchedulerResource.Update"); + scope.Start(); + try + { + var response = _durableTaskSchedulerSchedulersRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch, cancellationToken); + var operation = new DurableTaskArmOperation(new DurableTaskSchedulerOperationSource(Client), _durableTaskSchedulerSchedulersClientDiagnostics, Pipeline, _durableTaskSchedulerSchedulersRestClient.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 = _durableTaskSchedulerSchedulersClientDiagnostics.CreateScope("DurableTaskSchedulerResource.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 _durableTaskSchedulerSchedulersRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new DurableTaskSchedulerResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new DurableTaskSchedulerPatch(); + 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 = _durableTaskSchedulerSchedulersClientDiagnostics.CreateScope("DurableTaskSchedulerResource.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 = _durableTaskSchedulerSchedulersRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + return Response.FromValue(new DurableTaskSchedulerResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new DurableTaskSchedulerPatch(); + 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 = _durableTaskSchedulerSchedulersClientDiagnostics.CreateScope("DurableTaskSchedulerResource.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 _durableTaskSchedulerSchedulersRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new DurableTaskSchedulerResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new DurableTaskSchedulerPatch(); + 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 = _durableTaskSchedulerSchedulersClientDiagnostics.CreateScope("DurableTaskSchedulerResource.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 = _durableTaskSchedulerSchedulersRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + return Response.FromValue(new DurableTaskSchedulerResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new DurableTaskSchedulerPatch(); + 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 = _durableTaskSchedulerSchedulersClientDiagnostics.CreateScope("DurableTaskSchedulerResource.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 _durableTaskSchedulerSchedulersRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new DurableTaskSchedulerResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new DurableTaskSchedulerPatch(); + 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 = _durableTaskSchedulerSchedulersClientDiagnostics.CreateScope("DurableTaskSchedulerResource.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 = _durableTaskSchedulerSchedulersRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + return Response.FromValue(new DurableTaskSchedulerResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new DurableTaskSchedulerPatch(); + 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/Extensions/DurableTaskExtensions.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Extensions/DurableTaskExtensions.cs new file mode 100644 index 000000000000..e42e5d3b008d --- /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 DurableTaskSchedulerResource GetDurableTaskSchedulerResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableDurableTaskArmClient(client).GetDurableTaskSchedulerResource(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 DurableTaskHubResource GetDurableTaskHubResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableDurableTaskArmClient(client).GetDurableTaskHubResource(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 DurableTaskRetentionPolicyResource GetDurableTaskRetentionPolicyResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableDurableTaskArmClient(client).GetDurableTaskRetentionPolicyResource(id); + } + + /// + /// Gets a collection of DurableTaskSchedulerResources 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 DurableTaskSchedulerResources and their operations over a DurableTaskSchedulerResource. + public static DurableTaskSchedulerCollection GetDurableTaskSchedulers(this ResourceGroupResource resourceGroupResource) + { + Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); + + return GetMockableDurableTaskResourceGroupResource(resourceGroupResource).GetDurableTaskSchedulers(); + } + + /// + /// 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> GetDurableTaskSchedulerAsync(this ResourceGroupResource resourceGroupResource, string schedulerName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); + + return await GetMockableDurableTaskResourceGroupResource(resourceGroupResource).GetDurableTaskSchedulerAsync(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 GetDurableTaskScheduler(this ResourceGroupResource resourceGroupResource, string schedulerName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); + + return GetMockableDurableTaskResourceGroupResource(resourceGroupResource).GetDurableTaskScheduler(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 GetDurableTaskSchedulersAsync(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); + + return GetMockableDurableTaskSubscriptionResource(subscriptionResource).GetDurableTaskSchedulersAsync(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 GetDurableTaskSchedulers(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); + + return GetMockableDurableTaskSubscriptionResource(subscriptionResource).GetDurableTaskSchedulers(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..ed805b0a46bf --- /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 DurableTaskSchedulerResource GetDurableTaskSchedulerResource(ResourceIdentifier id) + { + DurableTaskSchedulerResource.ValidateResourceId(id); + return new DurableTaskSchedulerResource(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 DurableTaskHubResource GetDurableTaskHubResource(ResourceIdentifier id) + { + DurableTaskHubResource.ValidateResourceId(id); + return new DurableTaskHubResource(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 DurableTaskRetentionPolicyResource GetDurableTaskRetentionPolicyResource(ResourceIdentifier id) + { + DurableTaskRetentionPolicyResource.ValidateResourceId(id); + return new DurableTaskRetentionPolicyResource(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..2fe2f86121ab --- /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 DurableTaskSchedulerResources in the ResourceGroupResource. + /// An object representing collection of DurableTaskSchedulerResources and their operations over a DurableTaskSchedulerResource. + public virtual DurableTaskSchedulerCollection GetDurableTaskSchedulers() + { + return GetCachedClient(client => new DurableTaskSchedulerCollection(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> GetDurableTaskSchedulerAsync(string schedulerName, CancellationToken cancellationToken = default) + { + return await GetDurableTaskSchedulers().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 GetDurableTaskScheduler(string schedulerName, CancellationToken cancellationToken = default) + { + return GetDurableTaskSchedulers().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..0759789a2cc4 --- /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 _durableTaskSchedulerSchedulersClientDiagnostics; + private SchedulersRestOperations _durableTaskSchedulerSchedulersRestClient; + + /// 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 DurableTaskSchedulerSchedulersClientDiagnostics => _durableTaskSchedulerSchedulersClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.DurableTask", DurableTaskSchedulerResource.ResourceType.Namespace, Diagnostics); + private SchedulersRestOperations DurableTaskSchedulerSchedulersRestClient => _durableTaskSchedulerSchedulersRestClient ??= new SchedulersRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, GetApiVersionOrNull(DurableTaskSchedulerResource.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 GetDurableTaskSchedulersAsync(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => DurableTaskSchedulerSchedulersRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => DurableTaskSchedulerSchedulersRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new DurableTaskSchedulerResource(Client, DurableTaskSchedulerData.DeserializeDurableTaskSchedulerData(e)), DurableTaskSchedulerSchedulersClientDiagnostics, Pipeline, "MockableDurableTaskSubscriptionResource.GetDurableTaskSchedulers", "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 GetDurableTaskSchedulers(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => DurableTaskSchedulerSchedulersRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => DurableTaskSchedulerSchedulersRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new DurableTaskSchedulerResource(Client, DurableTaskSchedulerData.DeserializeDurableTaskSchedulerData(e)), DurableTaskSchedulerSchedulersClientDiagnostics, Pipeline, "MockableDurableTaskSubscriptionResource.GetDurableTaskSchedulers", "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/DurableTaskHubOperationSource.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/LongRunningOperation/DurableTaskHubOperationSource.cs new file mode 100644 index 000000000000..78d75c79f2c6 --- /dev/null +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/LongRunningOperation/DurableTaskHubOperationSource.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 DurableTaskHubOperationSource : IOperationSource + { + private readonly ArmClient _client; + + internal DurableTaskHubOperationSource(ArmClient client) + { + _client = client; + } + + DurableTaskHubResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + var data = ModelReaderWriter.Read(response.Content); + return new DurableTaskHubResource(_client, data); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + var data = ModelReaderWriter.Read(response.Content); + return await Task.FromResult(new DurableTaskHubResource(_client, data)).ConfigureAwait(false); + } + } +} diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/LongRunningOperation/DurableTaskRetentionPolicyOperationSource.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/LongRunningOperation/DurableTaskRetentionPolicyOperationSource.cs new file mode 100644 index 000000000000..e2b9ba528e84 --- /dev/null +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/LongRunningOperation/DurableTaskRetentionPolicyOperationSource.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 DurableTaskRetentionPolicyOperationSource : IOperationSource + { + private readonly ArmClient _client; + + internal DurableTaskRetentionPolicyOperationSource(ArmClient client) + { + _client = client; + } + + DurableTaskRetentionPolicyResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + var data = ModelReaderWriter.Read(response.Content); + return new DurableTaskRetentionPolicyResource(_client, data); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + var data = ModelReaderWriter.Read(response.Content); + return await Task.FromResult(new DurableTaskRetentionPolicyResource(_client, data)).ConfigureAwait(false); + } + } +} diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/LongRunningOperation/DurableTaskSchedulerOperationSource.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/LongRunningOperation/DurableTaskSchedulerOperationSource.cs new file mode 100644 index 000000000000..8074f81f5270 --- /dev/null +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/LongRunningOperation/DurableTaskSchedulerOperationSource.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 DurableTaskSchedulerOperationSource : IOperationSource + { + private readonly ArmClient _client; + + internal DurableTaskSchedulerOperationSource(ArmClient client) + { + _client = client; + } + + DurableTaskSchedulerResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + var data = ModelReaderWriter.Read(response.Content); + return new DurableTaskSchedulerResource(_client, data); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + var data = ModelReaderWriter.Read(response.Content); + return await Task.FromResult(new DurableTaskSchedulerResource(_client, data)).ConfigureAwait(false); + } + } +} diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/DurableTaskHubProperties.Serialization.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/DurableTaskHubProperties.Serialization.cs new file mode 100644 index 000000000000..1404b93f64dd --- /dev/null +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/DurableTaskHubProperties.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 DurableTaskHubProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DurableTaskHubProperties)} 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 + } + } + } + + DurableTaskHubProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DurableTaskHubProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDurableTaskHubProperties(document.RootElement, options); + } + + internal static DurableTaskHubProperties DeserializeDurableTaskHubProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + DurableTaskProvisioningState? 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 DurableTaskProvisioningState(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 DurableTaskHubProperties(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(DurableTaskHubProperties)} does not support writing '{options.Format}' format."); + } + } + + DurableTaskHubProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeDurableTaskHubProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DurableTaskHubProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/DurableTaskHubProperties.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/DurableTaskHubProperties.cs new file mode 100644 index 000000000000..259880513675 --- /dev/null +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/DurableTaskHubProperties.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 DurableTaskHubProperties + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public DurableTaskHubProperties() + { + } + + /// 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 DurableTaskHubProperties(DurableTaskProvisioningState? provisioningState, Uri dashboardUri, IDictionary serializedAdditionalRawData) + { + ProvisioningState = provisioningState; + DashboardUri = dashboardUri; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The status of the last operation. + public DurableTaskProvisioningState? ProvisioningState { get; } + /// URL of the durable task scheduler dashboard. + public Uri DashboardUri { get; } + } +} diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/DurableTaskProvisioningState.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/DurableTaskProvisioningState.cs new file mode 100644 index 000000000000..52575cfb66b9 --- /dev/null +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/DurableTaskProvisioningState.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 DurableTaskProvisioningState : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public DurableTaskProvisioningState(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 DurableTaskProvisioningState Succeeded { get; } = new DurableTaskProvisioningState(SucceededValue); + /// Resource creation failed. + public static DurableTaskProvisioningState Failed { get; } = new DurableTaskProvisioningState(FailedValue); + /// Resource creation was canceled. + public static DurableTaskProvisioningState Canceled { get; } = new DurableTaskProvisioningState(CanceledValue); + /// The resource is being provisioned. + public static DurableTaskProvisioningState Provisioning { get; } = new DurableTaskProvisioningState(ProvisioningValue); + /// The resource is updating. + public static DurableTaskProvisioningState Updating { get; } = new DurableTaskProvisioningState(UpdatingValue); + /// The resource is being deleted. + public static DurableTaskProvisioningState Deleting { get; } = new DurableTaskProvisioningState(DeletingValue); + /// The resource create request has been accepted. + public static DurableTaskProvisioningState Accepted { get; } = new DurableTaskProvisioningState(AcceptedValue); + /// Determines if two values are the same. + public static bool operator ==(DurableTaskProvisioningState left, DurableTaskProvisioningState right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(DurableTaskProvisioningState left, DurableTaskProvisioningState right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator DurableTaskProvisioningState(string value) => new DurableTaskProvisioningState(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is DurableTaskProvisioningState other && Equals(other); + /// + public bool Equals(DurableTaskProvisioningState 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/DurableTaskPurgeableOrchestrationState.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/DurableTaskPurgeableOrchestrationState.cs new file mode 100644 index 000000000000..cf9ceb78c63e --- /dev/null +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/DurableTaskPurgeableOrchestrationState.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 DurableTaskPurgeableOrchestrationState : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public DurableTaskPurgeableOrchestrationState(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 DurableTaskPurgeableOrchestrationState Completed { get; } = new DurableTaskPurgeableOrchestrationState(CompletedValue); + /// The orchestration is failed. + public static DurableTaskPurgeableOrchestrationState Failed { get; } = new DurableTaskPurgeableOrchestrationState(FailedValue); + /// The orchestration is terminated. + public static DurableTaskPurgeableOrchestrationState Terminated { get; } = new DurableTaskPurgeableOrchestrationState(TerminatedValue); + /// The orchestration is canceled. + public static DurableTaskPurgeableOrchestrationState Canceled { get; } = new DurableTaskPurgeableOrchestrationState(CanceledValue); + /// Determines if two values are the same. + public static bool operator ==(DurableTaskPurgeableOrchestrationState left, DurableTaskPurgeableOrchestrationState right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(DurableTaskPurgeableOrchestrationState left, DurableTaskPurgeableOrchestrationState right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator DurableTaskPurgeableOrchestrationState(string value) => new DurableTaskPurgeableOrchestrationState(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is DurableTaskPurgeableOrchestrationState other && Equals(other); + /// + public bool Equals(DurableTaskPurgeableOrchestrationState 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/DurableTaskResourceRedundancyState.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/DurableTaskResourceRedundancyState.cs new file mode 100644 index 000000000000..89fc7e0e891b --- /dev/null +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/DurableTaskResourceRedundancyState.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 DurableTaskResourceRedundancyState : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public DurableTaskResourceRedundancyState(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 DurableTaskResourceRedundancyState None { get; } = new DurableTaskResourceRedundancyState(NoneValue); + /// The resource is zone redundant. + public static DurableTaskResourceRedundancyState Zone { get; } = new DurableTaskResourceRedundancyState(ZoneValue); + /// Determines if two values are the same. + public static bool operator ==(DurableTaskResourceRedundancyState left, DurableTaskResourceRedundancyState right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(DurableTaskResourceRedundancyState left, DurableTaskResourceRedundancyState right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator DurableTaskResourceRedundancyState(string value) => new DurableTaskResourceRedundancyState(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is DurableTaskResourceRedundancyState other && Equals(other); + /// + public bool Equals(DurableTaskResourceRedundancyState 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/DurableTaskRetentionPolicyDetails.Serialization.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/DurableTaskRetentionPolicyDetails.Serialization.cs new file mode 100644 index 000000000000..6818e95b958a --- /dev/null +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/DurableTaskRetentionPolicyDetails.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 DurableTaskRetentionPolicyDetails : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DurableTaskRetentionPolicyDetails)} 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 + } + } + } + + DurableTaskRetentionPolicyDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DurableTaskRetentionPolicyDetails)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDurableTaskRetentionPolicyDetails(document.RootElement, options); + } + + internal static DurableTaskRetentionPolicyDetails DeserializeDurableTaskRetentionPolicyDetails(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + int retentionPeriodInDays = default; + DurableTaskPurgeableOrchestrationState? 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 DurableTaskPurgeableOrchestrationState(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DurableTaskRetentionPolicyDetails(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(DurableTaskRetentionPolicyDetails)} does not support writing '{options.Format}' format."); + } + } + + DurableTaskRetentionPolicyDetails IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeDurableTaskRetentionPolicyDetails(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DurableTaskRetentionPolicyDetails)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/DurableTaskRetentionPolicyDetails.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/DurableTaskRetentionPolicyDetails.cs new file mode 100644 index 000000000000..2c8911afc3b9 --- /dev/null +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/DurableTaskRetentionPolicyDetails.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 DurableTaskRetentionPolicyDetails + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// 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 DurableTaskRetentionPolicyDetails(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 DurableTaskRetentionPolicyDetails(int retentionPeriodInDays, DurableTaskPurgeableOrchestrationState? orchestrationState, IDictionary serializedAdditionalRawData) + { + RetentionPeriodInDays = retentionPeriodInDays; + OrchestrationState = orchestrationState; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal DurableTaskRetentionPolicyDetails() + { + } + + /// 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 DurableTaskPurgeableOrchestrationState? OrchestrationState { get; set; } + } +} diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/DurableTaskRetentionPolicyProperties.Serialization.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/DurableTaskRetentionPolicyProperties.Serialization.cs new file mode 100644 index 000000000000..28729fe4f442 --- /dev/null +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/DurableTaskRetentionPolicyProperties.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 DurableTaskRetentionPolicyProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DurableTaskRetentionPolicyProperties)} 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 + } + } + } + + DurableTaskRetentionPolicyProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DurableTaskRetentionPolicyProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDurableTaskRetentionPolicyProperties(document.RootElement, options); + } + + internal static DurableTaskRetentionPolicyProperties DeserializeDurableTaskRetentionPolicyProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + DurableTaskProvisioningState? 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 DurableTaskProvisioningState(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(DurableTaskRetentionPolicyDetails.DeserializeDurableTaskRetentionPolicyDetails(item, options)); + } + retentionPolicies = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DurableTaskRetentionPolicyProperties(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(DurableTaskRetentionPolicyProperties)} does not support writing '{options.Format}' format."); + } + } + + DurableTaskRetentionPolicyProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeDurableTaskRetentionPolicyProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DurableTaskRetentionPolicyProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/DurableTaskRetentionPolicyProperties.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/DurableTaskRetentionPolicyProperties.cs new file mode 100644 index 000000000000..e00e7fdae962 --- /dev/null +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/DurableTaskRetentionPolicyProperties.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 DurableTaskRetentionPolicyProperties + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public DurableTaskRetentionPolicyProperties() + { + 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 DurableTaskRetentionPolicyProperties(DurableTaskProvisioningState? provisioningState, IList retentionPolicies, IDictionary serializedAdditionalRawData) + { + ProvisioningState = provisioningState; + RetentionPolicies = retentionPolicies; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The status of the last operation. + public DurableTaskProvisioningState? ProvisioningState { get; } + /// The orchestration retention policies. + public IList RetentionPolicies { get; } + } +} diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/DurableTaskSchedulerPatch.Serialization.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/DurableTaskSchedulerPatch.Serialization.cs new file mode 100644 index 000000000000..84d784a7a06b --- /dev/null +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/DurableTaskSchedulerPatch.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 DurableTaskSchedulerPatch : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DurableTaskSchedulerPatch)} 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 + } + } + } + + DurableTaskSchedulerPatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DurableTaskSchedulerPatch)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDurableTaskSchedulerPatch(document.RootElement, options); + } + + internal static DurableTaskSchedulerPatch DeserializeDurableTaskSchedulerPatch(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + DurableTaskSchedulerPatchProperties 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 = DurableTaskSchedulerPatchProperties.DeserializeDurableTaskSchedulerPatchProperties(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 DurableTaskSchedulerPatch(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(DurableTaskSchedulerPatch)} does not support writing '{options.Format}' format."); + } + } + + DurableTaskSchedulerPatch IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeDurableTaskSchedulerPatch(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DurableTaskSchedulerPatch)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/DurableTaskSchedulerPatch.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/DurableTaskSchedulerPatch.cs new file mode 100644 index 000000000000..3c2834be281b --- /dev/null +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/DurableTaskSchedulerPatch.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 DurableTaskSchedulerPatch + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public DurableTaskSchedulerPatch() + { + 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 DurableTaskSchedulerPatch(DurableTaskSchedulerPatchProperties properties, IDictionary tags, IDictionary serializedAdditionalRawData) + { + Properties = properties; + Tags = tags; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The resource-specific properties for this resource. + public DurableTaskSchedulerPatchProperties Properties { get; set; } + /// Resource tags. + public IDictionary Tags { get; } + } +} diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/DurableTaskSchedulerPatchProperties.Serialization.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/DurableTaskSchedulerPatchProperties.Serialization.cs new file mode 100644 index 000000000000..796c61883617 --- /dev/null +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/DurableTaskSchedulerPatchProperties.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 DurableTaskSchedulerPatchProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DurableTaskSchedulerPatchProperties)} 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 + } + } + } + + DurableTaskSchedulerPatchProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DurableTaskSchedulerPatchProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDurableTaskSchedulerPatchProperties(document.RootElement, options); + } + + internal static DurableTaskSchedulerPatchProperties DeserializeDurableTaskSchedulerPatchProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + DurableTaskProvisioningState? provisioningState = default; + string endpoint = default; + IList ipAllowlist = default; + DurableTaskSchedulerSkuUpdate 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 DurableTaskProvisioningState(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 = DurableTaskSchedulerSkuUpdate.DeserializeDurableTaskSchedulerSkuUpdate(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DurableTaskSchedulerPatchProperties(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(DurableTaskSchedulerPatchProperties)} does not support writing '{options.Format}' format."); + } + } + + DurableTaskSchedulerPatchProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeDurableTaskSchedulerPatchProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DurableTaskSchedulerPatchProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/DurableTaskSchedulerPatchProperties.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/DurableTaskSchedulerPatchProperties.cs new file mode 100644 index 000000000000..1efba5f90048 --- /dev/null +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/DurableTaskSchedulerPatchProperties.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 DurableTaskSchedulerPatchProperties + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public DurableTaskSchedulerPatchProperties() + { + 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 DurableTaskSchedulerPatchProperties(DurableTaskProvisioningState? provisioningState, string endpoint, IList ipAllowlist, DurableTaskSchedulerSkuUpdate sku, IDictionary serializedAdditionalRawData) + { + ProvisioningState = provisioningState; + Endpoint = endpoint; + IPAllowlist = ipAllowlist; + Sku = sku; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The status of the last operation. + public DurableTaskProvisioningState? 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 DurableTaskSchedulerSkuUpdate Sku { get; set; } + } +} diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/DurableTaskSchedulerProperties.Serialization.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/DurableTaskSchedulerProperties.Serialization.cs new file mode 100644 index 000000000000..2265cc62ee76 --- /dev/null +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/DurableTaskSchedulerProperties.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 DurableTaskSchedulerProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DurableTaskSchedulerProperties)} 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 + } + } + } + + DurableTaskSchedulerProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DurableTaskSchedulerProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDurableTaskSchedulerProperties(document.RootElement, options); + } + + internal static DurableTaskSchedulerProperties DeserializeDurableTaskSchedulerProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + DurableTaskProvisioningState? provisioningState = default; + string endpoint = default; + IList ipAllowlist = default; + DurableTaskSchedulerSku 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 DurableTaskProvisioningState(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 = DurableTaskSchedulerSku.DeserializeDurableTaskSchedulerSku(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DurableTaskSchedulerProperties(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(DurableTaskSchedulerProperties)} does not support writing '{options.Format}' format."); + } + } + + DurableTaskSchedulerProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeDurableTaskSchedulerProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DurableTaskSchedulerProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/DurableTaskSchedulerProperties.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/DurableTaskSchedulerProperties.cs new file mode 100644 index 000000000000..21c64a6f06c7 --- /dev/null +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/DurableTaskSchedulerProperties.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 DurableTaskSchedulerProperties + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// 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 DurableTaskSchedulerProperties(IEnumerable ipAllowlist, DurableTaskSchedulerSku 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 DurableTaskSchedulerProperties(DurableTaskProvisioningState? provisioningState, string endpoint, IList ipAllowlist, DurableTaskSchedulerSku sku, IDictionary serializedAdditionalRawData) + { + ProvisioningState = provisioningState; + Endpoint = endpoint; + IPAllowlist = ipAllowlist; + Sku = sku; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal DurableTaskSchedulerProperties() + { + } + + /// The status of the last operation. + public DurableTaskProvisioningState? 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 DurableTaskSchedulerSku Sku { get; set; } + } +} diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/DurableTaskSchedulerSku.Serialization.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/DurableTaskSchedulerSku.Serialization.cs new file mode 100644 index 000000000000..e851ca7619c9 --- /dev/null +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/DurableTaskSchedulerSku.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 DurableTaskSchedulerSku : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DurableTaskSchedulerSku)} 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 + } + } + } + + DurableTaskSchedulerSku IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DurableTaskSchedulerSku)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDurableTaskSchedulerSku(document.RootElement, options); + } + + internal static DurableTaskSchedulerSku DeserializeDurableTaskSchedulerSku(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string name = default; + int? capacity = default; + DurableTaskResourceRedundancyState? 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 DurableTaskResourceRedundancyState(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DurableTaskSchedulerSku(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(DurableTaskSchedulerSku)} does not support writing '{options.Format}' format."); + } + } + + DurableTaskSchedulerSku IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeDurableTaskSchedulerSku(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DurableTaskSchedulerSku)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/DurableTaskSchedulerSku.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/DurableTaskSchedulerSku.cs new file mode 100644 index 000000000000..7dc91258ef63 --- /dev/null +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/DurableTaskSchedulerSku.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 DurableTaskSchedulerSku + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// 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 DurableTaskSchedulerSku(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 DurableTaskSchedulerSku(string name, int? capacity, DurableTaskResourceRedundancyState? redundancyState, IDictionary serializedAdditionalRawData) + { + Name = name; + Capacity = capacity; + RedundancyState = redundancyState; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal DurableTaskSchedulerSku() + { + } + + /// 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 DurableTaskResourceRedundancyState? RedundancyState { get; } + } +} diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/DurableTaskSchedulerSkuUpdate.Serialization.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/DurableTaskSchedulerSkuUpdate.Serialization.cs new file mode 100644 index 000000000000..4ea6f5b1e298 --- /dev/null +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/DurableTaskSchedulerSkuUpdate.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 DurableTaskSchedulerSkuUpdate : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DurableTaskSchedulerSkuUpdate)} 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 + } + } + } + + DurableTaskSchedulerSkuUpdate IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DurableTaskSchedulerSkuUpdate)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDurableTaskSchedulerSkuUpdate(document.RootElement, options); + } + + internal static DurableTaskSchedulerSkuUpdate DeserializeDurableTaskSchedulerSkuUpdate(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string name = default; + int? capacity = default; + DurableTaskResourceRedundancyState? 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 DurableTaskResourceRedundancyState(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DurableTaskSchedulerSkuUpdate(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(DurableTaskSchedulerSkuUpdate)} does not support writing '{options.Format}' format."); + } + } + + DurableTaskSchedulerSkuUpdate IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeDurableTaskSchedulerSkuUpdate(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DurableTaskSchedulerSkuUpdate)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/DurableTaskSchedulerSkuUpdate.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/DurableTaskSchedulerSkuUpdate.cs new file mode 100644 index 000000000000..864cb3ce5ba0 --- /dev/null +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/DurableTaskSchedulerSkuUpdate.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 DurableTaskSchedulerSkuUpdate + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public DurableTaskSchedulerSkuUpdate() + { + } + + /// 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 DurableTaskSchedulerSkuUpdate(string name, int? capacity, DurableTaskResourceRedundancyState? 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 DurableTaskResourceRedundancyState? RedundancyState { get; } + } +} 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..eca7e4783315 --- /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(DurableTaskRetentionPolicyData.DeserializeDurableTaskRetentionPolicyData(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..0e0e715a10f2 --- /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/SchedulerListResult.Serialization.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/SchedulerListResult.Serialization.cs new file mode 100644 index 000000000000..090c1dab5f79 --- /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(DurableTaskSchedulerData.DeserializeDurableTaskSchedulerData(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..4ea2059af1c8 --- /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/TaskHubListResult.Serialization.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/TaskHubListResult.Serialization.cs new file mode 100644 index 000000000000..8376f6de828f --- /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(DurableTaskHubData.DeserializeDurableTaskHubData(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..90efc14564b4 --- /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/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..960c84e9efca --- /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: + { + DurableTaskRetentionPolicyData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = DurableTaskRetentionPolicyData.DeserializeDurableTaskRetentionPolicyData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((DurableTaskRetentionPolicyData)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: + { + DurableTaskRetentionPolicyData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = DurableTaskRetentionPolicyData.DeserializeDurableTaskRetentionPolicyData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((DurableTaskRetentionPolicyData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateCreateOrReplaceRequestUri(string subscriptionId, string resourceGroupName, string schedulerName, DurableTaskRetentionPolicyData 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, DurableTaskRetentionPolicyData 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, DurableTaskRetentionPolicyData 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, DurableTaskRetentionPolicyData 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, DurableTaskRetentionPolicyData 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, DurableTaskRetentionPolicyData 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, DurableTaskRetentionPolicyData 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, DurableTaskRetentionPolicyData 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..821f8a6f6145 --- /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: + { + DurableTaskSchedulerData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = DurableTaskSchedulerData.DeserializeDurableTaskSchedulerData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((DurableTaskSchedulerData)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: + { + DurableTaskSchedulerData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = DurableTaskSchedulerData.DeserializeDurableTaskSchedulerData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((DurableTaskSchedulerData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, string resourceGroupName, string schedulerName, DurableTaskSchedulerData 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, DurableTaskSchedulerData 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, DurableTaskSchedulerData 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, DurableTaskSchedulerData 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, DurableTaskSchedulerPatch 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, DurableTaskSchedulerPatch 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, DurableTaskSchedulerPatch 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, DurableTaskSchedulerPatch 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..9dfc426d0129 --- /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: + { + DurableTaskHubData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = DurableTaskHubData.DeserializeDurableTaskHubData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((DurableTaskHubData)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: + { + DurableTaskHubData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = DurableTaskHubData.DeserializeDurableTaskHubData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((DurableTaskHubData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, string resourceGroupName, string schedulerName, string taskHubName, DurableTaskHubData 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, DurableTaskHubData 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, DurableTaskHubData 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, DurableTaskHubData 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/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..eca0ad8df8d4 --- /dev/null +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/tsp-location.yaml @@ -0,0 +1,4 @@ +directory: specification/durabletask/DurableTask.Management +commit: 5cc63ed55e6f4769b156f767154839d0d18a7d05 +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/eventgrid/Azure.Messaging.EventGrid.SystemEvents/api/Azure.Messaging.EventGrid.SystemEvents.net8.0.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/api/Azure.Messaging.EventGrid.SystemEvents.net8.0.cs index 7f23a6930a0e..891b8a3381b6 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/api/Azure.Messaging.EventGrid.SystemEvents.net8.0.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/api/Azure.Messaging.EventGrid.SystemEvents.net8.0.cs @@ -671,7 +671,7 @@ public partial class AcsRouterCommunicationError : System.ClientModel.Primitives { internal AcsRouterCommunicationError() { } public string Code { get { throw null; } } - public System.Collections.Generic.IReadOnlyList Details { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Errors { get { throw null; } } public Azure.Messaging.EventGrid.SystemEvents.AcsRouterCommunicationError Innererror { get { throw null; } } public string Message { get { throw null; } } public string Target { get { throw null; } } @@ -1320,6 +1320,62 @@ 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 ApiManagementCircuitBreakerClosedEventData : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal ApiManagementCircuitBreakerClosedEventData() { } + public string BackendName { get { throw null; } } + public Azure.Messaging.EventGrid.SystemEvents.ApiManagementCircuitBreakerProperties CircuitBreaker { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Messaging.EventGrid.SystemEvents.ApiManagementCircuitBreakerClosedEventData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Messaging.EventGrid.SystemEvents.ApiManagementCircuitBreakerClosedEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ApiManagementCircuitBreakerOpenedEventData : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal ApiManagementCircuitBreakerOpenedEventData() { } + public string BackendName { get { throw null; } } + public Azure.Messaging.EventGrid.SystemEvents.ApiManagementCircuitBreakerProperties CircuitBreaker { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Messaging.EventGrid.SystemEvents.ApiManagementCircuitBreakerOpenedEventData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Messaging.EventGrid.SystemEvents.ApiManagementCircuitBreakerOpenedEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ApiManagementCircuitBreakerProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal ApiManagementCircuitBreakerProperties() { } + public System.Collections.Generic.IReadOnlyDictionary Rules { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Messaging.EventGrid.SystemEvents.ApiManagementCircuitBreakerProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Messaging.EventGrid.SystemEvents.ApiManagementCircuitBreakerProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ApiManagementCircuitBreakerPropertiesRule : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal ApiManagementCircuitBreakerPropertiesRule() { } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Messaging.EventGrid.SystemEvents.ApiManagementCircuitBreakerPropertiesRule System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Messaging.EventGrid.SystemEvents.ApiManagementCircuitBreakerPropertiesRule System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ApiManagementExpiredGatewayTokenProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal ApiManagementExpiredGatewayTokenProperties() { } + public System.DateTimeOffset ExpiredAtUtc { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Messaging.EventGrid.SystemEvents.ApiManagementExpiredGatewayTokenProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Messaging.EventGrid.SystemEvents.ApiManagementExpiredGatewayTokenProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class ApiManagementGatewayApiAddedEventData : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal ApiManagementGatewayApiAddedEventData() { } @@ -1430,6 +1486,42 @@ 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 ApiManagementGatewayProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal ApiManagementGatewayProperties() { } + public string GatewayId { get { throw null; } } + public string InstanceId { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ApiManagementGatewayTokenExpiredEventData : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal ApiManagementGatewayTokenExpiredEventData() { } + public Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayProperties GatewayInfo { get { throw null; } } + public Azure.Messaging.EventGrid.SystemEvents.ApiManagementExpiredGatewayTokenProperties TokenInfo { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayTokenExpiredEventData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayTokenExpiredEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ApiManagementGatewayTokenNearExpiryEventData : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal ApiManagementGatewayTokenNearExpiryEventData() { } + public Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayProperties GatewayInfo { get { throw null; } } + public Azure.Messaging.EventGrid.SystemEvents.ApiManagementNearExpiryGatewayTokenProperties TokenInfo { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayTokenNearExpiryEventData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayTokenNearExpiryEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class ApiManagementGatewayUpdatedEventData : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal ApiManagementGatewayUpdatedEventData() { } @@ -1441,6 +1533,17 @@ 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 ApiManagementNearExpiryGatewayTokenProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal ApiManagementNearExpiryGatewayTokenProperties() { } + public System.DateTimeOffset ExpiredAtUtc { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Messaging.EventGrid.SystemEvents.ApiManagementNearExpiryGatewayTokenProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Messaging.EventGrid.SystemEvents.ApiManagementNearExpiryGatewayTokenProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class ApiManagementProductCreatedEventData : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal ApiManagementProductCreatedEventData() { } @@ -2332,6 +2435,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 EdgeSolutionVersionPublishedEventData : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal EdgeSolutionVersionPublishedEventData() { } + public string ApiVersion { get { throw null; } } + public System.Uri CallbackUrl { get { throw null; } } + public string ExternalValidationId { get { throw null; } } + public string SolutionTemplateId { get { throw null; } } + public string SolutionTemplateVersionId { get { throw null; } } + public string SolutionVersionId { get { throw null; } } + public string TargetId { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Messaging.EventGrid.SystemEvents.EdgeSolutionVersionPublishedEventData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Messaging.EventGrid.SystemEvents.EdgeSolutionVersionPublishedEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class EventGridMqttClientCreatedOrUpdatedEventData : Azure.Messaging.EventGrid.SystemEvents.EventGridMqttClientEventData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal EventGridMqttClientCreatedOrUpdatedEventData() { } @@ -2484,7 +2604,7 @@ public static partial class EventGridSystemEventsModelFactory public static Azure.Messaging.EventGrid.SystemEvents.AcsRecordingFileStatusUpdatedEventData AcsRecordingFileStatusUpdatedEventData(Azure.Messaging.EventGrid.SystemEvents.AcsRecordingStorageInfoProperties recordingStorageInfo = null, System.DateTimeOffset? recordingStartTime = default(System.DateTimeOffset?), long? recordingDurationMs = default(long?), Azure.Messaging.EventGrid.SystemEvents.RecordingContentType? recordingContentType = default(Azure.Messaging.EventGrid.SystemEvents.RecordingContentType?), Azure.Messaging.EventGrid.SystemEvents.RecordingChannelType? recordingChannelKind = default(Azure.Messaging.EventGrid.SystemEvents.RecordingChannelType?), Azure.Messaging.EventGrid.SystemEvents.RecordingFormatType? recordingFormatType = default(Azure.Messaging.EventGrid.SystemEvents.RecordingFormatType?), string sessionEndReason = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.AcsRecordingStorageInfoProperties AcsRecordingStorageInfoProperties(System.Collections.Generic.IEnumerable recordingChunks = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.AcsRouterChannelConfiguration AcsRouterChannelConfiguration(string channelId = null, int? capacityCostPerJob = default(int?), int? maxNumberOfJobs = default(int?)) { throw null; } - public static Azure.Messaging.EventGrid.SystemEvents.AcsRouterCommunicationError AcsRouterCommunicationError(string code = null, string message = null, string target = null, Azure.Messaging.EventGrid.SystemEvents.AcsRouterCommunicationError innererror = null, System.Collections.Generic.IEnumerable details = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.AcsRouterCommunicationError AcsRouterCommunicationError(string code = null, string message = null, string target = null, Azure.Messaging.EventGrid.SystemEvents.AcsRouterCommunicationError innererror = null, System.Collections.Generic.IEnumerable errors = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.AcsRouterEventData AcsRouterEventData(string jobId = null, string channelReference = null, string channelId = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.AcsRouterJobCancelledEventData AcsRouterJobCancelledEventData(string jobId = null, string channelReference = null, string channelId = null, string queueId = null, System.Collections.Generic.IReadOnlyDictionary labels = null, System.Collections.Generic.IReadOnlyDictionary tags = null, string note = null, string dispositionCode = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.AcsRouterJobClassificationFailedEventData AcsRouterJobClassificationFailedEventData(string jobId = null, string channelReference = null, string channelId = null, string queueId = null, System.Collections.Generic.IReadOnlyDictionary labels = null, System.Collections.Generic.IReadOnlyDictionary tags = null, string classificationPolicyId = null, System.Collections.Generic.IEnumerable errors = null) { throw null; } @@ -2526,6 +2646,10 @@ public static partial class EventGridSystemEventsModelFactory public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementApiReleaseDeletedEventData ApiManagementApiReleaseDeletedEventData(string resourceUri = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementApiReleaseUpdatedEventData ApiManagementApiReleaseUpdatedEventData(string resourceUri = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementApiUpdatedEventData ApiManagementApiUpdatedEventData(string resourceUri = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementCircuitBreakerClosedEventData ApiManagementCircuitBreakerClosedEventData(string backendName = null, Azure.Messaging.EventGrid.SystemEvents.ApiManagementCircuitBreakerProperties circuitBreaker = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementCircuitBreakerOpenedEventData ApiManagementCircuitBreakerOpenedEventData(string backendName = null, Azure.Messaging.EventGrid.SystemEvents.ApiManagementCircuitBreakerProperties circuitBreaker = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementCircuitBreakerProperties ApiManagementCircuitBreakerProperties(System.Collections.Generic.IReadOnlyDictionary rules = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementExpiredGatewayTokenProperties ApiManagementExpiredGatewayTokenProperties(System.DateTimeOffset expiredAtUtc = default(System.DateTimeOffset)) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayApiAddedEventData ApiManagementGatewayApiAddedEventData(string resourceUri = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayApiRemovedEventData ApiManagementGatewayApiRemovedEventData(string resourceUri = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayCertificateAuthorityCreatedEventData ApiManagementGatewayCertificateAuthorityCreatedEventData(string resourceUri = null) { throw null; } @@ -2536,7 +2660,11 @@ public static partial class EventGridSystemEventsModelFactory public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayHostnameConfigurationCreatedEventData ApiManagementGatewayHostnameConfigurationCreatedEventData(string resourceUri = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayHostnameConfigurationDeletedEventData ApiManagementGatewayHostnameConfigurationDeletedEventData(string resourceUri = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayHostnameConfigurationUpdatedEventData ApiManagementGatewayHostnameConfigurationUpdatedEventData(string resourceUri = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayProperties ApiManagementGatewayProperties(string gatewayId = null, string instanceId = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayTokenExpiredEventData ApiManagementGatewayTokenExpiredEventData(Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayProperties gatewayInfo = null, Azure.Messaging.EventGrid.SystemEvents.ApiManagementExpiredGatewayTokenProperties tokenInfo = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayTokenNearExpiryEventData ApiManagementGatewayTokenNearExpiryEventData(Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayProperties gatewayInfo = null, Azure.Messaging.EventGrid.SystemEvents.ApiManagementNearExpiryGatewayTokenProperties tokenInfo = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayUpdatedEventData ApiManagementGatewayUpdatedEventData(string resourceUri = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementNearExpiryGatewayTokenProperties ApiManagementNearExpiryGatewayTokenProperties(System.DateTimeOffset expiredAtUtc = default(System.DateTimeOffset)) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementProductCreatedEventData ApiManagementProductCreatedEventData(string resourceUri = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementProductDeletedEventData ApiManagementProductDeletedEventData(string resourceUri = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementProductUpdatedEventData ApiManagementProductUpdatedEventData(string resourceUri = null) { throw null; } @@ -2602,6 +2730,7 @@ public static partial class EventGridSystemEventsModelFactory public static Azure.Messaging.EventGrid.SystemEvents.DeviceTwinInfoX509Thumbprint DeviceTwinInfoX509Thumbprint(string primaryThumbprint = null, string secondaryThumbprint = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.DeviceTwinMetadata DeviceTwinMetadata(string lastUpdated = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.DeviceTwinProperties DeviceTwinProperties(Azure.Messaging.EventGrid.SystemEvents.DeviceTwinMetadata metadata = null, float? version = default(float?)) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.EdgeSolutionVersionPublishedEventData EdgeSolutionVersionPublishedEventData(string externalValidationId = null, string targetId = null, string solutionTemplateId = null, string solutionTemplateVersionId = null, string solutionVersionId = null, string apiVersion = null, System.Uri callbackUrl = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.EventGridMqttClientCreatedOrUpdatedEventData EventGridMqttClientCreatedOrUpdatedEventData(string clientAuthenticationName = null, string clientName = null, string namespaceName = null, Azure.Messaging.EventGrid.SystemEvents.EventGridMqttClientState? state = default(Azure.Messaging.EventGrid.SystemEvents.EventGridMqttClientState?), System.DateTimeOffset? createdOn = default(System.DateTimeOffset?), System.DateTimeOffset? updatedOn = default(System.DateTimeOffset?), System.Collections.Generic.IReadOnlyDictionary attributes = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.EventGridMqttClientDeletedEventData EventGridMqttClientDeletedEventData(string clientAuthenticationName = null, string clientName = null, string namespaceName = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.EventGridMqttClientEventData EventGridMqttClientEventData(string clientAuthenticationName = null, string clientName = null, string namespaceName = null) { throw null; } @@ -4427,6 +4556,8 @@ public static partial class SystemEventNames public const string ApiManagementApiReleaseDeleted = "Microsoft.ApiManagement.APIReleaseDeleted"; public const string ApiManagementApiReleaseUpdated = "Microsoft.ApiManagement.APIReleaseUpdated"; public const string ApiManagementApiUpdated = "Microsoft.ApiManagement.APIUpdated"; + public const string ApiManagementCircuitBreakerClosed = "Microsoft.ApiManagement.CircuitBreaker.Closed"; + public const string ApiManagementCircuitBreakerOpened = "Microsoft.ApiManagement.CircuitBreaker.Opened"; public const string ApiManagementGatewayApiAdded = "Microsoft.ApiManagement.GatewayAPIAdded"; public const string ApiManagementGatewayApiRemoved = "Microsoft.ApiManagement.GatewayAPIRemoved"; public const string ApiManagementGatewayCertificateAuthorityCreated = "Microsoft.ApiManagement.GatewayCertificateAuthorityCreated"; @@ -4437,6 +4568,8 @@ public static partial class SystemEventNames public const string ApiManagementGatewayHostnameConfigurationCreated = "Microsoft.ApiManagement.GatewayHostnameConfigurationCreated"; public const string ApiManagementGatewayHostnameConfigurationDeleted = "Microsoft.ApiManagement.GatewayHostnameConfigurationDeleted"; public const string ApiManagementGatewayHostnameConfigurationUpdated = "Microsoft.ApiManagement.GatewayHostnameConfigurationUpdated"; + public const string ApiManagementGatewayTokenExpired = "Microsoft.ApiManagement.GatewayTokenExpired"; + public const string ApiManagementGatewayTokenNearExpiry = "Microsoft.ApiManagement.GatewayTokenNearExpiry"; public const string ApiManagementGatewayUpdated = "Microsoft.ApiManagement.GatewayUpdated"; public const string ApiManagementProductCreated = "Microsoft.ApiManagement.ProductCreated"; public const string ApiManagementProductDeleted = "Microsoft.ApiManagement.ProductDeleted"; @@ -4476,6 +4609,7 @@ public static partial class SystemEventNames public const string DataBoxCopyCompleted = "Microsoft.DataBox.CopyCompleted"; public const string DataBoxCopyStarted = "Microsoft.DataBox.CopyStarted"; public const string DataBoxOrderCompleted = "Microsoft.DataBox.OrderCompleted"; + public const string EdgeSolutionVersionPublished = "Microsoft.Edge.SolutionVersionPublished"; public const string EventGridMqttClientCreatedOrUpdated = "Microsoft.EventGrid.MQTTClientCreatedOrUpdated"; public const string EventGridMqttClientDeleted = "Microsoft.EventGrid.MQTTClientDeleted"; public const string EventGridMqttClientSessionConnected = "Microsoft.EventGrid.MQTTClientSessionConnected"; diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/api/Azure.Messaging.EventGrid.SystemEvents.netstandard2.0.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/api/Azure.Messaging.EventGrid.SystemEvents.netstandard2.0.cs index 7f23a6930a0e..891b8a3381b6 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/api/Azure.Messaging.EventGrid.SystemEvents.netstandard2.0.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/api/Azure.Messaging.EventGrid.SystemEvents.netstandard2.0.cs @@ -671,7 +671,7 @@ public partial class AcsRouterCommunicationError : System.ClientModel.Primitives { internal AcsRouterCommunicationError() { } public string Code { get { throw null; } } - public System.Collections.Generic.IReadOnlyList Details { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Errors { get { throw null; } } public Azure.Messaging.EventGrid.SystemEvents.AcsRouterCommunicationError Innererror { get { throw null; } } public string Message { get { throw null; } } public string Target { get { throw null; } } @@ -1320,6 +1320,62 @@ 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 ApiManagementCircuitBreakerClosedEventData : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal ApiManagementCircuitBreakerClosedEventData() { } + public string BackendName { get { throw null; } } + public Azure.Messaging.EventGrid.SystemEvents.ApiManagementCircuitBreakerProperties CircuitBreaker { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Messaging.EventGrid.SystemEvents.ApiManagementCircuitBreakerClosedEventData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Messaging.EventGrid.SystemEvents.ApiManagementCircuitBreakerClosedEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ApiManagementCircuitBreakerOpenedEventData : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal ApiManagementCircuitBreakerOpenedEventData() { } + public string BackendName { get { throw null; } } + public Azure.Messaging.EventGrid.SystemEvents.ApiManagementCircuitBreakerProperties CircuitBreaker { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Messaging.EventGrid.SystemEvents.ApiManagementCircuitBreakerOpenedEventData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Messaging.EventGrid.SystemEvents.ApiManagementCircuitBreakerOpenedEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ApiManagementCircuitBreakerProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal ApiManagementCircuitBreakerProperties() { } + public System.Collections.Generic.IReadOnlyDictionary Rules { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Messaging.EventGrid.SystemEvents.ApiManagementCircuitBreakerProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Messaging.EventGrid.SystemEvents.ApiManagementCircuitBreakerProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ApiManagementCircuitBreakerPropertiesRule : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal ApiManagementCircuitBreakerPropertiesRule() { } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Messaging.EventGrid.SystemEvents.ApiManagementCircuitBreakerPropertiesRule System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Messaging.EventGrid.SystemEvents.ApiManagementCircuitBreakerPropertiesRule System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ApiManagementExpiredGatewayTokenProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal ApiManagementExpiredGatewayTokenProperties() { } + public System.DateTimeOffset ExpiredAtUtc { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Messaging.EventGrid.SystemEvents.ApiManagementExpiredGatewayTokenProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Messaging.EventGrid.SystemEvents.ApiManagementExpiredGatewayTokenProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class ApiManagementGatewayApiAddedEventData : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal ApiManagementGatewayApiAddedEventData() { } @@ -1430,6 +1486,42 @@ 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 ApiManagementGatewayProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal ApiManagementGatewayProperties() { } + public string GatewayId { get { throw null; } } + public string InstanceId { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ApiManagementGatewayTokenExpiredEventData : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal ApiManagementGatewayTokenExpiredEventData() { } + public Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayProperties GatewayInfo { get { throw null; } } + public Azure.Messaging.EventGrid.SystemEvents.ApiManagementExpiredGatewayTokenProperties TokenInfo { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayTokenExpiredEventData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayTokenExpiredEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ApiManagementGatewayTokenNearExpiryEventData : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal ApiManagementGatewayTokenNearExpiryEventData() { } + public Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayProperties GatewayInfo { get { throw null; } } + public Azure.Messaging.EventGrid.SystemEvents.ApiManagementNearExpiryGatewayTokenProperties TokenInfo { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayTokenNearExpiryEventData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayTokenNearExpiryEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class ApiManagementGatewayUpdatedEventData : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal ApiManagementGatewayUpdatedEventData() { } @@ -1441,6 +1533,17 @@ 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 ApiManagementNearExpiryGatewayTokenProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal ApiManagementNearExpiryGatewayTokenProperties() { } + public System.DateTimeOffset ExpiredAtUtc { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Messaging.EventGrid.SystemEvents.ApiManagementNearExpiryGatewayTokenProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Messaging.EventGrid.SystemEvents.ApiManagementNearExpiryGatewayTokenProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class ApiManagementProductCreatedEventData : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal ApiManagementProductCreatedEventData() { } @@ -2332,6 +2435,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 EdgeSolutionVersionPublishedEventData : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal EdgeSolutionVersionPublishedEventData() { } + public string ApiVersion { get { throw null; } } + public System.Uri CallbackUrl { get { throw null; } } + public string ExternalValidationId { get { throw null; } } + public string SolutionTemplateId { get { throw null; } } + public string SolutionTemplateVersionId { get { throw null; } } + public string SolutionVersionId { get { throw null; } } + public string TargetId { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Messaging.EventGrid.SystemEvents.EdgeSolutionVersionPublishedEventData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Messaging.EventGrid.SystemEvents.EdgeSolutionVersionPublishedEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class EventGridMqttClientCreatedOrUpdatedEventData : Azure.Messaging.EventGrid.SystemEvents.EventGridMqttClientEventData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal EventGridMqttClientCreatedOrUpdatedEventData() { } @@ -2484,7 +2604,7 @@ public static partial class EventGridSystemEventsModelFactory public static Azure.Messaging.EventGrid.SystemEvents.AcsRecordingFileStatusUpdatedEventData AcsRecordingFileStatusUpdatedEventData(Azure.Messaging.EventGrid.SystemEvents.AcsRecordingStorageInfoProperties recordingStorageInfo = null, System.DateTimeOffset? recordingStartTime = default(System.DateTimeOffset?), long? recordingDurationMs = default(long?), Azure.Messaging.EventGrid.SystemEvents.RecordingContentType? recordingContentType = default(Azure.Messaging.EventGrid.SystemEvents.RecordingContentType?), Azure.Messaging.EventGrid.SystemEvents.RecordingChannelType? recordingChannelKind = default(Azure.Messaging.EventGrid.SystemEvents.RecordingChannelType?), Azure.Messaging.EventGrid.SystemEvents.RecordingFormatType? recordingFormatType = default(Azure.Messaging.EventGrid.SystemEvents.RecordingFormatType?), string sessionEndReason = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.AcsRecordingStorageInfoProperties AcsRecordingStorageInfoProperties(System.Collections.Generic.IEnumerable recordingChunks = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.AcsRouterChannelConfiguration AcsRouterChannelConfiguration(string channelId = null, int? capacityCostPerJob = default(int?), int? maxNumberOfJobs = default(int?)) { throw null; } - public static Azure.Messaging.EventGrid.SystemEvents.AcsRouterCommunicationError AcsRouterCommunicationError(string code = null, string message = null, string target = null, Azure.Messaging.EventGrid.SystemEvents.AcsRouterCommunicationError innererror = null, System.Collections.Generic.IEnumerable details = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.AcsRouterCommunicationError AcsRouterCommunicationError(string code = null, string message = null, string target = null, Azure.Messaging.EventGrid.SystemEvents.AcsRouterCommunicationError innererror = null, System.Collections.Generic.IEnumerable errors = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.AcsRouterEventData AcsRouterEventData(string jobId = null, string channelReference = null, string channelId = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.AcsRouterJobCancelledEventData AcsRouterJobCancelledEventData(string jobId = null, string channelReference = null, string channelId = null, string queueId = null, System.Collections.Generic.IReadOnlyDictionary labels = null, System.Collections.Generic.IReadOnlyDictionary tags = null, string note = null, string dispositionCode = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.AcsRouterJobClassificationFailedEventData AcsRouterJobClassificationFailedEventData(string jobId = null, string channelReference = null, string channelId = null, string queueId = null, System.Collections.Generic.IReadOnlyDictionary labels = null, System.Collections.Generic.IReadOnlyDictionary tags = null, string classificationPolicyId = null, System.Collections.Generic.IEnumerable errors = null) { throw null; } @@ -2526,6 +2646,10 @@ public static partial class EventGridSystemEventsModelFactory public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementApiReleaseDeletedEventData ApiManagementApiReleaseDeletedEventData(string resourceUri = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementApiReleaseUpdatedEventData ApiManagementApiReleaseUpdatedEventData(string resourceUri = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementApiUpdatedEventData ApiManagementApiUpdatedEventData(string resourceUri = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementCircuitBreakerClosedEventData ApiManagementCircuitBreakerClosedEventData(string backendName = null, Azure.Messaging.EventGrid.SystemEvents.ApiManagementCircuitBreakerProperties circuitBreaker = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementCircuitBreakerOpenedEventData ApiManagementCircuitBreakerOpenedEventData(string backendName = null, Azure.Messaging.EventGrid.SystemEvents.ApiManagementCircuitBreakerProperties circuitBreaker = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementCircuitBreakerProperties ApiManagementCircuitBreakerProperties(System.Collections.Generic.IReadOnlyDictionary rules = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementExpiredGatewayTokenProperties ApiManagementExpiredGatewayTokenProperties(System.DateTimeOffset expiredAtUtc = default(System.DateTimeOffset)) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayApiAddedEventData ApiManagementGatewayApiAddedEventData(string resourceUri = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayApiRemovedEventData ApiManagementGatewayApiRemovedEventData(string resourceUri = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayCertificateAuthorityCreatedEventData ApiManagementGatewayCertificateAuthorityCreatedEventData(string resourceUri = null) { throw null; } @@ -2536,7 +2660,11 @@ public static partial class EventGridSystemEventsModelFactory public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayHostnameConfigurationCreatedEventData ApiManagementGatewayHostnameConfigurationCreatedEventData(string resourceUri = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayHostnameConfigurationDeletedEventData ApiManagementGatewayHostnameConfigurationDeletedEventData(string resourceUri = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayHostnameConfigurationUpdatedEventData ApiManagementGatewayHostnameConfigurationUpdatedEventData(string resourceUri = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayProperties ApiManagementGatewayProperties(string gatewayId = null, string instanceId = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayTokenExpiredEventData ApiManagementGatewayTokenExpiredEventData(Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayProperties gatewayInfo = null, Azure.Messaging.EventGrid.SystemEvents.ApiManagementExpiredGatewayTokenProperties tokenInfo = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayTokenNearExpiryEventData ApiManagementGatewayTokenNearExpiryEventData(Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayProperties gatewayInfo = null, Azure.Messaging.EventGrid.SystemEvents.ApiManagementNearExpiryGatewayTokenProperties tokenInfo = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayUpdatedEventData ApiManagementGatewayUpdatedEventData(string resourceUri = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementNearExpiryGatewayTokenProperties ApiManagementNearExpiryGatewayTokenProperties(System.DateTimeOffset expiredAtUtc = default(System.DateTimeOffset)) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementProductCreatedEventData ApiManagementProductCreatedEventData(string resourceUri = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementProductDeletedEventData ApiManagementProductDeletedEventData(string resourceUri = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementProductUpdatedEventData ApiManagementProductUpdatedEventData(string resourceUri = null) { throw null; } @@ -2602,6 +2730,7 @@ public static partial class EventGridSystemEventsModelFactory public static Azure.Messaging.EventGrid.SystemEvents.DeviceTwinInfoX509Thumbprint DeviceTwinInfoX509Thumbprint(string primaryThumbprint = null, string secondaryThumbprint = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.DeviceTwinMetadata DeviceTwinMetadata(string lastUpdated = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.DeviceTwinProperties DeviceTwinProperties(Azure.Messaging.EventGrid.SystemEvents.DeviceTwinMetadata metadata = null, float? version = default(float?)) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.EdgeSolutionVersionPublishedEventData EdgeSolutionVersionPublishedEventData(string externalValidationId = null, string targetId = null, string solutionTemplateId = null, string solutionTemplateVersionId = null, string solutionVersionId = null, string apiVersion = null, System.Uri callbackUrl = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.EventGridMqttClientCreatedOrUpdatedEventData EventGridMqttClientCreatedOrUpdatedEventData(string clientAuthenticationName = null, string clientName = null, string namespaceName = null, Azure.Messaging.EventGrid.SystemEvents.EventGridMqttClientState? state = default(Azure.Messaging.EventGrid.SystemEvents.EventGridMqttClientState?), System.DateTimeOffset? createdOn = default(System.DateTimeOffset?), System.DateTimeOffset? updatedOn = default(System.DateTimeOffset?), System.Collections.Generic.IReadOnlyDictionary attributes = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.EventGridMqttClientDeletedEventData EventGridMqttClientDeletedEventData(string clientAuthenticationName = null, string clientName = null, string namespaceName = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.EventGridMqttClientEventData EventGridMqttClientEventData(string clientAuthenticationName = null, string clientName = null, string namespaceName = null) { throw null; } @@ -4427,6 +4556,8 @@ public static partial class SystemEventNames public const string ApiManagementApiReleaseDeleted = "Microsoft.ApiManagement.APIReleaseDeleted"; public const string ApiManagementApiReleaseUpdated = "Microsoft.ApiManagement.APIReleaseUpdated"; public const string ApiManagementApiUpdated = "Microsoft.ApiManagement.APIUpdated"; + public const string ApiManagementCircuitBreakerClosed = "Microsoft.ApiManagement.CircuitBreaker.Closed"; + public const string ApiManagementCircuitBreakerOpened = "Microsoft.ApiManagement.CircuitBreaker.Opened"; public const string ApiManagementGatewayApiAdded = "Microsoft.ApiManagement.GatewayAPIAdded"; public const string ApiManagementGatewayApiRemoved = "Microsoft.ApiManagement.GatewayAPIRemoved"; public const string ApiManagementGatewayCertificateAuthorityCreated = "Microsoft.ApiManagement.GatewayCertificateAuthorityCreated"; @@ -4437,6 +4568,8 @@ public static partial class SystemEventNames public const string ApiManagementGatewayHostnameConfigurationCreated = "Microsoft.ApiManagement.GatewayHostnameConfigurationCreated"; public const string ApiManagementGatewayHostnameConfigurationDeleted = "Microsoft.ApiManagement.GatewayHostnameConfigurationDeleted"; public const string ApiManagementGatewayHostnameConfigurationUpdated = "Microsoft.ApiManagement.GatewayHostnameConfigurationUpdated"; + public const string ApiManagementGatewayTokenExpired = "Microsoft.ApiManagement.GatewayTokenExpired"; + public const string ApiManagementGatewayTokenNearExpiry = "Microsoft.ApiManagement.GatewayTokenNearExpiry"; public const string ApiManagementGatewayUpdated = "Microsoft.ApiManagement.GatewayUpdated"; public const string ApiManagementProductCreated = "Microsoft.ApiManagement.ProductCreated"; public const string ApiManagementProductDeleted = "Microsoft.ApiManagement.ProductDeleted"; @@ -4476,6 +4609,7 @@ public static partial class SystemEventNames public const string DataBoxCopyCompleted = "Microsoft.DataBox.CopyCompleted"; public const string DataBoxCopyStarted = "Microsoft.DataBox.CopyStarted"; public const string DataBoxOrderCompleted = "Microsoft.DataBox.OrderCompleted"; + public const string EdgeSolutionVersionPublished = "Microsoft.Edge.SolutionVersionPublished"; public const string EventGridMqttClientCreatedOrUpdated = "Microsoft.EventGrid.MQTTClientCreatedOrUpdated"; public const string EventGridMqttClientDeleted = "Microsoft.EventGrid.MQTTClientDeleted"; public const string EventGridMqttClientSessionConnected = "Microsoft.EventGrid.MQTTClientSessionConnected"; diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatThreadCreatedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatThreadCreatedEventData.Serialization.cs index 1d2f41eccb9d..bee320c9cb18 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatThreadCreatedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatThreadCreatedEventData.Serialization.cs @@ -65,13 +65,16 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WriteStringValue(item.Value); } writer.WriteEndObject(); - writer.WritePropertyName("participants"u8); - writer.WriteStartArray(); - foreach (var item in Participants) + if (options.Format != "W") { - writer.WriteObjectValue(item, options); + writer.WritePropertyName("participants"u8); + writer.WriteStartArray(); + foreach (var item in Participants) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); } - writer.WriteEndArray(); } AcsChatThreadCreatedEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatThreadCreatedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatThreadCreatedEventData.cs index dd366f600f08..b90aee3ecdf0 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatThreadCreatedEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatThreadCreatedEventData.cs @@ -7,7 +7,6 @@ using System; using System.Collections.Generic; -using System.Linq; namespace Azure.Messaging.EventGrid.SystemEvents { @@ -18,19 +17,17 @@ public partial class AcsChatThreadCreatedEventData : AcsChatThreadEventInThreadB /// The communication identifier of the user who created the thread. /// The thread properties. /// The thread metadata. - /// The list of properties of participants who are part of the thread. - /// , , or is null. - internal AcsChatThreadCreatedEventData(CommunicationIdentifierModel createdByCommunicationIdentifier, IReadOnlyDictionary properties, IReadOnlyDictionary metadata, IEnumerable participants) + /// , or is null. + internal AcsChatThreadCreatedEventData(CommunicationIdentifierModel createdByCommunicationIdentifier, IReadOnlyDictionary properties, IReadOnlyDictionary metadata) { Argument.AssertNotNull(createdByCommunicationIdentifier, nameof(createdByCommunicationIdentifier)); Argument.AssertNotNull(properties, nameof(properties)); Argument.AssertNotNull(metadata, nameof(metadata)); - Argument.AssertNotNull(participants, nameof(participants)); CreatedByCommunicationIdentifier = createdByCommunicationIdentifier; Properties = properties; Metadata = metadata; - Participants = participants.ToList(); + Participants = new ChangeTrackingList(); } /// Initializes a new instance of . diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatThreadCreatedWithUserEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatThreadCreatedWithUserEventData.Serialization.cs index 16c92dd38cd7..9bb3973a81ae 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatThreadCreatedWithUserEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatThreadCreatedWithUserEventData.Serialization.cs @@ -65,13 +65,16 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WriteStringValue(item.Value); } writer.WriteEndObject(); - writer.WritePropertyName("participants"u8); - writer.WriteStartArray(); - foreach (var item in Participants) + if (options.Format != "W") { - writer.WriteObjectValue(item, options); + writer.WritePropertyName("participants"u8); + writer.WriteStartArray(); + foreach (var item in Participants) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); } - writer.WriteEndArray(); } AcsChatThreadCreatedWithUserEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatThreadCreatedWithUserEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatThreadCreatedWithUserEventData.cs index 428a332bf9a3..547fa1fee167 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatThreadCreatedWithUserEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatThreadCreatedWithUserEventData.cs @@ -7,7 +7,6 @@ using System; using System.Collections.Generic; -using System.Linq; namespace Azure.Messaging.EventGrid.SystemEvents { @@ -19,20 +18,18 @@ public partial class AcsChatThreadCreatedWithUserEventData : AcsChatThreadEventB /// The communication identifier of the user who created the thread. /// The thread properties. /// The thread metadata. - /// The list of properties of participants who are part of the thread. - /// , , , or is null. - internal AcsChatThreadCreatedWithUserEventData(CommunicationIdentifierModel recipientCommunicationIdentifier, CommunicationIdentifierModel createdByCommunicationIdentifier, IReadOnlyDictionary properties, IReadOnlyDictionary metadata, IEnumerable participants) : base(recipientCommunicationIdentifier) + /// , , or is null. + internal AcsChatThreadCreatedWithUserEventData(CommunicationIdentifierModel recipientCommunicationIdentifier, CommunicationIdentifierModel createdByCommunicationIdentifier, IReadOnlyDictionary properties, IReadOnlyDictionary metadata) : base(recipientCommunicationIdentifier) { Argument.AssertNotNull(recipientCommunicationIdentifier, nameof(recipientCommunicationIdentifier)); Argument.AssertNotNull(createdByCommunicationIdentifier, nameof(createdByCommunicationIdentifier)); Argument.AssertNotNull(properties, nameof(properties)); Argument.AssertNotNull(metadata, nameof(metadata)); - Argument.AssertNotNull(participants, nameof(participants)); CreatedByCommunicationIdentifier = createdByCommunicationIdentifier; Properties = properties; Metadata = metadata; - Participants = participants.ToList(); + Participants = new ChangeTrackingList(); } /// Initializes a new instance of . diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRecordingStorageInfoProperties.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRecordingStorageInfoProperties.Serialization.cs index 5e37e1e382e7..0978d7eee5ff 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRecordingStorageInfoProperties.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRecordingStorageInfoProperties.Serialization.cs @@ -34,13 +34,16 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(AcsRecordingStorageInfoProperties)} does not support writing '{format}' format."); } - writer.WritePropertyName("recordingChunks"u8); - writer.WriteStartArray(); - foreach (var item in RecordingChunks) + if (options.Format != "W") { - writer.WriteObjectValue(item, options); + writer.WritePropertyName("recordingChunks"u8); + writer.WriteStartArray(); + foreach (var item in RecordingChunks) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); } - writer.WriteEndArray(); if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRecordingStorageInfoProperties.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRecordingStorageInfoProperties.cs index bc7b2ef0b31b..44b951440b82 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRecordingStorageInfoProperties.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRecordingStorageInfoProperties.cs @@ -7,7 +7,6 @@ using System; using System.Collections.Generic; -using System.Linq; namespace Azure.Messaging.EventGrid.SystemEvents { @@ -47,13 +46,9 @@ public partial class AcsRecordingStorageInfoProperties private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - /// List of details of recording chunks information. - /// is null. - internal AcsRecordingStorageInfoProperties(IEnumerable recordingChunks) + internal AcsRecordingStorageInfoProperties() { - Argument.AssertNotNull(recordingChunks, nameof(recordingChunks)); - - RecordingChunks = recordingChunks.ToList(); + RecordingChunks = new ChangeTrackingList(); } /// Initializes a new instance of . @@ -65,11 +60,6 @@ internal AcsRecordingStorageInfoProperties(IReadOnlyList Initializes a new instance of for deserialization. - internal AcsRecordingStorageInfoProperties() - { - } - /// List of details of recording chunks information. public IReadOnlyList RecordingChunks { get; } } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterCommunicationError.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterCommunicationError.Serialization.cs index c93ea165e906..339c86dd1bc2 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterCommunicationError.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterCommunicationError.Serialization.cs @@ -51,13 +51,16 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } writer.WritePropertyName("innererror"u8); writer.WriteObjectValue(Innererror, options); - writer.WritePropertyName("details"u8); - writer.WriteStartArray(); - foreach (var item in Details) + if (options.Format != "W") { - writer.WriteObjectValue(item, options); + writer.WritePropertyName("errors"u8); + writer.WriteStartArray(); + foreach (var item in Errors) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); } - writer.WriteEndArray(); if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -99,7 +102,7 @@ internal static AcsRouterCommunicationError DeserializeAcsRouterCommunicationErr string message = default; string target = default; AcsRouterCommunicationError innererror = default; - IReadOnlyList details = default; + IReadOnlyList errors = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -124,14 +127,14 @@ internal static AcsRouterCommunicationError DeserializeAcsRouterCommunicationErr innererror = DeserializeAcsRouterCommunicationError(property.Value, options); continue; } - if (property.NameEquals("details"u8)) + if (property.NameEquals("errors"u8)) { List array = new List(); foreach (var item in property.Value.EnumerateArray()) { array.Add(DeserializeAcsRouterCommunicationError(item, options)); } - details = array; + errors = array; continue; } if (options.Format != "W") @@ -145,7 +148,7 @@ internal static AcsRouterCommunicationError DeserializeAcsRouterCommunicationErr message, target, innererror, - details, + errors, serializedAdditionalRawData); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterCommunicationError.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterCommunicationError.cs index 35ae98ef1222..2da16727de35 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterCommunicationError.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterCommunicationError.cs @@ -7,7 +7,6 @@ using System; using System.Collections.Generic; -using System.Linq; namespace Azure.Messaging.EventGrid.SystemEvents { @@ -48,15 +47,13 @@ public partial class AcsRouterCommunicationError /// Initializes a new instance of . /// Router Communication Inner Error. - /// List of Router Communication Errors. - /// or is null. - internal AcsRouterCommunicationError(AcsRouterCommunicationError innererror, IEnumerable details) + /// is null. + internal AcsRouterCommunicationError(AcsRouterCommunicationError innererror) { Argument.AssertNotNull(innererror, nameof(innererror)); - Argument.AssertNotNull(details, nameof(details)); Innererror = innererror; - Details = details.ToList(); + Errors = new ChangeTrackingList(); } /// Initializes a new instance of . @@ -64,15 +61,15 @@ internal AcsRouterCommunicationError(AcsRouterCommunicationError innererror, IEn /// Router Communication Error Message. /// Router Communication Error Target. /// Router Communication Inner Error. - /// List of Router Communication Errors. + /// List of Router Communication Errors. /// Keeps track of any properties unknown to the library. - internal AcsRouterCommunicationError(string code, string message, string target, AcsRouterCommunicationError innererror, IReadOnlyList details, IDictionary serializedAdditionalRawData) + internal AcsRouterCommunicationError(string code, string message, string target, AcsRouterCommunicationError innererror, IReadOnlyList errors, IDictionary serializedAdditionalRawData) { Code = code; Message = message; Target = target; Innererror = innererror; - Details = details; + Errors = errors; _serializedAdditionalRawData = serializedAdditionalRawData; } @@ -90,6 +87,6 @@ internal AcsRouterCommunicationError() /// Router Communication Inner Error. public AcsRouterCommunicationError Innererror { get; } /// List of Router Communication Errors. - public IReadOnlyList Details { get; } + public IReadOnlyList Errors { get; } } } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobClassificationFailedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobClassificationFailedEventData.Serialization.cs index 746dd05809bb..d7404d16d811 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobClassificationFailedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobClassificationFailedEventData.Serialization.cs @@ -40,13 +40,16 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("classificationPolicyId"u8); writer.WriteStringValue(ClassificationPolicyId); } - writer.WritePropertyName("errors"u8); - writer.WriteStartArray(); - foreach (var item in Errors) + if (options.Format != "W") { - writer.WriteObjectValue(item, options); + writer.WritePropertyName("errors"u8); + writer.WriteStartArray(); + foreach (var item in Errors) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); } - writer.WriteEndArray(); } AcsRouterJobClassificationFailedEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobClassificationFailedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobClassificationFailedEventData.cs index 0dde294286a4..abb7f6850287 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobClassificationFailedEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobClassificationFailedEventData.cs @@ -7,7 +7,6 @@ using System; using System.Collections.Generic; -using System.Linq; namespace Azure.Messaging.EventGrid.SystemEvents { @@ -17,15 +16,13 @@ public partial class AcsRouterJobClassificationFailedEventData : AcsRouterJobEve /// Initializes a new instance of . /// Router Job events Labels. /// Router Jobs events Tags. - /// Router Job Classification Failed Errors. - /// , or is null. - internal AcsRouterJobClassificationFailedEventData(IReadOnlyDictionary labels, IReadOnlyDictionary tags, IEnumerable errors) : base(labels, tags) + /// or is null. + internal AcsRouterJobClassificationFailedEventData(IReadOnlyDictionary labels, IReadOnlyDictionary tags) : base(labels, tags) { Argument.AssertNotNull(labels, nameof(labels)); Argument.AssertNotNull(tags, nameof(tags)); - Argument.AssertNotNull(errors, nameof(errors)); - Errors = errors.ToList(); + Errors = new ChangeTrackingList(); } /// Initializes a new instance of . diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobClassifiedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobClassifiedEventData.Serialization.cs index 23af6c30876d..2270f32db013 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobClassifiedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobClassifiedEventData.Serialization.cs @@ -47,13 +47,16 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("priority"u8); writer.WriteNumberValue(Priority.Value); } - writer.WritePropertyName("attachedWorkerSelectors"u8); - writer.WriteStartArray(); - foreach (var item in AttachedWorkerSelectors) + if (options.Format != "W") { - writer.WriteObjectValue(item, options); + writer.WritePropertyName("attachedWorkerSelectors"u8); + writer.WriteStartArray(); + foreach (var item in AttachedWorkerSelectors) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); } - writer.WriteEndArray(); } AcsRouterJobClassifiedEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobClassifiedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobClassifiedEventData.cs index db2dbdd50165..6c87513cd751 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobClassifiedEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobClassifiedEventData.cs @@ -7,7 +7,6 @@ using System; using System.Collections.Generic; -using System.Linq; namespace Azure.Messaging.EventGrid.SystemEvents { @@ -18,17 +17,15 @@ public partial class AcsRouterJobClassifiedEventData : AcsRouterJobEventData /// Router Job events Labels. /// Router Jobs events Tags. /// Router Job Queue Info. - /// Router Job Attached Worker Selector. - /// , , or is null. - internal AcsRouterJobClassifiedEventData(IReadOnlyDictionary labels, IReadOnlyDictionary tags, AcsRouterQueueDetails queueDetails, IEnumerable attachedWorkerSelectors) : base(labels, tags) + /// , or is null. + internal AcsRouterJobClassifiedEventData(IReadOnlyDictionary labels, IReadOnlyDictionary tags, AcsRouterQueueDetails queueDetails) : base(labels, tags) { Argument.AssertNotNull(labels, nameof(labels)); Argument.AssertNotNull(tags, nameof(tags)); Argument.AssertNotNull(queueDetails, nameof(queueDetails)); - Argument.AssertNotNull(attachedWorkerSelectors, nameof(attachedWorkerSelectors)); QueueDetails = queueDetails; - AttachedWorkerSelectors = attachedWorkerSelectors.ToList(); + AttachedWorkerSelectors = new ChangeTrackingList(); } /// Initializes a new instance of . diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobQueuedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobQueuedEventData.Serialization.cs index c4c0b804fa00..5ea1915b1378 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobQueuedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobQueuedEventData.Serialization.cs @@ -40,20 +40,26 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("priority"u8); writer.WriteNumberValue(Priority.Value); } - writer.WritePropertyName("attachedWorkerSelectors"u8); - writer.WriteStartArray(); - foreach (var item in AttachedWorkerSelectors) + if (options.Format != "W") { - writer.WriteObjectValue(item, options); + writer.WritePropertyName("attachedWorkerSelectors"u8); + writer.WriteStartArray(); + foreach (var item in AttachedWorkerSelectors) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); } - writer.WriteEndArray(); - writer.WritePropertyName("requestedWorkerSelectors"u8); - writer.WriteStartArray(); - foreach (var item in RequestedWorkerSelectors) + if (options.Format != "W") { - writer.WriteObjectValue(item, options); + writer.WritePropertyName("requestedWorkerSelectors"u8); + writer.WriteStartArray(); + foreach (var item in RequestedWorkerSelectors) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); } - writer.WriteEndArray(); } AcsRouterJobQueuedEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobQueuedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobQueuedEventData.cs index ac701da4ca38..6d1a918f7236 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobQueuedEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobQueuedEventData.cs @@ -7,7 +7,6 @@ using System; using System.Collections.Generic; -using System.Linq; namespace Azure.Messaging.EventGrid.SystemEvents { @@ -17,18 +16,14 @@ public partial class AcsRouterJobQueuedEventData : AcsRouterJobEventData /// Initializes a new instance of . /// Router Job events Labels. /// Router Jobs events Tags. - /// Router Job Queued Attached Worker Selector. - /// Router Job Queued Requested Worker Selector. - /// , , or is null. - internal AcsRouterJobQueuedEventData(IReadOnlyDictionary labels, IReadOnlyDictionary tags, IEnumerable attachedWorkerSelectors, IEnumerable requestedWorkerSelectors) : base(labels, tags) + /// or is null. + internal AcsRouterJobQueuedEventData(IReadOnlyDictionary labels, IReadOnlyDictionary tags) : base(labels, tags) { Argument.AssertNotNull(labels, nameof(labels)); Argument.AssertNotNull(tags, nameof(tags)); - Argument.AssertNotNull(attachedWorkerSelectors, nameof(attachedWorkerSelectors)); - Argument.AssertNotNull(requestedWorkerSelectors, nameof(requestedWorkerSelectors)); - AttachedWorkerSelectors = attachedWorkerSelectors.ToList(); - RequestedWorkerSelectors = requestedWorkerSelectors.ToList(); + AttachedWorkerSelectors = new ChangeTrackingList(); + RequestedWorkerSelectors = new ChangeTrackingList(); } /// Initializes a new instance of . diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobReceivedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobReceivedEventData.Serialization.cs index c55280894954..02fb499b8d0b 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobReceivedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobReceivedEventData.Serialization.cs @@ -50,13 +50,16 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("priority"u8); writer.WriteNumberValue(Priority.Value); } - writer.WritePropertyName("requestedWorkerSelectors"u8); - writer.WriteStartArray(); - foreach (var item in RequestedWorkerSelectors) + if (options.Format != "W") { - writer.WriteObjectValue(item, options); + writer.WritePropertyName("requestedWorkerSelectors"u8); + writer.WriteStartArray(); + foreach (var item in RequestedWorkerSelectors) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); } - writer.WriteEndArray(); if (Optional.IsDefined(ScheduledOn)) { writer.WritePropertyName("scheduledOn"u8); diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobReceivedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobReceivedEventData.cs index e13d3fb3647b..6df1c998602d 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobReceivedEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobReceivedEventData.cs @@ -7,7 +7,6 @@ using System; using System.Collections.Generic; -using System.Linq; namespace Azure.Messaging.EventGrid.SystemEvents { @@ -17,16 +16,14 @@ public partial class AcsRouterJobReceivedEventData : AcsRouterJobEventData /// Initializes a new instance of . /// Router Job events Labels. /// Router Jobs events Tags. - /// Router Job Received Requested Worker Selectors. /// Unavailable For Matching for Router Job Received. - /// , or is null. - internal AcsRouterJobReceivedEventData(IReadOnlyDictionary labels, IReadOnlyDictionary tags, IEnumerable requestedWorkerSelectors, bool unavailableForMatching) : base(labels, tags) + /// or is null. + internal AcsRouterJobReceivedEventData(IReadOnlyDictionary labels, IReadOnlyDictionary tags, bool unavailableForMatching) : base(labels, tags) { Argument.AssertNotNull(labels, nameof(labels)); Argument.AssertNotNull(tags, nameof(tags)); - Argument.AssertNotNull(requestedWorkerSelectors, nameof(requestedWorkerSelectors)); - RequestedWorkerSelectors = requestedWorkerSelectors.ToList(); + RequestedWorkerSelectors = new ChangeTrackingList(); UnavailableForMatching = unavailableForMatching; } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobSchedulingFailedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobSchedulingFailedEventData.Serialization.cs index 12a1e2bced8c..8cbf47d749ce 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobSchedulingFailedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobSchedulingFailedEventData.Serialization.cs @@ -40,20 +40,26 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("priority"u8); writer.WriteNumberValue(Priority.Value); } - writer.WritePropertyName("expiredAttachedWorkerSelectors"u8); - writer.WriteStartArray(); - foreach (var item in ExpiredAttachedWorkerSelectors) + if (options.Format != "W") { - writer.WriteObjectValue(item, options); + writer.WritePropertyName("expiredAttachedWorkerSelectors"u8); + writer.WriteStartArray(); + foreach (var item in ExpiredAttachedWorkerSelectors) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); } - writer.WriteEndArray(); - writer.WritePropertyName("expiredRequestedWorkerSelectors"u8); - writer.WriteStartArray(); - foreach (var item in ExpiredRequestedWorkerSelectors) + if (options.Format != "W") { - writer.WriteObjectValue(item, options); + writer.WritePropertyName("expiredRequestedWorkerSelectors"u8); + writer.WriteStartArray(); + foreach (var item in ExpiredRequestedWorkerSelectors) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); } - writer.WriteEndArray(); if (Optional.IsDefined(ScheduledOn)) { writer.WritePropertyName("scheduledOn"u8); diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobSchedulingFailedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobSchedulingFailedEventData.cs index 2f38f8a6466d..603602f62c5b 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobSchedulingFailedEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobSchedulingFailedEventData.cs @@ -7,7 +7,6 @@ using System; using System.Collections.Generic; -using System.Linq; namespace Azure.Messaging.EventGrid.SystemEvents { @@ -17,18 +16,14 @@ public partial class AcsRouterJobSchedulingFailedEventData : AcsRouterJobEventDa /// Initializes a new instance of . /// Router Job events Labels. /// Router Jobs events Tags. - /// Router Job Scheduling Failed Attached Worker Selector Expired. - /// Router Job Scheduling Failed Requested Worker Selector Expired. - /// , , or is null. - internal AcsRouterJobSchedulingFailedEventData(IReadOnlyDictionary labels, IReadOnlyDictionary tags, IEnumerable expiredAttachedWorkerSelectors, IEnumerable expiredRequestedWorkerSelectors) : base(labels, tags) + /// or is null. + internal AcsRouterJobSchedulingFailedEventData(IReadOnlyDictionary labels, IReadOnlyDictionary tags) : base(labels, tags) { Argument.AssertNotNull(labels, nameof(labels)); Argument.AssertNotNull(tags, nameof(tags)); - Argument.AssertNotNull(expiredAttachedWorkerSelectors, nameof(expiredAttachedWorkerSelectors)); - Argument.AssertNotNull(expiredRequestedWorkerSelectors, nameof(expiredRequestedWorkerSelectors)); - ExpiredAttachedWorkerSelectors = expiredAttachedWorkerSelectors.ToList(); - ExpiredRequestedWorkerSelectors = expiredRequestedWorkerSelectors.ToList(); + ExpiredAttachedWorkerSelectors = new ChangeTrackingList(); + ExpiredRequestedWorkerSelectors = new ChangeTrackingList(); } /// Initializes a new instance of . diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobWaitingForActivationEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobWaitingForActivationEventData.Serialization.cs index 09049dea8fe9..9a2453e91bc1 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobWaitingForActivationEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobWaitingForActivationEventData.Serialization.cs @@ -40,20 +40,26 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("priority"u8); writer.WriteNumberValue(Priority.Value); } - writer.WritePropertyName("expiredAttachedWorkerSelectors"u8); - writer.WriteStartArray(); - foreach (var item in ExpiredAttachedWorkerSelectors) + if (options.Format != "W") { - writer.WriteObjectValue(item, options); + writer.WritePropertyName("expiredAttachedWorkerSelectors"u8); + writer.WriteStartArray(); + foreach (var item in ExpiredAttachedWorkerSelectors) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); } - writer.WriteEndArray(); - writer.WritePropertyName("expiredRequestedWorkerSelectors"u8); - writer.WriteStartArray(); - foreach (var item in ExpiredRequestedWorkerSelectors) + if (options.Format != "W") { - writer.WriteObjectValue(item, options); + writer.WritePropertyName("expiredRequestedWorkerSelectors"u8); + writer.WriteStartArray(); + foreach (var item in ExpiredRequestedWorkerSelectors) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); } - writer.WriteEndArray(); if (Optional.IsDefined(ScheduledOn)) { writer.WritePropertyName("scheduledOn"u8); diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobWaitingForActivationEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobWaitingForActivationEventData.cs index df1a3085421f..8c6ba6351ed6 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobWaitingForActivationEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobWaitingForActivationEventData.cs @@ -7,7 +7,6 @@ using System; using System.Collections.Generic; -using System.Linq; namespace Azure.Messaging.EventGrid.SystemEvents { @@ -17,19 +16,15 @@ public partial class AcsRouterJobWaitingForActivationEventData : AcsRouterJobEve /// Initializes a new instance of . /// Router Job events Labels. /// Router Jobs events Tags. - /// Router Job Waiting For Activation Worker Selector Expired. - /// Router Job Waiting For Activation Requested Worker Selector Expired. /// Router Job Waiting For Activation Unavailable For Matching. - /// , , or is null. - internal AcsRouterJobWaitingForActivationEventData(IReadOnlyDictionary labels, IReadOnlyDictionary tags, IEnumerable expiredAttachedWorkerSelectors, IEnumerable expiredRequestedWorkerSelectors, bool unavailableForMatching) : base(labels, tags) + /// or is null. + internal AcsRouterJobWaitingForActivationEventData(IReadOnlyDictionary labels, IReadOnlyDictionary tags, bool unavailableForMatching) : base(labels, tags) { Argument.AssertNotNull(labels, nameof(labels)); Argument.AssertNotNull(tags, nameof(tags)); - Argument.AssertNotNull(expiredAttachedWorkerSelectors, nameof(expiredAttachedWorkerSelectors)); - Argument.AssertNotNull(expiredRequestedWorkerSelectors, nameof(expiredRequestedWorkerSelectors)); - ExpiredAttachedWorkerSelectors = expiredAttachedWorkerSelectors.ToList(); - ExpiredRequestedWorkerSelectors = expiredRequestedWorkerSelectors.ToList(); + ExpiredAttachedWorkerSelectors = new ChangeTrackingList(); + ExpiredRequestedWorkerSelectors = new ChangeTrackingList(); UnavailableForMatching = unavailableForMatching; } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobWorkerSelectorsExpiredEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobWorkerSelectorsExpiredEventData.Serialization.cs index 8979776c9f62..6daf98b196d6 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobWorkerSelectorsExpiredEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobWorkerSelectorsExpiredEventData.Serialization.cs @@ -35,20 +35,26 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri } base.JsonModelWriteCore(writer, options); - writer.WritePropertyName("expiredRequestedWorkerSelectors"u8); - writer.WriteStartArray(); - foreach (var item in ExpiredRequestedWorkerSelectors) + if (options.Format != "W") { - writer.WriteObjectValue(item, options); + writer.WritePropertyName("expiredRequestedWorkerSelectors"u8); + writer.WriteStartArray(); + foreach (var item in ExpiredRequestedWorkerSelectors) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); } - writer.WriteEndArray(); - writer.WritePropertyName("expiredAttachedWorkerSelectors"u8); - writer.WriteStartArray(); - foreach (var item in ExpiredAttachedWorkerSelectors) + if (options.Format != "W") { - writer.WriteObjectValue(item, options); + writer.WritePropertyName("expiredAttachedWorkerSelectors"u8); + writer.WriteStartArray(); + foreach (var item in ExpiredAttachedWorkerSelectors) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); } - writer.WriteEndArray(); } AcsRouterJobWorkerSelectorsExpiredEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobWorkerSelectorsExpiredEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobWorkerSelectorsExpiredEventData.cs index 28655f6d0119..b9195fb5eec0 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobWorkerSelectorsExpiredEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobWorkerSelectorsExpiredEventData.cs @@ -7,7 +7,6 @@ using System; using System.Collections.Generic; -using System.Linq; namespace Azure.Messaging.EventGrid.SystemEvents { @@ -17,18 +16,14 @@ public partial class AcsRouterJobWorkerSelectorsExpiredEventData : AcsRouterJobE /// Initializes a new instance of . /// Router Job events Labels. /// Router Jobs events Tags. - /// Router Job Worker Selectors Expired Requested Worker Selectors. - /// Router Job Worker Selectors Expired Attached Worker Selectors. - /// , , or is null. - internal AcsRouterJobWorkerSelectorsExpiredEventData(IReadOnlyDictionary labels, IReadOnlyDictionary tags, IEnumerable expiredRequestedWorkerSelectors, IEnumerable expiredAttachedWorkerSelectors) : base(labels, tags) + /// or is null. + internal AcsRouterJobWorkerSelectorsExpiredEventData(IReadOnlyDictionary labels, IReadOnlyDictionary tags) : base(labels, tags) { Argument.AssertNotNull(labels, nameof(labels)); Argument.AssertNotNull(tags, nameof(tags)); - Argument.AssertNotNull(expiredRequestedWorkerSelectors, nameof(expiredRequestedWorkerSelectors)); - Argument.AssertNotNull(expiredAttachedWorkerSelectors, nameof(expiredAttachedWorkerSelectors)); - ExpiredRequestedWorkerSelectors = expiredRequestedWorkerSelectors.ToList(); - ExpiredAttachedWorkerSelectors = expiredAttachedWorkerSelectors.ToList(); + ExpiredRequestedWorkerSelectors = new ChangeTrackingList(); + ExpiredAttachedWorkerSelectors = new ChangeTrackingList(); } /// Initializes a new instance of . diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterWorkerRegisteredEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterWorkerRegisteredEventData.Serialization.cs index 82e41db035f3..47327b7f9fe1 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterWorkerRegisteredEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterWorkerRegisteredEventData.Serialization.cs @@ -39,20 +39,26 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("workerId"u8); writer.WriteStringValue(WorkerId); } - writer.WritePropertyName("queueAssignments"u8); - writer.WriteStartArray(); - foreach (var item in QueueAssignments) + if (options.Format != "W") { - writer.WriteObjectValue(item, options); + writer.WritePropertyName("queueAssignments"u8); + writer.WriteStartArray(); + foreach (var item in QueueAssignments) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); } - writer.WriteEndArray(); - writer.WritePropertyName("channelConfigurations"u8); - writer.WriteStartArray(); - foreach (var item in ChannelConfigurations) + if (options.Format != "W") { - writer.WriteObjectValue(item, options); + writer.WritePropertyName("channelConfigurations"u8); + writer.WriteStartArray(); + foreach (var item in ChannelConfigurations) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); } - writer.WriteEndArray(); if (Optional.IsDefined(TotalCapacity)) { writer.WritePropertyName("totalCapacity"u8); diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterWorkerRegisteredEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterWorkerRegisteredEventData.cs index e5b8ab2dc682..3f3cc4465551 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterWorkerRegisteredEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterWorkerRegisteredEventData.cs @@ -7,7 +7,6 @@ using System; using System.Collections.Generic; -using System.Linq; namespace Azure.Messaging.EventGrid.SystemEvents { @@ -47,20 +46,16 @@ public partial class AcsRouterWorkerRegisteredEventData private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - /// Router Worker Registered Queue Info. - /// Router Worker Registered Channel Configuration. /// Router Worker Registered Labels. /// Router Worker Registered Tags. - /// , , or is null. - internal AcsRouterWorkerRegisteredEventData(IEnumerable queueAssignments, IEnumerable channelConfigurations, IReadOnlyDictionary labels, IReadOnlyDictionary tags) + /// or is null. + internal AcsRouterWorkerRegisteredEventData(IReadOnlyDictionary labels, IReadOnlyDictionary tags) { - Argument.AssertNotNull(queueAssignments, nameof(queueAssignments)); - Argument.AssertNotNull(channelConfigurations, nameof(channelConfigurations)); Argument.AssertNotNull(labels, nameof(labels)); Argument.AssertNotNull(tags, nameof(tags)); - QueueAssignments = queueAssignments.ToList(); - ChannelConfigurations = channelConfigurations.ToList(); + QueueAssignments = new ChangeTrackingList(); + ChannelConfigurations = new ChangeTrackingList(); Labels = labels; Tags = tags; } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterWorkerUpdatedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterWorkerUpdatedEventData.Serialization.cs index d9b391c48c55..36c48ed7c239 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterWorkerUpdatedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterWorkerUpdatedEventData.Serialization.cs @@ -39,20 +39,26 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("workerId"u8); writer.WriteStringValue(WorkerId); } - writer.WritePropertyName("queueAssignments"u8); - writer.WriteStartArray(); - foreach (var item in QueueAssignments) + if (options.Format != "W") { - writer.WriteObjectValue(item, options); + writer.WritePropertyName("queueAssignments"u8); + writer.WriteStartArray(); + foreach (var item in QueueAssignments) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); } - writer.WriteEndArray(); - writer.WritePropertyName("channelConfigurations"u8); - writer.WriteStartArray(); - foreach (var item in ChannelConfigurations) + if (options.Format != "W") { - writer.WriteObjectValue(item, options); + writer.WritePropertyName("channelConfigurations"u8); + writer.WriteStartArray(); + foreach (var item in ChannelConfigurations) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); } - writer.WriteEndArray(); if (Optional.IsDefined(TotalCapacity)) { writer.WritePropertyName("totalCapacity"u8); @@ -74,13 +80,16 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteStringValue(item.Value); } writer.WriteEndObject(); - writer.WritePropertyName("updatedWorkerProperties"u8); - writer.WriteStartArray(); - foreach (var item in UpdatedWorkerProperties) + if (options.Format != "W") { - writer.WriteStringValue(item.ToString()); + writer.WritePropertyName("updatedWorkerProperties"u8); + writer.WriteStartArray(); + foreach (var item in UpdatedWorkerProperties) + { + writer.WriteStringValue(item.ToString()); + } + writer.WriteEndArray(); } - writer.WriteEndArray(); if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterWorkerUpdatedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterWorkerUpdatedEventData.cs index 3d1b2b1ca992..c5ff3fea7cb4 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterWorkerUpdatedEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterWorkerUpdatedEventData.cs @@ -7,7 +7,6 @@ using System; using System.Collections.Generic; -using System.Linq; namespace Azure.Messaging.EventGrid.SystemEvents { @@ -47,25 +46,19 @@ public partial class AcsRouterWorkerUpdatedEventData private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - /// Router Worker Updated Queue Info. - /// Router Worker Updated Channel Configuration. /// Router Worker Updated Labels. /// Router Worker Updated Tags. - /// Router Worker Properties Updated. - /// , , , or is null. - internal AcsRouterWorkerUpdatedEventData(IEnumerable queueAssignments, IEnumerable channelConfigurations, IReadOnlyDictionary labels, IReadOnlyDictionary tags, IEnumerable updatedWorkerProperties) + /// or is null. + internal AcsRouterWorkerUpdatedEventData(IReadOnlyDictionary labels, IReadOnlyDictionary tags) { - Argument.AssertNotNull(queueAssignments, nameof(queueAssignments)); - Argument.AssertNotNull(channelConfigurations, nameof(channelConfigurations)); Argument.AssertNotNull(labels, nameof(labels)); Argument.AssertNotNull(tags, nameof(tags)); - Argument.AssertNotNull(updatedWorkerProperties, nameof(updatedWorkerProperties)); - QueueAssignments = queueAssignments.ToList(); - ChannelConfigurations = channelConfigurations.ToList(); + QueueAssignments = new ChangeTrackingList(); + ChannelConfigurations = new ChangeTrackingList(); Labels = labels; Tags = tags; - UpdatedWorkerProperties = updatedWorkerProperties.ToList(); + UpdatedWorkerProperties = new ChangeTrackingList(); } /// Initializes a new instance of . diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsSmsDeliveryReportReceivedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsSmsDeliveryReportReceivedEventData.Serialization.cs index 329e178fb9a3..123baf85e29e 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsSmsDeliveryReportReceivedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsSmsDeliveryReportReceivedEventData.Serialization.cs @@ -45,13 +45,16 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("deliveryStatusDetails"u8); writer.WriteStringValue(DeliveryStatusDetails); } - writer.WritePropertyName("deliveryAttempts"u8); - writer.WriteStartArray(); - foreach (var item in DeliveryAttempts) + if (options.Format != "W") { - writer.WriteObjectValue(item, options); + writer.WritePropertyName("deliveryAttempts"u8); + writer.WriteStartArray(); + foreach (var item in DeliveryAttempts) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); } - writer.WriteEndArray(); if (Optional.IsDefined(ReceivedTimestamp)) { writer.WritePropertyName("receivedTimestamp"u8); diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsSmsDeliveryReportReceivedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsSmsDeliveryReportReceivedEventData.cs index 3e3649e9affe..37017ca60862 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsSmsDeliveryReportReceivedEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsSmsDeliveryReportReceivedEventData.cs @@ -7,7 +7,6 @@ using System; using System.Collections.Generic; -using System.Linq; namespace Azure.Messaging.EventGrid.SystemEvents { @@ -15,13 +14,9 @@ namespace Azure.Messaging.EventGrid.SystemEvents public partial class AcsSmsDeliveryReportReceivedEventData : AcsSmsEventBaseProperties { /// Initializes a new instance of . - /// List of details of delivery attempts made. - /// is null. - internal AcsSmsDeliveryReportReceivedEventData(IEnumerable deliveryAttempts) + internal AcsSmsDeliveryReportReceivedEventData() { - Argument.AssertNotNull(deliveryAttempts, nameof(deliveryAttempts)); - - DeliveryAttempts = deliveryAttempts.ToList(); + DeliveryAttempts = new ChangeTrackingList(); } /// Initializes a new instance of . @@ -43,11 +38,6 @@ internal AcsSmsDeliveryReportReceivedEventData(string messageId, string @from, s Tag = tag; } - /// Initializes a new instance of for deserialization. - internal AcsSmsDeliveryReportReceivedEventData() - { - } - /// Status of Delivery. public string DeliveryStatus { get; } /// Details about Delivery Status. diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementCircuitBreakerClosedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementCircuitBreakerClosedEventData.Serialization.cs new file mode 100644 index 000000000000..5c34182f08e9 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementCircuitBreakerClosedEventData.Serialization.cs @@ -0,0 +1,150 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + public partial class ApiManagementCircuitBreakerClosedEventData : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ApiManagementCircuitBreakerClosedEventData)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("backendName"u8); + writer.WriteStringValue(BackendName); + writer.WritePropertyName("circuitBreaker"u8); + writer.WriteObjectValue(CircuitBreaker, 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 + } + } + } + + ApiManagementCircuitBreakerClosedEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ApiManagementCircuitBreakerClosedEventData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeApiManagementCircuitBreakerClosedEventData(document.RootElement, options); + } + + internal static ApiManagementCircuitBreakerClosedEventData DeserializeApiManagementCircuitBreakerClosedEventData(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string backendName = default; + ApiManagementCircuitBreakerProperties circuitBreaker = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("backendName"u8)) + { + backendName = property.Value.GetString(); + continue; + } + if (property.NameEquals("circuitBreaker"u8)) + { + circuitBreaker = ApiManagementCircuitBreakerProperties.DeserializeApiManagementCircuitBreakerProperties(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ApiManagementCircuitBreakerClosedEventData(backendName, circuitBreaker, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ApiManagementCircuitBreakerClosedEventData)} does not support writing '{options.Format}' format."); + } + } + + ApiManagementCircuitBreakerClosedEventData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeApiManagementCircuitBreakerClosedEventData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ApiManagementCircuitBreakerClosedEventData)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static ApiManagementCircuitBreakerClosedEventData FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeApiManagementCircuitBreakerClosedEventData(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementCircuitBreakerClosedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementCircuitBreakerClosedEventData.cs new file mode 100644 index 000000000000..7b883eb64505 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementCircuitBreakerClosedEventData.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.Messaging.EventGrid.SystemEvents +{ + /// Schema of the Data property of an EventGridEvent for a Microsoft.ApiManagement.CircuitBreaker.Closed event. + public partial class ApiManagementCircuitBreakerClosedEventData + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// 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 backend for which the circuit has closed. + /// Information related to the circuit breaker configured on the backend. + /// or is null. + internal ApiManagementCircuitBreakerClosedEventData(string backendName, ApiManagementCircuitBreakerProperties circuitBreaker) + { + Argument.AssertNotNull(backendName, nameof(backendName)); + Argument.AssertNotNull(circuitBreaker, nameof(circuitBreaker)); + + BackendName = backendName; + CircuitBreaker = circuitBreaker; + } + + /// Initializes a new instance of . + /// Name of the backend for which the circuit has closed. + /// Information related to the circuit breaker configured on the backend. + /// Keeps track of any properties unknown to the library. + internal ApiManagementCircuitBreakerClosedEventData(string backendName, ApiManagementCircuitBreakerProperties circuitBreaker, IDictionary serializedAdditionalRawData) + { + BackendName = backendName; + CircuitBreaker = circuitBreaker; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal ApiManagementCircuitBreakerClosedEventData() + { + } + + /// Name of the backend for which the circuit has closed. + public string BackendName { get; } + /// Information related to the circuit breaker configured on the backend. + public ApiManagementCircuitBreakerProperties CircuitBreaker { get; } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementCircuitBreakerOpenedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementCircuitBreakerOpenedEventData.Serialization.cs new file mode 100644 index 000000000000..75dbb3911807 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementCircuitBreakerOpenedEventData.Serialization.cs @@ -0,0 +1,150 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + public partial class ApiManagementCircuitBreakerOpenedEventData : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ApiManagementCircuitBreakerOpenedEventData)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("backendName"u8); + writer.WriteStringValue(BackendName); + writer.WritePropertyName("circuitBreaker"u8); + writer.WriteObjectValue(CircuitBreaker, 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 + } + } + } + + ApiManagementCircuitBreakerOpenedEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ApiManagementCircuitBreakerOpenedEventData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeApiManagementCircuitBreakerOpenedEventData(document.RootElement, options); + } + + internal static ApiManagementCircuitBreakerOpenedEventData DeserializeApiManagementCircuitBreakerOpenedEventData(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string backendName = default; + ApiManagementCircuitBreakerProperties circuitBreaker = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("backendName"u8)) + { + backendName = property.Value.GetString(); + continue; + } + if (property.NameEquals("circuitBreaker"u8)) + { + circuitBreaker = ApiManagementCircuitBreakerProperties.DeserializeApiManagementCircuitBreakerProperties(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ApiManagementCircuitBreakerOpenedEventData(backendName, circuitBreaker, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ApiManagementCircuitBreakerOpenedEventData)} does not support writing '{options.Format}' format."); + } + } + + ApiManagementCircuitBreakerOpenedEventData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeApiManagementCircuitBreakerOpenedEventData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ApiManagementCircuitBreakerOpenedEventData)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static ApiManagementCircuitBreakerOpenedEventData FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeApiManagementCircuitBreakerOpenedEventData(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementCircuitBreakerOpenedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementCircuitBreakerOpenedEventData.cs new file mode 100644 index 000000000000..d739428a4a42 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementCircuitBreakerOpenedEventData.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.Messaging.EventGrid.SystemEvents +{ + /// Schema of the Data property of an EventGridEvent for a Microsoft.ApiManagement.CircuitBreaker.Opened event. + public partial class ApiManagementCircuitBreakerOpenedEventData + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// 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 backend for which the circuit has opened. + /// Information related to the circuit breaker configured on the backend. + /// or is null. + internal ApiManagementCircuitBreakerOpenedEventData(string backendName, ApiManagementCircuitBreakerProperties circuitBreaker) + { + Argument.AssertNotNull(backendName, nameof(backendName)); + Argument.AssertNotNull(circuitBreaker, nameof(circuitBreaker)); + + BackendName = backendName; + CircuitBreaker = circuitBreaker; + } + + /// Initializes a new instance of . + /// Name of the backend for which the circuit has opened. + /// Information related to the circuit breaker configured on the backend. + /// Keeps track of any properties unknown to the library. + internal ApiManagementCircuitBreakerOpenedEventData(string backendName, ApiManagementCircuitBreakerProperties circuitBreaker, IDictionary serializedAdditionalRawData) + { + BackendName = backendName; + CircuitBreaker = circuitBreaker; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal ApiManagementCircuitBreakerOpenedEventData() + { + } + + /// Name of the backend for which the circuit has opened. + public string BackendName { get; } + /// Information related to the circuit breaker configured on the backend. + public ApiManagementCircuitBreakerProperties CircuitBreaker { get; } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementCircuitBreakerProperties.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementCircuitBreakerProperties.Serialization.cs new file mode 100644 index 000000000000..7c86dd2a8678 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementCircuitBreakerProperties.Serialization.cs @@ -0,0 +1,153 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + public partial class ApiManagementCircuitBreakerProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ApiManagementCircuitBreakerProperties)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("rules"u8); + writer.WriteStartObject(); + foreach (var item in Rules) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value, options); + } + writer.WriteEndObject(); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ApiManagementCircuitBreakerProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ApiManagementCircuitBreakerProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeApiManagementCircuitBreakerProperties(document.RootElement, options); + } + + internal static ApiManagementCircuitBreakerProperties DeserializeApiManagementCircuitBreakerProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyDictionary rules = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("rules"u8)) + { + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, ApiManagementCircuitBreakerPropertiesRule.DeserializeApiManagementCircuitBreakerPropertiesRule(property0.Value, options)); + } + rules = dictionary; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ApiManagementCircuitBreakerProperties(rules, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ApiManagementCircuitBreakerProperties)} does not support writing '{options.Format}' format."); + } + } + + ApiManagementCircuitBreakerProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeApiManagementCircuitBreakerProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ApiManagementCircuitBreakerProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static ApiManagementCircuitBreakerProperties FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeApiManagementCircuitBreakerProperties(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementCircuitBreakerProperties.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementCircuitBreakerProperties.cs new file mode 100644 index 000000000000..3efa24aa9c88 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementCircuitBreakerProperties.cs @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + /// Information related to the circuit breaker configured on the backend. + public partial class ApiManagementCircuitBreakerProperties + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Overview of all configured rules and respective details. + /// is null. + internal ApiManagementCircuitBreakerProperties(IReadOnlyDictionary rules) + { + Argument.AssertNotNull(rules, nameof(rules)); + + Rules = rules; + } + + /// Initializes a new instance of . + /// Overview of all configured rules and respective details. + /// Keeps track of any properties unknown to the library. + internal ApiManagementCircuitBreakerProperties(IReadOnlyDictionary rules, IDictionary serializedAdditionalRawData) + { + Rules = rules; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal ApiManagementCircuitBreakerProperties() + { + } + + /// Overview of all configured rules and respective details. + public IReadOnlyDictionary Rules { get; } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementCircuitBreakerPropertiesRule.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementCircuitBreakerPropertiesRule.Serialization.cs new file mode 100644 index 000000000000..e307d6e6171e --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementCircuitBreakerPropertiesRule.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.Messaging.EventGrid.SystemEvents +{ + public partial class ApiManagementCircuitBreakerPropertiesRule : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ApiManagementCircuitBreakerPropertiesRule)} does not support writing '{format}' format."); + } + + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ApiManagementCircuitBreakerPropertiesRule IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ApiManagementCircuitBreakerPropertiesRule)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeApiManagementCircuitBreakerPropertiesRule(document.RootElement, options); + } + + internal static ApiManagementCircuitBreakerPropertiesRule DeserializeApiManagementCircuitBreakerPropertiesRule(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ApiManagementCircuitBreakerPropertiesRule(serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ApiManagementCircuitBreakerPropertiesRule)} does not support writing '{options.Format}' format."); + } + } + + ApiManagementCircuitBreakerPropertiesRule IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeApiManagementCircuitBreakerPropertiesRule(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ApiManagementCircuitBreakerPropertiesRule)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static ApiManagementCircuitBreakerPropertiesRule FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeApiManagementCircuitBreakerPropertiesRule(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementCircuitBreakerPropertiesRule.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementCircuitBreakerPropertiesRule.cs new file mode 100644 index 000000000000..14499deaf551 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementCircuitBreakerPropertiesRule.cs @@ -0,0 +1,60 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + /// The ApiManagementCircuitBreakerPropertiesRule. + public partial class ApiManagementCircuitBreakerPropertiesRule + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal ApiManagementCircuitBreakerPropertiesRule() + { + } + + /// Initializes a new instance of . + /// Keeps track of any properties unknown to the library. + internal ApiManagementCircuitBreakerPropertiesRule(IDictionary serializedAdditionalRawData) + { + _serializedAdditionalRawData = serializedAdditionalRawData; + } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementExpiredGatewayTokenProperties.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementExpiredGatewayTokenProperties.Serialization.cs new file mode 100644 index 000000000000..69b90b02e987 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementExpiredGatewayTokenProperties.Serialization.cs @@ -0,0 +1,142 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + public partial class ApiManagementExpiredGatewayTokenProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ApiManagementExpiredGatewayTokenProperties)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("expiredAtUtc"u8); + writer.WriteStringValue(ExpiredAtUtc, "O"); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ApiManagementExpiredGatewayTokenProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ApiManagementExpiredGatewayTokenProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeApiManagementExpiredGatewayTokenProperties(document.RootElement, options); + } + + internal static ApiManagementExpiredGatewayTokenProperties DeserializeApiManagementExpiredGatewayTokenProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + DateTimeOffset expiredAtUtc = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("expiredAtUtc"u8)) + { + expiredAtUtc = property.Value.GetDateTimeOffset("O"); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ApiManagementExpiredGatewayTokenProperties(expiredAtUtc, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ApiManagementExpiredGatewayTokenProperties)} does not support writing '{options.Format}' format."); + } + } + + ApiManagementExpiredGatewayTokenProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeApiManagementExpiredGatewayTokenProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ApiManagementExpiredGatewayTokenProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static ApiManagementExpiredGatewayTokenProperties FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeApiManagementExpiredGatewayTokenProperties(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementExpiredGatewayTokenProperties.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementExpiredGatewayTokenProperties.cs new file mode 100644 index 000000000000..dadba25ed570 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementExpiredGatewayTokenProperties.cs @@ -0,0 +1,72 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + /// Information related to a gateway token that has expired for a self-hosted gateway deployment. + public partial class ApiManagementExpiredGatewayTokenProperties + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Timestamp when the gateway token has expired. + internal ApiManagementExpiredGatewayTokenProperties(DateTimeOffset expiredAtUtc) + { + ExpiredAtUtc = expiredAtUtc; + } + + /// Initializes a new instance of . + /// Timestamp when the gateway token has expired. + /// Keeps track of any properties unknown to the library. + internal ApiManagementExpiredGatewayTokenProperties(DateTimeOffset expiredAtUtc, IDictionary serializedAdditionalRawData) + { + ExpiredAtUtc = expiredAtUtc; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal ApiManagementExpiredGatewayTokenProperties() + { + } + + /// Timestamp when the gateway token has expired. + public DateTimeOffset ExpiredAtUtc { get; } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementGatewayProperties.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementGatewayProperties.Serialization.cs new file mode 100644 index 000000000000..e0167b9d5545 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementGatewayProperties.Serialization.cs @@ -0,0 +1,150 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + public partial class ApiManagementGatewayProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ApiManagementGatewayProperties)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("gatewayId"u8); + writer.WriteStringValue(GatewayId); + writer.WritePropertyName("instanceId"u8); + writer.WriteStringValue(InstanceId); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ApiManagementGatewayProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ApiManagementGatewayProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeApiManagementGatewayProperties(document.RootElement, options); + } + + internal static ApiManagementGatewayProperties DeserializeApiManagementGatewayProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string gatewayId = default; + string instanceId = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("gatewayId"u8)) + { + gatewayId = property.Value.GetString(); + continue; + } + if (property.NameEquals("instanceId"u8)) + { + instanceId = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ApiManagementGatewayProperties(gatewayId, instanceId, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ApiManagementGatewayProperties)} does not support writing '{options.Format}' format."); + } + } + + ApiManagementGatewayProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeApiManagementGatewayProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ApiManagementGatewayProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static ApiManagementGatewayProperties FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeApiManagementGatewayProperties(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementGatewayProperties.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementGatewayProperties.cs new file mode 100644 index 000000000000..56075c0a60ee --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementGatewayProperties.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.Messaging.EventGrid.SystemEvents +{ + /// Information related to a given self-hosted gateway deployment. + public partial class ApiManagementGatewayProperties + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Id of Gateway that is used to deploy the gateway to get the configuration for. This is the ARM resource ID referenced in the Azure API Management instance. Uses the format, `/subscriptions/<SubscriptionID>/resourceGroups/<ResourceGroup>/Microsoft.ApiManagement/service/<ServiceName>/gateway/<GatewayName>`. + /// Unique instance ID of the deployed gateway. + /// or is null. + internal ApiManagementGatewayProperties(string gatewayId, string instanceId) + { + Argument.AssertNotNull(gatewayId, nameof(gatewayId)); + Argument.AssertNotNull(instanceId, nameof(instanceId)); + + GatewayId = gatewayId; + InstanceId = instanceId; + } + + /// Initializes a new instance of . + /// Id of Gateway that is used to deploy the gateway to get the configuration for. This is the ARM resource ID referenced in the Azure API Management instance. Uses the format, `/subscriptions/<SubscriptionID>/resourceGroups/<ResourceGroup>/Microsoft.ApiManagement/service/<ServiceName>/gateway/<GatewayName>`. + /// Unique instance ID of the deployed gateway. + /// Keeps track of any properties unknown to the library. + internal ApiManagementGatewayProperties(string gatewayId, string instanceId, IDictionary serializedAdditionalRawData) + { + GatewayId = gatewayId; + InstanceId = instanceId; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal ApiManagementGatewayProperties() + { + } + + /// Id of Gateway that is used to deploy the gateway to get the configuration for. This is the ARM resource ID referenced in the Azure API Management instance. Uses the format, `/subscriptions/<SubscriptionID>/resourceGroups/<ResourceGroup>/Microsoft.ApiManagement/service/<ServiceName>/gateway/<GatewayName>`. + public string GatewayId { get; } + /// Unique instance ID of the deployed gateway. + public string InstanceId { get; } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementGatewayTokenExpiredEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementGatewayTokenExpiredEventData.Serialization.cs new file mode 100644 index 000000000000..2811368eb1a6 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementGatewayTokenExpiredEventData.Serialization.cs @@ -0,0 +1,150 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + public partial class ApiManagementGatewayTokenExpiredEventData : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ApiManagementGatewayTokenExpiredEventData)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("gatewayInfo"u8); + writer.WriteObjectValue(GatewayInfo, options); + writer.WritePropertyName("tokenInfo"u8); + writer.WriteObjectValue(TokenInfo, 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 + } + } + } + + ApiManagementGatewayTokenExpiredEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ApiManagementGatewayTokenExpiredEventData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeApiManagementGatewayTokenExpiredEventData(document.RootElement, options); + } + + internal static ApiManagementGatewayTokenExpiredEventData DeserializeApiManagementGatewayTokenExpiredEventData(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ApiManagementGatewayProperties gatewayInfo = default; + ApiManagementExpiredGatewayTokenProperties tokenInfo = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("gatewayInfo"u8)) + { + gatewayInfo = ApiManagementGatewayProperties.DeserializeApiManagementGatewayProperties(property.Value, options); + continue; + } + if (property.NameEquals("tokenInfo"u8)) + { + tokenInfo = ApiManagementExpiredGatewayTokenProperties.DeserializeApiManagementExpiredGatewayTokenProperties(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ApiManagementGatewayTokenExpiredEventData(gatewayInfo, tokenInfo, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ApiManagementGatewayTokenExpiredEventData)} does not support writing '{options.Format}' format."); + } + } + + ApiManagementGatewayTokenExpiredEventData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeApiManagementGatewayTokenExpiredEventData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ApiManagementGatewayTokenExpiredEventData)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static ApiManagementGatewayTokenExpiredEventData FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeApiManagementGatewayTokenExpiredEventData(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementGatewayTokenExpiredEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementGatewayTokenExpiredEventData.cs new file mode 100644 index 000000000000..a7acbceff381 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementGatewayTokenExpiredEventData.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.Messaging.EventGrid.SystemEvents +{ + /// Schema of the Data property of an EventGridEvent for a Microsoft.ApiManagement.GatewayTokenExpired event. + public partial class ApiManagementGatewayTokenExpiredEventData + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Information related to a given self-hosted gateway deployment. + /// Information related to a an expired gateway token for a self-hosted gateway deployment. + /// or is null. + internal ApiManagementGatewayTokenExpiredEventData(ApiManagementGatewayProperties gatewayInfo, ApiManagementExpiredGatewayTokenProperties tokenInfo) + { + Argument.AssertNotNull(gatewayInfo, nameof(gatewayInfo)); + Argument.AssertNotNull(tokenInfo, nameof(tokenInfo)); + + GatewayInfo = gatewayInfo; + TokenInfo = tokenInfo; + } + + /// Initializes a new instance of . + /// Information related to a given self-hosted gateway deployment. + /// Information related to a an expired gateway token for a self-hosted gateway deployment. + /// Keeps track of any properties unknown to the library. + internal ApiManagementGatewayTokenExpiredEventData(ApiManagementGatewayProperties gatewayInfo, ApiManagementExpiredGatewayTokenProperties tokenInfo, IDictionary serializedAdditionalRawData) + { + GatewayInfo = gatewayInfo; + TokenInfo = tokenInfo; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal ApiManagementGatewayTokenExpiredEventData() + { + } + + /// Information related to a given self-hosted gateway deployment. + public ApiManagementGatewayProperties GatewayInfo { get; } + /// Information related to a an expired gateway token for a self-hosted gateway deployment. + public ApiManagementExpiredGatewayTokenProperties TokenInfo { get; } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementGatewayTokenNearExpiryEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementGatewayTokenNearExpiryEventData.Serialization.cs new file mode 100644 index 000000000000..d4e36c0ca59e --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementGatewayTokenNearExpiryEventData.Serialization.cs @@ -0,0 +1,150 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + public partial class ApiManagementGatewayTokenNearExpiryEventData : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ApiManagementGatewayTokenNearExpiryEventData)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("gatewayInfo"u8); + writer.WriteObjectValue(GatewayInfo, options); + writer.WritePropertyName("tokenInfo"u8); + writer.WriteObjectValue(TokenInfo, 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 + } + } + } + + ApiManagementGatewayTokenNearExpiryEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ApiManagementGatewayTokenNearExpiryEventData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeApiManagementGatewayTokenNearExpiryEventData(document.RootElement, options); + } + + internal static ApiManagementGatewayTokenNearExpiryEventData DeserializeApiManagementGatewayTokenNearExpiryEventData(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ApiManagementGatewayProperties gatewayInfo = default; + ApiManagementNearExpiryGatewayTokenProperties tokenInfo = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("gatewayInfo"u8)) + { + gatewayInfo = ApiManagementGatewayProperties.DeserializeApiManagementGatewayProperties(property.Value, options); + continue; + } + if (property.NameEquals("tokenInfo"u8)) + { + tokenInfo = ApiManagementNearExpiryGatewayTokenProperties.DeserializeApiManagementNearExpiryGatewayTokenProperties(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ApiManagementGatewayTokenNearExpiryEventData(gatewayInfo, tokenInfo, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ApiManagementGatewayTokenNearExpiryEventData)} does not support writing '{options.Format}' format."); + } + } + + ApiManagementGatewayTokenNearExpiryEventData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeApiManagementGatewayTokenNearExpiryEventData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ApiManagementGatewayTokenNearExpiryEventData)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static ApiManagementGatewayTokenNearExpiryEventData FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeApiManagementGatewayTokenNearExpiryEventData(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementGatewayTokenNearExpiryEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementGatewayTokenNearExpiryEventData.cs new file mode 100644 index 000000000000..a66436311c5e --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementGatewayTokenNearExpiryEventData.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.Messaging.EventGrid.SystemEvents +{ + /// Schema of the Data property of an EventGridEvent for a Microsoft.ApiManagement.GatewayTokenNearExpiry event. + public partial class ApiManagementGatewayTokenNearExpiryEventData + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Information related to a given self-hosted gateway deployment. + /// Information related to a an expired gateway token for a self-hosted gateway deployment. + /// or is null. + internal ApiManagementGatewayTokenNearExpiryEventData(ApiManagementGatewayProperties gatewayInfo, ApiManagementNearExpiryGatewayTokenProperties tokenInfo) + { + Argument.AssertNotNull(gatewayInfo, nameof(gatewayInfo)); + Argument.AssertNotNull(tokenInfo, nameof(tokenInfo)); + + GatewayInfo = gatewayInfo; + TokenInfo = tokenInfo; + } + + /// Initializes a new instance of . + /// Information related to a given self-hosted gateway deployment. + /// Information related to a an expired gateway token for a self-hosted gateway deployment. + /// Keeps track of any properties unknown to the library. + internal ApiManagementGatewayTokenNearExpiryEventData(ApiManagementGatewayProperties gatewayInfo, ApiManagementNearExpiryGatewayTokenProperties tokenInfo, IDictionary serializedAdditionalRawData) + { + GatewayInfo = gatewayInfo; + TokenInfo = tokenInfo; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal ApiManagementGatewayTokenNearExpiryEventData() + { + } + + /// Information related to a given self-hosted gateway deployment. + public ApiManagementGatewayProperties GatewayInfo { get; } + /// Information related to a an expired gateway token for a self-hosted gateway deployment. + public ApiManagementNearExpiryGatewayTokenProperties TokenInfo { get; } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementNearExpiryGatewayTokenProperties.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementNearExpiryGatewayTokenProperties.Serialization.cs new file mode 100644 index 000000000000..5788be10e46e --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementNearExpiryGatewayTokenProperties.Serialization.cs @@ -0,0 +1,142 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + public partial class ApiManagementNearExpiryGatewayTokenProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ApiManagementNearExpiryGatewayTokenProperties)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("expiredAtUtc"u8); + writer.WriteStringValue(ExpiredAtUtc, "O"); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ApiManagementNearExpiryGatewayTokenProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ApiManagementNearExpiryGatewayTokenProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeApiManagementNearExpiryGatewayTokenProperties(document.RootElement, options); + } + + internal static ApiManagementNearExpiryGatewayTokenProperties DeserializeApiManagementNearExpiryGatewayTokenProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + DateTimeOffset expiredAtUtc = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("expiredAtUtc"u8)) + { + expiredAtUtc = property.Value.GetDateTimeOffset("O"); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ApiManagementNearExpiryGatewayTokenProperties(expiredAtUtc, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ApiManagementNearExpiryGatewayTokenProperties)} does not support writing '{options.Format}' format."); + } + } + + ApiManagementNearExpiryGatewayTokenProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeApiManagementNearExpiryGatewayTokenProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ApiManagementNearExpiryGatewayTokenProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static ApiManagementNearExpiryGatewayTokenProperties FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeApiManagementNearExpiryGatewayTokenProperties(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementNearExpiryGatewayTokenProperties.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementNearExpiryGatewayTokenProperties.cs new file mode 100644 index 000000000000..fcc22492a89d --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementNearExpiryGatewayTokenProperties.cs @@ -0,0 +1,72 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + /// Information related to a gateway token that is near expiry for a self-hosted gateway deployment. + public partial class ApiManagementNearExpiryGatewayTokenProperties + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Timestamp when the gateway token will expire. + internal ApiManagementNearExpiryGatewayTokenProperties(DateTimeOffset expiredAtUtc) + { + ExpiredAtUtc = expiredAtUtc; + } + + /// Initializes a new instance of . + /// Timestamp when the gateway token will expire. + /// Keeps track of any properties unknown to the library. + internal ApiManagementNearExpiryGatewayTokenProperties(DateTimeOffset expiredAtUtc, IDictionary serializedAdditionalRawData) + { + ExpiredAtUtc = expiredAtUtc; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal ApiManagementNearExpiryGatewayTokenProperties() + { + } + + /// Timestamp when the gateway token will expire. + public DateTimeOffset ExpiredAtUtc { get; } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AppConfigurationKeyValueDeletedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AppConfigurationKeyValueDeletedEventData.Serialization.cs index 3d95b902797b..8348d264b024 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AppConfigurationKeyValueDeletedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AppConfigurationKeyValueDeletedEventData.Serialization.cs @@ -34,26 +34,14 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(AppConfigurationKeyValueDeletedEventData)} does not support writing '{format}' format."); } - if (Optional.IsDefined(Key)) - { - writer.WritePropertyName("key"u8); - writer.WriteStringValue(Key); - } - if (Optional.IsDefined(Label)) - { - writer.WritePropertyName("label"u8); - writer.WriteStringValue(Label); - } - if (Optional.IsDefined(Etag)) - { - writer.WritePropertyName("etag"u8); - writer.WriteStringValue(Etag); - } - if (Optional.IsDefined(SyncToken)) - { - writer.WritePropertyName("syncToken"u8); - writer.WriteStringValue(SyncToken); - } + writer.WritePropertyName("key"u8); + writer.WriteStringValue(Key); + writer.WritePropertyName("label"u8); + writer.WriteStringValue(Label); + writer.WritePropertyName("etag"u8); + writer.WriteStringValue(Etag); + writer.WritePropertyName("syncToken"u8); + writer.WriteStringValue(SyncToken); if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AppConfigurationKeyValueDeletedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AppConfigurationKeyValueDeletedEventData.cs index b920a0b33dd2..7a4cf1ce7212 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AppConfigurationKeyValueDeletedEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AppConfigurationKeyValueDeletedEventData.cs @@ -46,8 +46,22 @@ public partial class AppConfigurationKeyValueDeletedEventData private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - internal AppConfigurationKeyValueDeletedEventData() + /// The key used to identify the key-value that was deleted. + /// The label, if any, used to identify the key-value that was deleted. + /// The etag representing the key-value that was deleted. + /// The sync token representing the server state after the event. + /// , , or is null. + internal AppConfigurationKeyValueDeletedEventData(string key, string label, string etag, string syncToken) { + Argument.AssertNotNull(key, nameof(key)); + Argument.AssertNotNull(label, nameof(label)); + Argument.AssertNotNull(etag, nameof(etag)); + Argument.AssertNotNull(syncToken, nameof(syncToken)); + + Key = key; + Label = label; + Etag = etag; + SyncToken = syncToken; } /// Initializes a new instance of . @@ -65,6 +79,11 @@ internal AppConfigurationKeyValueDeletedEventData(string key, string label, stri _serializedAdditionalRawData = serializedAdditionalRawData; } + /// Initializes a new instance of for deserialization. + internal AppConfigurationKeyValueDeletedEventData() + { + } + /// The key used to identify the key-value that was deleted. public string Key { get; } /// The label, if any, used to identify the key-value that was deleted. diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AppConfigurationKeyValueModifiedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AppConfigurationKeyValueModifiedEventData.Serialization.cs index e33caff65a77..86478e6dd36d 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AppConfigurationKeyValueModifiedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AppConfigurationKeyValueModifiedEventData.Serialization.cs @@ -34,26 +34,21 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(AppConfigurationKeyValueModifiedEventData)} does not support writing '{format}' format."); } - if (Optional.IsDefined(Key)) - { - writer.WritePropertyName("key"u8); - writer.WriteStringValue(Key); - } - if (Optional.IsDefined(Label)) + writer.WritePropertyName("key"u8); + writer.WriteStringValue(Key); + if (Label != null) { writer.WritePropertyName("label"u8); writer.WriteStringValue(Label); } - if (Optional.IsDefined(Etag)) - { - writer.WritePropertyName("etag"u8); - writer.WriteStringValue(Etag); - } - if (Optional.IsDefined(SyncToken)) + else { - writer.WritePropertyName("syncToken"u8); - writer.WriteStringValue(SyncToken); + writer.WriteNull("label"); } + writer.WritePropertyName("etag"u8); + writer.WriteStringValue(Etag); + writer.WritePropertyName("syncToken"u8); + writer.WriteStringValue(SyncToken); if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -106,6 +101,11 @@ internal static AppConfigurationKeyValueModifiedEventData DeserializeAppConfigur } if (property.NameEquals("label"u8)) { + if (property.Value.ValueKind == JsonValueKind.Null) + { + label = null; + continue; + } label = property.Value.GetString(); continue; } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AppConfigurationKeyValueModifiedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AppConfigurationKeyValueModifiedEventData.cs index e03cb8ded63b..1dcc27c11d46 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AppConfigurationKeyValueModifiedEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AppConfigurationKeyValueModifiedEventData.cs @@ -46,8 +46,21 @@ public partial class AppConfigurationKeyValueModifiedEventData private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - internal AppConfigurationKeyValueModifiedEventData() + /// The key used to identify the key-value that was modified. + /// The label, if any, used to identify the key-value that was modified. + /// The etag representing the new state of the key-value. + /// The sync token representing the server state after the event. + /// , or is null. + internal AppConfigurationKeyValueModifiedEventData(string key, string label, string etag, string syncToken) { + Argument.AssertNotNull(key, nameof(key)); + Argument.AssertNotNull(etag, nameof(etag)); + Argument.AssertNotNull(syncToken, nameof(syncToken)); + + Key = key; + Label = label; + Etag = etag; + SyncToken = syncToken; } /// Initializes a new instance of . @@ -65,6 +78,11 @@ internal AppConfigurationKeyValueModifiedEventData(string key, string label, str _serializedAdditionalRawData = serializedAdditionalRawData; } + /// Initializes a new instance of for deserialization. + internal AppConfigurationKeyValueModifiedEventData() + { + } + /// The key used to identify the key-value that was modified. public string Key { get; } /// The label, if any, used to identify the key-value that was modified. diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AppConfigurationSnapshotCreatedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AppConfigurationSnapshotCreatedEventData.cs index 319beef466ce..d5d7832fa69b 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AppConfigurationSnapshotCreatedEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AppConfigurationSnapshotCreatedEventData.cs @@ -14,8 +14,15 @@ namespace Azure.Messaging.EventGrid.SystemEvents public partial class AppConfigurationSnapshotCreatedEventData : AppConfigurationSnapshotEventData { /// Initializes a new instance of . - internal AppConfigurationSnapshotCreatedEventData() + /// The name of the snapshot. + /// The etag representing the new state of the snapshot. + /// The sync token representing the server state after the event. + /// , or is null. + internal AppConfigurationSnapshotCreatedEventData(string name, string etag, string syncToken) : base(name, etag, syncToken) { + Argument.AssertNotNull(name, nameof(name)); + Argument.AssertNotNull(etag, nameof(etag)); + Argument.AssertNotNull(syncToken, nameof(syncToken)); } /// Initializes a new instance of . @@ -26,5 +33,10 @@ internal AppConfigurationSnapshotCreatedEventData() internal AppConfigurationSnapshotCreatedEventData(string name, string etag, string syncToken, IDictionary serializedAdditionalRawData) : base(name, etag, syncToken, serializedAdditionalRawData) { } + + /// Initializes a new instance of for deserialization. + internal AppConfigurationSnapshotCreatedEventData() + { + } } } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AppConfigurationSnapshotEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AppConfigurationSnapshotEventData.Serialization.cs index 3d5566107a39..672a2002ad54 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AppConfigurationSnapshotEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AppConfigurationSnapshotEventData.Serialization.cs @@ -34,21 +34,12 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(AppConfigurationSnapshotEventData)} does not support writing '{format}' format."); } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (Optional.IsDefined(Etag)) - { - writer.WritePropertyName("etag"u8); - writer.WriteStringValue(Etag); - } - if (Optional.IsDefined(SyncToken)) - { - writer.WritePropertyName("syncToken"u8); - writer.WriteStringValue(SyncToken); - } + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + writer.WritePropertyName("etag"u8); + writer.WriteStringValue(Etag); + writer.WritePropertyName("syncToken"u8); + writer.WriteStringValue(SyncToken); if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AppConfigurationSnapshotEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AppConfigurationSnapshotEventData.cs index a64d0e66a4fc..43c5283bd828 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AppConfigurationSnapshotEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AppConfigurationSnapshotEventData.cs @@ -46,8 +46,19 @@ public partial class AppConfigurationSnapshotEventData private protected IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - internal AppConfigurationSnapshotEventData() + /// The name of the snapshot. + /// The etag representing the new state of the snapshot. + /// The sync token representing the server state after the event. + /// , or is null. + internal AppConfigurationSnapshotEventData(string name, string etag, string syncToken) { + Argument.AssertNotNull(name, nameof(name)); + Argument.AssertNotNull(etag, nameof(etag)); + Argument.AssertNotNull(syncToken, nameof(syncToken)); + + Name = name; + Etag = etag; + SyncToken = syncToken; } /// Initializes a new instance of . @@ -63,6 +74,11 @@ internal AppConfigurationSnapshotEventData(string name, string etag, string sync _serializedAdditionalRawData = serializedAdditionalRawData; } + /// Initializes a new instance of for deserialization. + internal AppConfigurationSnapshotEventData() + { + } + /// The name of the snapshot. public string Name { get; } /// The etag representing the new state of the snapshot. diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AppConfigurationSnapshotModifiedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AppConfigurationSnapshotModifiedEventData.cs index cd89dfdb11d1..b2164f525aa9 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AppConfigurationSnapshotModifiedEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AppConfigurationSnapshotModifiedEventData.cs @@ -14,8 +14,15 @@ namespace Azure.Messaging.EventGrid.SystemEvents public partial class AppConfigurationSnapshotModifiedEventData : AppConfigurationSnapshotEventData { /// Initializes a new instance of . - internal AppConfigurationSnapshotModifiedEventData() + /// The name of the snapshot. + /// The etag representing the new state of the snapshot. + /// The sync token representing the server state after the event. + /// , or is null. + internal AppConfigurationSnapshotModifiedEventData(string name, string etag, string syncToken) : base(name, etag, syncToken) { + Argument.AssertNotNull(name, nameof(name)); + Argument.AssertNotNull(etag, nameof(etag)); + Argument.AssertNotNull(syncToken, nameof(syncToken)); } /// Initializes a new instance of . @@ -26,5 +33,10 @@ internal AppConfigurationSnapshotModifiedEventData() internal AppConfigurationSnapshotModifiedEventData(string name, string etag, string syncToken, IDictionary serializedAdditionalRawData) : base(name, etag, syncToken, serializedAdditionalRawData) { } + + /// Initializes a new instance of for deserialization. + internal AppConfigurationSnapshotModifiedEventData() + { + } } } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AvsClusterEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AvsClusterEventData.Serialization.cs index d2a7cbd25dcd..ec71ee3ce2f5 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AvsClusterEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AvsClusterEventData.Serialization.cs @@ -36,7 +36,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("operationId"u8); writer.WriteStringValue(OperationId); - if (Optional.IsCollectionDefined(AddedHostNames)) + if (options.Format != "W" && Optional.IsCollectionDefined(AddedHostNames)) { writer.WritePropertyName("addedHostNames"u8); writer.WriteStartArray(); @@ -46,7 +46,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } writer.WriteEndArray(); } - if (Optional.IsCollectionDefined(RemovedHostNames)) + if (options.Format != "W" && Optional.IsCollectionDefined(RemovedHostNames)) { writer.WritePropertyName("removedHostNames"u8); writer.WriteStartArray(); @@ -56,7 +56,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } writer.WriteEndArray(); } - if (Optional.IsCollectionDefined(InMaintenanceHostNames)) + if (options.Format != "W" && Optional.IsCollectionDefined(InMaintenanceHostNames)) { writer.WritePropertyName("inMaintenanceHostNames"u8); writer.WriteStartArray(); diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AvsScriptExecutionEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AvsScriptExecutionEventData.Serialization.cs index 0280febef8ca..9b80e18d25aa 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AvsScriptExecutionEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AvsScriptExecutionEventData.Serialization.cs @@ -38,7 +38,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteStringValue(OperationId); writer.WritePropertyName("cmdletId"u8); writer.WriteStringValue(CmdletId); - if (Optional.IsCollectionDefined(Output)) + if (options.Format != "W" && Optional.IsCollectionDefined(Output)) { writer.WritePropertyName("output"u8); writer.WriteStartArray(); diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerServiceClusterSupportEndedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerServiceClusterSupportEndedEventData.cs index 66ed2b8c4b62..ef80f3e0864a 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerServiceClusterSupportEndedEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerServiceClusterSupportEndedEventData.cs @@ -14,8 +14,11 @@ namespace Azure.Messaging.EventGrid.SystemEvents public partial class ContainerServiceClusterSupportEndedEventData : ContainerServiceClusterSupportEventData { /// Initializes a new instance of . - internal ContainerServiceClusterSupportEndedEventData() + /// The Kubernetes version of the ManagedCluster resource. + /// is null. + internal ContainerServiceClusterSupportEndedEventData(string kubernetesVersion) : base(kubernetesVersion) { + Argument.AssertNotNull(kubernetesVersion, nameof(kubernetesVersion)); } /// Initializes a new instance of . @@ -24,5 +27,10 @@ internal ContainerServiceClusterSupportEndedEventData() internal ContainerServiceClusterSupportEndedEventData(string kubernetesVersion, IDictionary serializedAdditionalRawData) : base(kubernetesVersion, serializedAdditionalRawData) { } + + /// Initializes a new instance of for deserialization. + internal ContainerServiceClusterSupportEndedEventData() + { + } } } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerServiceClusterSupportEndingEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerServiceClusterSupportEndingEventData.cs index 0a3fa362492c..ea696b7348fe 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerServiceClusterSupportEndingEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerServiceClusterSupportEndingEventData.cs @@ -14,8 +14,11 @@ namespace Azure.Messaging.EventGrid.SystemEvents public partial class ContainerServiceClusterSupportEndingEventData : ContainerServiceClusterSupportEventData { /// Initializes a new instance of . - internal ContainerServiceClusterSupportEndingEventData() + /// The Kubernetes version of the ManagedCluster resource. + /// is null. + internal ContainerServiceClusterSupportEndingEventData(string kubernetesVersion) : base(kubernetesVersion) { + Argument.AssertNotNull(kubernetesVersion, nameof(kubernetesVersion)); } /// Initializes a new instance of . @@ -24,5 +27,10 @@ internal ContainerServiceClusterSupportEndingEventData() internal ContainerServiceClusterSupportEndingEventData(string kubernetesVersion, IDictionary serializedAdditionalRawData) : base(kubernetesVersion, serializedAdditionalRawData) { } + + /// Initializes a new instance of for deserialization. + internal ContainerServiceClusterSupportEndingEventData() + { + } } } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerServiceClusterSupportEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerServiceClusterSupportEventData.Serialization.cs index e69c3cab6fd7..2bda65aa23a3 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerServiceClusterSupportEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerServiceClusterSupportEventData.Serialization.cs @@ -34,11 +34,8 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(ContainerServiceClusterSupportEventData)} does not support writing '{format}' format."); } - if (Optional.IsDefined(KubernetesVersion)) - { - writer.WritePropertyName("kubernetesVersion"u8); - writer.WriteStringValue(KubernetesVersion); - } + writer.WritePropertyName("kubernetesVersion"u8); + writer.WriteStringValue(KubernetesVersion); if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerServiceClusterSupportEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerServiceClusterSupportEventData.cs index 3ad05c8cb79b..d6720cabcd35 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerServiceClusterSupportEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerServiceClusterSupportEventData.cs @@ -46,8 +46,13 @@ public partial class ContainerServiceClusterSupportEventData private protected IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - internal ContainerServiceClusterSupportEventData() + /// The Kubernetes version of the ManagedCluster resource. + /// is null. + internal ContainerServiceClusterSupportEventData(string kubernetesVersion) { + Argument.AssertNotNull(kubernetesVersion, nameof(kubernetesVersion)); + + KubernetesVersion = kubernetesVersion; } /// Initializes a new instance of . @@ -59,6 +64,11 @@ internal ContainerServiceClusterSupportEventData(string kubernetesVersion, IDict _serializedAdditionalRawData = serializedAdditionalRawData; } + /// Initializes a new instance of for deserialization. + internal ContainerServiceClusterSupportEventData() + { + } + /// The Kubernetes version of the ManagedCluster resource. public string KubernetesVersion { get; } } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerServiceNewKubernetesVersionAvailableEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerServiceNewKubernetesVersionAvailableEventData.Serialization.cs index 0e51cceccbfc..3f166a5de8e3 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerServiceNewKubernetesVersionAvailableEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerServiceNewKubernetesVersionAvailableEventData.Serialization.cs @@ -34,21 +34,12 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(ContainerServiceNewKubernetesVersionAvailableEventData)} does not support writing '{format}' format."); } - if (Optional.IsDefined(LatestSupportedKubernetesVersion)) - { - writer.WritePropertyName("latestSupportedKubernetesVersion"u8); - writer.WriteStringValue(LatestSupportedKubernetesVersion); - } - if (Optional.IsDefined(LatestStableKubernetesVersion)) - { - writer.WritePropertyName("latestStableKubernetesVersion"u8); - writer.WriteStringValue(LatestStableKubernetesVersion); - } - if (Optional.IsDefined(LowestMinorKubernetesVersion)) - { - writer.WritePropertyName("lowestMinorKubernetesVersion"u8); - writer.WriteStringValue(LowestMinorKubernetesVersion); - } + writer.WritePropertyName("latestSupportedKubernetesVersion"u8); + writer.WriteStringValue(LatestSupportedKubernetesVersion); + writer.WritePropertyName("latestStableKubernetesVersion"u8); + writer.WriteStringValue(LatestStableKubernetesVersion); + writer.WritePropertyName("lowestMinorKubernetesVersion"u8); + writer.WriteStringValue(LowestMinorKubernetesVersion); if (Optional.IsDefined(LatestPreviewKubernetesVersion)) { writer.WritePropertyName("latestPreviewKubernetesVersion"u8); diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerServiceNewKubernetesVersionAvailableEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerServiceNewKubernetesVersionAvailableEventData.cs index a220ba99996e..c27879af09ee 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerServiceNewKubernetesVersionAvailableEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerServiceNewKubernetesVersionAvailableEventData.cs @@ -46,8 +46,19 @@ public partial class ContainerServiceNewKubernetesVersionAvailableEventData private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - internal ContainerServiceNewKubernetesVersionAvailableEventData() + /// The highest PATCH Kubernetes version for the highest MINOR version supported by ManagedCluster resource. + /// The highest PATCH Kubernetes version for the MINOR version considered stable for the ManagedCluster resource. + /// The highest PATCH Kubernetes version for the lowest applicable MINOR version available for the ManagedCluster resource. + /// , or is null. + internal ContainerServiceNewKubernetesVersionAvailableEventData(string latestSupportedKubernetesVersion, string latestStableKubernetesVersion, string lowestMinorKubernetesVersion) { + Argument.AssertNotNull(latestSupportedKubernetesVersion, nameof(latestSupportedKubernetesVersion)); + Argument.AssertNotNull(latestStableKubernetesVersion, nameof(latestStableKubernetesVersion)); + Argument.AssertNotNull(lowestMinorKubernetesVersion, nameof(lowestMinorKubernetesVersion)); + + LatestSupportedKubernetesVersion = latestSupportedKubernetesVersion; + LatestStableKubernetesVersion = latestStableKubernetesVersion; + LowestMinorKubernetesVersion = lowestMinorKubernetesVersion; } /// Initializes a new instance of . @@ -65,6 +76,11 @@ internal ContainerServiceNewKubernetesVersionAvailableEventData(string latestSup _serializedAdditionalRawData = serializedAdditionalRawData; } + /// Initializes a new instance of for deserialization. + internal ContainerServiceNewKubernetesVersionAvailableEventData() + { + } + /// The highest PATCH Kubernetes version for the highest MINOR version supported by ManagedCluster resource. public string LatestSupportedKubernetesVersion { get; } /// The highest PATCH Kubernetes version for the MINOR version considered stable for the ManagedCluster resource. diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerServiceNodePoolRollingEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerServiceNodePoolRollingEventData.Serialization.cs index b8c25b055989..cae02d7a7392 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerServiceNodePoolRollingEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerServiceNodePoolRollingEventData.Serialization.cs @@ -34,11 +34,8 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(ContainerServiceNodePoolRollingEventData)} does not support writing '{format}' format."); } - if (Optional.IsDefined(NodePoolName)) - { - writer.WritePropertyName("nodePoolName"u8); - writer.WriteStringValue(NodePoolName); - } + writer.WritePropertyName("nodePoolName"u8); + writer.WriteStringValue(NodePoolName); if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerServiceNodePoolRollingEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerServiceNodePoolRollingEventData.cs index 3b5580803572..65ffdb4776f8 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerServiceNodePoolRollingEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerServiceNodePoolRollingEventData.cs @@ -46,8 +46,13 @@ public partial class ContainerServiceNodePoolRollingEventData private protected IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - internal ContainerServiceNodePoolRollingEventData() + /// The name of the node pool in the ManagedCluster resource. + /// is null. + internal ContainerServiceNodePoolRollingEventData(string nodePoolName) { + Argument.AssertNotNull(nodePoolName, nameof(nodePoolName)); + + NodePoolName = nodePoolName; } /// Initializes a new instance of . @@ -59,6 +64,11 @@ internal ContainerServiceNodePoolRollingEventData(string nodePoolName, IDictiona _serializedAdditionalRawData = serializedAdditionalRawData; } + /// Initializes a new instance of for deserialization. + internal ContainerServiceNodePoolRollingEventData() + { + } + /// The name of the node pool in the ManagedCluster resource. public string NodePoolName { get; } } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerServiceNodePoolRollingFailedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerServiceNodePoolRollingFailedEventData.cs index 0bf9331c72ca..e2889e098f99 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerServiceNodePoolRollingFailedEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerServiceNodePoolRollingFailedEventData.cs @@ -14,8 +14,11 @@ namespace Azure.Messaging.EventGrid.SystemEvents public partial class ContainerServiceNodePoolRollingFailedEventData : ContainerServiceNodePoolRollingEventData { /// Initializes a new instance of . - internal ContainerServiceNodePoolRollingFailedEventData() + /// The name of the node pool in the ManagedCluster resource. + /// is null. + internal ContainerServiceNodePoolRollingFailedEventData(string nodePoolName) : base(nodePoolName) { + Argument.AssertNotNull(nodePoolName, nameof(nodePoolName)); } /// Initializes a new instance of . @@ -24,5 +27,10 @@ internal ContainerServiceNodePoolRollingFailedEventData() internal ContainerServiceNodePoolRollingFailedEventData(string nodePoolName, IDictionary serializedAdditionalRawData) : base(nodePoolName, serializedAdditionalRawData) { } + + /// Initializes a new instance of for deserialization. + internal ContainerServiceNodePoolRollingFailedEventData() + { + } } } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerServiceNodePoolRollingStartedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerServiceNodePoolRollingStartedEventData.cs index 88958ee63eef..89edc1138e28 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerServiceNodePoolRollingStartedEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerServiceNodePoolRollingStartedEventData.cs @@ -14,8 +14,11 @@ namespace Azure.Messaging.EventGrid.SystemEvents public partial class ContainerServiceNodePoolRollingStartedEventData : ContainerServiceNodePoolRollingEventData { /// Initializes a new instance of . - internal ContainerServiceNodePoolRollingStartedEventData() + /// The name of the node pool in the ManagedCluster resource. + /// is null. + internal ContainerServiceNodePoolRollingStartedEventData(string nodePoolName) : base(nodePoolName) { + Argument.AssertNotNull(nodePoolName, nameof(nodePoolName)); } /// Initializes a new instance of . @@ -24,5 +27,10 @@ internal ContainerServiceNodePoolRollingStartedEventData() internal ContainerServiceNodePoolRollingStartedEventData(string nodePoolName, IDictionary serializedAdditionalRawData) : base(nodePoolName, serializedAdditionalRawData) { } + + /// Initializes a new instance of for deserialization. + internal ContainerServiceNodePoolRollingStartedEventData() + { + } } } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerServiceNodePoolRollingSucceededEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerServiceNodePoolRollingSucceededEventData.cs index 18c9e4ada789..6209fe995bdb 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerServiceNodePoolRollingSucceededEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerServiceNodePoolRollingSucceededEventData.cs @@ -14,8 +14,11 @@ namespace Azure.Messaging.EventGrid.SystemEvents public partial class ContainerServiceNodePoolRollingSucceededEventData : ContainerServiceNodePoolRollingEventData { /// Initializes a new instance of . - internal ContainerServiceNodePoolRollingSucceededEventData() + /// The name of the node pool in the ManagedCluster resource. + /// is null. + internal ContainerServiceNodePoolRollingSucceededEventData(string nodePoolName) : base(nodePoolName) { + Argument.AssertNotNull(nodePoolName, nameof(nodePoolName)); } /// Initializes a new instance of . @@ -24,5 +27,10 @@ internal ContainerServiceNodePoolRollingSucceededEventData() internal ContainerServiceNodePoolRollingSucceededEventData(string nodePoolName, IDictionary serializedAdditionalRawData) : base(nodePoolName, serializedAdditionalRawData) { } + + /// Initializes a new instance of for deserialization. + internal ContainerServiceNodePoolRollingSucceededEventData() + { + } } } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/EdgeSolutionVersionPublishedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/EdgeSolutionVersionPublishedEventData.Serialization.cs new file mode 100644 index 000000000000..eedd981062bf --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/EdgeSolutionVersionPublishedEventData.Serialization.cs @@ -0,0 +1,198 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + public partial class EdgeSolutionVersionPublishedEventData : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(EdgeSolutionVersionPublishedEventData)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("externalValidationId"u8); + writer.WriteStringValue(ExternalValidationId); + writer.WritePropertyName("targetId"u8); + writer.WriteStringValue(TargetId); + writer.WritePropertyName("solutionTemplateId"u8); + writer.WriteStringValue(SolutionTemplateId); + writer.WritePropertyName("solutionTemplateVersionId"u8); + writer.WriteStringValue(SolutionTemplateVersionId); + writer.WritePropertyName("solutionVersionId"u8); + writer.WriteStringValue(SolutionVersionId); + writer.WritePropertyName("apiVersion"u8); + writer.WriteStringValue(ApiVersion); + writer.WritePropertyName("callbackUrl"u8); + writer.WriteStringValue(CallbackUrl.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 + } + } + } + + EdgeSolutionVersionPublishedEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(EdgeSolutionVersionPublishedEventData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeEdgeSolutionVersionPublishedEventData(document.RootElement, options); + } + + internal static EdgeSolutionVersionPublishedEventData DeserializeEdgeSolutionVersionPublishedEventData(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string externalValidationId = default; + string targetId = default; + string solutionTemplateId = default; + string solutionTemplateVersionId = default; + string solutionVersionId = default; + string apiVersion = default; + Uri callbackUrl = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("externalValidationId"u8)) + { + externalValidationId = property.Value.GetString(); + continue; + } + if (property.NameEquals("targetId"u8)) + { + targetId = property.Value.GetString(); + continue; + } + if (property.NameEquals("solutionTemplateId"u8)) + { + solutionTemplateId = property.Value.GetString(); + continue; + } + if (property.NameEquals("solutionTemplateVersionId"u8)) + { + solutionTemplateVersionId = property.Value.GetString(); + continue; + } + if (property.NameEquals("solutionVersionId"u8)) + { + solutionVersionId = property.Value.GetString(); + continue; + } + if (property.NameEquals("apiVersion"u8)) + { + apiVersion = property.Value.GetString(); + continue; + } + if (property.NameEquals("callbackUrl"u8)) + { + callbackUrl = new Uri(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new EdgeSolutionVersionPublishedEventData( + externalValidationId, + targetId, + solutionTemplateId, + solutionTemplateVersionId, + solutionVersionId, + apiVersion, + callbackUrl, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(EdgeSolutionVersionPublishedEventData)} does not support writing '{options.Format}' format."); + } + } + + EdgeSolutionVersionPublishedEventData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeEdgeSolutionVersionPublishedEventData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(EdgeSolutionVersionPublishedEventData)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static EdgeSolutionVersionPublishedEventData FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeEdgeSolutionVersionPublishedEventData(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/EdgeSolutionVersionPublishedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/EdgeSolutionVersionPublishedEventData.cs new file mode 100644 index 000000000000..219c36f6fa89 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/EdgeSolutionVersionPublishedEventData.cs @@ -0,0 +1,117 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + /// Schema of the Data property of an EventGridEvent for a Microsoft.Edge.SolutionVersionPublished event. + public partial class EdgeSolutionVersionPublishedEventData + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// A GUID to uniquely track External Solution Validation. + /// ARM ID of the Target resource. + /// ARM ID of the Solution Template resource. + /// ARM ID of the Solution Template Version resource. + /// ARM ID of the Solution Version resource. + /// API Version supported for the resources. + /// Direct URL to callback for updating validation status. + /// , , , , , or is null. + internal EdgeSolutionVersionPublishedEventData(string externalValidationId, string targetId, string solutionTemplateId, string solutionTemplateVersionId, string solutionVersionId, string apiVersion, Uri callbackUrl) + { + Argument.AssertNotNull(externalValidationId, nameof(externalValidationId)); + Argument.AssertNotNull(targetId, nameof(targetId)); + Argument.AssertNotNull(solutionTemplateId, nameof(solutionTemplateId)); + Argument.AssertNotNull(solutionTemplateVersionId, nameof(solutionTemplateVersionId)); + Argument.AssertNotNull(solutionVersionId, nameof(solutionVersionId)); + Argument.AssertNotNull(apiVersion, nameof(apiVersion)); + Argument.AssertNotNull(callbackUrl, nameof(callbackUrl)); + + ExternalValidationId = externalValidationId; + TargetId = targetId; + SolutionTemplateId = solutionTemplateId; + SolutionTemplateVersionId = solutionTemplateVersionId; + SolutionVersionId = solutionVersionId; + ApiVersion = apiVersion; + CallbackUrl = callbackUrl; + } + + /// Initializes a new instance of . + /// A GUID to uniquely track External Solution Validation. + /// ARM ID of the Target resource. + /// ARM ID of the Solution Template resource. + /// ARM ID of the Solution Template Version resource. + /// ARM ID of the Solution Version resource. + /// API Version supported for the resources. + /// Direct URL to callback for updating validation status. + /// Keeps track of any properties unknown to the library. + internal EdgeSolutionVersionPublishedEventData(string externalValidationId, string targetId, string solutionTemplateId, string solutionTemplateVersionId, string solutionVersionId, string apiVersion, Uri callbackUrl, IDictionary serializedAdditionalRawData) + { + ExternalValidationId = externalValidationId; + TargetId = targetId; + SolutionTemplateId = solutionTemplateId; + SolutionTemplateVersionId = solutionTemplateVersionId; + SolutionVersionId = solutionVersionId; + ApiVersion = apiVersion; + CallbackUrl = callbackUrl; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal EdgeSolutionVersionPublishedEventData() + { + } + + /// A GUID to uniquely track External Solution Validation. + public string ExternalValidationId { get; } + /// ARM ID of the Target resource. + public string TargetId { get; } + /// ARM ID of the Solution Template resource. + public string SolutionTemplateId { get; } + /// ARM ID of the Solution Template Version resource. + public string SolutionTemplateVersionId { get; } + /// ARM ID of the Solution Version resource. + public string SolutionVersionId { get; } + /// API Version supported for the resources. + public string ApiVersion { get; } + /// Direct URL to callback for updating validation status. + public Uri CallbackUrl { get; } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/EventGridSystemEventsModelFactory.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/EventGridSystemEventsModelFactory.cs index c32e1356b70a..927298b3acb3 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/EventGridSystemEventsModelFactory.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/EventGridSystemEventsModelFactory.cs @@ -251,6 +251,77 @@ public static ApiManagementGatewayApiRemovedEventData ApiManagementGatewayApiRem return new ApiManagementGatewayApiRemovedEventData(resourceUri, serializedAdditionalRawData: null); } + /// Initializes a new instance of . + /// Name of the backend for which the circuit has opened. + /// Information related to the circuit breaker configured on the backend. + /// A new instance for mocking. + public static ApiManagementCircuitBreakerOpenedEventData ApiManagementCircuitBreakerOpenedEventData(string backendName = null, ApiManagementCircuitBreakerProperties circuitBreaker = null) + { + return new ApiManagementCircuitBreakerOpenedEventData(backendName, circuitBreaker, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Overview of all configured rules and respective details. + /// A new instance for mocking. + public static ApiManagementCircuitBreakerProperties ApiManagementCircuitBreakerProperties(IReadOnlyDictionary rules = null) + { + rules ??= new Dictionary(); + + return new ApiManagementCircuitBreakerProperties(rules, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Name of the backend for which the circuit has closed. + /// Information related to the circuit breaker configured on the backend. + /// A new instance for mocking. + public static ApiManagementCircuitBreakerClosedEventData ApiManagementCircuitBreakerClosedEventData(string backendName = null, ApiManagementCircuitBreakerProperties circuitBreaker = null) + { + return new ApiManagementCircuitBreakerClosedEventData(backendName, circuitBreaker, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Information related to a given self-hosted gateway deployment. + /// Information related to a an expired gateway token for a self-hosted gateway deployment. + /// A new instance for mocking. + public static ApiManagementGatewayTokenNearExpiryEventData ApiManagementGatewayTokenNearExpiryEventData(ApiManagementGatewayProperties gatewayInfo = null, ApiManagementNearExpiryGatewayTokenProperties tokenInfo = null) + { + return new ApiManagementGatewayTokenNearExpiryEventData(gatewayInfo, tokenInfo, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Id of Gateway that is used to deploy the gateway to get the configuration for. This is the ARM resource ID referenced in the Azure API Management instance. Uses the format, `/subscriptions/<SubscriptionID>/resourceGroups/<ResourceGroup>/Microsoft.ApiManagement/service/<ServiceName>/gateway/<GatewayName>`. + /// Unique instance ID of the deployed gateway. + /// A new instance for mocking. + public static ApiManagementGatewayProperties ApiManagementGatewayProperties(string gatewayId = null, string instanceId = null) + { + return new ApiManagementGatewayProperties(gatewayId, instanceId, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Timestamp when the gateway token will expire. + /// A new instance for mocking. + public static ApiManagementNearExpiryGatewayTokenProperties ApiManagementNearExpiryGatewayTokenProperties(DateTimeOffset expiredAtUtc = default) + { + return new ApiManagementNearExpiryGatewayTokenProperties(expiredAtUtc, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Information related to a given self-hosted gateway deployment. + /// Information related to a an expired gateway token for a self-hosted gateway deployment. + /// A new instance for mocking. + public static ApiManagementGatewayTokenExpiredEventData ApiManagementGatewayTokenExpiredEventData(ApiManagementGatewayProperties gatewayInfo = null, ApiManagementExpiredGatewayTokenProperties tokenInfo = null) + { + return new ApiManagementGatewayTokenExpiredEventData(gatewayInfo, tokenInfo, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Timestamp when the gateway token has expired. + /// A new instance for mocking. + public static ApiManagementExpiredGatewayTokenProperties ApiManagementExpiredGatewayTokenProperties(DateTimeOffset expiredAtUtc = default) + { + return new ApiManagementExpiredGatewayTokenProperties(expiredAtUtc, serializedAdditionalRawData: null); + } + /// Initializes a new instance of . /// The key used to identify the key-value that was modified. /// The label, if any, used to identify the key-value that was modified. @@ -1395,18 +1466,18 @@ public static AcsRouterJobClassificationFailedEventData AcsRouterJobClassificati /// Router Communication Error Message. /// Router Communication Error Target. /// Router Communication Inner Error. - /// List of Router Communication Errors. + /// List of Router Communication Errors. /// A new instance for mocking. - public static AcsRouterCommunicationError AcsRouterCommunicationError(string code = null, string message = null, string target = null, AcsRouterCommunicationError innererror = null, IEnumerable details = null) + public static AcsRouterCommunicationError AcsRouterCommunicationError(string code = null, string message = null, string target = null, AcsRouterCommunicationError innererror = null, IEnumerable errors = null) { - details ??= new List(); + errors ??= new List(); return new AcsRouterCommunicationError( code, message, target, innererror, - details?.ToList(), + errors?.ToList(), serializedAdditionalRawData: null); } @@ -2474,6 +2545,28 @@ public static DataBoxOrderCompletedEventData DataBoxOrderCompletedEventData(stri return new DataBoxOrderCompletedEventData(serialNumber, stageName, stageTime, serializedAdditionalRawData: null); } + /// Initializes a new instance of . + /// A GUID to uniquely track External Solution Validation. + /// ARM ID of the Target resource. + /// ARM ID of the Solution Template resource. + /// ARM ID of the Solution Template Version resource. + /// ARM ID of the Solution Version resource. + /// API Version supported for the resources. + /// Direct URL to callback for updating validation status. + /// A new instance for mocking. + public static EdgeSolutionVersionPublishedEventData EdgeSolutionVersionPublishedEventData(string externalValidationId = null, string targetId = null, string solutionTemplateId = null, string solutionTemplateVersionId = null, string solutionVersionId = null, string apiVersion = null, Uri callbackUrl = null) + { + return new EdgeSolutionVersionPublishedEventData( + externalValidationId, + targetId, + solutionTemplateId, + solutionTemplateVersionId, + solutionVersionId, + apiVersion, + callbackUrl, + serializedAdditionalRawData: null); + } + /// Initializes a new instance of . /// The path to the capture file. /// The file type of the capture file. diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/EventHubCaptureFileCreatedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/EventHubCaptureFileCreatedEventData.Serialization.cs index 19dde868710b..e7187c3cd8f2 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/EventHubCaptureFileCreatedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/EventHubCaptureFileCreatedEventData.Serialization.cs @@ -34,21 +34,12 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(EventHubCaptureFileCreatedEventData)} does not support writing '{format}' format."); } - if (Optional.IsDefined(Fileurl)) - { - writer.WritePropertyName("fileUrl"u8); - writer.WriteStringValue(Fileurl); - } - if (Optional.IsDefined(FileType)) - { - writer.WritePropertyName("fileType"u8); - writer.WriteStringValue(FileType); - } - if (Optional.IsDefined(PartitionId)) - { - writer.WritePropertyName("partitionId"u8); - writer.WriteStringValue(PartitionId); - } + writer.WritePropertyName("fileUrl"u8); + writer.WriteStringValue(Fileurl); + writer.WritePropertyName("fileType"u8); + writer.WriteStringValue(FileType); + writer.WritePropertyName("partitionId"u8); + writer.WriteStringValue(PartitionId); if (Optional.IsDefined(SizeInBytes)) { writer.WritePropertyName("sizeInBytes"u8); diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/EventHubCaptureFileCreatedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/EventHubCaptureFileCreatedEventData.cs index ff8f7f2a0e35..5f9b01e7d9f9 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/EventHubCaptureFileCreatedEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/EventHubCaptureFileCreatedEventData.cs @@ -46,8 +46,19 @@ public partial class EventHubCaptureFileCreatedEventData private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - internal EventHubCaptureFileCreatedEventData() + /// The path to the capture file. + /// The file type of the capture file. + /// The shard ID. + /// , or is null. + internal EventHubCaptureFileCreatedEventData(string fileurl, string fileType, string partitionId) { + Argument.AssertNotNull(fileurl, nameof(fileurl)); + Argument.AssertNotNull(fileType, nameof(fileType)); + Argument.AssertNotNull(partitionId, nameof(partitionId)); + + Fileurl = fileurl; + FileType = fileType; + PartitionId = partitionId; } /// Initializes a new instance of . @@ -75,6 +86,11 @@ internal EventHubCaptureFileCreatedEventData(string fileurl, string fileType, st _serializedAdditionalRawData = serializedAdditionalRawData; } + /// Initializes a new instance of for deserialization. + internal EventHubCaptureFileCreatedEventData() + { + } + /// The path to the capture file. public string Fileurl { get; } /// The file type of the capture file. diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MachineLearningServicesDatasetDriftDetectedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MachineLearningServicesDatasetDriftDetectedEventData.Serialization.cs index ddbbe5a5defc..4ed4a9962eaf 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MachineLearningServicesDatasetDriftDetectedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MachineLearningServicesDatasetDriftDetectedEventData.Serialization.cs @@ -34,31 +34,16 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(MachineLearningServicesDatasetDriftDetectedEventData)} does not support writing '{format}' format."); } - if (Optional.IsDefined(DataDriftId)) - { - writer.WritePropertyName("dataDriftId"u8); - writer.WriteStringValue(DataDriftId); - } - if (Optional.IsDefined(DataDriftName)) - { - writer.WritePropertyName("dataDriftName"u8); - writer.WriteStringValue(DataDriftName); - } - if (Optional.IsDefined(RunId)) - { - writer.WritePropertyName("runId"u8); - writer.WriteStringValue(RunId); - } - if (Optional.IsDefined(BaseDatasetId)) - { - writer.WritePropertyName("baseDatasetId"u8); - writer.WriteStringValue(BaseDatasetId); - } - if (Optional.IsDefined(TargetDatasetId)) - { - writer.WritePropertyName("targetDatasetId"u8); - writer.WriteStringValue(TargetDatasetId); - } + writer.WritePropertyName("dataDriftId"u8); + writer.WriteStringValue(DataDriftId); + writer.WritePropertyName("dataDriftName"u8); + writer.WriteStringValue(DataDriftName); + writer.WritePropertyName("runId"u8); + writer.WriteStringValue(RunId); + writer.WritePropertyName("baseDatasetId"u8); + writer.WriteStringValue(BaseDatasetId); + writer.WritePropertyName("targetDatasetId"u8); + writer.WriteStringValue(TargetDatasetId); if (Optional.IsDefined(DriftCoefficient)) { writer.WritePropertyName("driftCoefficient"u8); @@ -66,13 +51,27 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } if (Optional.IsDefined(StartTime)) { - writer.WritePropertyName("startTime"u8); - writer.WriteStringValue(StartTime.Value, "O"); + if (StartTime != null) + { + writer.WritePropertyName("startTime"u8); + writer.WriteStringValue(StartTime.Value, "O"); + } + else + { + writer.WriteNull("startTime"); + } } if (Optional.IsDefined(EndTime)) { - writer.WritePropertyName("endTime"u8); - writer.WriteStringValue(EndTime.Value, "O"); + if (EndTime != null) + { + writer.WritePropertyName("endTime"u8); + writer.WriteStringValue(EndTime.Value, "O"); + } + else + { + writer.WriteNull("endTime"); + } } if (options.Format != "W" && _serializedAdditionalRawData != null) { @@ -161,6 +160,7 @@ internal static MachineLearningServicesDatasetDriftDetectedEventData Deserialize { if (property.Value.ValueKind == JsonValueKind.Null) { + startTime = null; continue; } startTime = property.Value.GetDateTimeOffset("O"); @@ -170,6 +170,7 @@ internal static MachineLearningServicesDatasetDriftDetectedEventData Deserialize { if (property.Value.ValueKind == JsonValueKind.Null) { + endTime = null; continue; } endTime = property.Value.GetDateTimeOffset("O"); diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MachineLearningServicesDatasetDriftDetectedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MachineLearningServicesDatasetDriftDetectedEventData.cs index f86f30e006be..66d7e5943085 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MachineLearningServicesDatasetDriftDetectedEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MachineLearningServicesDatasetDriftDetectedEventData.cs @@ -46,8 +46,25 @@ public partial class MachineLearningServicesDatasetDriftDetectedEventData private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - internal MachineLearningServicesDatasetDriftDetectedEventData() + /// The ID of the data drift monitor that triggered the event. + /// The name of the data drift monitor that triggered the event. + /// The ID of the Run that detected data drift. + /// The ID of the base Dataset used to detect drift. + /// The ID of the target Dataset used to detect drift. + /// , , , or is null. + internal MachineLearningServicesDatasetDriftDetectedEventData(string dataDriftId, string dataDriftName, string runId, string baseDatasetId, string targetDatasetId) { + Argument.AssertNotNull(dataDriftId, nameof(dataDriftId)); + Argument.AssertNotNull(dataDriftName, nameof(dataDriftName)); + Argument.AssertNotNull(runId, nameof(runId)); + Argument.AssertNotNull(baseDatasetId, nameof(baseDatasetId)); + Argument.AssertNotNull(targetDatasetId, nameof(targetDatasetId)); + + DataDriftId = dataDriftId; + DataDriftName = dataDriftName; + RunId = runId; + BaseDatasetId = baseDatasetId; + TargetDatasetId = targetDatasetId; } /// Initializes a new instance of . @@ -73,6 +90,11 @@ internal MachineLearningServicesDatasetDriftDetectedEventData(string dataDriftId _serializedAdditionalRawData = serializedAdditionalRawData; } + /// Initializes a new instance of for deserialization. + internal MachineLearningServicesDatasetDriftDetectedEventData() + { + } + /// The ID of the data drift monitor that triggered the event. public string DataDriftId { get; } /// The name of the data drift monitor that triggered the event. diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MachineLearningServicesModelDeployedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MachineLearningServicesModelDeployedEventData.Serialization.cs index bc2c9c9fb87b..4e8e161a8da2 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MachineLearningServicesModelDeployedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MachineLearningServicesModelDeployedEventData.Serialization.cs @@ -34,61 +34,58 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(MachineLearningServicesModelDeployedEventData)} does not support writing '{format}' format."); } - if (Optional.IsDefined(ServiceName)) + writer.WritePropertyName("serviceName"u8); + writer.WriteStringValue(ServiceName); + writer.WritePropertyName("serviceComputeType"u8); + writer.WriteStringValue(ServiceComputeType); + writer.WritePropertyName("modelIds"u8); + writer.WriteStringValue(ModelIds); + if (Optional.IsCollectionDefined(ServiceTags)) { - writer.WritePropertyName("serviceName"u8); - writer.WriteStringValue(ServiceName); - } - if (Optional.IsDefined(ServiceComputeType)) - { - writer.WritePropertyName("serviceComputeType"u8); - writer.WriteStringValue(ServiceComputeType); - } - if (Optional.IsDefined(ModelIds)) - { - writer.WritePropertyName("modelIds"u8); - writer.WriteStringValue(ModelIds); - } - writer.WritePropertyName("serviceTags"u8); - writer.WriteStartObject(); - foreach (var item in ServiceTags) - { - writer.WritePropertyName(item.Key); - if (item.Value == null) + writer.WritePropertyName("serviceTags"u8); + writer.WriteStartObject(); + foreach (var item in ServiceTags) { - writer.WriteNullValue(); - continue; - } + writer.WritePropertyName(item.Key); + if (item.Value == null) + { + writer.WriteNullValue(); + continue; + } #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); #else - using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } #endif + } + writer.WriteEndObject(); } - writer.WriteEndObject(); - writer.WritePropertyName("serviceProperties"u8); - writer.WriteStartObject(); - foreach (var item in ServiceProperties) + if (Optional.IsCollectionDefined(ServiceProperties)) { - writer.WritePropertyName(item.Key); - if (item.Value == null) + writer.WritePropertyName("serviceProperties"u8); + writer.WriteStartObject(); + foreach (var item in ServiceProperties) { - writer.WriteNullValue(); - continue; - } + writer.WritePropertyName(item.Key); + if (item.Value == null) + { + writer.WriteNullValue(); + continue; + } #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); #else - using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } #endif + } + writer.WriteEndObject(); } - writer.WriteEndObject(); if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -152,6 +149,10 @@ internal static MachineLearningServicesModelDeployedEventData DeserializeMachine } if (property.NameEquals("serviceTags"u8)) { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } Dictionary dictionary = new Dictionary(); foreach (var property0 in property.Value.EnumerateObject()) { @@ -169,6 +170,10 @@ internal static MachineLearningServicesModelDeployedEventData DeserializeMachine } if (property.NameEquals("serviceProperties"u8)) { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } Dictionary dictionary = new Dictionary(); foreach (var property0 in property.Value.EnumerateObject()) { @@ -194,8 +199,8 @@ internal static MachineLearningServicesModelDeployedEventData DeserializeMachine serviceName, serviceComputeType, modelIds, - serviceTags, - serviceProperties, + serviceTags ?? new ChangeTrackingDictionary(), + serviceProperties ?? new ChangeTrackingDictionary(), serializedAdditionalRawData); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MachineLearningServicesModelDeployedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MachineLearningServicesModelDeployedEventData.cs index 8d759992c57d..86cce0670b04 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MachineLearningServicesModelDeployedEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MachineLearningServicesModelDeployedEventData.cs @@ -46,16 +46,21 @@ public partial class MachineLearningServicesModelDeployedEventData private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - /// The tags of the deployed service. - /// The properties of the deployed service. - /// or is null. - internal MachineLearningServicesModelDeployedEventData(IReadOnlyDictionary serviceTags, IReadOnlyDictionary serviceProperties) + /// The name of the deployed service. + /// The compute type (e.g. ACI, AKS) of the deployed service. + /// A common separated list of model IDs. The IDs of the models deployed in the service. + /// , or is null. + internal MachineLearningServicesModelDeployedEventData(string serviceName, string serviceComputeType, string modelIds) { - Argument.AssertNotNull(serviceTags, nameof(serviceTags)); - Argument.AssertNotNull(serviceProperties, nameof(serviceProperties)); + Argument.AssertNotNull(serviceName, nameof(serviceName)); + Argument.AssertNotNull(serviceComputeType, nameof(serviceComputeType)); + Argument.AssertNotNull(modelIds, nameof(modelIds)); - ServiceTags = serviceTags; - ServiceProperties = serviceProperties; + ServiceName = serviceName; + ServiceComputeType = serviceComputeType; + ModelIds = modelIds; + ServiceTags = new ChangeTrackingDictionary(); + ServiceProperties = new ChangeTrackingDictionary(); } /// Initializes a new instance of . diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MachineLearningServicesModelRegisteredEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MachineLearningServicesModelRegisteredEventData.Serialization.cs index 6e6446370ca4..f51226031422 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MachineLearningServicesModelRegisteredEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MachineLearningServicesModelRegisteredEventData.Serialization.cs @@ -34,56 +34,56 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(MachineLearningServicesModelRegisteredEventData)} does not support writing '{format}' format."); } - if (Optional.IsDefined(ModelName)) + writer.WritePropertyName("modelName"u8); + writer.WriteStringValue(ModelName); + writer.WritePropertyName("modelVersion"u8); + writer.WriteStringValue(ModelVersion); + if (Optional.IsCollectionDefined(ModelTags)) { - writer.WritePropertyName("modelName"u8); - writer.WriteStringValue(ModelName); - } - if (Optional.IsDefined(ModelVersion)) - { - writer.WritePropertyName("modelVersion"u8); - writer.WriteStringValue(ModelVersion); - } - writer.WritePropertyName("modelTags"u8); - writer.WriteStartObject(); - foreach (var item in ModelTags) - { - writer.WritePropertyName(item.Key); - if (item.Value == null) + writer.WritePropertyName("modelTags"u8); + writer.WriteStartObject(); + foreach (var item in ModelTags) { - writer.WriteNullValue(); - continue; - } + writer.WritePropertyName(item.Key); + if (item.Value == null) + { + writer.WriteNullValue(); + continue; + } #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); #else - using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } #endif + } + writer.WriteEndObject(); } - writer.WriteEndObject(); - writer.WritePropertyName("modelProperties"u8); - writer.WriteStartObject(); - foreach (var item in ModelProperties) + if (Optional.IsCollectionDefined(ModelProperties)) { - writer.WritePropertyName(item.Key); - if (item.Value == null) + writer.WritePropertyName("modelProperties"u8); + writer.WriteStartObject(); + foreach (var item in ModelProperties) { - writer.WriteNullValue(); - continue; - } + writer.WritePropertyName(item.Key); + if (item.Value == null) + { + writer.WriteNullValue(); + continue; + } #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); #else - using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } #endif + } + writer.WriteEndObject(); } - writer.WriteEndObject(); if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -141,6 +141,10 @@ internal static MachineLearningServicesModelRegisteredEventData DeserializeMachi } if (property.NameEquals("modelTags"u8)) { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } Dictionary dictionary = new Dictionary(); foreach (var property0 in property.Value.EnumerateObject()) { @@ -158,6 +162,10 @@ internal static MachineLearningServicesModelRegisteredEventData DeserializeMachi } if (property.NameEquals("modelProperties"u8)) { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } Dictionary dictionary = new Dictionary(); foreach (var property0 in property.Value.EnumerateObject()) { @@ -179,7 +187,7 @@ internal static MachineLearningServicesModelRegisteredEventData DeserializeMachi } } serializedAdditionalRawData = rawDataDictionary; - return new MachineLearningServicesModelRegisteredEventData(modelName, modelVersion, modelTags, modelProperties, serializedAdditionalRawData); + return new MachineLearningServicesModelRegisteredEventData(modelName, modelVersion, modelTags ?? new ChangeTrackingDictionary(), modelProperties ?? new ChangeTrackingDictionary(), serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MachineLearningServicesModelRegisteredEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MachineLearningServicesModelRegisteredEventData.cs index 66af5a595773..e844c536e50b 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MachineLearningServicesModelRegisteredEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MachineLearningServicesModelRegisteredEventData.cs @@ -46,16 +46,18 @@ public partial class MachineLearningServicesModelRegisteredEventData private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - /// The tags of the model that was registered. - /// The properties of the model that was registered. - /// or is null. - internal MachineLearningServicesModelRegisteredEventData(IReadOnlyDictionary modelTags, IReadOnlyDictionary modelProperties) + /// The name of the model that was registered. + /// The version of the model that was registered. + /// or is null. + internal MachineLearningServicesModelRegisteredEventData(string modelName, string modelVersion) { - Argument.AssertNotNull(modelTags, nameof(modelTags)); - Argument.AssertNotNull(modelProperties, nameof(modelProperties)); + Argument.AssertNotNull(modelName, nameof(modelName)); + Argument.AssertNotNull(modelVersion, nameof(modelVersion)); - ModelTags = modelTags; - ModelProperties = modelProperties; + ModelName = modelName; + ModelVersion = modelVersion; + ModelTags = new ChangeTrackingDictionary(); + ModelProperties = new ChangeTrackingDictionary(); } /// Initializes a new instance of . diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MachineLearningServicesRunCompletedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MachineLearningServicesRunCompletedEventData.Serialization.cs index 218cd1801335..62dd83415d96 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MachineLearningServicesRunCompletedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MachineLearningServicesRunCompletedEventData.Serialization.cs @@ -34,66 +34,60 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(MachineLearningServicesRunCompletedEventData)} does not support writing '{format}' format."); } - if (Optional.IsDefined(ExperimentId)) + writer.WritePropertyName("experimentId"u8); + writer.WriteStringValue(ExperimentId); + writer.WritePropertyName("experimentName"u8); + writer.WriteStringValue(ExperimentName); + writer.WritePropertyName("runId"u8); + writer.WriteStringValue(RunId); + writer.WritePropertyName("runType"u8); + writer.WriteStringValue(RunType); + if (Optional.IsCollectionDefined(RunTags)) { - writer.WritePropertyName("experimentId"u8); - writer.WriteStringValue(ExperimentId); - } - if (Optional.IsDefined(ExperimentName)) - { - writer.WritePropertyName("experimentName"u8); - writer.WriteStringValue(ExperimentName); - } - if (Optional.IsDefined(RunId)) - { - writer.WritePropertyName("runId"u8); - writer.WriteStringValue(RunId); - } - if (Optional.IsDefined(RunType)) - { - writer.WritePropertyName("runType"u8); - writer.WriteStringValue(RunType); - } - writer.WritePropertyName("runTags"u8); - writer.WriteStartObject(); - foreach (var item in RunTags) - { - writer.WritePropertyName(item.Key); - if (item.Value == null) + writer.WritePropertyName("runTags"u8); + writer.WriteStartObject(); + foreach (var item in RunTags) { - writer.WriteNullValue(); - continue; - } + writer.WritePropertyName(item.Key); + if (item.Value == null) + { + writer.WriteNullValue(); + continue; + } #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); #else - using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } #endif + } + writer.WriteEndObject(); } - writer.WriteEndObject(); - writer.WritePropertyName("runProperties"u8); - writer.WriteStartObject(); - foreach (var item in RunProperties) + if (Optional.IsCollectionDefined(RunProperties)) { - writer.WritePropertyName(item.Key); - if (item.Value == null) + writer.WritePropertyName("runProperties"u8); + writer.WriteStartObject(); + foreach (var item in RunProperties) { - writer.WriteNullValue(); - continue; - } + writer.WritePropertyName(item.Key); + if (item.Value == null) + { + writer.WriteNullValue(); + continue; + } #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); #else - using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } #endif + } + writer.WriteEndObject(); } - writer.WriteEndObject(); if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -163,6 +157,10 @@ internal static MachineLearningServicesRunCompletedEventData DeserializeMachineL } if (property.NameEquals("runTags"u8)) { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } Dictionary dictionary = new Dictionary(); foreach (var property0 in property.Value.EnumerateObject()) { @@ -180,6 +178,10 @@ internal static MachineLearningServicesRunCompletedEventData DeserializeMachineL } if (property.NameEquals("runProperties"u8)) { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } Dictionary dictionary = new Dictionary(); foreach (var property0 in property.Value.EnumerateObject()) { @@ -206,8 +208,8 @@ internal static MachineLearningServicesRunCompletedEventData DeserializeMachineL experimentName, runId, runType, - runTags, - runProperties, + runTags ?? new ChangeTrackingDictionary(), + runProperties ?? new ChangeTrackingDictionary(), serializedAdditionalRawData); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MachineLearningServicesRunCompletedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MachineLearningServicesRunCompletedEventData.cs index e8c1fb9d4264..bbfe86bdb3e6 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MachineLearningServicesRunCompletedEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MachineLearningServicesRunCompletedEventData.cs @@ -46,16 +46,24 @@ public partial class MachineLearningServicesRunCompletedEventData private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - /// The tags of the completed Run. - /// The properties of the completed Run. - /// or is null. - internal MachineLearningServicesRunCompletedEventData(IReadOnlyDictionary runTags, IReadOnlyDictionary runProperties) + /// The ID of the experiment that the run belongs to. + /// The name of the experiment that the run belongs to. + /// The ID of the Run that was completed. + /// The Run Type of the completed Run. + /// , , or is null. + internal MachineLearningServicesRunCompletedEventData(string experimentId, string experimentName, string runId, string runType) { - Argument.AssertNotNull(runTags, nameof(runTags)); - Argument.AssertNotNull(runProperties, nameof(runProperties)); + Argument.AssertNotNull(experimentId, nameof(experimentId)); + Argument.AssertNotNull(experimentName, nameof(experimentName)); + Argument.AssertNotNull(runId, nameof(runId)); + Argument.AssertNotNull(runType, nameof(runType)); - RunTags = runTags; - RunProperties = runProperties; + ExperimentId = experimentId; + ExperimentName = experimentName; + RunId = runId; + RunType = runType; + RunTags = new ChangeTrackingDictionary(); + RunProperties = new ChangeTrackingDictionary(); } /// Initializes a new instance of . diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MachineLearningServicesRunStatusChangedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MachineLearningServicesRunStatusChangedEventData.Serialization.cs index 520679135bb8..1efc53ac3c3b 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MachineLearningServicesRunStatusChangedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MachineLearningServicesRunStatusChangedEventData.Serialization.cs @@ -34,71 +34,62 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(MachineLearningServicesRunStatusChangedEventData)} does not support writing '{format}' format."); } - if (Optional.IsDefined(ExperimentId)) + writer.WritePropertyName("experimentId"u8); + writer.WriteStringValue(ExperimentId); + writer.WritePropertyName("experimentName"u8); + writer.WriteStringValue(ExperimentName); + writer.WritePropertyName("runId"u8); + writer.WriteStringValue(RunId); + writer.WritePropertyName("runType"u8); + writer.WriteStringValue(RunType); + if (Optional.IsCollectionDefined(RunTags)) { - writer.WritePropertyName("experimentId"u8); - writer.WriteStringValue(ExperimentId); - } - if (Optional.IsDefined(ExperimentName)) - { - writer.WritePropertyName("experimentName"u8); - writer.WriteStringValue(ExperimentName); - } - if (Optional.IsDefined(RunId)) - { - writer.WritePropertyName("runId"u8); - writer.WriteStringValue(RunId); - } - if (Optional.IsDefined(RunType)) - { - writer.WritePropertyName("runType"u8); - writer.WriteStringValue(RunType); - } - writer.WritePropertyName("runTags"u8); - writer.WriteStartObject(); - foreach (var item in RunTags) - { - writer.WritePropertyName(item.Key); - if (item.Value == null) + writer.WritePropertyName("runTags"u8); + writer.WriteStartObject(); + foreach (var item in RunTags) { - writer.WriteNullValue(); - continue; - } + writer.WritePropertyName(item.Key); + if (item.Value == null) + { + writer.WriteNullValue(); + continue; + } #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); #else - using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } #endif + } + writer.WriteEndObject(); } - writer.WriteEndObject(); - writer.WritePropertyName("runProperties"u8); - writer.WriteStartObject(); - foreach (var item in RunProperties) + if (Optional.IsCollectionDefined(RunProperties)) { - writer.WritePropertyName(item.Key); - if (item.Value == null) + writer.WritePropertyName("runProperties"u8); + writer.WriteStartObject(); + foreach (var item in RunProperties) { - writer.WriteNullValue(); - continue; - } + writer.WritePropertyName(item.Key); + if (item.Value == null) + { + writer.WriteNullValue(); + continue; + } #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); #else - using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } #endif + } + writer.WriteEndObject(); } - writer.WriteEndObject(); - if (Optional.IsDefined(RunStatus)) - { - writer.WritePropertyName("runStatus"u8); - writer.WriteStringValue(RunStatus); - } + writer.WritePropertyName("runStatus"u8); + writer.WriteStringValue(RunStatus); if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -169,6 +160,10 @@ internal static MachineLearningServicesRunStatusChangedEventData DeserializeMach } if (property.NameEquals("runTags"u8)) { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } Dictionary dictionary = new Dictionary(); foreach (var property0 in property.Value.EnumerateObject()) { @@ -186,6 +181,10 @@ internal static MachineLearningServicesRunStatusChangedEventData DeserializeMach } if (property.NameEquals("runProperties"u8)) { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } Dictionary dictionary = new Dictionary(); foreach (var property0 in property.Value.EnumerateObject()) { @@ -217,8 +216,8 @@ internal static MachineLearningServicesRunStatusChangedEventData DeserializeMach experimentName, runId, runType, - runTags, - runProperties, + runTags ?? new ChangeTrackingDictionary(), + runProperties ?? new ChangeTrackingDictionary(), runStatus, serializedAdditionalRawData); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MachineLearningServicesRunStatusChangedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MachineLearningServicesRunStatusChangedEventData.cs index 8af67e302b82..c7c35d6ed14e 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MachineLearningServicesRunStatusChangedEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MachineLearningServicesRunStatusChangedEventData.cs @@ -46,16 +46,27 @@ public partial class MachineLearningServicesRunStatusChangedEventData private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - /// The tags of the Machine Learning Run. - /// The properties of the Machine Learning Run. - /// or is null. - internal MachineLearningServicesRunStatusChangedEventData(IReadOnlyDictionary runTags, IReadOnlyDictionary runProperties) + /// The ID of the experiment that the Machine Learning Run belongs to. + /// The name of the experiment that the Machine Learning Run belongs to. + /// The ID of the Machine Learning Run. + /// The Run Type of the Machine Learning Run. + /// The status of the Machine Learning Run. + /// , , , or is null. + internal MachineLearningServicesRunStatusChangedEventData(string experimentId, string experimentName, string runId, string runType, string runStatus) { - Argument.AssertNotNull(runTags, nameof(runTags)); - Argument.AssertNotNull(runProperties, nameof(runProperties)); + Argument.AssertNotNull(experimentId, nameof(experimentId)); + Argument.AssertNotNull(experimentName, nameof(experimentName)); + Argument.AssertNotNull(runId, nameof(runId)); + Argument.AssertNotNull(runType, nameof(runType)); + Argument.AssertNotNull(runStatus, nameof(runStatus)); - RunTags = runTags; - RunProperties = runProperties; + ExperimentId = experimentId; + ExperimentName = experimentName; + RunId = runId; + RunType = runType; + RunTags = new ChangeTrackingDictionary(); + RunProperties = new ChangeTrackingDictionary(); + RunStatus = runStatus; } /// Initializes a new instance of . diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MapsGeofenceEnteredEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MapsGeofenceEnteredEventData.cs index 51ab73b06dc2..917a81f6db1a 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MapsGeofenceEnteredEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MapsGeofenceEnteredEventData.cs @@ -14,15 +14,8 @@ namespace Azure.Messaging.EventGrid.SystemEvents public partial class MapsGeofenceEnteredEventData : MapsGeofenceEventProperties { /// Initializes a new instance of . - /// Lists of the geometry ID of the geofence which is expired relative to the user time in the request. - /// Lists the fence geometries that either fully contain the coordinate position or have an overlap with the searchBuffer around the fence. - /// Lists of the geometry ID of the geofence which is in invalid period relative to the user time in the request. - /// , or is null. - internal MapsGeofenceEnteredEventData(IEnumerable expiredGeofenceGeometryId, IEnumerable geometries, IEnumerable invalidPeriodGeofenceGeometryId) : base(expiredGeofenceGeometryId, geometries, invalidPeriodGeofenceGeometryId) + internal MapsGeofenceEnteredEventData() { - Argument.AssertNotNull(expiredGeofenceGeometryId, nameof(expiredGeofenceGeometryId)); - Argument.AssertNotNull(geometries, nameof(geometries)); - Argument.AssertNotNull(invalidPeriodGeofenceGeometryId, nameof(invalidPeriodGeofenceGeometryId)); } /// Initializes a new instance of . @@ -34,10 +27,5 @@ internal MapsGeofenceEnteredEventData(IEnumerable expiredGeofenceGeometr internal MapsGeofenceEnteredEventData(IReadOnlyList expiredGeofenceGeometryId, IReadOnlyList geometries, IReadOnlyList invalidPeriodGeofenceGeometryId, bool? isEventPublished, IDictionary serializedAdditionalRawData) : base(expiredGeofenceGeometryId, geometries, invalidPeriodGeofenceGeometryId, isEventPublished, serializedAdditionalRawData) { } - - /// Initializes a new instance of for deserialization. - internal MapsGeofenceEnteredEventData() - { - } } } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MapsGeofenceEventProperties.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MapsGeofenceEventProperties.Serialization.cs index 7e144514b942..ce2204e4876e 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MapsGeofenceEventProperties.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MapsGeofenceEventProperties.Serialization.cs @@ -34,27 +34,36 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(MapsGeofenceEventProperties)} does not support writing '{format}' format."); } - writer.WritePropertyName("expiredGeofenceGeometryId"u8); - writer.WriteStartArray(); - foreach (var item in ExpiredGeofenceGeometryId) + if (options.Format != "W") { - writer.WriteStringValue(item); + writer.WritePropertyName("expiredGeofenceGeometryId"u8); + writer.WriteStartArray(); + foreach (var item in ExpiredGeofenceGeometryId) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); } - writer.WriteEndArray(); - writer.WritePropertyName("geometries"u8); - writer.WriteStartArray(); - foreach (var item in Geometries) + if (options.Format != "W") { - writer.WriteObjectValue(item, options); + writer.WritePropertyName("geometries"u8); + writer.WriteStartArray(); + foreach (var item in Geometries) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); } - writer.WriteEndArray(); - writer.WritePropertyName("invalidPeriodGeofenceGeometryId"u8); - writer.WriteStartArray(); - foreach (var item in InvalidPeriodGeofenceGeometryId) + if (options.Format != "W") { - writer.WriteStringValue(item); + writer.WritePropertyName("invalidPeriodGeofenceGeometryId"u8); + writer.WriteStartArray(); + foreach (var item in InvalidPeriodGeofenceGeometryId) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); } - writer.WriteEndArray(); if (Optional.IsDefined(IsEventPublished)) { writer.WritePropertyName("isEventPublished"u8); diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MapsGeofenceEventProperties.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MapsGeofenceEventProperties.cs index 291c97afaace..6535b899695a 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MapsGeofenceEventProperties.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MapsGeofenceEventProperties.cs @@ -7,7 +7,6 @@ using System; using System.Collections.Generic; -using System.Linq; namespace Azure.Messaging.EventGrid.SystemEvents { @@ -47,19 +46,11 @@ public partial class MapsGeofenceEventProperties private protected IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - /// Lists of the geometry ID of the geofence which is expired relative to the user time in the request. - /// Lists the fence geometries that either fully contain the coordinate position or have an overlap with the searchBuffer around the fence. - /// Lists of the geometry ID of the geofence which is in invalid period relative to the user time in the request. - /// , or is null. - internal MapsGeofenceEventProperties(IEnumerable expiredGeofenceGeometryId, IEnumerable geometries, IEnumerable invalidPeriodGeofenceGeometryId) + internal MapsGeofenceEventProperties() { - Argument.AssertNotNull(expiredGeofenceGeometryId, nameof(expiredGeofenceGeometryId)); - Argument.AssertNotNull(geometries, nameof(geometries)); - Argument.AssertNotNull(invalidPeriodGeofenceGeometryId, nameof(invalidPeriodGeofenceGeometryId)); - - ExpiredGeofenceGeometryId = expiredGeofenceGeometryId.ToList(); - Geometries = geometries.ToList(); - InvalidPeriodGeofenceGeometryId = invalidPeriodGeofenceGeometryId.ToList(); + ExpiredGeofenceGeometryId = new ChangeTrackingList(); + Geometries = new ChangeTrackingList(); + InvalidPeriodGeofenceGeometryId = new ChangeTrackingList(); } /// Initializes a new instance of . @@ -77,11 +68,6 @@ internal MapsGeofenceEventProperties(IReadOnlyList expiredGeofenceGeomet _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Initializes a new instance of for deserialization. - internal MapsGeofenceEventProperties() - { - } - /// Lists of the geometry ID of the geofence which is expired relative to the user time in the request. public IReadOnlyList ExpiredGeofenceGeometryId { get; } /// Lists the fence geometries that either fully contain the coordinate position or have an overlap with the searchBuffer around the fence. diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MapsGeofenceExitedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MapsGeofenceExitedEventData.cs index 29a1bc6813bd..ea1b7a3f4635 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MapsGeofenceExitedEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MapsGeofenceExitedEventData.cs @@ -14,15 +14,8 @@ namespace Azure.Messaging.EventGrid.SystemEvents public partial class MapsGeofenceExitedEventData : MapsGeofenceEventProperties { /// Initializes a new instance of . - /// Lists of the geometry ID of the geofence which is expired relative to the user time in the request. - /// Lists the fence geometries that either fully contain the coordinate position or have an overlap with the searchBuffer around the fence. - /// Lists of the geometry ID of the geofence which is in invalid period relative to the user time in the request. - /// , or is null. - internal MapsGeofenceExitedEventData(IEnumerable expiredGeofenceGeometryId, IEnumerable geometries, IEnumerable invalidPeriodGeofenceGeometryId) : base(expiredGeofenceGeometryId, geometries, invalidPeriodGeofenceGeometryId) + internal MapsGeofenceExitedEventData() { - Argument.AssertNotNull(expiredGeofenceGeometryId, nameof(expiredGeofenceGeometryId)); - Argument.AssertNotNull(geometries, nameof(geometries)); - Argument.AssertNotNull(invalidPeriodGeofenceGeometryId, nameof(invalidPeriodGeofenceGeometryId)); } /// Initializes a new instance of . @@ -34,10 +27,5 @@ internal MapsGeofenceExitedEventData(IEnumerable expiredGeofenceGeometry internal MapsGeofenceExitedEventData(IReadOnlyList expiredGeofenceGeometryId, IReadOnlyList geometries, IReadOnlyList invalidPeriodGeofenceGeometryId, bool? isEventPublished, IDictionary serializedAdditionalRawData) : base(expiredGeofenceGeometryId, geometries, invalidPeriodGeofenceGeometryId, isEventPublished, serializedAdditionalRawData) { } - - /// Initializes a new instance of for deserialization. - internal MapsGeofenceExitedEventData() - { - } } } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MapsGeofenceResultEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MapsGeofenceResultEventData.cs index ba7fd1dfd496..b8a9abb6001c 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MapsGeofenceResultEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MapsGeofenceResultEventData.cs @@ -14,15 +14,8 @@ namespace Azure.Messaging.EventGrid.SystemEvents public partial class MapsGeofenceResultEventData : MapsGeofenceEventProperties { /// Initializes a new instance of . - /// Lists of the geometry ID of the geofence which is expired relative to the user time in the request. - /// Lists the fence geometries that either fully contain the coordinate position or have an overlap with the searchBuffer around the fence. - /// Lists of the geometry ID of the geofence which is in invalid period relative to the user time in the request. - /// , or is null. - internal MapsGeofenceResultEventData(IEnumerable expiredGeofenceGeometryId, IEnumerable geometries, IEnumerable invalidPeriodGeofenceGeometryId) : base(expiredGeofenceGeometryId, geometries, invalidPeriodGeofenceGeometryId) + internal MapsGeofenceResultEventData() { - Argument.AssertNotNull(expiredGeofenceGeometryId, nameof(expiredGeofenceGeometryId)); - Argument.AssertNotNull(geometries, nameof(geometries)); - Argument.AssertNotNull(invalidPeriodGeofenceGeometryId, nameof(invalidPeriodGeofenceGeometryId)); } /// Initializes a new instance of . @@ -34,10 +27,5 @@ internal MapsGeofenceResultEventData(IEnumerable expiredGeofenceGeometry internal MapsGeofenceResultEventData(IReadOnlyList expiredGeofenceGeometryId, IReadOnlyList geometries, IReadOnlyList invalidPeriodGeofenceGeometryId, bool? isEventPublished, IDictionary serializedAdditionalRawData) : base(expiredGeofenceGeometryId, geometries, invalidPeriodGeofenceGeometryId, isEventPublished, serializedAdditionalRawData) { } - - /// Initializes a new instance of for deserialization. - internal MapsGeofenceResultEventData() - { - } } } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/tsp-location.yaml b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/tsp-location.yaml index f6874a4d67e5..c74b8861e6b5 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/tsp-location.yaml +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/tsp-location.yaml @@ -1,3 +1,4 @@ +directory: specification/eventgrid/Azure.Messaging.EventGrid.SystemEvents +commit: 5cc63ed55e6f4769b156f767154839d0d18a7d05 repo: Azure/azure-rest-api-specs -directory: "specification/eventgrid/Azure.Messaging.EventGrid.SystemEvents" -commit: 5f079f3d5e4ec9d1e10bafbd58844fdb4977e338 +additionalDirectories: diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/api/Azure.Messaging.EventGrid.net8.0.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/api/Azure.Messaging.EventGrid.net8.0.cs index 77921eec3193..cdbbc828f5d9 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/api/Azure.Messaging.EventGrid.net8.0.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/api/Azure.Messaging.EventGrid.net8.0.cs @@ -150,6 +150,10 @@ public static partial class EventGridModelFactory public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementApiReleaseDeletedEventData ApiManagementApiReleaseDeletedEventData(string resourceUri = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementApiReleaseUpdatedEventData ApiManagementApiReleaseUpdatedEventData(string resourceUri = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementApiUpdatedEventData ApiManagementApiUpdatedEventData(string resourceUri = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementCircuitBreakerClosedEventData ApiManagementCircuitBreakerClosedEventData(string backendName = null, Azure.Messaging.EventGrid.SystemEvents.ApiManagementCircuitBreakerProperties circuitBreaker = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementCircuitBreakerOpenedEventData ApiManagementCircuitBreakerOpenedEventData(string backendName = null, Azure.Messaging.EventGrid.SystemEvents.ApiManagementCircuitBreakerProperties circuitBreaker = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementCircuitBreakerProperties ApiManagementCircuitBreakerProperties(System.Collections.Generic.IReadOnlyDictionary rules = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementExpiredGatewayTokenProperties ApiManagementExpiredGatewayTokenProperties(System.DateTimeOffset? expiresOn = default(System.DateTimeOffset?)) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayApiAddedEventData ApiManagementGatewayApiAddedEventData(string resourceUri = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayApiRemovedEventData ApiManagementGatewayApiRemovedEventData(string resourceUri = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayCertificateAuthorityCreatedEventData ApiManagementGatewayCertificateAuthorityCreatedEventData(string resourceUri = null) { throw null; } @@ -160,6 +164,10 @@ public static partial class EventGridModelFactory public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayHostnameConfigurationCreatedEventData ApiManagementGatewayHostnameConfigurationCreatedEventData(string resourceUri = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayHostnameConfigurationDeletedEventData ApiManagementGatewayHostnameConfigurationDeletedEventData(string resourceUri = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayHostnameConfigurationUpdatedEventData ApiManagementGatewayHostnameConfigurationUpdatedEventData(string resourceUri = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayProperties ApiManagementGatewayProperties(string gatewayId = null, string instanceId = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayTokenExpiredEventData ApiManagementGatewayTokenExpiredEventData(Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayProperties gateway = null, Azure.Messaging.EventGrid.SystemEvents.ApiManagementExpiredGatewayTokenProperties token = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayTokenNearExpiryEventData ApiManagementGatewayTokenNearExpiryEventData(Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayProperties gateway = null, Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayTokenNearExpiryProperties token = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayTokenNearExpiryProperties ApiManagementGatewayTokenNearExpiryProperties(System.DateTimeOffset? expiresOn = default(System.DateTimeOffset?)) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayUpdatedEventData ApiManagementGatewayUpdatedEventData(string resourceUri = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementProductCreatedEventData ApiManagementProductCreatedEventData(string resourceUri = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementProductDeletedEventData ApiManagementProductDeletedEventData(string resourceUri = null) { throw null; } @@ -232,6 +240,7 @@ public static partial class EventGridModelFactory public static Azure.Messaging.EventGrid.SystemEvents.DeviceTwinInfoX509Thumbprint DeviceTwinInfoX509Thumbprint(string primaryThumbprint = null, string secondaryThumbprint = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.DeviceTwinMetadata DeviceTwinMetadata(string lastUpdated = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.DeviceTwinProperties DeviceTwinProperties(Azure.Messaging.EventGrid.SystemEvents.DeviceTwinMetadata metadata = null, float? version = default(float?)) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.EdgeSolutionVersionPublishedEventData EdgeSolutionVersionPublishedEventData(string externalValidationId = null, string targetId = null, string solutionTemplateId = null, string solutionTemplateVersionId = null, string solutionVersionId = null, string apiVersion = null, System.Uri callbackUrl = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.EventGridMqttClientCreatedOrUpdatedEventData EventGridMqttClientCreatedOrUpdatedEventData(string clientAuthenticationName = null, string clientName = null, string namespaceName = null, Azure.Messaging.EventGrid.SystemEvents.EventGridMqttClientState? state = default(Azure.Messaging.EventGrid.SystemEvents.EventGridMqttClientState?), System.DateTimeOffset? createdOn = default(System.DateTimeOffset?), System.DateTimeOffset? updatedOn = default(System.DateTimeOffset?), System.Collections.Generic.IReadOnlyDictionary attributes = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.EventGridMqttClientDeletedEventData EventGridMqttClientDeletedEventData(string clientAuthenticationName = null, string clientName = null, string namespaceName = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.EventGridMqttClientEventData EventGridMqttClientEventData(string clientAuthenticationName = null, string clientName = null, string namespaceName = null) { throw null; } @@ -496,6 +505,8 @@ public static partial class SystemEventNames public const string ApiManagementApiReleaseDeleted = "Microsoft.ApiManagement.APIReleaseDeleted"; public const string ApiManagementApiReleaseUpdated = "Microsoft.ApiManagement.APIReleaseUpdated"; public const string ApiManagementApiUpdated = "Microsoft.ApiManagement.APIUpdated"; + public const string ApiManagementCircuitBreakerClosed = "Microsoft.ApiManagement.CircuitBreaker.Closed"; + public const string ApiManagementCircuitBreakerOpened = "Microsoft.ApiManagement.CircuitBreaker.Opened"; public const string ApiManagementGatewayApiAdded = "Microsoft.ApiManagement.GatewayAPIAdded"; public const string ApiManagementGatewayApiRemoved = "Microsoft.ApiManagement.GatewayAPIRemoved"; public const string ApiManagementGatewayCertificateAuthorityCreated = "Microsoft.ApiManagement.GatewayCertificateAuthorityCreated"; @@ -506,6 +517,8 @@ public static partial class SystemEventNames public const string ApiManagementGatewayHostnameConfigurationCreated = "Microsoft.ApiManagement.GatewayHostnameConfigurationCreated"; public const string ApiManagementGatewayHostnameConfigurationDeleted = "Microsoft.ApiManagement.GatewayHostnameConfigurationDeleted"; public const string ApiManagementGatewayHostnameConfigurationUpdated = "Microsoft.ApiManagement.GatewayHostnameConfigurationUpdated"; + public const string ApiManagementGatewayTokenExpired = "Microsoft.ApiManagement.GatewayTokenExpired"; + public const string ApiManagementGatewayTokenNearExpiry = "Microsoft.ApiManagement.GatewayTokenNearExpiry"; public const string ApiManagementGatewayUpdated = "Microsoft.ApiManagement.GatewayUpdated"; public const string ApiManagementProductCreated = "Microsoft.ApiManagement.ProductCreated"; public const string ApiManagementProductDeleted = "Microsoft.ApiManagement.ProductDeleted"; @@ -545,6 +558,7 @@ public static partial class SystemEventNames public const string DataBoxCopyCompleted = "Microsoft.DataBox.CopyCompleted"; public const string DataBoxCopyStarted = "Microsoft.DataBox.CopyStarted"; public const string DataBoxOrderCompleted = "Microsoft.DataBox.OrderCompleted"; + public const string EdgeSolutionVersionPublished = "Microsoft.Edge.SolutionVersionPublished"; public const string EventGridMqttClientCreatedOrUpdated = "Microsoft.EventGrid.MQTTClientCreatedOrUpdated"; public const string EventGridMqttClientDeleted = "Microsoft.EventGrid.MQTTClientDeleted"; public const string EventGridMqttClientSessionConnected = "Microsoft.EventGrid.MQTTClientSessionConnected"; @@ -1678,6 +1692,28 @@ public partial class ApiManagementApiUpdatedEventData internal ApiManagementApiUpdatedEventData() { } public string ResourceUri { get { throw null; } } } + public partial class ApiManagementCircuitBreakerClosedEventData + { + internal ApiManagementCircuitBreakerClosedEventData() { } + public string BackendName { get { throw null; } } + public Azure.Messaging.EventGrid.SystemEvents.ApiManagementCircuitBreakerProperties CircuitBreaker { get { throw null; } } + } + public partial class ApiManagementCircuitBreakerOpenedEventData + { + internal ApiManagementCircuitBreakerOpenedEventData() { } + public string BackendName { get { throw null; } } + public Azure.Messaging.EventGrid.SystemEvents.ApiManagementCircuitBreakerProperties CircuitBreaker { get { throw null; } } + } + public partial class ApiManagementCircuitBreakerProperties + { + internal ApiManagementCircuitBreakerProperties() { } + public System.Collections.Generic.IReadOnlyDictionary Rules { get { throw null; } } + } + public partial class ApiManagementExpiredGatewayTokenProperties + { + internal ApiManagementExpiredGatewayTokenProperties() { } + public System.DateTimeOffset? ExpiresOn { get { throw null; } } + } public partial class ApiManagementGatewayApiAddedEventData { internal ApiManagementGatewayApiAddedEventData() { } @@ -1728,6 +1764,29 @@ public partial class ApiManagementGatewayHostnameConfigurationUpdatedEventData internal ApiManagementGatewayHostnameConfigurationUpdatedEventData() { } public string ResourceUri { get { throw null; } } } + public partial class ApiManagementGatewayProperties + { + internal ApiManagementGatewayProperties() { } + public string GatewayId { get { throw null; } } + public string InstanceId { get { throw null; } } + } + public partial class ApiManagementGatewayTokenExpiredEventData + { + internal ApiManagementGatewayTokenExpiredEventData() { } + public Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayProperties Gateway { get { throw null; } } + public Azure.Messaging.EventGrid.SystemEvents.ApiManagementExpiredGatewayTokenProperties Token { get { throw null; } } + } + public partial class ApiManagementGatewayTokenNearExpiryEventData + { + internal ApiManagementGatewayTokenNearExpiryEventData() { } + public Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayProperties Gateway { get { throw null; } } + public Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayTokenNearExpiryProperties Token { get { throw null; } } + } + public partial class ApiManagementGatewayTokenNearExpiryProperties + { + internal ApiManagementGatewayTokenNearExpiryProperties() { } + public System.DateTimeOffset? ExpiresOn { get { throw null; } } + } public partial class ApiManagementGatewayUpdatedEventData { internal ApiManagementGatewayUpdatedEventData() { } @@ -2214,6 +2273,17 @@ internal DeviceTwinProperties() { } public Azure.Messaging.EventGrid.SystemEvents.DeviceTwinMetadata Metadata { get { throw null; } } public float? Version { get { throw null; } } } + public partial class EdgeSolutionVersionPublishedEventData + { + internal EdgeSolutionVersionPublishedEventData() { } + public string ApiVersion { get { throw null; } } + public System.Uri CallbackUrl { get { throw null; } } + public string ExternalValidationId { get { throw null; } } + public string SolutionTemplateId { get { throw null; } } + public string SolutionTemplateVersionId { get { throw null; } } + public string SolutionVersionId { get { throw null; } } + public string TargetId { get { throw null; } } + } public partial class EventGridMqttClientCreatedOrUpdatedEventData : Azure.Messaging.EventGrid.SystemEvents.EventGridMqttClientEventData { internal EventGridMqttClientCreatedOrUpdatedEventData() { } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/api/Azure.Messaging.EventGrid.netstandard2.0.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/api/Azure.Messaging.EventGrid.netstandard2.0.cs index 77921eec3193..cdbbc828f5d9 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/api/Azure.Messaging.EventGrid.netstandard2.0.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/api/Azure.Messaging.EventGrid.netstandard2.0.cs @@ -150,6 +150,10 @@ public static partial class EventGridModelFactory public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementApiReleaseDeletedEventData ApiManagementApiReleaseDeletedEventData(string resourceUri = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementApiReleaseUpdatedEventData ApiManagementApiReleaseUpdatedEventData(string resourceUri = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementApiUpdatedEventData ApiManagementApiUpdatedEventData(string resourceUri = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementCircuitBreakerClosedEventData ApiManagementCircuitBreakerClosedEventData(string backendName = null, Azure.Messaging.EventGrid.SystemEvents.ApiManagementCircuitBreakerProperties circuitBreaker = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementCircuitBreakerOpenedEventData ApiManagementCircuitBreakerOpenedEventData(string backendName = null, Azure.Messaging.EventGrid.SystemEvents.ApiManagementCircuitBreakerProperties circuitBreaker = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementCircuitBreakerProperties ApiManagementCircuitBreakerProperties(System.Collections.Generic.IReadOnlyDictionary rules = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementExpiredGatewayTokenProperties ApiManagementExpiredGatewayTokenProperties(System.DateTimeOffset? expiresOn = default(System.DateTimeOffset?)) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayApiAddedEventData ApiManagementGatewayApiAddedEventData(string resourceUri = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayApiRemovedEventData ApiManagementGatewayApiRemovedEventData(string resourceUri = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayCertificateAuthorityCreatedEventData ApiManagementGatewayCertificateAuthorityCreatedEventData(string resourceUri = null) { throw null; } @@ -160,6 +164,10 @@ public static partial class EventGridModelFactory public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayHostnameConfigurationCreatedEventData ApiManagementGatewayHostnameConfigurationCreatedEventData(string resourceUri = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayHostnameConfigurationDeletedEventData ApiManagementGatewayHostnameConfigurationDeletedEventData(string resourceUri = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayHostnameConfigurationUpdatedEventData ApiManagementGatewayHostnameConfigurationUpdatedEventData(string resourceUri = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayProperties ApiManagementGatewayProperties(string gatewayId = null, string instanceId = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayTokenExpiredEventData ApiManagementGatewayTokenExpiredEventData(Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayProperties gateway = null, Azure.Messaging.EventGrid.SystemEvents.ApiManagementExpiredGatewayTokenProperties token = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayTokenNearExpiryEventData ApiManagementGatewayTokenNearExpiryEventData(Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayProperties gateway = null, Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayTokenNearExpiryProperties token = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayTokenNearExpiryProperties ApiManagementGatewayTokenNearExpiryProperties(System.DateTimeOffset? expiresOn = default(System.DateTimeOffset?)) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayUpdatedEventData ApiManagementGatewayUpdatedEventData(string resourceUri = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementProductCreatedEventData ApiManagementProductCreatedEventData(string resourceUri = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementProductDeletedEventData ApiManagementProductDeletedEventData(string resourceUri = null) { throw null; } @@ -232,6 +240,7 @@ public static partial class EventGridModelFactory public static Azure.Messaging.EventGrid.SystemEvents.DeviceTwinInfoX509Thumbprint DeviceTwinInfoX509Thumbprint(string primaryThumbprint = null, string secondaryThumbprint = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.DeviceTwinMetadata DeviceTwinMetadata(string lastUpdated = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.DeviceTwinProperties DeviceTwinProperties(Azure.Messaging.EventGrid.SystemEvents.DeviceTwinMetadata metadata = null, float? version = default(float?)) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.EdgeSolutionVersionPublishedEventData EdgeSolutionVersionPublishedEventData(string externalValidationId = null, string targetId = null, string solutionTemplateId = null, string solutionTemplateVersionId = null, string solutionVersionId = null, string apiVersion = null, System.Uri callbackUrl = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.EventGridMqttClientCreatedOrUpdatedEventData EventGridMqttClientCreatedOrUpdatedEventData(string clientAuthenticationName = null, string clientName = null, string namespaceName = null, Azure.Messaging.EventGrid.SystemEvents.EventGridMqttClientState? state = default(Azure.Messaging.EventGrid.SystemEvents.EventGridMqttClientState?), System.DateTimeOffset? createdOn = default(System.DateTimeOffset?), System.DateTimeOffset? updatedOn = default(System.DateTimeOffset?), System.Collections.Generic.IReadOnlyDictionary attributes = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.EventGridMqttClientDeletedEventData EventGridMqttClientDeletedEventData(string clientAuthenticationName = null, string clientName = null, string namespaceName = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.EventGridMqttClientEventData EventGridMqttClientEventData(string clientAuthenticationName = null, string clientName = null, string namespaceName = null) { throw null; } @@ -496,6 +505,8 @@ public static partial class SystemEventNames public const string ApiManagementApiReleaseDeleted = "Microsoft.ApiManagement.APIReleaseDeleted"; public const string ApiManagementApiReleaseUpdated = "Microsoft.ApiManagement.APIReleaseUpdated"; public const string ApiManagementApiUpdated = "Microsoft.ApiManagement.APIUpdated"; + public const string ApiManagementCircuitBreakerClosed = "Microsoft.ApiManagement.CircuitBreaker.Closed"; + public const string ApiManagementCircuitBreakerOpened = "Microsoft.ApiManagement.CircuitBreaker.Opened"; public const string ApiManagementGatewayApiAdded = "Microsoft.ApiManagement.GatewayAPIAdded"; public const string ApiManagementGatewayApiRemoved = "Microsoft.ApiManagement.GatewayAPIRemoved"; public const string ApiManagementGatewayCertificateAuthorityCreated = "Microsoft.ApiManagement.GatewayCertificateAuthorityCreated"; @@ -506,6 +517,8 @@ public static partial class SystemEventNames public const string ApiManagementGatewayHostnameConfigurationCreated = "Microsoft.ApiManagement.GatewayHostnameConfigurationCreated"; public const string ApiManagementGatewayHostnameConfigurationDeleted = "Microsoft.ApiManagement.GatewayHostnameConfigurationDeleted"; public const string ApiManagementGatewayHostnameConfigurationUpdated = "Microsoft.ApiManagement.GatewayHostnameConfigurationUpdated"; + public const string ApiManagementGatewayTokenExpired = "Microsoft.ApiManagement.GatewayTokenExpired"; + public const string ApiManagementGatewayTokenNearExpiry = "Microsoft.ApiManagement.GatewayTokenNearExpiry"; public const string ApiManagementGatewayUpdated = "Microsoft.ApiManagement.GatewayUpdated"; public const string ApiManagementProductCreated = "Microsoft.ApiManagement.ProductCreated"; public const string ApiManagementProductDeleted = "Microsoft.ApiManagement.ProductDeleted"; @@ -545,6 +558,7 @@ public static partial class SystemEventNames public const string DataBoxCopyCompleted = "Microsoft.DataBox.CopyCompleted"; public const string DataBoxCopyStarted = "Microsoft.DataBox.CopyStarted"; public const string DataBoxOrderCompleted = "Microsoft.DataBox.OrderCompleted"; + public const string EdgeSolutionVersionPublished = "Microsoft.Edge.SolutionVersionPublished"; public const string EventGridMqttClientCreatedOrUpdated = "Microsoft.EventGrid.MQTTClientCreatedOrUpdated"; public const string EventGridMqttClientDeleted = "Microsoft.EventGrid.MQTTClientDeleted"; public const string EventGridMqttClientSessionConnected = "Microsoft.EventGrid.MQTTClientSessionConnected"; @@ -1678,6 +1692,28 @@ public partial class ApiManagementApiUpdatedEventData internal ApiManagementApiUpdatedEventData() { } public string ResourceUri { get { throw null; } } } + public partial class ApiManagementCircuitBreakerClosedEventData + { + internal ApiManagementCircuitBreakerClosedEventData() { } + public string BackendName { get { throw null; } } + public Azure.Messaging.EventGrid.SystemEvents.ApiManagementCircuitBreakerProperties CircuitBreaker { get { throw null; } } + } + public partial class ApiManagementCircuitBreakerOpenedEventData + { + internal ApiManagementCircuitBreakerOpenedEventData() { } + public string BackendName { get { throw null; } } + public Azure.Messaging.EventGrid.SystemEvents.ApiManagementCircuitBreakerProperties CircuitBreaker { get { throw null; } } + } + public partial class ApiManagementCircuitBreakerProperties + { + internal ApiManagementCircuitBreakerProperties() { } + public System.Collections.Generic.IReadOnlyDictionary Rules { get { throw null; } } + } + public partial class ApiManagementExpiredGatewayTokenProperties + { + internal ApiManagementExpiredGatewayTokenProperties() { } + public System.DateTimeOffset? ExpiresOn { get { throw null; } } + } public partial class ApiManagementGatewayApiAddedEventData { internal ApiManagementGatewayApiAddedEventData() { } @@ -1728,6 +1764,29 @@ public partial class ApiManagementGatewayHostnameConfigurationUpdatedEventData internal ApiManagementGatewayHostnameConfigurationUpdatedEventData() { } public string ResourceUri { get { throw null; } } } + public partial class ApiManagementGatewayProperties + { + internal ApiManagementGatewayProperties() { } + public string GatewayId { get { throw null; } } + public string InstanceId { get { throw null; } } + } + public partial class ApiManagementGatewayTokenExpiredEventData + { + internal ApiManagementGatewayTokenExpiredEventData() { } + public Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayProperties Gateway { get { throw null; } } + public Azure.Messaging.EventGrid.SystemEvents.ApiManagementExpiredGatewayTokenProperties Token { get { throw null; } } + } + public partial class ApiManagementGatewayTokenNearExpiryEventData + { + internal ApiManagementGatewayTokenNearExpiryEventData() { } + public Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayProperties Gateway { get { throw null; } } + public Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayTokenNearExpiryProperties Token { get { throw null; } } + } + public partial class ApiManagementGatewayTokenNearExpiryProperties + { + internal ApiManagementGatewayTokenNearExpiryProperties() { } + public System.DateTimeOffset? ExpiresOn { get { throw null; } } + } public partial class ApiManagementGatewayUpdatedEventData { internal ApiManagementGatewayUpdatedEventData() { } @@ -2214,6 +2273,17 @@ internal DeviceTwinProperties() { } public Azure.Messaging.EventGrid.SystemEvents.DeviceTwinMetadata Metadata { get { throw null; } } public float? Version { get { throw null; } } } + public partial class EdgeSolutionVersionPublishedEventData + { + internal EdgeSolutionVersionPublishedEventData() { } + public string ApiVersion { get { throw null; } } + public System.Uri CallbackUrl { get { throw null; } } + public string ExternalValidationId { get { throw null; } } + public string SolutionTemplateId { get { throw null; } } + public string SolutionTemplateVersionId { get { throw null; } } + public string SolutionVersionId { get { throw null; } } + public string TargetId { get { throw null; } } + } public partial class EventGridMqttClientCreatedOrUpdatedEventData : Azure.Messaging.EventGrid.SystemEvents.EventGridMqttClientEventData { internal EventGridMqttClientCreatedOrUpdatedEventData() { } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/EventGridModelFactory.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/EventGridModelFactory.cs index fdc005e4a49a..ffdf3686167b 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/EventGridModelFactory.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/EventGridModelFactory.cs @@ -3916,6 +3916,77 @@ public static ApiManagementGatewayApiRemovedEventData ApiManagementGatewayApiRem return new ApiManagementGatewayApiRemovedEventData(resourceUri); } + /// Initializes a new instance of . + /// Name of the backend for which the circuit has opened. + /// Information related to the circuit breaker configured on the backend. + /// A new instance for mocking. + public static ApiManagementCircuitBreakerOpenedEventData ApiManagementCircuitBreakerOpenedEventData(string backendName = null, ApiManagementCircuitBreakerProperties circuitBreaker = null) + { + return new ApiManagementCircuitBreakerOpenedEventData(backendName, circuitBreaker); + } + + /// Initializes a new instance of . + /// Overview of all configured rules and respective details. + /// A new instance for mocking. + public static ApiManagementCircuitBreakerProperties ApiManagementCircuitBreakerProperties(IReadOnlyDictionary rules = null) + { + rules ??= new Dictionary(); + + return new ApiManagementCircuitBreakerProperties(rules); + } + + /// Initializes a new instance of . + /// Name of the backend for which the circuit has closed. + /// Information related to the circuit breaker configured on the backend. + /// A new instance for mocking. + public static ApiManagementCircuitBreakerClosedEventData ApiManagementCircuitBreakerClosedEventData(string backendName = null, ApiManagementCircuitBreakerProperties circuitBreaker = null) + { + return new ApiManagementCircuitBreakerClosedEventData(backendName, circuitBreaker); + } + + /// Initializes a new instance of . + /// Information related to a given self-hosted gateway deployment. + /// Information related to a gateway token that is near expiry for a self-hosted gateway deployment. + /// A new instance for mocking. + public static ApiManagementGatewayTokenNearExpiryEventData ApiManagementGatewayTokenNearExpiryEventData(ApiManagementGatewayProperties gateway = null, ApiManagementGatewayTokenNearExpiryProperties token = null) + { + return new ApiManagementGatewayTokenNearExpiryEventData(gateway, token); + } + + /// Initializes a new instance of . + /// Id of Gateway that is used to deploy the gateway to get the configuration for. This is the ARM resource ID referenced in the Azure API Management instance. + /// Unique instance ID of the deployed gateway. + /// A new instance for mocking. + public static ApiManagementGatewayProperties ApiManagementGatewayProperties(string gatewayId = null, string instanceId = null) + { + return new ApiManagementGatewayProperties(gatewayId, instanceId); + } + + /// Initializes a new instance of . + /// Timestamp when the gateway token will expire. + /// A new instance for mocking. + public static ApiManagementGatewayTokenNearExpiryProperties ApiManagementGatewayTokenNearExpiryProperties(DateTimeOffset? expiresOn = null) + { + return new ApiManagementGatewayTokenNearExpiryProperties(expiresOn); + } + + /// Initializes a new instance of . + /// Information related to a given self-hosted gateway deployment. + /// Information related to a an expired gateway token for a self-hosted gateway deployment. + /// A new instance for mocking. + public static ApiManagementGatewayTokenExpiredEventData ApiManagementGatewayTokenExpiredEventData(ApiManagementGatewayProperties gateway = null, ApiManagementExpiredGatewayTokenProperties token = null) + { + return new ApiManagementGatewayTokenExpiredEventData(gateway, token); + } + + /// Initializes a new instance of . + /// Timestamp when the gateway token has expired. + /// A new instance for mocking. + public static ApiManagementExpiredGatewayTokenProperties ApiManagementExpiredGatewayTokenProperties(DateTimeOffset? expiresOn = null) + { + return new ApiManagementExpiredGatewayTokenProperties(expiresOn); + } + /// Initializes a new instance of . /// Type of HL7 FHIR resource. /// Domain name of FHIR account for this resource. @@ -4319,5 +4390,56 @@ public static ApiCenterApiDefinitionUpdatedEventData ApiCenterApiDefinitionUpdat { return new ApiCenterApiDefinitionUpdatedEventData(title, description, specification); } + + /// Initializes a new instance of . + /// A GUID to uniquely track External Solution Validation. + /// ARM ID of the Target resource. + /// ARM ID of the Solution Template resource. + /// ARM ID of the Solution Template Version resource. + /// ARM ID of the Solution Version resource. + /// API Version supported for the resources. + /// Direct URL to callback for updating validation status. + /// , , , , , or is null. + /// A new instance for mocking. + public static EdgeSolutionVersionPublishedEventData EdgeSolutionVersionPublishedEventData(string externalValidationId = null, string targetId = null, string solutionTemplateId = null, string solutionTemplateVersionId = null, string solutionVersionId = null, string apiVersion = null, Uri callbackUrl = null) + { + if (externalValidationId == null) + { + throw new ArgumentNullException(nameof(externalValidationId)); + } + if (targetId == null) + { + throw new ArgumentNullException(nameof(targetId)); + } + if (solutionTemplateId == null) + { + throw new ArgumentNullException(nameof(solutionTemplateId)); + } + if (solutionTemplateVersionId == null) + { + throw new ArgumentNullException(nameof(solutionTemplateVersionId)); + } + if (solutionVersionId == null) + { + throw new ArgumentNullException(nameof(solutionVersionId)); + } + if (apiVersion == null) + { + throw new ArgumentNullException(nameof(apiVersion)); + } + if (callbackUrl == null) + { + throw new ArgumentNullException(nameof(callbackUrl)); + } + + return new EdgeSolutionVersionPublishedEventData( + externalValidationId, + targetId, + solutionTemplateId, + solutionTemplateVersionId, + solutionVersionId, + apiVersion, + callbackUrl); + } } } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ApiManagementCircuitBreakerClosedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ApiManagementCircuitBreakerClosedEventData.Serialization.cs new file mode 100644 index 000000000000..a58e224054df --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ApiManagementCircuitBreakerClosedEventData.Serialization.cs @@ -0,0 +1,67 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Text.Json.Serialization; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + [JsonConverter(typeof(ApiManagementCircuitBreakerClosedEventDataConverter))] + public partial class ApiManagementCircuitBreakerClosedEventData + { + internal static ApiManagementCircuitBreakerClosedEventData DeserializeApiManagementCircuitBreakerClosedEventData(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string backendName = default; + ApiManagementCircuitBreakerProperties circuitBreaker = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("backendName"u8)) + { + backendName = property.Value.GetString(); + continue; + } + if (property.NameEquals("circuitBreaker"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + circuitBreaker = ApiManagementCircuitBreakerProperties.DeserializeApiManagementCircuitBreakerProperties(property.Value); + continue; + } + } + return new ApiManagementCircuitBreakerClosedEventData(backendName, circuitBreaker); + } + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static ApiManagementCircuitBreakerClosedEventData FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeApiManagementCircuitBreakerClosedEventData(document.RootElement); + } + + internal partial class ApiManagementCircuitBreakerClosedEventDataConverter : JsonConverter + { + public override void Write(Utf8JsonWriter writer, ApiManagementCircuitBreakerClosedEventData model, JsonSerializerOptions options) + { + throw new NotImplementedException(); + } + + public override ApiManagementCircuitBreakerClosedEventData Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + using var document = JsonDocument.ParseValue(ref reader); + return DeserializeApiManagementCircuitBreakerClosedEventData(document.RootElement); + } + } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ApiManagementCircuitBreakerClosedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ApiManagementCircuitBreakerClosedEventData.cs new file mode 100644 index 000000000000..897cfa437c87 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ApiManagementCircuitBreakerClosedEventData.cs @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + /// Schema of the Data property of an EventGridEvent for a Microsoft.ApiManagement.CircuitBreaker.Closed event. + public partial class ApiManagementCircuitBreakerClosedEventData + { + /// Initializes a new instance of . + internal ApiManagementCircuitBreakerClosedEventData() + { + } + + /// Initializes a new instance of . + /// Name of the backend for which the circuit has closed. + /// Information related to the circuit breaker configured on the backend. + internal ApiManagementCircuitBreakerClosedEventData(string backendName, ApiManagementCircuitBreakerProperties circuitBreaker) + { + BackendName = backendName; + CircuitBreaker = circuitBreaker; + } + + /// Name of the backend for which the circuit has closed. + public string BackendName { get; } + /// Information related to the circuit breaker configured on the backend. + public ApiManagementCircuitBreakerProperties CircuitBreaker { get; } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ApiManagementCircuitBreakerOpenedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ApiManagementCircuitBreakerOpenedEventData.Serialization.cs new file mode 100644 index 000000000000..c8f409d55e6f --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ApiManagementCircuitBreakerOpenedEventData.Serialization.cs @@ -0,0 +1,67 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Text.Json.Serialization; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + [JsonConverter(typeof(ApiManagementCircuitBreakerOpenedEventDataConverter))] + public partial class ApiManagementCircuitBreakerOpenedEventData + { + internal static ApiManagementCircuitBreakerOpenedEventData DeserializeApiManagementCircuitBreakerOpenedEventData(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string backendName = default; + ApiManagementCircuitBreakerProperties circuitBreaker = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("backendName"u8)) + { + backendName = property.Value.GetString(); + continue; + } + if (property.NameEquals("circuitBreaker"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + circuitBreaker = ApiManagementCircuitBreakerProperties.DeserializeApiManagementCircuitBreakerProperties(property.Value); + continue; + } + } + return new ApiManagementCircuitBreakerOpenedEventData(backendName, circuitBreaker); + } + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static ApiManagementCircuitBreakerOpenedEventData FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeApiManagementCircuitBreakerOpenedEventData(document.RootElement); + } + + internal partial class ApiManagementCircuitBreakerOpenedEventDataConverter : JsonConverter + { + public override void Write(Utf8JsonWriter writer, ApiManagementCircuitBreakerOpenedEventData model, JsonSerializerOptions options) + { + throw new NotImplementedException(); + } + + public override ApiManagementCircuitBreakerOpenedEventData Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + using var document = JsonDocument.ParseValue(ref reader); + return DeserializeApiManagementCircuitBreakerOpenedEventData(document.RootElement); + } + } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ApiManagementCircuitBreakerOpenedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ApiManagementCircuitBreakerOpenedEventData.cs new file mode 100644 index 000000000000..a2e73568a90b --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ApiManagementCircuitBreakerOpenedEventData.cs @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + /// Schema of the Data property of an EventGridEvent for a Microsoft.ApiManagement.CircuitBreaker.Opened event. + public partial class ApiManagementCircuitBreakerOpenedEventData + { + /// Initializes a new instance of . + internal ApiManagementCircuitBreakerOpenedEventData() + { + } + + /// Initializes a new instance of . + /// Name of the backend for which the circuit has opened. + /// Information related to the circuit breaker configured on the backend. + internal ApiManagementCircuitBreakerOpenedEventData(string backendName, ApiManagementCircuitBreakerProperties circuitBreaker) + { + BackendName = backendName; + CircuitBreaker = circuitBreaker; + } + + /// Name of the backend for which the circuit has opened. + public string BackendName { get; } + /// Information related to the circuit breaker configured on the backend. + public ApiManagementCircuitBreakerProperties CircuitBreaker { get; } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ApiManagementCircuitBreakerProperties.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ApiManagementCircuitBreakerProperties.Serialization.cs new file mode 100644 index 000000000000..78f35106bf1d --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ApiManagementCircuitBreakerProperties.Serialization.cs @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + public partial class ApiManagementCircuitBreakerProperties + { + internal static ApiManagementCircuitBreakerProperties DeserializeApiManagementCircuitBreakerProperties(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyDictionary rules = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("rules"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property0.Name, null); + } + else + { + dictionary.Add(property0.Name, property0.Value.GetObject()); + } + } + rules = dictionary; + continue; + } + } + return new ApiManagementCircuitBreakerProperties(rules ?? new ChangeTrackingDictionary()); + } + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static ApiManagementCircuitBreakerProperties FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeApiManagementCircuitBreakerProperties(document.RootElement); + } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ApiManagementCircuitBreakerProperties.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ApiManagementCircuitBreakerProperties.cs new file mode 100644 index 000000000000..0aebae96e81b --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ApiManagementCircuitBreakerProperties.cs @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + /// Information related to the circuit breaker configured on the backend. + public partial class ApiManagementCircuitBreakerProperties + { + /// Initializes a new instance of . + internal ApiManagementCircuitBreakerProperties() + { + Rules = new ChangeTrackingDictionary(); + } + + /// Initializes a new instance of . + /// Overview of all configured rules and respective details. + internal ApiManagementCircuitBreakerProperties(IReadOnlyDictionary rules) + { + Rules = rules; + } + + /// Overview of all configured rules and respective details. + public IReadOnlyDictionary Rules { get; } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ApiManagementExpiredGatewayTokenProperties.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ApiManagementExpiredGatewayTokenProperties.Serialization.cs new file mode 100644 index 000000000000..2845e4321078 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ApiManagementExpiredGatewayTokenProperties.Serialization.cs @@ -0,0 +1,45 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + public partial class ApiManagementExpiredGatewayTokenProperties + { + internal static ApiManagementExpiredGatewayTokenProperties DeserializeApiManagementExpiredGatewayTokenProperties(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + DateTimeOffset? expiredAtUtc = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("expiredAtUtc"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + expiredAtUtc = property.Value.GetDateTimeOffset("O"); + continue; + } + } + return new ApiManagementExpiredGatewayTokenProperties(expiredAtUtc); + } + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static ApiManagementExpiredGatewayTokenProperties FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeApiManagementExpiredGatewayTokenProperties(document.RootElement); + } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ApiManagementExpiredGatewayTokenProperties.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ApiManagementExpiredGatewayTokenProperties.cs new file mode 100644 index 000000000000..d6a2f1a4f92e --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ApiManagementExpiredGatewayTokenProperties.cs @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + /// Information related to a an expired gateway token for a self-hosted gateway deployment. + public partial class ApiManagementExpiredGatewayTokenProperties + { + /// Initializes a new instance of . + internal ApiManagementExpiredGatewayTokenProperties() + { + } + + /// Initializes a new instance of . + /// Timestamp when the gateway token has expired. + internal ApiManagementExpiredGatewayTokenProperties(DateTimeOffset? expiresOn) + { + ExpiresOn = expiresOn; + } + + /// Timestamp when the gateway token has expired. + public DateTimeOffset? ExpiresOn { get; } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ApiManagementGatewayProperties.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ApiManagementGatewayProperties.Serialization.cs new file mode 100644 index 000000000000..514405425e94 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ApiManagementGatewayProperties.Serialization.cs @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + public partial class ApiManagementGatewayProperties + { + internal static ApiManagementGatewayProperties DeserializeApiManagementGatewayProperties(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string gatewayId = default; + string instanceId = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("gatewayId"u8)) + { + gatewayId = property.Value.GetString(); + continue; + } + if (property.NameEquals("instanceId"u8)) + { + instanceId = property.Value.GetString(); + continue; + } + } + return new ApiManagementGatewayProperties(gatewayId, instanceId); + } + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static ApiManagementGatewayProperties FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeApiManagementGatewayProperties(document.RootElement); + } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ApiManagementGatewayProperties.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ApiManagementGatewayProperties.cs new file mode 100644 index 000000000000..2dda56e1690e --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ApiManagementGatewayProperties.cs @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + /// Information related to a given self-hosted gateway deployment. + public partial class ApiManagementGatewayProperties + { + /// Initializes a new instance of . + internal ApiManagementGatewayProperties() + { + } + + /// Initializes a new instance of . + /// Id of Gateway that is used to deploy the gateway to get the configuration for. This is the ARM resource ID referenced in the Azure API Management instance. + /// Unique instance ID of the deployed gateway. + internal ApiManagementGatewayProperties(string gatewayId, string instanceId) + { + GatewayId = gatewayId; + InstanceId = instanceId; + } + + /// Id of Gateway that is used to deploy the gateway to get the configuration for. This is the ARM resource ID referenced in the Azure API Management instance. + public string GatewayId { get; } + /// Unique instance ID of the deployed gateway. + public string InstanceId { get; } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ApiManagementGatewayTokenExpiredEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ApiManagementGatewayTokenExpiredEventData.Serialization.cs new file mode 100644 index 000000000000..0ed20221e377 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ApiManagementGatewayTokenExpiredEventData.Serialization.cs @@ -0,0 +1,71 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Text.Json.Serialization; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + [JsonConverter(typeof(ApiManagementGatewayTokenExpiredEventDataConverter))] + public partial class ApiManagementGatewayTokenExpiredEventData + { + internal static ApiManagementGatewayTokenExpiredEventData DeserializeApiManagementGatewayTokenExpiredEventData(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ApiManagementGatewayProperties gatewayInfo = default; + ApiManagementExpiredGatewayTokenProperties tokenInfo = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("gatewayInfo"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + gatewayInfo = ApiManagementGatewayProperties.DeserializeApiManagementGatewayProperties(property.Value); + continue; + } + if (property.NameEquals("tokenInfo"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + tokenInfo = ApiManagementExpiredGatewayTokenProperties.DeserializeApiManagementExpiredGatewayTokenProperties(property.Value); + continue; + } + } + return new ApiManagementGatewayTokenExpiredEventData(gatewayInfo, tokenInfo); + } + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static ApiManagementGatewayTokenExpiredEventData FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeApiManagementGatewayTokenExpiredEventData(document.RootElement); + } + + internal partial class ApiManagementGatewayTokenExpiredEventDataConverter : JsonConverter + { + public override void Write(Utf8JsonWriter writer, ApiManagementGatewayTokenExpiredEventData model, JsonSerializerOptions options) + { + throw new NotImplementedException(); + } + + public override ApiManagementGatewayTokenExpiredEventData Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + using var document = JsonDocument.ParseValue(ref reader); + return DeserializeApiManagementGatewayTokenExpiredEventData(document.RootElement); + } + } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ApiManagementGatewayTokenExpiredEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ApiManagementGatewayTokenExpiredEventData.cs new file mode 100644 index 000000000000..99ce9f9f3bfc --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ApiManagementGatewayTokenExpiredEventData.cs @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + /// Schema of the Data property of an EventGridEvent for a Microsoft.ApiManagement.GatewayTokenExpired event. + public partial class ApiManagementGatewayTokenExpiredEventData + { + /// Initializes a new instance of . + internal ApiManagementGatewayTokenExpiredEventData() + { + } + + /// Initializes a new instance of . + /// Information related to a given self-hosted gateway deployment. + /// Information related to a an expired gateway token for a self-hosted gateway deployment. + internal ApiManagementGatewayTokenExpiredEventData(ApiManagementGatewayProperties gateway, ApiManagementExpiredGatewayTokenProperties token) + { + Gateway = gateway; + Token = token; + } + + /// Information related to a given self-hosted gateway deployment. + public ApiManagementGatewayProperties Gateway { get; } + /// Information related to a an expired gateway token for a self-hosted gateway deployment. + public ApiManagementExpiredGatewayTokenProperties Token { get; } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ApiManagementGatewayTokenNearExpiryEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ApiManagementGatewayTokenNearExpiryEventData.Serialization.cs new file mode 100644 index 000000000000..842e50b94cde --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ApiManagementGatewayTokenNearExpiryEventData.Serialization.cs @@ -0,0 +1,71 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Text.Json.Serialization; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + [JsonConverter(typeof(ApiManagementGatewayTokenNearExpiryEventDataConverter))] + public partial class ApiManagementGatewayTokenNearExpiryEventData + { + internal static ApiManagementGatewayTokenNearExpiryEventData DeserializeApiManagementGatewayTokenNearExpiryEventData(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ApiManagementGatewayProperties gatewayInfo = default; + ApiManagementGatewayTokenNearExpiryProperties tokenInfo = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("gatewayInfo"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + gatewayInfo = ApiManagementGatewayProperties.DeserializeApiManagementGatewayProperties(property.Value); + continue; + } + if (property.NameEquals("tokenInfo"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + tokenInfo = ApiManagementGatewayTokenNearExpiryProperties.DeserializeApiManagementGatewayTokenNearExpiryProperties(property.Value); + continue; + } + } + return new ApiManagementGatewayTokenNearExpiryEventData(gatewayInfo, tokenInfo); + } + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static ApiManagementGatewayTokenNearExpiryEventData FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeApiManagementGatewayTokenNearExpiryEventData(document.RootElement); + } + + internal partial class ApiManagementGatewayTokenNearExpiryEventDataConverter : JsonConverter + { + public override void Write(Utf8JsonWriter writer, ApiManagementGatewayTokenNearExpiryEventData model, JsonSerializerOptions options) + { + throw new NotImplementedException(); + } + + public override ApiManagementGatewayTokenNearExpiryEventData Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + using var document = JsonDocument.ParseValue(ref reader); + return DeserializeApiManagementGatewayTokenNearExpiryEventData(document.RootElement); + } + } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ApiManagementGatewayTokenNearExpiryEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ApiManagementGatewayTokenNearExpiryEventData.cs new file mode 100644 index 000000000000..abc56161ade8 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ApiManagementGatewayTokenNearExpiryEventData.cs @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + /// Schema of the Data property of an EventGridEvent for a Microsoft.ApiManagement.GatewayTokenNearExpiry event. + public partial class ApiManagementGatewayTokenNearExpiryEventData + { + /// Initializes a new instance of . + internal ApiManagementGatewayTokenNearExpiryEventData() + { + } + + /// Initializes a new instance of . + /// Information related to a given self-hosted gateway deployment. + /// Information related to a gateway token that is near expiry for a self-hosted gateway deployment. + internal ApiManagementGatewayTokenNearExpiryEventData(ApiManagementGatewayProperties gateway, ApiManagementGatewayTokenNearExpiryProperties token) + { + Gateway = gateway; + Token = token; + } + + /// Information related to a given self-hosted gateway deployment. + public ApiManagementGatewayProperties Gateway { get; } + /// Information related to a gateway token that is near expiry for a self-hosted gateway deployment. + public ApiManagementGatewayTokenNearExpiryProperties Token { get; } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ApiManagementGatewayTokenNearExpiryProperties.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ApiManagementGatewayTokenNearExpiryProperties.Serialization.cs new file mode 100644 index 000000000000..5169abd95612 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ApiManagementGatewayTokenNearExpiryProperties.Serialization.cs @@ -0,0 +1,45 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + public partial class ApiManagementGatewayTokenNearExpiryProperties + { + internal static ApiManagementGatewayTokenNearExpiryProperties DeserializeApiManagementGatewayTokenNearExpiryProperties(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + DateTimeOffset? expiresAtUtc = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("expiresAtUtc"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + expiresAtUtc = property.Value.GetDateTimeOffset("O"); + continue; + } + } + return new ApiManagementGatewayTokenNearExpiryProperties(expiresAtUtc); + } + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static ApiManagementGatewayTokenNearExpiryProperties FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeApiManagementGatewayTokenNearExpiryProperties(document.RootElement); + } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ApiManagementGatewayTokenNearExpiryProperties.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ApiManagementGatewayTokenNearExpiryProperties.cs new file mode 100644 index 000000000000..7c6084b3a12d --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ApiManagementGatewayTokenNearExpiryProperties.cs @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + /// Information related to a gateway token that is near expiry for a self-hosted gateway deployment. + public partial class ApiManagementGatewayTokenNearExpiryProperties + { + /// Initializes a new instance of . + internal ApiManagementGatewayTokenNearExpiryProperties() + { + } + + /// Initializes a new instance of . + /// Timestamp when the gateway token will expire. + internal ApiManagementGatewayTokenNearExpiryProperties(DateTimeOffset? expiresOn) + { + ExpiresOn = expiresOn; + } + + /// Timestamp when the gateway token will expire. + public DateTimeOffset? ExpiresOn { get; } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/EdgeSolutionVersionPublishedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/EdgeSolutionVersionPublishedEventData.Serialization.cs new file mode 100644 index 000000000000..c553e1b9cf6d --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/EdgeSolutionVersionPublishedEventData.Serialization.cs @@ -0,0 +1,100 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Text.Json.Serialization; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + [JsonConverter(typeof(EdgeSolutionVersionPublishedEventDataConverter))] + public partial class EdgeSolutionVersionPublishedEventData + { + internal static EdgeSolutionVersionPublishedEventData DeserializeEdgeSolutionVersionPublishedEventData(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string externalValidationId = default; + string targetId = default; + string solutionTemplateId = default; + string solutionTemplateVersionId = default; + string solutionVersionId = default; + string apiVersion = default; + Uri callbackUrl = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("externalValidationId"u8)) + { + externalValidationId = property.Value.GetString(); + continue; + } + if (property.NameEquals("targetId"u8)) + { + targetId = property.Value.GetString(); + continue; + } + if (property.NameEquals("solutionTemplateId"u8)) + { + solutionTemplateId = property.Value.GetString(); + continue; + } + if (property.NameEquals("solutionTemplateVersionId"u8)) + { + solutionTemplateVersionId = property.Value.GetString(); + continue; + } + if (property.NameEquals("solutionVersionId"u8)) + { + solutionVersionId = property.Value.GetString(); + continue; + } + if (property.NameEquals("apiVersion"u8)) + { + apiVersion = property.Value.GetString(); + continue; + } + if (property.NameEquals("callbackUrl"u8)) + { + callbackUrl = new Uri(property.Value.GetString()); + continue; + } + } + return new EdgeSolutionVersionPublishedEventData( + externalValidationId, + targetId, + solutionTemplateId, + solutionTemplateVersionId, + solutionVersionId, + apiVersion, + callbackUrl); + } + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static EdgeSolutionVersionPublishedEventData FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeEdgeSolutionVersionPublishedEventData(document.RootElement); + } + + internal partial class EdgeSolutionVersionPublishedEventDataConverter : JsonConverter + { + public override void Write(Utf8JsonWriter writer, EdgeSolutionVersionPublishedEventData model, JsonSerializerOptions options) + { + throw new NotImplementedException(); + } + + public override EdgeSolutionVersionPublishedEventData Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + using var document = JsonDocument.ParseValue(ref reader); + return DeserializeEdgeSolutionVersionPublishedEventData(document.RootElement); + } + } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/EdgeSolutionVersionPublishedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/EdgeSolutionVersionPublishedEventData.cs new file mode 100644 index 000000000000..12a8779da578 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/EdgeSolutionVersionPublishedEventData.cs @@ -0,0 +1,58 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + /// Schema of the Data property of an EventGridEvent for a Microsoft.Edge.SolutionVersionPublished event. + public partial class EdgeSolutionVersionPublishedEventData + { + /// Initializes a new instance of . + /// A GUID to uniquely track External Solution Validation. + /// ARM ID of the Target resource. + /// ARM ID of the Solution Template resource. + /// ARM ID of the Solution Template Version resource. + /// ARM ID of the Solution Version resource. + /// API Version supported for the resources. + /// Direct URL to callback for updating validation status. + /// , , , , , or is null. + internal EdgeSolutionVersionPublishedEventData(string externalValidationId, string targetId, string solutionTemplateId, string solutionTemplateVersionId, string solutionVersionId, string apiVersion, Uri callbackUrl) + { + Argument.AssertNotNull(externalValidationId, nameof(externalValidationId)); + Argument.AssertNotNull(targetId, nameof(targetId)); + Argument.AssertNotNull(solutionTemplateId, nameof(solutionTemplateId)); + Argument.AssertNotNull(solutionTemplateVersionId, nameof(solutionTemplateVersionId)); + Argument.AssertNotNull(solutionVersionId, nameof(solutionVersionId)); + Argument.AssertNotNull(apiVersion, nameof(apiVersion)); + Argument.AssertNotNull(callbackUrl, nameof(callbackUrl)); + + ExternalValidationId = externalValidationId; + TargetId = targetId; + SolutionTemplateId = solutionTemplateId; + SolutionTemplateVersionId = solutionTemplateVersionId; + SolutionVersionId = solutionVersionId; + ApiVersion = apiVersion; + CallbackUrl = callbackUrl; + } + + /// A GUID to uniquely track External Solution Validation. + public string ExternalValidationId { get; } + /// ARM ID of the Target resource. + public string TargetId { get; } + /// ARM ID of the Solution Template resource. + public string SolutionTemplateId { get; } + /// ARM ID of the Solution Template Version resource. + public string SolutionTemplateVersionId { get; } + /// ARM ID of the Solution Version resource. + public string SolutionVersionId { get; } + /// API Version supported for the resources. + public string ApiVersion { get; } + /// Direct URL to callback for updating validation status. + public Uri CallbackUrl { get; } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/autorest.md b/sdk/eventgrid/Azure.Messaging.EventGrid/src/autorest.md index b12e339e22f2..ff14326d1719 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/autorest.md +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/autorest.md @@ -4,7 +4,7 @@ Run `dotnet build /t:GenerateCode` to generate code. ``` yaml title: EventGridClient -require: https://github.com/Azure/azure-rest-api-specs/blob/8af03db33a90581edffb8a32fea562f36b7c61a8/specification/eventgrid/data-plane/readme.md +require: https://github.com/Azure/azure-rest-api-specs/blob/5cc63ed55e6f4769b156f767154839d0d18a7d05/specification/eventgrid/data-plane/readme.md generation1-convenience-client: true model-factory-for-hlc: - MediaJobOutputAsset diff --git a/sdk/eventgrid/Azure.Messaging.EventGridV2/Azure.Messaging.EventGrid.Namespaces.sln b/sdk/eventgrid/Azure.Messaging.EventGridV2/Azure.Messaging.EventGrid.Namespaces.sln new file mode 100644 index 000000000000..391d7e850673 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGridV2/Azure.Messaging.EventGrid.Namespaces.sln @@ -0,0 +1,54 @@ +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.29709.97 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Azure.Core.TestFramework", "..\..\core\Azure.Core.TestFramework\src\Azure.Core.TestFramework.csproj", "{ECC730C1-4AEA-420C-916A-66B19B79E4DC}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Azure.Messaging.EventGrid.Namespaces", "src\Azure.Messaging.EventGrid.Namespaces.csproj", "{28FF4005-4467-4E36-92E7-DEA27DEB1519}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {B0C276D1-2930-4887-B29A-D1A33E7009A2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B0C276D1-2930-4887-B29A-D1A33E7009A2}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B0C276D1-2930-4887-B29A-D1A33E7009A2}.Release|Any CPU.ActiveCfg = Release|Any CPU + {B0C276D1-2930-4887-B29A-D1A33E7009A2}.Release|Any CPU.Build.0 = Release|Any CPU + {8E9A77AC-792A-4432-8320-ACFD46730401}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {8E9A77AC-792A-4432-8320-ACFD46730401}.Debug|Any CPU.Build.0 = Debug|Any CPU + {8E9A77AC-792A-4432-8320-ACFD46730401}.Release|Any CPU.ActiveCfg = Release|Any CPU + {8E9A77AC-792A-4432-8320-ACFD46730401}.Release|Any CPU.Build.0 = Release|Any CPU + {ECC730C1-4AEA-420C-916A-66B19B79E4DC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {ECC730C1-4AEA-420C-916A-66B19B79E4DC}.Debug|Any CPU.Build.0 = Debug|Any CPU + {ECC730C1-4AEA-420C-916A-66B19B79E4DC}.Release|Any CPU.ActiveCfg = Release|Any CPU + {ECC730C1-4AEA-420C-916A-66B19B79E4DC}.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/eventgrid/Azure.Messaging.EventGridV2/CHANGELOG.md b/sdk/eventgrid/Azure.Messaging.EventGridV2/CHANGELOG.md new file mode 100644 index 000000000000..8b33f0fedccc --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGridV2/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/eventgrid/Azure.Messaging.EventGridV2/Directory.Build.props b/sdk/eventgrid/Azure.Messaging.EventGridV2/Directory.Build.props new file mode 100644 index 000000000000..63bd836ad44b --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGridV2/Directory.Build.props @@ -0,0 +1,6 @@ + + + + diff --git a/sdk/eventgrid/Azure.Messaging.EventGridV2/README.md b/sdk/eventgrid/Azure.Messaging.EventGridV2/README.md new file mode 100644 index 000000000000..469ad554f6f8 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGridV2/README.md @@ -0,0 +1,107 @@ +# Azure.Messaging.EventGrid.Namespaces client library for .NET + +Azure.Messaging.EventGrid.Namespaces is a managed service that helps developers get secret simply and securely. + +Use the client library for to: + +* [Get secret](https://docs.microsoft.com/azure) + +[Source code][source_root] | [Package (NuGet)][package] | [API reference documentation][reference_docs] | [Product documentation][azconfig_docs] | [Samples][source_samples] + + [Source code](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/eventgrid/Azure.Messaging.EventGrid.Namespaces/src) | [Package (NuGet)](https://www.nuget.org/packages) | [API reference documentation](https://azure.github.io/azure-sdk-for-net) | [Product documentation](https://docs.microsoft.com/azure) + +## Getting started + +This section should include everything a developer needs to do to install and create their first client connection *very quickly*. + +### Install the package + +First, provide instruction for obtaining and installing the package or library. This section might include only a single line of code, like `dotnet add package package-name`, but should enable a developer to successfully install the package from NuGet, npm, or even cloning a GitHub repository. + +Install the client library for .NET with [NuGet](https://www.nuget.org/ ): + +```dotnetcli +dotnet add package Azure.Messaging.EventGrid.Namespaces --prerelease +``` + +### Prerequisites + +Include a section after the install command that details any requirements that must be satisfied before a developer can [authenticate](#authenticate-the-client) and test all of the snippets in the [Examples](#examples) section. For example, for Cosmos DB: + +> You must have an [Azure subscription](https://azure.microsoft.com/free/dotnet/) and [Cosmos DB account](https://docs.microsoft.com/azure/cosmos-db/account-overview) (SQL API). In order to take advantage of the C# 8.0 syntax, it is recommended that you compile using the [.NET Core SDK](https://dotnet.microsoft.com/download) 3.0 or higher with a [language version](https://docs.microsoft.com/dotnet/csharp/language-reference/configure-language-version#override-a-default) of `latest`. It is also possible to compile with the .NET Core SDK 2.1.x using a language version of `preview`. + +### Authenticate the client + +If your library requires authentication for use, such as for Azure services, include instructions and example code needed for initializing and authenticating. + +For example, include details on obtaining an account key and endpoint URI, setting environment variables for each, and initializing the client object. + +### Service API versions + +The client library targets the latest service API version by default. A client instance accepts an optional service API version parameter from its options to specify which API version service to communicate. + +#### Select a service API version + +You have the flexibility to explicitly select a supported service API version when instantiating a client by configuring its associated options. This ensures that the client can communicate with services using the specified API version. + +For example, + +```C# Snippet:CreateClientForSpecificApiVersion +Uri endpoint = new Uri(""); +DefaultAzureCredential credential = new DefaultAzureCredential(); +ClientOptions options = new ClientOptions(ClientOptions.ServiceVersion.) +var client = new Client(endpoint, credential, options); +``` + +When selecting an API version, it's important to verify that there are no breaking changes compared to the latest API version. If there are significant differences, API calls may fail due to incompatibility. + +Always ensure that the chosen API version is fully supported and operational for your specific use case and that it aligns with the service's versioning policy. + +## Key concepts + +The *Key concepts* section should describe the functionality of the main classes. Point out the most important and useful classes in the package (with links to their reference pages) and explain how those classes work together. Feel free to use bulleted lists, tables, code blocks, or even diagrams for clarity. + +Include the *Thread safety* and *Additional concepts* sections below at the end of your *Key concepts* section. You may remove or add links depending on what your library makes use of: + +### Thread safety + +We guarantee that all client instance methods are thread-safe and independent of each other ([guideline](https://azure.github.io/azure-sdk/dotnet_introduction.html#dotnet-service-methods-thread-safety)). This ensures that the recommendation of reusing client instances is always safe, even across threads. + +### Additional concepts + +[Client options](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/core/Azure.Core/README.md#configuring-service-clients-using-clientoptions) | +[Accessing the response](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/core/Azure.Core/README.md#accessing-http-response-details-using-responset) | +[Long-running operations](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/core/Azure.Core/README.md#consuming-long-running-operations-using-operationt) | +[Handling failures](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/core/Azure.Core/README.md#reporting-errors-requestfailedexception) | +[Diagnostics](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/core/Azure.Core/samples/Diagnostics.md) | +[Mocking](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/core/Azure.Core/README.md#mocking) | +[Client lifetime](https://devblogs.microsoft.com/azure-sdk/lifetime-management-and-thread-safety-guarantees-of-azure-sdk-net-clients/) + + +## Examples + +You can familiarize yourself with different APIs using [Samples](https://github.com/Azure/azure-sdk-for-net/tree/main/sdk/eventgrid/Azure.Messaging.EventGrid.Namespaces/samples). + +## Troubleshooting + +Describe common errors and exceptions, how to "unpack" them if necessary, and include guidance for graceful handling and recovery. + +Provide information to help developers avoid throttling or other service-enforced errors they might encounter. For example, provide guidance and examples for using retry or connection policies in the API. + +If the package or a related package supports it, include tips for logging or enabling instrumentation to help them debug their code. + +## Next steps + +* Provide a link to additional code examples, ideally to those sitting alongside the README in the package's `/samples` directory. +* If appropriate, point users to other packages that might be useful. +* If you think there's a good chance that developers might stumble across your package in error (because they're searching for specific functionality and mistakenly think the package provides that functionality), point them to the packages they might be looking for. + +## Contributing + +This is a template, but your SDK readme should include details on how to contribute code to the repo/package. + + +[style-guide-msft]: https://docs.microsoft.com/style-guide/capitalization +[style-guide-cloud]: https://aka.ms/azsdk/cloud-style-guide + +![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-net/sdk/eventgrid/Azure.Messaging.EventGrid.Namespaces/README.png) \ No newline at end of file diff --git a/sdk/eventgrid/Azure.Messaging.EventGridV2/api/Azure.Messaging.EventGrid.Namespaces.net8.0.cs b/sdk/eventgrid/Azure.Messaging.EventGridV2/api/Azure.Messaging.EventGrid.Namespaces.net8.0.cs new file mode 100644 index 000000000000..462ff2b70d6c --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGridV2/api/Azure.Messaging.EventGrid.Namespaces.net8.0.cs @@ -0,0 +1,220 @@ +namespace Azure.Messaging.EventGrid.Namespaces +{ + public partial class AcknowledgeResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal AcknowledgeResult() { } + public System.Collections.Generic.IReadOnlyList FailedLockTokens { get { throw null; } } + public System.Collections.Generic.IReadOnlyList SucceededLockTokens { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Messaging.EventGrid.Namespaces.AcknowledgeResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Messaging.EventGrid.Namespaces.AcknowledgeResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class BrokerProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal BrokerProperties() { } + public int DeliveryCount { get { throw null; } } + public string LockToken { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Messaging.EventGrid.Namespaces.BrokerProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Messaging.EventGrid.Namespaces.BrokerProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public static partial class EventGridNamespacesModelFactory + { + public static Azure.Messaging.EventGrid.Namespaces.AcknowledgeResult AcknowledgeResult(System.Collections.Generic.IEnumerable failedLockTokens = null, System.Collections.Generic.IEnumerable succeededLockTokens = null) { throw null; } + public static Azure.Messaging.EventGrid.Namespaces.BrokerProperties BrokerProperties(string lockToken = null, int deliveryCount = 0) { throw null; } + public static Azure.Messaging.EventGrid.Namespaces.FailedLockToken FailedLockToken(string lockToken = null, Azure.ResponseError error = null) { throw null; } + public static Azure.Messaging.EventGrid.Namespaces.ReceiveDetails ReceiveDetails(Azure.Messaging.EventGrid.Namespaces.BrokerProperties brokerProperties = null, Azure.Messaging.CloudEvent @event = null) { throw null; } + public static Azure.Messaging.EventGrid.Namespaces.ReceiveResult ReceiveResult(System.Collections.Generic.IEnumerable details = null) { throw null; } + public static Azure.Messaging.EventGrid.Namespaces.RejectResult RejectResult(System.Collections.Generic.IEnumerable failedLockTokens = null, System.Collections.Generic.IEnumerable succeededLockTokens = null) { throw null; } + public static Azure.Messaging.EventGrid.Namespaces.ReleaseResult ReleaseResult(System.Collections.Generic.IEnumerable failedLockTokens = null, System.Collections.Generic.IEnumerable succeededLockTokens = null) { throw null; } + public static Azure.Messaging.EventGrid.Namespaces.RenewLocksResult RenewLocksResult(System.Collections.Generic.IEnumerable failedLockTokens = null, System.Collections.Generic.IEnumerable succeededLockTokens = null) { throw null; } + } + public partial class EventGridReceiverClient + { + protected EventGridReceiverClient() { } + public EventGridReceiverClient(System.Uri endpoint, string topicName, string subscriptionName, Azure.AzureKeyCredential credential) { } + public EventGridReceiverClient(System.Uri endpoint, string topicName, string subscriptionName, Azure.AzureKeyCredential credential, Azure.Messaging.EventGrid.Namespaces.EventGridReceiverClientOptions options) { } + public EventGridReceiverClient(System.Uri endpoint, string topicName, string subscriptionName, Azure.Core.TokenCredential credential) { } + public EventGridReceiverClient(System.Uri endpoint, string topicName, string subscriptionName, Azure.Core.TokenCredential credential, Azure.Messaging.EventGrid.Namespaces.EventGridReceiverClientOptions options) { } + public virtual Azure.Core.Pipeline.HttpPipeline Pipeline { get { throw null; } } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public virtual Azure.Response Acknowledge(Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + public virtual Azure.Response Acknowledge(System.Collections.Generic.IEnumerable lockTokens, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public virtual System.Threading.Tasks.Task AcknowledgeAsync(Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task> AcknowledgeAsync(System.Collections.Generic.IEnumerable lockTokens, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public virtual Azure.Response Receive(int? maxEvents, System.TimeSpan? maxWaitTime, Azure.RequestContext context) { throw null; } + public virtual Azure.Response Receive(int? maxEvents = default(int?), System.TimeSpan? maxWaitTime = default(System.TimeSpan?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public virtual System.Threading.Tasks.Task ReceiveAsync(int? maxEvents, System.TimeSpan? maxWaitTime, Azure.RequestContext context) { throw null; } + public virtual System.Threading.Tasks.Task> ReceiveAsync(int? maxEvents = default(int?), System.TimeSpan? maxWaitTime = default(System.TimeSpan?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public virtual Azure.Response Reject(Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + public virtual Azure.Response Reject(System.Collections.Generic.IEnumerable lockTokens, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public virtual System.Threading.Tasks.Task RejectAsync(Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task> RejectAsync(System.Collections.Generic.IEnumerable lockTokens, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public virtual Azure.Response Release(Azure.Core.RequestContent content, string releaseDelayInSeconds = null, Azure.RequestContext context = null) { throw null; } + public virtual Azure.Response Release(System.Collections.Generic.IEnumerable lockTokens, Azure.Messaging.EventGrid.Namespaces.ReleaseDelay? delay = default(Azure.Messaging.EventGrid.Namespaces.ReleaseDelay?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public virtual System.Threading.Tasks.Task ReleaseAsync(Azure.Core.RequestContent content, string releaseDelayInSeconds = null, Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task> ReleaseAsync(System.Collections.Generic.IEnumerable lockTokens, Azure.Messaging.EventGrid.Namespaces.ReleaseDelay? delay = default(Azure.Messaging.EventGrid.Namespaces.ReleaseDelay?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public virtual Azure.Response RenewLocks(Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + public virtual Azure.Response RenewLocks(System.Collections.Generic.IEnumerable lockTokens, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public virtual System.Threading.Tasks.Task RenewLocksAsync(Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task> RenewLocksAsync(System.Collections.Generic.IEnumerable lockTokens, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class EventGridReceiverClientOptions : Azure.Core.ClientOptions + { + public EventGridReceiverClientOptions(Azure.Messaging.EventGrid.Namespaces.EventGridReceiverClientOptions.ServiceVersion version = Azure.Messaging.EventGrid.Namespaces.EventGridReceiverClientOptions.ServiceVersion.V2024_06_01) { } + public enum ServiceVersion + { + V2023_11_01 = 1, + V2024_06_01 = 2, + } + } + public partial class EventGridSenderClient + { + protected EventGridSenderClient() { } + public EventGridSenderClient(System.Uri endpoint, string topicName, Azure.AzureKeyCredential credential) { } + public EventGridSenderClient(System.Uri endpoint, string topicName, Azure.AzureKeyCredential credential, Azure.Messaging.EventGrid.Namespaces.EventGridSenderClientOptions options) { } + public EventGridSenderClient(System.Uri endpoint, string topicName, Azure.Core.TokenCredential credential) { } + public EventGridSenderClient(System.Uri endpoint, string topicName, Azure.Core.TokenCredential credential, Azure.Messaging.EventGrid.Namespaces.EventGridSenderClientOptions options) { } + public virtual Azure.Core.Pipeline.HttpPipeline Pipeline { get { throw null; } } + public virtual Azure.Response Send(Azure.Messaging.CloudEvent cloudEvent, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Send(System.Collections.Generic.IEnumerable cloudEvents, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task SendAsync(Azure.Messaging.CloudEvent cloudEvent, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task SendAsync(System.Collections.Generic.IEnumerable cloudEvents, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public virtual Azure.Response SendEvent(Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public virtual System.Threading.Tasks.Task SendEventAsync(Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public virtual Azure.Response SendEvents(Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public virtual System.Threading.Tasks.Task SendEventsAsync(Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + } + public partial class EventGridSenderClientOptions : Azure.Core.ClientOptions + { + public EventGridSenderClientOptions(Azure.Messaging.EventGrid.Namespaces.EventGridSenderClientOptions.ServiceVersion version = Azure.Messaging.EventGrid.Namespaces.EventGridSenderClientOptions.ServiceVersion.V2024_06_01) { } + public enum ServiceVersion + { + V2023_11_01 = 1, + V2024_06_01 = 2, + } + } + public partial class FailedLockToken : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal FailedLockToken() { } + public Azure.ResponseError Error { get { throw null; } } + public string LockToken { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Messaging.EventGrid.Namespaces.FailedLockToken System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Messaging.EventGrid.Namespaces.FailedLockToken System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ReceiveDetails : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal ReceiveDetails() { } + public Azure.Messaging.EventGrid.Namespaces.BrokerProperties BrokerProperties { get { throw null; } } + public Azure.Messaging.CloudEvent Event { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Messaging.EventGrid.Namespaces.ReceiveDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Messaging.EventGrid.Namespaces.ReceiveDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ReceiveResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal ReceiveResult() { } + public System.Collections.Generic.IReadOnlyList Details { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Messaging.EventGrid.Namespaces.ReceiveResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Messaging.EventGrid.Namespaces.ReceiveResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class RejectResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal RejectResult() { } + public System.Collections.Generic.IReadOnlyList FailedLockTokens { get { throw null; } } + public System.Collections.Generic.IReadOnlyList SucceededLockTokens { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Messaging.EventGrid.Namespaces.RejectResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Messaging.EventGrid.Namespaces.RejectResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.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 ReleaseDelay : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ReleaseDelay(string value) { throw null; } + public static Azure.Messaging.EventGrid.Namespaces.ReleaseDelay NoDelay { get { throw null; } } + public static Azure.Messaging.EventGrid.Namespaces.ReleaseDelay OneHour { get { throw null; } } + public static Azure.Messaging.EventGrid.Namespaces.ReleaseDelay OneMinute { get { throw null; } } + public static Azure.Messaging.EventGrid.Namespaces.ReleaseDelay TenMinutes { get { throw null; } } + public static Azure.Messaging.EventGrid.Namespaces.ReleaseDelay TenSeconds { get { throw null; } } + public bool Equals(Azure.Messaging.EventGrid.Namespaces.ReleaseDelay 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.Messaging.EventGrid.Namespaces.ReleaseDelay left, Azure.Messaging.EventGrid.Namespaces.ReleaseDelay right) { throw null; } + public static implicit operator Azure.Messaging.EventGrid.Namespaces.ReleaseDelay (string value) { throw null; } + public static bool operator !=(Azure.Messaging.EventGrid.Namespaces.ReleaseDelay left, Azure.Messaging.EventGrid.Namespaces.ReleaseDelay right) { throw null; } + public override string ToString() { throw null; } + } + public partial class ReleaseResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal ReleaseResult() { } + public System.Collections.Generic.IReadOnlyList FailedLockTokens { get { throw null; } } + public System.Collections.Generic.IReadOnlyList SucceededLockTokens { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Messaging.EventGrid.Namespaces.ReleaseResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Messaging.EventGrid.Namespaces.ReleaseResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class RenewLocksResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal RenewLocksResult() { } + public System.Collections.Generic.IReadOnlyList FailedLockTokens { get { throw null; } } + public System.Collections.Generic.IReadOnlyList SucceededLockTokens { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Messaging.EventGrid.Namespaces.RenewLocksResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Messaging.EventGrid.Namespaces.RenewLocksResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } +} +namespace Microsoft.Extensions.Azure +{ + public static partial class EventGridNamespacesClientBuilderExtensions + { + public static Azure.Core.Extensions.IAzureClientBuilder AddEventGridReceiverClient(this TBuilder builder, System.Uri endpoint, string topicName, string subscriptionName) where TBuilder : Azure.Core.Extensions.IAzureClientFactoryBuilderWithCredential { throw null; } + public static Azure.Core.Extensions.IAzureClientBuilder AddEventGridReceiverClient(this TBuilder builder, System.Uri endpoint, string topicName, string subscriptionName, Azure.AzureKeyCredential credential) where TBuilder : Azure.Core.Extensions.IAzureClientFactoryBuilder { throw null; } + public static Azure.Core.Extensions.IAzureClientBuilder AddEventGridReceiverClient(this TBuilder builder, TConfiguration configuration) where TBuilder : Azure.Core.Extensions.IAzureClientFactoryBuilderWithConfiguration { throw null; } + public static Azure.Core.Extensions.IAzureClientBuilder AddEventGridSenderClient(this TBuilder builder, System.Uri endpoint, string topicName) where TBuilder : Azure.Core.Extensions.IAzureClientFactoryBuilderWithCredential { throw null; } + public static Azure.Core.Extensions.IAzureClientBuilder AddEventGridSenderClient(this TBuilder builder, System.Uri endpoint, string topicName, Azure.AzureKeyCredential credential) where TBuilder : Azure.Core.Extensions.IAzureClientFactoryBuilder { throw null; } + public static Azure.Core.Extensions.IAzureClientBuilder AddEventGridSenderClient(this TBuilder builder, TConfiguration configuration) where TBuilder : Azure.Core.Extensions.IAzureClientFactoryBuilderWithConfiguration { throw null; } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGridV2/api/Azure.Messaging.EventGrid.Namespaces.netstandard2.0.cs b/sdk/eventgrid/Azure.Messaging.EventGridV2/api/Azure.Messaging.EventGrid.Namespaces.netstandard2.0.cs new file mode 100644 index 000000000000..19ab2d90251f --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGridV2/api/Azure.Messaging.EventGrid.Namespaces.netstandard2.0.cs @@ -0,0 +1,131 @@ +namespace Azure.Messaging.EventGrid.Namespaces +{ + public partial class AcknowledgeResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal AcknowledgeResult() { } + public System.Collections.Generic.IReadOnlyList FailedLockTokens { get { throw null; } } + public System.Collections.Generic.IReadOnlyList SucceededLockTokens { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Messaging.EventGrid.Namespaces.AcknowledgeResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Messaging.EventGrid.Namespaces.AcknowledgeResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class AzureMessagingEventGridNamespacesClientOptions : Azure.Core.ClientOptions + { + public AzureMessagingEventGridNamespacesClientOptions(Azure.Messaging.EventGrid.Namespaces.AzureMessagingEventGridNamespacesClientOptions.ServiceVersion version = Azure.Messaging.EventGrid.Namespaces.AzureMessagingEventGridNamespacesClientOptions.ServiceVersion.V2024_06_01) { } + public enum ServiceVersion + { + V2023_11_01 = 1, + V2024_06_01 = 2, + } + } + public partial class EventGridReceiverClient + { + protected EventGridReceiverClient() { } + public EventGridReceiverClient(System.Uri endpoint, Azure.AzureKeyCredential credential) { } + public EventGridReceiverClient(System.Uri endpoint, Azure.AzureKeyCredential credential, Azure.Messaging.EventGrid.Namespaces.AzureMessagingEventGridNamespacesClientOptions options) { } + public EventGridReceiverClient(System.Uri endpoint, Azure.Core.TokenCredential credential) { } + public EventGridReceiverClient(System.Uri endpoint, Azure.Core.TokenCredential credential, Azure.Messaging.EventGrid.Namespaces.AzureMessagingEventGridNamespacesClientOptions options) { } + public virtual Azure.Core.Pipeline.HttpPipeline Pipeline { get { throw null; } } + } + public partial class EventGridSenderClient + { + protected EventGridSenderClient() { } + public EventGridSenderClient(System.Uri endpoint, Azure.AzureKeyCredential credential) { } + public EventGridSenderClient(System.Uri endpoint, Azure.AzureKeyCredential credential, Azure.Messaging.EventGrid.Namespaces.AzureMessagingEventGridNamespacesClientOptions options) { } + public EventGridSenderClient(System.Uri endpoint, Azure.Core.TokenCredential credential) { } + public EventGridSenderClient(System.Uri endpoint, Azure.Core.TokenCredential credential, Azure.Messaging.EventGrid.Namespaces.AzureMessagingEventGridNamespacesClientOptions options) { } + public virtual Azure.Core.Pipeline.HttpPipeline Pipeline { get { throw null; } } + } + public partial class FailedLockToken : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal FailedLockToken() { } + public Azure.ResponseError Error { get { throw null; } } + public string LockToken { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Messaging.EventGrid.Namespaces.FailedLockToken System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Messaging.EventGrid.Namespaces.FailedLockToken System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public static partial class MessagingEventGridNamespacesModelFactory + { + public static Azure.Messaging.EventGrid.Namespaces.AcknowledgeResult AcknowledgeResult(System.Collections.Generic.IEnumerable failedLockTokens = null, System.Collections.Generic.IEnumerable succeededLockTokens = null) { throw null; } + public static Azure.Messaging.EventGrid.Namespaces.FailedLockToken FailedLockToken(string lockToken = null, Azure.ResponseError error = null) { throw null; } + public static Azure.Messaging.EventGrid.Namespaces.RejectResult RejectResult(System.Collections.Generic.IEnumerable failedLockTokens = null, System.Collections.Generic.IEnumerable succeededLockTokens = null) { throw null; } + public static Azure.Messaging.EventGrid.Namespaces.ReleaseResult ReleaseResult(System.Collections.Generic.IEnumerable failedLockTokens = null, System.Collections.Generic.IEnumerable succeededLockTokens = null) { throw null; } + public static Azure.Messaging.EventGrid.Namespaces.RenewLocksResult RenewLocksResult(System.Collections.Generic.IEnumerable failedLockTokens = null, System.Collections.Generic.IEnumerable succeededLockTokens = null) { throw null; } + } + public partial class RejectResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal RejectResult() { } + public System.Collections.Generic.IReadOnlyList FailedLockTokens { get { throw null; } } + public System.Collections.Generic.IReadOnlyList SucceededLockTokens { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Messaging.EventGrid.Namespaces.RejectResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Messaging.EventGrid.Namespaces.RejectResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.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 ReleaseDelay : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ReleaseDelay(string value) { throw null; } + public static Azure.Messaging.EventGrid.Namespaces.ReleaseDelay NoDelay { get { throw null; } } + public static Azure.Messaging.EventGrid.Namespaces.ReleaseDelay OneHour { get { throw null; } } + public static Azure.Messaging.EventGrid.Namespaces.ReleaseDelay OneMinute { get { throw null; } } + public static Azure.Messaging.EventGrid.Namespaces.ReleaseDelay TenMinutes { get { throw null; } } + public static Azure.Messaging.EventGrid.Namespaces.ReleaseDelay TenSeconds { get { throw null; } } + public bool Equals(Azure.Messaging.EventGrid.Namespaces.ReleaseDelay 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.Messaging.EventGrid.Namespaces.ReleaseDelay left, Azure.Messaging.EventGrid.Namespaces.ReleaseDelay right) { throw null; } + public static implicit operator Azure.Messaging.EventGrid.Namespaces.ReleaseDelay (string value) { throw null; } + public static bool operator !=(Azure.Messaging.EventGrid.Namespaces.ReleaseDelay left, Azure.Messaging.EventGrid.Namespaces.ReleaseDelay right) { throw null; } + public override string ToString() { throw null; } + } + public partial class ReleaseResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal ReleaseResult() { } + public System.Collections.Generic.IReadOnlyList FailedLockTokens { get { throw null; } } + public System.Collections.Generic.IReadOnlyList SucceededLockTokens { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Messaging.EventGrid.Namespaces.ReleaseResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Messaging.EventGrid.Namespaces.ReleaseResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class RenewLocksResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal RenewLocksResult() { } + public System.Collections.Generic.IReadOnlyList FailedLockTokens { get { throw null; } } + public System.Collections.Generic.IReadOnlyList SucceededLockTokens { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Messaging.EventGrid.Namespaces.RenewLocksResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Messaging.EventGrid.Namespaces.RenewLocksResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } +} +namespace Microsoft.Extensions.Azure +{ + public static partial class MessagingEventGridNamespacesClientBuilderExtensions + { + public static Azure.Core.Extensions.IAzureClientBuilder AddEventGridReceiverClient(this TBuilder builder, System.Uri endpoint) where TBuilder : Azure.Core.Extensions.IAzureClientFactoryBuilderWithCredential { throw null; } + public static Azure.Core.Extensions.IAzureClientBuilder AddEventGridReceiverClient(this TBuilder builder, System.Uri endpoint, Azure.AzureKeyCredential credential) where TBuilder : Azure.Core.Extensions.IAzureClientFactoryBuilder { throw null; } + public static Azure.Core.Extensions.IAzureClientBuilder AddEventGridReceiverClient(this TBuilder builder, TConfiguration configuration) where TBuilder : Azure.Core.Extensions.IAzureClientFactoryBuilderWithConfiguration { throw null; } + public static Azure.Core.Extensions.IAzureClientBuilder AddEventGridSenderClient(this TBuilder builder, System.Uri endpoint) where TBuilder : Azure.Core.Extensions.IAzureClientFactoryBuilderWithCredential { throw null; } + public static Azure.Core.Extensions.IAzureClientBuilder AddEventGridSenderClient(this TBuilder builder, System.Uri endpoint, Azure.AzureKeyCredential credential) where TBuilder : Azure.Core.Extensions.IAzureClientFactoryBuilder { throw null; } + public static Azure.Core.Extensions.IAzureClientBuilder AddEventGridSenderClient(this TBuilder builder, TConfiguration configuration) where TBuilder : Azure.Core.Extensions.IAzureClientFactoryBuilderWithConfiguration { throw null; } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGridV2/src/Azure.Messaging.EventGrid.Namespaces.csproj b/sdk/eventgrid/Azure.Messaging.EventGridV2/src/Azure.Messaging.EventGrid.Namespaces.csproj new file mode 100644 index 000000000000..63c432e943e1 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGridV2/src/Azure.Messaging.EventGrid.Namespaces.csproj @@ -0,0 +1,20 @@ + + + This is the Azure.Messaging.EventGrid.Namespaces client library for developing .NET applications with rich experience. + Azure SDK Code Generation Azure.Messaging.EventGrid.Namespaces for Azure Data Plane + 1.0.0-beta.1 + Azure.Messaging.EventGrid.Namespaces + $(RequiredTargetFrameworks) + true + + + + + + + + + + + + diff --git a/sdk/eventgrid/Azure.Messaging.EventGridV2/src/Generated/AcknowledgeRequest.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGridV2/src/Generated/AcknowledgeRequest.Serialization.cs new file mode 100644 index 000000000000..3a9b9f5a0937 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGridV2/src/Generated/AcknowledgeRequest.Serialization.cs @@ -0,0 +1,152 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Messaging.EventGrid.Namespaces +{ + internal partial class AcknowledgeRequest : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AcknowledgeRequest)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("lockTokens"u8); + writer.WriteStartArray(); + foreach (var item in LockTokens) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + AcknowledgeRequest IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AcknowledgeRequest)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAcknowledgeRequest(document.RootElement, options); + } + + internal static AcknowledgeRequest DeserializeAcknowledgeRequest(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList lockTokens = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("lockTokens"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + lockTokens = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new AcknowledgeRequest(lockTokens, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(AcknowledgeRequest)} does not support writing '{options.Format}' format."); + } + } + + AcknowledgeRequest IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeAcknowledgeRequest(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AcknowledgeRequest)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static AcknowledgeRequest FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeAcknowledgeRequest(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGridV2/src/Generated/AcknowledgeRequest.cs b/sdk/eventgrid/Azure.Messaging.EventGridV2/src/Generated/AcknowledgeRequest.cs new file mode 100644 index 000000000000..da487d167f8b --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGridV2/src/Generated/AcknowledgeRequest.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.Messaging.EventGrid.Namespaces +{ + /// The AcknowledgeRequest. + internal partial class AcknowledgeRequest + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Array of lock tokens. + /// is null. + internal AcknowledgeRequest(IEnumerable lockTokens) + { + Argument.AssertNotNull(lockTokens, nameof(lockTokens)); + + LockTokens = lockTokens.ToList(); + } + + /// Initializes a new instance of . + /// Array of lock tokens. + /// Keeps track of any properties unknown to the library. + internal AcknowledgeRequest(IReadOnlyList lockTokens, IDictionary serializedAdditionalRawData) + { + LockTokens = lockTokens; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal AcknowledgeRequest() + { + } + + /// Array of lock tokens. + public IReadOnlyList LockTokens { get; } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGridV2/src/Generated/AcknowledgeResult.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGridV2/src/Generated/AcknowledgeResult.Serialization.cs new file mode 100644 index 000000000000..50b842646fdc --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGridV2/src/Generated/AcknowledgeResult.Serialization.cs @@ -0,0 +1,176 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Messaging.EventGrid.Namespaces +{ + public partial class AcknowledgeResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AcknowledgeResult)} does not support writing '{format}' format."); + } + + if (options.Format != "W") + { + writer.WritePropertyName("failedLockTokens"u8); + writer.WriteStartArray(); + foreach (var item in FailedLockTokens) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (options.Format != "W") + { + writer.WritePropertyName("succeededLockTokens"u8); + writer.WriteStartArray(); + foreach (var item in SucceededLockTokens) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + AcknowledgeResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AcknowledgeResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAcknowledgeResult(document.RootElement, options); + } + + internal static AcknowledgeResult DeserializeAcknowledgeResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList failedLockTokens = default; + IReadOnlyList succeededLockTokens = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("failedLockTokens"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(FailedLockToken.DeserializeFailedLockToken(item, options)); + } + failedLockTokens = array; + continue; + } + if (property.NameEquals("succeededLockTokens"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + succeededLockTokens = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new AcknowledgeResult(failedLockTokens, succeededLockTokens, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(AcknowledgeResult)} does not support writing '{options.Format}' format."); + } + } + + AcknowledgeResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeAcknowledgeResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AcknowledgeResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static AcknowledgeResult FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeAcknowledgeResult(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGridV2/src/Generated/AcknowledgeResult.cs b/sdk/eventgrid/Azure.Messaging.EventGridV2/src/Generated/AcknowledgeResult.cs new file mode 100644 index 000000000000..871c344e0d4d --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGridV2/src/Generated/AcknowledgeResult.cs @@ -0,0 +1,71 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Messaging.EventGrid.Namespaces +{ + /// The result of the Acknowledge operation. + public partial class AcknowledgeResult + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal AcknowledgeResult() + { + FailedLockTokens = new ChangeTrackingList(); + SucceededLockTokens = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// Array of FailedLockToken for failed cloud events. Each FailedLockToken includes the lock token along with the related error information (namely, the error code and description). + /// Array of lock tokens for the successfully acknowledged cloud events. + /// Keeps track of any properties unknown to the library. + internal AcknowledgeResult(IReadOnlyList failedLockTokens, IReadOnlyList succeededLockTokens, IDictionary serializedAdditionalRawData) + { + FailedLockTokens = failedLockTokens; + SucceededLockTokens = succeededLockTokens; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Array of FailedLockToken for failed cloud events. Each FailedLockToken includes the lock token along with the related error information (namely, the error code and description). + public IReadOnlyList FailedLockTokens { get; } + /// Array of lock tokens for the successfully acknowledged cloud events. + public IReadOnlyList SucceededLockTokens { get; } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGridV2/src/Generated/AzureMessagingEventGridNamespacesClientOptions.cs b/sdk/eventgrid/Azure.Messaging.EventGridV2/src/Generated/AzureMessagingEventGridNamespacesClientOptions.cs new file mode 100644 index 000000000000..028d63a6a191 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGridV2/src/Generated/AzureMessagingEventGridNamespacesClientOptions.cs @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using Azure.Core; + +namespace Azure.Messaging.EventGrid.Namespaces +{ + /// Client options for Azure.Messaging.EventGrid.Namespaces library clients. + public partial class AzureMessagingEventGridNamespacesClientOptions : ClientOptions + { + private const ServiceVersion LatestVersion = ServiceVersion.V2024_06_01; + + /// The version of the service to use. + public enum ServiceVersion + { + /// Service version "2023-11-01". + V2023_11_01 = 1, + /// Service version "2024-06-01". + V2024_06_01 = 2, + } + + internal string Version { get; } + + /// Initializes new instance of AzureMessagingEventGridNamespacesClientOptions. + public AzureMessagingEventGridNamespacesClientOptions(ServiceVersion version = LatestVersion) + { + Version = version switch + { + ServiceVersion.V2023_11_01 => "2023-11-01", + ServiceVersion.V2024_06_01 => "2024-06-01", + _ => throw new NotSupportedException() + }; + } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGridV2/src/Generated/BrokerProperties.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGridV2/src/Generated/BrokerProperties.Serialization.cs new file mode 100644 index 000000000000..bc10318d0710 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGridV2/src/Generated/BrokerProperties.Serialization.cs @@ -0,0 +1,150 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Messaging.EventGrid.Namespaces +{ + internal partial class BrokerProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(BrokerProperties)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("lockToken"u8); + writer.WriteStringValue(LockToken); + writer.WritePropertyName("deliveryCount"u8); + writer.WriteNumberValue(DeliveryCount); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + BrokerProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(BrokerProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeBrokerProperties(document.RootElement, options); + } + + internal static BrokerProperties DeserializeBrokerProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string lockToken = default; + int deliveryCount = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("lockToken"u8)) + { + lockToken = property.Value.GetString(); + continue; + } + if (property.NameEquals("deliveryCount"u8)) + { + deliveryCount = property.Value.GetInt32(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new BrokerProperties(lockToken, deliveryCount, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(BrokerProperties)} does not support writing '{options.Format}' format."); + } + } + + BrokerProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeBrokerProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(BrokerProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static BrokerProperties FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeBrokerProperties(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGridV2/src/Generated/BrokerProperties.cs b/sdk/eventgrid/Azure.Messaging.EventGridV2/src/Generated/BrokerProperties.cs new file mode 100644 index 000000000000..78d00f1266d5 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGridV2/src/Generated/BrokerProperties.cs @@ -0,0 +1,81 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Messaging.EventGrid.Namespaces +{ + /// Properties of the Event Broker operation. + internal partial class BrokerProperties + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// 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 token of the lock on the event. + /// The attempt count for delivering the event. + /// is null. + internal BrokerProperties(string lockToken, int deliveryCount) + { + Argument.AssertNotNull(lockToken, nameof(lockToken)); + + LockToken = lockToken; + DeliveryCount = deliveryCount; + } + + /// Initializes a new instance of . + /// The token of the lock on the event. + /// The attempt count for delivering the event. + /// Keeps track of any properties unknown to the library. + internal BrokerProperties(string lockToken, int deliveryCount, IDictionary serializedAdditionalRawData) + { + LockToken = lockToken; + DeliveryCount = deliveryCount; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal BrokerProperties() + { + } + + /// The token of the lock on the event. + public string LockToken { get; } + /// The attempt count for delivering the event. + public int DeliveryCount { get; } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGridV2/src/Generated/CloudEvent.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGridV2/src/Generated/CloudEvent.Serialization.cs new file mode 100644 index 000000000000..054c9263ef81 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGridV2/src/Generated/CloudEvent.Serialization.cs @@ -0,0 +1,262 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Messaging.EventGrid.Namespaces +{ + internal partial class CloudEvent : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(CloudEvent)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("id"u8); + writer.WriteStringValue(Id); + writer.WritePropertyName("source"u8); + writer.WriteStringValue(Source); + if (Optional.IsDefined(Data)) + { + writer.WritePropertyName("data"u8); +#if NET6_0_OR_GREATER + writer.WriteRawValue(Data); +#else + using (JsonDocument document = JsonDocument.Parse(Data, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + if (Optional.IsDefined(DataBase64)) + { + writer.WritePropertyName("data_base64"u8); + writer.WriteBase64StringValue(DataBase64.ToArray(), "D"); + } + writer.WritePropertyName("type"u8); + writer.WriteStringValue(Type); + if (Optional.IsDefined(Time)) + { + writer.WritePropertyName("time"u8); + writer.WriteStringValue(Time.Value, "O"); + } + writer.WritePropertyName("specversion"u8); + writer.WriteStringValue(Specversion); + if (Optional.IsDefined(Dataschema)) + { + writer.WritePropertyName("dataschema"u8); + writer.WriteStringValue(Dataschema); + } + if (Optional.IsDefined(Datacontenttype)) + { + writer.WritePropertyName("datacontenttype"u8); + writer.WriteStringValue(Datacontenttype); + } + if (Optional.IsDefined(Subject)) + { + writer.WritePropertyName("subject"u8); + writer.WriteStringValue(Subject); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + CloudEvent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(CloudEvent)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeCloudEvent(document.RootElement, options); + } + + internal static CloudEvent DeserializeCloudEvent(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string id = default; + string source = default; + BinaryData data = default; + BinaryData dataBase64 = default; + string type = default; + DateTimeOffset? time = default; + string specversion = default; + string dataschema = default; + string datacontenttype = default; + string subject = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("id"u8)) + { + id = property.Value.GetString(); + continue; + } + if (property.NameEquals("source"u8)) + { + source = property.Value.GetString(); + continue; + } + if (property.NameEquals("data"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + data = BinaryData.FromString(property.Value.GetRawText()); + continue; + } + if (property.NameEquals("data_base64"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + dataBase64 = BinaryData.FromBytes(property.Value.GetBytesFromBase64("D")); + continue; + } + if (property.NameEquals("type"u8)) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("time"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + time = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("specversion"u8)) + { + specversion = property.Value.GetString(); + continue; + } + if (property.NameEquals("dataschema"u8)) + { + dataschema = property.Value.GetString(); + continue; + } + if (property.NameEquals("datacontenttype"u8)) + { + datacontenttype = property.Value.GetString(); + continue; + } + if (property.NameEquals("subject"u8)) + { + subject = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new CloudEvent( + id, + source, + data, + dataBase64, + type, + time, + specversion, + dataschema, + datacontenttype, + subject, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(CloudEvent)} does not support writing '{options.Format}' format."); + } + } + + CloudEvent IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeCloudEvent(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(CloudEvent)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static CloudEvent FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeCloudEvent(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGridV2/src/Generated/CloudEvent.cs b/sdk/eventgrid/Azure.Messaging.EventGridV2/src/Generated/CloudEvent.cs new file mode 100644 index 000000000000..6d49af6075dd --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGridV2/src/Generated/CloudEvent.cs @@ -0,0 +1,164 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Messaging.EventGrid.Namespaces +{ + /// Properties of an event published to an Azure Messaging EventGrid Namespace topic using the CloudEvent 1.0 Schema. + internal partial class CloudEvent + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// An identifier for the event. The combination of id and source must be unique for each distinct event. + /// Identifies the context in which an event happened. The combination of id and source must be unique for each distinct event. + /// Type of event related to the originating occurrence. + /// The version of the CloudEvents specification which the event uses. + /// , , or is null. + public CloudEvent(string id, string source, string type, string specversion) + { + Argument.AssertNotNull(id, nameof(id)); + Argument.AssertNotNull(source, nameof(source)); + Argument.AssertNotNull(type, nameof(type)); + Argument.AssertNotNull(specversion, nameof(specversion)); + + Id = id; + Source = source; + Type = type; + Specversion = specversion; + } + + /// Initializes a new instance of . + /// An identifier for the event. The combination of id and source must be unique for each distinct event. + /// Identifies the context in which an event happened. The combination of id and source must be unique for each distinct event. + /// Event data specific to the event type. + /// Event data specific to the event type, encoded as a base64 string. + /// Type of event related to the originating occurrence. + /// The time (in UTC) the event was generated, in RFC3339 format. + /// The version of the CloudEvents specification which the event uses. + /// Identifies the schema that data adheres to. + /// Content type of data value. + /// This describes the subject of the event in the context of the event producer (identified by source). + /// Keeps track of any properties unknown to the library. + internal CloudEvent(string id, string source, BinaryData data, BinaryData dataBase64, string type, DateTimeOffset? time, string specversion, string dataschema, string datacontenttype, string subject, IDictionary serializedAdditionalRawData) + { + Id = id; + Source = source; + Data = data; + DataBase64 = dataBase64; + Type = type; + Time = time; + Specversion = specversion; + Dataschema = dataschema; + Datacontenttype = datacontenttype; + Subject = subject; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal CloudEvent() + { + } + + /// An identifier for the event. The combination of id and source must be unique for each distinct event. + public string Id { get; set; } + /// Identifies the context in which an event happened. The combination of id and source must be unique for each distinct event. + public string Source { get; set; } + /// + /// Event data specific to the event type. + /// + /// To assign an object to this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + public BinaryData Data { get; set; } + /// + /// Event data specific to the event type, encoded as a base64 string. + /// + /// To assign a byte[] to this property use . + /// The byte[] will be serialized to a Base64 encoded string. + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromBytes(new byte[] { 1, 2, 3 }) + /// Creates a payload of "AQID". + /// + /// + /// + /// + public BinaryData DataBase64 { get; set; } + /// Type of event related to the originating occurrence. + public string Type { get; set; } + /// The time (in UTC) the event was generated, in RFC3339 format. + public DateTimeOffset? Time { get; set; } + /// The version of the CloudEvents specification which the event uses. + public string Specversion { get; set; } + /// Identifies the schema that data adheres to. + public string Dataschema { get; set; } + /// Content type of data value. + public string Datacontenttype { get; set; } + /// This describes the subject of the event in the context of the event producer (identified by source). + public string Subject { get; set; } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGridV2/src/Generated/EventGridReceiverClient.cs b/sdk/eventgrid/Azure.Messaging.EventGridV2/src/Generated/EventGridReceiverClient.cs new file mode 100644 index 000000000000..43b45c5c3811 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGridV2/src/Generated/EventGridReceiverClient.cs @@ -0,0 +1,840 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.Messaging.EventGrid.Namespaces +{ + // Data plane generated client. + /// The EventGridReceiver service client. + public partial class EventGridReceiverClient + { + private const string AuthorizationHeader = "Authorization"; + private readonly AzureKeyCredential _keyCredential; + private const string AuthorizationApiKeyPrefix = "SharedAccessKey"; + private static readonly string[] AuthorizationScopes = new string[] { "https://eventgrid.azure.net/.default" }; + private readonly TokenCredential _tokenCredential; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// The ClientDiagnostics is used to provide tracing support for the client library. + internal ClientDiagnostics ClientDiagnostics { get; } + + /// The HTTP pipeline for sending and receiving REST requests and responses. + public virtual HttpPipeline Pipeline => _pipeline; + + /// Initializes a new instance of EventGridReceiverClient for mocking. + protected EventGridReceiverClient() + { + } + + /// Initializes a new instance of EventGridReceiverClient. + /// The host name of the namespace, e.g. namespaceName1.westus-1.eventgrid.azure.net. + /// A credential used to authenticate to an Azure Service. + /// or is null. + public EventGridReceiverClient(Uri endpoint, AzureKeyCredential credential) : this(endpoint, credential, new AzureMessagingEventGridNamespacesClientOptions()) + { + } + + /// Initializes a new instance of EventGridReceiverClient. + /// The host name of the namespace, e.g. namespaceName1.westus-1.eventgrid.azure.net. + /// A credential used to authenticate to an Azure Service. + /// or is null. + public EventGridReceiverClient(Uri endpoint, TokenCredential credential) : this(endpoint, credential, new AzureMessagingEventGridNamespacesClientOptions()) + { + } + + /// Initializes a new instance of EventGridReceiverClient. + /// The host name of the namespace, e.g. namespaceName1.westus-1.eventgrid.azure.net. + /// A credential used to authenticate to an Azure Service. + /// The options for configuring the client. + /// or is null. + public EventGridReceiverClient(Uri endpoint, AzureKeyCredential credential, AzureMessagingEventGridNamespacesClientOptions options) + { + Argument.AssertNotNull(endpoint, nameof(endpoint)); + Argument.AssertNotNull(credential, nameof(credential)); + options ??= new AzureMessagingEventGridNamespacesClientOptions(); + + ClientDiagnostics = new ClientDiagnostics(options, true); + _keyCredential = credential; + _pipeline = HttpPipelineBuilder.Build(options, Array.Empty(), new HttpPipelinePolicy[] { new AzureKeyCredentialPolicy(_keyCredential, AuthorizationHeader, AuthorizationApiKeyPrefix) }, new ResponseClassifier()); + _endpoint = endpoint; + _apiVersion = options.Version; + } + + /// Initializes a new instance of EventGridReceiverClient. + /// The host name of the namespace, e.g. namespaceName1.westus-1.eventgrid.azure.net. + /// A credential used to authenticate to an Azure Service. + /// The options for configuring the client. + /// or is null. + public EventGridReceiverClient(Uri endpoint, TokenCredential credential, AzureMessagingEventGridNamespacesClientOptions options) + { + Argument.AssertNotNull(endpoint, nameof(endpoint)); + Argument.AssertNotNull(credential, nameof(credential)); + options ??= new AzureMessagingEventGridNamespacesClientOptions(); + + ClientDiagnostics = new ClientDiagnostics(options, true); + _tokenCredential = credential; + _pipeline = HttpPipelineBuilder.Build(options, Array.Empty(), new HttpPipelinePolicy[] { new BearerTokenAuthenticationPolicy(_tokenCredential, AuthorizationScopes) }, new ResponseClassifier()); + _endpoint = endpoint; + _apiVersion = options.Version; + } + + /// Receive a batch of Cloud Events from a subscription. + /// Topic Name. + /// Event Subscription Name. + /// Max Events count to be received. Minimum value is 1, while maximum value is 100 events. If not specified, the default value is 1. + /// Max wait time value for receive operation in Seconds. It is the time in seconds that the server approximately waits for the availability of an event and responds to the request. If an event is available, the broker responds immediately to the client. Minimum value is 10 seconds, while maximum value is 120 seconds. If not specified, the default value is 60 seconds. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + internal virtual async Task> ReceiveAsync(string topicName, string eventSubscriptionName, int? maxEvents = null, TimeSpan? maxWaitTime = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(topicName, nameof(topicName)); + Argument.AssertNotNullOrEmpty(eventSubscriptionName, nameof(eventSubscriptionName)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await ReceiveAsync(topicName, eventSubscriptionName, maxEvents, maxWaitTime, context).ConfigureAwait(false); + return Response.FromValue(ReceiveResult.FromResponse(response), response); + } + + /// Receive a batch of Cloud Events from a subscription. + /// Topic Name. + /// Event Subscription Name. + /// Max Events count to be received. Minimum value is 1, while maximum value is 100 events. If not specified, the default value is 1. + /// Max wait time value for receive operation in Seconds. It is the time in seconds that the server approximately waits for the availability of an event and responds to the request. If an event is available, the broker responds immediately to the client. Minimum value is 10 seconds, while maximum value is 120 seconds. If not specified, the default value is 60 seconds. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + internal virtual Response Receive(string topicName, string eventSubscriptionName, int? maxEvents = null, TimeSpan? maxWaitTime = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(topicName, nameof(topicName)); + Argument.AssertNotNullOrEmpty(eventSubscriptionName, nameof(eventSubscriptionName)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = Receive(topicName, eventSubscriptionName, maxEvents, maxWaitTime, context); + return Response.FromValue(ReceiveResult.FromResponse(response), response); + } + + /// + /// [Protocol Method] Receive a batch of Cloud Events from a subscription. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// Topic Name. + /// Event Subscription Name. + /// Max Events count to be received. Minimum value is 1, while maximum value is 100 events. If not specified, the default value is 1. + /// Max wait time value for receive operation in Seconds. It is the time in seconds that the server approximately waits for the availability of an event and responds to the request. If an event is available, the broker responds immediately to the client. Minimum value is 10 seconds, while maximum value is 120 seconds. If not specified, the default value is 60 seconds. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + internal virtual async Task ReceiveAsync(string topicName, string eventSubscriptionName, int? maxEvents, TimeSpan? maxWaitTime, RequestContext context) + { + Argument.AssertNotNullOrEmpty(topicName, nameof(topicName)); + Argument.AssertNotNullOrEmpty(eventSubscriptionName, nameof(eventSubscriptionName)); + + using var scope = ClientDiagnostics.CreateScope("EventGridReceiverClient.Receive"); + scope.Start(); + try + { + using HttpMessage message = CreateReceiveRequest(topicName, eventSubscriptionName, maxEvents, maxWaitTime, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Receive a batch of Cloud Events from a subscription. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// Topic Name. + /// Event Subscription Name. + /// Max Events count to be received. Minimum value is 1, while maximum value is 100 events. If not specified, the default value is 1. + /// Max wait time value for receive operation in Seconds. It is the time in seconds that the server approximately waits for the availability of an event and responds to the request. If an event is available, the broker responds immediately to the client. Minimum value is 10 seconds, while maximum value is 120 seconds. If not specified, the default value is 60 seconds. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + internal virtual Response Receive(string topicName, string eventSubscriptionName, int? maxEvents, TimeSpan? maxWaitTime, RequestContext context) + { + Argument.AssertNotNullOrEmpty(topicName, nameof(topicName)); + Argument.AssertNotNullOrEmpty(eventSubscriptionName, nameof(eventSubscriptionName)); + + using var scope = ClientDiagnostics.CreateScope("EventGridReceiverClient.Receive"); + scope.Start(); + try + { + using HttpMessage message = CreateReceiveRequest(topicName, eventSubscriptionName, maxEvents, maxWaitTime, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Acknowledge a batch of Cloud Events. The response will include the set of successfully acknowledged lock tokens, along with other failed lock tokens with their corresponding error information. Successfully acknowledged events will no longer be available to be received by any consumer. + /// Topic Name. + /// Event Subscription Name. + /// Array of lock tokens. + /// The cancellation token to use. + /// , or is null. + /// or is an empty string, and was expected to be non-empty. + internal virtual async Task> AcknowledgeAsync(string topicName, string eventSubscriptionName, IEnumerable lockTokens, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(topicName, nameof(topicName)); + Argument.AssertNotNullOrEmpty(eventSubscriptionName, nameof(eventSubscriptionName)); + Argument.AssertNotNull(lockTokens, nameof(lockTokens)); + + AcknowledgeRequest acknowledgeRequest = new AcknowledgeRequest(lockTokens.ToList(), null); + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await AcknowledgeAsync(topicName, eventSubscriptionName, acknowledgeRequest.ToRequestContent(), context).ConfigureAwait(false); + return Response.FromValue(AcknowledgeResult.FromResponse(response), response); + } + + /// Acknowledge a batch of Cloud Events. The response will include the set of successfully acknowledged lock tokens, along with other failed lock tokens with their corresponding error information. Successfully acknowledged events will no longer be available to be received by any consumer. + /// Topic Name. + /// Event Subscription Name. + /// Array of lock tokens. + /// The cancellation token to use. + /// , or is null. + /// or is an empty string, and was expected to be non-empty. + internal virtual Response Acknowledge(string topicName, string eventSubscriptionName, IEnumerable lockTokens, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(topicName, nameof(topicName)); + Argument.AssertNotNullOrEmpty(eventSubscriptionName, nameof(eventSubscriptionName)); + Argument.AssertNotNull(lockTokens, nameof(lockTokens)); + + AcknowledgeRequest acknowledgeRequest = new AcknowledgeRequest(lockTokens.ToList(), null); + RequestContext context = FromCancellationToken(cancellationToken); + Response response = Acknowledge(topicName, eventSubscriptionName, acknowledgeRequest.ToRequestContent(), context); + return Response.FromValue(AcknowledgeResult.FromResponse(response), response); + } + + /// + /// [Protocol Method] Acknowledge a batch of Cloud Events. The response will include the set of successfully acknowledged lock tokens, along with other failed lock tokens with their corresponding error information. Successfully acknowledged events will no longer be available to be received by any consumer. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// Topic Name. + /// Event Subscription Name. + /// The content to send as the body of the request. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// , or is null. + /// or is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + internal virtual async Task AcknowledgeAsync(string topicName, string eventSubscriptionName, RequestContent content, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(topicName, nameof(topicName)); + Argument.AssertNotNullOrEmpty(eventSubscriptionName, nameof(eventSubscriptionName)); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("EventGridReceiverClient.Acknowledge"); + scope.Start(); + try + { + using HttpMessage message = CreateAcknowledgeRequest(topicName, eventSubscriptionName, content, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Acknowledge a batch of Cloud Events. The response will include the set of successfully acknowledged lock tokens, along with other failed lock tokens with their corresponding error information. Successfully acknowledged events will no longer be available to be received by any consumer. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// Topic Name. + /// Event Subscription Name. + /// The content to send as the body of the request. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// , or is null. + /// or is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + internal virtual Response Acknowledge(string topicName, string eventSubscriptionName, RequestContent content, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(topicName, nameof(topicName)); + Argument.AssertNotNullOrEmpty(eventSubscriptionName, nameof(eventSubscriptionName)); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("EventGridReceiverClient.Acknowledge"); + scope.Start(); + try + { + using HttpMessage message = CreateAcknowledgeRequest(topicName, eventSubscriptionName, content, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Release a batch of Cloud Events. The response will include the set of successfully released lock tokens, along with other failed lock tokens with their corresponding error information. Successfully released events can be received by consumers. + /// Topic Name. + /// Event Subscription Name. + /// Array of lock tokens. + /// Release cloud events with the specified delay in seconds. + /// The cancellation token to use. + /// , or is null. + /// or is an empty string, and was expected to be non-empty. + internal virtual async Task> ReleaseAsync(string topicName, string eventSubscriptionName, IEnumerable lockTokens, ReleaseDelay? releaseDelayInSeconds = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(topicName, nameof(topicName)); + Argument.AssertNotNullOrEmpty(eventSubscriptionName, nameof(eventSubscriptionName)); + Argument.AssertNotNull(lockTokens, nameof(lockTokens)); + + ReleaseRequest releaseRequest = new ReleaseRequest(lockTokens.ToList(), null); + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await ReleaseAsync(topicName, eventSubscriptionName, releaseRequest.ToRequestContent(), releaseDelayInSeconds?.ToString(), context).ConfigureAwait(false); + return Response.FromValue(ReleaseResult.FromResponse(response), response); + } + + /// Release a batch of Cloud Events. The response will include the set of successfully released lock tokens, along with other failed lock tokens with their corresponding error information. Successfully released events can be received by consumers. + /// Topic Name. + /// Event Subscription Name. + /// Array of lock tokens. + /// Release cloud events with the specified delay in seconds. + /// The cancellation token to use. + /// , or is null. + /// or is an empty string, and was expected to be non-empty. + internal virtual Response Release(string topicName, string eventSubscriptionName, IEnumerable lockTokens, ReleaseDelay? releaseDelayInSeconds = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(topicName, nameof(topicName)); + Argument.AssertNotNullOrEmpty(eventSubscriptionName, nameof(eventSubscriptionName)); + Argument.AssertNotNull(lockTokens, nameof(lockTokens)); + + ReleaseRequest releaseRequest = new ReleaseRequest(lockTokens.ToList(), null); + RequestContext context = FromCancellationToken(cancellationToken); + Response response = Release(topicName, eventSubscriptionName, releaseRequest.ToRequestContent(), releaseDelayInSeconds?.ToString(), context); + return Response.FromValue(ReleaseResult.FromResponse(response), response); + } + + /// + /// [Protocol Method] Release a batch of Cloud Events. The response will include the set of successfully released lock tokens, along with other failed lock tokens with their corresponding error information. Successfully released events can be received by consumers. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// Topic Name. + /// Event Subscription Name. + /// The content to send as the body of the request. + /// Release cloud events with the specified delay in seconds. Allowed values: "0" | "10" | "60" | "600" | "3600". + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// , or is null. + /// or is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + internal virtual async Task ReleaseAsync(string topicName, string eventSubscriptionName, RequestContent content, string releaseDelayInSeconds = null, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(topicName, nameof(topicName)); + Argument.AssertNotNullOrEmpty(eventSubscriptionName, nameof(eventSubscriptionName)); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("EventGridReceiverClient.Release"); + scope.Start(); + try + { + using HttpMessage message = CreateReleaseRequest(topicName, eventSubscriptionName, content, releaseDelayInSeconds, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Release a batch of Cloud Events. The response will include the set of successfully released lock tokens, along with other failed lock tokens with their corresponding error information. Successfully released events can be received by consumers. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// Topic Name. + /// Event Subscription Name. + /// The content to send as the body of the request. + /// Release cloud events with the specified delay in seconds. Allowed values: "0" | "10" | "60" | "600" | "3600". + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// , or is null. + /// or is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + internal virtual Response Release(string topicName, string eventSubscriptionName, RequestContent content, string releaseDelayInSeconds = null, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(topicName, nameof(topicName)); + Argument.AssertNotNullOrEmpty(eventSubscriptionName, nameof(eventSubscriptionName)); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("EventGridReceiverClient.Release"); + scope.Start(); + try + { + using HttpMessage message = CreateReleaseRequest(topicName, eventSubscriptionName, content, releaseDelayInSeconds, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Reject a batch of Cloud Events. The response will include the set of successfully rejected lock tokens, along with other failed lock tokens with their corresponding error information. Successfully rejected events will be dead-lettered and can no longer be received by a consumer. + /// Topic Name. + /// Event Subscription Name. + /// Array of lock tokens. + /// The cancellation token to use. + /// , or is null. + /// or is an empty string, and was expected to be non-empty. + internal virtual async Task> RejectAsync(string topicName, string eventSubscriptionName, IEnumerable lockTokens, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(topicName, nameof(topicName)); + Argument.AssertNotNullOrEmpty(eventSubscriptionName, nameof(eventSubscriptionName)); + Argument.AssertNotNull(lockTokens, nameof(lockTokens)); + + RejectRequest rejectRequest = new RejectRequest(lockTokens.ToList(), null); + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await RejectAsync(topicName, eventSubscriptionName, rejectRequest.ToRequestContent(), context).ConfigureAwait(false); + return Response.FromValue(RejectResult.FromResponse(response), response); + } + + /// Reject a batch of Cloud Events. The response will include the set of successfully rejected lock tokens, along with other failed lock tokens with their corresponding error information. Successfully rejected events will be dead-lettered and can no longer be received by a consumer. + /// Topic Name. + /// Event Subscription Name. + /// Array of lock tokens. + /// The cancellation token to use. + /// , or is null. + /// or is an empty string, and was expected to be non-empty. + internal virtual Response Reject(string topicName, string eventSubscriptionName, IEnumerable lockTokens, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(topicName, nameof(topicName)); + Argument.AssertNotNullOrEmpty(eventSubscriptionName, nameof(eventSubscriptionName)); + Argument.AssertNotNull(lockTokens, nameof(lockTokens)); + + RejectRequest rejectRequest = new RejectRequest(lockTokens.ToList(), null); + RequestContext context = FromCancellationToken(cancellationToken); + Response response = Reject(topicName, eventSubscriptionName, rejectRequest.ToRequestContent(), context); + return Response.FromValue(RejectResult.FromResponse(response), response); + } + + /// + /// [Protocol Method] Reject a batch of Cloud Events. The response will include the set of successfully rejected lock tokens, along with other failed lock tokens with their corresponding error information. Successfully rejected events will be dead-lettered and can no longer be received by a consumer. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// Topic Name. + /// Event Subscription Name. + /// The content to send as the body of the request. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// , or is null. + /// or is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + internal virtual async Task RejectAsync(string topicName, string eventSubscriptionName, RequestContent content, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(topicName, nameof(topicName)); + Argument.AssertNotNullOrEmpty(eventSubscriptionName, nameof(eventSubscriptionName)); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("EventGridReceiverClient.Reject"); + scope.Start(); + try + { + using HttpMessage message = CreateRejectRequest(topicName, eventSubscriptionName, content, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Reject a batch of Cloud Events. The response will include the set of successfully rejected lock tokens, along with other failed lock tokens with their corresponding error information. Successfully rejected events will be dead-lettered and can no longer be received by a consumer. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// Topic Name. + /// Event Subscription Name. + /// The content to send as the body of the request. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// , or is null. + /// or is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + internal virtual Response Reject(string topicName, string eventSubscriptionName, RequestContent content, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(topicName, nameof(topicName)); + Argument.AssertNotNullOrEmpty(eventSubscriptionName, nameof(eventSubscriptionName)); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("EventGridReceiverClient.Reject"); + scope.Start(); + try + { + using HttpMessage message = CreateRejectRequest(topicName, eventSubscriptionName, content, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Renew locks for a batch of Cloud Events. The response will include the set of successfully renewed lock tokens, along with other failed lock tokens with their corresponding error information. Successfully renewed locks will ensure that the associated event is only available to the consumer that holds the renewed lock. + /// Topic Name. + /// Event Subscription Name. + /// Array of lock tokens. + /// The cancellation token to use. + /// , or is null. + /// or is an empty string, and was expected to be non-empty. + internal virtual async Task> RenewLocksAsync(string topicName, string eventSubscriptionName, IEnumerable lockTokens, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(topicName, nameof(topicName)); + Argument.AssertNotNullOrEmpty(eventSubscriptionName, nameof(eventSubscriptionName)); + Argument.AssertNotNull(lockTokens, nameof(lockTokens)); + + RenewLocksRequest renewLocksRequest = new RenewLocksRequest(lockTokens.ToList(), null); + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await RenewLocksAsync(topicName, eventSubscriptionName, renewLocksRequest.ToRequestContent(), context).ConfigureAwait(false); + return Response.FromValue(RenewLocksResult.FromResponse(response), response); + } + + /// Renew locks for a batch of Cloud Events. The response will include the set of successfully renewed lock tokens, along with other failed lock tokens with their corresponding error information. Successfully renewed locks will ensure that the associated event is only available to the consumer that holds the renewed lock. + /// Topic Name. + /// Event Subscription Name. + /// Array of lock tokens. + /// The cancellation token to use. + /// , or is null. + /// or is an empty string, and was expected to be non-empty. + internal virtual Response RenewLocks(string topicName, string eventSubscriptionName, IEnumerable lockTokens, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(topicName, nameof(topicName)); + Argument.AssertNotNullOrEmpty(eventSubscriptionName, nameof(eventSubscriptionName)); + Argument.AssertNotNull(lockTokens, nameof(lockTokens)); + + RenewLocksRequest renewLocksRequest = new RenewLocksRequest(lockTokens.ToList(), null); + RequestContext context = FromCancellationToken(cancellationToken); + Response response = RenewLocks(topicName, eventSubscriptionName, renewLocksRequest.ToRequestContent(), context); + return Response.FromValue(RenewLocksResult.FromResponse(response), response); + } + + /// + /// [Protocol Method] Renew locks for a batch of Cloud Events. The response will include the set of successfully renewed lock tokens, along with other failed lock tokens with their corresponding error information. Successfully renewed locks will ensure that the associated event is only available to the consumer that holds the renewed lock. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// Topic Name. + /// Event Subscription Name. + /// The content to send as the body of the request. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// , or is null. + /// or is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + internal virtual async Task RenewLocksAsync(string topicName, string eventSubscriptionName, RequestContent content, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(topicName, nameof(topicName)); + Argument.AssertNotNullOrEmpty(eventSubscriptionName, nameof(eventSubscriptionName)); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("EventGridReceiverClient.RenewLocks"); + scope.Start(); + try + { + using HttpMessage message = CreateRenewLocksRequest(topicName, eventSubscriptionName, content, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Renew locks for a batch of Cloud Events. The response will include the set of successfully renewed lock tokens, along with other failed lock tokens with their corresponding error information. Successfully renewed locks will ensure that the associated event is only available to the consumer that holds the renewed lock. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// Topic Name. + /// Event Subscription Name. + /// The content to send as the body of the request. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// , or is null. + /// or is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + internal virtual Response RenewLocks(string topicName, string eventSubscriptionName, RequestContent content, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(topicName, nameof(topicName)); + Argument.AssertNotNullOrEmpty(eventSubscriptionName, nameof(eventSubscriptionName)); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("EventGridReceiverClient.RenewLocks"); + scope.Start(); + try + { + using HttpMessage message = CreateRenewLocksRequest(topicName, eventSubscriptionName, content, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + internal HttpMessage CreateReceiveRequest(string topicName, string eventSubscriptionName, int? maxEvents, TimeSpan? maxWaitTime, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/topics/", false); + uri.AppendPath(topicName, true); + uri.AppendPath("/eventsubscriptions/", false); + uri.AppendPath(eventSubscriptionName, true); + uri.AppendPath(":receive", false); + uri.AppendQuery("api-version", _apiVersion, true); + if (maxEvents != null) + { + uri.AppendQuery("maxEvents", maxEvents.Value, true); + } + if (maxWaitTime != null) + { + uri.AppendQuery("maxWaitTime", maxWaitTime.Value, "%s", true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateAcknowledgeRequest(string topicName, string eventSubscriptionName, RequestContent content, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/topics/", false); + uri.AppendPath(topicName, true); + uri.AppendPath("/eventsubscriptions/", false); + uri.AppendPath(eventSubscriptionName, true); + uri.AppendPath(":acknowledge", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + request.Content = content; + return message; + } + + internal HttpMessage CreateReleaseRequest(string topicName, string eventSubscriptionName, RequestContent content, string releaseDelayInSeconds, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/topics/", false); + uri.AppendPath(topicName, true); + uri.AppendPath("/eventsubscriptions/", false); + uri.AppendPath(eventSubscriptionName, true); + uri.AppendPath(":release", false); + uri.AppendQuery("api-version", _apiVersion, true); + if (releaseDelayInSeconds != null) + { + uri.AppendQuery("releaseDelayInSeconds", releaseDelayInSeconds, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + request.Content = content; + return message; + } + + internal HttpMessage CreateRejectRequest(string topicName, string eventSubscriptionName, RequestContent content, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/topics/", false); + uri.AppendPath(topicName, true); + uri.AppendPath("/eventsubscriptions/", false); + uri.AppendPath(eventSubscriptionName, true); + uri.AppendPath(":reject", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + request.Content = content; + return message; + } + + internal HttpMessage CreateRenewLocksRequest(string topicName, string eventSubscriptionName, RequestContent content, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/topics/", false); + uri.AppendPath(topicName, true); + uri.AppendPath("/eventsubscriptions/", false); + uri.AppendPath(eventSubscriptionName, true); + uri.AppendPath(":renewLock", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + request.Content = content; + return message; + } + + private static RequestContext DefaultRequestContext = new RequestContext(); + internal static RequestContext FromCancellationToken(CancellationToken cancellationToken = default) + { + if (!cancellationToken.CanBeCanceled) + { + return DefaultRequestContext; + } + + return new RequestContext() { CancellationToken = cancellationToken }; + } + + private static ResponseClassifier _responseClassifier200; + private static ResponseClassifier ResponseClassifier200 => _responseClassifier200 ??= new StatusCodeClassifier(stackalloc ushort[] { 200 }); + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGridV2/src/Generated/EventGridSenderClient.cs b/sdk/eventgrid/Azure.Messaging.EventGridV2/src/Generated/EventGridSenderClient.cs new file mode 100644 index 000000000000..7823b6e8d6e3 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGridV2/src/Generated/EventGridSenderClient.cs @@ -0,0 +1,375 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.Messaging.EventGrid.Namespaces +{ + // Data plane generated client. + /// The EventGridSender service client. + public partial class EventGridSenderClient + { + private const string AuthorizationHeader = "Authorization"; + private readonly AzureKeyCredential _keyCredential; + private const string AuthorizationApiKeyPrefix = "SharedAccessKey"; + private static readonly string[] AuthorizationScopes = new string[] { "https://eventgrid.azure.net/.default" }; + private readonly TokenCredential _tokenCredential; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// The ClientDiagnostics is used to provide tracing support for the client library. + internal ClientDiagnostics ClientDiagnostics { get; } + + /// The HTTP pipeline for sending and receiving REST requests and responses. + public virtual HttpPipeline Pipeline => _pipeline; + + /// Initializes a new instance of EventGridSenderClient for mocking. + protected EventGridSenderClient() + { + } + + /// Initializes a new instance of EventGridSenderClient. + /// The host name of the namespace, e.g. namespaceName1.westus-1.eventgrid.azure.net. + /// A credential used to authenticate to an Azure Service. + /// or is null. + public EventGridSenderClient(Uri endpoint, AzureKeyCredential credential) : this(endpoint, credential, new AzureMessagingEventGridNamespacesClientOptions()) + { + } + + /// Initializes a new instance of EventGridSenderClient. + /// The host name of the namespace, e.g. namespaceName1.westus-1.eventgrid.azure.net. + /// A credential used to authenticate to an Azure Service. + /// or is null. + public EventGridSenderClient(Uri endpoint, TokenCredential credential) : this(endpoint, credential, new AzureMessagingEventGridNamespacesClientOptions()) + { + } + + /// Initializes a new instance of EventGridSenderClient. + /// The host name of the namespace, e.g. namespaceName1.westus-1.eventgrid.azure.net. + /// A credential used to authenticate to an Azure Service. + /// The options for configuring the client. + /// or is null. + public EventGridSenderClient(Uri endpoint, AzureKeyCredential credential, AzureMessagingEventGridNamespacesClientOptions options) + { + Argument.AssertNotNull(endpoint, nameof(endpoint)); + Argument.AssertNotNull(credential, nameof(credential)); + options ??= new AzureMessagingEventGridNamespacesClientOptions(); + + ClientDiagnostics = new ClientDiagnostics(options, true); + _keyCredential = credential; + _pipeline = HttpPipelineBuilder.Build(options, Array.Empty(), new HttpPipelinePolicy[] { new AzureKeyCredentialPolicy(_keyCredential, AuthorizationHeader, AuthorizationApiKeyPrefix) }, new ResponseClassifier()); + _endpoint = endpoint; + _apiVersion = options.Version; + } + + /// Initializes a new instance of EventGridSenderClient. + /// The host name of the namespace, e.g. namespaceName1.westus-1.eventgrid.azure.net. + /// A credential used to authenticate to an Azure Service. + /// The options for configuring the client. + /// or is null. + public EventGridSenderClient(Uri endpoint, TokenCredential credential, AzureMessagingEventGridNamespacesClientOptions options) + { + Argument.AssertNotNull(endpoint, nameof(endpoint)); + Argument.AssertNotNull(credential, nameof(credential)); + options ??= new AzureMessagingEventGridNamespacesClientOptions(); + + ClientDiagnostics = new ClientDiagnostics(options, true); + _tokenCredential = credential; + _pipeline = HttpPipelineBuilder.Build(options, Array.Empty(), new HttpPipelinePolicy[] { new BearerTokenAuthenticationPolicy(_tokenCredential, AuthorizationScopes) }, new ResponseClassifier()); + _endpoint = endpoint; + _apiVersion = options.Version; + } + + /// Publish a single Cloud Event to a namespace topic. + /// Topic Name. + /// Single Cloud Event being published. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + internal virtual async Task> SendAsync(string topicName, CloudEvent @event, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(topicName, nameof(topicName)); + Argument.AssertNotNull(@event, nameof(@event)); + + using RequestContent content = @event.ToRequestContent(); + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await SendAsync(topicName, content, context).ConfigureAwait(false); + return Response.FromValue(PublishResult.FromResponse(response), response); + } + + /// Publish a single Cloud Event to a namespace topic. + /// Topic Name. + /// Single Cloud Event being published. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + internal virtual Response Send(string topicName, CloudEvent @event, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(topicName, nameof(topicName)); + Argument.AssertNotNull(@event, nameof(@event)); + + using RequestContent content = @event.ToRequestContent(); + RequestContext context = FromCancellationToken(cancellationToken); + Response response = Send(topicName, content, context); + return Response.FromValue(PublishResult.FromResponse(response), response); + } + + /// + /// [Protocol Method] Publish a single Cloud Event to a namespace topic. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// Topic Name. + /// The content to send as the body of the request. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// or is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + internal virtual async Task SendAsync(string topicName, RequestContent content, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(topicName, nameof(topicName)); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("EventGridSenderClient.Send"); + scope.Start(); + try + { + using HttpMessage message = CreateSendRequest(topicName, content, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Publish a single Cloud Event to a namespace topic. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// Topic Name. + /// The content to send as the body of the request. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// or is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + internal virtual Response Send(string topicName, RequestContent content, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(topicName, nameof(topicName)); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("EventGridSenderClient.Send"); + scope.Start(); + try + { + using HttpMessage message = CreateSendRequest(topicName, content, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Publish a batch of Cloud Events to a namespace topic. + /// Topic Name. + /// Array of Cloud Events being published. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + internal virtual async Task> SendEventsAsync(string topicName, IEnumerable events, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(topicName, nameof(topicName)); + Argument.AssertNotNull(events, nameof(events)); + + using RequestContent content = RequestContentHelper.FromEnumerable(events); + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await SendEventsAsync(topicName, content, context).ConfigureAwait(false); + return Response.FromValue(PublishResult.FromResponse(response), response); + } + + /// Publish a batch of Cloud Events to a namespace topic. + /// Topic Name. + /// Array of Cloud Events being published. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + internal virtual Response SendEvents(string topicName, IEnumerable events, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(topicName, nameof(topicName)); + Argument.AssertNotNull(events, nameof(events)); + + using RequestContent content = RequestContentHelper.FromEnumerable(events); + RequestContext context = FromCancellationToken(cancellationToken); + Response response = SendEvents(topicName, content, context); + return Response.FromValue(PublishResult.FromResponse(response), response); + } + + /// + /// [Protocol Method] Publish a batch of Cloud Events to a namespace topic. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// Topic Name. + /// The content to send as the body of the request. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// or is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + internal virtual async Task SendEventsAsync(string topicName, RequestContent content, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(topicName, nameof(topicName)); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("EventGridSenderClient.SendEvents"); + scope.Start(); + try + { + using HttpMessage message = CreateSendEventsRequest(topicName, content, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Publish a batch of Cloud Events to a namespace topic. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// Topic Name. + /// The content to send as the body of the request. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// or is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + internal virtual Response SendEvents(string topicName, RequestContent content, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(topicName, nameof(topicName)); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("EventGridSenderClient.SendEvents"); + scope.Start(); + try + { + using HttpMessage message = CreateSendEventsRequest(topicName, content, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + internal HttpMessage CreateSendRequest(string topicName, RequestContent content, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/topics/", false); + uri.AppendPath(topicName, true); + uri.AppendPath(":publish", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/cloudevents+json; charset=utf-8"); + request.Content = content; + return message; + } + + internal HttpMessage CreateSendEventsRequest(string topicName, RequestContent content, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/topics/", false); + uri.AppendPath(topicName, true); + uri.AppendPath(":publish", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/cloudevents-batch+json; charset=utf-8"); + request.Content = content; + return message; + } + + private static RequestContext DefaultRequestContext = new RequestContext(); + internal static RequestContext FromCancellationToken(CancellationToken cancellationToken = default) + { + if (!cancellationToken.CanBeCanceled) + { + return DefaultRequestContext; + } + + return new RequestContext() { CancellationToken = cancellationToken }; + } + + private static ResponseClassifier _responseClassifier200; + private static ResponseClassifier ResponseClassifier200 => _responseClassifier200 ??= new StatusCodeClassifier(stackalloc ushort[] { 200 }); + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGridV2/src/Generated/FailedLockToken.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGridV2/src/Generated/FailedLockToken.Serialization.cs new file mode 100644 index 000000000000..53dc10fd5f4e --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGridV2/src/Generated/FailedLockToken.Serialization.cs @@ -0,0 +1,150 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Messaging.EventGrid.Namespaces +{ + public partial class FailedLockToken : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(FailedLockToken)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("lockToken"u8); + writer.WriteStringValue(LockToken); + writer.WritePropertyName("error"u8); + JsonSerializer.Serialize(writer, Error); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + FailedLockToken IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(FailedLockToken)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeFailedLockToken(document.RootElement, options); + } + + internal static FailedLockToken DeserializeFailedLockToken(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string lockToken = default; + ResponseError error = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("lockToken"u8)) + { + lockToken = property.Value.GetString(); + continue; + } + if (property.NameEquals("error"u8)) + { + error = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new FailedLockToken(lockToken, error, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(FailedLockToken)} does not support writing '{options.Format}' format."); + } + } + + FailedLockToken IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeFailedLockToken(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(FailedLockToken)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static FailedLockToken FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeFailedLockToken(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGridV2/src/Generated/FailedLockToken.cs b/sdk/eventgrid/Azure.Messaging.EventGridV2/src/Generated/FailedLockToken.cs new file mode 100644 index 000000000000..a098a39a8a15 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGridV2/src/Generated/FailedLockToken.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.Messaging.EventGrid.Namespaces +{ + /// Failed LockToken information. + public partial class FailedLockToken + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// 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 lock token of an entry in the request. + /// Error information of the failed operation result for the lock token in the request. + /// or is null. + internal FailedLockToken(string lockToken, ResponseError error) + { + Argument.AssertNotNull(lockToken, nameof(lockToken)); + Argument.AssertNotNull(error, nameof(error)); + + LockToken = lockToken; + Error = error; + } + + /// Initializes a new instance of . + /// The lock token of an entry in the request. + /// Error information of the failed operation result for the lock token in the request. + /// Keeps track of any properties unknown to the library. + internal FailedLockToken(string lockToken, ResponseError error, IDictionary serializedAdditionalRawData) + { + LockToken = lockToken; + Error = error; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal FailedLockToken() + { + } + + /// The lock token of an entry in the request. + public string LockToken { get; } + /// Error information of the failed operation result for the lock token in the request. + public ResponseError Error { get; } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGridV2/src/Generated/Internal/Argument.cs b/sdk/eventgrid/Azure.Messaging.EventGridV2/src/Generated/Internal/Argument.cs new file mode 100644 index 000000000000..7f53b5f11f4a --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGridV2/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.Messaging.EventGrid.Namespaces +{ + 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/eventgrid/Azure.Messaging.EventGridV2/src/Generated/Internal/ChangeTrackingDictionary.cs b/sdk/eventgrid/Azure.Messaging.EventGridV2/src/Generated/Internal/ChangeTrackingDictionary.cs new file mode 100644 index 000000000000..da590bd8315a --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGridV2/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.Messaging.EventGrid.Namespaces +{ + 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/eventgrid/Azure.Messaging.EventGridV2/src/Generated/Internal/ChangeTrackingList.cs b/sdk/eventgrid/Azure.Messaging.EventGridV2/src/Generated/Internal/ChangeTrackingList.cs new file mode 100644 index 000000000000..86ec5baff961 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGridV2/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.Messaging.EventGrid.Namespaces +{ + 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/eventgrid/Azure.Messaging.EventGridV2/src/Generated/Internal/ModelSerializationExtensions.cs b/sdk/eventgrid/Azure.Messaging.EventGridV2/src/Generated/Internal/ModelSerializationExtensions.cs new file mode 100644 index 000000000000..3de82e7093c3 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGridV2/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.Messaging.EventGrid.Namespaces +{ + 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/eventgrid/Azure.Messaging.EventGridV2/src/Generated/Internal/Optional.cs b/sdk/eventgrid/Azure.Messaging.EventGridV2/src/Generated/Internal/Optional.cs new file mode 100644 index 000000000000..9b1683fa02e9 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGridV2/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.Messaging.EventGrid.Namespaces +{ + 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/eventgrid/Azure.Messaging.EventGridV2/src/Generated/Internal/RequestContentHelper.cs b/sdk/eventgrid/Azure.Messaging.EventGridV2/src/Generated/Internal/RequestContentHelper.cs new file mode 100644 index 000000000000..3a14979d6b97 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGridV2/src/Generated/Internal/RequestContentHelper.cs @@ -0,0 +1,136 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Messaging.EventGrid.Namespaces +{ + internal static class RequestContentHelper + { + public static RequestContent FromEnumerable(IEnumerable enumerable) + where T : notnull + { + Utf8JsonRequestContent content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteStartArray(); + foreach (var item in enumerable) + { + content.JsonWriter.WriteObjectValue(item, ModelSerializationExtensions.WireOptions); + } + content.JsonWriter.WriteEndArray(); + + return content; + } + + public static RequestContent FromEnumerable(IEnumerable enumerable) + { + Utf8JsonRequestContent content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteStartArray(); + foreach (var item in enumerable) + { + if (item == null) + { + content.JsonWriter.WriteNullValue(); + } + else + { +#if NET6_0_OR_GREATER + content.JsonWriter.WriteRawValue(item); +#else + using (JsonDocument document = JsonDocument.Parse(item, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(content.JsonWriter, document.RootElement); + } +#endif + } + } + content.JsonWriter.WriteEndArray(); + + return content; + } + + public static RequestContent FromEnumerable(ReadOnlySpan span) + where T : notnull + { + Utf8JsonRequestContent content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteStartArray(); + for (int i = 0; i < span.Length; i++) + { + content.JsonWriter.WriteObjectValue(span[i], ModelSerializationExtensions.WireOptions); + } + content.JsonWriter.WriteEndArray(); + + return content; + } + + public static RequestContent FromDictionary(IDictionary dictionary) + where TValue : notnull + { + Utf8JsonRequestContent content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteStartObject(); + foreach (var item in dictionary) + { + content.JsonWriter.WritePropertyName(item.Key); + content.JsonWriter.WriteObjectValue(item.Value, ModelSerializationExtensions.WireOptions); + } + content.JsonWriter.WriteEndObject(); + + return content; + } + + public static RequestContent FromDictionary(IDictionary dictionary) + { + Utf8JsonRequestContent content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteStartObject(); + foreach (var item in dictionary) + { + content.JsonWriter.WritePropertyName(item.Key); + if (item.Value == null) + { + content.JsonWriter.WriteNullValue(); + } + else + { +#if NET6_0_OR_GREATER + content.JsonWriter.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(content.JsonWriter, document.RootElement); + } +#endif + } + } + content.JsonWriter.WriteEndObject(); + + return content; + } + + public static RequestContent FromObject(object value) + { + Utf8JsonRequestContent content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(value, ModelSerializationExtensions.WireOptions); + return content; + } + + public static RequestContent FromObject(BinaryData value) + { + Utf8JsonRequestContent content = new Utf8JsonRequestContent(); +#if NET6_0_OR_GREATER + content.JsonWriter.WriteRawValue(value); +#else + using (JsonDocument document = JsonDocument.Parse(value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(content.JsonWriter, document.RootElement); + } +#endif + return content; + } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGridV2/src/Generated/Internal/Utf8JsonRequestContent.cs b/sdk/eventgrid/Azure.Messaging.EventGridV2/src/Generated/Internal/Utf8JsonRequestContent.cs new file mode 100644 index 000000000000..78323219e281 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGridV2/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.Messaging.EventGrid.Namespaces +{ + 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/eventgrid/Azure.Messaging.EventGridV2/src/Generated/MessagingEventGridNamespacesClientBuilderExtensions.cs b/sdk/eventgrid/Azure.Messaging.EventGridV2/src/Generated/MessagingEventGridNamespacesClientBuilderExtensions.cs new file mode 100644 index 000000000000..e710c7ce03c9 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGridV2/src/Generated/MessagingEventGridNamespacesClientBuilderExtensions.cs @@ -0,0 +1,73 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using Azure; +using Azure.Core.Extensions; +using Azure.Messaging.EventGrid.Namespaces; + +namespace Microsoft.Extensions.Azure +{ + /// Extension methods to add , to client builder. + public static partial class MessagingEventGridNamespacesClientBuilderExtensions + { + /// Registers a instance. + /// The builder to register with. + /// The host name of the namespace, e.g. namespaceName1.westus-1.eventgrid.azure.net. + /// A credential used to authenticate to an Azure Service. + public static IAzureClientBuilder AddEventGridSenderClient(this TBuilder builder, Uri endpoint, AzureKeyCredential credential) + where TBuilder : IAzureClientFactoryBuilder + { + return builder.RegisterClientFactory((options) => new EventGridSenderClient(endpoint, credential, options)); + } + + /// Registers a instance. + /// The builder to register with. + /// The host name of the namespace, e.g. namespaceName1.westus-1.eventgrid.azure.net. + public static IAzureClientBuilder AddEventGridSenderClient(this TBuilder builder, Uri endpoint) + where TBuilder : IAzureClientFactoryBuilderWithCredential + { + return builder.RegisterClientFactory((options, cred) => new EventGridSenderClient(endpoint, cred, options)); + } + + /// Registers a instance. + /// The builder to register with. + /// The host name of the namespace, e.g. namespaceName1.westus-1.eventgrid.azure.net. + /// A credential used to authenticate to an Azure Service. + public static IAzureClientBuilder AddEventGridReceiverClient(this TBuilder builder, Uri endpoint, AzureKeyCredential credential) + where TBuilder : IAzureClientFactoryBuilder + { + return builder.RegisterClientFactory((options) => new EventGridReceiverClient(endpoint, credential, options)); + } + + /// Registers a instance. + /// The builder to register with. + /// The host name of the namespace, e.g. namespaceName1.westus-1.eventgrid.azure.net. + public static IAzureClientBuilder AddEventGridReceiverClient(this TBuilder builder, Uri endpoint) + where TBuilder : IAzureClientFactoryBuilderWithCredential + { + return builder.RegisterClientFactory((options, cred) => new EventGridReceiverClient(endpoint, cred, options)); + } + + /// Registers a instance. + /// The builder to register with. + /// The configuration values. + public static IAzureClientBuilder AddEventGridSenderClient(this TBuilder builder, TConfiguration configuration) + where TBuilder : IAzureClientFactoryBuilderWithConfiguration + { + return builder.RegisterClientFactory(configuration); + } + /// Registers a instance. + /// The builder to register with. + /// The configuration values. + public static IAzureClientBuilder AddEventGridReceiverClient(this TBuilder builder, TConfiguration configuration) + where TBuilder : IAzureClientFactoryBuilderWithConfiguration + { + return builder.RegisterClientFactory(configuration); + } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGridV2/src/Generated/MessagingEventGridNamespacesModelFactory.cs b/sdk/eventgrid/Azure.Messaging.EventGridV2/src/Generated/MessagingEventGridNamespacesModelFactory.cs new file mode 100644 index 000000000000..f78936f09961 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGridV2/src/Generated/MessagingEventGridNamespacesModelFactory.cs @@ -0,0 +1,73 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Linq; + +namespace Azure.Messaging.EventGrid.Namespaces +{ + /// Model factory for models. + public static partial class MessagingEventGridNamespacesModelFactory + { + /// Initializes a new instance of . + /// Array of FailedLockToken for failed cloud events. Each FailedLockToken includes the lock token along with the related error information (namely, the error code and description). + /// Array of lock tokens for the successfully acknowledged cloud events. + /// A new instance for mocking. + public static AcknowledgeResult AcknowledgeResult(IEnumerable failedLockTokens = null, IEnumerable succeededLockTokens = null) + { + failedLockTokens ??= new List(); + succeededLockTokens ??= new List(); + + return new AcknowledgeResult(failedLockTokens?.ToList(), succeededLockTokens?.ToList(), serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The lock token of an entry in the request. + /// Error information of the failed operation result for the lock token in the request. + /// A new instance for mocking. + public static FailedLockToken FailedLockToken(string lockToken = null, ResponseError error = null) + { + return new FailedLockToken(lockToken, error, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Array of FailedLockToken for failed cloud events. Each FailedLockToken includes the lock token along with the related error information (namely, the error code and description). + /// Array of lock tokens for the successfully released cloud events. + /// A new instance for mocking. + public static ReleaseResult ReleaseResult(IEnumerable failedLockTokens = null, IEnumerable succeededLockTokens = null) + { + failedLockTokens ??= new List(); + succeededLockTokens ??= new List(); + + return new ReleaseResult(failedLockTokens?.ToList(), succeededLockTokens?.ToList(), serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Array of FailedLockToken for failed cloud events. Each FailedLockToken includes the lock token along with the related error information (namely, the error code and description). + /// Array of lock tokens for the successfully rejected cloud events. + /// A new instance for mocking. + public static RejectResult RejectResult(IEnumerable failedLockTokens = null, IEnumerable succeededLockTokens = null) + { + failedLockTokens ??= new List(); + succeededLockTokens ??= new List(); + + return new RejectResult(failedLockTokens?.ToList(), succeededLockTokens?.ToList(), serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Array of FailedLockToken for failed cloud events. Each FailedLockToken includes the lock token along with the related error information (namely, the error code and description). + /// Array of lock tokens for the successfully renewed locks. + /// A new instance for mocking. + public static RenewLocksResult RenewLocksResult(IEnumerable failedLockTokens = null, IEnumerable succeededLockTokens = null) + { + failedLockTokens ??= new List(); + succeededLockTokens ??= new List(); + + return new RenewLocksResult(failedLockTokens?.ToList(), succeededLockTokens?.ToList(), serializedAdditionalRawData: null); + } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGridV2/src/Generated/PublishResult.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGridV2/src/Generated/PublishResult.Serialization.cs new file mode 100644 index 000000000000..f7abd1ad6cf9 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGridV2/src/Generated/PublishResult.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.Messaging.EventGrid.Namespaces +{ + internal partial class PublishResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(PublishResult)} does not support writing '{format}' format."); + } + + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + PublishResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(PublishResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializePublishResult(document.RootElement, options); + } + + internal static PublishResult DeserializePublishResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new PublishResult(serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(PublishResult)} does not support writing '{options.Format}' format."); + } + } + + PublishResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializePublishResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(PublishResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static PublishResult FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializePublishResult(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGridV2/src/Generated/PublishResult.cs b/sdk/eventgrid/Azure.Messaging.EventGridV2/src/Generated/PublishResult.cs new file mode 100644 index 000000000000..1427f94a2dbc --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGridV2/src/Generated/PublishResult.cs @@ -0,0 +1,60 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Messaging.EventGrid.Namespaces +{ + /// The result of the Publish operation. + internal partial class PublishResult + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal PublishResult() + { + } + + /// Initializes a new instance of . + /// Keeps track of any properties unknown to the library. + internal PublishResult(IDictionary serializedAdditionalRawData) + { + _serializedAdditionalRawData = serializedAdditionalRawData; + } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGridV2/src/Generated/ReceiveDetails.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGridV2/src/Generated/ReceiveDetails.Serialization.cs new file mode 100644 index 000000000000..6b812654859c --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGridV2/src/Generated/ReceiveDetails.Serialization.cs @@ -0,0 +1,150 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Messaging.EventGrid.Namespaces +{ + internal partial class ReceiveDetails : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ReceiveDetails)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("brokerProperties"u8); + writer.WriteObjectValue(BrokerProperties, options); + writer.WritePropertyName("event"u8); + writer.WriteObjectValue(Event, 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 + } + } + } + + ReceiveDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ReceiveDetails)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeReceiveDetails(document.RootElement, options); + } + + internal static ReceiveDetails DeserializeReceiveDetails(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + BrokerProperties brokerProperties = default; + CloudEvent @event = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("brokerProperties"u8)) + { + brokerProperties = BrokerProperties.DeserializeBrokerProperties(property.Value, options); + continue; + } + if (property.NameEquals("event"u8)) + { + @event = CloudEvent.DeserializeCloudEvent(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ReceiveDetails(brokerProperties, @event, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ReceiveDetails)} does not support writing '{options.Format}' format."); + } + } + + ReceiveDetails IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeReceiveDetails(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ReceiveDetails)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static ReceiveDetails FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeReceiveDetails(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGridV2/src/Generated/ReceiveDetails.cs b/sdk/eventgrid/Azure.Messaging.EventGridV2/src/Generated/ReceiveDetails.cs new file mode 100644 index 000000000000..13b99065b26d --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGridV2/src/Generated/ReceiveDetails.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.Messaging.EventGrid.Namespaces +{ + /// Receive operation details per Cloud Event. + internal partial class ReceiveDetails + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// 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 Event Broker details. + /// Cloud Event details. + /// or is null. + internal ReceiveDetails(BrokerProperties brokerProperties, CloudEvent @event) + { + Argument.AssertNotNull(brokerProperties, nameof(brokerProperties)); + Argument.AssertNotNull(@event, nameof(@event)); + + BrokerProperties = brokerProperties; + Event = @event; + } + + /// Initializes a new instance of . + /// The Event Broker details. + /// Cloud Event details. + /// Keeps track of any properties unknown to the library. + internal ReceiveDetails(BrokerProperties brokerProperties, CloudEvent @event, IDictionary serializedAdditionalRawData) + { + BrokerProperties = brokerProperties; + Event = @event; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal ReceiveDetails() + { + } + + /// The Event Broker details. + public BrokerProperties BrokerProperties { get; } + /// Cloud Event details. + public CloudEvent Event { get; } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGridV2/src/Generated/ReceiveResult.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGridV2/src/Generated/ReceiveResult.Serialization.cs new file mode 100644 index 000000000000..4b647f700807 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGridV2/src/Generated/ReceiveResult.Serialization.cs @@ -0,0 +1,155 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Messaging.EventGrid.Namespaces +{ + internal partial class ReceiveResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ReceiveResult)} does not support writing '{format}' format."); + } + + if (options.Format != "W") + { + writer.WritePropertyName("value"u8); + writer.WriteStartArray(); + foreach (var item in Details) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ReceiveResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ReceiveResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeReceiveResult(document.RootElement, options); + } + + internal static ReceiveResult DeserializeReceiveResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList value = 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(ReceiveDetails.DeserializeReceiveDetails(item, options)); + } + value = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ReceiveResult(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(ReceiveResult)} does not support writing '{options.Format}' format."); + } + } + + ReceiveResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeReceiveResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ReceiveResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static ReceiveResult FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeReceiveResult(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGridV2/src/Generated/ReceiveResult.cs b/sdk/eventgrid/Azure.Messaging.EventGridV2/src/Generated/ReceiveResult.cs new file mode 100644 index 000000000000..c38b85fbaf68 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGridV2/src/Generated/ReceiveResult.cs @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Messaging.EventGrid.Namespaces +{ + /// Details of the Receive operation response. + internal partial class ReceiveResult + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal ReceiveResult() + { + Details = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// Array of receive responses, one per cloud event. + /// Keeps track of any properties unknown to the library. + internal ReceiveResult(IReadOnlyList details, IDictionary serializedAdditionalRawData) + { + Details = details; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Array of receive responses, one per cloud event. + public IReadOnlyList Details { get; } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGridV2/src/Generated/RejectRequest.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGridV2/src/Generated/RejectRequest.Serialization.cs new file mode 100644 index 000000000000..2d07ad9dc94d --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGridV2/src/Generated/RejectRequest.Serialization.cs @@ -0,0 +1,152 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Messaging.EventGrid.Namespaces +{ + internal partial class RejectRequest : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(RejectRequest)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("lockTokens"u8); + writer.WriteStartArray(); + foreach (var item in LockTokens) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + RejectRequest IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(RejectRequest)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeRejectRequest(document.RootElement, options); + } + + internal static RejectRequest DeserializeRejectRequest(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList lockTokens = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("lockTokens"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + lockTokens = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new RejectRequest(lockTokens, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(RejectRequest)} does not support writing '{options.Format}' format."); + } + } + + RejectRequest IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeRejectRequest(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(RejectRequest)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static RejectRequest FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeRejectRequest(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGridV2/src/Generated/RejectRequest.cs b/sdk/eventgrid/Azure.Messaging.EventGridV2/src/Generated/RejectRequest.cs new file mode 100644 index 000000000000..e64cfb88fa65 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGridV2/src/Generated/RejectRequest.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.Messaging.EventGrid.Namespaces +{ + /// The RejectRequest. + internal partial class RejectRequest + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Array of lock tokens. + /// is null. + internal RejectRequest(IEnumerable lockTokens) + { + Argument.AssertNotNull(lockTokens, nameof(lockTokens)); + + LockTokens = lockTokens.ToList(); + } + + /// Initializes a new instance of . + /// Array of lock tokens. + /// Keeps track of any properties unknown to the library. + internal RejectRequest(IReadOnlyList lockTokens, IDictionary serializedAdditionalRawData) + { + LockTokens = lockTokens; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal RejectRequest() + { + } + + /// Array of lock tokens. + public IReadOnlyList LockTokens { get; } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGridV2/src/Generated/RejectResult.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGridV2/src/Generated/RejectResult.Serialization.cs new file mode 100644 index 000000000000..1f2b01182732 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGridV2/src/Generated/RejectResult.Serialization.cs @@ -0,0 +1,176 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Messaging.EventGrid.Namespaces +{ + public partial class RejectResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(RejectResult)} does not support writing '{format}' format."); + } + + if (options.Format != "W") + { + writer.WritePropertyName("failedLockTokens"u8); + writer.WriteStartArray(); + foreach (var item in FailedLockTokens) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (options.Format != "W") + { + writer.WritePropertyName("succeededLockTokens"u8); + writer.WriteStartArray(); + foreach (var item in SucceededLockTokens) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + RejectResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(RejectResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeRejectResult(document.RootElement, options); + } + + internal static RejectResult DeserializeRejectResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList failedLockTokens = default; + IReadOnlyList succeededLockTokens = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("failedLockTokens"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(FailedLockToken.DeserializeFailedLockToken(item, options)); + } + failedLockTokens = array; + continue; + } + if (property.NameEquals("succeededLockTokens"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + succeededLockTokens = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new RejectResult(failedLockTokens, succeededLockTokens, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(RejectResult)} does not support writing '{options.Format}' format."); + } + } + + RejectResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeRejectResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(RejectResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static RejectResult FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeRejectResult(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGridV2/src/Generated/RejectResult.cs b/sdk/eventgrid/Azure.Messaging.EventGridV2/src/Generated/RejectResult.cs new file mode 100644 index 000000000000..42e8f0103fc9 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGridV2/src/Generated/RejectResult.cs @@ -0,0 +1,71 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Messaging.EventGrid.Namespaces +{ + /// The result of the Reject operation. + public partial class RejectResult + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal RejectResult() + { + FailedLockTokens = new ChangeTrackingList(); + SucceededLockTokens = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// Array of FailedLockToken for failed cloud events. Each FailedLockToken includes the lock token along with the related error information (namely, the error code and description). + /// Array of lock tokens for the successfully rejected cloud events. + /// Keeps track of any properties unknown to the library. + internal RejectResult(IReadOnlyList failedLockTokens, IReadOnlyList succeededLockTokens, IDictionary serializedAdditionalRawData) + { + FailedLockTokens = failedLockTokens; + SucceededLockTokens = succeededLockTokens; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Array of FailedLockToken for failed cloud events. Each FailedLockToken includes the lock token along with the related error information (namely, the error code and description). + public IReadOnlyList FailedLockTokens { get; } + /// Array of lock tokens for the successfully rejected cloud events. + public IReadOnlyList SucceededLockTokens { get; } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGridV2/src/Generated/ReleaseDelay.cs b/sdk/eventgrid/Azure.Messaging.EventGridV2/src/Generated/ReleaseDelay.cs new file mode 100644 index 000000000000..a1c9cf7f7e07 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGridV2/src/Generated/ReleaseDelay.cs @@ -0,0 +1,60 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.Messaging.EventGrid.Namespaces +{ + /// Supported delays for release operation. + public readonly partial struct ReleaseDelay : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public ReleaseDelay(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string NoDelayValue = "0"; + private const string TenSecondsValue = "10"; + private const string OneMinuteValue = "60"; + private const string TenMinutesValue = "600"; + private const string OneHourValue = "3600"; + + /// Release the event after 0 seconds. + public static ReleaseDelay NoDelay { get; } = new ReleaseDelay(NoDelayValue); + /// Release the event after 10 seconds. + public static ReleaseDelay TenSeconds { get; } = new ReleaseDelay(TenSecondsValue); + /// Release the event after 60 seconds. + public static ReleaseDelay OneMinute { get; } = new ReleaseDelay(OneMinuteValue); + /// Release the event after 600 seconds. + public static ReleaseDelay TenMinutes { get; } = new ReleaseDelay(TenMinutesValue); + /// Release the event after 3600 seconds. + public static ReleaseDelay OneHour { get; } = new ReleaseDelay(OneHourValue); + /// Determines if two values are the same. + public static bool operator ==(ReleaseDelay left, ReleaseDelay right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(ReleaseDelay left, ReleaseDelay right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator ReleaseDelay(string value) => new ReleaseDelay(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is ReleaseDelay other && Equals(other); + /// + public bool Equals(ReleaseDelay 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/eventgrid/Azure.Messaging.EventGridV2/src/Generated/ReleaseRequest.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGridV2/src/Generated/ReleaseRequest.Serialization.cs new file mode 100644 index 000000000000..b0d0881cf3df --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGridV2/src/Generated/ReleaseRequest.Serialization.cs @@ -0,0 +1,152 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Messaging.EventGrid.Namespaces +{ + internal partial class ReleaseRequest : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ReleaseRequest)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("lockTokens"u8); + writer.WriteStartArray(); + foreach (var item in LockTokens) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ReleaseRequest IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ReleaseRequest)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeReleaseRequest(document.RootElement, options); + } + + internal static ReleaseRequest DeserializeReleaseRequest(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList lockTokens = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("lockTokens"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + lockTokens = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ReleaseRequest(lockTokens, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ReleaseRequest)} does not support writing '{options.Format}' format."); + } + } + + ReleaseRequest IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeReleaseRequest(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ReleaseRequest)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static ReleaseRequest FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeReleaseRequest(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGridV2/src/Generated/ReleaseRequest.cs b/sdk/eventgrid/Azure.Messaging.EventGridV2/src/Generated/ReleaseRequest.cs new file mode 100644 index 000000000000..8081e38d2411 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGridV2/src/Generated/ReleaseRequest.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.Messaging.EventGrid.Namespaces +{ + /// The ReleaseRequest. + internal partial class ReleaseRequest + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Array of lock tokens. + /// is null. + internal ReleaseRequest(IEnumerable lockTokens) + { + Argument.AssertNotNull(lockTokens, nameof(lockTokens)); + + LockTokens = lockTokens.ToList(); + } + + /// Initializes a new instance of . + /// Array of lock tokens. + /// Keeps track of any properties unknown to the library. + internal ReleaseRequest(IReadOnlyList lockTokens, IDictionary serializedAdditionalRawData) + { + LockTokens = lockTokens; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal ReleaseRequest() + { + } + + /// Array of lock tokens. + public IReadOnlyList LockTokens { get; } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGridV2/src/Generated/ReleaseResult.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGridV2/src/Generated/ReleaseResult.Serialization.cs new file mode 100644 index 000000000000..6076ed8a915a --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGridV2/src/Generated/ReleaseResult.Serialization.cs @@ -0,0 +1,176 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Messaging.EventGrid.Namespaces +{ + public partial class ReleaseResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ReleaseResult)} does not support writing '{format}' format."); + } + + if (options.Format != "W") + { + writer.WritePropertyName("failedLockTokens"u8); + writer.WriteStartArray(); + foreach (var item in FailedLockTokens) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (options.Format != "W") + { + writer.WritePropertyName("succeededLockTokens"u8); + writer.WriteStartArray(); + foreach (var item in SucceededLockTokens) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ReleaseResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ReleaseResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeReleaseResult(document.RootElement, options); + } + + internal static ReleaseResult DeserializeReleaseResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList failedLockTokens = default; + IReadOnlyList succeededLockTokens = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("failedLockTokens"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(FailedLockToken.DeserializeFailedLockToken(item, options)); + } + failedLockTokens = array; + continue; + } + if (property.NameEquals("succeededLockTokens"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + succeededLockTokens = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ReleaseResult(failedLockTokens, succeededLockTokens, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ReleaseResult)} does not support writing '{options.Format}' format."); + } + } + + ReleaseResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeReleaseResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ReleaseResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static ReleaseResult FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeReleaseResult(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGridV2/src/Generated/ReleaseResult.cs b/sdk/eventgrid/Azure.Messaging.EventGridV2/src/Generated/ReleaseResult.cs new file mode 100644 index 000000000000..b0820079fbdf --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGridV2/src/Generated/ReleaseResult.cs @@ -0,0 +1,71 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Messaging.EventGrid.Namespaces +{ + /// The result of the Release operation. + public partial class ReleaseResult + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal ReleaseResult() + { + FailedLockTokens = new ChangeTrackingList(); + SucceededLockTokens = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// Array of FailedLockToken for failed cloud events. Each FailedLockToken includes the lock token along with the related error information (namely, the error code and description). + /// Array of lock tokens for the successfully released cloud events. + /// Keeps track of any properties unknown to the library. + internal ReleaseResult(IReadOnlyList failedLockTokens, IReadOnlyList succeededLockTokens, IDictionary serializedAdditionalRawData) + { + FailedLockTokens = failedLockTokens; + SucceededLockTokens = succeededLockTokens; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Array of FailedLockToken for failed cloud events. Each FailedLockToken includes the lock token along with the related error information (namely, the error code and description). + public IReadOnlyList FailedLockTokens { get; } + /// Array of lock tokens for the successfully released cloud events. + public IReadOnlyList SucceededLockTokens { get; } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGridV2/src/Generated/RenewLocksRequest.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGridV2/src/Generated/RenewLocksRequest.Serialization.cs new file mode 100644 index 000000000000..7d907f8d7993 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGridV2/src/Generated/RenewLocksRequest.Serialization.cs @@ -0,0 +1,152 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Messaging.EventGrid.Namespaces +{ + internal partial class RenewLocksRequest : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(RenewLocksRequest)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("lockTokens"u8); + writer.WriteStartArray(); + foreach (var item in LockTokens) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + RenewLocksRequest IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(RenewLocksRequest)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeRenewLocksRequest(document.RootElement, options); + } + + internal static RenewLocksRequest DeserializeRenewLocksRequest(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList lockTokens = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("lockTokens"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + lockTokens = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new RenewLocksRequest(lockTokens, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(RenewLocksRequest)} does not support writing '{options.Format}' format."); + } + } + + RenewLocksRequest IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeRenewLocksRequest(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(RenewLocksRequest)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static RenewLocksRequest FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeRenewLocksRequest(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGridV2/src/Generated/RenewLocksRequest.cs b/sdk/eventgrid/Azure.Messaging.EventGridV2/src/Generated/RenewLocksRequest.cs new file mode 100644 index 000000000000..60ac0dd1be38 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGridV2/src/Generated/RenewLocksRequest.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.Messaging.EventGrid.Namespaces +{ + /// The RenewLocksRequest. + internal partial class RenewLocksRequest + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Array of lock tokens. + /// is null. + internal RenewLocksRequest(IEnumerable lockTokens) + { + Argument.AssertNotNull(lockTokens, nameof(lockTokens)); + + LockTokens = lockTokens.ToList(); + } + + /// Initializes a new instance of . + /// Array of lock tokens. + /// Keeps track of any properties unknown to the library. + internal RenewLocksRequest(IReadOnlyList lockTokens, IDictionary serializedAdditionalRawData) + { + LockTokens = lockTokens; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal RenewLocksRequest() + { + } + + /// Array of lock tokens. + public IReadOnlyList LockTokens { get; } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGridV2/src/Generated/RenewLocksResult.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGridV2/src/Generated/RenewLocksResult.Serialization.cs new file mode 100644 index 000000000000..e2a7b0ea0b88 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGridV2/src/Generated/RenewLocksResult.Serialization.cs @@ -0,0 +1,176 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Messaging.EventGrid.Namespaces +{ + public partial class RenewLocksResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(RenewLocksResult)} does not support writing '{format}' format."); + } + + if (options.Format != "W") + { + writer.WritePropertyName("failedLockTokens"u8); + writer.WriteStartArray(); + foreach (var item in FailedLockTokens) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (options.Format != "W") + { + writer.WritePropertyName("succeededLockTokens"u8); + writer.WriteStartArray(); + foreach (var item in SucceededLockTokens) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + RenewLocksResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(RenewLocksResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeRenewLocksResult(document.RootElement, options); + } + + internal static RenewLocksResult DeserializeRenewLocksResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList failedLockTokens = default; + IReadOnlyList succeededLockTokens = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("failedLockTokens"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(FailedLockToken.DeserializeFailedLockToken(item, options)); + } + failedLockTokens = array; + continue; + } + if (property.NameEquals("succeededLockTokens"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + succeededLockTokens = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new RenewLocksResult(failedLockTokens, succeededLockTokens, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(RenewLocksResult)} does not support writing '{options.Format}' format."); + } + } + + RenewLocksResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeRenewLocksResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(RenewLocksResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static RenewLocksResult FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeRenewLocksResult(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGridV2/src/Generated/RenewLocksResult.cs b/sdk/eventgrid/Azure.Messaging.EventGridV2/src/Generated/RenewLocksResult.cs new file mode 100644 index 000000000000..d08dcd1e8ece --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGridV2/src/Generated/RenewLocksResult.cs @@ -0,0 +1,71 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Messaging.EventGrid.Namespaces +{ + /// The result of the RenewLock operation. + public partial class RenewLocksResult + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal RenewLocksResult() + { + FailedLockTokens = new ChangeTrackingList(); + SucceededLockTokens = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// Array of FailedLockToken for failed cloud events. Each FailedLockToken includes the lock token along with the related error information (namely, the error code and description). + /// Array of lock tokens for the successfully renewed locks. + /// Keeps track of any properties unknown to the library. + internal RenewLocksResult(IReadOnlyList failedLockTokens, IReadOnlyList succeededLockTokens, IDictionary serializedAdditionalRawData) + { + FailedLockTokens = failedLockTokens; + SucceededLockTokens = succeededLockTokens; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Array of FailedLockToken for failed cloud events. Each FailedLockToken includes the lock token along with the related error information (namely, the error code and description). + public IReadOnlyList FailedLockTokens { get; } + /// Array of lock tokens for the successfully renewed locks. + public IReadOnlyList SucceededLockTokens { get; } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGridV2/src/Properties/AssemblyInfo.cs b/sdk/eventgrid/Azure.Messaging.EventGridV2/src/Properties/AssemblyInfo.cs new file mode 100644 index 000000000000..d5b2dd2228ed --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGridV2/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.Messaging.EventGrid.Namespaces.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("Microsoft.Template")] diff --git a/sdk/eventgrid/Azure.Messaging.EventGridV2/tsp-location.yaml b/sdk/eventgrid/Azure.Messaging.EventGridV2/tsp-location.yaml new file mode 100644 index 000000000000..9a7b6276aa15 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGridV2/tsp-location.yaml @@ -0,0 +1,4 @@ +directory: specification/eventgrid/Azure.Messaging.EventGrid +commit: 5cc63ed55e6f4769b156f767154839d0d18a7d05 +repo: Azure/azure-rest-api-specs +additionalDirectories: diff --git a/sdk/liftrweightsandbiases/Azure.ResourceManager.WeightsAndBiases/Azure.ResourceManager.WeightsAndBiases.sln b/sdk/liftrweightsandbiases/Azure.ResourceManager.WeightsAndBiases/Azure.ResourceManager.WeightsAndBiases.sln new file mode 100644 index 000000000000..1ba19ad0de91 --- /dev/null +++ b/sdk/liftrweightsandbiases/Azure.ResourceManager.WeightsAndBiases/Azure.ResourceManager.WeightsAndBiases.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.WeightsAndBiases.Samples", "samples\Azure.ResourceManager.WeightsAndBiases.Samples.csproj", "{7A2DFF15-5746-49F4-BD0F-C6C35337088A}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Azure.ResourceManager.WeightsAndBiases", "src\Azure.ResourceManager.WeightsAndBiases.csproj", "{28FF4005-4467-4E36-92E7-DEA27DEB1519}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Azure.ResourceManager.WeightsAndBiases.Tests", "tests\Azure.ResourceManager.WeightsAndBiases.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/liftrweightsandbiases/Azure.ResourceManager.WeightsAndBiases/CHANGELOG.md b/sdk/liftrweightsandbiases/Azure.ResourceManager.WeightsAndBiases/CHANGELOG.md new file mode 100644 index 000000000000..8b33f0fedccc --- /dev/null +++ b/sdk/liftrweightsandbiases/Azure.ResourceManager.WeightsAndBiases/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/liftrweightsandbiases/Azure.ResourceManager.WeightsAndBiases/Directory.Build.props b/sdk/liftrweightsandbiases/Azure.ResourceManager.WeightsAndBiases/Directory.Build.props new file mode 100644 index 000000000000..63bd836ad44b --- /dev/null +++ b/sdk/liftrweightsandbiases/Azure.ResourceManager.WeightsAndBiases/Directory.Build.props @@ -0,0 +1,6 @@ + + + + diff --git a/sdk/liftrweightsandbiases/Azure.ResourceManager.WeightsAndBiases/README.md b/sdk/liftrweightsandbiases/Azure.ResourceManager.WeightsAndBiases/README.md new file mode 100644 index 000000000000..1e862721b95f --- /dev/null +++ b/sdk/liftrweightsandbiases/Azure.ResourceManager.WeightsAndBiases/README.md @@ -0,0 +1,80 @@ +# Microsoft Azure WeightsAndBiases 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 WeightsAndBiases management library for .NET with [NuGet](https://www.nuget.org/): + +```dotnetcli +dotnet add package Azure.ResourceManager.WeightsAndBiases --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/liftrweightsandbiases/Azure.ResourceManager.WeightsAndBiases/api/Azure.ResourceManager.WeightsAndBiases.net8.0.cs b/sdk/liftrweightsandbiases/Azure.ResourceManager.WeightsAndBiases/api/Azure.ResourceManager.WeightsAndBiases.net8.0.cs new file mode 100644 index 000000000000..c1418056a81d --- /dev/null +++ b/sdk/liftrweightsandbiases/Azure.ResourceManager.WeightsAndBiases/api/Azure.ResourceManager.WeightsAndBiases.net8.0.cs @@ -0,0 +1,292 @@ +namespace Azure.ResourceManager.WeightsAndBiases +{ + public static partial class WeightsAndBiasesExtensions + { + public static Azure.Response GetWeightsAndBiasesInstance(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string instancename, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static System.Threading.Tasks.Task> GetWeightsAndBiasesInstanceAsync(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string instancename, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.ResourceManager.WeightsAndBiases.WeightsAndBiasesInstanceResource GetWeightsAndBiasesInstanceResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.WeightsAndBiases.WeightsAndBiasesInstanceCollection GetWeightsAndBiasesInstances(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource) { throw null; } + public static Azure.Pageable GetWeightsAndBiasesInstances(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.AsyncPageable GetWeightsAndBiasesInstancesAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class WeightsAndBiasesInstanceCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected WeightsAndBiasesInstanceCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string instancename, Azure.ResourceManager.WeightsAndBiases.WeightsAndBiasesInstanceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string instancename, Azure.ResourceManager.WeightsAndBiases.WeightsAndBiasesInstanceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string instancename, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string instancename, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string instancename, 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 instancename, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string instancename, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string instancename, 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 WeightsAndBiasesInstanceData : Azure.ResourceManager.Models.TrackedResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public WeightsAndBiasesInstanceData(Azure.Core.AzureLocation location) { } + public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } } + public Azure.ResourceManager.WeightsAndBiases.Models.WeightsAndBiasesInstanceProperties Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.WeightsAndBiases.WeightsAndBiasesInstanceData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.WeightsAndBiases.WeightsAndBiasesInstanceData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class WeightsAndBiasesInstanceResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected WeightsAndBiasesInstanceResource() { } + public virtual Azure.ResourceManager.WeightsAndBiases.WeightsAndBiasesInstanceData 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 instancename) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response RemoveTag(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> RemoveTagAsync(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response SetTags(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> SetTagsAsync(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + Azure.ResourceManager.WeightsAndBiases.WeightsAndBiasesInstanceData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.WeightsAndBiases.WeightsAndBiasesInstanceData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + public virtual Azure.Response Update(Azure.ResourceManager.WeightsAndBiases.Models.WeightsAndBiasesInstancePatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.ResourceManager.WeightsAndBiases.Models.WeightsAndBiasesInstancePatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } +} +namespace Azure.ResourceManager.WeightsAndBiases.Mocking +{ + public partial class MockableWeightsAndBiasesArmClient : Azure.ResourceManager.ArmResource + { + protected MockableWeightsAndBiasesArmClient() { } + public virtual Azure.ResourceManager.WeightsAndBiases.WeightsAndBiasesInstanceResource GetWeightsAndBiasesInstanceResource(Azure.Core.ResourceIdentifier id) { throw null; } + } + public partial class MockableWeightsAndBiasesResourceGroupResource : Azure.ResourceManager.ArmResource + { + protected MockableWeightsAndBiasesResourceGroupResource() { } + public virtual Azure.Response GetWeightsAndBiasesInstance(string instancename, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetWeightsAndBiasesInstanceAsync(string instancename, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.WeightsAndBiases.WeightsAndBiasesInstanceCollection GetWeightsAndBiasesInstances() { throw null; } + } + public partial class MockableWeightsAndBiasesSubscriptionResource : Azure.ResourceManager.ArmResource + { + protected MockableWeightsAndBiasesSubscriptionResource() { } + public virtual Azure.Pageable GetWeightsAndBiasesInstances(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetWeightsAndBiasesInstancesAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } +} +namespace Azure.ResourceManager.WeightsAndBiases.Models +{ + public static partial class ArmWeightsAndBiasesModelFactory + { + public static Azure.ResourceManager.WeightsAndBiases.WeightsAndBiasesInstanceData WeightsAndBiasesInstanceData(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.WeightsAndBiases.Models.WeightsAndBiasesInstanceProperties properties = null, Azure.ResourceManager.Models.ManagedServiceIdentity identity = null) { throw null; } + public static Azure.ResourceManager.WeightsAndBiases.Models.WeightsAndBiasesInstanceProperties WeightsAndBiasesInstanceProperties(Azure.ResourceManager.WeightsAndBiases.Models.WeightsAndBiasesMarketplaceDetails marketplace = null, Azure.ResourceManager.WeightsAndBiases.Models.WeightsAndBiasesUserDetails user = null, Azure.ResourceManager.WeightsAndBiases.Models.WeightsAndBiasesProvisioningState? provisioningState = default(Azure.ResourceManager.WeightsAndBiases.Models.WeightsAndBiasesProvisioningState?), Azure.ResourceManager.WeightsAndBiases.Models.WeightsAndBiasesPartnerProperties partnerProperties = null, Azure.ResourceManager.WeightsAndBiases.Models.WeightsAndBiasesSingleSignOnPropertiesV2 singleSignOnProperties = null) { throw null; } + public static Azure.ResourceManager.WeightsAndBiases.Models.WeightsAndBiasesMarketplaceDetails WeightsAndBiasesMarketplaceDetails(string subscriptionId = null, Azure.ResourceManager.WeightsAndBiases.Models.WeightsAndBiasesMarketplaceSubscriptionStatus? subscriptionStatus = default(Azure.ResourceManager.WeightsAndBiases.Models.WeightsAndBiasesMarketplaceSubscriptionStatus?), Azure.ResourceManager.WeightsAndBiases.Models.WeightsAndBiasesOfferDetails offerDetails = null) { throw null; } + } + public partial class WeightsAndBiasesInstancePatch : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public WeightsAndBiasesInstancePatch() { } + public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } } + public System.Collections.Generic.IDictionary Tags { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.WeightsAndBiases.Models.WeightsAndBiasesInstancePatch System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.WeightsAndBiases.Models.WeightsAndBiasesInstancePatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class WeightsAndBiasesInstanceProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public WeightsAndBiasesInstanceProperties(Azure.ResourceManager.WeightsAndBiases.Models.WeightsAndBiasesMarketplaceDetails marketplace, Azure.ResourceManager.WeightsAndBiases.Models.WeightsAndBiasesUserDetails user) { } + public Azure.ResourceManager.WeightsAndBiases.Models.WeightsAndBiasesMarketplaceDetails Marketplace { get { throw null; } set { } } + public Azure.ResourceManager.WeightsAndBiases.Models.WeightsAndBiasesPartnerProperties PartnerProperties { get { throw null; } set { } } + public Azure.ResourceManager.WeightsAndBiases.Models.WeightsAndBiasesProvisioningState? ProvisioningState { get { throw null; } } + public Azure.ResourceManager.WeightsAndBiases.Models.WeightsAndBiasesSingleSignOnPropertiesV2 SingleSignOnProperties { get { throw null; } set { } } + public Azure.ResourceManager.WeightsAndBiases.Models.WeightsAndBiasesUserDetails User { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.WeightsAndBiases.Models.WeightsAndBiasesInstanceProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.WeightsAndBiases.Models.WeightsAndBiasesInstanceProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class WeightsAndBiasesMarketplaceDetails : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public WeightsAndBiasesMarketplaceDetails(Azure.ResourceManager.WeightsAndBiases.Models.WeightsAndBiasesOfferDetails offerDetails) { } + public Azure.ResourceManager.WeightsAndBiases.Models.WeightsAndBiasesOfferDetails OfferDetails { get { throw null; } set { } } + public string SubscriptionId { get { throw null; } set { } } + public Azure.ResourceManager.WeightsAndBiases.Models.WeightsAndBiasesMarketplaceSubscriptionStatus? SubscriptionStatus { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.WeightsAndBiases.Models.WeightsAndBiasesMarketplaceDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.WeightsAndBiases.Models.WeightsAndBiasesMarketplaceDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.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 WeightsAndBiasesMarketplaceSubscriptionStatus : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public WeightsAndBiasesMarketplaceSubscriptionStatus(string value) { throw null; } + public static Azure.ResourceManager.WeightsAndBiases.Models.WeightsAndBiasesMarketplaceSubscriptionStatus PendingFulfillmentStart { get { throw null; } } + public static Azure.ResourceManager.WeightsAndBiases.Models.WeightsAndBiasesMarketplaceSubscriptionStatus Subscribed { get { throw null; } } + public static Azure.ResourceManager.WeightsAndBiases.Models.WeightsAndBiasesMarketplaceSubscriptionStatus Suspended { get { throw null; } } + public static Azure.ResourceManager.WeightsAndBiases.Models.WeightsAndBiasesMarketplaceSubscriptionStatus Unsubscribed { get { throw null; } } + public bool Equals(Azure.ResourceManager.WeightsAndBiases.Models.WeightsAndBiasesMarketplaceSubscriptionStatus 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.WeightsAndBiases.Models.WeightsAndBiasesMarketplaceSubscriptionStatus left, Azure.ResourceManager.WeightsAndBiases.Models.WeightsAndBiasesMarketplaceSubscriptionStatus right) { throw null; } + public static implicit operator Azure.ResourceManager.WeightsAndBiases.Models.WeightsAndBiasesMarketplaceSubscriptionStatus (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.WeightsAndBiases.Models.WeightsAndBiasesMarketplaceSubscriptionStatus left, Azure.ResourceManager.WeightsAndBiases.Models.WeightsAndBiasesMarketplaceSubscriptionStatus right) { throw null; } + public override string ToString() { throw null; } + } + public partial class WeightsAndBiasesOfferDetails : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public WeightsAndBiasesOfferDetails(string publisherId, string offerId, string planId) { } + public string OfferId { get { throw null; } set { } } + public string PlanId { get { throw null; } set { } } + public string PlanName { get { throw null; } set { } } + public string PublisherId { get { throw null; } set { } } + public string TermId { get { throw null; } set { } } + public string TermUnit { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.WeightsAndBiases.Models.WeightsAndBiasesOfferDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.WeightsAndBiases.Models.WeightsAndBiasesOfferDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class WeightsAndBiasesPartnerProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public WeightsAndBiasesPartnerProperties(Azure.ResourceManager.WeightsAndBiases.Models.WeightsAndBiasesRegion region, string subdomain) { } + public Azure.ResourceManager.WeightsAndBiases.Models.WeightsAndBiasesRegion Region { get { throw null; } set { } } + public string Subdomain { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.WeightsAndBiases.Models.WeightsAndBiasesPartnerProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.WeightsAndBiases.Models.WeightsAndBiasesPartnerProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.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 WeightsAndBiasesProvisioningState : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public WeightsAndBiasesProvisioningState(string value) { throw null; } + public static Azure.ResourceManager.WeightsAndBiases.Models.WeightsAndBiasesProvisioningState Canceled { get { throw null; } } + public static Azure.ResourceManager.WeightsAndBiases.Models.WeightsAndBiasesProvisioningState Failed { get { throw null; } } + public static Azure.ResourceManager.WeightsAndBiases.Models.WeightsAndBiasesProvisioningState Succeeded { get { throw null; } } + public bool Equals(Azure.ResourceManager.WeightsAndBiases.Models.WeightsAndBiasesProvisioningState 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.WeightsAndBiases.Models.WeightsAndBiasesProvisioningState left, Azure.ResourceManager.WeightsAndBiases.Models.WeightsAndBiasesProvisioningState right) { throw null; } + public static implicit operator Azure.ResourceManager.WeightsAndBiases.Models.WeightsAndBiasesProvisioningState (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.WeightsAndBiases.Models.WeightsAndBiasesProvisioningState left, Azure.ResourceManager.WeightsAndBiases.Models.WeightsAndBiasesProvisioningState right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct WeightsAndBiasesRegion : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public WeightsAndBiasesRegion(string value) { throw null; } + public static Azure.ResourceManager.WeightsAndBiases.Models.WeightsAndBiasesRegion CentralUS { get { throw null; } } + public static Azure.ResourceManager.WeightsAndBiases.Models.WeightsAndBiasesRegion EastUS { get { throw null; } } + public static Azure.ResourceManager.WeightsAndBiases.Models.WeightsAndBiasesRegion JapanEast { get { throw null; } } + public static Azure.ResourceManager.WeightsAndBiases.Models.WeightsAndBiasesRegion KoreaCentral { get { throw null; } } + public static Azure.ResourceManager.WeightsAndBiases.Models.WeightsAndBiasesRegion WestEurope { get { throw null; } } + public static Azure.ResourceManager.WeightsAndBiases.Models.WeightsAndBiasesRegion WestUS { get { throw null; } } + public bool Equals(Azure.ResourceManager.WeightsAndBiases.Models.WeightsAndBiasesRegion 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.WeightsAndBiases.Models.WeightsAndBiasesRegion left, Azure.ResourceManager.WeightsAndBiases.Models.WeightsAndBiasesRegion right) { throw null; } + public static implicit operator Azure.ResourceManager.WeightsAndBiases.Models.WeightsAndBiasesRegion (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.WeightsAndBiases.Models.WeightsAndBiasesRegion left, Azure.ResourceManager.WeightsAndBiases.Models.WeightsAndBiasesRegion right) { throw null; } + public override string ToString() { throw null; } + } + public partial class WeightsAndBiasesSingleSignOnPropertiesV2 : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public WeightsAndBiasesSingleSignOnPropertiesV2(Azure.ResourceManager.WeightsAndBiases.Models.WeightsAndBiasesSingleSignOnType type) { } + public System.Collections.Generic.IList AadDomains { get { throw null; } } + public string EnterpriseAppId { get { throw null; } set { } } + public Azure.ResourceManager.WeightsAndBiases.Models.WeightsAndBiasesSingleSignOnState? State { get { throw null; } set { } } + public Azure.ResourceManager.WeightsAndBiases.Models.WeightsAndBiasesSingleSignOnType Type { get { throw null; } set { } } + public string Uri { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.WeightsAndBiases.Models.WeightsAndBiasesSingleSignOnPropertiesV2 System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.WeightsAndBiases.Models.WeightsAndBiasesSingleSignOnPropertiesV2 System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.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 WeightsAndBiasesSingleSignOnState : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public WeightsAndBiasesSingleSignOnState(string value) { throw null; } + public static Azure.ResourceManager.WeightsAndBiases.Models.WeightsAndBiasesSingleSignOnState Disable { get { throw null; } } + public static Azure.ResourceManager.WeightsAndBiases.Models.WeightsAndBiasesSingleSignOnState Enable { get { throw null; } } + public static Azure.ResourceManager.WeightsAndBiases.Models.WeightsAndBiasesSingleSignOnState Initial { get { throw null; } } + public bool Equals(Azure.ResourceManager.WeightsAndBiases.Models.WeightsAndBiasesSingleSignOnState 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.WeightsAndBiases.Models.WeightsAndBiasesSingleSignOnState left, Azure.ResourceManager.WeightsAndBiases.Models.WeightsAndBiasesSingleSignOnState right) { throw null; } + public static implicit operator Azure.ResourceManager.WeightsAndBiases.Models.WeightsAndBiasesSingleSignOnState (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.WeightsAndBiases.Models.WeightsAndBiasesSingleSignOnState left, Azure.ResourceManager.WeightsAndBiases.Models.WeightsAndBiasesSingleSignOnState right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct WeightsAndBiasesSingleSignOnType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public WeightsAndBiasesSingleSignOnType(string value) { throw null; } + public static Azure.ResourceManager.WeightsAndBiases.Models.WeightsAndBiasesSingleSignOnType OpenId { get { throw null; } } + public static Azure.ResourceManager.WeightsAndBiases.Models.WeightsAndBiasesSingleSignOnType Saml { get { throw null; } } + public bool Equals(Azure.ResourceManager.WeightsAndBiases.Models.WeightsAndBiasesSingleSignOnType 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.WeightsAndBiases.Models.WeightsAndBiasesSingleSignOnType left, Azure.ResourceManager.WeightsAndBiases.Models.WeightsAndBiasesSingleSignOnType right) { throw null; } + public static implicit operator Azure.ResourceManager.WeightsAndBiases.Models.WeightsAndBiasesSingleSignOnType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.WeightsAndBiases.Models.WeightsAndBiasesSingleSignOnType left, Azure.ResourceManager.WeightsAndBiases.Models.WeightsAndBiasesSingleSignOnType right) { throw null; } + public override string ToString() { throw null; } + } + public partial class WeightsAndBiasesUserDetails : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public WeightsAndBiasesUserDetails() { } + public string EmailAddress { get { throw null; } set { } } + public string FirstName { get { throw null; } set { } } + public string LastName { get { throw null; } set { } } + public string PhoneNumber { get { throw null; } set { } } + public string Upn { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.WeightsAndBiases.Models.WeightsAndBiasesUserDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.WeightsAndBiases.Models.WeightsAndBiasesUserDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.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/liftrweightsandbiases/Azure.ResourceManager.WeightsAndBiases/api/Azure.ResourceManager.WeightsAndBiases.netstandard2.0.cs b/sdk/liftrweightsandbiases/Azure.ResourceManager.WeightsAndBiases/api/Azure.ResourceManager.WeightsAndBiases.netstandard2.0.cs new file mode 100644 index 000000000000..c1418056a81d --- /dev/null +++ b/sdk/liftrweightsandbiases/Azure.ResourceManager.WeightsAndBiases/api/Azure.ResourceManager.WeightsAndBiases.netstandard2.0.cs @@ -0,0 +1,292 @@ +namespace Azure.ResourceManager.WeightsAndBiases +{ + public static partial class WeightsAndBiasesExtensions + { + public static Azure.Response GetWeightsAndBiasesInstance(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string instancename, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static System.Threading.Tasks.Task> GetWeightsAndBiasesInstanceAsync(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string instancename, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.ResourceManager.WeightsAndBiases.WeightsAndBiasesInstanceResource GetWeightsAndBiasesInstanceResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.WeightsAndBiases.WeightsAndBiasesInstanceCollection GetWeightsAndBiasesInstances(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource) { throw null; } + public static Azure.Pageable GetWeightsAndBiasesInstances(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.AsyncPageable GetWeightsAndBiasesInstancesAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class WeightsAndBiasesInstanceCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected WeightsAndBiasesInstanceCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string instancename, Azure.ResourceManager.WeightsAndBiases.WeightsAndBiasesInstanceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string instancename, Azure.ResourceManager.WeightsAndBiases.WeightsAndBiasesInstanceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string instancename, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string instancename, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string instancename, 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 instancename, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string instancename, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string instancename, 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 WeightsAndBiasesInstanceData : Azure.ResourceManager.Models.TrackedResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public WeightsAndBiasesInstanceData(Azure.Core.AzureLocation location) { } + public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } } + public Azure.ResourceManager.WeightsAndBiases.Models.WeightsAndBiasesInstanceProperties Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.WeightsAndBiases.WeightsAndBiasesInstanceData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.WeightsAndBiases.WeightsAndBiasesInstanceData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class WeightsAndBiasesInstanceResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected WeightsAndBiasesInstanceResource() { } + public virtual Azure.ResourceManager.WeightsAndBiases.WeightsAndBiasesInstanceData 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 instancename) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response RemoveTag(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> RemoveTagAsync(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response SetTags(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> SetTagsAsync(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + Azure.ResourceManager.WeightsAndBiases.WeightsAndBiasesInstanceData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.WeightsAndBiases.WeightsAndBiasesInstanceData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + public virtual Azure.Response Update(Azure.ResourceManager.WeightsAndBiases.Models.WeightsAndBiasesInstancePatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.ResourceManager.WeightsAndBiases.Models.WeightsAndBiasesInstancePatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } +} +namespace Azure.ResourceManager.WeightsAndBiases.Mocking +{ + public partial class MockableWeightsAndBiasesArmClient : Azure.ResourceManager.ArmResource + { + protected MockableWeightsAndBiasesArmClient() { } + public virtual Azure.ResourceManager.WeightsAndBiases.WeightsAndBiasesInstanceResource GetWeightsAndBiasesInstanceResource(Azure.Core.ResourceIdentifier id) { throw null; } + } + public partial class MockableWeightsAndBiasesResourceGroupResource : Azure.ResourceManager.ArmResource + { + protected MockableWeightsAndBiasesResourceGroupResource() { } + public virtual Azure.Response GetWeightsAndBiasesInstance(string instancename, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetWeightsAndBiasesInstanceAsync(string instancename, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.WeightsAndBiases.WeightsAndBiasesInstanceCollection GetWeightsAndBiasesInstances() { throw null; } + } + public partial class MockableWeightsAndBiasesSubscriptionResource : Azure.ResourceManager.ArmResource + { + protected MockableWeightsAndBiasesSubscriptionResource() { } + public virtual Azure.Pageable GetWeightsAndBiasesInstances(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetWeightsAndBiasesInstancesAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } +} +namespace Azure.ResourceManager.WeightsAndBiases.Models +{ + public static partial class ArmWeightsAndBiasesModelFactory + { + public static Azure.ResourceManager.WeightsAndBiases.WeightsAndBiasesInstanceData WeightsAndBiasesInstanceData(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.WeightsAndBiases.Models.WeightsAndBiasesInstanceProperties properties = null, Azure.ResourceManager.Models.ManagedServiceIdentity identity = null) { throw null; } + public static Azure.ResourceManager.WeightsAndBiases.Models.WeightsAndBiasesInstanceProperties WeightsAndBiasesInstanceProperties(Azure.ResourceManager.WeightsAndBiases.Models.WeightsAndBiasesMarketplaceDetails marketplace = null, Azure.ResourceManager.WeightsAndBiases.Models.WeightsAndBiasesUserDetails user = null, Azure.ResourceManager.WeightsAndBiases.Models.WeightsAndBiasesProvisioningState? provisioningState = default(Azure.ResourceManager.WeightsAndBiases.Models.WeightsAndBiasesProvisioningState?), Azure.ResourceManager.WeightsAndBiases.Models.WeightsAndBiasesPartnerProperties partnerProperties = null, Azure.ResourceManager.WeightsAndBiases.Models.WeightsAndBiasesSingleSignOnPropertiesV2 singleSignOnProperties = null) { throw null; } + public static Azure.ResourceManager.WeightsAndBiases.Models.WeightsAndBiasesMarketplaceDetails WeightsAndBiasesMarketplaceDetails(string subscriptionId = null, Azure.ResourceManager.WeightsAndBiases.Models.WeightsAndBiasesMarketplaceSubscriptionStatus? subscriptionStatus = default(Azure.ResourceManager.WeightsAndBiases.Models.WeightsAndBiasesMarketplaceSubscriptionStatus?), Azure.ResourceManager.WeightsAndBiases.Models.WeightsAndBiasesOfferDetails offerDetails = null) { throw null; } + } + public partial class WeightsAndBiasesInstancePatch : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public WeightsAndBiasesInstancePatch() { } + public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } } + public System.Collections.Generic.IDictionary Tags { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.WeightsAndBiases.Models.WeightsAndBiasesInstancePatch System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.WeightsAndBiases.Models.WeightsAndBiasesInstancePatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class WeightsAndBiasesInstanceProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public WeightsAndBiasesInstanceProperties(Azure.ResourceManager.WeightsAndBiases.Models.WeightsAndBiasesMarketplaceDetails marketplace, Azure.ResourceManager.WeightsAndBiases.Models.WeightsAndBiasesUserDetails user) { } + public Azure.ResourceManager.WeightsAndBiases.Models.WeightsAndBiasesMarketplaceDetails Marketplace { get { throw null; } set { } } + public Azure.ResourceManager.WeightsAndBiases.Models.WeightsAndBiasesPartnerProperties PartnerProperties { get { throw null; } set { } } + public Azure.ResourceManager.WeightsAndBiases.Models.WeightsAndBiasesProvisioningState? ProvisioningState { get { throw null; } } + public Azure.ResourceManager.WeightsAndBiases.Models.WeightsAndBiasesSingleSignOnPropertiesV2 SingleSignOnProperties { get { throw null; } set { } } + public Azure.ResourceManager.WeightsAndBiases.Models.WeightsAndBiasesUserDetails User { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.WeightsAndBiases.Models.WeightsAndBiasesInstanceProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.WeightsAndBiases.Models.WeightsAndBiasesInstanceProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class WeightsAndBiasesMarketplaceDetails : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public WeightsAndBiasesMarketplaceDetails(Azure.ResourceManager.WeightsAndBiases.Models.WeightsAndBiasesOfferDetails offerDetails) { } + public Azure.ResourceManager.WeightsAndBiases.Models.WeightsAndBiasesOfferDetails OfferDetails { get { throw null; } set { } } + public string SubscriptionId { get { throw null; } set { } } + public Azure.ResourceManager.WeightsAndBiases.Models.WeightsAndBiasesMarketplaceSubscriptionStatus? SubscriptionStatus { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.WeightsAndBiases.Models.WeightsAndBiasesMarketplaceDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.WeightsAndBiases.Models.WeightsAndBiasesMarketplaceDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.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 WeightsAndBiasesMarketplaceSubscriptionStatus : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public WeightsAndBiasesMarketplaceSubscriptionStatus(string value) { throw null; } + public static Azure.ResourceManager.WeightsAndBiases.Models.WeightsAndBiasesMarketplaceSubscriptionStatus PendingFulfillmentStart { get { throw null; } } + public static Azure.ResourceManager.WeightsAndBiases.Models.WeightsAndBiasesMarketplaceSubscriptionStatus Subscribed { get { throw null; } } + public static Azure.ResourceManager.WeightsAndBiases.Models.WeightsAndBiasesMarketplaceSubscriptionStatus Suspended { get { throw null; } } + public static Azure.ResourceManager.WeightsAndBiases.Models.WeightsAndBiasesMarketplaceSubscriptionStatus Unsubscribed { get { throw null; } } + public bool Equals(Azure.ResourceManager.WeightsAndBiases.Models.WeightsAndBiasesMarketplaceSubscriptionStatus 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.WeightsAndBiases.Models.WeightsAndBiasesMarketplaceSubscriptionStatus left, Azure.ResourceManager.WeightsAndBiases.Models.WeightsAndBiasesMarketplaceSubscriptionStatus right) { throw null; } + public static implicit operator Azure.ResourceManager.WeightsAndBiases.Models.WeightsAndBiasesMarketplaceSubscriptionStatus (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.WeightsAndBiases.Models.WeightsAndBiasesMarketplaceSubscriptionStatus left, Azure.ResourceManager.WeightsAndBiases.Models.WeightsAndBiasesMarketplaceSubscriptionStatus right) { throw null; } + public override string ToString() { throw null; } + } + public partial class WeightsAndBiasesOfferDetails : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public WeightsAndBiasesOfferDetails(string publisherId, string offerId, string planId) { } + public string OfferId { get { throw null; } set { } } + public string PlanId { get { throw null; } set { } } + public string PlanName { get { throw null; } set { } } + public string PublisherId { get { throw null; } set { } } + public string TermId { get { throw null; } set { } } + public string TermUnit { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.WeightsAndBiases.Models.WeightsAndBiasesOfferDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.WeightsAndBiases.Models.WeightsAndBiasesOfferDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class WeightsAndBiasesPartnerProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public WeightsAndBiasesPartnerProperties(Azure.ResourceManager.WeightsAndBiases.Models.WeightsAndBiasesRegion region, string subdomain) { } + public Azure.ResourceManager.WeightsAndBiases.Models.WeightsAndBiasesRegion Region { get { throw null; } set { } } + public string Subdomain { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.WeightsAndBiases.Models.WeightsAndBiasesPartnerProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.WeightsAndBiases.Models.WeightsAndBiasesPartnerProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.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 WeightsAndBiasesProvisioningState : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public WeightsAndBiasesProvisioningState(string value) { throw null; } + public static Azure.ResourceManager.WeightsAndBiases.Models.WeightsAndBiasesProvisioningState Canceled { get { throw null; } } + public static Azure.ResourceManager.WeightsAndBiases.Models.WeightsAndBiasesProvisioningState Failed { get { throw null; } } + public static Azure.ResourceManager.WeightsAndBiases.Models.WeightsAndBiasesProvisioningState Succeeded { get { throw null; } } + public bool Equals(Azure.ResourceManager.WeightsAndBiases.Models.WeightsAndBiasesProvisioningState 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.WeightsAndBiases.Models.WeightsAndBiasesProvisioningState left, Azure.ResourceManager.WeightsAndBiases.Models.WeightsAndBiasesProvisioningState right) { throw null; } + public static implicit operator Azure.ResourceManager.WeightsAndBiases.Models.WeightsAndBiasesProvisioningState (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.WeightsAndBiases.Models.WeightsAndBiasesProvisioningState left, Azure.ResourceManager.WeightsAndBiases.Models.WeightsAndBiasesProvisioningState right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct WeightsAndBiasesRegion : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public WeightsAndBiasesRegion(string value) { throw null; } + public static Azure.ResourceManager.WeightsAndBiases.Models.WeightsAndBiasesRegion CentralUS { get { throw null; } } + public static Azure.ResourceManager.WeightsAndBiases.Models.WeightsAndBiasesRegion EastUS { get { throw null; } } + public static Azure.ResourceManager.WeightsAndBiases.Models.WeightsAndBiasesRegion JapanEast { get { throw null; } } + public static Azure.ResourceManager.WeightsAndBiases.Models.WeightsAndBiasesRegion KoreaCentral { get { throw null; } } + public static Azure.ResourceManager.WeightsAndBiases.Models.WeightsAndBiasesRegion WestEurope { get { throw null; } } + public static Azure.ResourceManager.WeightsAndBiases.Models.WeightsAndBiasesRegion WestUS { get { throw null; } } + public bool Equals(Azure.ResourceManager.WeightsAndBiases.Models.WeightsAndBiasesRegion 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.WeightsAndBiases.Models.WeightsAndBiasesRegion left, Azure.ResourceManager.WeightsAndBiases.Models.WeightsAndBiasesRegion right) { throw null; } + public static implicit operator Azure.ResourceManager.WeightsAndBiases.Models.WeightsAndBiasesRegion (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.WeightsAndBiases.Models.WeightsAndBiasesRegion left, Azure.ResourceManager.WeightsAndBiases.Models.WeightsAndBiasesRegion right) { throw null; } + public override string ToString() { throw null; } + } + public partial class WeightsAndBiasesSingleSignOnPropertiesV2 : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public WeightsAndBiasesSingleSignOnPropertiesV2(Azure.ResourceManager.WeightsAndBiases.Models.WeightsAndBiasesSingleSignOnType type) { } + public System.Collections.Generic.IList AadDomains { get { throw null; } } + public string EnterpriseAppId { get { throw null; } set { } } + public Azure.ResourceManager.WeightsAndBiases.Models.WeightsAndBiasesSingleSignOnState? State { get { throw null; } set { } } + public Azure.ResourceManager.WeightsAndBiases.Models.WeightsAndBiasesSingleSignOnType Type { get { throw null; } set { } } + public string Uri { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.WeightsAndBiases.Models.WeightsAndBiasesSingleSignOnPropertiesV2 System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.WeightsAndBiases.Models.WeightsAndBiasesSingleSignOnPropertiesV2 System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.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 WeightsAndBiasesSingleSignOnState : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public WeightsAndBiasesSingleSignOnState(string value) { throw null; } + public static Azure.ResourceManager.WeightsAndBiases.Models.WeightsAndBiasesSingleSignOnState Disable { get { throw null; } } + public static Azure.ResourceManager.WeightsAndBiases.Models.WeightsAndBiasesSingleSignOnState Enable { get { throw null; } } + public static Azure.ResourceManager.WeightsAndBiases.Models.WeightsAndBiasesSingleSignOnState Initial { get { throw null; } } + public bool Equals(Azure.ResourceManager.WeightsAndBiases.Models.WeightsAndBiasesSingleSignOnState 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.WeightsAndBiases.Models.WeightsAndBiasesSingleSignOnState left, Azure.ResourceManager.WeightsAndBiases.Models.WeightsAndBiasesSingleSignOnState right) { throw null; } + public static implicit operator Azure.ResourceManager.WeightsAndBiases.Models.WeightsAndBiasesSingleSignOnState (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.WeightsAndBiases.Models.WeightsAndBiasesSingleSignOnState left, Azure.ResourceManager.WeightsAndBiases.Models.WeightsAndBiasesSingleSignOnState right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct WeightsAndBiasesSingleSignOnType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public WeightsAndBiasesSingleSignOnType(string value) { throw null; } + public static Azure.ResourceManager.WeightsAndBiases.Models.WeightsAndBiasesSingleSignOnType OpenId { get { throw null; } } + public static Azure.ResourceManager.WeightsAndBiases.Models.WeightsAndBiasesSingleSignOnType Saml { get { throw null; } } + public bool Equals(Azure.ResourceManager.WeightsAndBiases.Models.WeightsAndBiasesSingleSignOnType 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.WeightsAndBiases.Models.WeightsAndBiasesSingleSignOnType left, Azure.ResourceManager.WeightsAndBiases.Models.WeightsAndBiasesSingleSignOnType right) { throw null; } + public static implicit operator Azure.ResourceManager.WeightsAndBiases.Models.WeightsAndBiasesSingleSignOnType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.WeightsAndBiases.Models.WeightsAndBiasesSingleSignOnType left, Azure.ResourceManager.WeightsAndBiases.Models.WeightsAndBiasesSingleSignOnType right) { throw null; } + public override string ToString() { throw null; } + } + public partial class WeightsAndBiasesUserDetails : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public WeightsAndBiasesUserDetails() { } + public string EmailAddress { get { throw null; } set { } } + public string FirstName { get { throw null; } set { } } + public string LastName { get { throw null; } set { } } + public string PhoneNumber { get { throw null; } set { } } + public string Upn { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.WeightsAndBiases.Models.WeightsAndBiasesUserDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.WeightsAndBiases.Models.WeightsAndBiasesUserDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.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/liftrweightsandbiases/Azure.ResourceManager.WeightsAndBiases/assets.json b/sdk/liftrweightsandbiases/Azure.ResourceManager.WeightsAndBiases/assets.json new file mode 100644 index 000000000000..dc44628d4d44 --- /dev/null +++ b/sdk/liftrweightsandbiases/Azure.ResourceManager.WeightsAndBiases/assets.json @@ -0,0 +1,7 @@ + +{ + "AssetsRepo": "Azure/azure-sdk-assets", + "AssetsRepoPrefixPath": "net", + "TagPrefix": "net/weightsandbiases/Azure.ResourceManager.WeightsAndBiases", + "Tag": "" +} diff --git a/sdk/liftrweightsandbiases/Azure.ResourceManager.WeightsAndBiases/samples/Azure.ResourceManager.WeightsAndBiases.Samples.csproj b/sdk/liftrweightsandbiases/Azure.ResourceManager.WeightsAndBiases/samples/Azure.ResourceManager.WeightsAndBiases.Samples.csproj new file mode 100644 index 000000000000..f2a9d463cc79 --- /dev/null +++ b/sdk/liftrweightsandbiases/Azure.ResourceManager.WeightsAndBiases/samples/Azure.ResourceManager.WeightsAndBiases.Samples.csproj @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/sdk/liftrweightsandbiases/Azure.ResourceManager.WeightsAndBiases/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs b/sdk/liftrweightsandbiases/Azure.ResourceManager.WeightsAndBiases/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs new file mode 100644 index 000000000000..50aff78a2962 --- /dev/null +++ b/sdk/liftrweightsandbiases/Azure.ResourceManager.WeightsAndBiases/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs @@ -0,0 +1,81 @@ +// 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.WeightsAndBiases.Samples +{ + public partial class Sample_SubscriptionResourceExtensions + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetWeightsAndBiasesInstances_InstancesListBySubscriptionGeneratedByMaximumSetRule() + { + // Generated from example definition: 2024-09-18-preview/Instances_ListBySubscription_MaximumSet_Gen.json + // this example is just showing the usage of "InstanceResource_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 = "0BCB047F-CB71-4DFE-B0BD-88519F411C2F"; + ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); + SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); + + // invoke the operation and iterate over the result + await foreach (WeightsAndBiasesInstanceResource item in subscriptionResource.GetWeightsAndBiasesInstancesAsync()) + { + // 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 + WeightsAndBiasesInstanceData 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 GetWeightsAndBiasesInstances_InstancesListBySubscriptionGeneratedByMinimumSetRule() + { + // Generated from example definition: 2024-09-18-preview/Instances_ListBySubscription_MinimumSet_Gen.json + // this example is just showing the usage of "InstanceResource_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 = "0BCB047F-CB71-4DFE-B0BD-88519F411C2F"; + ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); + SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); + + // invoke the operation and iterate over the result + await foreach (WeightsAndBiasesInstanceResource item in subscriptionResource.GetWeightsAndBiasesInstancesAsync()) + { + // 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 + WeightsAndBiasesInstanceData 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/liftrweightsandbiases/Azure.ResourceManager.WeightsAndBiases/samples/Generated/Samples/Sample_WeightsAndBiasesInstanceCollection.cs b/sdk/liftrweightsandbiases/Azure.ResourceManager.WeightsAndBiases/samples/Generated/Samples/Sample_WeightsAndBiasesInstanceCollection.cs new file mode 100644 index 000000000000..f651ef35adfd --- /dev/null +++ b/sdk/liftrweightsandbiases/Azure.ResourceManager.WeightsAndBiases/samples/Generated/Samples/Sample_WeightsAndBiasesInstanceCollection.cs @@ -0,0 +1,262 @@ +// 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.Models; +using Azure.ResourceManager.Resources; +using Azure.ResourceManager.WeightsAndBiases.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.WeightsAndBiases.Samples +{ + public partial class Sample_WeightsAndBiasesInstanceCollection + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_InstancesCreateOrUpdateGeneratedByMaximumSetRule() + { + // Generated from example definition: 2024-09-18-preview/Instances_CreateOrUpdate_MaximumSet_Gen.json + // this example is just showing the usage of "InstanceResource_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 = "0BCB047F-CB71-4DFE-B0BD-88519F411C2F"; + string resourceGroupName = "rgopenapi"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this WeightsAndBiasesInstanceResource + WeightsAndBiasesInstanceCollection collection = resourceGroupResource.GetWeightsAndBiasesInstances(); + + // invoke the operation + string instancename = "myinstance"; + WeightsAndBiasesInstanceData data = new WeightsAndBiasesInstanceData(new AzureLocation("pudewmshbcvbt")) + { + Properties = new WeightsAndBiasesInstanceProperties(new WeightsAndBiasesMarketplaceDetails(new WeightsAndBiasesOfferDetails("kf", "rfgoevxeke", "ufopn") + { + PlanName = "adysakgqlryufffz", + TermUnit = "dgrkojow", + TermId = "kklscqq", + }) + { + SubscriptionId = "00000000-0000-0000-0000-000000000000", + }, new WeightsAndBiasesUserDetails + { + FirstName = "kiiehcojcldrlndoid", + LastName = "zhkvsfqvthwkfkvgxcruyud", + EmailAddress = "user@outlook.com", + Upn = "rmjpgqchpbw", + PhoneNumber = "cogmqmuwfcpstkwbzgkgo", + }) + { + PartnerProperties = new WeightsAndBiasesPartnerProperties(WeightsAndBiasesRegion.EastUS, "xkecokwnwtkwnkxfgucmzybzzb"), + SingleSignOnProperties = new WeightsAndBiasesSingleSignOnPropertiesV2(WeightsAndBiasesSingleSignOnType.Saml) + { + State = WeightsAndBiasesSingleSignOnState.Initial, + EnterpriseAppId = "hkxtmpv", + Uri = "iqlemoksqdygqyxpp", + AadDomains = { "mxnw" }, + }, + }, + Identity = new ManagedServiceIdentity("None") + { + UserAssignedIdentities = { }, + }, + Tags = { }, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, instancename, data); + WeightsAndBiasesInstanceResource 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 + WeightsAndBiasesInstanceData resourceData = result.Data; + // for 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_InstancesGetGeneratedByMaximumSetRule() + { + // Generated from example definition: 2024-09-18-preview/Instances_Get_MaximumSet_Gen.json + // this example is just showing the usage of "InstanceResource_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/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 = "0BCB047F-CB71-4DFE-B0BD-88519F411C2F"; + string resourceGroupName = "rgopenapi"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this WeightsAndBiasesInstanceResource + WeightsAndBiasesInstanceCollection collection = resourceGroupResource.GetWeightsAndBiasesInstances(); + + // invoke the operation + string instancename = "myinstance"; + WeightsAndBiasesInstanceResource result = await collection.GetAsync(instancename); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + WeightsAndBiasesInstanceData resourceData = result.Data; + // for 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_InstancesListByResourceGroupGeneratedByMaximumSetRule() + { + // Generated from example definition: 2024-09-18-preview/Instances_ListByResourceGroup_MaximumSet_Gen.json + // this example is just showing the usage of "InstanceResource_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 = "0BCB047F-CB71-4DFE-B0BD-88519F411C2F"; + string resourceGroupName = "rgopenapi"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this WeightsAndBiasesInstanceResource + WeightsAndBiasesInstanceCollection collection = resourceGroupResource.GetWeightsAndBiasesInstances(); + + // invoke the operation and iterate over the result + await foreach (WeightsAndBiasesInstanceResource 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 + WeightsAndBiasesInstanceData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetAll_InstancesListByResourceGroupGeneratedByMinimumSetRule() + { + // Generated from example definition: 2024-09-18-preview/Instances_ListByResourceGroup_MinimumSet_Gen.json + // this example is just showing the usage of "InstanceResource_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 = "0BCB047F-CB71-4DFE-B0BD-88519F411C2F"; + string resourceGroupName = "rgopenapi"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this WeightsAndBiasesInstanceResource + WeightsAndBiasesInstanceCollection collection = resourceGroupResource.GetWeightsAndBiasesInstances(); + + // invoke the operation and iterate over the result + await foreach (WeightsAndBiasesInstanceResource 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 + WeightsAndBiasesInstanceData 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_InstancesGetGeneratedByMaximumSetRule() + { + // Generated from example definition: 2024-09-18-preview/Instances_Get_MaximumSet_Gen.json + // this example is just showing the usage of "InstanceResource_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/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 = "0BCB047F-CB71-4DFE-B0BD-88519F411C2F"; + string resourceGroupName = "rgopenapi"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this WeightsAndBiasesInstanceResource + WeightsAndBiasesInstanceCollection collection = resourceGroupResource.GetWeightsAndBiasesInstances(); + + // invoke the operation + string instancename = "myinstance"; + bool result = await collection.ExistsAsync(instancename); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetIfExists_InstancesGetGeneratedByMaximumSetRule() + { + // Generated from example definition: 2024-09-18-preview/Instances_Get_MaximumSet_Gen.json + // this example is just showing the usage of "InstanceResource_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/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 = "0BCB047F-CB71-4DFE-B0BD-88519F411C2F"; + string resourceGroupName = "rgopenapi"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this WeightsAndBiasesInstanceResource + WeightsAndBiasesInstanceCollection collection = resourceGroupResource.GetWeightsAndBiasesInstances(); + + // invoke the operation + string instancename = "myinstance"; + NullableResponse response = await collection.GetIfExistsAsync(instancename); + WeightsAndBiasesInstanceResource 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 + WeightsAndBiasesInstanceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + } +} diff --git a/sdk/liftrweightsandbiases/Azure.ResourceManager.WeightsAndBiases/samples/Generated/Samples/Sample_WeightsAndBiasesInstanceResource.cs b/sdk/liftrweightsandbiases/Azure.ResourceManager.WeightsAndBiases/samples/Generated/Samples/Sample_WeightsAndBiasesInstanceResource.cs new file mode 100644 index 000000000000..b042a907b59b --- /dev/null +++ b/sdk/liftrweightsandbiases/Azure.ResourceManager.WeightsAndBiases/samples/Generated/Samples/Sample_WeightsAndBiasesInstanceResource.cs @@ -0,0 +1,114 @@ +// 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.Models; +using Azure.ResourceManager.WeightsAndBiases.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.WeightsAndBiases.Samples +{ + public partial class Sample_WeightsAndBiasesInstanceResource + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_InstancesGetGeneratedByMaximumSetRule() + { + // Generated from example definition: 2024-09-18-preview/Instances_Get_MaximumSet_Gen.json + // this example is just showing the usage of "InstanceResource_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this WeightsAndBiasesInstanceResource created on azure + // for more information of creating WeightsAndBiasesInstanceResource, please refer to the document of WeightsAndBiasesInstanceResource + string subscriptionId = "0BCB047F-CB71-4DFE-B0BD-88519F411C2F"; + string resourceGroupName = "rgopenapi"; + string instancename = "myinstance"; + ResourceIdentifier weightsAndBiasesInstanceResourceId = WeightsAndBiasesInstanceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, instancename); + WeightsAndBiasesInstanceResource weightsAndBiasesInstance = client.GetWeightsAndBiasesInstanceResource(weightsAndBiasesInstanceResourceId); + + // invoke the operation + WeightsAndBiasesInstanceResource result = await weightsAndBiasesInstance.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 + WeightsAndBiasesInstanceData resourceData = result.Data; + // for 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_InstancesDeleteGeneratedByMaximumSetRule() + { + // Generated from example definition: 2024-09-18-preview/Instances_Delete_MaximumSet_Gen.json + // this example is just showing the usage of "InstanceResource_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 WeightsAndBiasesInstanceResource created on azure + // for more information of creating WeightsAndBiasesInstanceResource, please refer to the document of WeightsAndBiasesInstanceResource + string subscriptionId = "0BCB047F-CB71-4DFE-B0BD-88519F411C2F"; + string resourceGroupName = "rgopenapi"; + string instancename = "myinstance"; + ResourceIdentifier weightsAndBiasesInstanceResourceId = WeightsAndBiasesInstanceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, instancename); + WeightsAndBiasesInstanceResource weightsAndBiasesInstance = client.GetWeightsAndBiasesInstanceResource(weightsAndBiasesInstanceResourceId); + + // invoke the operation + await weightsAndBiasesInstance.DeleteAsync(WaitUntil.Completed); + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Update_InstancesUpdateGeneratedByMaximumSetRule() + { + // Generated from example definition: 2024-09-18-preview/Instances_Update_MaximumSet_Gen.json + // this example is just showing the usage of "InstanceResource_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 WeightsAndBiasesInstanceResource created on azure + // for more information of creating WeightsAndBiasesInstanceResource, please refer to the document of WeightsAndBiasesInstanceResource + string subscriptionId = "0BCB047F-CB71-4DFE-B0BD-88519F411C2F"; + string resourceGroupName = "rgopenapi"; + string instancename = "myinstance"; + ResourceIdentifier weightsAndBiasesInstanceResourceId = WeightsAndBiasesInstanceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, instancename); + WeightsAndBiasesInstanceResource weightsAndBiasesInstance = client.GetWeightsAndBiasesInstanceResource(weightsAndBiasesInstanceResourceId); + + // invoke the operation + WeightsAndBiasesInstancePatch patch = new WeightsAndBiasesInstancePatch + { + Tags = { }, + Identity = new ManagedServiceIdentity("None") + { + UserAssignedIdentities = { }, + }, + }; + WeightsAndBiasesInstanceResource result = await weightsAndBiasesInstance.UpdateAsync(patch); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + WeightsAndBiasesInstanceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/liftrweightsandbiases/Azure.ResourceManager.WeightsAndBiases/src/Azure.ResourceManager.WeightsAndBiases.csproj b/sdk/liftrweightsandbiases/Azure.ResourceManager.WeightsAndBiases/src/Azure.ResourceManager.WeightsAndBiases.csproj new file mode 100644 index 000000000000..7f7fdadd602b --- /dev/null +++ b/sdk/liftrweightsandbiases/Azure.ResourceManager.WeightsAndBiases/src/Azure.ResourceManager.WeightsAndBiases.csproj @@ -0,0 +1,8 @@ + + + Azure Resource Manager client SDK for Azure resource provider WeightsAndBiases. + 1.0.0-beta.1 + azure;management;arm;resource manager;weightsandbiases + Azure.ResourceManager.WeightsAndBiases + + diff --git a/sdk/liftrweightsandbiases/Azure.ResourceManager.WeightsAndBiases/src/Generated/ArmWeightsAndBiasesModelFactory.cs b/sdk/liftrweightsandbiases/Azure.ResourceManager.WeightsAndBiases/src/Generated/ArmWeightsAndBiasesModelFactory.cs new file mode 100644 index 000000000000..d885eea58108 --- /dev/null +++ b/sdk/liftrweightsandbiases/Azure.ResourceManager.WeightsAndBiases/src/Generated/ArmWeightsAndBiasesModelFactory.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; +using System.Linq; +using Azure.Core; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.WeightsAndBiases.Models +{ + /// Model factory for models. + public static partial class ArmWeightsAndBiasesModelFactory + { + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// The resource-specific properties for this resource. + /// The managed service identities assigned to this resource. + /// A new instance for mocking. + public static WeightsAndBiasesInstanceData WeightsAndBiasesInstanceData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, WeightsAndBiasesInstanceProperties properties = null, ManagedServiceIdentity identity = null) + { + tags ??= new Dictionary(); + + return new WeightsAndBiasesInstanceData( + id, + name, + resourceType, + systemData, + tags, + location, + properties, + identity, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Marketplace details of the resource. + /// Details of the user. + /// Provisioning state of the resource. + /// partner properties. + /// Single sign-on properties. + /// A new instance for mocking. + public static WeightsAndBiasesInstanceProperties WeightsAndBiasesInstanceProperties(WeightsAndBiasesMarketplaceDetails marketplace = null, WeightsAndBiasesUserDetails user = null, WeightsAndBiasesProvisioningState? provisioningState = null, WeightsAndBiasesPartnerProperties partnerProperties = null, WeightsAndBiasesSingleSignOnPropertiesV2 singleSignOnProperties = null) + { + return new WeightsAndBiasesInstanceProperties( + marketplace, + user, + provisioningState, + partnerProperties, + singleSignOnProperties, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Azure subscription id for the the marketplace offer is purchased from. + /// Marketplace subscription status. + /// Offer details for the marketplace that is selected by the user. + /// A new instance for mocking. + public static WeightsAndBiasesMarketplaceDetails WeightsAndBiasesMarketplaceDetails(string subscriptionId = null, WeightsAndBiasesMarketplaceSubscriptionStatus? subscriptionStatus = null, WeightsAndBiasesOfferDetails offerDetails = null) + { + return new WeightsAndBiasesMarketplaceDetails(subscriptionId, subscriptionStatus, offerDetails, serializedAdditionalRawData: null); + } + } +} diff --git a/sdk/liftrweightsandbiases/Azure.ResourceManager.WeightsAndBiases/src/Generated/Extensions/MockableWeightsAndBiasesArmClient.cs b/sdk/liftrweightsandbiases/Azure.ResourceManager.WeightsAndBiases/src/Generated/Extensions/MockableWeightsAndBiasesArmClient.cs new file mode 100644 index 000000000000..dacf602e3c00 --- /dev/null +++ b/sdk/liftrweightsandbiases/Azure.ResourceManager.WeightsAndBiases/src/Generated/Extensions/MockableWeightsAndBiasesArmClient.cs @@ -0,0 +1,49 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using Azure.Core; + +namespace Azure.ResourceManager.WeightsAndBiases.Mocking +{ + /// A class to add extension methods to ArmClient. + public partial class MockableWeightsAndBiasesArmClient : ArmResource + { + /// Initializes a new instance of the class for mocking. + protected MockableWeightsAndBiasesArmClient() + { + } + + /// 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 MockableWeightsAndBiasesArmClient(ArmClient client, ResourceIdentifier id) : base(client, id) + { + } + + internal MockableWeightsAndBiasesArmClient(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 WeightsAndBiasesInstanceResource GetWeightsAndBiasesInstanceResource(ResourceIdentifier id) + { + WeightsAndBiasesInstanceResource.ValidateResourceId(id); + return new WeightsAndBiasesInstanceResource(Client, id); + } + } +} diff --git a/sdk/liftrweightsandbiases/Azure.ResourceManager.WeightsAndBiases/src/Generated/Extensions/MockableWeightsAndBiasesResourceGroupResource.cs b/sdk/liftrweightsandbiases/Azure.ResourceManager.WeightsAndBiases/src/Generated/Extensions/MockableWeightsAndBiasesResourceGroupResource.cs new file mode 100644 index 000000000000..f219ed38ff4d --- /dev/null +++ b/sdk/liftrweightsandbiases/Azure.ResourceManager.WeightsAndBiases/src/Generated/Extensions/MockableWeightsAndBiasesResourceGroupResource.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.WeightsAndBiases.Mocking +{ + /// A class to add extension methods to ResourceGroupResource. + public partial class MockableWeightsAndBiasesResourceGroupResource : ArmResource + { + /// Initializes a new instance of the class for mocking. + protected MockableWeightsAndBiasesResourceGroupResource() + { + } + + /// 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 MockableWeightsAndBiasesResourceGroupResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + } + + private string GetApiVersionOrNull(ResourceType resourceType) + { + TryGetApiVersion(resourceType, out string apiVersion); + return apiVersion; + } + + /// Gets a collection of WeightsAndBiasesInstanceResources in the ResourceGroupResource. + /// An object representing collection of WeightsAndBiasesInstanceResources and their operations over a WeightsAndBiasesInstanceResource. + public virtual WeightsAndBiasesInstanceCollection GetWeightsAndBiasesInstances() + { + return GetCachedClient(client => new WeightsAndBiasesInstanceCollection(client, Id)); + } + + /// + /// Get a InstanceResource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.WeightsAndBiases/instances/{instancename} + /// + /// + /// Operation Id + /// InstanceResource_Get + /// + /// + /// Default Api Version + /// 2024-09-18-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the Instance resource. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetWeightsAndBiasesInstanceAsync(string instancename, CancellationToken cancellationToken = default) + { + return await GetWeightsAndBiasesInstances().GetAsync(instancename, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get a InstanceResource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.WeightsAndBiases/instances/{instancename} + /// + /// + /// Operation Id + /// InstanceResource_Get + /// + /// + /// Default Api Version + /// 2024-09-18-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the Instance resource. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetWeightsAndBiasesInstance(string instancename, CancellationToken cancellationToken = default) + { + return GetWeightsAndBiasesInstances().Get(instancename, cancellationToken); + } + } +} diff --git a/sdk/liftrweightsandbiases/Azure.ResourceManager.WeightsAndBiases/src/Generated/Extensions/MockableWeightsAndBiasesSubscriptionResource.cs b/sdk/liftrweightsandbiases/Azure.ResourceManager.WeightsAndBiases/src/Generated/Extensions/MockableWeightsAndBiasesSubscriptionResource.cs new file mode 100644 index 000000000000..5655326a6efb --- /dev/null +++ b/sdk/liftrweightsandbiases/Azure.ResourceManager.WeightsAndBiases/src/Generated/Extensions/MockableWeightsAndBiasesSubscriptionResource.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.WeightsAndBiases.Mocking +{ + /// A class to add extension methods to SubscriptionResource. + public partial class MockableWeightsAndBiasesSubscriptionResource : ArmResource + { + private ClientDiagnostics _weightsAndBiasesInstanceInstancesClientDiagnostics; + private InstancesRestOperations _weightsAndBiasesInstanceInstancesRestClient; + + /// Initializes a new instance of the class for mocking. + protected MockableWeightsAndBiasesSubscriptionResource() + { + } + + /// 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 MockableWeightsAndBiasesSubscriptionResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + } + + private ClientDiagnostics WeightsAndBiasesInstanceInstancesClientDiagnostics => _weightsAndBiasesInstanceInstancesClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.WeightsAndBiases", WeightsAndBiasesInstanceResource.ResourceType.Namespace, Diagnostics); + private InstancesRestOperations WeightsAndBiasesInstanceInstancesRestClient => _weightsAndBiasesInstanceInstancesRestClient ??= new InstancesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, GetApiVersionOrNull(WeightsAndBiasesInstanceResource.ResourceType)); + + private string GetApiVersionOrNull(ResourceType resourceType) + { + TryGetApiVersion(resourceType, out string apiVersion); + return apiVersion; + } + + /// + /// List InstanceResource resources by subscription ID + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.WeightsAndBiases/instances + /// + /// + /// Operation Id + /// InstanceResource_ListBySubscription + /// + /// + /// Default Api Version + /// 2024-09-18-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetWeightsAndBiasesInstancesAsync(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => WeightsAndBiasesInstanceInstancesRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => WeightsAndBiasesInstanceInstancesRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new WeightsAndBiasesInstanceResource(Client, WeightsAndBiasesInstanceData.DeserializeWeightsAndBiasesInstanceData(e)), WeightsAndBiasesInstanceInstancesClientDiagnostics, Pipeline, "MockableWeightsAndBiasesSubscriptionResource.GetWeightsAndBiasesInstances", "value", "nextLink", cancellationToken); + } + + /// + /// List InstanceResource resources by subscription ID + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.WeightsAndBiases/instances + /// + /// + /// Operation Id + /// InstanceResource_ListBySubscription + /// + /// + /// Default Api Version + /// 2024-09-18-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetWeightsAndBiasesInstances(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => WeightsAndBiasesInstanceInstancesRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => WeightsAndBiasesInstanceInstancesRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new WeightsAndBiasesInstanceResource(Client, WeightsAndBiasesInstanceData.DeserializeWeightsAndBiasesInstanceData(e)), WeightsAndBiasesInstanceInstancesClientDiagnostics, Pipeline, "MockableWeightsAndBiasesSubscriptionResource.GetWeightsAndBiasesInstances", "value", "nextLink", cancellationToken); + } + } +} diff --git a/sdk/liftrweightsandbiases/Azure.ResourceManager.WeightsAndBiases/src/Generated/Extensions/WeightsAndBiasesExtensions.cs b/sdk/liftrweightsandbiases/Azure.ResourceManager.WeightsAndBiases/src/Generated/Extensions/WeightsAndBiasesExtensions.cs new file mode 100644 index 000000000000..66bc45f7262b --- /dev/null +++ b/sdk/liftrweightsandbiases/Azure.ResourceManager.WeightsAndBiases/src/Generated/Extensions/WeightsAndBiasesExtensions.cs @@ -0,0 +1,219 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.ResourceManager.Resources; +using Azure.ResourceManager.WeightsAndBiases.Mocking; + +namespace Azure.ResourceManager.WeightsAndBiases +{ + /// A class to add extension methods to Azure.ResourceManager.WeightsAndBiases. + public static partial class WeightsAndBiasesExtensions + { + private static MockableWeightsAndBiasesArmClient GetMockableWeightsAndBiasesArmClient(ArmClient client) + { + return client.GetCachedClient(client0 => new MockableWeightsAndBiasesArmClient(client0)); + } + + private static MockableWeightsAndBiasesResourceGroupResource GetMockableWeightsAndBiasesResourceGroupResource(ArmResource resource) + { + return resource.GetCachedClient(client => new MockableWeightsAndBiasesResourceGroupResource(client, resource.Id)); + } + + private static MockableWeightsAndBiasesSubscriptionResource GetMockableWeightsAndBiasesSubscriptionResource(ArmResource resource) + { + return resource.GetCachedClient(client => new MockableWeightsAndBiasesSubscriptionResource(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 WeightsAndBiasesInstanceResource GetWeightsAndBiasesInstanceResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableWeightsAndBiasesArmClient(client).GetWeightsAndBiasesInstanceResource(id); + } + + /// + /// Gets a collection of WeightsAndBiasesInstanceResources 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 WeightsAndBiasesInstanceResources and their operations over a WeightsAndBiasesInstanceResource. + public static WeightsAndBiasesInstanceCollection GetWeightsAndBiasesInstances(this ResourceGroupResource resourceGroupResource) + { + Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); + + return GetMockableWeightsAndBiasesResourceGroupResource(resourceGroupResource).GetWeightsAndBiasesInstances(); + } + + /// + /// Get a InstanceResource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.WeightsAndBiases/instances/{instancename} + /// + /// + /// Operation Id + /// InstanceResource_Get + /// + /// + /// Default Api Version + /// 2024-09-18-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// Name of the Instance resource. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public static async Task> GetWeightsAndBiasesInstanceAsync(this ResourceGroupResource resourceGroupResource, string instancename, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); + + return await GetMockableWeightsAndBiasesResourceGroupResource(resourceGroupResource).GetWeightsAndBiasesInstanceAsync(instancename, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get a InstanceResource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.WeightsAndBiases/instances/{instancename} + /// + /// + /// Operation Id + /// InstanceResource_Get + /// + /// + /// Default Api Version + /// 2024-09-18-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// Name of the Instance resource. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public static Response GetWeightsAndBiasesInstance(this ResourceGroupResource resourceGroupResource, string instancename, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); + + return GetMockableWeightsAndBiasesResourceGroupResource(resourceGroupResource).GetWeightsAndBiasesInstance(instancename, cancellationToken); + } + + /// + /// List InstanceResource resources by subscription ID + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.WeightsAndBiases/instances + /// + /// + /// Operation Id + /// InstanceResource_ListBySubscription + /// + /// + /// Default Api Version + /// 2024-09-18-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 GetWeightsAndBiasesInstancesAsync(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); + + return GetMockableWeightsAndBiasesSubscriptionResource(subscriptionResource).GetWeightsAndBiasesInstancesAsync(cancellationToken); + } + + /// + /// List InstanceResource resources by subscription ID + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.WeightsAndBiases/instances + /// + /// + /// Operation Id + /// InstanceResource_ListBySubscription + /// + /// + /// Default Api Version + /// 2024-09-18-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 GetWeightsAndBiasesInstances(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); + + return GetMockableWeightsAndBiasesSubscriptionResource(subscriptionResource).GetWeightsAndBiasesInstances(cancellationToken); + } + } +} diff --git a/sdk/liftrweightsandbiases/Azure.ResourceManager.WeightsAndBiases/src/Generated/Internal/Argument.cs b/sdk/liftrweightsandbiases/Azure.ResourceManager.WeightsAndBiases/src/Generated/Internal/Argument.cs new file mode 100644 index 000000000000..ce835a8c9269 --- /dev/null +++ b/sdk/liftrweightsandbiases/Azure.ResourceManager.WeightsAndBiases/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.WeightsAndBiases +{ + 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/liftrweightsandbiases/Azure.ResourceManager.WeightsAndBiases/src/Generated/Internal/ChangeTrackingDictionary.cs b/sdk/liftrweightsandbiases/Azure.ResourceManager.WeightsAndBiases/src/Generated/Internal/ChangeTrackingDictionary.cs new file mode 100644 index 000000000000..8147dc8d1659 --- /dev/null +++ b/sdk/liftrweightsandbiases/Azure.ResourceManager.WeightsAndBiases/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.WeightsAndBiases +{ + 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/liftrweightsandbiases/Azure.ResourceManager.WeightsAndBiases/src/Generated/Internal/ChangeTrackingList.cs b/sdk/liftrweightsandbiases/Azure.ResourceManager.WeightsAndBiases/src/Generated/Internal/ChangeTrackingList.cs new file mode 100644 index 000000000000..29a87aebba3c --- /dev/null +++ b/sdk/liftrweightsandbiases/Azure.ResourceManager.WeightsAndBiases/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.WeightsAndBiases +{ + 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/liftrweightsandbiases/Azure.ResourceManager.WeightsAndBiases/src/Generated/Internal/ModelSerializationExtensions.cs b/sdk/liftrweightsandbiases/Azure.ResourceManager.WeightsAndBiases/src/Generated/Internal/ModelSerializationExtensions.cs new file mode 100644 index 000000000000..ca1c0c0f6c7a --- /dev/null +++ b/sdk/liftrweightsandbiases/Azure.ResourceManager.WeightsAndBiases/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.WeightsAndBiases +{ + 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/liftrweightsandbiases/Azure.ResourceManager.WeightsAndBiases/src/Generated/Internal/Optional.cs b/sdk/liftrweightsandbiases/Azure.ResourceManager.WeightsAndBiases/src/Generated/Internal/Optional.cs new file mode 100644 index 000000000000..2c2ad2707968 --- /dev/null +++ b/sdk/liftrweightsandbiases/Azure.ResourceManager.WeightsAndBiases/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.WeightsAndBiases +{ + 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/liftrweightsandbiases/Azure.ResourceManager.WeightsAndBiases/src/Generated/Internal/Utf8JsonRequestContent.cs b/sdk/liftrweightsandbiases/Azure.ResourceManager.WeightsAndBiases/src/Generated/Internal/Utf8JsonRequestContent.cs new file mode 100644 index 000000000000..56eb460d99a9 --- /dev/null +++ b/sdk/liftrweightsandbiases/Azure.ResourceManager.WeightsAndBiases/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.WeightsAndBiases +{ + 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/liftrweightsandbiases/Azure.ResourceManager.WeightsAndBiases/src/Generated/LongRunningOperation/WeightsAndBiasesArmOperation.cs b/sdk/liftrweightsandbiases/Azure.ResourceManager.WeightsAndBiases/src/Generated/LongRunningOperation/WeightsAndBiasesArmOperation.cs new file mode 100644 index 000000000000..f5e3693d5bbe --- /dev/null +++ b/sdk/liftrweightsandbiases/Azure.ResourceManager.WeightsAndBiases/src/Generated/LongRunningOperation/WeightsAndBiasesArmOperation.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.WeightsAndBiases +{ +#pragma warning disable SA1649 // File name should match first type name + internal class WeightsAndBiasesArmOperation : 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 WeightsAndBiasesArmOperation for mocking. + protected WeightsAndBiasesArmOperation() + { + } + + internal WeightsAndBiasesArmOperation(Response response, RehydrationToken? rehydrationToken = null) + { + _operation = OperationInternal.Succeeded(response); + _completeRehydrationToken = rehydrationToken; + _operationId = GetOperationId(rehydrationToken); + } + + internal WeightsAndBiasesArmOperation(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, "WeightsAndBiasesArmOperation", 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/liftrweightsandbiases/Azure.ResourceManager.WeightsAndBiases/src/Generated/LongRunningOperation/WeightsAndBiasesArmOperationOfT.cs b/sdk/liftrweightsandbiases/Azure.ResourceManager.WeightsAndBiases/src/Generated/LongRunningOperation/WeightsAndBiasesArmOperationOfT.cs new file mode 100644 index 000000000000..e50d102f5766 --- /dev/null +++ b/sdk/liftrweightsandbiases/Azure.ResourceManager.WeightsAndBiases/src/Generated/LongRunningOperation/WeightsAndBiasesArmOperationOfT.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.WeightsAndBiases +{ +#pragma warning disable SA1649 // File name should match first type name + internal class WeightsAndBiasesArmOperation : 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 WeightsAndBiasesArmOperation for mocking. + protected WeightsAndBiasesArmOperation() + { + } + + internal WeightsAndBiasesArmOperation(Response response, RehydrationToken? rehydrationToken = null) + { + _operation = OperationInternal.Succeeded(response.GetRawResponse(), response.Value); + _completeRehydrationToken = rehydrationToken; + _operationId = GetOperationId(rehydrationToken); + } + + internal WeightsAndBiasesArmOperation(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, "WeightsAndBiasesArmOperation", 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/liftrweightsandbiases/Azure.ResourceManager.WeightsAndBiases/src/Generated/LongRunningOperation/WeightsAndBiasesInstanceOperationSource.cs b/sdk/liftrweightsandbiases/Azure.ResourceManager.WeightsAndBiases/src/Generated/LongRunningOperation/WeightsAndBiasesInstanceOperationSource.cs new file mode 100644 index 000000000000..bbe978bc4b4a --- /dev/null +++ b/sdk/liftrweightsandbiases/Azure.ResourceManager.WeightsAndBiases/src/Generated/LongRunningOperation/WeightsAndBiasesInstanceOperationSource.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.WeightsAndBiases +{ + internal class WeightsAndBiasesInstanceOperationSource : IOperationSource + { + private readonly ArmClient _client; + + internal WeightsAndBiasesInstanceOperationSource(ArmClient client) + { + _client = client; + } + + WeightsAndBiasesInstanceResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + var data = ModelReaderWriter.Read(response.Content); + return new WeightsAndBiasesInstanceResource(_client, data); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + var data = ModelReaderWriter.Read(response.Content); + return await Task.FromResult(new WeightsAndBiasesInstanceResource(_client, data)).ConfigureAwait(false); + } + } +} diff --git a/sdk/liftrweightsandbiases/Azure.ResourceManager.WeightsAndBiases/src/Generated/Models/InstanceResourceListResult.Serialization.cs b/sdk/liftrweightsandbiases/Azure.ResourceManager.WeightsAndBiases/src/Generated/Models/InstanceResourceListResult.Serialization.cs new file mode 100644 index 000000000000..cbe13febdb48 --- /dev/null +++ b/sdk/liftrweightsandbiases/Azure.ResourceManager.WeightsAndBiases/src/Generated/Models/InstanceResourceListResult.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.WeightsAndBiases.Models +{ + internal partial class InstanceResourceListResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(InstanceResourceListResult)} 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 + } + } + } + + InstanceResourceListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(InstanceResourceListResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeInstanceResourceListResult(document.RootElement, options); + } + + internal static InstanceResourceListResult DeserializeInstanceResourceListResult(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(WeightsAndBiasesInstanceData.DeserializeWeightsAndBiasesInstanceData(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 InstanceResourceListResult(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(InstanceResourceListResult)} does not support writing '{options.Format}' format."); + } + } + + InstanceResourceListResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeInstanceResourceListResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(InstanceResourceListResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/liftrweightsandbiases/Azure.ResourceManager.WeightsAndBiases/src/Generated/Models/InstanceResourceListResult.cs b/sdk/liftrweightsandbiases/Azure.ResourceManager.WeightsAndBiases/src/Generated/Models/InstanceResourceListResult.cs new file mode 100644 index 000000000000..6b97571fa0db --- /dev/null +++ b/sdk/liftrweightsandbiases/Azure.ResourceManager.WeightsAndBiases/src/Generated/Models/InstanceResourceListResult.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.WeightsAndBiases.Models +{ + /// The response of a InstanceResource list operation. + internal partial class InstanceResourceListResult + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// 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 InstanceResource items on this page. + /// is null. + internal InstanceResourceListResult(IEnumerable value) + { + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); + } + + /// Initializes a new instance of . + /// The InstanceResource items on this page. + /// The link to the next page of items. + /// Keeps track of any properties unknown to the library. + internal InstanceResourceListResult(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) + { + Value = value; + NextLink = nextLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal InstanceResourceListResult() + { + } + + /// The InstanceResource items on this page. + public IReadOnlyList Value { get; } + /// The link to the next page of items. + public Uri NextLink { get; } + } +} diff --git a/sdk/liftrweightsandbiases/Azure.ResourceManager.WeightsAndBiases/src/Generated/Models/WeightsAndBiasesInstancePatch.Serialization.cs b/sdk/liftrweightsandbiases/Azure.ResourceManager.WeightsAndBiases/src/Generated/Models/WeightsAndBiasesInstancePatch.Serialization.cs new file mode 100644 index 000000000000..c940f61d7a13 --- /dev/null +++ b/sdk/liftrweightsandbiases/Azure.ResourceManager.WeightsAndBiases/src/Generated/Models/WeightsAndBiasesInstancePatch.Serialization.cs @@ -0,0 +1,162 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.WeightsAndBiases.Models +{ + public partial class WeightsAndBiasesInstancePatch : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(WeightsAndBiasesInstancePatch)} does not support writing '{format}' format."); + } + + if (Optional.IsCollectionDefined(Tags)) + { + writer.WritePropertyName("tags"u8); + writer.WriteStartObject(); + foreach (var item in Tags) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + if (Optional.IsDefined(Identity)) + { + writer.WritePropertyName("identity"u8); + var serializeOptions = new JsonSerializerOptions { Converters = { new ManagedServiceIdentityTypeV3Converter() } }; + JsonSerializer.Serialize(writer, Identity, serializeOptions); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + WeightsAndBiasesInstancePatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(WeightsAndBiasesInstancePatch)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeWeightsAndBiasesInstancePatch(document.RootElement, options); + } + + internal static WeightsAndBiasesInstancePatch DeserializeWeightsAndBiasesInstancePatch(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IDictionary tags = default; + ManagedServiceIdentity identity = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("tags"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + tags = dictionary; + continue; + } + if (property.NameEquals("identity"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + var serializeOptions = new JsonSerializerOptions { Converters = { new ManagedServiceIdentityTypeV3Converter() } }; + identity = JsonSerializer.Deserialize(property.Value.GetRawText(), serializeOptions); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new WeightsAndBiasesInstancePatch(tags ?? new ChangeTrackingDictionary(), identity, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(WeightsAndBiasesInstancePatch)} does not support writing '{options.Format}' format."); + } + } + + WeightsAndBiasesInstancePatch IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeWeightsAndBiasesInstancePatch(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(WeightsAndBiasesInstancePatch)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/liftrweightsandbiases/Azure.ResourceManager.WeightsAndBiases/src/Generated/Models/WeightsAndBiasesInstancePatch.cs b/sdk/liftrweightsandbiases/Azure.ResourceManager.WeightsAndBiases/src/Generated/Models/WeightsAndBiasesInstancePatch.cs new file mode 100644 index 000000000000..0a7255175d4c --- /dev/null +++ b/sdk/liftrweightsandbiases/Azure.ResourceManager.WeightsAndBiases/src/Generated/Models/WeightsAndBiasesInstancePatch.cs @@ -0,0 +1,71 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.WeightsAndBiases.Models +{ + /// The type used for update operations of the Instance Resource. + public partial class WeightsAndBiasesInstancePatch + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public WeightsAndBiasesInstancePatch() + { + Tags = new ChangeTrackingDictionary(); + } + + /// Initializes a new instance of . + /// Resource tags. + /// The managed service identities assigned to this resource. + /// Keeps track of any properties unknown to the library. + internal WeightsAndBiasesInstancePatch(IDictionary tags, ManagedServiceIdentity identity, IDictionary serializedAdditionalRawData) + { + Tags = tags; + Identity = identity; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Resource tags. + public IDictionary Tags { get; } + /// The managed service identities assigned to this resource. + public ManagedServiceIdentity Identity { get; set; } + } +} diff --git a/sdk/liftrweightsandbiases/Azure.ResourceManager.WeightsAndBiases/src/Generated/Models/WeightsAndBiasesInstanceProperties.Serialization.cs b/sdk/liftrweightsandbiases/Azure.ResourceManager.WeightsAndBiases/src/Generated/Models/WeightsAndBiasesInstanceProperties.Serialization.cs new file mode 100644 index 000000000000..71db48c888dc --- /dev/null +++ b/sdk/liftrweightsandbiases/Azure.ResourceManager.WeightsAndBiases/src/Generated/Models/WeightsAndBiasesInstanceProperties.Serialization.cs @@ -0,0 +1,185 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.WeightsAndBiases.Models +{ + public partial class WeightsAndBiasesInstanceProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(WeightsAndBiasesInstanceProperties)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("marketplace"u8); + writer.WriteObjectValue(Marketplace, options); + writer.WritePropertyName("user"u8); + writer.WriteObjectValue(User, options); + if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) + { + writer.WritePropertyName("provisioningState"u8); + writer.WriteStringValue(ProvisioningState.Value.ToString()); + } + if (Optional.IsDefined(PartnerProperties)) + { + writer.WritePropertyName("partnerProperties"u8); + writer.WriteObjectValue(PartnerProperties, options); + } + if (Optional.IsDefined(SingleSignOnProperties)) + { + writer.WritePropertyName("singleSignOnProperties"u8); + writer.WriteObjectValue(SingleSignOnProperties, 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 + } + } + } + + WeightsAndBiasesInstanceProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(WeightsAndBiasesInstanceProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeWeightsAndBiasesInstanceProperties(document.RootElement, options); + } + + internal static WeightsAndBiasesInstanceProperties DeserializeWeightsAndBiasesInstanceProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + WeightsAndBiasesMarketplaceDetails marketplace = default; + WeightsAndBiasesUserDetails user = default; + WeightsAndBiasesProvisioningState? provisioningState = default; + WeightsAndBiasesPartnerProperties partnerProperties = default; + WeightsAndBiasesSingleSignOnPropertiesV2 singleSignOnProperties = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("marketplace"u8)) + { + marketplace = WeightsAndBiasesMarketplaceDetails.DeserializeWeightsAndBiasesMarketplaceDetails(property.Value, options); + continue; + } + if (property.NameEquals("user"u8)) + { + user = WeightsAndBiasesUserDetails.DeserializeWeightsAndBiasesUserDetails(property.Value, options); + continue; + } + if (property.NameEquals("provisioningState"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + provisioningState = new WeightsAndBiasesProvisioningState(property.Value.GetString()); + continue; + } + if (property.NameEquals("partnerProperties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + partnerProperties = WeightsAndBiasesPartnerProperties.DeserializeWeightsAndBiasesPartnerProperties(property.Value, options); + continue; + } + if (property.NameEquals("singleSignOnProperties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + singleSignOnProperties = WeightsAndBiasesSingleSignOnPropertiesV2.DeserializeWeightsAndBiasesSingleSignOnPropertiesV2(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new WeightsAndBiasesInstanceProperties( + marketplace, + user, + provisioningState, + partnerProperties, + singleSignOnProperties, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(WeightsAndBiasesInstanceProperties)} does not support writing '{options.Format}' format."); + } + } + + WeightsAndBiasesInstanceProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeWeightsAndBiasesInstanceProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(WeightsAndBiasesInstanceProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/liftrweightsandbiases/Azure.ResourceManager.WeightsAndBiases/src/Generated/Models/WeightsAndBiasesInstanceProperties.cs b/sdk/liftrweightsandbiases/Azure.ResourceManager.WeightsAndBiases/src/Generated/Models/WeightsAndBiasesInstanceProperties.cs new file mode 100644 index 000000000000..90208d259ba6 --- /dev/null +++ b/sdk/liftrweightsandbiases/Azure.ResourceManager.WeightsAndBiases/src/Generated/Models/WeightsAndBiasesInstanceProperties.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.WeightsAndBiases.Models +{ + /// Properties specific to Instance. + public partial class WeightsAndBiasesInstanceProperties + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Marketplace details of the resource. + /// Details of the user. + /// or is null. + public WeightsAndBiasesInstanceProperties(WeightsAndBiasesMarketplaceDetails marketplace, WeightsAndBiasesUserDetails user) + { + Argument.AssertNotNull(marketplace, nameof(marketplace)); + Argument.AssertNotNull(user, nameof(user)); + + Marketplace = marketplace; + User = user; + } + + /// Initializes a new instance of . + /// Marketplace details of the resource. + /// Details of the user. + /// Provisioning state of the resource. + /// partner properties. + /// Single sign-on properties. + /// Keeps track of any properties unknown to the library. + internal WeightsAndBiasesInstanceProperties(WeightsAndBiasesMarketplaceDetails marketplace, WeightsAndBiasesUserDetails user, WeightsAndBiasesProvisioningState? provisioningState, WeightsAndBiasesPartnerProperties partnerProperties, WeightsAndBiasesSingleSignOnPropertiesV2 singleSignOnProperties, IDictionary serializedAdditionalRawData) + { + Marketplace = marketplace; + User = user; + ProvisioningState = provisioningState; + PartnerProperties = partnerProperties; + SingleSignOnProperties = singleSignOnProperties; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal WeightsAndBiasesInstanceProperties() + { + } + + /// Marketplace details of the resource. + public WeightsAndBiasesMarketplaceDetails Marketplace { get; set; } + /// Details of the user. + public WeightsAndBiasesUserDetails User { get; set; } + /// Provisioning state of the resource. + public WeightsAndBiasesProvisioningState? ProvisioningState { get; } + /// partner properties. + public WeightsAndBiasesPartnerProperties PartnerProperties { get; set; } + /// Single sign-on properties. + public WeightsAndBiasesSingleSignOnPropertiesV2 SingleSignOnProperties { get; set; } + } +} diff --git a/sdk/liftrweightsandbiases/Azure.ResourceManager.WeightsAndBiases/src/Generated/Models/WeightsAndBiasesMarketplaceDetails.Serialization.cs b/sdk/liftrweightsandbiases/Azure.ResourceManager.WeightsAndBiases/src/Generated/Models/WeightsAndBiasesMarketplaceDetails.Serialization.cs new file mode 100644 index 000000000000..e98bd2f855b4 --- /dev/null +++ b/sdk/liftrweightsandbiases/Azure.ResourceManager.WeightsAndBiases/src/Generated/Models/WeightsAndBiasesMarketplaceDetails.Serialization.cs @@ -0,0 +1,152 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.WeightsAndBiases.Models +{ + public partial class WeightsAndBiasesMarketplaceDetails : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(WeightsAndBiasesMarketplaceDetails)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(SubscriptionId)) + { + writer.WritePropertyName("subscriptionId"u8); + writer.WriteStringValue(SubscriptionId); + } + if (options.Format != "W" && Optional.IsDefined(SubscriptionStatus)) + { + writer.WritePropertyName("subscriptionStatus"u8); + writer.WriteStringValue(SubscriptionStatus.Value.ToString()); + } + writer.WritePropertyName("offerDetails"u8); + writer.WriteObjectValue(OfferDetails, 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 + } + } + } + + WeightsAndBiasesMarketplaceDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(WeightsAndBiasesMarketplaceDetails)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeWeightsAndBiasesMarketplaceDetails(document.RootElement, options); + } + + internal static WeightsAndBiasesMarketplaceDetails DeserializeWeightsAndBiasesMarketplaceDetails(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string subscriptionId = default; + WeightsAndBiasesMarketplaceSubscriptionStatus? subscriptionStatus = default; + WeightsAndBiasesOfferDetails offerDetails = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("subscriptionId"u8)) + { + subscriptionId = property.Value.GetString(); + continue; + } + if (property.NameEquals("subscriptionStatus"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + subscriptionStatus = new WeightsAndBiasesMarketplaceSubscriptionStatus(property.Value.GetString()); + continue; + } + if (property.NameEquals("offerDetails"u8)) + { + offerDetails = WeightsAndBiasesOfferDetails.DeserializeWeightsAndBiasesOfferDetails(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new WeightsAndBiasesMarketplaceDetails(subscriptionId, subscriptionStatus, offerDetails, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(WeightsAndBiasesMarketplaceDetails)} does not support writing '{options.Format}' format."); + } + } + + WeightsAndBiasesMarketplaceDetails IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeWeightsAndBiasesMarketplaceDetails(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(WeightsAndBiasesMarketplaceDetails)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/liftrweightsandbiases/Azure.ResourceManager.WeightsAndBiases/src/Generated/Models/WeightsAndBiasesMarketplaceDetails.cs b/sdk/liftrweightsandbiases/Azure.ResourceManager.WeightsAndBiases/src/Generated/Models/WeightsAndBiasesMarketplaceDetails.cs new file mode 100644 index 000000000000..23641edf4c2f --- /dev/null +++ b/sdk/liftrweightsandbiases/Azure.ResourceManager.WeightsAndBiases/src/Generated/Models/WeightsAndBiasesMarketplaceDetails.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.WeightsAndBiases.Models +{ + /// Marketplace details for an organization. + public partial class WeightsAndBiasesMarketplaceDetails + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Offer details for the marketplace that is selected by the user. + /// is null. + public WeightsAndBiasesMarketplaceDetails(WeightsAndBiasesOfferDetails offerDetails) + { + Argument.AssertNotNull(offerDetails, nameof(offerDetails)); + + OfferDetails = offerDetails; + } + + /// Initializes a new instance of . + /// Azure subscription id for the the marketplace offer is purchased from. + /// Marketplace subscription status. + /// Offer details for the marketplace that is selected by the user. + /// Keeps track of any properties unknown to the library. + internal WeightsAndBiasesMarketplaceDetails(string subscriptionId, WeightsAndBiasesMarketplaceSubscriptionStatus? subscriptionStatus, WeightsAndBiasesOfferDetails offerDetails, IDictionary serializedAdditionalRawData) + { + SubscriptionId = subscriptionId; + SubscriptionStatus = subscriptionStatus; + OfferDetails = offerDetails; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal WeightsAndBiasesMarketplaceDetails() + { + } + + /// Azure subscription id for the the marketplace offer is purchased from. + public string SubscriptionId { get; set; } + /// Marketplace subscription status. + public WeightsAndBiasesMarketplaceSubscriptionStatus? SubscriptionStatus { get; } + /// Offer details for the marketplace that is selected by the user. + public WeightsAndBiasesOfferDetails OfferDetails { get; set; } + } +} diff --git a/sdk/liftrweightsandbiases/Azure.ResourceManager.WeightsAndBiases/src/Generated/Models/WeightsAndBiasesMarketplaceSubscriptionStatus.cs b/sdk/liftrweightsandbiases/Azure.ResourceManager.WeightsAndBiases/src/Generated/Models/WeightsAndBiasesMarketplaceSubscriptionStatus.cs new file mode 100644 index 000000000000..e2a1b16e9b99 --- /dev/null +++ b/sdk/liftrweightsandbiases/Azure.ResourceManager.WeightsAndBiases/src/Generated/Models/WeightsAndBiasesMarketplaceSubscriptionStatus.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.WeightsAndBiases.Models +{ + /// Marketplace subscription status of a resource. + public readonly partial struct WeightsAndBiasesMarketplaceSubscriptionStatus : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public WeightsAndBiasesMarketplaceSubscriptionStatus(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string PendingFulfillmentStartValue = "PendingFulfillmentStart"; + private const string SubscribedValue = "Subscribed"; + private const string SuspendedValue = "Suspended"; + private const string UnsubscribedValue = "Unsubscribed"; + + /// Purchased but not yet activated. + public static WeightsAndBiasesMarketplaceSubscriptionStatus PendingFulfillmentStart { get; } = new WeightsAndBiasesMarketplaceSubscriptionStatus(PendingFulfillmentStartValue); + /// Marketplace subscription is activated. + public static WeightsAndBiasesMarketplaceSubscriptionStatus Subscribed { get; } = new WeightsAndBiasesMarketplaceSubscriptionStatus(SubscribedValue); + /// This state indicates that a customer's payment for the Marketplace service was not received. + public static WeightsAndBiasesMarketplaceSubscriptionStatus Suspended { get; } = new WeightsAndBiasesMarketplaceSubscriptionStatus(SuspendedValue); + /// Customer has cancelled the subscription. + public static WeightsAndBiasesMarketplaceSubscriptionStatus Unsubscribed { get; } = new WeightsAndBiasesMarketplaceSubscriptionStatus(UnsubscribedValue); + /// Determines if two values are the same. + public static bool operator ==(WeightsAndBiasesMarketplaceSubscriptionStatus left, WeightsAndBiasesMarketplaceSubscriptionStatus right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(WeightsAndBiasesMarketplaceSubscriptionStatus left, WeightsAndBiasesMarketplaceSubscriptionStatus right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator WeightsAndBiasesMarketplaceSubscriptionStatus(string value) => new WeightsAndBiasesMarketplaceSubscriptionStatus(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is WeightsAndBiasesMarketplaceSubscriptionStatus other && Equals(other); + /// + public bool Equals(WeightsAndBiasesMarketplaceSubscriptionStatus 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/liftrweightsandbiases/Azure.ResourceManager.WeightsAndBiases/src/Generated/Models/WeightsAndBiasesOfferDetails.Serialization.cs b/sdk/liftrweightsandbiases/Azure.ResourceManager.WeightsAndBiases/src/Generated/Models/WeightsAndBiasesOfferDetails.Serialization.cs new file mode 100644 index 000000000000..b29c402fb923 --- /dev/null +++ b/sdk/liftrweightsandbiases/Azure.ResourceManager.WeightsAndBiases/src/Generated/Models/WeightsAndBiasesOfferDetails.Serialization.cs @@ -0,0 +1,182 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.WeightsAndBiases.Models +{ + public partial class WeightsAndBiasesOfferDetails : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(WeightsAndBiasesOfferDetails)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("publisherId"u8); + writer.WriteStringValue(PublisherId); + writer.WritePropertyName("offerId"u8); + writer.WriteStringValue(OfferId); + writer.WritePropertyName("planId"u8); + writer.WriteStringValue(PlanId); + if (Optional.IsDefined(PlanName)) + { + writer.WritePropertyName("planName"u8); + writer.WriteStringValue(PlanName); + } + if (Optional.IsDefined(TermUnit)) + { + writer.WritePropertyName("termUnit"u8); + writer.WriteStringValue(TermUnit); + } + if (Optional.IsDefined(TermId)) + { + writer.WritePropertyName("termId"u8); + writer.WriteStringValue(TermId); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + WeightsAndBiasesOfferDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(WeightsAndBiasesOfferDetails)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeWeightsAndBiasesOfferDetails(document.RootElement, options); + } + + internal static WeightsAndBiasesOfferDetails DeserializeWeightsAndBiasesOfferDetails(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string publisherId = default; + string offerId = default; + string planId = default; + string planName = default; + string termUnit = default; + string termId = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("publisherId"u8)) + { + publisherId = property.Value.GetString(); + continue; + } + if (property.NameEquals("offerId"u8)) + { + offerId = property.Value.GetString(); + continue; + } + if (property.NameEquals("planId"u8)) + { + planId = property.Value.GetString(); + continue; + } + if (property.NameEquals("planName"u8)) + { + planName = property.Value.GetString(); + continue; + } + if (property.NameEquals("termUnit"u8)) + { + termUnit = property.Value.GetString(); + continue; + } + if (property.NameEquals("termId"u8)) + { + termId = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new WeightsAndBiasesOfferDetails( + publisherId, + offerId, + planId, + planName, + termUnit, + termId, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(WeightsAndBiasesOfferDetails)} does not support writing '{options.Format}' format."); + } + } + + WeightsAndBiasesOfferDetails IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeWeightsAndBiasesOfferDetails(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(WeightsAndBiasesOfferDetails)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/liftrweightsandbiases/Azure.ResourceManager.WeightsAndBiases/src/Generated/Models/WeightsAndBiasesOfferDetails.cs b/sdk/liftrweightsandbiases/Azure.ResourceManager.WeightsAndBiases/src/Generated/Models/WeightsAndBiasesOfferDetails.cs new file mode 100644 index 000000000000..1913f849013d --- /dev/null +++ b/sdk/liftrweightsandbiases/Azure.ResourceManager.WeightsAndBiases/src/Generated/Models/WeightsAndBiasesOfferDetails.cs @@ -0,0 +1,101 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.WeightsAndBiases.Models +{ + /// Offer details for the marketplace that is selected by the user. + public partial class WeightsAndBiasesOfferDetails + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Publisher Id for the marketplace offer. + /// Offer Id for the marketplace offer. + /// Plan Id for the marketplace offer. + /// , or is null. + public WeightsAndBiasesOfferDetails(string publisherId, string offerId, string planId) + { + Argument.AssertNotNull(publisherId, nameof(publisherId)); + Argument.AssertNotNull(offerId, nameof(offerId)); + Argument.AssertNotNull(planId, nameof(planId)); + + PublisherId = publisherId; + OfferId = offerId; + PlanId = planId; + } + + /// Initializes a new instance of . + /// Publisher Id for the marketplace offer. + /// Offer Id for the marketplace offer. + /// Plan Id for the marketplace offer. + /// Plan Name for the marketplace offer. + /// Plan Display Name for the marketplace offer. + /// Plan Display Name for the marketplace offer. + /// Keeps track of any properties unknown to the library. + internal WeightsAndBiasesOfferDetails(string publisherId, string offerId, string planId, string planName, string termUnit, string termId, IDictionary serializedAdditionalRawData) + { + PublisherId = publisherId; + OfferId = offerId; + PlanId = planId; + PlanName = planName; + TermUnit = termUnit; + TermId = termId; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal WeightsAndBiasesOfferDetails() + { + } + + /// Publisher Id for the marketplace offer. + public string PublisherId { get; set; } + /// Offer Id for the marketplace offer. + public string OfferId { get; set; } + /// Plan Id for the marketplace offer. + public string PlanId { get; set; } + /// Plan Name for the marketplace offer. + public string PlanName { get; set; } + /// Plan Display Name for the marketplace offer. + public string TermUnit { get; set; } + /// Plan Display Name for the marketplace offer. + public string TermId { get; set; } + } +} diff --git a/sdk/liftrweightsandbiases/Azure.ResourceManager.WeightsAndBiases/src/Generated/Models/WeightsAndBiasesPartnerProperties.Serialization.cs b/sdk/liftrweightsandbiases/Azure.ResourceManager.WeightsAndBiases/src/Generated/Models/WeightsAndBiasesPartnerProperties.Serialization.cs new file mode 100644 index 000000000000..c698e8d5822d --- /dev/null +++ b/sdk/liftrweightsandbiases/Azure.ResourceManager.WeightsAndBiases/src/Generated/Models/WeightsAndBiasesPartnerProperties.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.WeightsAndBiases.Models +{ + public partial class WeightsAndBiasesPartnerProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(WeightsAndBiasesPartnerProperties)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("region"u8); + writer.WriteStringValue(Region.ToString()); + writer.WritePropertyName("subdomain"u8); + writer.WriteStringValue(Subdomain); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + WeightsAndBiasesPartnerProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(WeightsAndBiasesPartnerProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeWeightsAndBiasesPartnerProperties(document.RootElement, options); + } + + internal static WeightsAndBiasesPartnerProperties DeserializeWeightsAndBiasesPartnerProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + WeightsAndBiasesRegion region = default; + string subdomain = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("region"u8)) + { + region = new WeightsAndBiasesRegion(property.Value.GetString()); + continue; + } + if (property.NameEquals("subdomain"u8)) + { + subdomain = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new WeightsAndBiasesPartnerProperties(region, subdomain, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(WeightsAndBiasesPartnerProperties)} does not support writing '{options.Format}' format."); + } + } + + WeightsAndBiasesPartnerProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeWeightsAndBiasesPartnerProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(WeightsAndBiasesPartnerProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/liftrweightsandbiases/Azure.ResourceManager.WeightsAndBiases/src/Generated/Models/WeightsAndBiasesPartnerProperties.cs b/sdk/liftrweightsandbiases/Azure.ResourceManager.WeightsAndBiases/src/Generated/Models/WeightsAndBiasesPartnerProperties.cs new file mode 100644 index 000000000000..beea1a8ba9b5 --- /dev/null +++ b/sdk/liftrweightsandbiases/Azure.ResourceManager.WeightsAndBiases/src/Generated/Models/WeightsAndBiasesPartnerProperties.cs @@ -0,0 +1,81 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.WeightsAndBiases.Models +{ + /// Partner's specific Properties. + public partial class WeightsAndBiasesPartnerProperties + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// 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 region of the instance. + /// The subdomain of the instance. + /// is null. + public WeightsAndBiasesPartnerProperties(WeightsAndBiasesRegion region, string subdomain) + { + Argument.AssertNotNull(subdomain, nameof(subdomain)); + + Region = region; + Subdomain = subdomain; + } + + /// Initializes a new instance of . + /// The region of the instance. + /// The subdomain of the instance. + /// Keeps track of any properties unknown to the library. + internal WeightsAndBiasesPartnerProperties(WeightsAndBiasesRegion region, string subdomain, IDictionary serializedAdditionalRawData) + { + Region = region; + Subdomain = subdomain; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal WeightsAndBiasesPartnerProperties() + { + } + + /// The region of the instance. + public WeightsAndBiasesRegion Region { get; set; } + /// The subdomain of the instance. + public string Subdomain { get; set; } + } +} diff --git a/sdk/liftrweightsandbiases/Azure.ResourceManager.WeightsAndBiases/src/Generated/Models/WeightsAndBiasesProvisioningState.cs b/sdk/liftrweightsandbiases/Azure.ResourceManager.WeightsAndBiases/src/Generated/Models/WeightsAndBiasesProvisioningState.cs new file mode 100644 index 000000000000..a2256c78aec1 --- /dev/null +++ b/sdk/liftrweightsandbiases/Azure.ResourceManager.WeightsAndBiases/src/Generated/Models/WeightsAndBiasesProvisioningState.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.WeightsAndBiases.Models +{ + /// The provisioning state of a resource type. + public readonly partial struct WeightsAndBiasesProvisioningState : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public WeightsAndBiasesProvisioningState(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string SucceededValue = "Succeeded"; + private const string FailedValue = "Failed"; + private const string CanceledValue = "Canceled"; + + /// Resource has been created. + public static WeightsAndBiasesProvisioningState Succeeded { get; } = new WeightsAndBiasesProvisioningState(SucceededValue); + /// Resource creation failed. + public static WeightsAndBiasesProvisioningState Failed { get; } = new WeightsAndBiasesProvisioningState(FailedValue); + /// Resource creation was canceled. + public static WeightsAndBiasesProvisioningState Canceled { get; } = new WeightsAndBiasesProvisioningState(CanceledValue); + /// Determines if two values are the same. + public static bool operator ==(WeightsAndBiasesProvisioningState left, WeightsAndBiasesProvisioningState right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(WeightsAndBiasesProvisioningState left, WeightsAndBiasesProvisioningState right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator WeightsAndBiasesProvisioningState(string value) => new WeightsAndBiasesProvisioningState(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is WeightsAndBiasesProvisioningState other && Equals(other); + /// + public bool Equals(WeightsAndBiasesProvisioningState 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/liftrweightsandbiases/Azure.ResourceManager.WeightsAndBiases/src/Generated/Models/WeightsAndBiasesRegion.cs b/sdk/liftrweightsandbiases/Azure.ResourceManager.WeightsAndBiases/src/Generated/Models/WeightsAndBiasesRegion.cs new file mode 100644 index 000000000000..420fe28635f9 --- /dev/null +++ b/sdk/liftrweightsandbiases/Azure.ResourceManager.WeightsAndBiases/src/Generated/Models/WeightsAndBiasesRegion.cs @@ -0,0 +1,63 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.WeightsAndBiases.Models +{ + /// The available regions. + public readonly partial struct WeightsAndBiasesRegion : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public WeightsAndBiasesRegion(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string EastUSValue = "eastus"; + private const string CentralUSValue = "centralus"; + private const string WestUSValue = "westus"; + private const string WestEuropeValue = "westeurope"; + private const string JapanEastValue = "japaneast"; + private const string KoreaCentralValue = "koreacentral"; + + /// Region: East US. + public static WeightsAndBiasesRegion EastUS { get; } = new WeightsAndBiasesRegion(EastUSValue); + /// Region: Central US. + public static WeightsAndBiasesRegion CentralUS { get; } = new WeightsAndBiasesRegion(CentralUSValue); + /// Region: West US. + public static WeightsAndBiasesRegion WestUS { get; } = new WeightsAndBiasesRegion(WestUSValue); + /// Region: West Europe. + public static WeightsAndBiasesRegion WestEurope { get; } = new WeightsAndBiasesRegion(WestEuropeValue); + /// Region: Japan East. + public static WeightsAndBiasesRegion JapanEast { get; } = new WeightsAndBiasesRegion(JapanEastValue); + /// Region: Korea Central. + public static WeightsAndBiasesRegion KoreaCentral { get; } = new WeightsAndBiasesRegion(KoreaCentralValue); + /// Determines if two values are the same. + public static bool operator ==(WeightsAndBiasesRegion left, WeightsAndBiasesRegion right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(WeightsAndBiasesRegion left, WeightsAndBiasesRegion right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator WeightsAndBiasesRegion(string value) => new WeightsAndBiasesRegion(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is WeightsAndBiasesRegion other && Equals(other); + /// + public bool Equals(WeightsAndBiasesRegion 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/liftrweightsandbiases/Azure.ResourceManager.WeightsAndBiases/src/Generated/Models/WeightsAndBiasesSingleSignOnPropertiesV2.Serialization.cs b/sdk/liftrweightsandbiases/Azure.ResourceManager.WeightsAndBiases/src/Generated/Models/WeightsAndBiasesSingleSignOnPropertiesV2.Serialization.cs new file mode 100644 index 000000000000..5b1ab7e981c5 --- /dev/null +++ b/sdk/liftrweightsandbiases/Azure.ResourceManager.WeightsAndBiases/src/Generated/Models/WeightsAndBiasesSingleSignOnPropertiesV2.Serialization.cs @@ -0,0 +1,194 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.WeightsAndBiases.Models +{ + public partial class WeightsAndBiasesSingleSignOnPropertiesV2 : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(WeightsAndBiasesSingleSignOnPropertiesV2)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("type"u8); + writer.WriteStringValue(Type.ToString()); + if (Optional.IsDefined(State)) + { + writer.WritePropertyName("state"u8); + writer.WriteStringValue(State.Value.ToString()); + } + if (Optional.IsDefined(EnterpriseAppId)) + { + writer.WritePropertyName("enterpriseAppId"u8); + writer.WriteStringValue(EnterpriseAppId); + } + if (Optional.IsDefined(Uri)) + { + writer.WritePropertyName("url"u8); + writer.WriteStringValue(Uri); + } + if (Optional.IsCollectionDefined(AadDomains)) + { + writer.WritePropertyName("aadDomains"u8); + writer.WriteStartArray(); + foreach (var item in AadDomains) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + WeightsAndBiasesSingleSignOnPropertiesV2 IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(WeightsAndBiasesSingleSignOnPropertiesV2)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeWeightsAndBiasesSingleSignOnPropertiesV2(document.RootElement, options); + } + + internal static WeightsAndBiasesSingleSignOnPropertiesV2 DeserializeWeightsAndBiasesSingleSignOnPropertiesV2(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + WeightsAndBiasesSingleSignOnType type = default; + WeightsAndBiasesSingleSignOnState? state = default; + string enterpriseAppId = default; + string url = default; + IList aadDomains = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type"u8)) + { + type = new WeightsAndBiasesSingleSignOnType(property.Value.GetString()); + continue; + } + if (property.NameEquals("state"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + state = new WeightsAndBiasesSingleSignOnState(property.Value.GetString()); + continue; + } + if (property.NameEquals("enterpriseAppId"u8)) + { + enterpriseAppId = property.Value.GetString(); + continue; + } + if (property.NameEquals("url"u8)) + { + url = property.Value.GetString(); + continue; + } + if (property.NameEquals("aadDomains"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + aadDomains = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new WeightsAndBiasesSingleSignOnPropertiesV2( + type, + state, + enterpriseAppId, + url, + aadDomains ?? 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(WeightsAndBiasesSingleSignOnPropertiesV2)} does not support writing '{options.Format}' format."); + } + } + + WeightsAndBiasesSingleSignOnPropertiesV2 IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeWeightsAndBiasesSingleSignOnPropertiesV2(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(WeightsAndBiasesSingleSignOnPropertiesV2)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/liftrweightsandbiases/Azure.ResourceManager.WeightsAndBiases/src/Generated/Models/WeightsAndBiasesSingleSignOnPropertiesV2.cs b/sdk/liftrweightsandbiases/Azure.ResourceManager.WeightsAndBiases/src/Generated/Models/WeightsAndBiasesSingleSignOnPropertiesV2.cs new file mode 100644 index 000000000000..a5ea5b57cc01 --- /dev/null +++ b/sdk/liftrweightsandbiases/Azure.ResourceManager.WeightsAndBiases/src/Generated/Models/WeightsAndBiasesSingleSignOnPropertiesV2.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.WeightsAndBiases.Models +{ + /// Properties specific to Single Sign On Resource. + public partial class WeightsAndBiasesSingleSignOnPropertiesV2 + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Type of Single Sign-On mechanism being used. + public WeightsAndBiasesSingleSignOnPropertiesV2(WeightsAndBiasesSingleSignOnType type) + { + Type = type; + AadDomains = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// Type of Single Sign-On mechanism being used. + /// State of the Single Sign On for the resource. + /// AAD enterprise application Id used to setup SSO. + /// URL for SSO to be used by the partner to redirect the user to their system. + /// List of AAD domains fetched from Microsoft Graph for user. + /// Keeps track of any properties unknown to the library. + internal WeightsAndBiasesSingleSignOnPropertiesV2(WeightsAndBiasesSingleSignOnType type, WeightsAndBiasesSingleSignOnState? state, string enterpriseAppId, string uri, IList aadDomains, IDictionary serializedAdditionalRawData) + { + Type = type; + State = state; + EnterpriseAppId = enterpriseAppId; + Uri = uri; + AadDomains = aadDomains; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal WeightsAndBiasesSingleSignOnPropertiesV2() + { + } + + /// Type of Single Sign-On mechanism being used. + public WeightsAndBiasesSingleSignOnType Type { get; set; } + /// State of the Single Sign On for the resource. + public WeightsAndBiasesSingleSignOnState? State { get; set; } + /// AAD enterprise application Id used to setup SSO. + public string EnterpriseAppId { get; set; } + /// URL for SSO to be used by the partner to redirect the user to their system. + public string Uri { get; set; } + /// List of AAD domains fetched from Microsoft Graph for user. + public IList AadDomains { get; } + } +} diff --git a/sdk/liftrweightsandbiases/Azure.ResourceManager.WeightsAndBiases/src/Generated/Models/WeightsAndBiasesSingleSignOnState.cs b/sdk/liftrweightsandbiases/Azure.ResourceManager.WeightsAndBiases/src/Generated/Models/WeightsAndBiasesSingleSignOnState.cs new file mode 100644 index 000000000000..d29396d3de23 --- /dev/null +++ b/sdk/liftrweightsandbiases/Azure.ResourceManager.WeightsAndBiases/src/Generated/Models/WeightsAndBiasesSingleSignOnState.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.WeightsAndBiases.Models +{ + /// Various states of the SSO resource. + public readonly partial struct WeightsAndBiasesSingleSignOnState : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public WeightsAndBiasesSingleSignOnState(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string InitialValue = "Initial"; + private const string EnableValue = "Enable"; + private const string DisableValue = "Disable"; + + /// Initial state of the SSO resource. + public static WeightsAndBiasesSingleSignOnState Initial { get; } = new WeightsAndBiasesSingleSignOnState(InitialValue); + /// State of the SSO resource when it is enabled. + public static WeightsAndBiasesSingleSignOnState Enable { get; } = new WeightsAndBiasesSingleSignOnState(EnableValue); + /// State of the SSO resource when it is disabled. + public static WeightsAndBiasesSingleSignOnState Disable { get; } = new WeightsAndBiasesSingleSignOnState(DisableValue); + /// Determines if two values are the same. + public static bool operator ==(WeightsAndBiasesSingleSignOnState left, WeightsAndBiasesSingleSignOnState right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(WeightsAndBiasesSingleSignOnState left, WeightsAndBiasesSingleSignOnState right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator WeightsAndBiasesSingleSignOnState(string value) => new WeightsAndBiasesSingleSignOnState(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is WeightsAndBiasesSingleSignOnState other && Equals(other); + /// + public bool Equals(WeightsAndBiasesSingleSignOnState 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/liftrweightsandbiases/Azure.ResourceManager.WeightsAndBiases/src/Generated/Models/WeightsAndBiasesSingleSignOnType.cs b/sdk/liftrweightsandbiases/Azure.ResourceManager.WeightsAndBiases/src/Generated/Models/WeightsAndBiasesSingleSignOnType.cs new file mode 100644 index 000000000000..7392cf4e7d49 --- /dev/null +++ b/sdk/liftrweightsandbiases/Azure.ResourceManager.WeightsAndBiases/src/Generated/Models/WeightsAndBiasesSingleSignOnType.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.WeightsAndBiases.Models +{ + /// Defines the type of Single Sign-On (SSO) mechanism being used. + public readonly partial struct WeightsAndBiasesSingleSignOnType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public WeightsAndBiasesSingleSignOnType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string SamlValue = "Saml"; + private const string OpenIdValue = "OpenId"; + + /// Security Assertion Markup Language (SAML) based Single Sign-On. + public static WeightsAndBiasesSingleSignOnType Saml { get; } = new WeightsAndBiasesSingleSignOnType(SamlValue); + /// OpenID Connect based Single Sign-On. + public static WeightsAndBiasesSingleSignOnType OpenId { get; } = new WeightsAndBiasesSingleSignOnType(OpenIdValue); + /// Determines if two values are the same. + public static bool operator ==(WeightsAndBiasesSingleSignOnType left, WeightsAndBiasesSingleSignOnType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(WeightsAndBiasesSingleSignOnType left, WeightsAndBiasesSingleSignOnType right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator WeightsAndBiasesSingleSignOnType(string value) => new WeightsAndBiasesSingleSignOnType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is WeightsAndBiasesSingleSignOnType other && Equals(other); + /// + public bool Equals(WeightsAndBiasesSingleSignOnType 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/liftrweightsandbiases/Azure.ResourceManager.WeightsAndBiases/src/Generated/Models/WeightsAndBiasesUserDetails.Serialization.cs b/sdk/liftrweightsandbiases/Azure.ResourceManager.WeightsAndBiases/src/Generated/Models/WeightsAndBiasesUserDetails.Serialization.cs new file mode 100644 index 000000000000..17af82542ae7 --- /dev/null +++ b/sdk/liftrweightsandbiases/Azure.ResourceManager.WeightsAndBiases/src/Generated/Models/WeightsAndBiasesUserDetails.Serialization.cs @@ -0,0 +1,179 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.WeightsAndBiases.Models +{ + public partial class WeightsAndBiasesUserDetails : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(WeightsAndBiasesUserDetails)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(FirstName)) + { + writer.WritePropertyName("firstName"u8); + writer.WriteStringValue(FirstName); + } + if (Optional.IsDefined(LastName)) + { + writer.WritePropertyName("lastName"u8); + writer.WriteStringValue(LastName); + } + if (Optional.IsDefined(EmailAddress)) + { + writer.WritePropertyName("emailAddress"u8); + writer.WriteStringValue(EmailAddress); + } + if (Optional.IsDefined(Upn)) + { + writer.WritePropertyName("upn"u8); + writer.WriteStringValue(Upn); + } + if (Optional.IsDefined(PhoneNumber)) + { + writer.WritePropertyName("phoneNumber"u8); + writer.WriteStringValue(PhoneNumber); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + WeightsAndBiasesUserDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(WeightsAndBiasesUserDetails)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeWeightsAndBiasesUserDetails(document.RootElement, options); + } + + internal static WeightsAndBiasesUserDetails DeserializeWeightsAndBiasesUserDetails(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string firstName = default; + string lastName = default; + string emailAddress = default; + string upn = default; + string phoneNumber = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("firstName"u8)) + { + firstName = property.Value.GetString(); + continue; + } + if (property.NameEquals("lastName"u8)) + { + lastName = property.Value.GetString(); + continue; + } + if (property.NameEquals("emailAddress"u8)) + { + emailAddress = property.Value.GetString(); + continue; + } + if (property.NameEquals("upn"u8)) + { + upn = property.Value.GetString(); + continue; + } + if (property.NameEquals("phoneNumber"u8)) + { + phoneNumber = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new WeightsAndBiasesUserDetails( + firstName, + lastName, + emailAddress, + upn, + phoneNumber, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(WeightsAndBiasesUserDetails)} does not support writing '{options.Format}' format."); + } + } + + WeightsAndBiasesUserDetails IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeWeightsAndBiasesUserDetails(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(WeightsAndBiasesUserDetails)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/liftrweightsandbiases/Azure.ResourceManager.WeightsAndBiases/src/Generated/Models/WeightsAndBiasesUserDetails.cs b/sdk/liftrweightsandbiases/Azure.ResourceManager.WeightsAndBiases/src/Generated/Models/WeightsAndBiasesUserDetails.cs new file mode 100644 index 000000000000..645be88f72d3 --- /dev/null +++ b/sdk/liftrweightsandbiases/Azure.ResourceManager.WeightsAndBiases/src/Generated/Models/WeightsAndBiasesUserDetails.cs @@ -0,0 +1,81 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.WeightsAndBiases.Models +{ + /// User details for an organization. + public partial class WeightsAndBiasesUserDetails + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public WeightsAndBiasesUserDetails() + { + } + + /// Initializes a new instance of . + /// First name of the user. + /// Last name of the user. + /// Email address of the user. + /// User's principal name. + /// User's phone number. + /// Keeps track of any properties unknown to the library. + internal WeightsAndBiasesUserDetails(string firstName, string lastName, string emailAddress, string upn, string phoneNumber, IDictionary serializedAdditionalRawData) + { + FirstName = firstName; + LastName = lastName; + EmailAddress = emailAddress; + Upn = upn; + PhoneNumber = phoneNumber; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// First name of the user. + public string FirstName { get; set; } + /// Last name of the user. + public string LastName { get; set; } + /// Email address of the user. + public string EmailAddress { get; set; } + /// User's principal name. + public string Upn { get; set; } + /// User's phone number. + public string PhoneNumber { get; set; } + } +} diff --git a/sdk/liftrweightsandbiases/Azure.ResourceManager.WeightsAndBiases/src/Generated/ProviderConstants.cs b/sdk/liftrweightsandbiases/Azure.ResourceManager.WeightsAndBiases/src/Generated/ProviderConstants.cs new file mode 100644 index 000000000000..5f5ed1109237 --- /dev/null +++ b/sdk/liftrweightsandbiases/Azure.ResourceManager.WeightsAndBiases/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.WeightsAndBiases +{ + internal static class ProviderConstants + { + public static string DefaultProviderNamespace { get; } = ClientDiagnostics.GetResourceProviderNamespace(typeof(ProviderConstants).Assembly); + } +} diff --git a/sdk/liftrweightsandbiases/Azure.ResourceManager.WeightsAndBiases/src/Generated/RestOperations/InstancesRestOperations.cs b/sdk/liftrweightsandbiases/Azure.ResourceManager.WeightsAndBiases/src/Generated/RestOperations/InstancesRestOperations.cs new file mode 100644 index 000000000000..64d9d2e5c9d5 --- /dev/null +++ b/sdk/liftrweightsandbiases/Azure.ResourceManager.WeightsAndBiases/src/Generated/RestOperations/InstancesRestOperations.cs @@ -0,0 +1,731 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.WeightsAndBiases.Models; + +namespace Azure.ResourceManager.WeightsAndBiases +{ + internal partial class InstancesRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of InstancesRestOperations. + /// 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 InstancesRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + { + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? new Uri("https://management.azure.com"); + _apiVersion = apiVersion ?? "2024-09-18-preview"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string instancename) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.WeightsAndBiases/instances/", false); + uri.AppendPath(instancename, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string instancename) + { + 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.WeightsAndBiases/instances/", false); + uri.AppendPath(instancename, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get a InstanceResource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Instance resource. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string instancename, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(instancename, nameof(instancename)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, instancename); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + WeightsAndBiasesInstanceData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = WeightsAndBiasesInstanceData.DeserializeWeightsAndBiasesInstanceData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((WeightsAndBiasesInstanceData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get a InstanceResource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Instance resource. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response Get(string subscriptionId, string resourceGroupName, string instancename, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(instancename, nameof(instancename)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, instancename); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + WeightsAndBiasesInstanceData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = WeightsAndBiasesInstanceData.DeserializeWeightsAndBiasesInstanceData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((WeightsAndBiasesInstanceData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, string resourceGroupName, string instancename, WeightsAndBiasesInstanceData 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.WeightsAndBiases/instances/", false); + uri.AppendPath(instancename, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string instancename, WeightsAndBiasesInstanceData 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.WeightsAndBiases/instances/", false); + uri.AppendPath(instancename, 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 InstanceResource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Instance resource. + /// Resource create parameters. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string instancename, WeightsAndBiasesInstanceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(instancename, nameof(instancename)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, instancename, 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 InstanceResource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Instance resource. + /// Resource create parameters. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string instancename, WeightsAndBiasesInstanceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(instancename, nameof(instancename)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, instancename, 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 instancename, WeightsAndBiasesInstancePatch 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.WeightsAndBiases/instances/", false); + uri.AppendPath(instancename, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string instancename, WeightsAndBiasesInstancePatch 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.WeightsAndBiases/instances/", false); + uri.AppendPath(instancename, 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 InstanceResource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Instance resource. + /// The resource properties to be updated. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> UpdateAsync(string subscriptionId, string resourceGroupName, string instancename, WeightsAndBiasesInstancePatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(instancename, nameof(instancename)); + Argument.AssertNotNull(patch, nameof(patch)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, instancename, patch); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + WeightsAndBiasesInstanceData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = WeightsAndBiasesInstanceData.DeserializeWeightsAndBiasesInstanceData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Update a InstanceResource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Instance resource. + /// The resource properties to be updated. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response Update(string subscriptionId, string resourceGroupName, string instancename, WeightsAndBiasesInstancePatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(instancename, nameof(instancename)); + Argument.AssertNotNull(patch, nameof(patch)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, instancename, patch); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + WeightsAndBiasesInstanceData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = WeightsAndBiasesInstanceData.DeserializeWeightsAndBiasesInstanceData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string instancename) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.WeightsAndBiases/instances/", false); + uri.AppendPath(instancename, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string instancename) + { + 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.WeightsAndBiases/instances/", false); + uri.AppendPath(instancename, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Delete a InstanceResource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Instance resource. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string instancename, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(instancename, nameof(instancename)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, instancename); + 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 InstanceResource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Instance resource. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response Delete(string subscriptionId, string resourceGroupName, string instancename, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(instancename, nameof(instancename)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, instancename); + _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.WeightsAndBiases/instances", 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.WeightsAndBiases/instances", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List InstanceResource resources by resource group. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + public async Task> ListByResourceGroupAsync(string subscriptionId, string resourceGroupName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + + using var message = CreateListByResourceGroupRequest(subscriptionId, resourceGroupName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + InstanceResourceListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = InstanceResourceListResult.DeserializeInstanceResourceListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List InstanceResource resources by resource group. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + public Response ListByResourceGroup(string subscriptionId, string resourceGroupName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + + using var message = CreateListByResourceGroupRequest(subscriptionId, resourceGroupName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + InstanceResourceListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = InstanceResourceListResult.DeserializeInstanceResourceListResult(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.WeightsAndBiases/instances", 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.WeightsAndBiases/instances", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List InstanceResource resources by subscription ID. + /// The ID of the target subscription. The value must be an UUID. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + public async Task> ListBySubscriptionAsync(string subscriptionId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateListBySubscriptionRequest(subscriptionId); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + InstanceResourceListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = InstanceResourceListResult.DeserializeInstanceResourceListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List InstanceResource resources by subscription ID. + /// The ID of the target subscription. The value must be an UUID. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + public Response ListBySubscription(string subscriptionId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateListBySubscriptionRequest(subscriptionId); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + InstanceResourceListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = InstanceResourceListResult.DeserializeInstanceResourceListResult(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 InstanceResource resources by resource group. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The cancellation token to use. + /// , or is null. + /// or is an empty string, and was expected to be non-empty. + public async Task> ListByResourceGroupNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + + using var message = CreateListByResourceGroupNextPageRequest(nextLink, subscriptionId, resourceGroupName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + InstanceResourceListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = InstanceResourceListResult.DeserializeInstanceResourceListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List InstanceResource resources by resource group. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The cancellation token to use. + /// , or is null. + /// or is an empty string, and was expected to be non-empty. + public Response ListByResourceGroupNextPage(string nextLink, string subscriptionId, string resourceGroupName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + + using var message = CreateListByResourceGroupNextPageRequest(nextLink, subscriptionId, resourceGroupName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + InstanceResourceListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = InstanceResourceListResult.DeserializeInstanceResourceListResult(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 InstanceResource resources by subscription ID. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + public async Task> ListBySubscriptionNextPageAsync(string nextLink, string subscriptionId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateListBySubscriptionNextPageRequest(nextLink, subscriptionId); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + InstanceResourceListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = InstanceResourceListResult.DeserializeInstanceResourceListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List InstanceResource resources by subscription ID. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + public Response ListBySubscriptionNextPage(string nextLink, string subscriptionId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateListBySubscriptionNextPageRequest(nextLink, subscriptionId); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + InstanceResourceListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = InstanceResourceListResult.DeserializeInstanceResourceListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/liftrweightsandbiases/Azure.ResourceManager.WeightsAndBiases/src/Generated/WeightsAndBiasesInstanceCollection.cs b/sdk/liftrweightsandbiases/Azure.ResourceManager.WeightsAndBiases/src/Generated/WeightsAndBiasesInstanceCollection.cs new file mode 100644 index 000000000000..d8c31bf23a5c --- /dev/null +++ b/sdk/liftrweightsandbiases/Azure.ResourceManager.WeightsAndBiases/src/Generated/WeightsAndBiasesInstanceCollection.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.WeightsAndBiases +{ + /// + /// 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 GetWeightsAndBiasesInstances method from an instance of . + /// + public partial class WeightsAndBiasesInstanceCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _weightsAndBiasesInstanceInstancesClientDiagnostics; + private readonly InstancesRestOperations _weightsAndBiasesInstanceInstancesRestClient; + + /// Initializes a new instance of the class for mocking. + protected WeightsAndBiasesInstanceCollection() + { + } + + /// 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 WeightsAndBiasesInstanceCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _weightsAndBiasesInstanceInstancesClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.WeightsAndBiases", WeightsAndBiasesInstanceResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(WeightsAndBiasesInstanceResource.ResourceType, out string weightsAndBiasesInstanceInstancesApiVersion); + _weightsAndBiasesInstanceInstancesRestClient = new InstancesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, weightsAndBiasesInstanceInstancesApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceGroupResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceGroupResource.ResourceType), nameof(id)); + } + + /// + /// Create a InstanceResource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.WeightsAndBiases/instances/{instancename} + /// + /// + /// Operation Id + /// InstanceResource_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2024-09-18-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Name of the Instance resource. + /// Resource create parameters. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string instancename, WeightsAndBiasesInstanceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(instancename, nameof(instancename)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _weightsAndBiasesInstanceInstancesClientDiagnostics.CreateScope("WeightsAndBiasesInstanceCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _weightsAndBiasesInstanceInstancesRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, instancename, data, cancellationToken).ConfigureAwait(false); + var operation = new WeightsAndBiasesArmOperation(new WeightsAndBiasesInstanceOperationSource(Client), _weightsAndBiasesInstanceInstancesClientDiagnostics, Pipeline, _weightsAndBiasesInstanceInstancesRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, instancename, 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 InstanceResource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.WeightsAndBiases/instances/{instancename} + /// + /// + /// Operation Id + /// InstanceResource_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2024-09-18-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Name of the Instance resource. + /// Resource create parameters. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string instancename, WeightsAndBiasesInstanceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(instancename, nameof(instancename)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _weightsAndBiasesInstanceInstancesClientDiagnostics.CreateScope("WeightsAndBiasesInstanceCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _weightsAndBiasesInstanceInstancesRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, instancename, data, cancellationToken); + var operation = new WeightsAndBiasesArmOperation(new WeightsAndBiasesInstanceOperationSource(Client), _weightsAndBiasesInstanceInstancesClientDiagnostics, Pipeline, _weightsAndBiasesInstanceInstancesRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, instancename, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a InstanceResource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.WeightsAndBiases/instances/{instancename} + /// + /// + /// Operation Id + /// InstanceResource_Get + /// + /// + /// Default Api Version + /// 2024-09-18-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the Instance resource. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string instancename, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(instancename, nameof(instancename)); + + using var scope = _weightsAndBiasesInstanceInstancesClientDiagnostics.CreateScope("WeightsAndBiasesInstanceCollection.Get"); + scope.Start(); + try + { + var response = await _weightsAndBiasesInstanceInstancesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, instancename, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new WeightsAndBiasesInstanceResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a InstanceResource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.WeightsAndBiases/instances/{instancename} + /// + /// + /// Operation Id + /// InstanceResource_Get + /// + /// + /// Default Api Version + /// 2024-09-18-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the Instance resource. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string instancename, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(instancename, nameof(instancename)); + + using var scope = _weightsAndBiasesInstanceInstancesClientDiagnostics.CreateScope("WeightsAndBiasesInstanceCollection.Get"); + scope.Start(); + try + { + var response = _weightsAndBiasesInstanceInstancesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, instancename, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new WeightsAndBiasesInstanceResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// List InstanceResource resources by resource group + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.WeightsAndBiases/instances + /// + /// + /// Operation Id + /// InstanceResource_ListByResourceGroup + /// + /// + /// Default Api Version + /// 2024-09-18-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) => _weightsAndBiasesInstanceInstancesRestClient.CreateListByResourceGroupRequest(Id.SubscriptionId, Id.ResourceGroupName); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _weightsAndBiasesInstanceInstancesRestClient.CreateListByResourceGroupNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new WeightsAndBiasesInstanceResource(Client, WeightsAndBiasesInstanceData.DeserializeWeightsAndBiasesInstanceData(e)), _weightsAndBiasesInstanceInstancesClientDiagnostics, Pipeline, "WeightsAndBiasesInstanceCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// List InstanceResource resources by resource group + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.WeightsAndBiases/instances + /// + /// + /// Operation Id + /// InstanceResource_ListByResourceGroup + /// + /// + /// Default Api Version + /// 2024-09-18-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) => _weightsAndBiasesInstanceInstancesRestClient.CreateListByResourceGroupRequest(Id.SubscriptionId, Id.ResourceGroupName); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _weightsAndBiasesInstanceInstancesRestClient.CreateListByResourceGroupNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new WeightsAndBiasesInstanceResource(Client, WeightsAndBiasesInstanceData.DeserializeWeightsAndBiasesInstanceData(e)), _weightsAndBiasesInstanceInstancesClientDiagnostics, Pipeline, "WeightsAndBiasesInstanceCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.WeightsAndBiases/instances/{instancename} + /// + /// + /// Operation Id + /// InstanceResource_Get + /// + /// + /// Default Api Version + /// 2024-09-18-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the Instance resource. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string instancename, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(instancename, nameof(instancename)); + + using var scope = _weightsAndBiasesInstanceInstancesClientDiagnostics.CreateScope("WeightsAndBiasesInstanceCollection.Exists"); + scope.Start(); + try + { + var response = await _weightsAndBiasesInstanceInstancesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, instancename, 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.WeightsAndBiases/instances/{instancename} + /// + /// + /// Operation Id + /// InstanceResource_Get + /// + /// + /// Default Api Version + /// 2024-09-18-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the Instance resource. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string instancename, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(instancename, nameof(instancename)); + + using var scope = _weightsAndBiasesInstanceInstancesClientDiagnostics.CreateScope("WeightsAndBiasesInstanceCollection.Exists"); + scope.Start(); + try + { + var response = _weightsAndBiasesInstanceInstancesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, instancename, 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.WeightsAndBiases/instances/{instancename} + /// + /// + /// Operation Id + /// InstanceResource_Get + /// + /// + /// Default Api Version + /// 2024-09-18-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the Instance resource. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetIfExistsAsync(string instancename, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(instancename, nameof(instancename)); + + using var scope = _weightsAndBiasesInstanceInstancesClientDiagnostics.CreateScope("WeightsAndBiasesInstanceCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _weightsAndBiasesInstanceInstancesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, instancename, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new WeightsAndBiasesInstanceResource(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.WeightsAndBiases/instances/{instancename} + /// + /// + /// Operation Id + /// InstanceResource_Get + /// + /// + /// Default Api Version + /// 2024-09-18-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the Instance resource. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string instancename, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(instancename, nameof(instancename)); + + using var scope = _weightsAndBiasesInstanceInstancesClientDiagnostics.CreateScope("WeightsAndBiasesInstanceCollection.GetIfExists"); + scope.Start(); + try + { + var response = _weightsAndBiasesInstanceInstancesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, instancename, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new WeightsAndBiasesInstanceResource(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/liftrweightsandbiases/Azure.ResourceManager.WeightsAndBiases/src/Generated/WeightsAndBiasesInstanceData.Serialization.cs b/sdk/liftrweightsandbiases/Azure.ResourceManager.WeightsAndBiases/src/Generated/WeightsAndBiasesInstanceData.Serialization.cs new file mode 100644 index 000000000000..0dd77832e004 --- /dev/null +++ b/sdk/liftrweightsandbiases/Azure.ResourceManager.WeightsAndBiases/src/Generated/WeightsAndBiasesInstanceData.Serialization.cs @@ -0,0 +1,196 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.Models; +using Azure.ResourceManager.WeightsAndBiases.Models; + +namespace Azure.ResourceManager.WeightsAndBiases +{ + public partial class WeightsAndBiasesInstanceData : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.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(WeightsAndBiasesInstanceData)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties, options); + } + if (Optional.IsDefined(Identity)) + { + writer.WritePropertyName("identity"u8); + var serializeOptions = new JsonSerializerOptions { Converters = { new ManagedServiceIdentityTypeV3Converter() } }; + JsonSerializer.Serialize(writer, Identity, serializeOptions); + } + } + + WeightsAndBiasesInstanceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(WeightsAndBiasesInstanceData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeWeightsAndBiasesInstanceData(document.RootElement, options); + } + + internal static WeightsAndBiasesInstanceData DeserializeWeightsAndBiasesInstanceData(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + WeightsAndBiasesInstanceProperties properties = default; + ManagedServiceIdentity identity = default; + IDictionary tags = default; + AzureLocation location = default; + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + SystemData systemData = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + properties = WeightsAndBiasesInstanceProperties.DeserializeWeightsAndBiasesInstanceProperties(property.Value, options); + continue; + } + if (property.NameEquals("identity"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + var serializeOptions = new JsonSerializerOptions { Converters = { new ManagedServiceIdentityTypeV3Converter() } }; + identity = JsonSerializer.Deserialize(property.Value.GetRawText(), serializeOptions); + continue; + } + if (property.NameEquals("tags"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + tags = dictionary; + continue; + } + if (property.NameEquals("location"u8)) + { + location = new AzureLocation(property.Value.GetString()); + continue; + } + if (property.NameEquals("id"u8)) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new WeightsAndBiasesInstanceData( + id, + name, + type, + systemData, + tags ?? new ChangeTrackingDictionary(), + location, + properties, + identity, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(WeightsAndBiasesInstanceData)} does not support writing '{options.Format}' format."); + } + } + + WeightsAndBiasesInstanceData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeWeightsAndBiasesInstanceData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(WeightsAndBiasesInstanceData)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/liftrweightsandbiases/Azure.ResourceManager.WeightsAndBiases/src/Generated/WeightsAndBiasesInstanceData.cs b/sdk/liftrweightsandbiases/Azure.ResourceManager.WeightsAndBiases/src/Generated/WeightsAndBiasesInstanceData.cs new file mode 100644 index 000000000000..c7d93d894c16 --- /dev/null +++ b/sdk/liftrweightsandbiases/Azure.ResourceManager.WeightsAndBiases/src/Generated/WeightsAndBiasesInstanceData.cs @@ -0,0 +1,87 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.Models; +using Azure.ResourceManager.WeightsAndBiases.Models; + +namespace Azure.ResourceManager.WeightsAndBiases +{ + /// + /// A class representing the WeightsAndBiasesInstance data model. + /// Concrete tracked resource types can be created by aliasing this type using a specific property type. + /// + public partial class WeightsAndBiasesInstanceData : 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 WeightsAndBiasesInstanceData(AzureLocation location) : base(location) + { + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// The resource-specific properties for this resource. + /// The managed service identities assigned to this resource. + /// Keeps track of any properties unknown to the library. + internal WeightsAndBiasesInstanceData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, WeightsAndBiasesInstanceProperties properties, ManagedServiceIdentity identity, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) + { + Properties = properties; + Identity = identity; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal WeightsAndBiasesInstanceData() + { + } + + /// The resource-specific properties for this resource. + public WeightsAndBiasesInstanceProperties Properties { get; set; } + /// The managed service identities assigned to this resource. + public ManagedServiceIdentity Identity { get; set; } + } +} diff --git a/sdk/liftrweightsandbiases/Azure.ResourceManager.WeightsAndBiases/src/Generated/WeightsAndBiasesInstanceResource.Serialization.cs b/sdk/liftrweightsandbiases/Azure.ResourceManager.WeightsAndBiases/src/Generated/WeightsAndBiasesInstanceResource.Serialization.cs new file mode 100644 index 000000000000..99212a5e7143 --- /dev/null +++ b/sdk/liftrweightsandbiases/Azure.ResourceManager.WeightsAndBiases/src/Generated/WeightsAndBiasesInstanceResource.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.WeightsAndBiases +{ + public partial class WeightsAndBiasesInstanceResource : IJsonModel + { + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + WeightsAndBiasesInstanceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options); + + WeightsAndBiasesInstanceData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + } +} diff --git a/sdk/liftrweightsandbiases/Azure.ResourceManager.WeightsAndBiases/src/Generated/WeightsAndBiasesInstanceResource.cs b/sdk/liftrweightsandbiases/Azure.ResourceManager.WeightsAndBiases/src/Generated/WeightsAndBiasesInstanceResource.cs new file mode 100644 index 000000000000..b16b697030bb --- /dev/null +++ b/sdk/liftrweightsandbiases/Azure.ResourceManager.WeightsAndBiases/src/Generated/WeightsAndBiasesInstanceResource.cs @@ -0,0 +1,699 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.Resources; +using Azure.ResourceManager.WeightsAndBiases.Models; + +namespace Azure.ResourceManager.WeightsAndBiases +{ + /// + /// A Class representing a WeightsAndBiasesInstance 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 GetWeightsAndBiasesInstanceResource method. + /// Otherwise you can get one from its parent resource using the GetWeightsAndBiasesInstance method. + /// + public partial class WeightsAndBiasesInstanceResource : ArmResource + { + /// Generate the resource identifier of a instance. + /// The subscriptionId. + /// The resourceGroupName. + /// The instancename. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string instancename) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.WeightsAndBiases/instances/{instancename}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _weightsAndBiasesInstanceInstancesClientDiagnostics; + private readonly InstancesRestOperations _weightsAndBiasesInstanceInstancesRestClient; + private readonly WeightsAndBiasesInstanceData _data; + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.WeightsAndBiases/instances"; + + /// Initializes a new instance of the class for mocking. + protected WeightsAndBiasesInstanceResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal WeightsAndBiasesInstanceResource(ArmClient client, WeightsAndBiasesInstanceData 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 WeightsAndBiasesInstanceResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _weightsAndBiasesInstanceInstancesClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.WeightsAndBiases", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string weightsAndBiasesInstanceInstancesApiVersion); + _weightsAndBiasesInstanceInstancesRestClient = new InstancesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, weightsAndBiasesInstanceInstancesApiVersion); +#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 WeightsAndBiasesInstanceData 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 InstanceResource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.WeightsAndBiases/instances/{instancename} + /// + /// + /// Operation Id + /// InstanceResource_Get + /// + /// + /// Default Api Version + /// 2024-09-18-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _weightsAndBiasesInstanceInstancesClientDiagnostics.CreateScope("WeightsAndBiasesInstanceResource.Get"); + scope.Start(); + try + { + var response = await _weightsAndBiasesInstanceInstancesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new WeightsAndBiasesInstanceResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a InstanceResource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.WeightsAndBiases/instances/{instancename} + /// + /// + /// Operation Id + /// InstanceResource_Get + /// + /// + /// Default Api Version + /// 2024-09-18-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _weightsAndBiasesInstanceInstancesClientDiagnostics.CreateScope("WeightsAndBiasesInstanceResource.Get"); + scope.Start(); + try + { + var response = _weightsAndBiasesInstanceInstancesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new WeightsAndBiasesInstanceResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete a InstanceResource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.WeightsAndBiases/instances/{instancename} + /// + /// + /// Operation Id + /// InstanceResource_Delete + /// + /// + /// Default Api Version + /// 2024-09-18-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 = _weightsAndBiasesInstanceInstancesClientDiagnostics.CreateScope("WeightsAndBiasesInstanceResource.Delete"); + scope.Start(); + try + { + var response = await _weightsAndBiasesInstanceInstancesRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new WeightsAndBiasesArmOperation(_weightsAndBiasesInstanceInstancesClientDiagnostics, Pipeline, _weightsAndBiasesInstanceInstancesRestClient.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 InstanceResource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.WeightsAndBiases/instances/{instancename} + /// + /// + /// Operation Id + /// InstanceResource_Delete + /// + /// + /// Default Api Version + /// 2024-09-18-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 = _weightsAndBiasesInstanceInstancesClientDiagnostics.CreateScope("WeightsAndBiasesInstanceResource.Delete"); + scope.Start(); + try + { + var response = _weightsAndBiasesInstanceInstancesRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + var operation = new WeightsAndBiasesArmOperation(_weightsAndBiasesInstanceInstancesClientDiagnostics, Pipeline, _weightsAndBiasesInstanceInstancesRestClient.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 InstanceResource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.WeightsAndBiases/instances/{instancename} + /// + /// + /// Operation Id + /// InstanceResource_Update + /// + /// + /// Default Api Version + /// 2024-09-18-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The resource properties to be updated. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(WeightsAndBiasesInstancePatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(patch, nameof(patch)); + + using var scope = _weightsAndBiasesInstanceInstancesClientDiagnostics.CreateScope("WeightsAndBiasesInstanceResource.Update"); + scope.Start(); + try + { + var response = await _weightsAndBiasesInstanceInstancesRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new WeightsAndBiasesInstanceResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Update a InstanceResource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.WeightsAndBiases/instances/{instancename} + /// + /// + /// Operation Id + /// InstanceResource_Update + /// + /// + /// Default Api Version + /// 2024-09-18-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The resource properties to be updated. + /// The cancellation token to use. + /// is null. + public virtual Response Update(WeightsAndBiasesInstancePatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(patch, nameof(patch)); + + using var scope = _weightsAndBiasesInstanceInstancesClientDiagnostics.CreateScope("WeightsAndBiasesInstanceResource.Update"); + scope.Start(); + try + { + var response = _weightsAndBiasesInstanceInstancesRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch, cancellationToken); + return Response.FromValue(new WeightsAndBiasesInstanceResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Add a tag to the current resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.WeightsAndBiases/instances/{instancename} + /// + /// + /// Operation Id + /// InstanceResource_Get + /// + /// + /// Default Api Version + /// 2024-09-18-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 = _weightsAndBiasesInstanceInstancesClientDiagnostics.CreateScope("WeightsAndBiasesInstanceResource.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 _weightsAndBiasesInstanceInstancesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new WeightsAndBiasesInstanceResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new WeightsAndBiasesInstancePatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags[key] = value; + var result = await UpdateAsync(patch, cancellationToken: cancellationToken).ConfigureAwait(false); + return result; + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Add a tag to the current resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.WeightsAndBiases/instances/{instancename} + /// + /// + /// Operation Id + /// InstanceResource_Get + /// + /// + /// Default Api Version + /// 2024-09-18-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 = _weightsAndBiasesInstanceInstancesClientDiagnostics.CreateScope("WeightsAndBiasesInstanceResource.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 = _weightsAndBiasesInstanceInstancesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + return Response.FromValue(new WeightsAndBiasesInstanceResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new WeightsAndBiasesInstancePatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags[key] = value; + var result = Update(patch, cancellationToken: cancellationToken); + return result; + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Replace the tags on the resource with the given set. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.WeightsAndBiases/instances/{instancename} + /// + /// + /// Operation Id + /// InstanceResource_Get + /// + /// + /// Default Api Version + /// 2024-09-18-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 = _weightsAndBiasesInstanceInstancesClientDiagnostics.CreateScope("WeightsAndBiasesInstanceResource.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 _weightsAndBiasesInstanceInstancesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new WeightsAndBiasesInstanceResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new WeightsAndBiasesInstancePatch(); + patch.Tags.ReplaceWith(tags); + var result = await UpdateAsync(patch, cancellationToken: cancellationToken).ConfigureAwait(false); + return result; + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Replace the tags on the resource with the given set. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.WeightsAndBiases/instances/{instancename} + /// + /// + /// Operation Id + /// InstanceResource_Get + /// + /// + /// Default Api Version + /// 2024-09-18-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 = _weightsAndBiasesInstanceInstancesClientDiagnostics.CreateScope("WeightsAndBiasesInstanceResource.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 = _weightsAndBiasesInstanceInstancesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + return Response.FromValue(new WeightsAndBiasesInstanceResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new WeightsAndBiasesInstancePatch(); + patch.Tags.ReplaceWith(tags); + var result = Update(patch, cancellationToken: cancellationToken); + return result; + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Removes a tag by key from the resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.WeightsAndBiases/instances/{instancename} + /// + /// + /// Operation Id + /// InstanceResource_Get + /// + /// + /// Default Api Version + /// 2024-09-18-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 = _weightsAndBiasesInstanceInstancesClientDiagnostics.CreateScope("WeightsAndBiasesInstanceResource.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 _weightsAndBiasesInstanceInstancesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new WeightsAndBiasesInstanceResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new WeightsAndBiasesInstancePatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags.Remove(key); + var result = await UpdateAsync(patch, cancellationToken: cancellationToken).ConfigureAwait(false); + return result; + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Removes a tag by key from the resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.WeightsAndBiases/instances/{instancename} + /// + /// + /// Operation Id + /// InstanceResource_Get + /// + /// + /// Default Api Version + /// 2024-09-18-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 = _weightsAndBiasesInstanceInstancesClientDiagnostics.CreateScope("WeightsAndBiasesInstanceResource.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 = _weightsAndBiasesInstanceInstancesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + return Response.FromValue(new WeightsAndBiasesInstanceResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new WeightsAndBiasesInstancePatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags.Remove(key); + var result = Update(patch, cancellationToken: cancellationToken); + return result; + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/liftrweightsandbiases/Azure.ResourceManager.WeightsAndBiases/src/Properties/AssemblyInfo.cs b/sdk/liftrweightsandbiases/Azure.ResourceManager.WeightsAndBiases/src/Properties/AssemblyInfo.cs new file mode 100644 index 000000000000..909705dcaa05 --- /dev/null +++ b/sdk/liftrweightsandbiases/Azure.ResourceManager.WeightsAndBiases/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.WeightsAndBiases.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("WeightsAndBiases")] diff --git a/sdk/liftrweightsandbiases/Azure.ResourceManager.WeightsAndBiases/tests/Azure.ResourceManager.WeightsAndBiases.Tests.csproj b/sdk/liftrweightsandbiases/Azure.ResourceManager.WeightsAndBiases/tests/Azure.ResourceManager.WeightsAndBiases.Tests.csproj new file mode 100644 index 000000000000..5e8a9a648eb5 --- /dev/null +++ b/sdk/liftrweightsandbiases/Azure.ResourceManager.WeightsAndBiases/tests/Azure.ResourceManager.WeightsAndBiases.Tests.csproj @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/sdk/liftrweightsandbiases/Azure.ResourceManager.WeightsAndBiases/tests/WeightsAndBiasesManagementTestBase.cs b/sdk/liftrweightsandbiases/Azure.ResourceManager.WeightsAndBiases/tests/WeightsAndBiasesManagementTestBase.cs new file mode 100644 index 000000000000..e7682269cb65 --- /dev/null +++ b/sdk/liftrweightsandbiases/Azure.ResourceManager.WeightsAndBiases/tests/WeightsAndBiasesManagementTestBase.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.WeightsAndBiases.Tests +{ + public class WeightsAndBiasesManagementTestBase : ManagementRecordedTestBase + { + protected ArmClient Client { get; private set; } + protected SubscriptionResource DefaultSubscription { get; private set; } + + protected WeightsAndBiasesManagementTestBase(bool isAsync, RecordedTestMode mode) + : base(isAsync, mode) + { + } + + protected WeightsAndBiasesManagementTestBase(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/liftrweightsandbiases/Azure.ResourceManager.WeightsAndBiases/tests/WeightsAndBiasesManagementTestEnvironment.cs b/sdk/liftrweightsandbiases/Azure.ResourceManager.WeightsAndBiases/tests/WeightsAndBiasesManagementTestEnvironment.cs new file mode 100644 index 000000000000..7da0612159d9 --- /dev/null +++ b/sdk/liftrweightsandbiases/Azure.ResourceManager.WeightsAndBiases/tests/WeightsAndBiasesManagementTestEnvironment.cs @@ -0,0 +1,11 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using Azure.Core.TestFramework; + +namespace Azure.ResourceManager.WeightsAndBiases.Tests +{ + public class WeightsAndBiasesManagementTestEnvironment : TestEnvironment + { + } +} diff --git a/sdk/liftrweightsandbiases/Azure.ResourceManager.WeightsAndBiases/tsp-location.yaml b/sdk/liftrweightsandbiases/Azure.ResourceManager.WeightsAndBiases/tsp-location.yaml new file mode 100644 index 000000000000..2c0b835187b9 --- /dev/null +++ b/sdk/liftrweightsandbiases/Azure.ResourceManager.WeightsAndBiases/tsp-location.yaml @@ -0,0 +1,4 @@ +directory: specification/liftrweightsandbiases/Liftr.WeightsAndBiases.Management +commit: 5cc63ed55e6f4769b156f767154839d0d18a7d05 +repo: Azure/azure-rest-api-specs +additionalDirectories: diff --git a/sdk/liftrweightsandbiases/ci.mgmt.yml b/sdk/liftrweightsandbiases/ci.mgmt.yml new file mode 100644 index 000000000000..8dd00eea20fa --- /dev/null +++ b/sdk/liftrweightsandbiases/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/liftrweightsandbiases /ci.mgmt.yml + - sdk/liftrweightsandbiases /Azure.ResourceManager.WeightsAndBiases / + + +extends: + template: /eng/pipelines/templates/stages/archetype-sdk-client.yml + parameters: + ServiceDirectory: liftrweightsandbiases + ArtifactName: packages + LimitForPullRequest: true + Artifacts: + - name: Azure.ResourceManager.WeightsAndBiases + safeName: AzureResourceManagerWeightsAndBiases diff --git a/sdk/pineconevectordb/ci.yml b/sdk/pineconevectordb/ci.yml deleted file mode 100644 index 0b8325c8c903..000000000000 --- a/sdk/pineconevectordb/ci.yml +++ /dev/null @@ -1,35 +0,0 @@ -# NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. - -trigger: - branches: - include: - - main - - hotfix/* - - release/* - paths: - include: - - sdk/pineconevectordb - - sdk/pineconevectordb/ci.yml - - sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDb - -pr: - branches: - include: - - main - - feature/* - - hotfix/* - - release/* - paths: - include: - - sdk/pineconevectordb - - sdk/pineconevectordb/ci.yml - - sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDb - -extends: - template: /eng/pipelines/templates/stages/archetype-sdk-client.yml - parameters: - ServiceDirectory: pineconevectordb - ArtifactName: packages - Artifacts: - - name: Azure.ResourceManager.PineconeVectorDb - safeName: AzureResourceManagerPineconeVectorDb diff --git a/sdk/portalservices/Azure.ResourceManager.PortalServicesCopilot/tsp-location.yaml b/sdk/portalservices/Azure.ResourceManager.PortalServicesCopilot/tsp-location.yaml index bc4ce36439f8..13ade22a7aaf 100644 --- a/sdk/portalservices/Azure.ResourceManager.PortalServicesCopilot/tsp-location.yaml +++ b/sdk/portalservices/Azure.ResourceManager.PortalServicesCopilot/tsp-location.yaml @@ -1,3 +1,4 @@ directory: specification/portalservices/CopilotSettings.Management -commit: 043e6e1b58ccc02bb2143244cb6fc7a5bfb1532b +commit: 5cc63ed55e6f4769b156f767154839d0d18a7d05 repo: Azure/azure-rest-api-specs +additionalDirectories: diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/autorest.md b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/autorest.md index e402bfdc4b0c..4e656a776acb 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/autorest.md +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/autorest.md @@ -9,7 +9,7 @@ csharp: true library-name: RecoveryServicesBackup namespace: Azure.ResourceManager.RecoveryServicesBackup # tag: package-2025-02 -require: https://github.com/Azure/azure-rest-api-specs/blob/97ee23a6db6078abcbec7b75bf9af8c503e9bb8b/specification/recoveryservicesbackup/resource-manager/readme.md +require: /mnt/vss/_work/1/s/azure-rest-api-specs/specification/recoveryservicesbackup/resource-manager/readme.md output-folder: $(this-folder)/Generated clear-output-folder: true sample-gen: diff --git a/sdk/resourcemanager/ci.mgmt.yml b/sdk/resourcemanager/ci.mgmt.yml index 5516ff2d5e57..d1ed3b2c1e74 100644 --- a/sdk/resourcemanager/ci.mgmt.yml +++ b/sdk/resourcemanager/ci.mgmt.yml @@ -80,6 +80,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 @@ -116,6 +117,7 @@ trigger: - sdk/kusto/Azure.ResourceManager.Kusto - sdk/labservices/Azure.ResourceManager.LabServices - sdk/lambdatesthyperexecute/Azure.ResourceManager.LambdaTestHyperExecute + - sdk/liftrweightsandbiases/Azure.ResourceManager.WeightsAndBiases - sdk/loadtestservice/Azure.ResourceManager.LoadTesting - sdk/logic/Azure.ResourceManager.Logic - sdk/machinelearningcompute/Azure.ResourceManager.MachineLearningCompute @@ -294,6 +296,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 @@ -330,6 +333,7 @@ pr: - sdk/kusto/Azure.ResourceManager.Kusto - sdk/labservices/Azure.ResourceManager.LabServices - sdk/lambdatesthyperexecute/Azure.ResourceManager.LambdaTestHyperExecute + - sdk/liftrweightsandbiases/Azure.ResourceManager.WeightsAndBiases - sdk/loadtestservice/Azure.ResourceManager.LoadTesting - sdk/logic/Azure.ResourceManager.Logic - sdk/machinelearningcompute/Azure.ResourceManager.MachineLearningCompute diff --git a/sdk/search/Azure.Search.Documents/src/Generated/AliasesRestClient.cs b/sdk/search/Azure.Search.Documents/src/Generated/AliasesRestClient.cs index e6da67e60f81..d234dfe78aac 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/AliasesRestClient.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/AliasesRestClient.cs @@ -18,7 +18,7 @@ namespace Azure.Search.Documents internal partial class AliasesRestClient { private readonly HttpPipeline _pipeline; - private readonly string _endpoint; + private readonly Uri _endpoint; private readonly Guid? _xMsClientRequestId; private readonly string _apiVersion; @@ -32,7 +32,7 @@ internal partial class AliasesRestClient /// The tracking ID sent with the request to help with debugging. /// Api Version. /// , , or is null. - public AliasesRestClient(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string endpoint, Guid? xMsClientRequestId = null, string apiVersion = "2025-03-01-preview") + public AliasesRestClient(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, Uri endpoint, Guid? xMsClientRequestId = null, string apiVersion = "2025-05-01-preview") { ClientDiagnostics = clientDiagnostics ?? throw new ArgumentNullException(nameof(clientDiagnostics)); _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); @@ -47,7 +47,7 @@ internal HttpMessage CreateCreateRequest(SearchAlias @alias) var request = message.Request; request.Method = RequestMethod.Post; var uri = new RawRequestUriBuilder(); - uri.AppendRaw(_endpoint, false); + uri.Reset(_endpoint); uri.AppendPath("/aliases", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; @@ -119,7 +119,7 @@ internal HttpMessage CreateListRequest() var request = message.Request; request.Method = RequestMethod.Get; var uri = new RawRequestUriBuilder(); - uri.AppendRaw(_endpoint, false); + uri.Reset(_endpoint); uri.AppendPath("/aliases", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; @@ -173,7 +173,7 @@ internal HttpMessage CreateCreateOrUpdateRequest(string aliasName, SearchAlias @ var request = message.Request; request.Method = RequestMethod.Put; var uri = new RawRequestUriBuilder(); - uri.AppendRaw(_endpoint, false); + uri.Reset(_endpoint); uri.AppendPath("/aliases('", false); uri.AppendPath(aliasName, true); uri.AppendPath("')", false); @@ -272,7 +272,7 @@ internal HttpMessage CreateDeleteRequest(string aliasName, string ifMatch, strin var request = message.Request; request.Method = RequestMethod.Delete; var uri = new RawRequestUriBuilder(); - uri.AppendRaw(_endpoint, false); + uri.Reset(_endpoint); uri.AppendPath("/aliases('", false); uri.AppendPath(aliasName, true); uri.AppendPath("')", false); @@ -346,7 +346,7 @@ internal HttpMessage CreateGetRequest(string aliasName) var request = message.Request; request.Method = RequestMethod.Get; var uri = new RawRequestUriBuilder(); - uri.AppendRaw(_endpoint, false); + uri.Reset(_endpoint); uri.AppendPath("/aliases('", false); uri.AppendPath(aliasName, true); uri.AppendPath("')", false); diff --git a/sdk/search/Azure.Search.Documents/src/Generated/DataSourcesRestClient.cs b/sdk/search/Azure.Search.Documents/src/Generated/DataSourcesRestClient.cs index 8e2fe902a54b..d9cf19a1abd3 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/DataSourcesRestClient.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/DataSourcesRestClient.cs @@ -18,7 +18,7 @@ namespace Azure.Search.Documents internal partial class DataSourcesRestClient { private readonly HttpPipeline _pipeline; - private readonly string _endpoint; + private readonly Uri _endpoint; private readonly Guid? _xMsClientRequestId; private readonly string _apiVersion; @@ -32,7 +32,7 @@ internal partial class DataSourcesRestClient /// The tracking ID sent with the request to help with debugging. /// Api Version. /// , , or is null. - public DataSourcesRestClient(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string endpoint, Guid? xMsClientRequestId = null, string apiVersion = "2025-03-01-preview") + public DataSourcesRestClient(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, Uri endpoint, Guid? xMsClientRequestId = null, string apiVersion = "2025-05-01-preview") { ClientDiagnostics = clientDiagnostics ?? throw new ArgumentNullException(nameof(clientDiagnostics)); _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); @@ -47,7 +47,7 @@ internal HttpMessage CreateCreateOrUpdateRequest(string dataSourceName, SearchIn var request = message.Request; request.Method = RequestMethod.Put; var uri = new RawRequestUriBuilder(); - uri.AppendRaw(_endpoint, false); + uri.Reset(_endpoint); uri.AppendPath("/datasources('", false); uri.AppendPath(dataSourceName, true); uri.AppendPath("')", false); @@ -152,7 +152,7 @@ internal HttpMessage CreateDeleteRequest(string dataSourceName, string ifMatch, var request = message.Request; request.Method = RequestMethod.Delete; var uri = new RawRequestUriBuilder(); - uri.AppendRaw(_endpoint, false); + uri.Reset(_endpoint); uri.AppendPath("/datasources('", false); uri.AppendPath(dataSourceName, true); uri.AppendPath("')", false); @@ -226,7 +226,7 @@ internal HttpMessage CreateGetRequest(string dataSourceName) var request = message.Request; request.Method = RequestMethod.Get; var uri = new RawRequestUriBuilder(); - uri.AppendRaw(_endpoint, false); + uri.Reset(_endpoint); uri.AppendPath("/datasources('", false); uri.AppendPath(dataSourceName, true); uri.AppendPath("')", false); @@ -296,7 +296,7 @@ internal HttpMessage CreateListRequest(string select) var request = message.Request; request.Method = RequestMethod.Get; var uri = new RawRequestUriBuilder(); - uri.AppendRaw(_endpoint, false); + uri.Reset(_endpoint); uri.AppendPath("/datasources", false); if (select != null) { @@ -356,7 +356,7 @@ internal HttpMessage CreateCreateRequest(SearchIndexerDataSourceConnection dataS var request = message.Request; request.Method = RequestMethod.Post; var uri = new RawRequestUriBuilder(); - uri.AppendRaw(_endpoint, false); + uri.Reset(_endpoint); uri.AppendPath("/datasources", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; diff --git a/sdk/search/Azure.Search.Documents/src/Generated/DocumentsRestClient.cs b/sdk/search/Azure.Search.Documents/src/Generated/DocumentsRestClient.cs index d7c476be46ac..339d70e1071f 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/DocumentsRestClient.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/DocumentsRestClient.cs @@ -19,7 +19,7 @@ namespace Azure.Search.Documents internal partial class DocumentsRestClient { private readonly HttpPipeline _pipeline; - private readonly string _endpoint; + private readonly Uri _endpoint; private readonly string _indexName; private readonly Guid? _xMsClientRequestId; private readonly string _apiVersion; @@ -36,7 +36,7 @@ internal partial class DocumentsRestClient /// Api Version. /// , , , or is null. /// is an empty string, and was expected to be non-empty. - public DocumentsRestClient(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string endpoint, string indexName, Guid? xMsClientRequestId = null, string apiVersion = "2025-03-01-preview") + public DocumentsRestClient(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, Uri endpoint, string indexName, Guid? xMsClientRequestId = null, string apiVersion = "2025-05-01-preview") { ClientDiagnostics = clientDiagnostics ?? throw new ArgumentNullException(nameof(clientDiagnostics)); _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); @@ -52,7 +52,7 @@ internal HttpMessage CreateCountRequest() var request = message.Request; request.Method = RequestMethod.Get; var uri = new RawRequestUriBuilder(); - uri.AppendRaw(_endpoint, false); + uri.Reset(_endpoint); uri.AppendRaw("/indexes('", false); uri.AppendRaw(_indexName, true); uri.AppendRaw("')", false); @@ -103,19 +103,23 @@ public Response Count(CancellationToken cancellationToken = default) } } - internal HttpMessage CreateSearchPostRequest(SearchOptions searchOptions) + internal HttpMessage CreateSearchPostRequest(SearchOptions searchOptions, string xMsQuerySourceAuthorization) { var message = _pipeline.CreateMessage(); var request = message.Request; request.Method = RequestMethod.Post; var uri = new RawRequestUriBuilder(); - uri.AppendRaw(_endpoint, false); + uri.Reset(_endpoint); uri.AppendRaw("/indexes('", false); uri.AppendRaw(_indexName, true); uri.AppendRaw("')", false); uri.AppendPath("/docs/search.post.search", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; + if (xMsQuerySourceAuthorization != null) + { + request.Headers.Add("x-ms-query-source-authorization", xMsQuerySourceAuthorization); + } request.Headers.Add("Accept", "application/json; odata.metadata=none"); request.Headers.Add("Content-Type", "application/json"); var content = new Utf8JsonRequestContent(); @@ -126,20 +130,22 @@ internal HttpMessage CreateSearchPostRequest(SearchOptions searchOptions) /// Searches for documents in the index. /// The definition of the Search request. + /// Token identifying the user for which the query is being executed. This token is used to enforce security restrictions on documents. /// The cancellation token to use. /// is null. - public async Task> SearchPostAsync(SearchOptions searchOptions, CancellationToken cancellationToken = default) + public async Task> SearchPostAsync(SearchOptions searchOptions, string xMsQuerySourceAuthorization = null, CancellationToken cancellationToken = default) { if (searchOptions == null) { throw new ArgumentNullException(nameof(searchOptions)); } - using var message = CreateSearchPostRequest(searchOptions); + using var message = CreateSearchPostRequest(searchOptions, xMsQuerySourceAuthorization); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: + case 206: { SearchDocumentsResult value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); @@ -153,20 +159,22 @@ public async Task> SearchPostAsync(SearchOptions /// Searches for documents in the index. /// The definition of the Search request. + /// Token identifying the user for which the query is being executed. This token is used to enforce security restrictions on documents. /// The cancellation token to use. /// is null. - public Response SearchPost(SearchOptions searchOptions, CancellationToken cancellationToken = default) + public Response SearchPost(SearchOptions searchOptions, string xMsQuerySourceAuthorization = null, CancellationToken cancellationToken = default) { if (searchOptions == null) { throw new ArgumentNullException(nameof(searchOptions)); } - using var message = CreateSearchPostRequest(searchOptions); + using var message = CreateSearchPostRequest(searchOptions, xMsQuerySourceAuthorization); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: + case 206: { SearchDocumentsResult value = default; using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); @@ -178,13 +186,13 @@ public Response SearchPost(SearchOptions searchOptions, C } } - internal HttpMessage CreateGetRequest(string key, IEnumerable selectedFields) + internal HttpMessage CreateGetRequest(string key, IEnumerable selectedFields, string xMsQuerySourceAuthorization) { var message = _pipeline.CreateMessage(); var request = message.Request; request.Method = RequestMethod.Get; var uri = new RawRequestUriBuilder(); - uri.AppendRaw(_endpoint, false); + uri.Reset(_endpoint); uri.AppendRaw("/indexes('", false); uri.AppendRaw(_indexName, true); uri.AppendRaw("')", false); @@ -197,6 +205,10 @@ internal HttpMessage CreateGetRequest(string key, IEnumerable selectedFi } uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; + if (xMsQuerySourceAuthorization != null) + { + request.Headers.Add("x-ms-query-source-authorization", xMsQuerySourceAuthorization); + } request.Headers.Add("Accept", "application/json; odata.metadata=none"); return message; } @@ -204,16 +216,17 @@ internal HttpMessage CreateGetRequest(string key, IEnumerable selectedFi /// Retrieves a document from the index. /// The key of the document to retrieve. /// List of field names to retrieve for the document; Any field not retrieved will be missing from the returned document. + /// Token identifying the user for which the query is being executed. This token is used to enforce security restrictions on documents. /// The cancellation token to use. /// is null. - public async Task>> GetAsync(string key, IEnumerable selectedFields = null, CancellationToken cancellationToken = default) + public async Task>> GetAsync(string key, IEnumerable selectedFields = null, string xMsQuerySourceAuthorization = null, CancellationToken cancellationToken = default) { if (key == null) { throw new ArgumentNullException(nameof(key)); } - using var message = CreateGetRequest(key, selectedFields); + using var message = CreateGetRequest(key, selectedFields, xMsQuerySourceAuthorization); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -244,16 +257,17 @@ public async Task>> GetAsync(string /// Retrieves a document from the index. /// The key of the document to retrieve. /// List of field names to retrieve for the document; Any field not retrieved will be missing from the returned document. + /// Token identifying the user for which the query is being executed. This token is used to enforce security restrictions on documents. /// The cancellation token to use. /// is null. - public Response> Get(string key, IEnumerable selectedFields = null, CancellationToken cancellationToken = default) + public Response> Get(string key, IEnumerable selectedFields = null, string xMsQuerySourceAuthorization = null, CancellationToken cancellationToken = default) { if (key == null) { throw new ArgumentNullException(nameof(key)); } - using var message = CreateGetRequest(key, selectedFields); + using var message = CreateGetRequest(key, selectedFields, xMsQuerySourceAuthorization); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { @@ -287,7 +301,7 @@ internal HttpMessage CreateSuggestPostRequest(SuggestOptions suggestOptions) var request = message.Request; request.Method = RequestMethod.Post; var uri = new RawRequestUriBuilder(); - uri.AppendRaw(_endpoint, false); + uri.Reset(_endpoint); uri.AppendRaw("/indexes('", false); uri.AppendRaw(_indexName, true); uri.AppendRaw("')", false); @@ -362,7 +376,7 @@ internal HttpMessage CreateIndexRequest(IndexBatch batch) var request = message.Request; request.Method = RequestMethod.Post; var uri = new RawRequestUriBuilder(); - uri.AppendRaw(_endpoint, false); + uri.Reset(_endpoint); uri.AppendRaw("/indexes('", false); uri.AppendRaw(_indexName, true); uri.AppendRaw("')", false); @@ -439,7 +453,7 @@ internal HttpMessage CreateAutocompletePostRequest(AutocompleteOptions autocompl var request = message.Request; request.Method = RequestMethod.Post; var uri = new RawRequestUriBuilder(); - uri.AppendRaw(_endpoint, false); + uri.Reset(_endpoint); uri.AppendRaw("/indexes('", false); uri.AppendRaw(_indexName, true); uri.AppendRaw("')", false); diff --git a/sdk/search/Azure.Search.Documents/src/Generated/IndexersRestClient.cs b/sdk/search/Azure.Search.Documents/src/Generated/IndexersRestClient.cs index d021cb826a9a..fa54cae1e4e4 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/IndexersRestClient.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/IndexersRestClient.cs @@ -6,6 +6,7 @@ #nullable disable using System; +using System.Collections.Generic; using System.Text.Json; using System.Threading; using System.Threading.Tasks; @@ -19,7 +20,7 @@ namespace Azure.Search.Documents internal partial class IndexersRestClient { private readonly HttpPipeline _pipeline; - private readonly string _endpoint; + private readonly Uri _endpoint; private readonly Guid? _xMsClientRequestId; private readonly string _apiVersion; @@ -33,7 +34,7 @@ internal partial class IndexersRestClient /// The tracking ID sent with the request to help with debugging. /// Api Version. /// , , or is null. - public IndexersRestClient(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string endpoint, Guid? xMsClientRequestId = null, string apiVersion = "2025-03-01-preview") + public IndexersRestClient(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, Uri endpoint, Guid? xMsClientRequestId = null, string apiVersion = "2025-05-01-preview") { ClientDiagnostics = clientDiagnostics ?? throw new ArgumentNullException(nameof(clientDiagnostics)); _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); @@ -48,7 +49,7 @@ internal HttpMessage CreateResetRequest(string indexerName) var request = message.Request; request.Method = RequestMethod.Post; var uri = new RawRequestUriBuilder(); - uri.AppendRaw(_endpoint, false); + uri.Reset(_endpoint); uri.AppendPath("/indexers('", false); uri.AppendPath(indexerName, true); uri.AppendPath("')/search.reset", false); @@ -108,7 +109,7 @@ internal HttpMessage CreateResetDocsRequest(string indexerName, bool? overwrite, var request = message.Request; request.Method = RequestMethod.Post; var uri = new RawRequestUriBuilder(); - uri.AppendRaw(_endpoint, false); + uri.Reset(_endpoint); uri.AppendPath("/indexers('", false); uri.AppendPath(indexerName, true); uri.AppendPath("')/search.resetdocs", false); @@ -177,13 +178,95 @@ public Response ResetDocs(string indexerName, bool? overwrite = null, ResetDocum } } + internal HttpMessage CreateResyncRequest(string indexerName, IEnumerable indexerResyncOptions) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/indexers('", false); + uri.AppendPath(indexerName, true); + uri.AppendPath("')/search.resync", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json; odata.metadata=minimal"); + if (indexerResyncOptions != null) + { + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteStartArray(); + foreach (var item in indexerResyncOptions) + { + content.JsonWriter.WriteStringValue(item.ToString()); + } + content.JsonWriter.WriteEndArray(); + request.Content = content; + } + return message; + } + + /// Resync selective options from the datasource to be re-ingested by the indexer. + /// The name of the indexer to resync for. + /// The where T is of type to use. + /// The cancellation token to use. + /// or is null. + public async Task ResyncAsync(string indexerName, IEnumerable indexerResyncOptions, CancellationToken cancellationToken = default) + { + if (indexerName == null) + { + throw new ArgumentNullException(nameof(indexerName)); + } + if (indexerResyncOptions == null) + { + throw new ArgumentNullException(nameof(indexerResyncOptions)); + } + + using var message = CreateResyncRequest(indexerName, indexerResyncOptions); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Resync selective options from the datasource to be re-ingested by the indexer. + /// The name of the indexer to resync for. + /// The where T is of type to use. + /// The cancellation token to use. + /// or is null. + public Response Resync(string indexerName, IEnumerable indexerResyncOptions, CancellationToken cancellationToken = default) + { + if (indexerName == null) + { + throw new ArgumentNullException(nameof(indexerName)); + } + if (indexerResyncOptions == null) + { + throw new ArgumentNullException(nameof(indexerResyncOptions)); + } + + using var message = CreateResyncRequest(indexerName, indexerResyncOptions); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + internal HttpMessage CreateRunRequest(string indexerName) { var message = _pipeline.CreateMessage(); var request = message.Request; request.Method = RequestMethod.Post; var uri = new RawRequestUriBuilder(); - uri.AppendRaw(_endpoint, false); + uri.Reset(_endpoint); uri.AppendPath("/indexers('", false); uri.AppendPath(indexerName, true); uri.AppendPath("')/search.run", false); @@ -243,7 +326,7 @@ internal HttpMessage CreateCreateOrUpdateRequest(string indexerName, SearchIndex var request = message.Request; request.Method = RequestMethod.Put; var uri = new RawRequestUriBuilder(); - uri.AppendRaw(_endpoint, false); + uri.Reset(_endpoint); uri.AppendPath("/indexers('", false); uri.AppendPath(indexerName, true); uri.AppendPath("')", false); @@ -354,7 +437,7 @@ internal HttpMessage CreateDeleteRequest(string indexerName, string ifMatch, str var request = message.Request; request.Method = RequestMethod.Delete; var uri = new RawRequestUriBuilder(); - uri.AppendRaw(_endpoint, false); + uri.Reset(_endpoint); uri.AppendPath("/indexers('", false); uri.AppendPath(indexerName, true); uri.AppendPath("')", false); @@ -428,7 +511,7 @@ internal HttpMessage CreateGetRequest(string indexerName) var request = message.Request; request.Method = RequestMethod.Get; var uri = new RawRequestUriBuilder(); - uri.AppendRaw(_endpoint, false); + uri.Reset(_endpoint); uri.AppendPath("/indexers('", false); uri.AppendPath(indexerName, true); uri.AppendPath("')", false); @@ -498,7 +581,7 @@ internal HttpMessage CreateListRequest(string select) var request = message.Request; request.Method = RequestMethod.Get; var uri = new RawRequestUriBuilder(); - uri.AppendRaw(_endpoint, false); + uri.Reset(_endpoint); uri.AppendPath("/indexers", false); if (select != null) { @@ -558,7 +641,7 @@ internal HttpMessage CreateCreateRequest(SearchIndexer indexer) var request = message.Request; request.Method = RequestMethod.Post; var uri = new RawRequestUriBuilder(); - uri.AppendRaw(_endpoint, false); + uri.Reset(_endpoint); uri.AppendPath("/indexers", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; @@ -630,7 +713,7 @@ internal HttpMessage CreateGetStatusRequest(string indexerName) var request = message.Request; request.Method = RequestMethod.Get; var uri = new RawRequestUriBuilder(); - uri.AppendRaw(_endpoint, false); + uri.Reset(_endpoint); uri.AppendPath("/indexers('", false); uri.AppendPath(indexerName, true); uri.AppendPath("')/search.status", false); diff --git a/sdk/search/Azure.Search.Documents/src/Generated/IndexesRestClient.cs b/sdk/search/Azure.Search.Documents/src/Generated/IndexesRestClient.cs index edf5d4c0b39f..eaf7794836a3 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/IndexesRestClient.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/IndexesRestClient.cs @@ -18,7 +18,7 @@ namespace Azure.Search.Documents internal partial class IndexesRestClient { private readonly HttpPipeline _pipeline; - private readonly string _endpoint; + private readonly Uri _endpoint; private readonly Guid? _xMsClientRequestId; private readonly string _apiVersion; @@ -32,7 +32,7 @@ internal partial class IndexesRestClient /// The tracking ID sent with the request to help with debugging. /// Api Version. /// , , or is null. - public IndexesRestClient(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string endpoint, Guid? xMsClientRequestId = null, string apiVersion = "2025-03-01-preview") + public IndexesRestClient(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, Uri endpoint, Guid? xMsClientRequestId = null, string apiVersion = "2025-05-01-preview") { ClientDiagnostics = clientDiagnostics ?? throw new ArgumentNullException(nameof(clientDiagnostics)); _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); @@ -47,7 +47,7 @@ internal HttpMessage CreateCreateRequest(SearchIndex index) var request = message.Request; request.Method = RequestMethod.Post; var uri = new RawRequestUriBuilder(); - uri.AppendRaw(_endpoint, false); + uri.Reset(_endpoint); uri.AppendPath("/indexes", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; @@ -119,7 +119,7 @@ internal HttpMessage CreateListRequest(string select) var request = message.Request; request.Method = RequestMethod.Get; var uri = new RawRequestUriBuilder(); - uri.AppendRaw(_endpoint, false); + uri.Reset(_endpoint); uri.AppendPath("/indexes", false); if (select != null) { @@ -179,7 +179,7 @@ internal HttpMessage CreateCreateOrUpdateRequest(string indexName, SearchIndex i var request = message.Request; request.Method = RequestMethod.Put; var uri = new RawRequestUriBuilder(); - uri.AppendRaw(_endpoint, false); + uri.Reset(_endpoint); uri.AppendPath("/indexes('", false); uri.AppendPath(indexName, true); uri.AppendPath("')", false); @@ -284,7 +284,7 @@ internal HttpMessage CreateDeleteRequest(string indexName, string ifMatch, strin var request = message.Request; request.Method = RequestMethod.Delete; var uri = new RawRequestUriBuilder(); - uri.AppendRaw(_endpoint, false); + uri.Reset(_endpoint); uri.AppendPath("/indexes('", false); uri.AppendPath(indexName, true); uri.AppendPath("')", false); @@ -358,7 +358,7 @@ internal HttpMessage CreateGetRequest(string indexName) var request = message.Request; request.Method = RequestMethod.Get; var uri = new RawRequestUriBuilder(); - uri.AppendRaw(_endpoint, false); + uri.Reset(_endpoint); uri.AppendPath("/indexes('", false); uri.AppendPath(indexName, true); uri.AppendPath("')", false); @@ -428,7 +428,7 @@ internal HttpMessage CreateGetStatisticsRequest(string indexName) var request = message.Request; request.Method = RequestMethod.Get; var uri = new RawRequestUriBuilder(); - uri.AppendRaw(_endpoint, false); + uri.Reset(_endpoint); uri.AppendPath("/indexes('", false); uri.AppendPath(indexName, true); uri.AppendPath("')/search.stats", false); @@ -498,7 +498,7 @@ internal HttpMessage CreateAnalyzeRequest(string indexName, AnalyzeTextOptions r var request0 = message.Request; request0.Method = RequestMethod.Post; var uri = new RawRequestUriBuilder(); - uri.AppendRaw(_endpoint, false); + uri.Reset(_endpoint); uri.AppendPath("/indexes('", false); uri.AppendPath(indexName, true); uri.AppendPath("')/search.analyze", false); diff --git a/sdk/search/Azure.Search.Documents/src/Generated/KnowledgeAgentsRestClient.cs b/sdk/search/Azure.Search.Documents/src/Generated/KnowledgeAgentsRestClient.cs new file mode 100644 index 000000000000..bba402b5aa4c --- /dev/null +++ b/sdk/search/Azure.Search.Documents/src/Generated/KnowledgeAgentsRestClient.cs @@ -0,0 +1,413 @@ +// 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.Search.Documents.Indexes.Models; + +namespace Azure.Search.Documents +{ + internal partial class KnowledgeAgentsRestClient + { + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly Guid? _xMsClientRequestId; + private readonly string _apiVersion; + + /// The ClientDiagnostics is used to provide tracing support for the client library. + internal ClientDiagnostics ClientDiagnostics { get; } + + /// Initializes a new instance of KnowledgeAgentsRestClient. + /// The handler for diagnostic messaging in the client. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The endpoint URL of the search service. + /// The tracking ID sent with the request to help with debugging. + /// Api Version. + /// , , or is null. + public KnowledgeAgentsRestClient(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, Uri endpoint, Guid? xMsClientRequestId = null, string apiVersion = "2025-05-01-preview") + { + ClientDiagnostics = clientDiagnostics ?? throw new ArgumentNullException(nameof(clientDiagnostics)); + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? throw new ArgumentNullException(nameof(endpoint)); + _xMsClientRequestId = xMsClientRequestId; + _apiVersion = apiVersion ?? throw new ArgumentNullException(nameof(apiVersion)); + } + + internal HttpMessage CreateCreateOrUpdateRequest(string agentName, KnowledgeAgent knowledgeAgent, string ifMatch, string ifNoneMatch) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Put; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/agents('", false); + uri.AppendPath(agentName, true); + uri.AppendPath("')", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + if (ifMatch != null) + { + request.Headers.Add("If-Match", ifMatch); + } + if (ifNoneMatch != null) + { + request.Headers.Add("If-None-Match", ifNoneMatch); + } + request.Headers.Add("Prefer", "return=representation"); + request.Headers.Add("Accept", "application/json; odata.metadata=minimal"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(knowledgeAgent); + request.Content = content; + return message; + } + + /// Creates a new agent or updates an agent if it already exists. + /// The name of the agent to create or update. + /// The definition of the agent to create or update. + /// Defines the If-Match condition. The operation will be performed only if the ETag on the server matches this value. + /// Defines the If-None-Match condition. The operation will be performed only if the ETag on the server does not match this value. + /// The cancellation token to use. + /// or is null. + public async Task> CreateOrUpdateAsync(string agentName, KnowledgeAgent knowledgeAgent, string ifMatch = null, string ifNoneMatch = null, CancellationToken cancellationToken = default) + { + if (agentName == null) + { + throw new ArgumentNullException(nameof(agentName)); + } + if (knowledgeAgent == null) + { + throw new ArgumentNullException(nameof(knowledgeAgent)); + } + + using var message = CreateCreateOrUpdateRequest(agentName, knowledgeAgent, ifMatch, ifNoneMatch); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 201: + { + KnowledgeAgent value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = KnowledgeAgent.DeserializeKnowledgeAgent(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Creates a new agent or updates an agent if it already exists. + /// The name of the agent to create or update. + /// The definition of the agent to create or update. + /// Defines the If-Match condition. The operation will be performed only if the ETag on the server matches this value. + /// Defines the If-None-Match condition. The operation will be performed only if the ETag on the server does not match this value. + /// The cancellation token to use. + /// or is null. + public Response CreateOrUpdate(string agentName, KnowledgeAgent knowledgeAgent, string ifMatch = null, string ifNoneMatch = null, CancellationToken cancellationToken = default) + { + if (agentName == null) + { + throw new ArgumentNullException(nameof(agentName)); + } + if (knowledgeAgent == null) + { + throw new ArgumentNullException(nameof(knowledgeAgent)); + } + + using var message = CreateCreateOrUpdateRequest(agentName, knowledgeAgent, ifMatch, ifNoneMatch); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 201: + { + KnowledgeAgent value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = KnowledgeAgent.DeserializeKnowledgeAgent(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateDeleteRequest(string agentName, string ifMatch, string ifNoneMatch) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Delete; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/agents('", false); + uri.AppendPath(agentName, true); + uri.AppendPath("')", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + if (ifMatch != null) + { + request.Headers.Add("If-Match", ifMatch); + } + if (ifNoneMatch != null) + { + request.Headers.Add("If-None-Match", ifNoneMatch); + } + request.Headers.Add("Accept", "application/json; odata.metadata=minimal"); + return message; + } + + /// Deletes an existing agent. + /// The name of the agent to delete. + /// Defines the If-Match condition. The operation will be performed only if the ETag on the server matches this value. + /// Defines the If-None-Match condition. The operation will be performed only if the ETag on the server does not match this value. + /// The cancellation token to use. + /// is null. + public async Task DeleteAsync(string agentName, string ifMatch = null, string ifNoneMatch = null, CancellationToken cancellationToken = default) + { + if (agentName == null) + { + throw new ArgumentNullException(nameof(agentName)); + } + + using var message = CreateDeleteRequest(agentName, ifMatch, ifNoneMatch); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 204: + case 404: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Deletes an existing agent. + /// The name of the agent to delete. + /// Defines the If-Match condition. The operation will be performed only if the ETag on the server matches this value. + /// Defines the If-None-Match condition. The operation will be performed only if the ETag on the server does not match this value. + /// The cancellation token to use. + /// is null. + public Response Delete(string agentName, string ifMatch = null, string ifNoneMatch = null, CancellationToken cancellationToken = default) + { + if (agentName == null) + { + throw new ArgumentNullException(nameof(agentName)); + } + + using var message = CreateDeleteRequest(agentName, ifMatch, ifNoneMatch); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 204: + case 404: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateGetRequest(string agentName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/agents('", false); + uri.AppendPath(agentName, true); + uri.AppendPath("')", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json; odata.metadata=minimal"); + return message; + } + + /// Retrieves an agent definition. + /// The name of the agent to retrieve. + /// The cancellation token to use. + /// is null. + public async Task> GetAsync(string agentName, CancellationToken cancellationToken = default) + { + if (agentName == null) + { + throw new ArgumentNullException(nameof(agentName)); + } + + using var message = CreateGetRequest(agentName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + KnowledgeAgent value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = KnowledgeAgent.DeserializeKnowledgeAgent(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Retrieves an agent definition. + /// The name of the agent to retrieve. + /// The cancellation token to use. + /// is null. + public Response Get(string agentName, CancellationToken cancellationToken = default) + { + if (agentName == null) + { + throw new ArgumentNullException(nameof(agentName)); + } + + using var message = CreateGetRequest(agentName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + KnowledgeAgent value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = KnowledgeAgent.DeserializeKnowledgeAgent(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateListRequest() + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/agents", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json; odata.metadata=minimal"); + return message; + } + + /// Lists all agents available for a search service. + /// The cancellation token to use. + public async Task> ListAsync(CancellationToken cancellationToken = default) + { + using var message = CreateListRequest(); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ListKnowledgeAgentsResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = ListKnowledgeAgentsResult.DeserializeListKnowledgeAgentsResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Lists all agents available for a search service. + /// The cancellation token to use. + public Response List(CancellationToken cancellationToken = default) + { + using var message = CreateListRequest(); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ListKnowledgeAgentsResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = ListKnowledgeAgentsResult.DeserializeListKnowledgeAgentsResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateCreateRequest(KnowledgeAgent knowledgeAgent) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/agents", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json; odata.metadata=minimal"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(knowledgeAgent); + request.Content = content; + return message; + } + + /// Creates a new agent. + /// The definition of the agent to create. + /// The cancellation token to use. + /// is null. + public async Task> CreateAsync(KnowledgeAgent knowledgeAgent, CancellationToken cancellationToken = default) + { + if (knowledgeAgent == null) + { + throw new ArgumentNullException(nameof(knowledgeAgent)); + } + + using var message = CreateCreateRequest(knowledgeAgent); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 201: + { + KnowledgeAgent value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = KnowledgeAgent.DeserializeKnowledgeAgent(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Creates a new agent. + /// The definition of the agent to create. + /// The cancellation token to use. + /// is null. + public Response Create(KnowledgeAgent knowledgeAgent, CancellationToken cancellationToken = default) + { + if (knowledgeAgent == null) + { + throw new ArgumentNullException(nameof(knowledgeAgent)); + } + + using var message = CreateCreateRequest(knowledgeAgent); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 201: + { + KnowledgeAgent value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = KnowledgeAgent.DeserializeKnowledgeAgent(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/KnowledgeRetrievalRestClient.cs b/sdk/search/Azure.Search.Documents/src/Generated/KnowledgeRetrievalRestClient.cs new file mode 100644 index 000000000000..de44eac8068b --- /dev/null +++ b/sdk/search/Azure.Search.Documents/src/Generated/KnowledgeRetrievalRestClient.cs @@ -0,0 +1,123 @@ +// 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.Search.Documents.Models; + +namespace Azure.Search.Documents +{ + internal partial class KnowledgeRetrievalRestClient + { + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _agentName; + private readonly Guid? _xMsClientRequestId; + private readonly string _apiVersion; + + /// The ClientDiagnostics is used to provide tracing support for the client library. + internal ClientDiagnostics ClientDiagnostics { get; } + + /// Initializes a new instance of KnowledgeRetrievalRestClient. + /// The handler for diagnostic messaging in the client. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The endpoint URL of the search service. + /// The name of the agent. + /// The tracking ID sent with the request to help with debugging. + /// Api Version. + /// , , , or is null. + /// is an empty string, and was expected to be non-empty. + public KnowledgeRetrievalRestClient(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, Uri endpoint, string agentName, Guid? xMsClientRequestId = null, string apiVersion = "2025-05-01-preview") + { + ClientDiagnostics = clientDiagnostics ?? throw new ArgumentNullException(nameof(clientDiagnostics)); + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? throw new ArgumentNullException(nameof(endpoint)); + _agentName = agentName ?? throw new ArgumentNullException(nameof(agentName)); + _xMsClientRequestId = xMsClientRequestId; + _apiVersion = apiVersion ?? throw new ArgumentNullException(nameof(apiVersion)); + } + + internal HttpMessage CreateRetrieveRequest(KnowledgeAgentRetrievalRequest retrievalRequest) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRaw("/agents('", false); + uri.AppendRaw(_agentName, true); + uri.AppendRaw("')", false); + uri.AppendPath("/retrieve", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json; odata.metadata=minimal"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(retrievalRequest); + request.Content = content; + return message; + } + + /// KnowledgeAgent retrieves relevant data from backing stores. + /// The retrieval request to process. + /// The cancellation token to use. + /// is null. + public async Task> RetrieveAsync(KnowledgeAgentRetrievalRequest retrievalRequest, CancellationToken cancellationToken = default) + { + if (retrievalRequest == null) + { + throw new ArgumentNullException(nameof(retrievalRequest)); + } + + using var message = CreateRetrieveRequest(retrievalRequest); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + KnowledgeAgentRetrievalResponse value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = KnowledgeAgentRetrievalResponse.DeserializeKnowledgeAgentRetrievalResponse(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// KnowledgeAgent retrieves relevant data from backing stores. + /// The retrieval request to process. + /// The cancellation token to use. + /// is null. + public Response Retrieve(KnowledgeAgentRetrievalRequest retrievalRequest, CancellationToken cancellationToken = default) + { + if (retrievalRequest == null) + { + throw new ArgumentNullException(nameof(retrievalRequest)); + } + + using var message = CreateRetrieveRequest(retrievalRequest); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + KnowledgeAgentRetrievalResponse value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = KnowledgeAgentRetrievalResponse.DeserializeKnowledgeAgentRetrievalResponse(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/AIFoundryModelCatalogName.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/AIFoundryModelCatalogName.cs index d65745f5b56d..c5dbf1343bc9 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/AIFoundryModelCatalogName.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/AIFoundryModelCatalogName.cs @@ -10,7 +10,7 @@ namespace Azure.Search.Documents.Indexes.Models { - /// The name of the embedding model from the Azure AI Studio Catalog that will be called. + /// The name of the embedding model from the Azure AI Foundry Catalog that will be called. public readonly partial struct AIFoundryModelCatalogName : IEquatable { private readonly string _value; @@ -28,6 +28,7 @@ public AIFoundryModelCatalogName(string value) private const string FacebookDinoV2ImageEmbeddingsViTGiantValue = "Facebook-DinoV2-Image-Embeddings-ViT-Giant"; private const string CohereEmbedV3EnglishValue = "Cohere-embed-v3-english"; private const string CohereEmbedV3MultilingualValue = "Cohere-embed-v3-multilingual"; + private const string CohereEmbedV4Value = "Cohere-embed-v4"; /// OpenAI-CLIP-Image-Text-Embeddings-vit-base-patch32. public static AIFoundryModelCatalogName OpenAIClipImageTextEmbeddingsVitBasePatch32 { get; } = new AIFoundryModelCatalogName(OpenAIClipImageTextEmbeddingsVitBasePatch32Value); @@ -41,6 +42,8 @@ public AIFoundryModelCatalogName(string value) public static AIFoundryModelCatalogName CohereEmbedV3English { get; } = new AIFoundryModelCatalogName(CohereEmbedV3EnglishValue); /// Cohere-embed-v3-multilingual. public static AIFoundryModelCatalogName CohereEmbedV3Multilingual { get; } = new AIFoundryModelCatalogName(CohereEmbedV3MultilingualValue); + /// Cohere embed v4 model for generating embeddings from both text and images. + public static AIFoundryModelCatalogName CohereEmbedV4 { get; } = new AIFoundryModelCatalogName(CohereEmbedV4Value); /// Determines if two values are the same. public static bool operator ==(AIFoundryModelCatalogName left, AIFoundryModelCatalogName right) => left.Equals(right); /// Determines if two values are not the same. diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/AzureMachineLearningParameters.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/AzureMachineLearningParameters.cs index 933ce5586932..899f99a9246b 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/AzureMachineLearningParameters.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/AzureMachineLearningParameters.cs @@ -25,7 +25,7 @@ public AzureMachineLearningParameters(Uri scoringUri) /// (Required for token authentication). The Azure Resource Manager resource ID of the AML service. It should be in the format subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.MachineLearningServices/workspaces/{workspace-name}/services/{service_name}. /// (Optional) When specified, indicates the timeout for the http client making the API call. /// (Optional for token authentication). The region the AML service is deployed in. - /// The name of the embedding model from the Azure AI Studio Catalog that is deployed at the provided endpoint. + /// The name of the embedding model from the Azure AI Foundry Catalog that is deployed at the provided endpoint. internal AzureMachineLearningParameters(Uri scoringUri, string authenticationKey, string resourceId, TimeSpan? timeout, string region, AIFoundryModelCatalogName? modelName) { ScoringUri = scoringUri; @@ -46,7 +46,7 @@ internal AzureMachineLearningParameters(Uri scoringUri, string authenticationKey public TimeSpan? Timeout { get; set; } /// (Optional for token authentication). The region the AML service is deployed in. public string Region { get; set; } - /// The name of the embedding model from the Azure AI Studio Catalog that is deployed at the provided endpoint. + /// The name of the embedding model from the Azure AI Foundry Catalog that is deployed at the provided endpoint. public AIFoundryModelCatalogName? ModelName { get; set; } } } diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/AzureMachineLearningVectorizer.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/AzureMachineLearningVectorizer.cs index 7aef8e982c11..a459785ad47d 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/AzureMachineLearningVectorizer.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/AzureMachineLearningVectorizer.cs @@ -9,7 +9,7 @@ namespace Azure.Search.Documents.Indexes.Models { - /// Specifies an Azure Machine Learning endpoint deployed via the Azure AI Studio Model Catalog for generating the vector embedding of a query string. + /// Specifies an Azure Machine Learning endpoint deployed via the Azure AI Foundry Model Catalog for generating the vector embedding of a query string. public partial class AzureMachineLearningVectorizer : VectorSearchVectorizer { /// Initializes a new instance of . diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/ChatCompletionExtraParametersBehavior.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/ChatCompletionExtraParametersBehavior.cs new file mode 100644 index 000000000000..326bc420aa3d --- /dev/null +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/ChatCompletionExtraParametersBehavior.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.Search.Documents.Indexes.Models +{ + /// Specifies how 'extraParameters' should be handled by Azure AI Foundry. Defaults to 'error'. + public readonly partial struct ChatCompletionExtraParametersBehavior : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public ChatCompletionExtraParametersBehavior(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string PassThroughValue = "passThrough"; + private const string DropValue = "drop"; + private const string ErrorValue = "error"; + + /// Passes any extra parameters directly to the model. + public static ChatCompletionExtraParametersBehavior PassThrough { get; } = new ChatCompletionExtraParametersBehavior(PassThroughValue); + /// Drops all extra parameters. + public static ChatCompletionExtraParametersBehavior Drop { get; } = new ChatCompletionExtraParametersBehavior(DropValue); + /// Raises an error if any extra parameter is present. + public static ChatCompletionExtraParametersBehavior Error { get; } = new ChatCompletionExtraParametersBehavior(ErrorValue); + /// Determines if two values are the same. + public static bool operator ==(ChatCompletionExtraParametersBehavior left, ChatCompletionExtraParametersBehavior right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(ChatCompletionExtraParametersBehavior left, ChatCompletionExtraParametersBehavior right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator ChatCompletionExtraParametersBehavior(string value) => new ChatCompletionExtraParametersBehavior(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is ChatCompletionExtraParametersBehavior other && Equals(other); + /// + public bool Equals(ChatCompletionExtraParametersBehavior 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/search/Azure.Search.Documents/src/Generated/Models/ChatCompletionResponseFormat.Serialization.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/ChatCompletionResponseFormat.Serialization.cs new file mode 100644 index 000000000000..9eccc2a587d4 --- /dev/null +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/ChatCompletionResponseFormat.Serialization.cs @@ -0,0 +1,88 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; +using Azure.Search.Documents.Models; + +namespace Azure.Search.Documents.Indexes.Models +{ + public partial class ChatCompletionResponseFormat : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Type)) + { + writer.WritePropertyName("type"u8); + writer.WriteStringValue(Type.Value.ToString()); + } + if (Optional.IsDefined(ChatCompletionSchemaProperties)) + { + if (ChatCompletionSchemaProperties != null) + { + writer.WritePropertyName("jsonSchemaProperties"u8); + writer.WriteObjectValue(ChatCompletionSchemaProperties); + } + else + { + writer.WriteNull("jsonSchemaProperties"); + } + } + writer.WriteEndObject(); + } + + internal static ChatCompletionResponseFormat DeserializeChatCompletionResponseFormat(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ChatCompletionResponseFormatType? type = default; + ChatCompletionResponseFormatJsonSchemaProperties jsonSchemaProperties = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + type = new ChatCompletionResponseFormatType(property.Value.GetString()); + continue; + } + if (property.NameEquals("jsonSchemaProperties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + jsonSchemaProperties = null; + continue; + } + jsonSchemaProperties = ChatCompletionResponseFormatJsonSchemaProperties.DeserializeChatCompletionResponseFormatJsonSchemaProperties(property.Value); + continue; + } + } + return new ChatCompletionResponseFormat(type, jsonSchemaProperties); + } + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static ChatCompletionResponseFormat FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeChatCompletionResponseFormat(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this); + return content; + } + } +} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/ChatCompletionResponseFormat.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/ChatCompletionResponseFormat.cs new file mode 100644 index 000000000000..69b584b748b0 --- /dev/null +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/ChatCompletionResponseFormat.cs @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using Azure.Search.Documents.Models; + +namespace Azure.Search.Documents.Indexes.Models +{ + /// Determines how the language model's response should be serialized. Defaults to 'text'. + public partial class ChatCompletionResponseFormat + { + /// Initializes a new instance of . + public ChatCompletionResponseFormat() + { + } + + /// Initializes a new instance of . + /// Specifies how the LLM should format the response. Possible values: 'text' (plain string), 'json_object' (arbitrary JSON), or 'json_schema' (adheres to provided schema). + /// An open dictionary for extended properties. Required if 'type' == 'json_schema'. + internal ChatCompletionResponseFormat(ChatCompletionResponseFormatType? type, ChatCompletionResponseFormatJsonSchemaProperties chatCompletionSchemaProperties) + { + Type = type; + ChatCompletionSchemaProperties = chatCompletionSchemaProperties; + } + + /// Specifies how the LLM should format the response. Possible values: 'text' (plain string), 'json_object' (arbitrary JSON), or 'json_schema' (adheres to provided schema). + public ChatCompletionResponseFormatType? Type { get; set; } + /// An open dictionary for extended properties. Required if 'type' == 'json_schema'. + public ChatCompletionResponseFormatJsonSchemaProperties ChatCompletionSchemaProperties { get; set; } + } +} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/ChatCompletionResponseFormatJsonSchemaProperties.Serialization.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/ChatCompletionResponseFormatJsonSchemaProperties.Serialization.cs new file mode 100644 index 000000000000..9b4cd8bfc4c4 --- /dev/null +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/ChatCompletionResponseFormatJsonSchemaProperties.Serialization.cs @@ -0,0 +1,134 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; +using Azure.Search.Documents.Indexes.Models; + +namespace Azure.Search.Documents.Models +{ + public partial class ChatCompletionResponseFormatJsonSchemaProperties : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Name)) + { + if (Name != null) + { + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + } + else + { + writer.WriteNull("name"); + } + } + if (Optional.IsDefined(Description)) + { + if (Description != null) + { + writer.WritePropertyName("description"u8); + writer.WriteStringValue(Description); + } + else + { + writer.WriteNull("description"); + } + } + if (Optional.IsDefined(Strict)) + { + writer.WritePropertyName("strict"u8); + writer.WriteBooleanValue(Strict.Value); + } + if (Optional.IsDefined(Schema)) + { + if (Schema != null) + { + writer.WritePropertyName("schema"u8); + writer.WriteObjectValue(Schema); + } + else + { + writer.WriteNull("schema"); + } + } + writer.WriteEndObject(); + } + + internal static ChatCompletionResponseFormatJsonSchemaProperties DeserializeChatCompletionResponseFormatJsonSchemaProperties(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string name = default; + string description = default; + bool? strict = default; + ChatCompletionSchema schema = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("name"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + name = null; + continue; + } + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("description"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + description = null; + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("strict"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + strict = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("schema"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + schema = null; + continue; + } + schema = ChatCompletionSchema.DeserializeChatCompletionSchema(property.Value); + continue; + } + } + return new ChatCompletionResponseFormatJsonSchemaProperties(name, description, strict, schema); + } + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static ChatCompletionResponseFormatJsonSchemaProperties FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeChatCompletionResponseFormatJsonSchemaProperties(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this); + return content; + } + } +} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/ChatCompletionResponseFormatJsonSchemaProperties.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/ChatCompletionResponseFormatJsonSchemaProperties.cs new file mode 100644 index 000000000000..ee2a8100b60c --- /dev/null +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/ChatCompletionResponseFormatJsonSchemaProperties.cs @@ -0,0 +1,42 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using Azure.Search.Documents.Indexes.Models; + +namespace Azure.Search.Documents.Models +{ + /// An open dictionary for extended properties. Required if 'type' == 'json_schema'. + public partial class ChatCompletionResponseFormatJsonSchemaProperties + { + /// Initializes a new instance of . + public ChatCompletionResponseFormatJsonSchemaProperties() + { + } + + /// Initializes a new instance of . + /// Name of the json schema the model will adhere to. + /// Description of the json schema the model will adhere to. + /// Whether or not the model's response should use structured outputs. Default is true. + /// Object defining the custom schema the model will use to structure its output. + internal ChatCompletionResponseFormatJsonSchemaProperties(string name, string description, bool? strict, ChatCompletionSchema schema) + { + Name = name; + Description = description; + Strict = strict; + Schema = schema; + } + + /// Name of the json schema the model will adhere to. + public string Name { get; set; } + /// Description of the json schema the model will adhere to. + public string Description { get; set; } + /// Whether or not the model's response should use structured outputs. Default is true. + public bool? Strict { get; set; } + /// Object defining the custom schema the model will use to structure its output. + public ChatCompletionSchema Schema { get; set; } + } +} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/ChatCompletionResponseFormatType.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/ChatCompletionResponseFormatType.cs new file mode 100644 index 000000000000..849d3b79137a --- /dev/null +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/ChatCompletionResponseFormatType.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.Search.Documents.Models +{ + /// Specifies how the LLM should format the response. Possible values: 'text' (plain string), 'json_object' (arbitrary JSON), or 'json_schema' (adheres to provided schema). + public readonly partial struct ChatCompletionResponseFormatType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public ChatCompletionResponseFormatType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string TextValue = "text"; + private const string JsonObjectValue = "jsonObject"; + private const string JsonSchemaValue = "jsonSchema"; + + /// text. + public static ChatCompletionResponseFormatType Text { get; } = new ChatCompletionResponseFormatType(TextValue); + /// jsonObject. + public static ChatCompletionResponseFormatType JsonObject { get; } = new ChatCompletionResponseFormatType(JsonObjectValue); + /// jsonSchema. + public static ChatCompletionResponseFormatType JsonSchema { get; } = new ChatCompletionResponseFormatType(JsonSchemaValue); + /// Determines if two values are the same. + public static bool operator ==(ChatCompletionResponseFormatType left, ChatCompletionResponseFormatType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(ChatCompletionResponseFormatType left, ChatCompletionResponseFormatType right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator ChatCompletionResponseFormatType(string value) => new ChatCompletionResponseFormatType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is ChatCompletionResponseFormatType other && Equals(other); + /// + public bool Equals(ChatCompletionResponseFormatType 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/search/Azure.Search.Documents/src/Generated/Models/ChatCompletionSchema.Serialization.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/ChatCompletionSchema.Serialization.cs new file mode 100644 index 000000000000..9078adc11e52 --- /dev/null +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/ChatCompletionSchema.Serialization.cs @@ -0,0 +1,112 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Search.Documents.Indexes.Models +{ + public partial class ChatCompletionSchema : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Type)) + { + writer.WritePropertyName("type"u8); + writer.WriteStringValue(Type); + } + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"u8); + writer.WriteStringValue(Properties); + } + if (Optional.IsCollectionDefined(Required)) + { + writer.WritePropertyName("required"u8); + writer.WriteStartArray(); + foreach (var item in Required) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(AdditionalProperties)) + { + writer.WritePropertyName("additionalProperties"u8); + writer.WriteBooleanValue(AdditionalProperties.Value); + } + writer.WriteEndObject(); + } + + internal static ChatCompletionSchema DeserializeChatCompletionSchema(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string type = default; + string properties = default; + IList required = default; + bool? additionalProperties = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type"u8)) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("properties"u8)) + { + properties = property.Value.GetString(); + continue; + } + if (property.NameEquals("required"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + required = array; + continue; + } + if (property.NameEquals("additionalProperties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + additionalProperties = property.Value.GetBoolean(); + continue; + } + } + return new ChatCompletionSchema(type, properties, required ?? new ChangeTrackingList(), additionalProperties); + } + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static ChatCompletionSchema FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeChatCompletionSchema(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this); + return content; + } + } +} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/ChatCompletionSchema.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/ChatCompletionSchema.cs new file mode 100644 index 000000000000..a5216aa5d7d0 --- /dev/null +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/ChatCompletionSchema.cs @@ -0,0 +1,43 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; + +namespace Azure.Search.Documents.Indexes.Models +{ + /// Object defining the custom schema the model will use to structure its output. + public partial class ChatCompletionSchema + { + /// Initializes a new instance of . + public ChatCompletionSchema() + { + Required = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// Type of schema representation. Usually 'object'. Default is 'object'. + /// A JSON-formatted string that defines the output schema's properties and constraints for the model. + /// An array of the property names that are required to be part of the model's response. All properties must be included for structured outputs. + /// Controls whether it is allowable for an object to contain additional keys / values that were not defined in the JSON Schema. Default is false. + internal ChatCompletionSchema(string type, string properties, IList required, bool? additionalProperties) + { + Type = type; + Properties = properties; + Required = required; + AdditionalProperties = additionalProperties; + } + + /// Type of schema representation. Usually 'object'. Default is 'object'. + public string Type { get; set; } + /// A JSON-formatted string that defines the output schema's properties and constraints for the model. + public string Properties { get; set; } + /// An array of the property names that are required to be part of the model's response. All properties must be included for structured outputs. + public IList Required { get; } + /// Controls whether it is allowable for an object to contain additional keys / values that were not defined in the JSON Schema. Default is false. + public bool? AdditionalProperties { get; set; } + } +} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/ChatCompletionSkill.Serialization.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/ChatCompletionSkill.Serialization.cs new file mode 100644 index 000000000000..712aefac920a --- /dev/null +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/ChatCompletionSkill.Serialization.cs @@ -0,0 +1,417 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Search.Documents.Indexes.Models +{ + public partial class ChatCompletionSkill : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(ApiKey)) + { + writer.WritePropertyName("apiKey"u8); + writer.WriteStringValue(ApiKey); + } + if (Optional.IsDefined(CommonModelParameters)) + { + writer.WritePropertyName("commonModelParameters"u8); + writer.WriteObjectValue(CommonModelParameters); + } + if (Optional.IsCollectionDefined(ExtraParameters)) + { + if (ExtraParameters != null) + { + writer.WritePropertyName("extraParameters"u8); + writer.WriteStartObject(); + foreach (var item in ExtraParameters) + { + writer.WritePropertyName(item.Key); + if (item.Value == null) + { + writer.WriteNullValue(); + continue; + } + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + else + { + writer.WriteNull("extraParameters"); + } + } + if (Optional.IsDefined(ExtraParametersBehavior)) + { + writer.WritePropertyName("extraParametersBehavior"u8); + writer.WriteStringValue(ExtraParametersBehavior.Value.ToString()); + } + if (Optional.IsDefined(ResponseFormat)) + { + writer.WritePropertyName("responseFormat"u8); + writer.WriteObjectValue(ResponseFormat); + } + writer.WritePropertyName("uri"u8); + writer.WriteStringValue(Uri); + if (Optional.IsCollectionDefined(HttpHeaders)) + { + if (HttpHeaders != null) + { + writer.WritePropertyName("httpHeaders"u8); + writer.WriteStartObject(); + foreach (var item in HttpHeaders) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + else + { + writer.WriteNull("httpHeaders"); + } + } + if (Optional.IsDefined(HttpMethod)) + { + writer.WritePropertyName("httpMethod"u8); + writer.WriteStringValue(HttpMethod); + } + if (Optional.IsDefined(Timeout)) + { + if (Timeout != null) + { + writer.WritePropertyName("timeout"u8); + writer.WriteStringValue(Timeout.Value, "P"); + } + else + { + writer.WriteNull("timeout"); + } + } + if (Optional.IsDefined(BatchSize)) + { + if (BatchSize != null) + { + writer.WritePropertyName("batchSize"u8); + writer.WriteNumberValue(BatchSize.Value); + } + else + { + writer.WriteNull("batchSize"); + } + } + if (Optional.IsDefined(DegreeOfParallelism)) + { + if (DegreeOfParallelism != null) + { + writer.WritePropertyName("degreeOfParallelism"u8); + writer.WriteNumberValue(DegreeOfParallelism.Value); + } + else + { + writer.WriteNull("degreeOfParallelism"); + } + } + if (Optional.IsDefined(AuthResourceId)) + { + if (AuthResourceId != null) + { + writer.WritePropertyName("authResourceId"u8); + writer.WriteStringValue(AuthResourceId); + } + else + { + writer.WriteNull("authResourceId"); + } + } + if (Optional.IsDefined(AuthIdentity)) + { + if (AuthIdentity != null) + { + writer.WritePropertyName("authIdentity"u8); + writer.WriteObjectValue(AuthIdentity); + } + else + { + writer.WriteNull("authIdentity"); + } + } + writer.WritePropertyName("@odata.type"u8); + writer.WriteStringValue(ODataType); + if (Optional.IsDefined(Name)) + { + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + } + if (Optional.IsDefined(Description)) + { + writer.WritePropertyName("description"u8); + writer.WriteStringValue(Description); + } + if (Optional.IsDefined(Context)) + { + writer.WritePropertyName("context"u8); + writer.WriteStringValue(Context); + } + writer.WritePropertyName("inputs"u8); + writer.WriteStartArray(); + foreach (var item in Inputs) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + writer.WritePropertyName("outputs"u8); + writer.WriteStartArray(); + foreach (var item in Outputs) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + writer.WriteEndObject(); + } + + internal static ChatCompletionSkill DeserializeChatCompletionSkill(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string apiKey = default; + CommonModelParameters commonModelParameters = default; + IDictionary extraParameters = default; + ChatCompletionExtraParametersBehavior? extraParametersBehavior = default; + ChatCompletionResponseFormat responseFormat = default; + string uri = default; + IDictionary httpHeaders = default; + string httpMethod = default; + TimeSpan? timeout = default; + int? batchSize = default; + int? degreeOfParallelism = default; + ResourceIdentifier authResourceId = default; + SearchIndexerDataIdentity authIdentity = default; + string odataType = default; + string name = default; + string description = default; + string context = default; + IList inputs = default; + IList outputs = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("apiKey"u8)) + { + apiKey = property.Value.GetString(); + continue; + } + if (property.NameEquals("commonModelParameters"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + commonModelParameters = CommonModelParameters.DeserializeCommonModelParameters(property.Value); + continue; + } + if (property.NameEquals("extraParameters"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + extraParameters = null; + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property0.Name, null); + } + else + { + dictionary.Add(property0.Name, property0.Value.GetObject()); + } + } + extraParameters = dictionary; + continue; + } + if (property.NameEquals("extraParametersBehavior"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + extraParametersBehavior = new ChatCompletionExtraParametersBehavior(property.Value.GetString()); + continue; + } + if (property.NameEquals("responseFormat"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + responseFormat = ChatCompletionResponseFormat.DeserializeChatCompletionResponseFormat(property.Value); + continue; + } + if (property.NameEquals("uri"u8)) + { + uri = property.Value.GetString(); + continue; + } + if (property.NameEquals("httpHeaders"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + httpHeaders = null; + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + httpHeaders = dictionary; + continue; + } + if (property.NameEquals("httpMethod"u8)) + { + httpMethod = property.Value.GetString(); + continue; + } + if (property.NameEquals("timeout"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + timeout = null; + continue; + } + timeout = property.Value.GetTimeSpan("P"); + continue; + } + if (property.NameEquals("batchSize"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + batchSize = null; + continue; + } + batchSize = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("degreeOfParallelism"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + degreeOfParallelism = null; + continue; + } + degreeOfParallelism = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("authResourceId"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + authResourceId = null; + continue; + } + authResourceId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("authIdentity"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + authIdentity = null; + continue; + } + authIdentity = SearchIndexerDataIdentity.DeserializeSearchIndexerDataIdentity(property.Value); + continue; + } + if (property.NameEquals("@odata.type"u8)) + { + odataType = property.Value.GetString(); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("description"u8)) + { + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("context"u8)) + { + context = property.Value.GetString(); + continue; + } + if (property.NameEquals("inputs"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(InputFieldMappingEntry.DeserializeInputFieldMappingEntry(item)); + } + inputs = array; + continue; + } + if (property.NameEquals("outputs"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(OutputFieldMappingEntry.DeserializeOutputFieldMappingEntry(item)); + } + outputs = array; + continue; + } + } + return new ChatCompletionSkill( + odataType, + name, + description, + context, + inputs, + outputs, + uri, + httpHeaders ?? new ChangeTrackingDictionary(), + httpMethod, + timeout, + batchSize, + degreeOfParallelism, + authResourceId, + authIdentity, + apiKey, + commonModelParameters, + extraParameters ?? new ChangeTrackingDictionary(), + extraParametersBehavior, + responseFormat); + } + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static new ChatCompletionSkill FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeChatCompletionSkill(document.RootElement); + } + + /// Convert into a . + internal override RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this); + return content; + } + } +} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/ChatCompletionSkill.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/ChatCompletionSkill.cs new file mode 100644 index 000000000000..2f2d564ac4c0 --- /dev/null +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/ChatCompletionSkill.cs @@ -0,0 +1,77 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.Search.Documents.Indexes.Models +{ + /// A skill that calls a language model via Azure AI Foundry's Chat Completions endpoint. + public partial class ChatCompletionSkill : WebApiSkill + { + /// Initializes a new instance of . + /// Inputs of the skills could be a column in the source data set, or the output of an upstream skill. + /// The output of a skill is either a field in a search index, or a value that can be consumed as an input by another skill. + /// The url for the Web API. + /// , or is null. + public ChatCompletionSkill(IEnumerable inputs, IEnumerable outputs, string uri) : base(inputs, outputs, uri) + { + Argument.AssertNotNull(inputs, nameof(inputs)); + Argument.AssertNotNull(outputs, nameof(outputs)); + Argument.AssertNotNull(uri, nameof(uri)); + + ExtraParameters = new ChangeTrackingDictionary(); + ODataType = "#Microsoft.Skills.Custom.ChatCompletionSkill"; + } + + /// Initializes a new instance of . + /// A URI fragment specifying the type of skill. + /// The name of the skill which uniquely identifies it within the skillset. A skill with no name defined will be given a default name of its 1-based index in the skills array, prefixed with the character '#'. + /// The description of the skill which describes the inputs, outputs, and usage of the skill. + /// Represents the level at which operations take place, such as the document root or document content (for example, /document or /document/content). The default is /document. + /// Inputs of the skills could be a column in the source data set, or the output of an upstream skill. + /// The output of a skill is either a field in a search index, or a value that can be consumed as an input by another skill. + /// The url for the Web API. + /// The headers required to make the http request. + /// The method for the http request. + /// The desired timeout for the request. Default is 30 seconds. + /// The desired batch size which indicates number of documents. + /// If set, the number of parallel calls that can be made to the Web API. + /// Applies to custom skills that connect to external code in an Azure function or some other application that provides the transformations. This value should be the application ID created for the function or app when it was registered with Azure Active Directory. When specified, the custom skill connects to the function or app using a managed ID (either system or user-assigned) of the search service and the access token of the function or app, using this value as the resource id for creating the scope of the access token. + /// + /// The user-assigned managed identity used for outbound connections. If an authResourceId is provided and it's not specified, the system-assigned managed identity is used. On updates to the indexer, if the identity is unspecified, the value remains unchanged. If set to "none", the value of this property is cleared. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include and . + /// + /// API key for authenticating to the model. Both apiKey and authIdentity cannot be specified at the same time. + /// Common language model parameters that customers can tweak. If omitted, reasonable defaults will be applied. + /// Open-type dictionary for model-specific parameters that should be appended to the chat completions call. Follows Azure AI Foundry’s extensibility pattern. + /// How extra parameters are handled by Azure AI Foundry. Default is 'error'. + /// Determines how the LLM should format its response. Defaults to 'text' response type. + internal ChatCompletionSkill(string oDataType, string name, string description, string context, IList inputs, IList outputs, string uri, IDictionary httpHeaders, string httpMethod, TimeSpan? timeout, int? batchSize, int? degreeOfParallelism, ResourceIdentifier authResourceId, SearchIndexerDataIdentity authIdentity, string apiKey, CommonModelParameters commonModelParameters, IDictionary extraParameters, ChatCompletionExtraParametersBehavior? extraParametersBehavior, ChatCompletionResponseFormat responseFormat) : base(oDataType, name, description, context, inputs, outputs, uri, httpHeaders, httpMethod, timeout, batchSize, degreeOfParallelism, authResourceId, authIdentity) + { + ApiKey = apiKey; + CommonModelParameters = commonModelParameters; + ExtraParameters = extraParameters; + ExtraParametersBehavior = extraParametersBehavior; + ResponseFormat = responseFormat; + ODataType = oDataType ?? "#Microsoft.Skills.Custom.ChatCompletionSkill"; + } + + /// API key for authenticating to the model. Both apiKey and authIdentity cannot be specified at the same time. + public string ApiKey { get; set; } + /// Common language model parameters that customers can tweak. If omitted, reasonable defaults will be applied. + public CommonModelParameters CommonModelParameters { get; set; } + /// Open-type dictionary for model-specific parameters that should be appended to the chat completions call. Follows Azure AI Foundry’s extensibility pattern. + public IDictionary ExtraParameters { get; set; } + /// How extra parameters are handled by Azure AI Foundry. Default is 'error'. + public ChatCompletionExtraParametersBehavior? ExtraParametersBehavior { get; set; } + /// Determines how the LLM should format its response. Defaults to 'text' response type. + public ChatCompletionResponseFormat ResponseFormat { get; set; } + } +} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/CommonModelParameters.Serialization.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/CommonModelParameters.Serialization.cs new file mode 100644 index 000000000000..6a62321c194a --- /dev/null +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/CommonModelParameters.Serialization.cs @@ -0,0 +1,228 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Search.Documents.Indexes.Models +{ + public partial class CommonModelParameters : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Model)) + { + if (Model != null) + { + writer.WritePropertyName("model"u8); + writer.WriteStringValue(Model); + } + else + { + writer.WriteNull("model"); + } + } + if (Optional.IsDefined(FrequencyPenalty)) + { + if (FrequencyPenalty != null) + { + writer.WritePropertyName("frequencyPenalty"u8); + writer.WriteNumberValue(FrequencyPenalty.Value); + } + else + { + writer.WriteNull("frequencyPenalty"); + } + } + if (Optional.IsDefined(PresencePenalty)) + { + if (PresencePenalty != null) + { + writer.WritePropertyName("presencePenalty"u8); + writer.WriteNumberValue(PresencePenalty.Value); + } + else + { + writer.WriteNull("presencePenalty"); + } + } + if (Optional.IsDefined(MaxTokens)) + { + if (MaxTokens != null) + { + writer.WritePropertyName("maxTokens"u8); + writer.WriteNumberValue(MaxTokens.Value); + } + else + { + writer.WriteNull("maxTokens"); + } + } + if (Optional.IsDefined(Temperature)) + { + if (Temperature != null) + { + writer.WritePropertyName("temperature"u8); + writer.WriteNumberValue(Temperature.Value); + } + else + { + writer.WriteNull("temperature"); + } + } + if (Optional.IsDefined(Seed)) + { + if (Seed != null) + { + writer.WritePropertyName("seed"u8); + writer.WriteNumberValue(Seed.Value); + } + else + { + writer.WriteNull("seed"); + } + } + if (Optional.IsCollectionDefined(Stop)) + { + if (Stop != null) + { + writer.WritePropertyName("stop"u8); + writer.WriteStartArray(); + foreach (var item in Stop) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + else + { + writer.WriteNull("stop"); + } + } + writer.WriteEndObject(); + } + + internal static CommonModelParameters DeserializeCommonModelParameters(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string model = default; + float? frequencyPenalty = default; + float? presencePenalty = default; + int? maxTokens = default; + float? temperature = default; + int? seed = default; + IList stop = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("model"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + model = null; + continue; + } + model = property.Value.GetString(); + continue; + } + if (property.NameEquals("frequencyPenalty"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + frequencyPenalty = null; + continue; + } + frequencyPenalty = property.Value.GetSingle(); + continue; + } + if (property.NameEquals("presencePenalty"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + presencePenalty = null; + continue; + } + presencePenalty = property.Value.GetSingle(); + continue; + } + if (property.NameEquals("maxTokens"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + maxTokens = null; + continue; + } + maxTokens = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("temperature"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + temperature = null; + continue; + } + temperature = property.Value.GetSingle(); + continue; + } + if (property.NameEquals("seed"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + seed = null; + continue; + } + seed = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("stop"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + stop = null; + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + stop = array; + continue; + } + } + return new CommonModelParameters( + model, + frequencyPenalty, + presencePenalty, + maxTokens, + temperature, + seed, + stop ?? new ChangeTrackingList()); + } + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static CommonModelParameters FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeCommonModelParameters(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this); + return content; + } + } +} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/CommonModelParameters.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/CommonModelParameters.cs new file mode 100644 index 000000000000..4285af207e3d --- /dev/null +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/CommonModelParameters.cs @@ -0,0 +1,55 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; + +namespace Azure.Search.Documents.Indexes.Models +{ + /// Common language model parameters for Chat Completions. If omitted, default values are used. + public partial class CommonModelParameters + { + /// Initializes a new instance of . + public CommonModelParameters() + { + Stop = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// The name of the model to use (e.g., 'gpt-4o', etc.). Default is null if not specified. + /// A float in the range [-2,2] that reduces or increases likelihood of repeated tokens. Default is 0. + /// A float in the range [-2,2] that penalizes new tokens based on their existing presence. Default is 0. + /// Maximum number of tokens to generate. + /// Sampling temperature. Default is 0.7. + /// Random seed for controlling deterministic outputs. If omitted, randomization is used. + /// List of stop sequences that will cut off text generation. Default is none. + internal CommonModelParameters(string model, float? frequencyPenalty, float? presencePenalty, int? maxTokens, float? temperature, int? seed, IList stop) + { + Model = model; + FrequencyPenalty = frequencyPenalty; + PresencePenalty = presencePenalty; + MaxTokens = maxTokens; + Temperature = temperature; + Seed = seed; + Stop = stop; + } + + /// The name of the model to use (e.g., 'gpt-4o', etc.). Default is null if not specified. + public string Model { get; set; } + /// A float in the range [-2,2] that reduces or increases likelihood of repeated tokens. Default is 0. + public float? FrequencyPenalty { get; set; } + /// A float in the range [-2,2] that penalizes new tokens based on their existing presence. Default is 0. + public float? PresencePenalty { get; set; } + /// Maximum number of tokens to generate. + public int? MaxTokens { get; set; } + /// Sampling temperature. Default is 0.7. + public float? Temperature { get; set; } + /// Random seed for controlling deterministic outputs. If omitted, randomization is used. + public int? Seed { get; set; } + /// List of stop sequences that will cut off text generation. Default is none. + public IList Stop { get; set; } + } +} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/DocumentDebugInfo.Serialization.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/DocumentDebugInfo.Serialization.cs index dcee507c5a2c..44fd64673c2a 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/DocumentDebugInfo.Serialization.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/DocumentDebugInfo.Serialization.cs @@ -5,6 +5,7 @@ #nullable disable +using System.Collections.Generic; using System.Text.Json; namespace Azure.Search.Documents.Models @@ -19,6 +20,7 @@ internal static DocumentDebugInfo DeserializeDocumentDebugInfo(JsonElement eleme } SemanticDebugInfo semantic = default; VectorsDebugInfo vectors = default; + IReadOnlyDictionary> innerHits = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("semantic"u8)) @@ -39,8 +41,34 @@ internal static DocumentDebugInfo DeserializeDocumentDebugInfo(JsonElement eleme vectors = VectorsDebugInfo.DeserializeVectorsDebugInfo(property.Value); continue; } + if (property.NameEquals("innerHits"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary> dictionary = new Dictionary>(); + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property0.Name, null); + } + else + { + List array = new List(); + foreach (var item in property0.Value.EnumerateArray()) + { + array.Add(QueryResultDocumentInnerHit.DeserializeQueryResultDocumentInnerHit(item)); + } + dictionary.Add(property0.Name, array); + } + } + innerHits = dictionary; + continue; + } } - return new DocumentDebugInfo(semantic, vectors); + return new DocumentDebugInfo(semantic, vectors, innerHits ?? new ChangeTrackingDictionary>()); } /// Deserializes the model from a raw response. diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/DocumentDebugInfo.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/DocumentDebugInfo.cs index ca41ce4d1962..aab3ce66c7e1 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/DocumentDebugInfo.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/DocumentDebugInfo.cs @@ -5,6 +5,8 @@ #nullable disable +using System.Collections.Generic; + namespace Azure.Search.Documents.Models { /// Contains debugging information that can be used to further explore your search results. @@ -13,20 +15,25 @@ public partial class DocumentDebugInfo /// Initializes a new instance of . internal DocumentDebugInfo() { + InnerHits = new ChangeTrackingDictionary>(); } /// Initializes a new instance of . /// Contains debugging information specific to semantic ranking requests. /// Contains debugging information specific to vector and hybrid search. - internal DocumentDebugInfo(SemanticDebugInfo semantic, VectorsDebugInfo vectors) + /// Contains debugging information specific to vectors matched within a collection of complex types. + internal DocumentDebugInfo(SemanticDebugInfo semantic, VectorsDebugInfo vectors, IReadOnlyDictionary> innerHits) { Semantic = semantic; Vectors = vectors; + InnerHits = innerHits; } /// Contains debugging information specific to semantic ranking requests. public SemanticDebugInfo Semantic { get; } /// Contains debugging information specific to vector and hybrid search. public VectorsDebugInfo Vectors { get; } + /// Contains debugging information specific to vectors matched within a collection of complex types. + public IReadOnlyDictionary> InnerHits { get; } } } diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/DocumentIntelligenceLayoutSkill.Serialization.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/DocumentIntelligenceLayoutSkill.Serialization.cs index 91f1e56a192c..4611eb4fe308 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/DocumentIntelligenceLayoutSkill.Serialization.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/DocumentIntelligenceLayoutSkill.Serialization.cs @@ -16,6 +16,18 @@ public partial class DocumentIntelligenceLayoutSkill : IUtf8JsonSerializable void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { writer.WriteStartObject(); + if (Optional.IsDefined(OutputFormat)) + { + if (OutputFormat != null) + { + writer.WritePropertyName("outputFormat"u8); + writer.WriteStringValue(OutputFormat.Value.ToString()); + } + else + { + writer.WriteNull("outputFormat"); + } + } if (Optional.IsDefined(OutputMode)) { if (OutputMode != null) @@ -40,6 +52,35 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WriteNull("markdownHeaderDepth"); } } + if (Optional.IsCollectionDefined(ExtractionOptions)) + { + if (ExtractionOptions != null) + { + writer.WritePropertyName("extractionOptions"u8); + writer.WriteStartArray(); + foreach (var item in ExtractionOptions) + { + writer.WriteStringValue(item.ToString()); + } + writer.WriteEndArray(); + } + else + { + writer.WriteNull("extractionOptions"); + } + } + if (Optional.IsDefined(ChunkingProperties)) + { + if (ChunkingProperties != null) + { + writer.WritePropertyName("chunkingProperties"u8); + writer.WriteObjectValue(ChunkingProperties); + } + else + { + writer.WriteNull("chunkingProperties"); + } + } writer.WritePropertyName("@odata.type"u8); writer.WriteStringValue(ODataType); if (Optional.IsDefined(Name)) @@ -80,8 +121,11 @@ internal static DocumentIntelligenceLayoutSkill DeserializeDocumentIntelligenceL { return null; } + DocumentIntelligenceLayoutSkillOutputFormat? outputFormat = default; DocumentIntelligenceLayoutSkillOutputMode? outputMode = default; DocumentIntelligenceLayoutSkillMarkdownHeaderDepth? markdownHeaderDepth = default; + IList extractionOptions = default; + DocumentIntelligenceLayoutSkillChunkingProperties chunkingProperties = default; string odataType = default; string name = default; string description = default; @@ -90,6 +134,16 @@ internal static DocumentIntelligenceLayoutSkill DeserializeDocumentIntelligenceL IList outputs = default; foreach (var property in element.EnumerateObject()) { + if (property.NameEquals("outputFormat"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + outputFormat = null; + continue; + } + outputFormat = new DocumentIntelligenceLayoutSkillOutputFormat(property.Value.GetString()); + continue; + } if (property.NameEquals("outputMode"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -110,6 +164,31 @@ internal static DocumentIntelligenceLayoutSkill DeserializeDocumentIntelligenceL markdownHeaderDepth = new DocumentIntelligenceLayoutSkillMarkdownHeaderDepth(property.Value.GetString()); continue; } + if (property.NameEquals("extractionOptions"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + extractionOptions = null; + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(new DocumentIntelligenceLayoutSkillExtractionOptions(item.GetString())); + } + extractionOptions = array; + continue; + } + if (property.NameEquals("chunkingProperties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + chunkingProperties = null; + continue; + } + chunkingProperties = DocumentIntelligenceLayoutSkillChunkingProperties.DeserializeDocumentIntelligenceLayoutSkillChunkingProperties(property.Value); + continue; + } if (property.NameEquals("@odata.type"u8)) { odataType = property.Value.GetString(); @@ -158,8 +237,11 @@ internal static DocumentIntelligenceLayoutSkill DeserializeDocumentIntelligenceL context, inputs, outputs, + outputFormat, outputMode, - markdownHeaderDepth); + markdownHeaderDepth, + extractionOptions ?? new ChangeTrackingList(), + chunkingProperties); } /// Deserializes the model from a raw response. diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/DocumentIntelligenceLayoutSkill.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/DocumentIntelligenceLayoutSkill.cs index 75eafce1323a..2a491c492f5b 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/DocumentIntelligenceLayoutSkill.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/DocumentIntelligenceLayoutSkill.cs @@ -10,7 +10,7 @@ namespace Azure.Search.Documents.Indexes.Models { - /// A skill that extracts content and layout information (as markdown), via Azure AI Services, from files within the enrichment pipeline. + /// A skill that extracts content and layout information, via Azure AI Services, from files within the enrichment pipeline. public partial class DocumentIntelligenceLayoutSkill : SearchIndexerSkill { /// Initializes a new instance of . @@ -22,6 +22,7 @@ public DocumentIntelligenceLayoutSkill(IEnumerable input Argument.AssertNotNull(inputs, nameof(inputs)); Argument.AssertNotNull(outputs, nameof(outputs)); + ExtractionOptions = new ChangeTrackingList(); ODataType = "#Microsoft.Skills.Util.DocumentIntelligenceLayoutSkill"; } @@ -32,18 +33,30 @@ public DocumentIntelligenceLayoutSkill(IEnumerable input /// Represents the level at which operations take place, such as the document root or document content (for example, /document or /document/content). The default is /document. /// Inputs of the skills could be a column in the source data set, or the output of an upstream skill. /// The output of a skill is either a field in a search index, or a value that can be consumed as an input by another skill. + /// Controls the cardinality of the output format. Default is 'markdown'. /// Controls the cardinality of the output produced by the skill. Default is 'oneToMany'. /// The depth of headers in the markdown output. Default is h6. - internal DocumentIntelligenceLayoutSkill(string oDataType, string name, string description, string context, IList inputs, IList outputs, DocumentIntelligenceLayoutSkillOutputMode? outputMode, DocumentIntelligenceLayoutSkillMarkdownHeaderDepth? markdownHeaderDepth) : base(oDataType, name, description, context, inputs, outputs) + /// Controls the cardinality of the content extracted from the document by the skill. + /// Controls the cardinality for chunking the content. + internal DocumentIntelligenceLayoutSkill(string oDataType, string name, string description, string context, IList inputs, IList outputs, DocumentIntelligenceLayoutSkillOutputFormat? outputFormat, DocumentIntelligenceLayoutSkillOutputMode? outputMode, DocumentIntelligenceLayoutSkillMarkdownHeaderDepth? markdownHeaderDepth, IList extractionOptions, DocumentIntelligenceLayoutSkillChunkingProperties chunkingProperties) : base(oDataType, name, description, context, inputs, outputs) { + OutputFormat = outputFormat; OutputMode = outputMode; MarkdownHeaderDepth = markdownHeaderDepth; + ExtractionOptions = extractionOptions; + ChunkingProperties = chunkingProperties; ODataType = oDataType ?? "#Microsoft.Skills.Util.DocumentIntelligenceLayoutSkill"; } + /// Controls the cardinality of the output format. Default is 'markdown'. + public DocumentIntelligenceLayoutSkillOutputFormat? OutputFormat { get; set; } /// Controls the cardinality of the output produced by the skill. Default is 'oneToMany'. public DocumentIntelligenceLayoutSkillOutputMode? OutputMode { get; set; } /// The depth of headers in the markdown output. Default is h6. public DocumentIntelligenceLayoutSkillMarkdownHeaderDepth? MarkdownHeaderDepth { get; set; } + /// Controls the cardinality of the content extracted from the document by the skill. + public IList ExtractionOptions { get; set; } + /// Controls the cardinality for chunking the content. + public DocumentIntelligenceLayoutSkillChunkingProperties ChunkingProperties { get; set; } } } diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/DocumentIntelligenceLayoutSkillChunkingProperties.Serialization.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/DocumentIntelligenceLayoutSkillChunkingProperties.Serialization.cs new file mode 100644 index 000000000000..62f50c8ccfd5 --- /dev/null +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/DocumentIntelligenceLayoutSkillChunkingProperties.Serialization.cs @@ -0,0 +1,118 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.Search.Documents.Indexes.Models +{ + public partial class DocumentIntelligenceLayoutSkillChunkingProperties : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Unit)) + { + if (Unit != null) + { + writer.WritePropertyName("unit"u8); + writer.WriteStringValue(Unit.Value.ToString()); + } + else + { + writer.WriteNull("unit"); + } + } + if (Optional.IsDefined(MaximumLength)) + { + if (MaximumLength != null) + { + writer.WritePropertyName("maximumLength"u8); + writer.WriteNumberValue(MaximumLength.Value); + } + else + { + writer.WriteNull("maximumLength"); + } + } + if (Optional.IsDefined(OverlapLength)) + { + if (OverlapLength != null) + { + writer.WritePropertyName("overlapLength"u8); + writer.WriteNumberValue(OverlapLength.Value); + } + else + { + writer.WriteNull("overlapLength"); + } + } + writer.WriteEndObject(); + } + + internal static DocumentIntelligenceLayoutSkillChunkingProperties DeserializeDocumentIntelligenceLayoutSkillChunkingProperties(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + DocumentIntelligenceLayoutSkillChunkingUnit? unit = default; + int? maximumLength = default; + int? overlapLength = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("unit"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + unit = null; + continue; + } + unit = new DocumentIntelligenceLayoutSkillChunkingUnit(property.Value.GetString()); + continue; + } + if (property.NameEquals("maximumLength"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + maximumLength = null; + continue; + } + maximumLength = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("overlapLength"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + overlapLength = null; + continue; + } + overlapLength = property.Value.GetInt32(); + continue; + } + } + return new DocumentIntelligenceLayoutSkillChunkingProperties(unit, maximumLength, overlapLength); + } + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static DocumentIntelligenceLayoutSkillChunkingProperties FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeDocumentIntelligenceLayoutSkillChunkingProperties(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this); + return content; + } + } +} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/DocumentIntelligenceLayoutSkillChunkingProperties.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/DocumentIntelligenceLayoutSkillChunkingProperties.cs new file mode 100644 index 000000000000..d87cfc89a2a7 --- /dev/null +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/DocumentIntelligenceLayoutSkillChunkingProperties.cs @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.Search.Documents.Indexes.Models +{ + /// Controls the cardinality for chunking the content. + public partial class DocumentIntelligenceLayoutSkillChunkingProperties + { + /// Initializes a new instance of . + public DocumentIntelligenceLayoutSkillChunkingProperties() + { + } + + /// Initializes a new instance of . + /// The unit of the chunk. + /// The maximum chunk length in characters. Default is 500. + /// The length of overlap provided between two text chunks. Default is 0. + internal DocumentIntelligenceLayoutSkillChunkingProperties(DocumentIntelligenceLayoutSkillChunkingUnit? unit, int? maximumLength, int? overlapLength) + { + Unit = unit; + MaximumLength = maximumLength; + OverlapLength = overlapLength; + } + + /// The unit of the chunk. + public DocumentIntelligenceLayoutSkillChunkingUnit? Unit { get; set; } + /// The maximum chunk length in characters. Default is 500. + public int? MaximumLength { get; set; } + /// The length of overlap provided between two text chunks. Default is 0. + public int? OverlapLength { get; set; } + } +} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/DocumentIntelligenceLayoutSkillChunkingUnit.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/DocumentIntelligenceLayoutSkillChunkingUnit.cs new file mode 100644 index 000000000000..beae9ab3a252 --- /dev/null +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/DocumentIntelligenceLayoutSkillChunkingUnit.cs @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.Search.Documents.Indexes.Models +{ + /// Controls the cardinality of the chunk unit. Default is 'characters'. + public readonly partial struct DocumentIntelligenceLayoutSkillChunkingUnit : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public DocumentIntelligenceLayoutSkillChunkingUnit(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string CharactersValue = "characters"; + + /// Specifies chunk by characters. + public static DocumentIntelligenceLayoutSkillChunkingUnit Characters { get; } = new DocumentIntelligenceLayoutSkillChunkingUnit(CharactersValue); + /// Determines if two values are the same. + public static bool operator ==(DocumentIntelligenceLayoutSkillChunkingUnit left, DocumentIntelligenceLayoutSkillChunkingUnit right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(DocumentIntelligenceLayoutSkillChunkingUnit left, DocumentIntelligenceLayoutSkillChunkingUnit right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator DocumentIntelligenceLayoutSkillChunkingUnit(string value) => new DocumentIntelligenceLayoutSkillChunkingUnit(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is DocumentIntelligenceLayoutSkillChunkingUnit other && Equals(other); + /// + public bool Equals(DocumentIntelligenceLayoutSkillChunkingUnit 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/search/Azure.Search.Documents/src/Generated/Models/DocumentIntelligenceLayoutSkillExtractionOptions.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/DocumentIntelligenceLayoutSkillExtractionOptions.cs new file mode 100644 index 000000000000..d21d930ae891 --- /dev/null +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/DocumentIntelligenceLayoutSkillExtractionOptions.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.Search.Documents.Indexes.Models +{ + /// Controls the cardinality of the content extracted from the document by the skill. + public readonly partial struct DocumentIntelligenceLayoutSkillExtractionOptions : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public DocumentIntelligenceLayoutSkillExtractionOptions(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string ImagesValue = "images"; + private const string LocationMetadataValue = "locationMetadata"; + + /// Specify that image content should be extracted from the document. + public static DocumentIntelligenceLayoutSkillExtractionOptions Images { get; } = new DocumentIntelligenceLayoutSkillExtractionOptions(ImagesValue); + /// Specify that location metadata should be extracted from the document. + public static DocumentIntelligenceLayoutSkillExtractionOptions LocationMetadata { get; } = new DocumentIntelligenceLayoutSkillExtractionOptions(LocationMetadataValue); + /// Determines if two values are the same. + public static bool operator ==(DocumentIntelligenceLayoutSkillExtractionOptions left, DocumentIntelligenceLayoutSkillExtractionOptions right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(DocumentIntelligenceLayoutSkillExtractionOptions left, DocumentIntelligenceLayoutSkillExtractionOptions right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator DocumentIntelligenceLayoutSkillExtractionOptions(string value) => new DocumentIntelligenceLayoutSkillExtractionOptions(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is DocumentIntelligenceLayoutSkillExtractionOptions other && Equals(other); + /// + public bool Equals(DocumentIntelligenceLayoutSkillExtractionOptions 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/search/Azure.Search.Documents/src/Generated/Models/DocumentIntelligenceLayoutSkillOutputFormat.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/DocumentIntelligenceLayoutSkillOutputFormat.cs new file mode 100644 index 000000000000..4d1ee1179571 --- /dev/null +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/DocumentIntelligenceLayoutSkillOutputFormat.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.Search.Documents.Indexes.Models +{ + /// Controls the cardinality of the output format. Default is 'markdown'. + public readonly partial struct DocumentIntelligenceLayoutSkillOutputFormat : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public DocumentIntelligenceLayoutSkillOutputFormat(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string TextValue = "text"; + private const string MarkdownValue = "markdown"; + + /// Specify the format of the output as text. + public static DocumentIntelligenceLayoutSkillOutputFormat Text { get; } = new DocumentIntelligenceLayoutSkillOutputFormat(TextValue); + /// Specify the format of the output as markdown. + public static DocumentIntelligenceLayoutSkillOutputFormat Markdown { get; } = new DocumentIntelligenceLayoutSkillOutputFormat(MarkdownValue); + /// Determines if two values are the same. + public static bool operator ==(DocumentIntelligenceLayoutSkillOutputFormat left, DocumentIntelligenceLayoutSkillOutputFormat right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(DocumentIntelligenceLayoutSkillOutputFormat left, DocumentIntelligenceLayoutSkillOutputFormat right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator DocumentIntelligenceLayoutSkillOutputFormat(string value) => new DocumentIntelligenceLayoutSkillOutputFormat(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is DocumentIntelligenceLayoutSkillOutputFormat other && Equals(other); + /// + public bool Equals(DocumentIntelligenceLayoutSkillOutputFormat 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/search/Azure.Search.Documents/src/Generated/Models/DocumentIntelligenceLayoutSkillOutputMode.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/DocumentIntelligenceLayoutSkillOutputMode.cs index 50559c358b55..536498a0ab24 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/DocumentIntelligenceLayoutSkillOutputMode.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/DocumentIntelligenceLayoutSkillOutputMode.cs @@ -24,7 +24,7 @@ public DocumentIntelligenceLayoutSkillOutputMode(string value) private const string OneToManyValue = "oneToMany"; - /// Specify the deepest markdown header section to parse. + /// Specify that the output should be parsed as 'oneToMany'. public static DocumentIntelligenceLayoutSkillOutputMode OneToMany { get; } = new DocumentIntelligenceLayoutSkillOutputMode(OneToManyValue); /// Determines if two values are the same. public static bool operator ==(DocumentIntelligenceLayoutSkillOutputMode left, DocumentIntelligenceLayoutSkillOutputMode right) => left.Equals(right); diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/IndexerExecutionResult.Serialization.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/IndexerExecutionResult.Serialization.cs index 6cd00f2b438b..97365b663f5e 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/IndexerExecutionResult.Serialization.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/IndexerExecutionResult.Serialization.cs @@ -21,7 +21,7 @@ internal static IndexerExecutionResult DeserializeIndexerExecutionResult(JsonEle } IndexerExecutionStatus status = default; IndexerExecutionStatusDetail? statusDetail = default; - IndexerState currentState = default; + IndexingMode? mode = default; string errorMessage = default; DateTimeOffset? startTime = default; DateTimeOffset? endTime = default; @@ -48,13 +48,13 @@ internal static IndexerExecutionResult DeserializeIndexerExecutionResult(JsonEle statusDetail = new IndexerExecutionStatusDetail(property.Value.GetString()); continue; } - if (property.NameEquals("currentState"u8)) + if (property.NameEquals("mode"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { continue; } - currentState = IndexerState.DeserializeIndexerState(property.Value); + mode = new IndexingMode(property.Value.GetString()); continue; } if (property.NameEquals("errorMessage"u8)) @@ -125,7 +125,7 @@ internal static IndexerExecutionResult DeserializeIndexerExecutionResult(JsonEle return new IndexerExecutionResult( status, statusDetail, - currentState, + mode, errorMessage, startTime, endTime, diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/IndexerExecutionResult.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/IndexerExecutionResult.cs index 16d5530e3ad3..d56dae6ba704 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/IndexerExecutionResult.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/IndexerExecutionResult.cs @@ -32,7 +32,7 @@ internal IndexerExecutionResult(IndexerExecutionStatus status, IEnumerable Initializes a new instance of . /// The outcome of this indexer execution. /// The outcome of this indexer execution. - /// All of the state that defines and dictates the indexer's current execution. + /// The mode the indexer is running in. /// The error message indicating the top-level error, if any. /// The start time of this indexer execution. /// The end time of this indexer execution, if the execution has already completed. @@ -42,11 +42,11 @@ internal IndexerExecutionResult(IndexerExecutionStatus status, IEnumerable The number of items that failed to be indexed during this indexer execution. /// Change tracking state with which an indexer execution started. /// Change tracking state with which an indexer execution finished. - internal IndexerExecutionResult(IndexerExecutionStatus status, IndexerExecutionStatusDetail? statusDetail, IndexerState currentState, string errorMessage, DateTimeOffset? startTime, DateTimeOffset? endTime, IReadOnlyList errors, IReadOnlyList warnings, int itemCount, int failedItemCount, string initialTrackingState, string finalTrackingState) + internal IndexerExecutionResult(IndexerExecutionStatus status, IndexerExecutionStatusDetail? statusDetail, IndexingMode? mode, string errorMessage, DateTimeOffset? startTime, DateTimeOffset? endTime, IReadOnlyList errors, IReadOnlyList warnings, int itemCount, int failedItemCount, string initialTrackingState, string finalTrackingState) { Status = status; StatusDetail = statusDetail; - CurrentState = currentState; + Mode = mode; ErrorMessage = errorMessage; StartTime = startTime; EndTime = endTime; @@ -62,8 +62,8 @@ internal IndexerExecutionResult(IndexerExecutionStatus status, IndexerExecutionS public IndexerExecutionStatus Status { get; } /// The outcome of this indexer execution. public IndexerExecutionStatusDetail? StatusDetail { get; } - /// All of the state that defines and dictates the indexer's current execution. - public IndexerState CurrentState { get; } + /// The mode the indexer is running in. + public IndexingMode? Mode { get; } /// The error message indicating the top-level error, if any. public string ErrorMessage { get; } /// The start time of this indexer execution. diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/IndexerExecutionStatusDetail.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/IndexerExecutionStatusDetail.cs index b66b5527d807..9f79f6207aaa 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/IndexerExecutionStatusDetail.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/IndexerExecutionStatusDetail.cs @@ -23,9 +23,12 @@ public IndexerExecutionStatusDetail(string value) } private const string ResetDocsValue = "resetDocs"; + private const string ResyncValue = "resync"; /// Indicates that the reset that occurred was for a call to ResetDocs. public static IndexerExecutionStatusDetail ResetDocs { get; } = new IndexerExecutionStatusDetail(ResetDocsValue); + /// Indicates to selectively resync based on option(s) from data source. + public static IndexerExecutionStatusDetail Resync { get; } = new IndexerExecutionStatusDetail(ResyncValue); /// Determines if two values are the same. public static bool operator ==(IndexerExecutionStatusDetail left, IndexerExecutionStatusDetail right) => left.Equals(right); /// Determines if two values are not the same. diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/IndexerPermissionOption.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/IndexerPermissionOption.cs new file mode 100644 index 000000000000..8710b88cc598 --- /dev/null +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/IndexerPermissionOption.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.Search.Documents.Indexes.Models +{ + /// Options with various types of permission data to index. + public readonly partial struct IndexerPermissionOption : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public IndexerPermissionOption(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string UserIdsValue = "userIds"; + private const string GroupIdsValue = "groupIds"; + private const string RbacScopeValue = "rbacScope"; + + /// Indexer to ingest ACL userIds from data source to index. + public static IndexerPermissionOption UserIds { get; } = new IndexerPermissionOption(UserIdsValue); + /// Indexer to ingest ACL groupIds from data source to index. + public static IndexerPermissionOption GroupIds { get; } = new IndexerPermissionOption(GroupIdsValue); + /// Indexer to ingest Azure RBAC scope from data source to index. + public static IndexerPermissionOption RbacScope { get; } = new IndexerPermissionOption(RbacScopeValue); + /// Determines if two values are the same. + public static bool operator ==(IndexerPermissionOption left, IndexerPermissionOption right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(IndexerPermissionOption left, IndexerPermissionOption right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator IndexerPermissionOption(string value) => new IndexerPermissionOption(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is IndexerPermissionOption other && Equals(other); + /// + public bool Equals(IndexerPermissionOption 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/search/Azure.Search.Documents/src/Generated/Models/IndexerResyncOption.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/IndexerResyncOption.cs new file mode 100644 index 000000000000..b70cdddbeb6d --- /dev/null +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/IndexerResyncOption.cs @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.Search.Documents.Indexes.Models +{ + /// Options with various types of permission data to index. + public readonly partial struct IndexerResyncOption : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public IndexerResyncOption(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string PermissionsValue = "permissions"; + + /// Indexer to re-ingest pre-selected permissions data from data source to index. + public static IndexerResyncOption Permissions { get; } = new IndexerResyncOption(PermissionsValue); + /// Determines if two values are the same. + public static bool operator ==(IndexerResyncOption left, IndexerResyncOption right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(IndexerResyncOption left, IndexerResyncOption right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator IndexerResyncOption(string value) => new IndexerResyncOption(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is IndexerResyncOption other && Equals(other); + /// + public bool Equals(IndexerResyncOption 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/search/Azure.Search.Documents/src/Generated/Models/IndexerState.Serialization.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/IndexerState.Serialization.cs index 52b14853ef52..561f28ed5854 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/IndexerState.Serialization.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/IndexerState.Serialization.cs @@ -19,12 +19,14 @@ internal static IndexerState DeserializeIndexerState(JsonElement element) return null; } IndexingMode? mode = default; - string allDocsInitialChangeTrackingState = default; - string allDocsFinalChangeTrackingState = default; - string resetDocsInitialChangeTrackingState = default; - string resetDocsFinalChangeTrackingState = default; + string allDocsInitialTrackingState = default; + string allDocsFinalTrackingState = default; + string resetDocsInitialTrackingState = default; + string resetDocsFinalTrackingState = default; IReadOnlyList resetDocumentKeys = default; IReadOnlyList resetDatasourceDocumentIds = default; + string resyncInitialTrackingState = default; + string resyncFinalTrackingState = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("mode"u8)) @@ -36,24 +38,24 @@ internal static IndexerState DeserializeIndexerState(JsonElement element) mode = new IndexingMode(property.Value.GetString()); continue; } - if (property.NameEquals("allDocsInitialChangeTrackingState"u8)) + if (property.NameEquals("allDocsInitialTrackingState"u8)) { - allDocsInitialChangeTrackingState = property.Value.GetString(); + allDocsInitialTrackingState = property.Value.GetString(); continue; } - if (property.NameEquals("allDocsFinalChangeTrackingState"u8)) + if (property.NameEquals("allDocsFinalTrackingState"u8)) { - allDocsFinalChangeTrackingState = property.Value.GetString(); + allDocsFinalTrackingState = property.Value.GetString(); continue; } - if (property.NameEquals("resetDocsInitialChangeTrackingState"u8)) + if (property.NameEquals("resetDocsInitialTrackingState"u8)) { - resetDocsInitialChangeTrackingState = property.Value.GetString(); + resetDocsInitialTrackingState = property.Value.GetString(); continue; } - if (property.NameEquals("resetDocsFinalChangeTrackingState"u8)) + if (property.NameEquals("resetDocsFinalTrackingState"u8)) { - resetDocsFinalChangeTrackingState = property.Value.GetString(); + resetDocsFinalTrackingState = property.Value.GetString(); continue; } if (property.NameEquals("resetDocumentKeys"u8)) @@ -84,15 +86,27 @@ internal static IndexerState DeserializeIndexerState(JsonElement element) resetDatasourceDocumentIds = array; continue; } + if (property.NameEquals("resyncInitialTrackingState"u8)) + { + resyncInitialTrackingState = property.Value.GetString(); + continue; + } + if (property.NameEquals("resyncFinalTrackingState"u8)) + { + resyncFinalTrackingState = property.Value.GetString(); + continue; + } } return new IndexerState( mode, - allDocsInitialChangeTrackingState, - allDocsFinalChangeTrackingState, - resetDocsInitialChangeTrackingState, - resetDocsFinalChangeTrackingState, + allDocsInitialTrackingState, + allDocsFinalTrackingState, + resetDocsInitialTrackingState, + resetDocsFinalTrackingState, resetDocumentKeys ?? new ChangeTrackingList(), - resetDatasourceDocumentIds ?? new ChangeTrackingList()); + resetDatasourceDocumentIds ?? new ChangeTrackingList(), + resyncInitialTrackingState, + resyncFinalTrackingState); } /// Deserializes the model from a raw response. diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/IndexerState.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/IndexerState.cs index 8047262f3e4f..6678d5f11c6b 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/IndexerState.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/IndexerState.cs @@ -19,9 +19,44 @@ internal IndexerState() ResetDataSourceDocumentIds = new ChangeTrackingList(); } + /// Initializes a new instance of . + /// The mode the indexer is running in. + /// Change tracking state used when indexing starts on all documents in the datasource. + /// Change tracking state value when indexing finishes on all documents in the datasource. + /// Change tracking state used when indexing starts on select, reset documents in the datasource. + /// Change tracking state value when indexing finishes on select, reset documents in the datasource. + /// The list of document keys that have been reset. The document key is the document's unique identifier for the data in the search index. The indexer will prioritize selectively re-ingesting these keys. + /// The list of datasource document ids that have been reset. The datasource document id is the unique identifier for the data in the datasource. The indexer will prioritize selectively re-ingesting these ids. + /// Change tracking state used when indexing starts on selective options from the datasource. + /// Change tracking state value when indexing finishes on selective options from the datasource. + internal IndexerState(IndexingMode? mode, string allDocsInitialTrackingState, string allDocsFinalTrackingState, string resetDocsInitialTrackingState, string resetDocsFinalTrackingState, IReadOnlyList resetDocumentKeys, IReadOnlyList resetDataSourceDocumentIds, string resyncInitialTrackingState, string resyncFinalTrackingState) + { + Mode = mode; + AllDocsInitialTrackingState = allDocsInitialTrackingState; + AllDocsFinalTrackingState = allDocsFinalTrackingState; + ResetDocsInitialTrackingState = resetDocsInitialTrackingState; + ResetDocsFinalTrackingState = resetDocsFinalTrackingState; + ResetDocumentKeys = resetDocumentKeys; + ResetDataSourceDocumentIds = resetDataSourceDocumentIds; + ResyncInitialTrackingState = resyncInitialTrackingState; + ResyncFinalTrackingState = resyncFinalTrackingState; + } + /// The mode the indexer is running in. public IndexingMode? Mode { get; } + /// Change tracking state used when indexing starts on all documents in the datasource. + public string AllDocsInitialTrackingState { get; } + /// Change tracking state value when indexing finishes on all documents in the datasource. + public string AllDocsFinalTrackingState { get; } + /// Change tracking state used when indexing starts on select, reset documents in the datasource. + public string ResetDocsInitialTrackingState { get; } + /// Change tracking state value when indexing finishes on select, reset documents in the datasource. + public string ResetDocsFinalTrackingState { get; } /// The list of document keys that have been reset. The document key is the document's unique identifier for the data in the search index. The indexer will prioritize selectively re-ingesting these keys. public IReadOnlyList ResetDocumentKeys { get; } + /// Change tracking state used when indexing starts on selective options from the datasource. + public string ResyncInitialTrackingState { get; } + /// Change tracking state value when indexing finishes on selective options from the datasource. + public string ResyncFinalTrackingState { get; } } } diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/IndexingMode.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/IndexingMode.cs index d06c75c206b1..df0a050db730 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/IndexingMode.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/IndexingMode.cs @@ -24,6 +24,9 @@ public IndexingMode(string value) private const string AllDocumentsValue = "indexingAllDocs"; private const string ResetDocumentsValue = "indexingResetDocs"; + private const string IndexingResyncValue = "indexingResync"; + /// The indexer is resyncing and indexing selective option(s) from the datasource. + public static IndexingMode IndexingResync { get; } = new IndexingMode(IndexingResyncValue); /// Determines if two values are the same. public static bool operator ==(IndexingMode left, IndexingMode right) => left.Equals(right); /// Determines if two values are not the same. diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/KnowledgeAgent.Serialization.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/KnowledgeAgent.Serialization.cs new file mode 100644 index 000000000000..32558a15698c --- /dev/null +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/KnowledgeAgent.Serialization.cs @@ -0,0 +1,161 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Search.Documents.Indexes.Models +{ + public partial class KnowledgeAgent : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + writer.WritePropertyName("models"u8); + writer.WriteStartArray(); + foreach (var item in Models) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + writer.WritePropertyName("targetIndexes"u8); + writer.WriteStartArray(); + foreach (var item in TargetIndexes) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + if (Optional.IsDefined(RequestLimits)) + { + writer.WritePropertyName("requestLimits"u8); + writer.WriteObjectValue(RequestLimits); + } + if (Optional.IsDefined(ETag)) + { + writer.WritePropertyName("@odata.etag"u8); + writer.WriteStringValue(ETag); + } + if (Optional.IsDefined(EncryptionKey)) + { + if (EncryptionKey != null) + { + writer.WritePropertyName("encryptionKey"u8); + writer.WriteObjectValue(EncryptionKey); + } + else + { + writer.WriteNull("encryptionKey"); + } + } + if (Optional.IsDefined(Description)) + { + writer.WritePropertyName("description"u8); + writer.WriteStringValue(Description); + } + writer.WriteEndObject(); + } + + internal static KnowledgeAgent DeserializeKnowledgeAgent(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string name = default; + IList models = default; + IList targetIndexes = default; + KnowledgeAgentRequestLimits requestLimits = default; + string odataEtag = default; + SearchResourceEncryptionKey encryptionKey = default; + string description = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("models"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(KnowledgeAgentModel.DeserializeKnowledgeAgentModel(item)); + } + models = array; + continue; + } + if (property.NameEquals("targetIndexes"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(KnowledgeAgentTargetIndex.DeserializeKnowledgeAgentTargetIndex(item)); + } + targetIndexes = array; + continue; + } + if (property.NameEquals("requestLimits"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + requestLimits = KnowledgeAgentRequestLimits.DeserializeKnowledgeAgentRequestLimits(property.Value); + continue; + } + if (property.NameEquals("@odata.etag"u8)) + { + odataEtag = property.Value.GetString(); + continue; + } + if (property.NameEquals("encryptionKey"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + encryptionKey = null; + continue; + } + encryptionKey = SearchResourceEncryptionKey.DeserializeSearchResourceEncryptionKey(property.Value); + continue; + } + if (property.NameEquals("description"u8)) + { + description = property.Value.GetString(); + continue; + } + } + return new KnowledgeAgent( + name, + models, + targetIndexes, + requestLimits, + odataEtag, + encryptionKey, + description); + } + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static KnowledgeAgent FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeKnowledgeAgent(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this); + return content; + } + } +} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/KnowledgeAgent.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/KnowledgeAgent.cs new file mode 100644 index 000000000000..40f3b923bc63 --- /dev/null +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/KnowledgeAgent.cs @@ -0,0 +1,79 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Azure.Search.Documents.Indexes.Models +{ + /// The KnowledgeAgent. + public partial class KnowledgeAgent + { + /// Initializes a new instance of . + /// The name of the knowledge agent. + /// + /// Contains configuration options on how to connect to AI models. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include . + /// + /// + /// , or is null. + public KnowledgeAgent(string name, IEnumerable models, IEnumerable targetIndexes) + { + Argument.AssertNotNull(name, nameof(name)); + Argument.AssertNotNull(models, nameof(models)); + Argument.AssertNotNull(targetIndexes, nameof(targetIndexes)); + + Name = name; + Models = models.ToList(); + TargetIndexes = targetIndexes.ToList(); + } + + /// Initializes a new instance of . + /// The name of the knowledge agent. + /// + /// Contains configuration options on how to connect to AI models. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include . + /// + /// + /// Guardrails to limit how much resources are utilized for a single agent retrieval request. + /// The ETag of the agent. + /// A description of an encryption key that you create in Azure Key Vault. This key is used to provide an additional level of encryption-at-rest for your agent definition when you want full assurance that no one, not even Microsoft, can decrypt them. Once you have encrypted your agent definition, it will always remain encrypted. The search service will ignore attempts to set this property to null. You can change this property as needed if you want to rotate your encryption key; Your agent definition will be unaffected. Encryption with customer-managed keys is not available for free search services, and is only available for paid services created on or after January 1, 2019. + /// The description of the agent. + internal KnowledgeAgent(string name, IList models, IList targetIndexes, KnowledgeAgentRequestLimits requestLimits, string eTag, SearchResourceEncryptionKey encryptionKey, string description) + { + Name = name; + Models = models; + TargetIndexes = targetIndexes; + RequestLimits = requestLimits; + ETag = eTag; + EncryptionKey = encryptionKey; + Description = description; + } + + /// The name of the knowledge agent. + public string Name { get; set; } + /// + /// Contains configuration options on how to connect to AI models. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include . + /// + public IList Models { get; } + /// Gets the target indexes. + public IList TargetIndexes { get; } + /// Guardrails to limit how much resources are utilized for a single agent retrieval request. + public KnowledgeAgentRequestLimits RequestLimits { get; set; } + /// The ETag of the agent. + public string ETag { get; set; } + /// A description of an encryption key that you create in Azure Key Vault. This key is used to provide an additional level of encryption-at-rest for your agent definition when you want full assurance that no one, not even Microsoft, can decrypt them. Once you have encrypted your agent definition, it will always remain encrypted. The search service will ignore attempts to set this property to null. You can change this property as needed if you want to rotate your encryption key; Your agent definition will be unaffected. Encryption with customer-managed keys is not available for free search services, and is only available for paid services created on or after January 1, 2019. + public SearchResourceEncryptionKey EncryptionKey { get; set; } + /// The description of the agent. + public string Description { get; set; } + } +} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/KnowledgeAgentActivityRecord.Serialization.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/KnowledgeAgentActivityRecord.Serialization.cs new file mode 100644 index 000000000000..f8d95a4eec7e --- /dev/null +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/KnowledgeAgentActivityRecord.Serialization.cs @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; + +namespace Azure.Search.Documents.Models +{ + public partial class KnowledgeAgentActivityRecord + { + internal static KnowledgeAgentActivityRecord DeserializeKnowledgeAgentActivityRecord(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + if (element.TryGetProperty("type", out JsonElement discriminator)) + { + switch (discriminator.GetString()) + { + case "AzureSearchQuery": return KnowledgeAgentSearchActivityRecord.DeserializeKnowledgeAgentSearchActivityRecord(element); + case "AzureSearchSemanticRanker": return KnowledgeAgentSemanticRankerActivityRecord.DeserializeKnowledgeAgentSemanticRankerActivityRecord(element); + case "ModelQueryPlanning": return KnowledgeAgentModelQueryPlanningActivityRecord.DeserializeKnowledgeAgentModelQueryPlanningActivityRecord(element); + } + } + return UnknownKnowledgeAgentActivityRecord.DeserializeUnknownKnowledgeAgentActivityRecord(element); + } + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static KnowledgeAgentActivityRecord FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeKnowledgeAgentActivityRecord(document.RootElement); + } + } +} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/KnowledgeAgentActivityRecord.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/KnowledgeAgentActivityRecord.cs new file mode 100644 index 000000000000..94bc00a15286 --- /dev/null +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/KnowledgeAgentActivityRecord.cs @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.Search.Documents.Models +{ + /// + /// Base type for activity records. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , and . + /// + public abstract partial class KnowledgeAgentActivityRecord + { + /// Initializes a new instance of . + /// The ID of the activity record. + protected KnowledgeAgentActivityRecord(int id) + { + Id = id; + } + + /// Initializes a new instance of . + /// The ID of the activity record. + /// The type of the activity record. + internal KnowledgeAgentActivityRecord(int id, string type) + { + Id = id; + Type = type; + } + + /// The ID of the activity record. + public int Id { get; } + /// The type of the activity record. + internal string Type { get; set; } + } +} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/KnowledgeAgentAzureOpenAIModel.Serialization.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/KnowledgeAgentAzureOpenAIModel.Serialization.cs new file mode 100644 index 000000000000..2bbd56492835 --- /dev/null +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/KnowledgeAgentAzureOpenAIModel.Serialization.cs @@ -0,0 +1,65 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.Search.Documents.Indexes.Models +{ + public partial class KnowledgeAgentAzureOpenAIModel : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("azureOpenAIParameters"u8); + writer.WriteObjectValue(AzureOpenAIParameters); + writer.WritePropertyName("kind"u8); + writer.WriteStringValue(Kind.ToString()); + writer.WriteEndObject(); + } + + internal static KnowledgeAgentAzureOpenAIModel DeserializeKnowledgeAgentAzureOpenAIModel(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + AzureOpenAIVectorizerParameters azureOpenAIParameters = default; + KnowledgeAgentModelKind kind = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("azureOpenAIParameters"u8)) + { + azureOpenAIParameters = AzureOpenAIVectorizerParameters.DeserializeAzureOpenAIVectorizerParameters(property.Value); + continue; + } + if (property.NameEquals("kind"u8)) + { + kind = new KnowledgeAgentModelKind(property.Value.GetString()); + continue; + } + } + return new KnowledgeAgentAzureOpenAIModel(kind, azureOpenAIParameters); + } + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static new KnowledgeAgentAzureOpenAIModel FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeKnowledgeAgentAzureOpenAIModel(document.RootElement); + } + + /// Convert into a . + internal override RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this); + return content; + } + } +} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/KnowledgeAgentAzureOpenAIModel.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/KnowledgeAgentAzureOpenAIModel.cs new file mode 100644 index 000000000000..dbb8dafc79d0 --- /dev/null +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/KnowledgeAgentAzureOpenAIModel.cs @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Azure.Search.Documents.Indexes.Models +{ + /// Specifies the Azure OpenAI resource used to do query planning. + public partial class KnowledgeAgentAzureOpenAIModel : KnowledgeAgentModel + { + /// Initializes a new instance of . + /// Contains the parameters specific to Azure OpenAI model endpoint. + /// is null. + public KnowledgeAgentAzureOpenAIModel(AzureOpenAIVectorizerParameters azureOpenAIParameters) + { + Argument.AssertNotNull(azureOpenAIParameters, nameof(azureOpenAIParameters)); + + AzureOpenAIParameters = azureOpenAIParameters; + Kind = KnowledgeAgentModelKind.AzureOpenAI; + } + + /// Initializes a new instance of . + /// The type of AI model. + /// Contains the parameters specific to Azure OpenAI model endpoint. + internal KnowledgeAgentAzureOpenAIModel(KnowledgeAgentModelKind kind, AzureOpenAIVectorizerParameters azureOpenAIParameters) : base(kind) + { + AzureOpenAIParameters = azureOpenAIParameters; + Kind = kind; + } + + /// Contains the parameters specific to Azure OpenAI model endpoint. + public AzureOpenAIVectorizerParameters AzureOpenAIParameters { get; set; } + } +} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/KnowledgeAgentAzureSearchDocReference.Serialization.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/KnowledgeAgentAzureSearchDocReference.Serialization.cs new file mode 100644 index 000000000000..1ef2cda51b46 --- /dev/null +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/KnowledgeAgentAzureSearchDocReference.Serialization.cs @@ -0,0 +1,81 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; + +namespace Azure.Search.Documents.Models +{ + public partial class KnowledgeAgentAzureSearchDocReference + { + internal static KnowledgeAgentAzureSearchDocReference DeserializeKnowledgeAgentAzureSearchDocReference(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string docKey = default; + IReadOnlyDictionary sourceData = default; + string type = default; + string id = default; + int activitySource = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("docKey"u8)) + { + docKey = property.Value.GetString(); + continue; + } + if (property.NameEquals("sourceData"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property0.Name, null); + } + else + { + dictionary.Add(property0.Name, property0.Value.GetObject()); + } + } + sourceData = dictionary; + continue; + } + if (property.NameEquals("type"u8)) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("id"u8)) + { + id = property.Value.GetString(); + continue; + } + if (property.NameEquals("activitySource"u8)) + { + activitySource = property.Value.GetInt32(); + continue; + } + } + return new KnowledgeAgentAzureSearchDocReference(type, id, activitySource, docKey, sourceData ?? new ChangeTrackingDictionary()); + } + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static new KnowledgeAgentAzureSearchDocReference FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeKnowledgeAgentAzureSearchDocReference(document.RootElement); + } + } +} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/KnowledgeAgentAzureSearchDocReference.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/KnowledgeAgentAzureSearchDocReference.cs new file mode 100644 index 000000000000..77eaa0d99e84 --- /dev/null +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/KnowledgeAgentAzureSearchDocReference.cs @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Search.Documents.Models +{ + /// Represents an Azure Search document reference. + public partial class KnowledgeAgentAzureSearchDocReference : KnowledgeAgentReference + { + /// Initializes a new instance of . + /// The ID of the reference. + /// The source activity ID for the reference. + /// is null. + internal KnowledgeAgentAzureSearchDocReference(string id, int activitySource) : base(id, activitySource) + { + Argument.AssertNotNull(id, nameof(id)); + + SourceData = new ChangeTrackingDictionary(); + Type = "AzureSearchDoc"; + } + + /// Initializes a new instance of . + /// The type of the reference. + /// The ID of the reference. + /// The source activity ID for the reference. + /// The document key for the reference. + /// Dictionary of <any>. + internal KnowledgeAgentAzureSearchDocReference(string type, string id, int activitySource, string docKey, IReadOnlyDictionary sourceData) : base(type, id, activitySource) + { + DocKey = docKey; + SourceData = sourceData; + Type = type ?? "AzureSearchDoc"; + } + + /// The document key for the reference. + public string DocKey { get; } + /// Dictionary of <any>. + public IReadOnlyDictionary SourceData { get; } + } +} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/KnowledgeAgentIndexParams.Serialization.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/KnowledgeAgentIndexParams.Serialization.cs new file mode 100644 index 000000000000..c0ae7a6e6fd1 --- /dev/null +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/KnowledgeAgentIndexParams.Serialization.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.Search.Documents.Models +{ + public partial class KnowledgeAgentIndexParams : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(IndexName)) + { + writer.WritePropertyName("indexName"u8); + writer.WriteStringValue(IndexName); + } + if (Optional.IsDefined(FilterAddOn)) + { + writer.WritePropertyName("filterAddOn"u8); + writer.WriteStringValue(FilterAddOn); + } + if (Optional.IsDefined(MaxDocsForReranker)) + { + writer.WritePropertyName("maxDocsForReranker"u8); + writer.WriteNumberValue(MaxDocsForReranker.Value); + } + if (Optional.IsDefined(RerankerThreshold)) + { + writer.WritePropertyName("rerankerThreshold"u8); + writer.WriteNumberValue(RerankerThreshold.Value); + } + if (Optional.IsDefined(IncludeReferenceSourceData)) + { + writer.WritePropertyName("includeReferenceSourceData"u8); + writer.WriteBooleanValue(IncludeReferenceSourceData.Value); + } + writer.WriteEndObject(); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this); + return content; + } + } +} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/KnowledgeAgentIndexParams.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/KnowledgeAgentIndexParams.cs new file mode 100644 index 000000000000..57675f165c49 --- /dev/null +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/KnowledgeAgentIndexParams.cs @@ -0,0 +1,44 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.Search.Documents.Models +{ + /// The KnowledgeAgentIndexParams. + public partial class KnowledgeAgentIndexParams + { + /// Initializes a new instance of . + public KnowledgeAgentIndexParams() + { + } + + /// Initializes a new instance of . + /// The name of the index the params apply to. + /// A filter condition applied to the index (e.g., 'State eq VA'). + /// Limits the number of documents considered for ranking. + /// A threshold for reranking results (range: 0-4). + /// Indicates whether reference source data should be included. + internal KnowledgeAgentIndexParams(string indexName, string filterAddOn, int? maxDocsForReranker, float? rerankerThreshold, bool? includeReferenceSourceData) + { + IndexName = indexName; + FilterAddOn = filterAddOn; + MaxDocsForReranker = maxDocsForReranker; + RerankerThreshold = rerankerThreshold; + IncludeReferenceSourceData = includeReferenceSourceData; + } + + /// The name of the index the params apply to. + public string IndexName { get; set; } + /// A filter condition applied to the index (e.g., 'State eq VA'). + public string FilterAddOn { get; set; } + /// Limits the number of documents considered for ranking. + public int? MaxDocsForReranker { get; set; } + /// A threshold for reranking results (range: 0-4). + public float? RerankerThreshold { get; set; } + /// Indicates whether reference source data should be included. + public bool? IncludeReferenceSourceData { get; set; } + } +} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/KnowledgeAgentMessage.Serialization.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/KnowledgeAgentMessage.Serialization.cs new file mode 100644 index 000000000000..557054bf2037 --- /dev/null +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/KnowledgeAgentMessage.Serialization.cs @@ -0,0 +1,76 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Search.Documents.Models +{ + public partial class KnowledgeAgentMessage : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("role"u8); + writer.WriteStringValue(Role); + writer.WritePropertyName("content"u8); + writer.WriteStartArray(); + foreach (var item in Content) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + writer.WriteEndObject(); + } + + internal static KnowledgeAgentMessage DeserializeKnowledgeAgentMessage(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string role = default; + IList content = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("role"u8)) + { + role = property.Value.GetString(); + continue; + } + if (property.NameEquals("content"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(KnowledgeAgentMessageContent.DeserializeKnowledgeAgentMessageContent(item)); + } + content = array; + continue; + } + } + return new KnowledgeAgentMessage(role, content); + } + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static KnowledgeAgentMessage FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeKnowledgeAgentMessage(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this); + return content; + } + } +} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/KnowledgeAgentMessage.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/KnowledgeAgentMessage.cs new file mode 100644 index 000000000000..2a760dc95e22 --- /dev/null +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/KnowledgeAgentMessage.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Azure.Search.Documents.Models +{ + /// The natural language message style object. + public partial class KnowledgeAgentMessage + { + /// Initializes a new instance of . + /// The role of the tool response. + /// + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include and . + /// + /// or is null. + public KnowledgeAgentMessage(string role, IEnumerable content) + { + Argument.AssertNotNull(role, nameof(role)); + Argument.AssertNotNull(content, nameof(content)); + + Role = role; + Content = content.ToList(); + } + + /// Initializes a new instance of . + /// The role of the tool response. + /// + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include and . + /// + internal KnowledgeAgentMessage(string role, IList content) + { + Role = role; + Content = content; + } + + /// The role of the tool response. + public string Role { get; set; } + /// + /// Gets the content + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include and . + /// + public IList Content { get; } + } +} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/KnowledgeAgentMessageContent.Serialization.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/KnowledgeAgentMessageContent.Serialization.cs new file mode 100644 index 000000000000..495216155ffc --- /dev/null +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/KnowledgeAgentMessageContent.Serialization.cs @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.Search.Documents.Models +{ + public partial class KnowledgeAgentMessageContent : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("type"u8); + writer.WriteStringValue(Type.ToString()); + writer.WriteEndObject(); + } + + internal static KnowledgeAgentMessageContent DeserializeKnowledgeAgentMessageContent(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + if (element.TryGetProperty("type", out JsonElement discriminator)) + { + switch (discriminator.GetString()) + { + case "image": return KnowledgeAgentMessageImageContent.DeserializeKnowledgeAgentMessageImageContent(element); + case "text": return KnowledgeAgentMessageTextContent.DeserializeKnowledgeAgentMessageTextContent(element); + } + } + return UnknownKnowledgeAgentMessageContent.DeserializeUnknownKnowledgeAgentMessageContent(element); + } + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static KnowledgeAgentMessageContent FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeKnowledgeAgentMessageContent(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this); + return content; + } + } +} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/KnowledgeAgentMessageContent.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/KnowledgeAgentMessageContent.cs new file mode 100644 index 000000000000..32296c8b4261 --- /dev/null +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/KnowledgeAgentMessageContent.cs @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.Search.Documents.Models +{ + /// + /// Specifies the type of the message content. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include and . + /// + public abstract partial class KnowledgeAgentMessageContent + { + /// Initializes a new instance of . + protected KnowledgeAgentMessageContent() + { + } + + /// Initializes a new instance of . + /// The type of the message. + internal KnowledgeAgentMessageContent(KnowledgeAgentMessageContentType type) + { + Type = type; + } + + /// The type of the message. + internal KnowledgeAgentMessageContentType Type { get; set; } + } +} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/KnowledgeAgentMessageContentType.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/KnowledgeAgentMessageContentType.cs new file mode 100644 index 000000000000..adaa79603149 --- /dev/null +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/KnowledgeAgentMessageContentType.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.Search.Documents.Models +{ + /// The type of message content. + public readonly partial struct KnowledgeAgentMessageContentType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public KnowledgeAgentMessageContentType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string TextValue = "text"; + private const string ImageValue = "image"; + + /// Text message content kind. + public static KnowledgeAgentMessageContentType Text { get; } = new KnowledgeAgentMessageContentType(TextValue); + /// Image message content kind. + public static KnowledgeAgentMessageContentType Image { get; } = new KnowledgeAgentMessageContentType(ImageValue); + /// Determines if two values are the same. + public static bool operator ==(KnowledgeAgentMessageContentType left, KnowledgeAgentMessageContentType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(KnowledgeAgentMessageContentType left, KnowledgeAgentMessageContentType right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator KnowledgeAgentMessageContentType(string value) => new KnowledgeAgentMessageContentType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is KnowledgeAgentMessageContentType other && Equals(other); + /// + public bool Equals(KnowledgeAgentMessageContentType 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/search/Azure.Search.Documents/src/Generated/Models/KnowledgeAgentMessageImageContent.Serialization.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/KnowledgeAgentMessageImageContent.Serialization.cs new file mode 100644 index 000000000000..248ac708ed95 --- /dev/null +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/KnowledgeAgentMessageImageContent.Serialization.cs @@ -0,0 +1,65 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.Search.Documents.Models +{ + public partial class KnowledgeAgentMessageImageContent : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("image"u8); + writer.WriteObjectValue(Image); + writer.WritePropertyName("type"u8); + writer.WriteStringValue(Type.ToString()); + writer.WriteEndObject(); + } + + internal static KnowledgeAgentMessageImageContent DeserializeKnowledgeAgentMessageImageContent(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + KnowledgeAgentMessageImageContentImage image = default; + KnowledgeAgentMessageContentType type = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("image"u8)) + { + image = KnowledgeAgentMessageImageContentImage.DeserializeKnowledgeAgentMessageImageContentImage(property.Value); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new KnowledgeAgentMessageContentType(property.Value.GetString()); + continue; + } + } + return new KnowledgeAgentMessageImageContent(type, image); + } + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static new KnowledgeAgentMessageImageContent FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeKnowledgeAgentMessageImageContent(document.RootElement); + } + + /// Convert into a . + internal override RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this); + return content; + } + } +} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/KnowledgeAgentMessageImageContent.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/KnowledgeAgentMessageImageContent.cs new file mode 100644 index 000000000000..e5003bef93b7 --- /dev/null +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/KnowledgeAgentMessageImageContent.cs @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Azure.Search.Documents.Models +{ + /// Text message type. + public partial class KnowledgeAgentMessageImageContent : KnowledgeAgentMessageContent + { + /// Initializes a new instance of . + /// + /// is null. + public KnowledgeAgentMessageImageContent(KnowledgeAgentMessageImageContentImage image) + { + Argument.AssertNotNull(image, nameof(image)); + + Image = image; + Type = KnowledgeAgentMessageContentType.Image; + } + + /// Initializes a new instance of . + /// The type of the message. + /// + internal KnowledgeAgentMessageImageContent(KnowledgeAgentMessageContentType type, KnowledgeAgentMessageImageContentImage image) : base(type) + { + Image = image; + Type = type; + } + + /// Gets or sets the image. + public KnowledgeAgentMessageImageContentImage Image { get; set; } + } +} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/KnowledgeAgentMessageImageContentImage.Serialization.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/KnowledgeAgentMessageImageContentImage.Serialization.cs new file mode 100644 index 000000000000..d1261a203fb1 --- /dev/null +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/KnowledgeAgentMessageImageContentImage.Serialization.cs @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.Search.Documents.Models +{ + public partial class KnowledgeAgentMessageImageContentImage : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("url"u8); + writer.WriteStringValue(Url); + writer.WriteEndObject(); + } + + internal static KnowledgeAgentMessageImageContentImage DeserializeKnowledgeAgentMessageImageContentImage(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string url = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("url"u8)) + { + url = property.Value.GetString(); + continue; + } + } + return new KnowledgeAgentMessageImageContentImage(url); + } + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static KnowledgeAgentMessageImageContentImage FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeKnowledgeAgentMessageImageContentImage(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this); + return content; + } + } +} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/KnowledgeAgentMessageImageContentImage.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/KnowledgeAgentMessageImageContentImage.cs new file mode 100644 index 000000000000..ffdddfb52ad2 --- /dev/null +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/KnowledgeAgentMessageImageContentImage.cs @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Azure.Search.Documents.Models +{ + /// The KnowledgeAgentMessageImageContentImage. + public partial class KnowledgeAgentMessageImageContentImage + { + /// Initializes a new instance of . + /// The url of the image. + /// is null. + public KnowledgeAgentMessageImageContentImage(string url) + { + Argument.AssertNotNull(url, nameof(url)); + + Url = url; + } + + /// The url of the image. + public string Url { get; set; } + } +} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/KnowledgeAgentMessageTextContent.Serialization.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/KnowledgeAgentMessageTextContent.Serialization.cs new file mode 100644 index 000000000000..2bec55c19cc4 --- /dev/null +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/KnowledgeAgentMessageTextContent.Serialization.cs @@ -0,0 +1,65 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.Search.Documents.Models +{ + public partial class KnowledgeAgentMessageTextContent : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("text"u8); + writer.WriteStringValue(Text); + writer.WritePropertyName("type"u8); + writer.WriteStringValue(Type.ToString()); + writer.WriteEndObject(); + } + + internal static KnowledgeAgentMessageTextContent DeserializeKnowledgeAgentMessageTextContent(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string text = default; + KnowledgeAgentMessageContentType type = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("text"u8)) + { + text = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new KnowledgeAgentMessageContentType(property.Value.GetString()); + continue; + } + } + return new KnowledgeAgentMessageTextContent(type, text); + } + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static new KnowledgeAgentMessageTextContent FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeKnowledgeAgentMessageTextContent(document.RootElement); + } + + /// Convert into a . + internal override RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this); + return content; + } + } +} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/KnowledgeAgentMessageTextContent.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/KnowledgeAgentMessageTextContent.cs new file mode 100644 index 000000000000..e66ddd7f5659 --- /dev/null +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/KnowledgeAgentMessageTextContent.cs @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Azure.Search.Documents.Models +{ + /// Text message type. + public partial class KnowledgeAgentMessageTextContent : KnowledgeAgentMessageContent + { + /// Initializes a new instance of . + /// + /// is null. + public KnowledgeAgentMessageTextContent(string text) + { + Argument.AssertNotNull(text, nameof(text)); + + Text = text; + Type = KnowledgeAgentMessageContentType.Text; + } + + /// Initializes a new instance of . + /// The type of the message. + /// + internal KnowledgeAgentMessageTextContent(KnowledgeAgentMessageContentType type, string text) : base(type) + { + Text = text; + Type = type; + } + + /// Gets or sets the text. + public string Text { get; set; } + } +} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/KnowledgeAgentModel.Serialization.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/KnowledgeAgentModel.Serialization.cs new file mode 100644 index 000000000000..ad6ba573114a --- /dev/null +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/KnowledgeAgentModel.Serialization.cs @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; +using Azure.Search.Documents.Models; + +namespace Azure.Search.Documents.Indexes.Models +{ + public partial class KnowledgeAgentModel : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("kind"u8); + writer.WriteStringValue(Kind.ToString()); + writer.WriteEndObject(); + } + + internal static KnowledgeAgentModel DeserializeKnowledgeAgentModel(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + if (element.TryGetProperty("kind", out JsonElement discriminator)) + { + switch (discriminator.GetString()) + { + case "azureOpenAI": return KnowledgeAgentAzureOpenAIModel.DeserializeKnowledgeAgentAzureOpenAIModel(element); + } + } + return UnknownKnowledgeAgentModel.DeserializeUnknownKnowledgeAgentModel(element); + } + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static KnowledgeAgentModel FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeKnowledgeAgentModel(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this); + return content; + } + } +} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/KnowledgeAgentModel.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/KnowledgeAgentModel.cs new file mode 100644 index 000000000000..4fac0859d0c8 --- /dev/null +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/KnowledgeAgentModel.cs @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.Search.Documents.Indexes.Models +{ + /// + /// Specifies the connection parameters for the model to use for query planning. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include . + /// + public abstract partial class KnowledgeAgentModel + { + /// Initializes a new instance of . + protected KnowledgeAgentModel() + { + } + + /// Initializes a new instance of . + /// The type of AI model. + internal KnowledgeAgentModel(KnowledgeAgentModelKind kind) + { + Kind = kind; + } + + /// The type of AI model. + internal KnowledgeAgentModelKind Kind { get; set; } + } +} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/KnowledgeAgentModelKind.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/KnowledgeAgentModelKind.cs new file mode 100644 index 000000000000..7b06357ba598 --- /dev/null +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/KnowledgeAgentModelKind.cs @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.Search.Documents.Indexes.Models +{ + /// The AI model to be used for query planning. + public readonly partial struct KnowledgeAgentModelKind : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public KnowledgeAgentModelKind(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string AzureOpenAIValue = "azureOpenAI"; + + /// Use Azure Open AI models for query planning. + public static KnowledgeAgentModelKind AzureOpenAI { get; } = new KnowledgeAgentModelKind(AzureOpenAIValue); + /// Determines if two values are the same. + public static bool operator ==(KnowledgeAgentModelKind left, KnowledgeAgentModelKind right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(KnowledgeAgentModelKind left, KnowledgeAgentModelKind right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator KnowledgeAgentModelKind(string value) => new KnowledgeAgentModelKind(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is KnowledgeAgentModelKind other && Equals(other); + /// + public bool Equals(KnowledgeAgentModelKind 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/search/Azure.Search.Documents/src/Generated/Models/KnowledgeAgentModelQueryPlanningActivityRecord.Serialization.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/KnowledgeAgentModelQueryPlanningActivityRecord.Serialization.cs new file mode 100644 index 000000000000..5fff38471a3e --- /dev/null +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/KnowledgeAgentModelQueryPlanningActivityRecord.Serialization.cs @@ -0,0 +1,76 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; + +namespace Azure.Search.Documents.Models +{ + public partial class KnowledgeAgentModelQueryPlanningActivityRecord + { + internal static KnowledgeAgentModelQueryPlanningActivityRecord DeserializeKnowledgeAgentModelQueryPlanningActivityRecord(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + int? inputTokens = default; + int? outputTokens = default; + int? elapsedMs = default; + int id = default; + string type = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("inputTokens"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + inputTokens = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("outputTokens"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + outputTokens = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("elapsedMs"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + elapsedMs = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("id"u8)) + { + id = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = property.Value.GetString(); + continue; + } + } + return new KnowledgeAgentModelQueryPlanningActivityRecord(id, type, inputTokens, outputTokens, elapsedMs); + } + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static new KnowledgeAgentModelQueryPlanningActivityRecord FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeKnowledgeAgentModelQueryPlanningActivityRecord(document.RootElement); + } + } +} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/KnowledgeAgentModelQueryPlanningActivityRecord.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/KnowledgeAgentModelQueryPlanningActivityRecord.cs new file mode 100644 index 000000000000..635ceae5979e --- /dev/null +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/KnowledgeAgentModelQueryPlanningActivityRecord.cs @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.Search.Documents.Models +{ + /// Represents an LLM query planning activity record. + public partial class KnowledgeAgentModelQueryPlanningActivityRecord : KnowledgeAgentActivityRecord + { + /// Initializes a new instance of . + /// The ID of the activity record. + internal KnowledgeAgentModelQueryPlanningActivityRecord(int id) : base(id) + { + Type = "ModelQueryPlanning"; + } + + /// Initializes a new instance of . + /// The ID of the activity record. + /// The type of the activity record. + /// The number of input tokens for the LLM query planning activity. + /// The number of output tokens for the LLM query planning activity. + /// The elapsed time in milliseconds for the model activity. + internal KnowledgeAgentModelQueryPlanningActivityRecord(int id, string type, int? inputTokens, int? outputTokens, int? elapsedMs) : base(id, type) + { + InputTokens = inputTokens; + OutputTokens = outputTokens; + ElapsedMs = elapsedMs; + Type = type ?? "ModelQueryPlanning"; + } + + /// The number of input tokens for the LLM query planning activity. + public int? InputTokens { get; } + /// The number of output tokens for the LLM query planning activity. + public int? OutputTokens { get; } + /// The elapsed time in milliseconds for the model activity. + public int? ElapsedMs { get; } + } +} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/KnowledgeAgentReference.Serialization.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/KnowledgeAgentReference.Serialization.cs new file mode 100644 index 000000000000..227ec2a35242 --- /dev/null +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/KnowledgeAgentReference.Serialization.cs @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; + +namespace Azure.Search.Documents.Models +{ + public partial class KnowledgeAgentReference + { + internal static KnowledgeAgentReference DeserializeKnowledgeAgentReference(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + if (element.TryGetProperty("type", out JsonElement discriminator)) + { + switch (discriminator.GetString()) + { + case "AzureSearchDoc": return KnowledgeAgentAzureSearchDocReference.DeserializeKnowledgeAgentAzureSearchDocReference(element); + } + } + return UnknownKnowledgeAgentReference.DeserializeUnknownKnowledgeAgentReference(element); + } + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static KnowledgeAgentReference FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeKnowledgeAgentReference(document.RootElement); + } + } +} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/KnowledgeAgentReference.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/KnowledgeAgentReference.cs new file mode 100644 index 000000000000..0560cddee2ac --- /dev/null +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/KnowledgeAgentReference.cs @@ -0,0 +1,49 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Azure.Search.Documents.Models +{ + /// + /// Base type for references. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include . + /// + public abstract partial class KnowledgeAgentReference + { + /// Initializes a new instance of . + /// The ID of the reference. + /// The source activity ID for the reference. + /// is null. + protected KnowledgeAgentReference(string id, int activitySource) + { + Argument.AssertNotNull(id, nameof(id)); + + Id = id; + ActivitySource = activitySource; + } + + /// Initializes a new instance of . + /// The type of the reference. + /// The ID of the reference. + /// The source activity ID for the reference. + internal KnowledgeAgentReference(string type, string id, int activitySource) + { + Type = type; + Id = id; + ActivitySource = activitySource; + } + + /// The type of the reference. + internal string Type { get; set; } + /// The ID of the reference. + public string Id { get; } + /// The source activity ID for the reference. + public int ActivitySource { get; } + } +} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/KnowledgeAgentRequestLimits.Serialization.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/KnowledgeAgentRequestLimits.Serialization.cs new file mode 100644 index 000000000000..583082a52b4e --- /dev/null +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/KnowledgeAgentRequestLimits.Serialization.cs @@ -0,0 +1,79 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.Search.Documents.Indexes.Models +{ + public partial class KnowledgeAgentRequestLimits : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(MaxRuntimeInSeconds)) + { + writer.WritePropertyName("maxRuntimeInSeconds"u8); + writer.WriteNumberValue(MaxRuntimeInSeconds.Value); + } + if (Optional.IsDefined(MaxOutputSize)) + { + writer.WritePropertyName("maxOutputSize"u8); + writer.WriteNumberValue(MaxOutputSize.Value); + } + writer.WriteEndObject(); + } + + internal static KnowledgeAgentRequestLimits DeserializeKnowledgeAgentRequestLimits(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + int? maxRuntimeInSeconds = default; + int? maxOutputSize = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("maxRuntimeInSeconds"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + maxRuntimeInSeconds = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("maxOutputSize"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + maxOutputSize = property.Value.GetInt32(); + continue; + } + } + return new KnowledgeAgentRequestLimits(maxRuntimeInSeconds, maxOutputSize); + } + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static KnowledgeAgentRequestLimits FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeKnowledgeAgentRequestLimits(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this); + return content; + } + } +} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/KnowledgeAgentRequestLimits.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/KnowledgeAgentRequestLimits.cs new file mode 100644 index 000000000000..2806f1d859f5 --- /dev/null +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/KnowledgeAgentRequestLimits.cs @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.Search.Documents.Indexes.Models +{ + /// Guardrails to limit how much resources are utilized for a single agent retrieval request. + public partial class KnowledgeAgentRequestLimits + { + /// Initializes a new instance of . + public KnowledgeAgentRequestLimits() + { + } + + /// Initializes a new instance of . + /// The maximum runtime in seconds. + /// Limits the maximum size of the content in the output. + internal KnowledgeAgentRequestLimits(int? maxRuntimeInSeconds, int? maxOutputSize) + { + MaxRuntimeInSeconds = maxRuntimeInSeconds; + MaxOutputSize = maxOutputSize; + } + + /// The maximum runtime in seconds. + public int? MaxRuntimeInSeconds { get; set; } + /// Limits the maximum size of the content in the output. + public int? MaxOutputSize { get; set; } + } +} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/KnowledgeAgentRetrievalRequest.Serialization.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/KnowledgeAgentRetrievalRequest.Serialization.cs new file mode 100644 index 000000000000..d417a98a2c89 --- /dev/null +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/KnowledgeAgentRetrievalRequest.Serialization.cs @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.Search.Documents.Models +{ + public partial class KnowledgeAgentRetrievalRequest : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("messages"u8); + writer.WriteStartArray(); + foreach (var item in Messages) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + if (Optional.IsCollectionDefined(TargetIndexParams)) + { + writer.WritePropertyName("targetIndexParams"u8); + writer.WriteStartArray(); + foreach (var item in TargetIndexParams) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + writer.WriteEndObject(); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this); + return content; + } + } +} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/KnowledgeAgentRetrievalRequest.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/KnowledgeAgentRetrievalRequest.cs new file mode 100644 index 000000000000..4da3c5cf829e --- /dev/null +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/KnowledgeAgentRetrievalRequest.cs @@ -0,0 +1,42 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Azure.Search.Documents.Models +{ + /// The input contract for the retrieval request. + public partial class KnowledgeAgentRetrievalRequest + { + /// Initializes a new instance of . + /// + /// is null. + public KnowledgeAgentRetrievalRequest(IEnumerable messages) + { + Argument.AssertNotNull(messages, nameof(messages)); + + Messages = messages.ToList(); + TargetIndexParams = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// + /// + internal KnowledgeAgentRetrievalRequest(IList messages, IList targetIndexParams) + { + Messages = messages; + TargetIndexParams = targetIndexParams; + } + + /// Gets the messages. + public IList Messages { get; } + /// Gets the target index params. + public IList TargetIndexParams { get; } + } +} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/KnowledgeAgentRetrievalResponse.Serialization.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/KnowledgeAgentRetrievalResponse.Serialization.cs new file mode 100644 index 000000000000..cff97e219164 --- /dev/null +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/KnowledgeAgentRetrievalResponse.Serialization.cs @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; + +namespace Azure.Search.Documents.Models +{ + public partial class KnowledgeAgentRetrievalResponse + { + internal static KnowledgeAgentRetrievalResponse DeserializeKnowledgeAgentRetrievalResponse(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList response = default; + IReadOnlyList activity = default; + IReadOnlyList references = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("response"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(KnowledgeAgentMessage.DeserializeKnowledgeAgentMessage(item)); + } + response = array; + continue; + } + if (property.NameEquals("activity"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(KnowledgeAgentActivityRecord.DeserializeKnowledgeAgentActivityRecord(item)); + } + activity = array; + continue; + } + if (property.NameEquals("references"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(KnowledgeAgentReference.DeserializeKnowledgeAgentReference(item)); + } + references = array; + continue; + } + } + return new KnowledgeAgentRetrievalResponse(response ?? new ChangeTrackingList(), activity ?? new ChangeTrackingList(), references ?? new ChangeTrackingList()); + } + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static KnowledgeAgentRetrievalResponse FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeKnowledgeAgentRetrievalResponse(document.RootElement); + } + } +} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/KnowledgeAgentRetrievalResponse.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/KnowledgeAgentRetrievalResponse.cs new file mode 100644 index 000000000000..0b9394da24b8 --- /dev/null +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/KnowledgeAgentRetrievalResponse.cs @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; + +namespace Azure.Search.Documents.Models +{ + /// The output contract for the retrieval response. + public partial class KnowledgeAgentRetrievalResponse + { + /// Initializes a new instance of . + internal KnowledgeAgentRetrievalResponse() + { + Response = new ChangeTrackingList(); + Activity = new ChangeTrackingList(); + References = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// + /// + /// The activity records for tracking progress and billing implications. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , and . + /// + /// + /// The references for the retrieval data used in the response. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include . + /// + internal KnowledgeAgentRetrievalResponse(IReadOnlyList response, IReadOnlyList activity, IReadOnlyList references) + { + Response = response; + Activity = activity; + References = references; + } + + /// Gets the response. + public IReadOnlyList Response { get; } + /// + /// The activity records for tracking progress and billing implications. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , and . + /// + public IReadOnlyList Activity { get; } + /// + /// The references for the retrieval data used in the response. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include . + /// + public IReadOnlyList References { get; } + } +} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/KnowledgeAgentSearchActivityRecord.Serialization.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/KnowledgeAgentSearchActivityRecord.Serialization.cs new file mode 100644 index 000000000000..f989c1f5d1d4 --- /dev/null +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/KnowledgeAgentSearchActivityRecord.Serialization.cs @@ -0,0 +1,100 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; + +namespace Azure.Search.Documents.Models +{ + public partial class KnowledgeAgentSearchActivityRecord + { + internal static KnowledgeAgentSearchActivityRecord DeserializeKnowledgeAgentSearchActivityRecord(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string targetIndex = default; + KnowledgeAgentSearchActivityRecordQuery query = default; + DateTimeOffset? queryTime = default; + int? count = default; + int? elapsedMs = default; + int id = default; + string type = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("targetIndex"u8)) + { + targetIndex = property.Value.GetString(); + continue; + } + if (property.NameEquals("query"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + query = KnowledgeAgentSearchActivityRecordQuery.DeserializeKnowledgeAgentSearchActivityRecordQuery(property.Value); + continue; + } + if (property.NameEquals("queryTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + queryTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("count"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + count = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("elapsedMs"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + elapsedMs = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("id"u8)) + { + id = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = property.Value.GetString(); + continue; + } + } + return new KnowledgeAgentSearchActivityRecord( + id, + type, + targetIndex, + query, + queryTime, + count, + elapsedMs); + } + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static new KnowledgeAgentSearchActivityRecord FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeKnowledgeAgentSearchActivityRecord(document.RootElement); + } + } +} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/KnowledgeAgentSearchActivityRecord.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/KnowledgeAgentSearchActivityRecord.cs new file mode 100644 index 000000000000..a31942fcf04d --- /dev/null +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/KnowledgeAgentSearchActivityRecord.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Azure.Search.Documents.Models +{ + /// Represents a retrieval activity record. + public partial class KnowledgeAgentSearchActivityRecord : KnowledgeAgentActivityRecord + { + /// Initializes a new instance of . + /// The ID of the activity record. + internal KnowledgeAgentSearchActivityRecord(int id) : base(id) + { + Type = "AzureSearchQuery"; + } + + /// Initializes a new instance of . + /// The ID of the activity record. + /// The type of the activity record. + /// The target index for the retrieval activity. + /// The query details for the retrieval activity. + /// The query time for this retrieval activity. + /// The count of documents retrieved. + /// The elapsed time in milliseconds for the retrieval activity. + internal KnowledgeAgentSearchActivityRecord(int id, string type, string targetIndex, KnowledgeAgentSearchActivityRecordQuery query, DateTimeOffset? queryTime, int? count, int? elapsedMs) : base(id, type) + { + TargetIndex = targetIndex; + Query = query; + QueryTime = queryTime; + Count = count; + ElapsedMs = elapsedMs; + Type = type ?? "AzureSearchQuery"; + } + + /// The target index for the retrieval activity. + public string TargetIndex { get; } + /// The query details for the retrieval activity. + public KnowledgeAgentSearchActivityRecordQuery Query { get; } + /// The query time for this retrieval activity. + public DateTimeOffset? QueryTime { get; } + /// The count of documents retrieved. + public int? Count { get; } + /// The elapsed time in milliseconds for the retrieval activity. + public int? ElapsedMs { get; } + } +} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/KnowledgeAgentSearchActivityRecordQuery.Serialization.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/KnowledgeAgentSearchActivityRecordQuery.Serialization.cs new file mode 100644 index 000000000000..e77cb3f28c2e --- /dev/null +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/KnowledgeAgentSearchActivityRecordQuery.Serialization.cs @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; + +namespace Azure.Search.Documents.Models +{ + public partial class KnowledgeAgentSearchActivityRecordQuery + { + internal static KnowledgeAgentSearchActivityRecordQuery DeserializeKnowledgeAgentSearchActivityRecordQuery(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string search = default; + string filter = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("search"u8)) + { + search = property.Value.GetString(); + continue; + } + if (property.NameEquals("filter"u8)) + { + filter = property.Value.GetString(); + continue; + } + } + return new KnowledgeAgentSearchActivityRecordQuery(search, filter); + } + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static KnowledgeAgentSearchActivityRecordQuery FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeKnowledgeAgentSearchActivityRecordQuery(document.RootElement); + } + } +} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/KnowledgeAgentSearchActivityRecordQuery.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/KnowledgeAgentSearchActivityRecordQuery.cs new file mode 100644 index 000000000000..5018dd3c2608 --- /dev/null +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/KnowledgeAgentSearchActivityRecordQuery.cs @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.Search.Documents.Models +{ + /// The query details for the retrieval activity. + public partial class KnowledgeAgentSearchActivityRecordQuery + { + /// Initializes a new instance of . + internal KnowledgeAgentSearchActivityRecordQuery() + { + } + + /// Initializes a new instance of . + /// The search string. + /// The filter string. + internal KnowledgeAgentSearchActivityRecordQuery(string search, string filter) + { + Search = search; + Filter = filter; + } + + /// The search string. + public string Search { get; } + /// The filter string. + public string Filter { get; } + } +} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/KnowledgeAgentSemanticRankerActivityRecord.Serialization.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/KnowledgeAgentSemanticRankerActivityRecord.Serialization.cs new file mode 100644 index 000000000000..6a7ef36a298e --- /dev/null +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/KnowledgeAgentSemanticRankerActivityRecord.Serialization.cs @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; + +namespace Azure.Search.Documents.Models +{ + public partial class KnowledgeAgentSemanticRankerActivityRecord + { + internal static KnowledgeAgentSemanticRankerActivityRecord DeserializeKnowledgeAgentSemanticRankerActivityRecord(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + int? inputTokens = default; + int? elapsedMs = default; + int id = default; + string type = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("inputTokens"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + inputTokens = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("elapsedMs"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + elapsedMs = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("id"u8)) + { + id = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = property.Value.GetString(); + continue; + } + } + return new KnowledgeAgentSemanticRankerActivityRecord(id, type, inputTokens, elapsedMs); + } + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static new KnowledgeAgentSemanticRankerActivityRecord FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeKnowledgeAgentSemanticRankerActivityRecord(document.RootElement); + } + } +} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/KnowledgeAgentSemanticRankerActivityRecord.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/KnowledgeAgentSemanticRankerActivityRecord.cs new file mode 100644 index 000000000000..8be1e2eed1ed --- /dev/null +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/KnowledgeAgentSemanticRankerActivityRecord.cs @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.Search.Documents.Models +{ + /// Represents a semantic ranker activity record. + public partial class KnowledgeAgentSemanticRankerActivityRecord : KnowledgeAgentActivityRecord + { + /// Initializes a new instance of . + /// The ID of the activity record. + internal KnowledgeAgentSemanticRankerActivityRecord(int id) : base(id) + { + Type = "AzureSearchSemanticRanker"; + } + + /// Initializes a new instance of . + /// The ID of the activity record. + /// The type of the activity record. + /// The number of input tokens for the semantic ranker activity. + /// The elapsed time in milliseconds for the model activity. + internal KnowledgeAgentSemanticRankerActivityRecord(int id, string type, int? inputTokens, int? elapsedMs) : base(id, type) + { + InputTokens = inputTokens; + ElapsedMs = elapsedMs; + Type = type ?? "AzureSearchSemanticRanker"; + } + + /// The number of input tokens for the semantic ranker activity. + public int? InputTokens { get; } + /// The elapsed time in milliseconds for the model activity. + public int? ElapsedMs { get; } + } +} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/KnowledgeAgentTargetIndex.Serialization.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/KnowledgeAgentTargetIndex.Serialization.cs new file mode 100644 index 000000000000..5a7b5d33c61e --- /dev/null +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/KnowledgeAgentTargetIndex.Serialization.cs @@ -0,0 +1,102 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.Search.Documents.Indexes.Models +{ + public partial class KnowledgeAgentTargetIndex : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("indexName"u8); + writer.WriteStringValue(IndexName); + if (Optional.IsDefined(DefaultRerankerThreshold)) + { + writer.WritePropertyName("defaultRerankerThreshold"u8); + writer.WriteNumberValue(DefaultRerankerThreshold.Value); + } + if (Optional.IsDefined(DefaultIncludeReferenceSourceData)) + { + writer.WritePropertyName("defaultIncludeReferenceSourceData"u8); + writer.WriteBooleanValue(DefaultIncludeReferenceSourceData.Value); + } + if (Optional.IsDefined(DefaultMaxDocsForReranker)) + { + writer.WritePropertyName("defaultMaxDocsForReranker"u8); + writer.WriteNumberValue(DefaultMaxDocsForReranker.Value); + } + writer.WriteEndObject(); + } + + internal static KnowledgeAgentTargetIndex DeserializeKnowledgeAgentTargetIndex(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string indexName = default; + float? defaultRerankerThreshold = default; + bool? defaultIncludeReferenceSourceData = default; + int? defaultMaxDocsForReranker = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("indexName"u8)) + { + indexName = property.Value.GetString(); + continue; + } + if (property.NameEquals("defaultRerankerThreshold"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + defaultRerankerThreshold = property.Value.GetSingle(); + continue; + } + if (property.NameEquals("defaultIncludeReferenceSourceData"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + defaultIncludeReferenceSourceData = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("defaultMaxDocsForReranker"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + defaultMaxDocsForReranker = property.Value.GetInt32(); + continue; + } + } + return new KnowledgeAgentTargetIndex(indexName, defaultRerankerThreshold, defaultIncludeReferenceSourceData, defaultMaxDocsForReranker); + } + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static KnowledgeAgentTargetIndex FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeKnowledgeAgentTargetIndex(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this); + return content; + } + } +} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/KnowledgeAgentTargetIndex.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/KnowledgeAgentTargetIndex.cs new file mode 100644 index 000000000000..c4824d90658b --- /dev/null +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/KnowledgeAgentTargetIndex.cs @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Azure.Search.Documents.Indexes.Models +{ + /// The KnowledgeAgentTargetIndex. + public partial class KnowledgeAgentTargetIndex + { + /// Initializes a new instance of . + /// The name of the target index. + /// is null. + public KnowledgeAgentTargetIndex(string indexName) + { + Argument.AssertNotNull(indexName, nameof(indexName)); + + IndexName = indexName; + } + + /// Initializes a new instance of . + /// The name of the target index. + /// A threshold for reranking results (range: 0-4). + /// Indicates whether reference source data should be included. + /// Limits the number of documents considered for ranking. + internal KnowledgeAgentTargetIndex(string indexName, float? defaultRerankerThreshold, bool? defaultIncludeReferenceSourceData, int? defaultMaxDocsForReranker) + { + IndexName = indexName; + DefaultRerankerThreshold = defaultRerankerThreshold; + DefaultIncludeReferenceSourceData = defaultIncludeReferenceSourceData; + DefaultMaxDocsForReranker = defaultMaxDocsForReranker; + } + + /// The name of the target index. + public string IndexName { get; set; } + /// A threshold for reranking results (range: 0-4). + public float? DefaultRerankerThreshold { get; set; } + /// Indicates whether reference source data should be included. + public bool? DefaultIncludeReferenceSourceData { get; set; } + /// Limits the number of documents considered for ranking. + public int? DefaultMaxDocsForReranker { get; set; } + } +} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/ListKnowledgeAgentsResult.Serialization.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/ListKnowledgeAgentsResult.Serialization.cs new file mode 100644 index 000000000000..385c76c7feca --- /dev/null +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/ListKnowledgeAgentsResult.Serialization.cs @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; + +namespace Azure.Search.Documents.Indexes.Models +{ + internal partial class ListKnowledgeAgentsResult + { + internal static ListKnowledgeAgentsResult DeserializeListKnowledgeAgentsResult(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList value = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(KnowledgeAgent.DeserializeKnowledgeAgent(item)); + } + value = array; + continue; + } + } + return new ListKnowledgeAgentsResult(value); + } + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static ListKnowledgeAgentsResult FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeListKnowledgeAgentsResult(document.RootElement); + } + } +} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/ListKnowledgeAgentsResult.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/ListKnowledgeAgentsResult.cs new file mode 100644 index 000000000000..c1900d566b28 --- /dev/null +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/ListKnowledgeAgentsResult.cs @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Azure.Search.Documents.Indexes.Models +{ + /// The ListKnowledgeAgentsResult. + internal partial class ListKnowledgeAgentsResult + { + /// Initializes a new instance of . + /// + /// is null. + internal ListKnowledgeAgentsResult(IEnumerable knowledgeAgents) + { + Argument.AssertNotNull(knowledgeAgents, nameof(knowledgeAgents)); + + KnowledgeAgents = knowledgeAgents.ToList(); + } + + /// Initializes a new instance of . + /// + internal ListKnowledgeAgentsResult(IReadOnlyList knowledgeAgents) + { + KnowledgeAgents = knowledgeAgents; + } + + /// Gets the knowledge agents. + public IReadOnlyList KnowledgeAgents { get; } + } +} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/PermissionFilter.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/PermissionFilter.cs new file mode 100644 index 000000000000..226a4167aee6 --- /dev/null +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/PermissionFilter.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.Search.Documents.Models +{ + /// A value indicating whether the field should be used as a permission filter. + public readonly partial struct PermissionFilter : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public PermissionFilter(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string UserIdsValue = "userIds"; + private const string GroupIdsValue = "groupIds"; + private const string RbacScopeValue = "rbacScope"; + + /// Field represents user IDs that should be used to filter document access on queries. + public static PermissionFilter UserIds { get; } = new PermissionFilter(UserIdsValue); + /// Field represents group IDs that should be used to filter document access on queries. + public static PermissionFilter GroupIds { get; } = new PermissionFilter(GroupIdsValue); + /// Field represents an RBAC scope that should be used to filter document access on queries. + public static PermissionFilter RbacScope { get; } = new PermissionFilter(RbacScopeValue); + /// Determines if two values are the same. + public static bool operator ==(PermissionFilter left, PermissionFilter right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(PermissionFilter left, PermissionFilter right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator PermissionFilter(string value) => new PermissionFilter(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is PermissionFilter other && Equals(other); + /// + public bool Equals(PermissionFilter 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/search/Azure.Search.Documents/src/Generated/Models/QueryDebugMode.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/QueryDebugMode.cs index 28bc67685efc..49563992980a 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/QueryDebugMode.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/QueryDebugMode.cs @@ -26,6 +26,7 @@ public QueryDebugMode(string value) private const string SemanticValue = "semantic"; private const string VectorValue = "vector"; private const string QueryRewritesValue = "queryRewrites"; + private const string InnerHitsValue = "innerHits"; private const string AllValue = "all"; /// No query debugging information will be returned. @@ -36,6 +37,8 @@ public QueryDebugMode(string value) public static QueryDebugMode Vector { get; } = new QueryDebugMode(VectorValue); /// Allows the user to explore the list of query rewrites generated for their search request. public static QueryDebugMode QueryRewrites { get; } = new QueryDebugMode(QueryRewritesValue); + /// Allows the user to retrieve scoring information regarding vectors matched within a collection of complex types. + public static QueryDebugMode InnerHits { get; } = new QueryDebugMode(InnerHitsValue); /// Turn on all debug options. public static QueryDebugMode All { get; } = new QueryDebugMode(AllValue); /// Determines if two values are the same. diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/QueryResultDocumentInnerHit.Serialization.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/QueryResultDocumentInnerHit.Serialization.cs new file mode 100644 index 000000000000..fea2233a9271 --- /dev/null +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/QueryResultDocumentInnerHit.Serialization.cs @@ -0,0 +1,72 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; + +namespace Azure.Search.Documents.Models +{ + public partial class QueryResultDocumentInnerHit + { + internal static QueryResultDocumentInnerHit DeserializeQueryResultDocumentInnerHit(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + long? ordinal = default; + IReadOnlyList> vectors = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("ordinal"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + ordinal = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("vectors"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List> array = new List>(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + Dictionary dictionary = new Dictionary(); + foreach (var property0 in item.EnumerateObject()) + { + dictionary.Add(property0.Name, SingleVectorFieldResult.DeserializeSingleVectorFieldResult(property0.Value)); + } + array.Add(dictionary); + } + } + vectors = array; + continue; + } + } + return new QueryResultDocumentInnerHit(ordinal, vectors ?? new ChangeTrackingList>()); + } + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static QueryResultDocumentInnerHit FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeQueryResultDocumentInnerHit(document.RootElement); + } + } +} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/QueryResultDocumentInnerHit.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/QueryResultDocumentInnerHit.cs new file mode 100644 index 000000000000..153a06f76870 --- /dev/null +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/QueryResultDocumentInnerHit.cs @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; + +namespace Azure.Search.Documents.Models +{ + /// Detailed scoring information for an individual element of a complex collection. + public partial class QueryResultDocumentInnerHit + { + /// Initializes a new instance of . + internal QueryResultDocumentInnerHit() + { + Vectors = new ChangeTrackingList>(); + } + + /// Initializes a new instance of . + /// Position of this specific matching element within it's original collection. Position starts at 0. + /// Detailed scoring information for an individual element of a complex collection that matched a vector query. + internal QueryResultDocumentInnerHit(long? ordinal, IReadOnlyList> vectors) + { + Ordinal = ordinal; + Vectors = vectors; + } + + /// Position of this specific matching element within it's original collection. Position starts at 0. + public long? Ordinal { get; } + /// Detailed scoring information for an individual element of a complex collection that matched a vector query. + public IReadOnlyList> Vectors { get; } + } +} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/RankingOrder.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/RankingOrder.cs new file mode 100644 index 000000000000..01c5b759b091 --- /dev/null +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/RankingOrder.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.Search.Documents.Indexes.Models +{ + /// Represents score to use for sort order of documents. + public readonly partial struct RankingOrder : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public RankingOrder(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string BoostedRerankerScoreValue = "BoostedRerankerScore"; + private const string ReRankerScoreValue = "RerankerScore"; + + /// Sets sort order as BoostedRerankerScore. + public static RankingOrder BoostedRerankerScore { get; } = new RankingOrder(BoostedRerankerScoreValue); + /// Sets sort order as ReRankerScore. + public static RankingOrder ReRankerScore { get; } = new RankingOrder(ReRankerScoreValue); + /// Determines if two values are the same. + public static bool operator ==(RankingOrder left, RankingOrder right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(RankingOrder left, RankingOrder right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator RankingOrder(string value) => new RankingOrder(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is RankingOrder other && Equals(other); + /// + public bool Equals(RankingOrder 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/search/Azure.Search.Documents/src/Generated/Models/SearchField.Serialization.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchField.Serialization.cs index d8edd0e7d8f5..1f8815b60c68 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchField.Serialization.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchField.Serialization.cs @@ -8,6 +8,7 @@ using System.Collections.Generic; using System.Text.Json; using Azure.Core; +using Azure.Search.Documents.Models; namespace Azure.Search.Documents.Indexes.Models { @@ -55,6 +56,18 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("facetable"u8); writer.WriteBooleanValue(IsFacetable.Value); } + if (Optional.IsDefined(PermissionFilter)) + { + if (PermissionFilter != null) + { + writer.WritePropertyName("permissionFilter"u8); + writer.WriteStringValue(PermissionFilter.Value.ToString()); + } + else + { + writer.WriteNull("permissionFilter"); + } + } if (Optional.IsDefined(AnalyzerName)) { if (AnalyzerName != null) @@ -177,6 +190,7 @@ internal static SearchField DeserializeSearchField(JsonElement element) bool? filterable = default; bool? sortable = default; bool? facetable = default; + PermissionFilter? permissionFilter = default; LexicalAnalyzerName? analyzer = default; LexicalAnalyzerName? searchAnalyzer = default; LexicalAnalyzerName? indexAnalyzer = default; @@ -261,6 +275,16 @@ internal static SearchField DeserializeSearchField(JsonElement element) facetable = property.Value.GetBoolean(); continue; } + if (property.NameEquals("permissionFilter"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + permissionFilter = null; + continue; + } + permissionFilter = new PermissionFilter(property.Value.GetString()); + continue; + } if (property.NameEquals("analyzer"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -370,6 +394,7 @@ internal static SearchField DeserializeSearchField(JsonElement element) filterable, sortable, facetable, + permissionFilter, analyzer, searchAnalyzer, indexAnalyzer, diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchField.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchField.cs index 4bbad7499be6..e54dee64cf83 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchField.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchField.cs @@ -7,6 +7,7 @@ using System; using System.Collections.Generic; +using Azure.Search.Documents.Models; namespace Azure.Search.Documents.Indexes.Models { @@ -23,6 +24,7 @@ public partial class SearchField /// A value indicating whether to enable the field to be referenced in $filter queries. filterable differs from searchable in how strings are handled. Fields of type Edm.String or Collection(Edm.String) that are filterable do not undergo word-breaking, so comparisons are for exact matches only. For example, if you set such a field f to "sunny day", $filter=f eq 'sunny' will find no matches, but $filter=f eq 'sunny day' will. This property must be null for complex fields. Default is true for simple fields and null for complex fields. /// A value indicating whether to enable the field to be referenced in $orderby expressions. By default, the search engine sorts results by score, but in many experiences users will want to sort by fields in the documents. A simple field can be sortable only if it is single-valued (it has a single value in the scope of the parent document). Simple collection fields cannot be sortable, since they are multi-valued. Simple sub-fields of complex collections are also multi-valued, and therefore cannot be sortable. This is true whether it's an immediate parent field, or an ancestor field, that's the complex collection. Complex fields cannot be sortable and the sortable property must be null for such fields. The default for sortable is true for single-valued simple fields, false for multi-valued simple fields, and null for complex fields. /// A value indicating whether to enable the field to be referenced in facet queries. Typically used in a presentation of search results that includes hit count by category (for example, search for digital cameras and see hits by brand, by megapixels, by price, and so on). This property must be null for complex fields. Fields of type Edm.GeographyPoint or Collection(Edm.GeographyPoint) cannot be facetable. Default is true for all other simple fields. + /// A value indicating whether the field should be used as a permission filter. /// The name of the analyzer to use for the field. This option can be used only with searchable fields and it can't be set together with either searchAnalyzer or indexAnalyzer. Once the analyzer is chosen, it cannot be changed for the field. Must be null for complex fields. /// The name of the analyzer used at search time for the field. This option can be used only with searchable fields. It must be set together with indexAnalyzer and it cannot be set together with the analyzer option. This property cannot be set to the name of a language analyzer; use the analyzer property instead if you need a language analyzer. This analyzer can be updated on an existing field. Must be null for complex fields. /// The name of the analyzer used at indexing time for the field. This option can be used only with searchable fields. It must be set together with searchAnalyzer and it cannot be set together with the analyzer option. This property cannot be set to the name of a language analyzer; use the analyzer property instead if you need a language analyzer. Once the analyzer is chosen, it cannot be changed for the field. Must be null for complex fields. @@ -32,7 +34,7 @@ public partial class SearchField /// The encoding format to interpret the field contents. /// A list of the names of synonym maps to associate with this field. This option can be used only with searchable fields. Currently only one synonym map per field is supported. Assigning a synonym map to a field ensures that query terms targeting that field are expanded at query-time using the rules in the synonym map. This attribute can be changed on existing fields. Must be null or an empty collection for complex fields. /// A list of sub-fields if this is a field of type Edm.ComplexType or Collection(Edm.ComplexType). Must be null or empty for simple fields. - internal SearchField(string name, SearchFieldDataType type, bool? isKey, bool? isRetrievable, bool? isStored, bool? isSearchable, bool? isFilterable, bool? isSortable, bool? isFacetable, LexicalAnalyzerName? analyzerName, LexicalAnalyzerName? searchAnalyzerName, LexicalAnalyzerName? indexAnalyzerName, LexicalNormalizerName? normalizerName, int? vectorSearchDimensions, string vectorSearchProfileName, VectorEncodingFormat? vectorEncodingFormat, IList synonymMapNames, IList fields) + internal SearchField(string name, SearchFieldDataType type, bool? isKey, bool? isRetrievable, bool? isStored, bool? isSearchable, bool? isFilterable, bool? isSortable, bool? isFacetable, PermissionFilter? permissionFilter, LexicalAnalyzerName? analyzerName, LexicalAnalyzerName? searchAnalyzerName, LexicalAnalyzerName? indexAnalyzerName, LexicalNormalizerName? normalizerName, int? vectorSearchDimensions, string vectorSearchProfileName, VectorEncodingFormat? vectorEncodingFormat, IList synonymMapNames, IList fields) { Name = name; Type = type; @@ -43,6 +45,7 @@ internal SearchField(string name, SearchFieldDataType type, bool? isKey, bool? i IsFilterable = isFilterable; IsSortable = isSortable; IsFacetable = isFacetable; + PermissionFilter = permissionFilter; AnalyzerName = analyzerName; SearchAnalyzerName = searchAnalyzerName; IndexAnalyzerName = indexAnalyzerName; @@ -53,6 +56,8 @@ internal SearchField(string name, SearchFieldDataType type, bool? isKey, bool? i SynonymMapNames = synonymMapNames; Fields = fields; } + /// A value indicating whether the field should be used as a permission filter. + public PermissionFilter? PermissionFilter { get; set; } /// The dimensionality of the vector field. public int? VectorSearchDimensions { get; set; } /// The name of the vector search profile that specifies the algorithm and vectorizer to use when searching the vector field. diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchIndex.Serialization.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchIndex.Serialization.cs index 44028bd8351e..18fb1a7a9b9a 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchIndex.Serialization.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchIndex.Serialization.cs @@ -8,6 +8,7 @@ using System.Collections.Generic; using System.Text.Json; using Azure.Core; +using Azure.Search.Documents.Models; namespace Azure.Search.Documents.Indexes.Models { @@ -18,6 +19,11 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WriteStartObject(); writer.WritePropertyName("name"u8); writer.WriteStringValue(Name); + if (Optional.IsDefined(Description)) + { + writer.WritePropertyName("description"u8); + writer.WriteStringValue(Description); + } writer.WritePropertyName("fields"u8); writer.WriteStartArray(); foreach (var item in _fields) @@ -153,6 +159,18 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WriteNull("vectorSearch"); } } + if (Optional.IsDefined(PermissionFilterOption)) + { + if (PermissionFilterOption != null) + { + writer.WritePropertyName("permissionFilterOption"u8); + writer.WriteStringValue(PermissionFilterOption.Value.ToString()); + } + else + { + writer.WriteNull("permissionFilterOption"); + } + } if (Optional.IsDefined(_etag)) { writer.WritePropertyName("@odata.etag"u8); @@ -168,6 +186,7 @@ internal static SearchIndex DeserializeSearchIndex(JsonElement element) return null; } string name = default; + string description = default; IList fields = default; IList scoringProfiles = default; string defaultScoringProfile = default; @@ -182,6 +201,7 @@ internal static SearchIndex DeserializeSearchIndex(JsonElement element) SimilarityAlgorithm similarity = default; SemanticSearch semantic = default; VectorSearch vectorSearch = default; + SearchIndexPermissionFilterOption? permissionFilterOption = default; string odataEtag = default; foreach (var property in element.EnumerateObject()) { @@ -190,6 +210,11 @@ internal static SearchIndex DeserializeSearchIndex(JsonElement element) name = property.Value.GetString(); continue; } + if (property.NameEquals("description"u8)) + { + description = property.Value.GetString(); + continue; + } if (property.NameEquals("fields"u8)) { List array = new List(); @@ -352,6 +377,16 @@ internal static SearchIndex DeserializeSearchIndex(JsonElement element) vectorSearch = VectorSearch.DeserializeVectorSearch(property.Value); continue; } + if (property.NameEquals("permissionFilterOption"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + permissionFilterOption = null; + continue; + } + permissionFilterOption = new SearchIndexPermissionFilterOption(property.Value.GetString()); + continue; + } if (property.NameEquals("@odata.etag"u8)) { odataEtag = property.Value.GetString(); @@ -360,6 +395,7 @@ internal static SearchIndex DeserializeSearchIndex(JsonElement element) } return new SearchIndex( name, + description, fields, scoringProfiles ?? new ChangeTrackingList(), defaultScoringProfile, @@ -374,6 +410,7 @@ internal static SearchIndex DeserializeSearchIndex(JsonElement element) similarity, semantic, vectorSearch, + permissionFilterOption, odataEtag); } diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchIndex.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchIndex.cs index dfaafc2d2553..3b4e9386b210 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchIndex.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchIndex.cs @@ -8,6 +8,7 @@ using System; using System.Collections.Generic; using System.Linq; +using Azure.Search.Documents.Models; namespace Azure.Search.Documents.Indexes.Models { @@ -16,6 +17,7 @@ public partial class SearchIndex { /// Initializes a new instance of . /// The name of the index. + /// The description of the index. /// The fields of the index. /// The scoring profiles for the index. /// The name of the scoring profile to use if none is specified in the query. If this property is not set and no scoring profile is specified in the query, then default scoring (tf-idf) will be used. @@ -54,10 +56,12 @@ public partial class SearchIndex /// /// Defines parameters for a search index that influence semantic capabilities. /// Contains configuration options related to vector search. + /// A value indicating whether permission filtering is enabled for the index. /// The ETag of the index. - internal SearchIndex(string name, IList fields, IList scoringProfiles, string defaultScoringProfile, CorsOptions corsOptions, IList suggesters, IList analyzers, IList tokenizers, IList tokenFilters, IList charFilters, IList normalizers, SearchResourceEncryptionKey encryptionKey, SimilarityAlgorithm similarity, SemanticSearch semanticSearch, VectorSearch vectorSearch, string etag) + internal SearchIndex(string name, string description, IList fields, IList scoringProfiles, string defaultScoringProfile, CorsOptions corsOptions, IList suggesters, IList analyzers, IList tokenizers, IList tokenFilters, IList charFilters, IList normalizers, SearchResourceEncryptionKey encryptionKey, SimilarityAlgorithm similarity, SemanticSearch semanticSearch, VectorSearch vectorSearch, SearchIndexPermissionFilterOption? permissionFilterOption, string etag) { Name = name; + Description = description; _fields = fields; ScoringProfiles = scoringProfiles; DefaultScoringProfile = defaultScoringProfile; @@ -72,8 +76,11 @@ internal SearchIndex(string name, IList fields, IList The description of the index. + public string Description { get; set; } /// The name of the scoring profile to use if none is specified in the query. If this property is not set and no scoring profile is specified in the query, then default scoring (tf-idf) will be used. public string DefaultScoringProfile { get; set; } /// Options to control Cross-Origin Resource Sharing (CORS) for the index. @@ -90,5 +97,7 @@ internal SearchIndex(string name, IList fields, IList Contains configuration options related to vector search. public VectorSearch VectorSearch { get; set; } + /// A value indicating whether permission filtering is enabled for the index. + public SearchIndexPermissionFilterOption? PermissionFilterOption { get; set; } } } diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchIndexPermissionFilterOption.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchIndexPermissionFilterOption.cs new file mode 100644 index 000000000000..dfa62813545b --- /dev/null +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchIndexPermissionFilterOption.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.Search.Documents.Models +{ + /// A value indicating whether permission filtering is enabled for the index. + public readonly partial struct SearchIndexPermissionFilterOption : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public SearchIndexPermissionFilterOption(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string EnabledValue = "enabled"; + private const string DisabledValue = "disabled"; + + /// enabled. + public static SearchIndexPermissionFilterOption Enabled { get; } = new SearchIndexPermissionFilterOption(EnabledValue); + /// disabled. + public static SearchIndexPermissionFilterOption Disabled { get; } = new SearchIndexPermissionFilterOption(DisabledValue); + /// Determines if two values are the same. + public static bool operator ==(SearchIndexPermissionFilterOption left, SearchIndexPermissionFilterOption right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(SearchIndexPermissionFilterOption left, SearchIndexPermissionFilterOption right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator SearchIndexPermissionFilterOption(string value) => new SearchIndexPermissionFilterOption(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is SearchIndexPermissionFilterOption other && Equals(other); + /// + public bool Equals(SearchIndexPermissionFilterOption 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/search/Azure.Search.Documents/src/Generated/Models/SearchIndexerDataSourceConnection.Serialization.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchIndexerDataSourceConnection.Serialization.cs index 6ee8a098669e..35dffb9163ec 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchIndexerDataSourceConnection.Serialization.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchIndexerDataSourceConnection.Serialization.cs @@ -5,6 +5,7 @@ #nullable disable +using System.Collections.Generic; using System.Text.Json; using Azure.Core; @@ -40,6 +41,23 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WriteNull("identity"); } } + if (Optional.IsCollectionDefined(IndexerPermissionOptions)) + { + if (IndexerPermissionOptions != null) + { + writer.WritePropertyName("indexerPermissionOptions"u8); + writer.WriteStartArray(); + foreach (var item in IndexerPermissionOptions) + { + writer.WriteStringValue(item.ToString()); + } + writer.WriteEndArray(); + } + else + { + writer.WriteNull("indexerPermissionOptions"); + } + } if (Optional.IsDefined(DataChangeDetectionPolicy)) { if (DataChangeDetectionPolicy != null) @@ -96,6 +114,7 @@ internal static SearchIndexerDataSourceConnection DeserializeSearchIndexerDataSo DataSourceCredentials credentials = default; SearchIndexerDataContainer container = default; SearchIndexerDataIdentity identity = default; + IList indexerPermissionOptions = default; DataChangeDetectionPolicy dataChangeDetectionPolicy = default; DataDeletionDetectionPolicy dataDeletionDetectionPolicy = default; string odataEtag = default; @@ -137,6 +156,21 @@ internal static SearchIndexerDataSourceConnection DeserializeSearchIndexerDataSo identity = SearchIndexerDataIdentity.DeserializeSearchIndexerDataIdentity(property.Value); continue; } + if (property.NameEquals("indexerPermissionOptions"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + indexerPermissionOptions = null; + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(new IndexerPermissionOption(item.GetString())); + } + indexerPermissionOptions = array; + continue; + } if (property.NameEquals("dataChangeDetectionPolicy"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -180,6 +214,7 @@ internal static SearchIndexerDataSourceConnection DeserializeSearchIndexerDataSo credentials, container, identity, + indexerPermissionOptions ?? new ChangeTrackingList(), dataChangeDetectionPolicy, dataDeletionDetectionPolicy, odataEtag, diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchIndexerDataSourceConnection.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchIndexerDataSourceConnection.cs index 675a4a69a7bf..c6bf579a0b53 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchIndexerDataSourceConnection.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchIndexerDataSourceConnection.cs @@ -6,6 +6,7 @@ #nullable disable using System; +using System.Collections.Generic; namespace Azure.Search.Documents.Indexes.Models { @@ -23,6 +24,7 @@ public partial class SearchIndexerDataSourceConnection /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. /// The available derived classes include and . /// + /// Ingestion options with various types of permission data. /// /// The data change detection policy for the datasource. /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. @@ -35,7 +37,7 @@ public partial class SearchIndexerDataSourceConnection /// /// The ETag of the data source. /// A description of an encryption key that you create in Azure Key Vault. This key is used to provide an additional level of encryption-at-rest for your datasource definition when you want full assurance that no one, not even Microsoft, can decrypt your data source definition. Once you have encrypted your data source definition, it will always remain encrypted. The search service will ignore attempts to set this property to null. You can change this property as needed if you want to rotate your encryption key; Your datasource definition will be unaffected. Encryption with customer-managed keys is not available for free search services, and is only available for paid services created on or after January 1, 2019. - internal SearchIndexerDataSourceConnection(string name, string description, SearchIndexerDataSourceType type, DataSourceCredentials credentialsInternal, SearchIndexerDataContainer container, SearchIndexerDataIdentity identity, DataChangeDetectionPolicy dataChangeDetectionPolicy, DataDeletionDetectionPolicy dataDeletionDetectionPolicy, string etag, SearchResourceEncryptionKey encryptionKey) + internal SearchIndexerDataSourceConnection(string name, string description, SearchIndexerDataSourceType type, DataSourceCredentials credentialsInternal, SearchIndexerDataContainer container, SearchIndexerDataIdentity identity, IList indexerPermissionOptions, DataChangeDetectionPolicy dataChangeDetectionPolicy, DataDeletionDetectionPolicy dataDeletionDetectionPolicy, string etag, SearchResourceEncryptionKey encryptionKey) { Name = name; Description = description; @@ -43,6 +45,7 @@ internal SearchIndexerDataSourceConnection(string name, string description, Sear CredentialsInternal = credentialsInternal; Container = container; Identity = identity; + IndexerPermissionOptions = indexerPermissionOptions; DataChangeDetectionPolicy = dataChangeDetectionPolicy; DataDeletionDetectionPolicy = dataDeletionDetectionPolicy; _etag = etag; @@ -63,6 +66,8 @@ internal SearchIndexerDataSourceConnection(string name, string description, Sear /// The available derived classes include and . /// public SearchIndexerDataIdentity Identity { get; set; } + /// Ingestion options with various types of permission data. + public IList IndexerPermissionOptions { get; set; } /// /// The data change detection policy for the datasource. /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchIndexerSkill.Serialization.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchIndexerSkill.Serialization.cs index e70066d747d8..1e17380885a3 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchIndexerSkill.Serialization.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchIndexerSkill.Serialization.cs @@ -61,6 +61,7 @@ internal static SearchIndexerSkill DeserializeSearchIndexerSkill(JsonElement ele switch (discriminator.GetString()) { case "#Microsoft.Skills.Custom.AmlSkill": return AzureMachineLearningSkill.DeserializeAzureMachineLearningSkill(element); + case "#Microsoft.Skills.Custom.ChatCompletionSkill": return ChatCompletionSkill.DeserializeChatCompletionSkill(element); case "#Microsoft.Skills.Custom.WebApiSkill": return WebApiSkill.DeserializeWebApiSkill(element); case "#Microsoft.Skills.Text.AzureOpenAIEmbeddingSkill": return AzureOpenAIEmbeddingSkill.DeserializeAzureOpenAIEmbeddingSkill(element); case "#Microsoft.Skills.Text.CustomEntityLookupSkill": return CustomEntityLookupSkill.DeserializeCustomEntityLookupSkill(element); diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchIndexerSkill.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchIndexerSkill.cs index bf57982dd95d..fbecf5239a35 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchIndexerSkill.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchIndexerSkill.cs @@ -14,7 +14,7 @@ namespace Azure.Search.Documents.Indexes.Models /// /// Base type for skills. /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , , , , , , , , , , , , , , , , , and . + /// The available derived classes include , , , , , , , , , , , , , , , , , , , and . /// public partial class SearchIndexerSkill { diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchIndexerSkillset.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchIndexerSkillset.cs index 764d79fd01c7..c53829ce63db 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchIndexerSkillset.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchIndexerSkillset.cs @@ -19,7 +19,7 @@ public partial class SearchIndexerSkillset /// /// A list of skills in the skillset. /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , , , , , , , , , , , , , , , , , and . + /// The available derived classes include , , , , , , , , , , , , , , , , , , , and . /// /// or is null. public SearchIndexerSkillset(string name, IEnumerable skills) @@ -37,7 +37,7 @@ public SearchIndexerSkillset(string name, IEnumerable skills /// /// A list of skills in the skillset. /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , , , , , , , , , , , , , , , , , and . + /// The available derived classes include , , , , , , , , , , , , , , , , , , , and . /// /// /// Details about the Azure AI service to be used when running skills. diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchIndexerStatus.Serialization.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchIndexerStatus.Serialization.cs index 65e6164e6f21..7cf3f9a0c5f7 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchIndexerStatus.Serialization.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchIndexerStatus.Serialization.cs @@ -22,6 +22,7 @@ internal static SearchIndexerStatus DeserializeSearchIndexerStatus(JsonElement e IndexerExecutionResult lastResult = default; IReadOnlyList executionHistory = default; SearchIndexerLimits limits = default; + IndexerState currentState = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("status"u8)) @@ -54,8 +55,17 @@ internal static SearchIndexerStatus DeserializeSearchIndexerStatus(JsonElement e limits = SearchIndexerLimits.DeserializeSearchIndexerLimits(property.Value); continue; } + if (property.NameEquals("currentState"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + currentState = IndexerState.DeserializeIndexerState(property.Value); + continue; + } } - return new SearchIndexerStatus(status, lastResult, executionHistory, limits); + return new SearchIndexerStatus(status, lastResult, executionHistory, limits, currentState); } /// Deserializes the model from a raw response. diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchIndexerStatus.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchIndexerStatus.cs index 3d58b1f940b8..570e3f4b6486 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchIndexerStatus.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchIndexerStatus.cs @@ -29,12 +29,14 @@ internal SearchIndexerStatus(IndexerStatus status, IEnumerable The result of the most recent or an in-progress indexer execution. /// History of the recent indexer executions, sorted in reverse chronological order. /// The execution limits for the indexer. - internal SearchIndexerStatus(IndexerStatus status, IndexerExecutionResult lastResult, IReadOnlyList executionHistory, SearchIndexerLimits limits) + /// All of the state that defines and dictates the indexer's current execution. + internal SearchIndexerStatus(IndexerStatus status, IndexerExecutionResult lastResult, IReadOnlyList executionHistory, SearchIndexerLimits limits, IndexerState currentState) { Status = status; LastResult = lastResult; ExecutionHistory = executionHistory; Limits = limits; + CurrentState = currentState; } /// Overall indexer status. @@ -45,5 +47,7 @@ internal SearchIndexerStatus(IndexerStatus status, IndexerExecutionResult lastRe public IReadOnlyList ExecutionHistory { get; } /// The execution limits for the indexer. public SearchIndexerLimits Limits { get; } + /// All of the state that defines and dictates the indexer's current execution. + public IndexerState CurrentState { get; } } } diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchResult.Serialization.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchResult.Serialization.cs index ef439e06e95e..49d0e3f94357 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchResult.Serialization.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchResult.Serialization.cs @@ -20,6 +20,7 @@ internal static SearchResult DeserializeSearchResult(JsonElement element) } double searchScore = default; double? searchRerankerScore = default; + double? searchRerankerBoostedScore = default; IReadOnlyDictionary> searchHighlights = default; IReadOnlyList searchCaptions = default; DocumentDebugInfo searchDocumentDebugInfo = default; @@ -42,6 +43,16 @@ internal static SearchResult DeserializeSearchResult(JsonElement element) searchRerankerScore = property.Value.GetDouble(); continue; } + if (property.NameEquals("@search.rerankerBoostedScore"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + searchRerankerBoostedScore = null; + continue; + } + searchRerankerBoostedScore = property.Value.GetDouble(); + continue; + } if (property.NameEquals("@search.highlights"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -99,6 +110,7 @@ internal static SearchResult DeserializeSearchResult(JsonElement element) return new SearchResult( searchScore, searchRerankerScore, + searchRerankerBoostedScore, searchHighlights ?? new ChangeTrackingDictionary>(), searchCaptions ?? new ChangeTrackingList(), searchDocumentDebugInfo, diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchResult.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchResult.cs index dc3fd651496e..55cde1b732e1 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchResult.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchResult.cs @@ -25,14 +25,16 @@ internal SearchResult(double score) /// Initializes a new instance of . /// The relevance score of the document compared to other documents returned by the query. /// The relevance score computed by the semantic ranker for the top search results. Search results are sorted by the RerankerScore first and then by the Score. RerankerScore is only returned for queries of type 'semantic'. + /// The relevance score computed by boosting the Reranker Score. Search results are sorted by the RerankerScore/RerankerBoostedScore based on useScoringProfileBoostedRanking in the Semantic Config. RerankerBoostedScore is only returned for queries of type 'semantic'. /// Text fragments from the document that indicate the matching search terms, organized by each applicable field; null if hit highlighting was not enabled for the query. /// Captions are the most representative passages from the document relatively to the search query. They are often used as document summary. Captions are only returned for queries of type 'semantic'. /// Contains debugging information that can be used to further explore your search results. /// Additional Properties. - internal SearchResult(double score, double? rerankerScore, IReadOnlyDictionary> highlights, IReadOnlyList captions, DocumentDebugInfo documentDebugInfo, IReadOnlyDictionary additionalProperties) + internal SearchResult(double score, double? rerankerScore, double? rerankerBoostedScore, IReadOnlyDictionary> highlights, IReadOnlyList captions, DocumentDebugInfo documentDebugInfo, IReadOnlyDictionary additionalProperties) { Score = score; RerankerScore = rerankerScore; + RerankerBoostedScore = rerankerBoostedScore; Highlights = highlights; Captions = captions; DocumentDebugInfo = documentDebugInfo; @@ -43,6 +45,8 @@ internal SearchResult(double score, double? rerankerScore, IReadOnlyDictionary The relevance score computed by the semantic ranker for the top search results. Search results are sorted by the RerankerScore first and then by the Score. RerankerScore is only returned for queries of type 'semantic'. public double? RerankerScore { get; } + /// The relevance score computed by boosting the Reranker Score. Search results are sorted by the RerankerScore/RerankerBoostedScore based on useScoringProfileBoostedRanking in the Semantic Config. RerankerBoostedScore is only returned for queries of type 'semantic'. + public double? RerankerBoostedScore { get; } /// Text fragments from the document that indicate the matching search terms, organized by each applicable field; null if hit highlighting was not enabled for the query. public IReadOnlyDictionary> Highlights { get; } /// Captions are the most representative passages from the document relatively to the search query. They are often used as document summary. Captions are only returned for queries of type 'semantic'. diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/SemanticConfiguration.Serialization.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/SemanticConfiguration.Serialization.cs index c6cbc8142492..8a943b7b9c30 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/SemanticConfiguration.Serialization.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/SemanticConfiguration.Serialization.cs @@ -19,6 +19,18 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WriteStringValue(Name); writer.WritePropertyName("prioritizedFields"u8); writer.WriteObjectValue(PrioritizedFields); + if (Optional.IsDefined(RankingOrder)) + { + if (RankingOrder != null) + { + writer.WritePropertyName("rankingOrder"u8); + writer.WriteStringValue(RankingOrder.Value.ToString()); + } + else + { + writer.WriteNull("rankingOrder"); + } + } if (Optional.IsDefined(FlightingOptIn)) { writer.WritePropertyName("flightingOptIn"u8); @@ -35,6 +47,7 @@ internal static SemanticConfiguration DeserializeSemanticConfiguration(JsonEleme } string name = default; SemanticPrioritizedFields prioritizedFields = default; + RankingOrder? rankingOrder = default; bool? flightingOptIn = default; foreach (var property in element.EnumerateObject()) { @@ -48,6 +61,16 @@ internal static SemanticConfiguration DeserializeSemanticConfiguration(JsonEleme prioritizedFields = SemanticPrioritizedFields.DeserializeSemanticPrioritizedFields(property.Value); continue; } + if (property.NameEquals("rankingOrder"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + rankingOrder = null; + continue; + } + rankingOrder = new RankingOrder(property.Value.GetString()); + continue; + } if (property.NameEquals("flightingOptIn"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -58,7 +81,7 @@ internal static SemanticConfiguration DeserializeSemanticConfiguration(JsonEleme continue; } } - return new SemanticConfiguration(name, prioritizedFields, flightingOptIn); + return new SemanticConfiguration(name, prioritizedFields, rankingOrder, flightingOptIn); } /// Deserializes the model from a raw response. diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/SemanticConfiguration.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/SemanticConfiguration.cs index cc03bf762248..d14b81359622 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/SemanticConfiguration.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/SemanticConfiguration.cs @@ -28,11 +28,13 @@ public SemanticConfiguration(string name, SemanticPrioritizedFields prioritizedF /// Initializes a new instance of . /// The name of the semantic configuration. /// Describes the title, content, and keyword fields to be used for semantic ranking, captions, highlights, and answers. At least one of the three sub properties (titleField, prioritizedKeywordsFields and prioritizedContentFields) need to be set. - /// Determines how which semantic or query rewrite models to use during model flighting/upgrades. - internal SemanticConfiguration(string name, SemanticPrioritizedFields prioritizedFields, bool? flightingOptIn) + /// Specifies the score type to be used for the sort order of the search results. + /// Determines which semantic or query rewrite models to use during model flighting/upgrades. + internal SemanticConfiguration(string name, SemanticPrioritizedFields prioritizedFields, RankingOrder? rankingOrder, bool? flightingOptIn) { Name = name; PrioritizedFields = prioritizedFields; + RankingOrder = rankingOrder; FlightingOptIn = flightingOptIn; } @@ -40,7 +42,9 @@ internal SemanticConfiguration(string name, SemanticPrioritizedFields prioritize public string Name { get; set; } /// Describes the title, content, and keyword fields to be used for semantic ranking, captions, highlights, and answers. At least one of the three sub properties (titleField, prioritizedKeywordsFields and prioritizedContentFields) need to be set. public SemanticPrioritizedFields PrioritizedFields { get; set; } - /// Determines how which semantic or query rewrite models to use during model flighting/upgrades. + /// Specifies the score type to be used for the sort order of the search results. + public RankingOrder? RankingOrder { get; set; } + /// Determines which semantic or query rewrite models to use during model flighting/upgrades. public bool? FlightingOptIn { get; set; } } } diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/UnknownKnowledgeAgentActivityRecord.Serialization.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/UnknownKnowledgeAgentActivityRecord.Serialization.cs new file mode 100644 index 000000000000..6687b76388e6 --- /dev/null +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/UnknownKnowledgeAgentActivityRecord.Serialization.cs @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; + +namespace Azure.Search.Documents.Models +{ + internal partial class UnknownKnowledgeAgentActivityRecord + { + internal static UnknownKnowledgeAgentActivityRecord DeserializeUnknownKnowledgeAgentActivityRecord(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + int id = default; + string type = "Unknown"; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("id"u8)) + { + id = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = property.Value.GetString(); + continue; + } + } + return new UnknownKnowledgeAgentActivityRecord(id, type); + } + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static new UnknownKnowledgeAgentActivityRecord FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeUnknownKnowledgeAgentActivityRecord(document.RootElement); + } + } +} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/UnknownKnowledgeAgentActivityRecord.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/UnknownKnowledgeAgentActivityRecord.cs new file mode 100644 index 000000000000..86cfc907626c --- /dev/null +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/UnknownKnowledgeAgentActivityRecord.cs @@ -0,0 +1,21 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.Search.Documents.Models +{ + /// Unknown version of KnowledgeAgentActivityRecord. + internal partial class UnknownKnowledgeAgentActivityRecord : KnowledgeAgentActivityRecord + { + /// Initializes a new instance of . + /// The ID of the activity record. + /// The type of the activity record. + internal UnknownKnowledgeAgentActivityRecord(int id, string type) : base(id, type) + { + Type = type ?? "Unknown"; + } + } +} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/UnknownKnowledgeAgentMessageContent.Serialization.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/UnknownKnowledgeAgentMessageContent.Serialization.cs new file mode 100644 index 000000000000..700320de0a9c --- /dev/null +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/UnknownKnowledgeAgentMessageContent.Serialization.cs @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.Search.Documents.Models +{ + internal partial class UnknownKnowledgeAgentMessageContent : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("type"u8); + writer.WriteStringValue(Type.ToString()); + writer.WriteEndObject(); + } + + internal static UnknownKnowledgeAgentMessageContent DeserializeUnknownKnowledgeAgentMessageContent(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + KnowledgeAgentMessageContentType type = "Unknown"; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type"u8)) + { + type = new KnowledgeAgentMessageContentType(property.Value.GetString()); + continue; + } + } + return new UnknownKnowledgeAgentMessageContent(type); + } + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static new UnknownKnowledgeAgentMessageContent FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeUnknownKnowledgeAgentMessageContent(document.RootElement); + } + + /// Convert into a . + internal override RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this); + return content; + } + } +} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/UnknownKnowledgeAgentMessageContent.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/UnknownKnowledgeAgentMessageContent.cs new file mode 100644 index 000000000000..0b1e25a63c81 --- /dev/null +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/UnknownKnowledgeAgentMessageContent.cs @@ -0,0 +1,20 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.Search.Documents.Models +{ + /// Unknown version of KnowledgeAgentMessageContent. + internal partial class UnknownKnowledgeAgentMessageContent : KnowledgeAgentMessageContent + { + /// Initializes a new instance of . + /// The type of the message. + internal UnknownKnowledgeAgentMessageContent(KnowledgeAgentMessageContentType type) : base(type) + { + Type = type; + } + } +} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/UnknownKnowledgeAgentModel.Serialization.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/UnknownKnowledgeAgentModel.Serialization.cs new file mode 100644 index 000000000000..7da206b0aa59 --- /dev/null +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/UnknownKnowledgeAgentModel.Serialization.cs @@ -0,0 +1,58 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; +using Azure.Search.Documents.Indexes.Models; + +namespace Azure.Search.Documents.Models +{ + internal partial class UnknownKnowledgeAgentModel : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("kind"u8); + writer.WriteStringValue(Kind.ToString()); + writer.WriteEndObject(); + } + + internal static UnknownKnowledgeAgentModel DeserializeUnknownKnowledgeAgentModel(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + KnowledgeAgentModelKind kind = "Unknown"; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("kind"u8)) + { + kind = new KnowledgeAgentModelKind(property.Value.GetString()); + continue; + } + } + return new UnknownKnowledgeAgentModel(kind); + } + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static new UnknownKnowledgeAgentModel FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeUnknownKnowledgeAgentModel(document.RootElement); + } + + /// Convert into a . + internal override RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this); + return content; + } + } +} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/UnknownKnowledgeAgentModel.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/UnknownKnowledgeAgentModel.cs new file mode 100644 index 000000000000..5f4cdeb0df76 --- /dev/null +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/UnknownKnowledgeAgentModel.cs @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using Azure.Search.Documents.Indexes.Models; + +namespace Azure.Search.Documents.Models +{ + /// Unknown version of KnowledgeAgentModel. + internal partial class UnknownKnowledgeAgentModel : KnowledgeAgentModel + { + /// Initializes a new instance of . + /// The type of AI model. + internal UnknownKnowledgeAgentModel(KnowledgeAgentModelKind kind) : base(kind) + { + Kind = kind; + } + } +} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/UnknownKnowledgeAgentReference.Serialization.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/UnknownKnowledgeAgentReference.Serialization.cs new file mode 100644 index 000000000000..3f2a59a6108f --- /dev/null +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/UnknownKnowledgeAgentReference.Serialization.cs @@ -0,0 +1,52 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; + +namespace Azure.Search.Documents.Models +{ + internal partial class UnknownKnowledgeAgentReference + { + internal static UnknownKnowledgeAgentReference DeserializeUnknownKnowledgeAgentReference(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string type = "Unknown"; + string id = default; + int activitySource = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type"u8)) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("id"u8)) + { + id = property.Value.GetString(); + continue; + } + if (property.NameEquals("activitySource"u8)) + { + activitySource = property.Value.GetInt32(); + continue; + } + } + return new UnknownKnowledgeAgentReference(type, id, activitySource); + } + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static new UnknownKnowledgeAgentReference FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeUnknownKnowledgeAgentReference(document.RootElement); + } + } +} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/UnknownKnowledgeAgentReference.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/UnknownKnowledgeAgentReference.cs new file mode 100644 index 000000000000..a4c55e613553 --- /dev/null +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/UnknownKnowledgeAgentReference.cs @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.Search.Documents.Models +{ + /// Unknown version of KnowledgeAgentReference. + internal partial class UnknownKnowledgeAgentReference : KnowledgeAgentReference + { + /// Initializes a new instance of . + /// The type of the reference. + /// The ID of the reference. + /// The source activity ID for the reference. + internal UnknownKnowledgeAgentReference(string type, string id, int activitySource) : base(type, id, activitySource) + { + Type = type ?? "Unknown"; + } + } +} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/UnknownVectorQuery.Serialization.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/UnknownVectorQuery.Serialization.cs index d63f388ad166..e51b467b59ed 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/UnknownVectorQuery.Serialization.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/UnknownVectorQuery.Serialization.cs @@ -52,6 +52,11 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("filterOverride"u8); writer.WriteStringValue(FilterOverride); } + if (Optional.IsDefined(PerDocumentVectorLimit)) + { + writer.WritePropertyName("perDocumentVectorLimit"u8); + writer.WriteNumberValue(PerDocumentVectorLimit.Value); + } writer.WriteEndObject(); } @@ -69,6 +74,7 @@ internal static UnknownVectorQuery DeserializeUnknownVectorQuery(JsonElement ele float? weight = default; VectorThreshold threshold = default; string filterOverride = default; + int? perDocumentVectorLimit = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("kind"u8)) @@ -131,6 +137,15 @@ internal static UnknownVectorQuery DeserializeUnknownVectorQuery(JsonElement ele filterOverride = property.Value.GetString(); continue; } + if (property.NameEquals("perDocumentVectorLimit"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + perDocumentVectorLimit = property.Value.GetInt32(); + continue; + } } return new UnknownVectorQuery( kind, @@ -140,7 +155,8 @@ internal static UnknownVectorQuery DeserializeUnknownVectorQuery(JsonElement ele oversampling, weight, threshold, - filterOverride); + filterOverride, + perDocumentVectorLimit); } /// Deserializes the model from a raw response. diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/UnknownVectorQuery.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/UnknownVectorQuery.cs index e9909cf5d413..f547eb43c949 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/UnknownVectorQuery.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/UnknownVectorQuery.cs @@ -23,7 +23,8 @@ internal partial class UnknownVectorQuery : VectorQuery /// The available derived classes include and . /// /// The OData filter expression to apply to this specific vector query. If no filter expression is defined at the vector level, the expression defined in the top level filter parameter is used instead. - internal UnknownVectorQuery(VectorQueryKind kind, int? kNearestNeighborsCount, string fieldsRaw, bool? exhaustive, double? oversampling, float? weight, VectorThreshold threshold, string filterOverride) : base(kind, kNearestNeighborsCount, fieldsRaw, exhaustive, oversampling, weight, threshold, filterOverride) + /// Controls how many vectors can be matched from each document in a vector search query. Setting it to 1 ensures at most one vector per document is matched, guaranteeing results come from distinct documents. Setting it to 0 (unlimited) allows multiple relevant vectors from the same document to be matched. Default is 0. + internal UnknownVectorQuery(VectorQueryKind kind, int? kNearestNeighborsCount, string fieldsRaw, bool? exhaustive, double? oversampling, float? weight, VectorThreshold threshold, string filterOverride, int? perDocumentVectorLimit) : base(kind, kNearestNeighborsCount, fieldsRaw, exhaustive, oversampling, weight, threshold, filterOverride, perDocumentVectorLimit) { Kind = kind; } diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorQuery.Serialization.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorQuery.Serialization.cs index ac3e6b6903c9..dbf46e12cfb7 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorQuery.Serialization.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorQuery.Serialization.cs @@ -52,6 +52,11 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("filterOverride"u8); writer.WriteStringValue(FilterOverride); } + if (Optional.IsDefined(PerDocumentVectorLimit)) + { + writer.WritePropertyName("perDocumentVectorLimit"u8); + writer.WriteNumberValue(PerDocumentVectorLimit.Value); + } writer.WriteEndObject(); } diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorQuery.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorQuery.cs index 94a1b9283bef..12a485032f17 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorQuery.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorQuery.cs @@ -32,7 +32,8 @@ protected VectorQuery() /// The available derived classes include and . /// /// The OData filter expression to apply to this specific vector query. If no filter expression is defined at the vector level, the expression defined in the top level filter parameter is used instead. - internal VectorQuery(VectorQueryKind kind, int? kNearestNeighborsCount, string fieldsRaw, bool? exhaustive, double? oversampling, float? weight, VectorThreshold threshold, string filterOverride) + /// Controls how many vectors can be matched from each document in a vector search query. Setting it to 1 ensures at most one vector per document is matched, guaranteeing results come from distinct documents. Setting it to 0 (unlimited) allows multiple relevant vectors from the same document to be matched. Default is 0. + internal VectorQuery(VectorQueryKind kind, int? kNearestNeighborsCount, string fieldsRaw, bool? exhaustive, double? oversampling, float? weight, VectorThreshold threshold, string filterOverride, int? perDocumentVectorLimit) { Kind = kind; KNearestNeighborsCount = kNearestNeighborsCount; @@ -42,6 +43,7 @@ internal VectorQuery(VectorQueryKind kind, int? kNearestNeighborsCount, string f Weight = weight; Threshold = threshold; FilterOverride = filterOverride; + PerDocumentVectorLimit = perDocumentVectorLimit; } /// The kind of vector query being performed. @@ -62,5 +64,7 @@ internal VectorQuery(VectorQueryKind kind, int? kNearestNeighborsCount, string f public VectorThreshold Threshold { get; set; } /// The OData filter expression to apply to this specific vector query. If no filter expression is defined at the vector level, the expression defined in the top level filter parameter is used instead. public string FilterOverride { get; set; } + /// Controls how many vectors can be matched from each document in a vector search query. Setting it to 1 ensures at most one vector per document is matched, guaranteeing results come from distinct documents. Setting it to 0 (unlimited) allows multiple relevant vectors from the same document to be matched. Default is 0. + public int? PerDocumentVectorLimit { get; set; } } } diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorSearchVectorizerKind.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorSearchVectorizerKind.cs index bef6730ac985..7443589ba5fc 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorSearchVectorizerKind.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorSearchVectorizerKind.cs @@ -33,7 +33,7 @@ public VectorSearchVectorizerKind(string value) public static VectorSearchVectorizerKind CustomWebApi { get; } = new VectorSearchVectorizerKind(CustomWebApiValue); /// Generate embeddings for an image or text input at query time using the Azure AI Services Vision Vectorize API. public static VectorSearchVectorizerKind AIServicesVision { get; } = new VectorSearchVectorizerKind(AIServicesVisionValue); - /// Generate embeddings using an Azure Machine Learning endpoint deployed via the Azure AI Studio Model Catalog at query time. + /// Generate embeddings using an Azure Machine Learning endpoint deployed via the Azure AI Foundry Model Catalog at query time. public static VectorSearchVectorizerKind AML { get; } = new VectorSearchVectorizerKind(AMLValue); /// Determines if two values are the same. public static bool operator ==(VectorSearchVectorizerKind left, VectorSearchVectorizerKind right) => left.Equals(right); diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorizableImageBinaryQuery.Serialization.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorizableImageBinaryQuery.Serialization.cs index f33b607a7b13..da22d72fba54 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorizableImageBinaryQuery.Serialization.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorizableImageBinaryQuery.Serialization.cs @@ -57,6 +57,11 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("filterOverride"u8); writer.WriteStringValue(FilterOverride); } + if (Optional.IsDefined(PerDocumentVectorLimit)) + { + writer.WritePropertyName("perDocumentVectorLimit"u8); + writer.WriteNumberValue(PerDocumentVectorLimit.Value); + } writer.WriteEndObject(); } @@ -75,6 +80,7 @@ internal static VectorizableImageBinaryQuery DeserializeVectorizableImageBinaryQ float? weight = default; VectorThreshold threshold = default; string filterOverride = default; + int? perDocumentVectorLimit = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("base64Image"u8)) @@ -142,6 +148,15 @@ internal static VectorizableImageBinaryQuery DeserializeVectorizableImageBinaryQ filterOverride = property.Value.GetString(); continue; } + if (property.NameEquals("perDocumentVectorLimit"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + perDocumentVectorLimit = property.Value.GetInt32(); + continue; + } } return new VectorizableImageBinaryQuery( kind, @@ -152,6 +167,7 @@ internal static VectorizableImageBinaryQuery DeserializeVectorizableImageBinaryQ weight, threshold, filterOverride, + perDocumentVectorLimit, base64Image); } diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorizableImageBinaryQuery.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorizableImageBinaryQuery.cs index 2bd927d67b15..47abdc7c1932 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorizableImageBinaryQuery.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorizableImageBinaryQuery.cs @@ -29,8 +29,9 @@ public VectorizableImageBinaryQuery() /// The available derived classes include and . /// /// The OData filter expression to apply to this specific vector query. If no filter expression is defined at the vector level, the expression defined in the top level filter parameter is used instead. + /// Controls how many vectors can be matched from each document in a vector search query. Setting it to 1 ensures at most one vector per document is matched, guaranteeing results come from distinct documents. Setting it to 0 (unlimited) allows multiple relevant vectors from the same document to be matched. Default is 0. /// The base 64 encoded binary of an image to be vectorized to perform a vector search query. - internal VectorizableImageBinaryQuery(VectorQueryKind kind, int? kNearestNeighborsCount, string fieldsRaw, bool? exhaustive, double? oversampling, float? weight, VectorThreshold threshold, string filterOverride, string base64Image) : base(kind, kNearestNeighborsCount, fieldsRaw, exhaustive, oversampling, weight, threshold, filterOverride) + internal VectorizableImageBinaryQuery(VectorQueryKind kind, int? kNearestNeighborsCount, string fieldsRaw, bool? exhaustive, double? oversampling, float? weight, VectorThreshold threshold, string filterOverride, int? perDocumentVectorLimit, string base64Image) : base(kind, kNearestNeighborsCount, fieldsRaw, exhaustive, oversampling, weight, threshold, filterOverride, perDocumentVectorLimit) { Base64Image = base64Image; Kind = kind; diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorizableImageUrlQuery.Serialization.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorizableImageUrlQuery.Serialization.cs index d950d85484b8..87a9acbe2fa6 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorizableImageUrlQuery.Serialization.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorizableImageUrlQuery.Serialization.cs @@ -58,6 +58,11 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("filterOverride"u8); writer.WriteStringValue(FilterOverride); } + if (Optional.IsDefined(PerDocumentVectorLimit)) + { + writer.WritePropertyName("perDocumentVectorLimit"u8); + writer.WriteNumberValue(PerDocumentVectorLimit.Value); + } writer.WriteEndObject(); } @@ -76,6 +81,7 @@ internal static VectorizableImageUrlQuery DeserializeVectorizableImageUrlQuery(J float? weight = default; VectorThreshold threshold = default; string filterOverride = default; + int? perDocumentVectorLimit = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("url"u8)) @@ -147,6 +153,15 @@ internal static VectorizableImageUrlQuery DeserializeVectorizableImageUrlQuery(J filterOverride = property.Value.GetString(); continue; } + if (property.NameEquals("perDocumentVectorLimit"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + perDocumentVectorLimit = property.Value.GetInt32(); + continue; + } } return new VectorizableImageUrlQuery( kind, @@ -157,6 +172,7 @@ internal static VectorizableImageUrlQuery DeserializeVectorizableImageUrlQuery(J weight, threshold, filterOverride, + perDocumentVectorLimit, url); } diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorizableImageUrlQuery.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorizableImageUrlQuery.cs index 38d5b710e388..f5e9a7c00bdb 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorizableImageUrlQuery.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorizableImageUrlQuery.cs @@ -31,8 +31,9 @@ public VectorizableImageUrlQuery() /// The available derived classes include and . /// /// The OData filter expression to apply to this specific vector query. If no filter expression is defined at the vector level, the expression defined in the top level filter parameter is used instead. + /// Controls how many vectors can be matched from each document in a vector search query. Setting it to 1 ensures at most one vector per document is matched, guaranteeing results come from distinct documents. Setting it to 0 (unlimited) allows multiple relevant vectors from the same document to be matched. Default is 0. /// The URL of an image to be vectorized to perform a vector search query. - internal VectorizableImageUrlQuery(VectorQueryKind kind, int? kNearestNeighborsCount, string fieldsRaw, bool? exhaustive, double? oversampling, float? weight, VectorThreshold threshold, string filterOverride, Uri url) : base(kind, kNearestNeighborsCount, fieldsRaw, exhaustive, oversampling, weight, threshold, filterOverride) + internal VectorizableImageUrlQuery(VectorQueryKind kind, int? kNearestNeighborsCount, string fieldsRaw, bool? exhaustive, double? oversampling, float? weight, VectorThreshold threshold, string filterOverride, int? perDocumentVectorLimit, Uri url) : base(kind, kNearestNeighborsCount, fieldsRaw, exhaustive, oversampling, weight, threshold, filterOverride, perDocumentVectorLimit) { Url = url; Kind = kind; diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorizableTextQuery.Serialization.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorizableTextQuery.Serialization.cs index 4143ea131796..4d7ad6ab77a4 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorizableTextQuery.Serialization.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorizableTextQuery.Serialization.cs @@ -59,6 +59,11 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("filterOverride"u8); writer.WriteStringValue(FilterOverride); } + if (Optional.IsDefined(PerDocumentVectorLimit)) + { + writer.WritePropertyName("perDocumentVectorLimit"u8); + writer.WriteNumberValue(PerDocumentVectorLimit.Value); + } writer.WriteEndObject(); } @@ -78,6 +83,7 @@ internal static VectorizableTextQuery DeserializeVectorizableTextQuery(JsonEleme float? weight = default; VectorThreshold threshold = default; string filterOverride = default; + int? perDocumentVectorLimit = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("text"u8)) @@ -154,6 +160,15 @@ internal static VectorizableTextQuery DeserializeVectorizableTextQuery(JsonEleme filterOverride = property.Value.GetString(); continue; } + if (property.NameEquals("perDocumentVectorLimit"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + perDocumentVectorLimit = property.Value.GetInt32(); + continue; + } } return new VectorizableTextQuery( kind, @@ -164,6 +179,7 @@ internal static VectorizableTextQuery DeserializeVectorizableTextQuery(JsonEleme weight, threshold, filterOverride, + perDocumentVectorLimit, text, queryRewrites); } diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorizableTextQuery.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorizableTextQuery.cs index c72e86c1ceb3..18757ddd83b8 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorizableTextQuery.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorizableTextQuery.cs @@ -36,9 +36,10 @@ public VectorizableTextQuery(string text) /// The available derived classes include and . /// /// The OData filter expression to apply to this specific vector query. If no filter expression is defined at the vector level, the expression defined in the top level filter parameter is used instead. + /// Controls how many vectors can be matched from each document in a vector search query. Setting it to 1 ensures at most one vector per document is matched, guaranteeing results come from distinct documents. Setting it to 0 (unlimited) allows multiple relevant vectors from the same document to be matched. Default is 0. /// The text to be vectorized to perform a vector search query. /// Can be configured to let a generative model rewrite the query before sending it to be vectorized. - internal VectorizableTextQuery(VectorQueryKind kind, int? kNearestNeighborsCount, string fieldsRaw, bool? exhaustive, double? oversampling, float? weight, VectorThreshold threshold, string filterOverride, string text, QueryRewritesType? queryRewrites) : base(kind, kNearestNeighborsCount, fieldsRaw, exhaustive, oversampling, weight, threshold, filterOverride) + internal VectorizableTextQuery(VectorQueryKind kind, int? kNearestNeighborsCount, string fieldsRaw, bool? exhaustive, double? oversampling, float? weight, VectorThreshold threshold, string filterOverride, int? perDocumentVectorLimit, string text, QueryRewritesType? queryRewrites) : base(kind, kNearestNeighborsCount, fieldsRaw, exhaustive, oversampling, weight, threshold, filterOverride, perDocumentVectorLimit) { Text = text; QueryRewrites = queryRewrites; diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorizedQuery.Serialization.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorizedQuery.Serialization.cs index 0bd9a870d967..71ffbe9ab06d 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorizedQuery.Serialization.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorizedQuery.Serialization.cs @@ -60,6 +60,11 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("filterOverride"u8); writer.WriteStringValue(FilterOverride); } + if (Optional.IsDefined(PerDocumentVectorLimit)) + { + writer.WritePropertyName("perDocumentVectorLimit"u8); + writer.WriteNumberValue(PerDocumentVectorLimit.Value); + } writer.WriteEndObject(); } @@ -78,6 +83,7 @@ internal static VectorizedQuery DeserializeVectorizedQuery(JsonElement element) float? weight = default; VectorThreshold threshold = default; string filterOverride = default; + int? perDocumentVectorLimit = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("vector"u8)) @@ -156,6 +162,15 @@ internal static VectorizedQuery DeserializeVectorizedQuery(JsonElement element) filterOverride = property.Value.GetString(); continue; } + if (property.NameEquals("perDocumentVectorLimit"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + perDocumentVectorLimit = property.Value.GetInt32(); + continue; + } } return new VectorizedQuery( kind, @@ -166,6 +181,7 @@ internal static VectorizedQuery DeserializeVectorizedQuery(JsonElement element) weight, threshold, filterOverride, + perDocumentVectorLimit, vector); } diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorizedQuery.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorizedQuery.cs index 60236c73dfd9..744734be2a75 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorizedQuery.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorizedQuery.cs @@ -33,8 +33,9 @@ public VectorizedQuery(ReadOnlyMemory vector) /// The available derived classes include and . /// /// The OData filter expression to apply to this specific vector query. If no filter expression is defined at the vector level, the expression defined in the top level filter parameter is used instead. + /// Controls how many vectors can be matched from each document in a vector search query. Setting it to 1 ensures at most one vector per document is matched, guaranteeing results come from distinct documents. Setting it to 0 (unlimited) allows multiple relevant vectors from the same document to be matched. Default is 0. /// The vector representation of a search query. - internal VectorizedQuery(VectorQueryKind kind, int? kNearestNeighborsCount, string fieldsRaw, bool? exhaustive, double? oversampling, float? weight, VectorThreshold threshold, string filterOverride, ReadOnlyMemory vector) : base(kind, kNearestNeighborsCount, fieldsRaw, exhaustive, oversampling, weight, threshold, filterOverride) + internal VectorizedQuery(VectorQueryKind kind, int? kNearestNeighborsCount, string fieldsRaw, bool? exhaustive, double? oversampling, float? weight, VectorThreshold threshold, string filterOverride, int? perDocumentVectorLimit, ReadOnlyMemory vector) : base(kind, kNearestNeighborsCount, fieldsRaw, exhaustive, oversampling, weight, threshold, filterOverride, perDocumentVectorLimit) { Vector = vector; Kind = kind; diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/WebApiSkill.Serialization.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/WebApiSkill.Serialization.cs index 5c0503004795..ca055241b0f0 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/WebApiSkill.Serialization.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/WebApiSkill.Serialization.cs @@ -142,6 +142,13 @@ internal static WebApiSkill DeserializeWebApiSkill(JsonElement element) { return null; } + if (element.TryGetProperty("@odata.type", out JsonElement discriminator)) + { + switch (discriminator.GetString()) + { + case "#Microsoft.Skills.Custom.ChatCompletionSkill": return ChatCompletionSkill.DeserializeChatCompletionSkill(element); + } + } string uri = default; IDictionary httpHeaders = default; string httpMethod = default; @@ -150,7 +157,7 @@ internal static WebApiSkill DeserializeWebApiSkill(JsonElement element) int? degreeOfParallelism = default; ResourceIdentifier authResourceId = default; SearchIndexerDataIdentity authIdentity = default; - string odataType = default; + string odataType = "#Microsoft.Skills.Custom.WebApiSkill"; string name = default; string description = default; string context = default; diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/WebApiSkill.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/WebApiSkill.cs index 61734865b71d..8855c8fc8ef1 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/WebApiSkill.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/WebApiSkill.cs @@ -11,7 +11,11 @@ namespace Azure.Search.Documents.Indexes.Models { - /// A skill that can call a Web API endpoint, allowing you to extend a skillset by having it call your custom code. + /// + /// A skill that can call a Web API endpoint, allowing you to extend a skillset by having it call your custom code. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include . + /// public partial class WebApiSkill : SearchIndexerSkill { /// Initializes a new instance of . diff --git a/sdk/search/Azure.Search.Documents/src/Generated/SearchModelFactory.cs b/sdk/search/Azure.Search.Documents/src/Generated/SearchModelFactory.cs index 35935eb9ddb3..30266137f8a8 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/SearchModelFactory.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/SearchModelFactory.cs @@ -15,6 +15,235 @@ namespace Azure.Search.Documents.Models /// Model factory for models. public static partial class SearchModelFactory { + /// Initializes a new instance of . + /// + /// + /// The activity records for tracking progress and billing implications. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , and . + /// + /// + /// The references for the retrieval data used in the response. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include . + /// + /// A new instance for mocking. + public static KnowledgeAgentRetrievalResponse KnowledgeAgentRetrievalResponse(IEnumerable response = null, IEnumerable activity = null, IEnumerable references = null) + { + response ??= new List(); + activity ??= new List(); + references ??= new List(); + + return new KnowledgeAgentRetrievalResponse(response?.ToList(), activity?.ToList(), references?.ToList()); + } + + /// Initializes a new instance of . + /// The ID of the activity record. + /// The type of the activity record. + /// A new instance for mocking. + public static KnowledgeAgentActivityRecord KnowledgeAgentActivityRecord(int id = default, string type = null) + { + return new UnknownKnowledgeAgentActivityRecord(id, type); + } + + /// Initializes a new instance of . + /// The type of the reference. + /// The ID of the reference. + /// The source activity ID for the reference. + /// A new instance for mocking. + public static KnowledgeAgentReference KnowledgeAgentReference(string type = null, string id = null, int activitySource = default) + { + return new UnknownKnowledgeAgentReference(type, id, activitySource); + } + + /// Initializes a new instance of . + /// Overall indexer status. + /// The result of the most recent or an in-progress indexer execution. + /// History of the recent indexer executions, sorted in reverse chronological order. + /// The execution limits for the indexer. + /// All of the state that defines and dictates the indexer's current execution. + /// A new instance for mocking. + public static SearchIndexerStatus SearchIndexerStatus(IndexerStatus status = default, IndexerExecutionResult lastResult = null, IEnumerable executionHistory = null, SearchIndexerLimits limits = null, IndexerState currentState = null) + { + executionHistory ??= new List(); + + return new SearchIndexerStatus(status, lastResult, executionHistory?.ToList(), limits, currentState); + } + + /// Initializes a new instance of . + /// The outcome of this indexer execution. + /// The outcome of this indexer execution. + /// The mode the indexer is running in. + /// The error message indicating the top-level error, if any. + /// The start time of this indexer execution. + /// The end time of this indexer execution, if the execution has already completed. + /// The item-level indexing errors. + /// The item-level indexing warnings. + /// The number of items that were processed during this indexer execution. This includes both successfully processed items and items where indexing was attempted but failed. + /// The number of items that failed to be indexed during this indexer execution. + /// Change tracking state with which an indexer execution started. + /// Change tracking state with which an indexer execution finished. + /// A new instance for mocking. + public static IndexerExecutionResult IndexerExecutionResult(IndexerExecutionStatus status = default, IndexerExecutionStatusDetail? statusDetail = null, IndexingMode? mode = null, string errorMessage = null, DateTimeOffset? startTime = null, DateTimeOffset? endTime = null, IEnumerable errors = null, IEnumerable warnings = null, int itemCount = default, int failedItemCount = default, string initialTrackingState = null, string finalTrackingState = null) + { + errors ??= new List(); + warnings ??= new List(); + + return new IndexerExecutionResult( + status, + statusDetail, + mode, + errorMessage, + startTime, + endTime, + errors?.ToList(), + warnings?.ToList(), + itemCount, + failedItemCount, + initialTrackingState, + finalTrackingState); + } + + /// Initializes a new instance of . + /// The mode the indexer is running in. + /// Change tracking state used when indexing starts on all documents in the datasource. + /// Change tracking state value when indexing finishes on all documents in the datasource. + /// Change tracking state used when indexing starts on select, reset documents in the datasource. + /// Change tracking state value when indexing finishes on select, reset documents in the datasource. + /// The list of document keys that have been reset. The document key is the document's unique identifier for the data in the search index. The indexer will prioritize selectively re-ingesting these keys. + /// The list of datasource document ids that have been reset. The datasource document id is the unique identifier for the data in the datasource. The indexer will prioritize selectively re-ingesting these ids. + /// Change tracking state used when indexing starts on selective options from the datasource. + /// Change tracking state value when indexing finishes on selective options from the datasource. + /// A new instance for mocking. + public static IndexerState IndexerState(IndexingMode? mode = null, string allDocsInitialTrackingState = null, string allDocsFinalTrackingState = null, string resetDocsInitialTrackingState = null, string resetDocsFinalTrackingState = null, IEnumerable resetDocumentKeys = null, IEnumerable resetDataSourceDocumentIds = null, string resyncInitialTrackingState = null, string resyncFinalTrackingState = null) + { + resetDocumentKeys ??= new List(); + resetDataSourceDocumentIds ??= new List(); + + return new IndexerState( + mode, + allDocsInitialTrackingState, + allDocsFinalTrackingState, + resetDocsInitialTrackingState, + resetDocsFinalTrackingState, + resetDocumentKeys?.ToList(), + resetDataSourceDocumentIds?.ToList(), + resyncInitialTrackingState, + resyncFinalTrackingState); + } + + /// Initializes a new instance of . + /// The number of documents in the index. + /// The amount of storage in bytes consumed by the index. + /// The amount of memory in bytes consumed by vectors in the index. + /// A new instance for mocking. + public static SearchIndexStatistics SearchIndexStatistics(long documentCount = default, long storageSize = default, long vectorIndexSize = default) + { + return new SearchIndexStatistics(documentCount, storageSize, vectorIndexSize); + } + + /// Initializes a new instance of . + /// Total number of aliases. + /// Total number of documents across all indexes in the service. + /// Total number of indexes. + /// Total number of indexers. + /// Total number of data sources. + /// Total size of used storage in bytes. + /// Total number of synonym maps. + /// Total number of skillsets. + /// Total memory consumption of all vector indexes within the service, in bytes. + /// , , , , , , , or is null. + /// A new instance for mocking. + public static SearchServiceCounters SearchServiceCounters(SearchResourceCounter aliasCounter = null, SearchResourceCounter documentCounter = null, SearchResourceCounter indexCounter = null, SearchResourceCounter indexerCounter = null, SearchResourceCounter dataSourceCounter = null, SearchResourceCounter storageSizeCounter = null, SearchResourceCounter synonymMapCounter = null, SearchResourceCounter skillsetCounter = null, SearchResourceCounter vectorIndexSizeCounter = null) + { + if (aliasCounter == null) + { + throw new ArgumentNullException(nameof(aliasCounter)); + } + if (documentCounter == null) + { + throw new ArgumentNullException(nameof(documentCounter)); + } + if (indexCounter == null) + { + throw new ArgumentNullException(nameof(indexCounter)); + } + if (indexerCounter == null) + { + throw new ArgumentNullException(nameof(indexerCounter)); + } + if (dataSourceCounter == null) + { + throw new ArgumentNullException(nameof(dataSourceCounter)); + } + if (storageSizeCounter == null) + { + throw new ArgumentNullException(nameof(storageSizeCounter)); + } + if (synonymMapCounter == null) + { + throw new ArgumentNullException(nameof(synonymMapCounter)); + } + if (skillsetCounter == null) + { + throw new ArgumentNullException(nameof(skillsetCounter)); + } + if (vectorIndexSizeCounter == null) + { + throw new ArgumentNullException(nameof(vectorIndexSizeCounter)); + } + + return new SearchServiceCounters( + aliasCounter, + documentCounter, + indexCounter, + indexerCounter, + dataSourceCounter, + storageSizeCounter, + synonymMapCounter, + skillsetCounter, + vectorIndexSizeCounter); + } + + /// Initializes a new instance of . + /// The maximum allowed fields per index. + /// The maximum depth which you can nest sub-fields in an index, including the top-level complex field. For example, a/b/c has a nesting depth of 3. + /// The maximum number of fields of type Collection(Edm.ComplexType) allowed in an index. + /// The maximum number of objects in complex collections allowed per document. + /// The maximum amount of storage in bytes allowed per index. + /// A new instance for mocking. + public static SearchServiceLimits SearchServiceLimits(int? maxFieldsPerIndex = null, int? maxFieldNestingDepthPerIndex = null, int? maxComplexCollectionFieldsPerIndex = null, int? maxComplexObjectsInCollectionsPerDocument = null, long? maxStoragePerIndexInBytes = null) + { + return new SearchServiceLimits(maxFieldsPerIndex, maxFieldNestingDepthPerIndex, maxComplexCollectionFieldsPerIndex, maxComplexObjectsInCollectionsPerDocument, maxStoragePerIndexInBytes); + } + + /// Initializes a new instance of . + /// The Statistics summary of all indexes in the Search service. + /// A new instance for mocking. + public static ListIndexStatsSummary ListIndexStatsSummary(IEnumerable indexesStatistics = null) + { + indexesStatistics ??= new List(); + + return new ListIndexStatsSummary(indexesStatistics?.ToList()); + } + + /// Initializes a new instance of . + /// The name of the index. + /// The number of documents in the index. + /// The amount of storage in bytes consumed by the index. + /// The amount of memory in bytes consumed by vectors in the index. + /// is null. + /// A new instance for mocking. + public static IndexStatisticsSummary IndexStatisticsSummary(string name = null, long documentCount = default, long storageSize = default, long vectorIndexSize = default) + { + if (name == null) + { + throw new ArgumentNullException(nameof(name)); + } + + return new IndexStatisticsSummary(name, documentCount, storageSize, vectorIndexSize); + } + /// Initializes a new instance of . /// The approximate count of documents falling within the bucket described by this facet. /// The resulting total sum for the facet when a sum metric is requested. @@ -88,10 +317,13 @@ public static QueryCaptionResult QueryCaptionResult(string text = null, string h /// Initializes a new instance of . /// Contains debugging information specific to semantic ranking requests. /// Contains debugging information specific to vector and hybrid search. + /// Contains debugging information specific to vectors matched within a collection of complex types. /// A new instance for mocking. - public static DocumentDebugInfo DocumentDebugInfo(SemanticDebugInfo semantic = null, VectorsDebugInfo vectors = null) + public static DocumentDebugInfo DocumentDebugInfo(SemanticDebugInfo semantic = null, VectorsDebugInfo vectors = null, IReadOnlyDictionary> innerHits = null) { - return new DocumentDebugInfo(semantic, vectors); + innerHits ??= new Dictionary>(); + + return new DocumentDebugInfo(semantic, vectors, innerHits); } /// Initializes a new instance of . @@ -164,6 +396,17 @@ public static SingleVectorFieldResult SingleVectorFieldResult(double? searchScor return new SingleVectorFieldResult(searchScore, vectorSimilarity); } + /// Initializes a new instance of . + /// Position of this specific matching element within it's original collection. Position starts at 0. + /// Detailed scoring information for an individual element of a complex collection that matched a vector query. + /// A new instance for mocking. + public static QueryResultDocumentInnerHit QueryResultDocumentInnerHit(long? ordinal = null, IEnumerable> vectors = null) + { + vectors ??= new List>(); + + return new QueryResultDocumentInnerHit(ordinal, vectors?.ToList()); + } + /// Initializes a new instance of . /// A value indicating the percentage of the index that was considered by the autocomplete request, or null if minimumCoverage was not specified in the request. /// The list of returned Autocompleted items. @@ -175,163 +418,67 @@ public static AutocompleteResults AutocompleteResults(double? coverage = null, I return new AutocompleteResults(coverage, results?.ToList()); } - /// Initializes a new instance of . - /// Overall indexer status. - /// The result of the most recent or an in-progress indexer execution. - /// History of the recent indexer executions, sorted in reverse chronological order. - /// The execution limits for the indexer. - /// A new instance for mocking. - public static SearchIndexerStatus SearchIndexerStatus(IndexerStatus status = default, IndexerExecutionResult lastResult = null, IEnumerable executionHistory = null, SearchIndexerLimits limits = null) - { - executionHistory ??= new List(); - - return new SearchIndexerStatus(status, lastResult, executionHistory?.ToList(), limits); - } - - /// Initializes a new instance of . - /// The outcome of this indexer execution. - /// The outcome of this indexer execution. - /// All of the state that defines and dictates the indexer's current execution. - /// The error message indicating the top-level error, if any. - /// The start time of this indexer execution. - /// The end time of this indexer execution, if the execution has already completed. - /// The item-level indexing errors. - /// The item-level indexing warnings. - /// The number of items that were processed during this indexer execution. This includes both successfully processed items and items where indexing was attempted but failed. - /// The number of items that failed to be indexed during this indexer execution. - /// Change tracking state with which an indexer execution started. - /// Change tracking state with which an indexer execution finished. - /// A new instance for mocking. - public static IndexerExecutionResult IndexerExecutionResult(IndexerExecutionStatus status = default, IndexerExecutionStatusDetail? statusDetail = null, IndexerState currentState = null, string errorMessage = null, DateTimeOffset? startTime = null, DateTimeOffset? endTime = null, IEnumerable errors = null, IEnumerable warnings = null, int itemCount = default, int failedItemCount = default, string initialTrackingState = null, string finalTrackingState = null) - { - errors ??= new List(); - warnings ??= new List(); - - return new IndexerExecutionResult( - status, - statusDetail, - currentState, - errorMessage, - startTime, - endTime, - errors?.ToList(), - warnings?.ToList(), - itemCount, - failedItemCount, - initialTrackingState, - finalTrackingState); - } - - /// Initializes a new instance of . - /// The number of documents in the index. - /// The amount of storage in bytes consumed by the index. - /// The amount of memory in bytes consumed by vectors in the index. - /// A new instance for mocking. - public static SearchIndexStatistics SearchIndexStatistics(long documentCount = default, long storageSize = default, long vectorIndexSize = default) + /// Initializes a new instance of . + /// The ID of the activity record. + /// The target index for the retrieval activity. + /// The query details for the retrieval activity. + /// The query time for this retrieval activity. + /// The count of documents retrieved. + /// The elapsed time in milliseconds for the retrieval activity. + /// A new instance for mocking. + public static KnowledgeAgentSearchActivityRecord KnowledgeAgentSearchActivityRecord(int id = default, string targetIndex = null, KnowledgeAgentSearchActivityRecordQuery query = null, DateTimeOffset? queryTime = null, int? count = null, int? elapsedMs = null) { - return new SearchIndexStatistics(documentCount, storageSize, vectorIndexSize); + return new KnowledgeAgentSearchActivityRecord( + id, + "AzureSearchQuery", + targetIndex, + query, + queryTime, + count, + elapsedMs); } - /// Initializes a new instance of . - /// Total number of aliases. - /// Total number of documents across all indexes in the service. - /// Total number of indexes. - /// Total number of indexers. - /// Total number of data sources. - /// Total size of used storage in bytes. - /// Total number of synonym maps. - /// Total number of skillsets. - /// Total memory consumption of all vector indexes within the service, in bytes. - /// , , , , , , , or is null. - /// A new instance for mocking. - public static SearchServiceCounters SearchServiceCounters(SearchResourceCounter aliasCounter = null, SearchResourceCounter documentCounter = null, SearchResourceCounter indexCounter = null, SearchResourceCounter indexerCounter = null, SearchResourceCounter dataSourceCounter = null, SearchResourceCounter storageSizeCounter = null, SearchResourceCounter synonymMapCounter = null, SearchResourceCounter skillsetCounter = null, SearchResourceCounter vectorIndexSizeCounter = null) + /// Initializes a new instance of . + /// The search string. + /// The filter string. + /// A new instance for mocking. + public static KnowledgeAgentSearchActivityRecordQuery KnowledgeAgentSearchActivityRecordQuery(string search = null, string filter = null) { - if (aliasCounter == null) - { - throw new ArgumentNullException(nameof(aliasCounter)); - } - if (documentCounter == null) - { - throw new ArgumentNullException(nameof(documentCounter)); - } - if (indexCounter == null) - { - throw new ArgumentNullException(nameof(indexCounter)); - } - if (indexerCounter == null) - { - throw new ArgumentNullException(nameof(indexerCounter)); - } - if (dataSourceCounter == null) - { - throw new ArgumentNullException(nameof(dataSourceCounter)); - } - if (storageSizeCounter == null) - { - throw new ArgumentNullException(nameof(storageSizeCounter)); - } - if (synonymMapCounter == null) - { - throw new ArgumentNullException(nameof(synonymMapCounter)); - } - if (skillsetCounter == null) - { - throw new ArgumentNullException(nameof(skillsetCounter)); - } - if (vectorIndexSizeCounter == null) - { - throw new ArgumentNullException(nameof(vectorIndexSizeCounter)); - } - - return new SearchServiceCounters( - aliasCounter, - documentCounter, - indexCounter, - indexerCounter, - dataSourceCounter, - storageSizeCounter, - synonymMapCounter, - skillsetCounter, - vectorIndexSizeCounter); + return new KnowledgeAgentSearchActivityRecordQuery(search, filter); } - /// Initializes a new instance of . - /// The maximum allowed fields per index. - /// The maximum depth which you can nest sub-fields in an index, including the top-level complex field. For example, a/b/c has a nesting depth of 3. - /// The maximum number of fields of type Collection(Edm.ComplexType) allowed in an index. - /// The maximum number of objects in complex collections allowed per document. - /// The maximum amount of storage in bytes allowed per index. - /// A new instance for mocking. - public static SearchServiceLimits SearchServiceLimits(int? maxFieldsPerIndex = null, int? maxFieldNestingDepthPerIndex = null, int? maxComplexCollectionFieldsPerIndex = null, int? maxComplexObjectsInCollectionsPerDocument = null, long? maxStoragePerIndexInBytes = null) + /// Initializes a new instance of . + /// The ID of the activity record. + /// The number of input tokens for the LLM query planning activity. + /// The number of output tokens for the LLM query planning activity. + /// The elapsed time in milliseconds for the model activity. + /// A new instance for mocking. + public static KnowledgeAgentModelQueryPlanningActivityRecord KnowledgeAgentModelQueryPlanningActivityRecord(int id = default, int? inputTokens = null, int? outputTokens = null, int? elapsedMs = null) { - return new SearchServiceLimits(maxFieldsPerIndex, maxFieldNestingDepthPerIndex, maxComplexCollectionFieldsPerIndex, maxComplexObjectsInCollectionsPerDocument, maxStoragePerIndexInBytes); + return new KnowledgeAgentModelQueryPlanningActivityRecord(id, "ModelQueryPlanning", inputTokens, outputTokens, elapsedMs); } - /// Initializes a new instance of . - /// The Statistics summary of all indexes in the Search service. - /// A new instance for mocking. - public static ListIndexStatsSummary ListIndexStatsSummary(IEnumerable indexesStatistics = null) + /// Initializes a new instance of . + /// The ID of the activity record. + /// The number of input tokens for the semantic ranker activity. + /// The elapsed time in milliseconds for the model activity. + /// A new instance for mocking. + public static KnowledgeAgentSemanticRankerActivityRecord KnowledgeAgentSemanticRankerActivityRecord(int id = default, int? inputTokens = null, int? elapsedMs = null) { - indexesStatistics ??= new List(); - - return new ListIndexStatsSummary(indexesStatistics?.ToList()); + return new KnowledgeAgentSemanticRankerActivityRecord(id, "AzureSearchSemanticRanker", inputTokens, elapsedMs); } - /// Initializes a new instance of . - /// The name of the index. - /// The number of documents in the index. - /// The amount of storage in bytes consumed by the index. - /// The amount of memory in bytes consumed by vectors in the index. - /// is null. - /// A new instance for mocking. - public static IndexStatisticsSummary IndexStatisticsSummary(string name = null, long documentCount = default, long storageSize = default, long vectorIndexSize = default) + /// Initializes a new instance of . + /// The ID of the reference. + /// The source activity ID for the reference. + /// The document key for the reference. + /// Dictionary of <any>. + /// A new instance for mocking. + public static KnowledgeAgentAzureSearchDocReference KnowledgeAgentAzureSearchDocReference(string id = null, int activitySource = default, string docKey = null, IReadOnlyDictionary sourceData = null) { - if (name == null) - { - throw new ArgumentNullException(nameof(name)); - } + sourceData ??= new Dictionary(); - return new IndexStatisticsSummary(name, documentCount, storageSize, vectorIndexSize); + return new KnowledgeAgentAzureSearchDocReference("AzureSearchDoc", id, activitySource, docKey, sourceData); } } } diff --git a/sdk/search/Azure.Search.Documents/src/Generated/SearchServiceRestClient.cs b/sdk/search/Azure.Search.Documents/src/Generated/SearchServiceRestClient.cs index 29fc4d3efd08..33a3c1de9c9c 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/SearchServiceRestClient.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/SearchServiceRestClient.cs @@ -18,7 +18,7 @@ namespace Azure.Search.Documents internal partial class SearchServiceRestClient { private readonly HttpPipeline _pipeline; - private readonly string _endpoint; + private readonly Uri _endpoint; private readonly Guid? _xMsClientRequestId; private readonly string _apiVersion; @@ -32,7 +32,7 @@ internal partial class SearchServiceRestClient /// The tracking ID sent with the request to help with debugging. /// Api Version. /// , , or is null. - public SearchServiceRestClient(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string endpoint, Guid? xMsClientRequestId = null, string apiVersion = "2025-03-01-preview") + public SearchServiceRestClient(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, Uri endpoint, Guid? xMsClientRequestId = null, string apiVersion = "2025-05-01-preview") { ClientDiagnostics = clientDiagnostics ?? throw new ArgumentNullException(nameof(clientDiagnostics)); _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); @@ -47,7 +47,7 @@ internal HttpMessage CreateGetServiceStatisticsRequest() var request = message.Request; request.Method = RequestMethod.Get; var uri = new RawRequestUriBuilder(); - uri.AppendRaw(_endpoint, false); + uri.Reset(_endpoint); uri.AppendPath("/servicestats", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; @@ -101,7 +101,7 @@ internal HttpMessage CreateGetIndexStatsSummaryRequest() var request = message.Request; request.Method = RequestMethod.Get; var uri = new RawRequestUriBuilder(); - uri.AppendRaw(_endpoint, false); + uri.Reset(_endpoint); uri.AppendPath("/indexstats", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; diff --git a/sdk/search/Azure.Search.Documents/src/Generated/SkillsetsRestClient.cs b/sdk/search/Azure.Search.Documents/src/Generated/SkillsetsRestClient.cs index f9c5d975e2ce..77faf6fb11ef 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/SkillsetsRestClient.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/SkillsetsRestClient.cs @@ -19,7 +19,7 @@ namespace Azure.Search.Documents internal partial class SkillsetsRestClient { private readonly HttpPipeline _pipeline; - private readonly string _endpoint; + private readonly Uri _endpoint; private readonly Guid? _xMsClientRequestId; private readonly string _apiVersion; @@ -33,7 +33,7 @@ internal partial class SkillsetsRestClient /// The tracking ID sent with the request to help with debugging. /// Api Version. /// , , or is null. - public SkillsetsRestClient(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string endpoint, Guid? xMsClientRequestId = null, string apiVersion = "2025-03-01-preview") + public SkillsetsRestClient(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, Uri endpoint, Guid? xMsClientRequestId = null, string apiVersion = "2025-05-01-preview") { ClientDiagnostics = clientDiagnostics ?? throw new ArgumentNullException(nameof(clientDiagnostics)); _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); @@ -48,7 +48,7 @@ internal HttpMessage CreateCreateOrUpdateRequest(string skillsetName, SearchInde var request = message.Request; request.Method = RequestMethod.Put; var uri = new RawRequestUriBuilder(); - uri.AppendRaw(_endpoint, false); + uri.Reset(_endpoint); uri.AppendPath("/skillsets('", false); uri.AppendPath(skillsetName, true); uri.AppendPath("')", false); @@ -159,7 +159,7 @@ internal HttpMessage CreateDeleteRequest(string skillsetName, string ifMatch, st var request = message.Request; request.Method = RequestMethod.Delete; var uri = new RawRequestUriBuilder(); - uri.AppendRaw(_endpoint, false); + uri.Reset(_endpoint); uri.AppendPath("/skillsets('", false); uri.AppendPath(skillsetName, true); uri.AppendPath("')", false); @@ -233,7 +233,7 @@ internal HttpMessage CreateGetRequest(string skillsetName) var request = message.Request; request.Method = RequestMethod.Get; var uri = new RawRequestUriBuilder(); - uri.AppendRaw(_endpoint, false); + uri.Reset(_endpoint); uri.AppendPath("/skillsets('", false); uri.AppendPath(skillsetName, true); uri.AppendPath("')", false); @@ -303,7 +303,7 @@ internal HttpMessage CreateListRequest(string select) var request = message.Request; request.Method = RequestMethod.Get; var uri = new RawRequestUriBuilder(); - uri.AppendRaw(_endpoint, false); + uri.Reset(_endpoint); uri.AppendPath("/skillsets", false); if (select != null) { @@ -363,7 +363,7 @@ internal HttpMessage CreateCreateRequest(SearchIndexerSkillset skillset) var request = message.Request; request.Method = RequestMethod.Post; var uri = new RawRequestUriBuilder(); - uri.AppendRaw(_endpoint, false); + uri.Reset(_endpoint); uri.AppendPath("/skillsets", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; @@ -435,7 +435,7 @@ internal HttpMessage CreateResetSkillsRequest(string skillsetName, ResetSkillsOp var request = message.Request; request.Method = RequestMethod.Post; var uri = new RawRequestUriBuilder(); - uri.AppendRaw(_endpoint, false); + uri.Reset(_endpoint); uri.AppendPath("/skillsets('", false); uri.AppendPath(skillsetName, true); uri.AppendPath("')/search.resetskills", false); diff --git a/sdk/search/Azure.Search.Documents/src/Generated/SynonymMapsRestClient.cs b/sdk/search/Azure.Search.Documents/src/Generated/SynonymMapsRestClient.cs index 27411a284510..abf1060574a4 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/SynonymMapsRestClient.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/SynonymMapsRestClient.cs @@ -18,7 +18,7 @@ namespace Azure.Search.Documents internal partial class SynonymMapsRestClient { private readonly HttpPipeline _pipeline; - private readonly string _endpoint; + private readonly Uri _endpoint; private readonly Guid? _xMsClientRequestId; private readonly string _apiVersion; @@ -32,7 +32,7 @@ internal partial class SynonymMapsRestClient /// The tracking ID sent with the request to help with debugging. /// Api Version. /// , , or is null. - public SynonymMapsRestClient(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string endpoint, Guid? xMsClientRequestId = null, string apiVersion = "2025-03-01-preview") + public SynonymMapsRestClient(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, Uri endpoint, Guid? xMsClientRequestId = null, string apiVersion = "2025-05-01-preview") { ClientDiagnostics = clientDiagnostics ?? throw new ArgumentNullException(nameof(clientDiagnostics)); _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); @@ -47,7 +47,7 @@ internal HttpMessage CreateCreateOrUpdateRequest(string synonymMapName, SynonymM var request = message.Request; request.Method = RequestMethod.Put; var uri = new RawRequestUriBuilder(); - uri.AppendRaw(_endpoint, false); + uri.Reset(_endpoint); uri.AppendPath("/synonymmaps('", false); uri.AppendPath(synonymMapName, true); uri.AppendPath("')", false); @@ -146,7 +146,7 @@ internal HttpMessage CreateDeleteRequest(string synonymMapName, string ifMatch, var request = message.Request; request.Method = RequestMethod.Delete; var uri = new RawRequestUriBuilder(); - uri.AppendRaw(_endpoint, false); + uri.Reset(_endpoint); uri.AppendPath("/synonymmaps('", false); uri.AppendPath(synonymMapName, true); uri.AppendPath("')", false); @@ -220,7 +220,7 @@ internal HttpMessage CreateGetRequest(string synonymMapName) var request = message.Request; request.Method = RequestMethod.Get; var uri = new RawRequestUriBuilder(); - uri.AppendRaw(_endpoint, false); + uri.Reset(_endpoint); uri.AppendPath("/synonymmaps('", false); uri.AppendPath(synonymMapName, true); uri.AppendPath("')", false); @@ -290,7 +290,7 @@ internal HttpMessage CreateListRequest(string select) var request = message.Request; request.Method = RequestMethod.Get; var uri = new RawRequestUriBuilder(); - uri.AppendRaw(_endpoint, false); + uri.Reset(_endpoint); uri.AppendPath("/synonymmaps", false); if (select != null) { @@ -350,7 +350,7 @@ internal HttpMessage CreateCreateRequest(SynonymMap synonymMap) var request = message.Request; request.Method = RequestMethod.Post; var uri = new RawRequestUriBuilder(); - uri.AppendRaw(_endpoint, false); + uri.Reset(_endpoint); uri.AppendPath("/synonymmaps", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; diff --git a/sdk/search/Azure.Search.Documents/src/autorest.md b/sdk/search/Azure.Search.Documents/src/autorest.md index 689c9034ba14..a0bf7129471d 100644 --- a/sdk/search/Azure.Search.Documents/src/autorest.md +++ b/sdk/search/Azure.Search.Documents/src/autorest.md @@ -10,9 +10,8 @@ See the [Contributing guidelines](https://github.com/Azure/azure-sdk-for-net/blo ## Swagger Source(s) ```yaml title: SearchServiceClient -input-file: - - https://github.com/Azure/azure-rest-api-specs/blob/8c53aa7023e66a9ec24ede6a9fad0ed730d62515/specification/search/data-plane/Azure.Search/preview/2025-03-01-preview/searchindex.json - - https://github.com/Azure/azure-rest-api-specs/blob/8c53aa7023e66a9ec24ede6a9fad0ed730d62515/specification/search/data-plane/Azure.Search/preview/2025-03-01-preview/searchservice.json +require: +- /mnt/vss/_work/1/s/azure-rest-api-specs/specification/search/data-plane/Azure.Search/readme.md generation1-convenience-client: true deserialize-null-collection-as-null-value: true ``` @@ -549,3 +548,4 @@ directive: "modelAsString": false } ``` + diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/Configuration.json b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/Configuration.json new file mode 100644 index 000000000000..a3ae3280efb2 --- /dev/null +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/Configuration.json @@ -0,0 +1,13 @@ +{ + "output-folder": ".", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "library-name": "Azure.ResourceManager.ServiceFabricManagedClusters", + "flavor": "azure", + "use-model-reader-writer": true, + "shared-source-folders": [ + "../../TempTypeSpecFiles/node_modules/@autorest/csharp/Generator.Shared", + "../../TempTypeSpecFiles/node_modules/@autorest/csharp/Azure.Core.Shared" + ], + "model-namespace": false, + "azure-arm": true +} diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/autorest.md b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/autorest.md deleted file mode 100644 index 4daae1dff57b..000000000000 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/autorest.md +++ /dev/null @@ -1,232 +0,0 @@ -# Generated code configuration - -Run `dotnet build /t:GenerateCode` to generate code. - -``` yaml - -azure-arm: true -csharp: true -library-name: ServiceFabricManagedClusters -namespace: Azure.ResourceManager.ServiceFabricManagedClusters -require: https://github.com/Azure/azure-rest-api-specs/blob/f17b769690a46d858134ee68ef0d89635083b560/specification/servicefabricmanagedclusters/resource-manager/readme.md -#tag: package-2024-09-preview -output-folder: $(this-folder)/Generated -clear-output-folder: true -sample-gen: - output-folder: $(this-folder)/../samples/Generated - clear-output-folder: true -skip-csproj: true -modelerfour: - flatten-payloads: false -use-model-reader-writer: true - -#mgmt-debug: -# show-serialized-names: true - -request-path-is-non-resource: -- /subscriptions/{subscriptionId}/providers/Microsoft.ServiceFabric/locations/{location}/environments/{environment}/managedClusterVersions/{clusterVersion} -- /subscriptions/{subscriptionId}/providers/Microsoft.ServiceFabric/locations/{location}/managedClusterVersions/{clusterVersion} -- /subscriptions/{subscriptionId}/providers/Microsoft.ServiceFabric/locations/{location}/managedUnsupportedVMSizes/{vmSize} - -format-by-name-rules: - 'tenantId': 'uuid' - 'ETag': 'etag' - 'location': 'azure-location' - '*Uri': 'Uri' - '*Uris': 'Uri' - -models-to-treat-empty-string-as-null: - - ManagedClusterSubnet - - NodeTypeFrontendConfiguration - - ServiceFabricManagedClusterData - - ServiceFabricManagedClusterVersion - - ServiceFabricManagedNodeTypeData - - VmManagedIdentity - -acronym-mapping: - CPU: Cpu - CPUs: Cpus - Os: OS - Ip: IP - Ips: IPs|ips - ID: Id - IDs: Ids - VM: Vm - VMs: Vms - Vmos: VmOS - VMScaleSet: VmScaleSet - DNS: Dns - VPN: Vpn - NAT: Nat - WAN: Wan - Ipv4: IPv4|ipv4 - Ipv6: IPv6|ipv6 - Ipsec: IPsec|ipsec - SSO: Sso - URI: Uri - Etag: ETag|etag - LRS: Lrs - SSD: Ssd - -override-operation-name: - managedAzResiliencyStatus_get: GetManagedAzResiliencyStatus - NodeTypeSkus_List: GetAvailableSkus - managedUnsupportedVMSizes_Get: GetManagedUnsupportedVmSize - managedUnsupportedVMSizes_List: GetManagedUnsupportedVmSizes - ManagedClusterVersion_GetByEnvironment: GetManagedClusterVersionByEnvironment - managedAzResiliencyStatus_Get: GetManagedAzResiliencyStatus - -rename-mapping: - ApplicationResource: ServiceFabricManagedApplication - ApplicationTypeResource: ServiceFabricManagedApplicationType - ApplicationTypeVersionResource: ServiceFabricManagedApplicationTypeVersion - ApplicationUserAssignedIdentity: ApplicationUserAssignedIdentityInfo - ManagedClusterCodeVersionResult: ServiceFabricManagedClusterVersion - ManagedClusterCodeVersionResult.properties.supportExpiryUtc: VersionSupportExpireOn - OsType: ServiceFabricManagedClusterOSType - ManagedCluster: ServiceFabricManagedCluster - ManagedCluster.properties.addonFeatures: AddOnFeatures - ManagedCluster.properties.allowRdpAccess: IsRdpAccessAllowed - ManagedCluster.properties.clusterCertificateThumbprints: -|any - ManagedCluster.properties.clusterId: -|uuid - ManagedCluster.properties.enableAutoOSUpgrade: IsAutoOSUpgradeEnabled - ManagedCluster.properties.enableIpv6: IsIPv6Enabled - ManagedCluster.properties.enableServicePublicIP: IsServicePublicIPEnabled - ManagedCluster.properties.ipv4Address: -|ip-address - ManagedCluster.properties.ipv6Address: -|ip-address - ManagedCluster.properties.zonalResiliency: HasZoneResiliency - ManagedCluster.properties.enableHttpGatewayExclusiveAuthMode: IsHttpGatewayExclusiveAuthModeEnabled - - Subnet: ManagedClusterSubnet - Subnet.enableIpv6: IsIPv6Enabled - Subnet.networkSecurityGroupId: -|arm-id - AzureActiveDirectory: ManagedClusterAzureActiveDirectory - ClientCertificate: ManagedClusterClientCertificate - ClientCertificate.thumbprint: -|any - ClientCertificate.issuerThumbprint: -|any - ClusterState: ServiceFabricManagedClusterState - ClusterUpgradeCadence: ManagedClusterUpgradeCadence - ClusterUpgradeMode: ManagedClusterUpgradeMode - SettingsSectionDescription: ClusterFabricSettingsSection - SettingsParameterDescription: ClusterFabricSettingsParameterDescription - IpTag: ManagedClusterIPTag - LoadBalancingRule: ManagedClusterLoadBalancingRule - NetworkSecurityRule: ServiceFabricManagedNetworkSecurityRule - Direction: ServiceFabricManagedNetworkSecurityRuleDirection - Access: ServiceFabricManagedNetworkTrafficAccess - ManagedResourceProvisioningState: ServiceFabricManagedResourceProvisioningState - ServiceEndpoint: ManagedClusterServiceEndpoint - ServiceEndpoint.locations: -|azure-location - NodeType: ServiceFabricManagedNodeType - NodeType.properties.dataDiskSizeGB: DataDiskSizeInGB - NodeType.properties.enableAcceleratedNetworking: IsAcceleratedNetworkingEnabled - NodeType.properties.enableEncryptionAtHost: IsEncryptionAtHostEnabled - NodeType.properties.enableOverProvisioning: IsOverProvisioningEnabled - NodeType.properties.multiplePlacementGroups: HasMultiplePlacementGroups - NodeType.properties.enableNodePublicIPv6: IsNodePublicIPv6Enabled - VmApplication : ServiceFabricManagedVmApplication - VmssDataDisk: NodeTypeVmssDataDisk - VmssDataDisk.diskSizeGB: DiskSizeInGB - VmssExtension: NodeTypeVmssExtension - VmssExtension.properties.enableAutomaticUpgrade: IsAutomaticUpgradeEnabled - VaultSecretGroup: NodeTypeVaultSecretGroup - VaultCertificate: NodeTypeVaultCertificate - DiskType: ServiceFabricManagedDataDiskType - FrontendConfiguration: NodeTypeFrontendConfiguration - FrontendConfiguration.loadBalancerBackendAddressPoolId: -|arm-id - FrontendConfiguration.loadBalancerInboundNatPoolId: -|arm-id - VmManagedIdentity.userAssignedIdentities: -|arm-id - NodeTypeActionParameters: NodeTypeActionContent - NodeTypeActionParameters.force: IsForced - ServiceResource: ServiceFabricManagedService - ServiceResourceProperties: ManagedServiceProperties - ServiceResourcePropertiesBase: ManagedServiceBaseProperties - ServiceCorrelation: ManagedServiceCorrelation - ServiceCorrelationScheme: ManagedServiceCorrelationScheme - ScalingPolicy: ManagedServiceScalingPolicy - ScalingMechanism: ManagedServiceScalingMechanism - ScalingTrigger: ManagedServiceScalingTrigger - MoveCost: ServiceFabricManagedServiceMoveCost - ApplicationUpgradePolicy.instanceCloseDelayDuration: InstanceCloseDelayDurationInSeconds - FailureAction: PolicyViolationCompensationAction - IPAddressType: NodeTypeFrontendConfigurationIPAddressType - ProbeProtocol: ManagedClusterLoadBalanceProbeProtocol - Protocol: ManagedClusterLoadBalancingRuleTransportProtocol - Partition: ManagedServicePartitionScheme - NsgProtocol: ServiceFabricManagedNsgProtocol - NsgProtocol.ah: AH - NodeTypeAvailableSku.resourceType: -|resource-type - PartitionInstanceCountScaleMechanism: PartitionInstanceCountScalingMechanism - PrivateEndpointNetworkPolicies: ManagedClusterSubnetPrivateEndpointNetworkPoliciesState - PrivateLinkServiceNetworkPolicies: ManagedClusterSubnetPrivateLinkServiceNetworkPoliciesState - ServiceLoadMetric: ManagedServiceLoadMetric - ServiceLoadMetricWeight: ManagedServiceLoadMetricWeight - ServicePackageActivationMode: ManagedServicePackageActivationMode - ServicePlacementPolicy: ManagedServicePlacementPolicy - ManagedVMSize: ServiceFabricManagedUnsupportedVmSize - AddRemoveIncrementalNamedPartitionScalingMechanism: NamedPartitionAddOrRemoveScalingMechanism - NodeType.properties.enableNodePublicIP: IsNodePublicIPEnabled - NodeType.properties.secureBootEnabled: IsSecureBootEnabled - EvictionPolicyType: SpotNodeVmEvictionPolicyType - ResourceAzStatus.resourceType: -|resource-type - SecurityType: ServiceFabricManagedClusterSecurityType - UpdateType: ServiceFabricManagedClusterUpdateType - ClusterHealthPolicy: ManagedClusterHealthPolicy - ClusterUpgradePolicy: ManagedClusterUpgradePolicy - ClusterUpgradeDeltaHealthPolicy: ManagedClusterUpgradeDeltaHealthPolicy - ClusterMonitoringPolicy: ManagedClusterMonitoringPolicy - PrivateIPAddressVersion: ServiceFabricManagedClusterPrivateIPAddressVersion - PublicIPAddressVersion: ServiceFabricManagedClusterPublicIPAddressVersion - IpConfiguration: ServiceFabricManagedClusterIPConfiguration - IpConfigurationPublicIPAddressConfiguration: ServiceFabricManagedClusterPublicIPAddressConfiguration - ManagedMaintenanceWindowStatus.lastWindowStatusUpdateAtUTC: LastWindowStatusUpdatedOn - ManagedMaintenanceWindowStatus.lastWindowStartTimeUTC: LastWindowStartOn - ManagedMaintenanceWindowStatus.lastWindowEndTimeUTC: LastWindowEndOn - -suppress-abstract-base-class: -- ManagedServiceProperties - -directive: - - remove-operation: OperationStatus_Get - - remove-operation: OperationResults_Get - - from: managedapplication.json - where: $.definitions - transform: > - $.HealthCheckWaitDuration['x-ms-format'] = 'duration-constant'; - $.HealthCheckStableDuration['x-ms-format'] = 'duration-constant'; - $.HealthCheckRetryTimeout['x-ms-format'] = 'duration-constant'; - $.UpgradeDomainTimeout['x-ms-format'] = 'duration-constant'; - $.UpgradeTimeout['x-ms-format'] = 'duration-constant'; - $.StatefulServiceProperties.properties.replicaRestartWaitDuration['x-ms-format'] = 'duration-constant'; - $.StatefulServiceProperties.properties.quorumLossWaitDuration['x-ms-format'] = 'duration-constant'; - $.StatefulServiceProperties.properties.standByReplicaKeepDuration['x-ms-format'] = 'duration-constant'; - $.StatefulServiceProperties.properties.servicePlacementTimeLimit['x-ms-format'] = 'duration-constant'; - - from: managedcluster.json - where: $.definitions - transform: > - $.ManagedClusterVersionDetails.properties.supportExpiryUtc['format'] = 'date-time'; - - from: nodetype.json - where: $.paths['/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/nodeTypes/{nodeTypeName}'].patch - transform: > - $['responses'] = { - "200": { - "description": "The operation completed successfully.", - "schema": { - "$ref": "#/definitions/NodeType" - } - }, - "202": { - "description": "The operation completed successfully.", - "schema": { - "$ref": "#/definitions/NodeType" - } - }, - "default": { - "description": "The detailed error response.", - "schema": { - "$ref": "#/definitions/ErrorModel" - } - } - } - reason: response status 202 missing -``` diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/tsp-location.yaml b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/tsp-location.yaml new file mode 100644 index 000000000000..c5b6ccb2360c --- /dev/null +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/tsp-location.yaml @@ -0,0 +1,4 @@ +directory: specification/servicefabricmanagedclusters/ServiceFabricManagedClusters.Management +commit: 5cc63ed55e6f4769b156f767154839d0d18a7d05 +repo: Azure/azure-rest-api-specs +additionalDirectories: diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/tspCodeModel.json b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/tspCodeModel.json new file mode 100644 index 000000000000..59398a6e93a1 --- /dev/null +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/tspCodeModel.json @@ -0,0 +1,63581 @@ +{ + "$id": "1", + "name": "Microsoft.ServiceFabric", + "apiVersions": [ + "2024-11-01-preview", + "2025-03-01-preview" + ], + "enums": [ + { + "$id": "2", + "kind": "enum", + "name": "PolicyViolationCompensationAction", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.FailureAction", + "valueType": { + "$id": "3", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "4", + "kind": "enumvalue", + "name": "Rollback", + "value": "Rollback", + "valueType": { + "$id": "5", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "2" + }, + "doc": "Indicates that a rollback of the upgrade will be performed by Service Fabric if the upgrade fails.", + "decorators": [] + }, + { + "$id": "6", + "kind": "enumvalue", + "name": "Manual", + "value": "Manual", + "valueType": { + "$id": "7", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "2" + }, + "doc": "Indicates that a manual repair will need to be performed by the administrator if the upgrade fails. Service Fabric will not proceed to the next upgrade domain automatically.", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "doc": "The compensating action to perform when a Monitored upgrade encounters monitoring policy or health policy violations. Invalid indicates the failure action is invalid. Rollback specifies that the upgrade will start rolling back automatically. Manual indicates that the upgrade will switch to UnmonitoredManual upgrade mode.", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "8", + "kind": "enum", + "name": "RollingUpgradeMode", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.RollingUpgradeMode", + "valueType": { + "$id": "9", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "10", + "kind": "enumvalue", + "name": "Monitored", + "value": "Monitored", + "valueType": { + "$id": "11", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "8" + }, + "doc": "The upgrade will stop after completing each upgrade domain and automatically monitor health before proceeding. The value is 0.", + "decorators": [] + }, + { + "$id": "12", + "kind": "enumvalue", + "name": "UnmonitoredAuto", + "value": "UnmonitoredAuto", + "valueType": { + "$id": "13", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "8" + }, + "doc": "The upgrade will proceed automatically without performing any health monitoring. The value is 1.", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "doc": "The mode used to monitor health during a rolling upgrade. The values are Monitored, and UnmonitoredAuto.", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "14", + "kind": "enum", + "name": "ManagedIdentityType", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedIdentityType", + "valueType": { + "$id": "15", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "16", + "kind": "enumvalue", + "name": "None", + "value": "None", + "valueType": { + "$id": "17", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "14" + }, + "doc": "Indicates that no identity is associated with the resource.", + "decorators": [] + }, + { + "$id": "18", + "kind": "enumvalue", + "name": "SystemAssigned", + "value": "SystemAssigned", + "valueType": { + "$id": "19", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "14" + }, + "doc": "Indicates that system assigned identity is associated with the resource.", + "decorators": [] + }, + { + "$id": "20", + "kind": "enumvalue", + "name": "UserAssigned", + "value": "UserAssigned", + "valueType": { + "$id": "21", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "14" + }, + "doc": "Indicates that user assigned identity is associated with the resource.", + "decorators": [] + }, + { + "$id": "22", + "kind": "enumvalue", + "name": "SystemAssigned, UserAssigned", + "value": "SystemAssigned, UserAssigned", + "valueType": { + "$id": "23", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "14" + }, + "doc": "Indicates that both system assigned and user assigned identity are associated with the resource.", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "doc": "The type of managed identity for the resource.", + "isFixed": true, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "24", + "kind": "enum", + "name": "createdByType", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.createdByType", + "valueType": { + "$id": "25", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "26", + "kind": "enumvalue", + "name": "User", + "value": "User", + "valueType": { + "$id": "27", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "24" + }, + "doc": "The entity was created by a user.", + "decorators": [] + }, + { + "$id": "28", + "kind": "enumvalue", + "name": "Application", + "value": "Application", + "valueType": { + "$id": "29", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "24" + }, + "doc": "The entity was created by an application.", + "decorators": [] + }, + { + "$id": "30", + "kind": "enumvalue", + "name": "ManagedIdentity", + "value": "ManagedIdentity", + "valueType": { + "$id": "31", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "24" + }, + "doc": "The entity was created by a managed identity.", + "decorators": [] + }, + { + "$id": "32", + "kind": "enumvalue", + "name": "Key", + "value": "Key", + "valueType": { + "$id": "33", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "24" + }, + "doc": "The entity was created by a key.", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "doc": "The kind of entity that created the resource.", + "isFixed": false, + "isFlags": false, + "usage": "Output,Json,LroInitial,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "34", + "kind": "enum", + "name": "ResourceProvisioningState", + "crossLanguageDefinitionId": "Azure.ResourceManager.ResourceProvisioningState", + "valueType": { + "$id": "35", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "36", + "kind": "enumvalue", + "name": "Succeeded", + "value": "Succeeded", + "valueType": { + "$id": "37", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "34" + }, + "doc": "Resource has been created.", + "decorators": [] + }, + { + "$id": "38", + "kind": "enumvalue", + "name": "Failed", + "value": "Failed", + "valueType": { + "$id": "39", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "34" + }, + "doc": "Resource creation failed.", + "decorators": [] + }, + { + "$id": "40", + "kind": "enumvalue", + "name": "Canceled", + "value": "Canceled", + "valueType": { + "$id": "41", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "34" + }, + "doc": "Resource creation was canceled.", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "doc": "The provisioning state of a resource type.", + "isFixed": false, + "isFlags": false, + "usage": "LroPolling", + "decorators": [] + }, + { + "$id": "42", + "kind": "enum", + "name": "ServiceKind", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ServiceKind", + "valueType": { + "$id": "43", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "44", + "kind": "enumvalue", + "name": "Stateless", + "value": "Stateless", + "valueType": { + "$id": "45", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "42" + }, + "doc": "Does not use Service Fabric to make its state highly available or reliable. The value is 0.", + "decorators": [] + }, + { + "$id": "46", + "kind": "enumvalue", + "name": "Stateful", + "value": "Stateful", + "valueType": { + "$id": "47", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "42" + }, + "doc": "Uses Service Fabric to make its state or part of its state highly available and reliable. The value is 1.", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "doc": "The kind of service (Stateless or Stateful).", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "48", + "kind": "enum", + "name": "PartitionScheme", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.PartitionScheme", + "valueType": { + "$id": "49", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "50", + "kind": "enumvalue", + "name": "Singleton", + "value": "Singleton", + "valueType": { + "$id": "51", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "48" + }, + "doc": "Indicates that the partition is based on string names, and is a SingletonPartitionScheme object, The value is 0.", + "decorators": [] + }, + { + "$id": "52", + "kind": "enumvalue", + "name": "UniformInt64Range", + "value": "UniformInt64Range", + "valueType": { + "$id": "53", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "48" + }, + "doc": "Indicates that the partition is based on Int64 key ranges, and is a UniformInt64RangePartitionScheme object. The value is 1.", + "decorators": [] + }, + { + "$id": "54", + "kind": "enumvalue", + "name": "Named", + "value": "Named", + "valueType": { + "$id": "55", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "48" + }, + "doc": "Indicates that the partition is based on string names, and is a NamedPartitionScheme object. The value is 2.", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "doc": "Enumerates the ways that a service can be partitioned.", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "56", + "kind": "enum", + "name": "ManagedServicePackageActivationMode", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ServicePackageActivationMode", + "valueType": { + "$id": "57", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "58", + "kind": "enumvalue", + "name": "SharedProcess", + "value": "SharedProcess", + "valueType": { + "$id": "59", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "56" + }, + "doc": "Indicates the application package activation mode will use shared process.", + "decorators": [] + }, + { + "$id": "60", + "kind": "enumvalue", + "name": "ExclusiveProcess", + "value": "ExclusiveProcess", + "valueType": { + "$id": "61", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "56" + }, + "doc": "Indicates the application package activation mode will use exclusive process.", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "doc": "The activation Mode of the service package", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "62", + "kind": "enum", + "name": "ManagedServiceCorrelationScheme", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ServiceCorrelationScheme", + "valueType": { + "$id": "63", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "64", + "kind": "enumvalue", + "name": "AlignedAffinity", + "value": "AlignedAffinity", + "valueType": { + "$id": "65", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "62" + }, + "doc": "Aligned affinity ensures that the primaries of the partitions of the affinitized services are collocated on the same nodes. This is the default and is the same as selecting the Affinity scheme. The value is 0.", + "decorators": [] + }, + { + "$id": "66", + "kind": "enumvalue", + "name": "NonAlignedAffinity", + "value": "NonAlignedAffinity", + "valueType": { + "$id": "67", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "62" + }, + "doc": "Non-Aligned affinity guarantees that all replicas of each service will be placed on the same nodes. Unlike Aligned Affinity, this does not guarantee that replicas of particular role will be collocated. The value is 1.", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "doc": "The service correlation scheme.", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "68", + "kind": "enum", + "name": "ManagedServiceLoadMetricWeight", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ServiceLoadMetricWeight", + "valueType": { + "$id": "69", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "70", + "kind": "enumvalue", + "name": "Zero", + "value": "Zero", + "valueType": { + "$id": "71", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "68" + }, + "doc": "Disables resource balancing for this metric. This value is zero.", + "decorators": [] + }, + { + "$id": "72", + "kind": "enumvalue", + "name": "Low", + "value": "Low", + "valueType": { + "$id": "73", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "68" + }, + "doc": "Specifies the metric weight of the service load as Low. The value is 1.", + "decorators": [] + }, + { + "$id": "74", + "kind": "enumvalue", + "name": "Medium", + "value": "Medium", + "valueType": { + "$id": "75", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "68" + }, + "doc": "Specifies the metric weight of the service load as Medium. The value is 2.", + "decorators": [] + }, + { + "$id": "76", + "kind": "enumvalue", + "name": "High", + "value": "High", + "valueType": { + "$id": "77", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "68" + }, + "doc": "Specifies the metric weight of the service load as High. The value is 3.", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "doc": "Determines the metric weight relative to the other metrics that are configured for this service. During runtime, if two metrics end up in conflict, the Cluster Resource Manager prefers the metric with the higher weight.", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "78", + "kind": "enum", + "name": "ServicePlacementPolicyType", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ServicePlacementPolicyType", + "valueType": { + "$id": "79", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "80", + "kind": "enumvalue", + "name": "InvalidDomain", + "value": "InvalidDomain", + "valueType": { + "$id": "81", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "78" + }, + "doc": "Indicates that the ServicePlacementPolicyDescription is of type ServicePlacementInvalidDomainPolicyDescription, which indicates that a particular fault or upgrade domain cannot be used for placement of this service. The value is 0.", + "decorators": [] + }, + { + "$id": "82", + "kind": "enumvalue", + "name": "RequiredDomain", + "value": "RequiredDomain", + "valueType": { + "$id": "83", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "78" + }, + "doc": "Indicates that the ServicePlacementPolicyDescription is of type ServicePlacementRequireDomainDistributionPolicyDescription indicating that the replicas of the service must be placed in a specific domain. The value is 1.", + "decorators": [] + }, + { + "$id": "84", + "kind": "enumvalue", + "name": "PreferredPrimaryDomain", + "value": "PreferredPrimaryDomain", + "valueType": { + "$id": "85", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "78" + }, + "doc": "Indicates that the ServicePlacementPolicyDescription is of type ServicePlacementPreferPrimaryDomainPolicyDescription, which indicates that if possible the Primary replica for the partitions of the service should be located in a particular domain as an optimization. The value is 2.", + "decorators": [] + }, + { + "$id": "86", + "kind": "enumvalue", + "name": "RequiredDomainDistribution", + "value": "RequiredDomainDistribution", + "valueType": { + "$id": "87", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "78" + }, + "doc": "Indicates that the ServicePlacementPolicyDescription is of type ServicePlacementRequireDomainDistributionPolicyDescription, indicating that the system will disallow placement of any two replicas from the same partition in the same domain at any time. The value is 3.", + "decorators": [] + }, + { + "$id": "88", + "kind": "enumvalue", + "name": "NonPartiallyPlaceService", + "value": "NonPartiallyPlaceService", + "valueType": { + "$id": "89", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "78" + }, + "doc": "Indicates that the ServicePlacementPolicyDescription is of type ServicePlacementNonPartiallyPlaceServicePolicyDescription, which indicates that if possible all replicas of a particular partition of the service should be placed atomically. The value is 4.", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "doc": "The type of placement policy for a service fabric service. Following are the possible values.", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "90", + "kind": "enum", + "name": "ServiceFabricManagedServiceMoveCost", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.MoveCost", + "valueType": { + "$id": "91", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "92", + "kind": "enumvalue", + "name": "Zero", + "value": "Zero", + "valueType": { + "$id": "93", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "90" + }, + "doc": "Zero move cost. This value is zero.", + "decorators": [] + }, + { + "$id": "94", + "kind": "enumvalue", + "name": "Low", + "value": "Low", + "valueType": { + "$id": "95", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "90" + }, + "doc": "Specifies the move cost of the service as Low. The value is 1.", + "decorators": [] + }, + { + "$id": "96", + "kind": "enumvalue", + "name": "Medium", + "value": "Medium", + "valueType": { + "$id": "97", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "90" + }, + "doc": "Specifies the move cost of the service as Medium. The value is 2.", + "decorators": [] + }, + { + "$id": "98", + "kind": "enumvalue", + "name": "High", + "value": "High", + "valueType": { + "$id": "99", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "90" + }, + "doc": "Specifies the move cost of the service as High. The value is 3.", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "doc": "Specifies the move cost for the service.", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "100", + "kind": "enum", + "name": "ServiceScalingMechanismKind", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ServiceScalingMechanismKind", + "valueType": { + "$id": "101", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "102", + "kind": "enumvalue", + "name": "ScalePartitionInstanceCount", + "value": "ScalePartitionInstanceCount", + "valueType": { + "$id": "103", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "100" + }, + "doc": "Represents a scaling mechanism for adding or removing instances of stateless service partition. The value is 0.", + "decorators": [] + }, + { + "$id": "104", + "kind": "enumvalue", + "name": "AddRemoveIncrementalNamedPartition", + "value": "AddRemoveIncrementalNamedPartition", + "valueType": { + "$id": "105", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "100" + }, + "doc": "Represents a scaling mechanism for adding or removing named partitions of a stateless service. The value is 1.", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "doc": "Enumerates the ways that a service can be partitioned.", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "106", + "kind": "enum", + "name": "ServiceScalingTriggerKind", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ServiceScalingTriggerKind", + "valueType": { + "$id": "107", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "108", + "kind": "enumvalue", + "name": "AveragePartitionLoadTrigger", + "value": "AveragePartitionLoadTrigger", + "valueType": { + "$id": "109", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "106" + }, + "doc": "Represents a scaling trigger related to an average load of a metric/resource of a partition. The value is 0.", + "decorators": [] + }, + { + "$id": "110", + "kind": "enumvalue", + "name": "AverageServiceLoadTrigger", + "value": "AverageServiceLoadTrigger", + "valueType": { + "$id": "111", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "106" + }, + "doc": "Represents a scaling policy related to an average load of a metric/resource of a service. The value is 1.", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "doc": "Enumerates the ways that a service can be partitioned.", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "112", + "kind": "enum", + "name": "ServiceFabricManagedClusterOSType", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.OsType", + "valueType": { + "$id": "113", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "114", + "kind": "enumvalue", + "name": "Windows", + "value": "Windows", + "valueType": { + "$id": "115", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "112" + }, + "doc": "Indicates os is Windows.", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "doc": "Cluster operating system, the default will be Windows", + "isFixed": false, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "116", + "kind": "enum", + "name": "ManagedClusterVersionEnvironment", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedClusterVersionEnvironment", + "valueType": { + "$id": "117", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "118", + "kind": "enumvalue", + "name": "Windows", + "value": "Windows", + "valueType": { + "$id": "119", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "116" + }, + "doc": "Indicates os is Windows.", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "doc": "The operating system of the cluster. The default means all.", + "isFixed": false, + "isFlags": false, + "usage": "Input", + "decorators": [] + }, + { + "$id": "120", + "kind": "enum", + "name": "ServiceFabricManagedClusterState", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ClusterState", + "valueType": { + "$id": "121", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "122", + "kind": "enumvalue", + "name": "WaitingForNodes", + "value": "WaitingForNodes", + "valueType": { + "$id": "123", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "120" + }, + "doc": "Indicates that the cluster resource is created and the resource provider is waiting for Service Fabric VM extension to boot up and report to it.", + "decorators": [] + }, + { + "$id": "124", + "kind": "enumvalue", + "name": "Deploying", + "value": "Deploying", + "valueType": { + "$id": "125", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "120" + }, + "doc": "Indicates that the Service Fabric runtime is being installed on the VMs. Cluster resource will be in this state until the cluster boots up and system services are up.", + "decorators": [] + }, + { + "$id": "126", + "kind": "enumvalue", + "name": "BaselineUpgrade", + "value": "BaselineUpgrade", + "valueType": { + "$id": "127", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "120" + }, + "doc": "Indicates that the cluster is upgrading to establishes the cluster version. This upgrade is automatically initiated when the cluster boots up for the first time.", + "decorators": [] + }, + { + "$id": "128", + "kind": "enumvalue", + "name": "Upgrading", + "value": "Upgrading", + "valueType": { + "$id": "129", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "120" + }, + "doc": "Indicates that the cluster is being upgraded with the user provided configuration.", + "decorators": [] + }, + { + "$id": "130", + "kind": "enumvalue", + "name": "UpgradeFailed", + "value": "UpgradeFailed", + "valueType": { + "$id": "131", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "120" + }, + "doc": "Indicates that the last upgrade for the cluster has failed.", + "decorators": [] + }, + { + "$id": "132", + "kind": "enumvalue", + "name": "Ready", + "value": "Ready", + "valueType": { + "$id": "133", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "120" + }, + "doc": "Indicates that the cluster is in a stable state.", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "doc": "The current state of the cluster.", + "isFixed": false, + "isFlags": false, + "usage": "Output,Json,LroInitial,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "134", + "kind": "enum", + "name": "ManagedClusterLoadBalancingRuleTransportProtocol", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.Protocol", + "valueType": { + "$id": "135", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "136", + "kind": "enumvalue", + "name": "tcp", + "value": "tcp", + "valueType": { + "$id": "137", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "134" + }, + "doc": "Transport protocol is TCP.", + "decorators": [] + }, + { + "$id": "138", + "kind": "enumvalue", + "name": "udp", + "value": "udp", + "valueType": { + "$id": "139", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "134" + }, + "doc": "Transport protocol is UDP.", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "doc": "The reference to the transport protocol used by the load balancing rule.", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "140", + "kind": "enum", + "name": "ManagedClusterLoadBalanceProbeProtocol", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ProbeProtocol", + "valueType": { + "$id": "141", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "142", + "kind": "enumvalue", + "name": "tcp", + "value": "tcp", + "valueType": { + "$id": "143", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "140" + }, + "doc": "Probe protocol is TCP.", + "decorators": [] + }, + { + "$id": "144", + "kind": "enumvalue", + "name": "http", + "value": "http", + "valueType": { + "$id": "145", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "140" + }, + "doc": "Probe protocol is HTTP.", + "decorators": [] + }, + { + "$id": "146", + "kind": "enumvalue", + "name": "https", + "value": "https", + "valueType": { + "$id": "147", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "140" + }, + "doc": "Probe protocol is HTTPS.", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "doc": "The reference to the load balancer probe used by the load balancing rule.", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "148", + "kind": "enum", + "name": "ServiceFabricManagedNsgProtocol", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NsgProtocol", + "valueType": { + "$id": "149", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "150", + "kind": "enumvalue", + "name": "http", + "value": "http", + "valueType": { + "$id": "151", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "148" + }, + "doc": "Protocol applies to HTTP.", + "decorators": [] + }, + { + "$id": "152", + "kind": "enumvalue", + "name": "https", + "value": "https", + "valueType": { + "$id": "153", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "148" + }, + "doc": "Protocol applies to HTTPS.", + "decorators": [] + }, + { + "$id": "154", + "kind": "enumvalue", + "name": "tcp", + "value": "tcp", + "valueType": { + "$id": "155", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "148" + }, + "doc": "Protocol applies to TCP.", + "decorators": [] + }, + { + "$id": "156", + "kind": "enumvalue", + "name": "udp", + "value": "udp", + "valueType": { + "$id": "157", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "148" + }, + "doc": "Protocol applies to UDP.", + "decorators": [] + }, + { + "$id": "158", + "kind": "enumvalue", + "name": "icmp", + "value": "icmp", + "valueType": { + "$id": "159", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "148" + }, + "doc": "Protocol applies to ICMP.", + "decorators": [] + }, + { + "$id": "160", + "kind": "enumvalue", + "name": "AH", + "value": "ah", + "valueType": { + "$id": "161", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "148" + }, + "doc": "Protocol applies to AH.", + "decorators": [] + }, + { + "$id": "162", + "kind": "enumvalue", + "name": "esp", + "value": "esp", + "valueType": { + "$id": "163", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "148" + }, + "doc": "Protocol applies to ESP.", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "doc": "Network protocol this rule applies to.", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "164", + "kind": "enum", + "name": "ServiceFabricManagedNetworkTrafficAccess", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.Access", + "valueType": { + "$id": "165", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "166", + "kind": "enumvalue", + "name": "allow", + "value": "allow", + "valueType": { + "$id": "167", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "164" + }, + "doc": "The network traffic is allowed.", + "decorators": [] + }, + { + "$id": "168", + "kind": "enumvalue", + "name": "deny", + "value": "deny", + "valueType": { + "$id": "169", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "164" + }, + "doc": "The network traffic is denied.", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "doc": "The network traffic is allowed or denied.", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "170", + "kind": "enum", + "name": "ServiceFabricManagedNetworkSecurityRuleDirection", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.Direction", + "valueType": { + "$id": "171", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "172", + "kind": "enumvalue", + "name": "inbound", + "value": "inbound", + "valueType": { + "$id": "173", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "170" + }, + "doc": "Inbound direction.", + "decorators": [] + }, + { + "$id": "174", + "kind": "enumvalue", + "name": "outbound", + "value": "outbound", + "valueType": { + "$id": "175", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "170" + }, + "doc": "Outbound direction.", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "doc": "Network security rule direction.", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "176", + "kind": "enum", + "name": "ServiceFabricManagedResourceProvisioningState", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedResourceProvisioningState", + "valueType": { + "$id": "177", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "178", + "kind": "enumvalue", + "name": "None", + "value": "None", + "valueType": { + "$id": "179", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "176" + }, + "doc": "The resource does not have a provisioning state.", + "decorators": [] + }, + { + "$id": "180", + "kind": "enumvalue", + "name": "Creating", + "value": "Creating", + "valueType": { + "$id": "181", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "176" + }, + "doc": "The resource is being created.", + "decorators": [] + }, + { + "$id": "182", + "kind": "enumvalue", + "name": "Created", + "value": "Created", + "valueType": { + "$id": "183", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "176" + }, + "doc": "The resource is created.", + "decorators": [] + }, + { + "$id": "184", + "kind": "enumvalue", + "name": "Updating", + "value": "Updating", + "valueType": { + "$id": "185", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "176" + }, + "doc": "The resource is being updated.", + "decorators": [] + }, + { + "$id": "186", + "kind": "enumvalue", + "name": "Succeeded", + "value": "Succeeded", + "valueType": { + "$id": "187", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "176" + }, + "doc": "The resource provisioning has succeeded.", + "decorators": [] + }, + { + "$id": "188", + "kind": "enumvalue", + "name": "Failed", + "value": "Failed", + "valueType": { + "$id": "189", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "176" + }, + "doc": "The resource provisioning has failed.", + "decorators": [] + }, + { + "$id": "190", + "kind": "enumvalue", + "name": "Canceled", + "value": "Canceled", + "valueType": { + "$id": "191", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "176" + }, + "doc": "The resource provisioning has been canceled.", + "decorators": [] + }, + { + "$id": "192", + "kind": "enumvalue", + "name": "Deleting", + "value": "Deleting", + "valueType": { + "$id": "193", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "176" + }, + "doc": "The resource is being deleted.", + "decorators": [] + }, + { + "$id": "194", + "kind": "enumvalue", + "name": "Deleted", + "value": "Deleted", + "valueType": { + "$id": "195", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "176" + }, + "doc": "The resource has been deleted.", + "decorators": [] + }, + { + "$id": "196", + "kind": "enumvalue", + "name": "Other", + "value": "Other", + "valueType": { + "$id": "197", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "176" + }, + "doc": "The resource provisioning state is a state other than the previously specified states.", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "doc": "The provisioning state of the managed resource.", + "isFixed": false, + "isFlags": false, + "usage": "Output,Json,LroInitial,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "198", + "kind": "enum", + "name": "ManagedClusterUpgradeMode", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ClusterUpgradeMode", + "valueType": { + "$id": "199", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "200", + "kind": "enumvalue", + "name": "Automatic", + "value": "Automatic", + "valueType": { + "$id": "201", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "198" + }, + "doc": "The cluster will be automatically upgraded to the latest Service Fabric runtime version, **clusterUpgradeCadence** will determine when the upgrade starts after the new version becomes available.", + "decorators": [] + }, + { + "$id": "202", + "kind": "enumvalue", + "name": "Manual", + "value": "Manual", + "valueType": { + "$id": "203", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "198" + }, + "doc": "The cluster will not be automatically upgraded to the latest Service Fabric runtime version. The cluster is upgraded by setting the **clusterCodeVersion** property in the cluster resource.", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "doc": "The upgrade mode of the cluster when new Service Fabric runtime version is available.", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "204", + "kind": "enum", + "name": "ManagedClusterUpgradeCadence", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ClusterUpgradeCadence", + "valueType": { + "$id": "205", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "206", + "kind": "enumvalue", + "name": "Wave0", + "value": "Wave0", + "valueType": { + "$id": "207", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "204" + }, + "doc": "Cluster upgrade starts immediately after a new version is rolled out. Recommended for Test/Dev clusters.", + "decorators": [] + }, + { + "$id": "208", + "kind": "enumvalue", + "name": "Wave1", + "value": "Wave1", + "valueType": { + "$id": "209", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "204" + }, + "doc": "Cluster upgrade starts 7 days after a new version is rolled out. Recommended for Pre-prod clusters.", + "decorators": [] + }, + { + "$id": "210", + "kind": "enumvalue", + "name": "Wave2", + "value": "Wave2", + "valueType": { + "$id": "211", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "204" + }, + "doc": "Cluster upgrade starts 14 days after a new version is rolled out. Recommended for Production clusters.", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "doc": "Indicates when new cluster runtime version upgrades will be applied after they are released. By default is Wave0.", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "212", + "kind": "enum", + "name": "ManagedClusterAddOnFeature", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedClusterAddOnFeature", + "valueType": { + "$id": "213", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "214", + "kind": "enumvalue", + "name": "DnsService", + "value": "DnsService", + "valueType": { + "$id": "215", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "212" + }, + "doc": "Dns service", + "decorators": [] + }, + { + "$id": "216", + "kind": "enumvalue", + "name": "BackupRestoreService", + "value": "BackupRestoreService", + "valueType": { + "$id": "217", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "212" + }, + "doc": "Backup and restore service", + "decorators": [] + }, + { + "$id": "218", + "kind": "enumvalue", + "name": "ResourceMonitorService", + "value": "ResourceMonitorService", + "valueType": { + "$id": "219", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "212" + }, + "doc": "Resource monitor service", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "doc": "Available cluster add-on features", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "220", + "kind": "enum", + "name": "ManagedClusterSubnetPrivateEndpointNetworkPoliciesState", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.PrivateEndpointNetworkPolicies", + "valueType": { + "$id": "221", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "222", + "kind": "enumvalue", + "name": "enabled", + "value": "enabled", + "valueType": { + "$id": "223", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "220" + }, + "doc": "Enable apply network policies on private end point in the subnet.", + "decorators": [] + }, + { + "$id": "224", + "kind": "enumvalue", + "name": "disabled", + "value": "disabled", + "valueType": { + "$id": "225", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "220" + }, + "doc": "Disable apply network policies on private end point in the subnet.", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "doc": "Enable or Disable apply network policies on private end point in the subnet.", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "226", + "kind": "enum", + "name": "ManagedClusterSubnetPrivateLinkServiceNetworkPoliciesState", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.PrivateLinkServiceNetworkPolicies", + "valueType": { + "$id": "227", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "228", + "kind": "enumvalue", + "name": "enabled", + "value": "enabled", + "valueType": { + "$id": "229", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "226" + }, + "doc": "Enable apply network policies on private link service in the subnet.", + "decorators": [] + }, + { + "$id": "230", + "kind": "enumvalue", + "name": "disabled", + "value": "disabled", + "valueType": { + "$id": "231", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "226" + }, + "doc": "Disable apply network policies on private link service in the subnet.", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "doc": "Enable or Disable apply network policies on private link service in the subnet.", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "232", + "kind": "enum", + "name": "ZonalUpdateMode", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ZonalUpdateMode", + "valueType": { + "$id": "233", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "234", + "kind": "enumvalue", + "name": "Standard", + "value": "Standard", + "valueType": { + "$id": "235", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "232" + }, + "doc": "The cluster will use 5 upgrade domains for Cross Az Node types.", + "decorators": [] + }, + { + "$id": "236", + "kind": "enumvalue", + "name": "Fast", + "value": "Fast", + "valueType": { + "$id": "237", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "232" + }, + "doc": "The cluster will use a maximum of 3 upgrade domains per zone instead of 5 for Cross Az Node types for faster deployments.", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "doc": "Indicates the update mode for Cross Az clusters.", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "238", + "kind": "enum", + "name": "AutoGeneratedDomainNameLabelScope", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.AutoGeneratedDomainNameLabelScope", + "valueType": { + "$id": "239", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "240", + "kind": "enumvalue", + "name": "TenantReuse", + "value": "TenantReuse", + "valueType": { + "$id": "241", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "238" + }, + "doc": "TenantReuse allows for the same hash to be created if the resource is created in the same Tenant with the same resource name.", + "decorators": [] + }, + { + "$id": "242", + "kind": "enumvalue", + "name": "SubscriptionReuse", + "value": "SubscriptionReuse", + "valueType": { + "$id": "243", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "238" + }, + "doc": "SubscriptionReuse allows for the same hash to be created if the resource is created in the same Subscription with the same resource name.", + "decorators": [] + }, + { + "$id": "244", + "kind": "enumvalue", + "name": "ResourceGroupReuse", + "value": "ResourceGroupReuse", + "valueType": { + "$id": "245", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "238" + }, + "doc": "ResourceGroupReuse allows for the same hash to be created if the resource is created in the same Resource Group with the same resource name.", + "decorators": [] + }, + { + "$id": "246", + "kind": "enumvalue", + "name": "NoReuse", + "value": "NoReuse", + "valueType": { + "$id": "247", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "238" + }, + "doc": "NoReuse will create a new hash regardless of the Subscription, Resource Group, Tenant and Resource name.", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "doc": "This enum is the entrypoint to using a certificate from a public CA for your cluster. This property was introduced to solve the\ndomain squatting problem with new domains. A domain name will be generated in the following format: {clustername}.{hash}.{regionname}.sfmcdomain.\nThe hash portion comes from Azure DNS' Deterministic Name Library. The library creates a hash using the cluster's Tenant, Subscription, Resource Group\nand Resource Name using the AutoGeneratedDomainNameLabelScope/reuse policy chosen.", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "248", + "kind": "enum", + "name": "SkuName", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.SkuName", + "valueType": { + "$id": "249", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "250", + "kind": "enumvalue", + "name": "Basic", + "value": "Basic", + "valueType": { + "$id": "251", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "248" + }, + "doc": "Basic requires a minimum of 3 nodes and allows only 1 node type.", + "decorators": [] + }, + { + "$id": "252", + "kind": "enumvalue", + "name": "Standard", + "value": "Standard", + "valueType": { + "$id": "253", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "248" + }, + "doc": "Requires a minimum of 5 nodes and allows 1 or more node type.", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "doc": "Sku Name.", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "254", + "kind": "enum", + "name": "FaultSimulationStatus", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.FaultSimulationStatus", + "valueType": { + "$id": "255", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "256", + "kind": "enumvalue", + "name": "Starting", + "value": "Starting", + "valueType": { + "$id": "257", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "254" + }, + "doc": "Indicates the fault simulation is starting. The simulation will have this status while the start operation is in progress.", + "decorators": [] + }, + { + "$id": "258", + "kind": "enumvalue", + "name": "Active", + "value": "Active", + "valueType": { + "$id": "259", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "254" + }, + "doc": "Indicates the fault simulation is active. The simulation will have this status after the start operation has completed successfully.", + "decorators": [] + }, + { + "$id": "260", + "kind": "enumvalue", + "name": "Stopping", + "value": "Stopping", + "valueType": { + "$id": "261", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "254" + }, + "doc": "Indicates the fault simulation is stopping. The simulation will have this status while the stop operation is in progress.", + "decorators": [] + }, + { + "$id": "262", + "kind": "enumvalue", + "name": "Done", + "value": "Done", + "valueType": { + "$id": "263", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "254" + }, + "doc": "Indicates the fault simulation is done. The simulation will have this status after the stop operation has completed successfully.", + "decorators": [] + }, + { + "$id": "264", + "kind": "enumvalue", + "name": "StartFailed", + "value": "StartFailed", + "valueType": { + "$id": "265", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "254" + }, + "doc": "Indicates the fault simulation has failed on start. The simulation will have this status after the start operation fails.", + "decorators": [] + }, + { + "$id": "266", + "kind": "enumvalue", + "name": "StopFailed", + "value": "StopFailed", + "valueType": { + "$id": "267", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "254" + }, + "doc": "Indicates the fault simulation has failed on stop. The simulation will have this status after the stop operation fails.", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "doc": "Fault simulation status.", + "isFixed": false, + "isFlags": false, + "usage": "Output,Json,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "268", + "kind": "enum", + "name": "SfmcOperationStatus", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.SfmcOperationStatus", + "valueType": { + "$id": "269", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "270", + "kind": "enumvalue", + "name": "Created", + "value": "Created", + "valueType": { + "$id": "271", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "268" + }, + "doc": "Operation created.", + "decorators": [] + }, + { + "$id": "272", + "kind": "enumvalue", + "name": "Started", + "value": "Started", + "valueType": { + "$id": "273", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "268" + }, + "doc": "Operation started.", + "decorators": [] + }, + { + "$id": "274", + "kind": "enumvalue", + "name": "Succeeded", + "value": "Succeeded", + "valueType": { + "$id": "275", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "268" + }, + "doc": "Operation succeeded.", + "decorators": [] + }, + { + "$id": "276", + "kind": "enumvalue", + "name": "Failed", + "value": "Failed", + "valueType": { + "$id": "277", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "268" + }, + "doc": "Operation failed.", + "decorators": [] + }, + { + "$id": "278", + "kind": "enumvalue", + "name": "Aborted", + "value": "Aborted", + "valueType": { + "$id": "279", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "268" + }, + "doc": "Operation aborted.", + "decorators": [] + }, + { + "$id": "280", + "kind": "enumvalue", + "name": "Canceled", + "value": "Canceled", + "valueType": { + "$id": "281", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "268" + }, + "doc": "Operation canceled.", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "doc": "Sfmc operation status.", + "isFixed": false, + "isFlags": false, + "usage": "Output,Json,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "282", + "kind": "enum", + "name": "FaultKind", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.FaultKind", + "valueType": { + "$id": "283", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "284", + "kind": "enumvalue", + "name": "Zone", + "value": "Zone", + "valueType": { + "$id": "285", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "282" + }, + "doc": "Simulates an availability zone down.", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "doc": "The kind of fault simulation.", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "286", + "kind": "enum", + "name": "ServiceFabricManagedDataDiskType", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.DiskType", + "valueType": { + "$id": "287", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "288", + "kind": "enumvalue", + "name": "Standard_LRS", + "value": "Standard_LRS", + "valueType": { + "$id": "289", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "286" + }, + "doc": "Standard HDD locally redundant storage. Best for backup, non-critical, and infrequent access.", + "decorators": [] + }, + { + "$id": "290", + "kind": "enumvalue", + "name": "StandardSSD_LRS", + "value": "StandardSSD_LRS", + "valueType": { + "$id": "291", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "286" + }, + "doc": "Standard SSD locally redundant storage. Best for web servers, lightly used enterprise applications and dev/test.", + "decorators": [] + }, + { + "$id": "292", + "kind": "enumvalue", + "name": "Premium_LRS", + "value": "Premium_LRS", + "valueType": { + "$id": "293", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "286" + }, + "doc": "Premium SSD locally redundant storage. Best for production and performance sensitive workloads.", + "decorators": [] + }, + { + "$id": "294", + "kind": "enumvalue", + "name": "PremiumV2_LRS", + "value": "PremiumV2_LRS", + "valueType": { + "$id": "295", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "286" + }, + "doc": "Premium SSD V2 locally redundant storage. Best for production and performance sensitive workloads that consistently require low latency and high IOPS and throughput.", + "decorators": [] + }, + { + "$id": "296", + "kind": "enumvalue", + "name": "StandardSSD_ZRS", + "value": "StandardSSD_ZRS", + "valueType": { + "$id": "297", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "286" + }, + "doc": "Standard SSD zone redundant storage. Best for web servers, lightly used enterprise applications and dev/test that need storage resiliency against zone failures.", + "decorators": [] + }, + { + "$id": "298", + "kind": "enumvalue", + "name": "Premium_ZRS", + "value": "Premium_ZRS", + "valueType": { + "$id": "299", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "286" + }, + "doc": "Premium SSD zone redundant storage. Best for production workloads that need storage resiliency against zone failures.", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "doc": "Managed data disk type. IOPS and throughput are given by the disk size, to see more information go to https://docs.microsoft.com/en-us/azure/virtual-machines/disks-types.", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "300", + "kind": "enum", + "name": "VmssExtensionSetupOrder", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.VmssExtensionSetupOrder", + "valueType": { + "$id": "301", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "302", + "kind": "enumvalue", + "name": "BeforeSFRuntime", + "value": "BeforeSFRuntime", + "valueType": { + "$id": "303", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "300" + }, + "doc": "Indicates that the vm extension should run before the service fabric runtime starts.", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "doc": "Vm extension setup order.", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "304", + "kind": "enum", + "name": "NodeTypeFrontendConfigurationIPAddressType", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.IPAddressType", + "valueType": { + "$id": "305", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "306", + "kind": "enumvalue", + "name": "IPv4", + "value": "IPv4", + "valueType": { + "$id": "307", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "304" + }, + "doc": "IPv4 address type.", + "decorators": [] + }, + { + "$id": "308", + "kind": "enumvalue", + "name": "IPv6", + "value": "IPv6", + "valueType": { + "$id": "309", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "304" + }, + "doc": "IPv6 address type.", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "doc": "The IP address type.", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "310", + "kind": "enum", + "name": "SpotNodeVmEvictionPolicyType", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.EvictionPolicyType", + "valueType": { + "$id": "311", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "312", + "kind": "enumvalue", + "name": "Delete", + "value": "Delete", + "valueType": { + "$id": "313", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "310" + }, + "doc": "Eviction policy will be Delete for SPOT vms.", + "decorators": [] + }, + { + "$id": "314", + "kind": "enumvalue", + "name": "Deallocate", + "value": "Deallocate", + "valueType": { + "$id": "315", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "310" + }, + "doc": "Eviction policy will be Deallocate for SPOT vms.", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "doc": "Specifies the eviction policy for virtual machines in a SPOT node type.", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "316", + "kind": "enum", + "name": "VmSetupAction", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.VmSetupAction", + "valueType": { + "$id": "317", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "318", + "kind": "enumvalue", + "name": "EnableContainers", + "value": "EnableContainers", + "valueType": { + "$id": "319", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "316" + }, + "doc": "Enable windows containers feature.", + "decorators": [] + }, + { + "$id": "320", + "kind": "enumvalue", + "name": "EnableHyperV", + "value": "EnableHyperV", + "valueType": { + "$id": "321", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "316" + }, + "doc": "Enables windows HyperV feature.", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "doc": "action to be performed on the vms before bootstrapping the service fabric runtime.", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "322", + "kind": "enum", + "name": "ServiceFabricManagedClusterSecurityType", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.SecurityType", + "valueType": { + "$id": "323", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "324", + "kind": "enumvalue", + "name": "TrustedLaunch", + "value": "TrustedLaunch", + "valueType": { + "$id": "325", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "322" + }, + "doc": "Trusted Launch is a security type that secures generation 2 virtual machines.", + "decorators": [] + }, + { + "$id": "326", + "kind": "enumvalue", + "name": "Standard", + "value": "Standard", + "valueType": { + "$id": "327", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "322" + }, + "doc": "Standard is the default security type for all machines.", + "decorators": [] + }, + { + "$id": "328", + "kind": "enumvalue", + "name": "ConfidentialVM", + "value": "ConfidentialVM", + "valueType": { + "$id": "329", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "322" + }, + "doc": "ConfidentialVM provides hardware-based encryption, trusted execution environment (TEE) and isolation of the VM memory & CPU from host.", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "doc": "Specifies the security type of the nodeType. Only Standard and TrustedLaunch are currently supported", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "330", + "kind": "enum", + "name": "SecurityEncryptionType", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.SecurityEncryptionType", + "valueType": { + "$id": "331", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "332", + "kind": "enumvalue", + "name": "DiskWithVMGuestState", + "value": "DiskWithVMGuestState", + "valueType": { + "$id": "333", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "330" + }, + "doc": "For encryption of the managed disk along with VMGuestState blob.", + "decorators": [] + }, + { + "$id": "334", + "kind": "enumvalue", + "name": "VMGuestStateOnly", + "value": "VMGuestStateOnly", + "valueType": { + "$id": "335", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "330" + }, + "doc": "For encryption of just the VMGuestState blob.", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "doc": "Specifies the securityEncryptionType type of the nodeType. Only DiskWithVMGuestState and VMGuestStateOnly are currently supported", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "336", + "kind": "enum", + "name": "ServiceFabricManagedClusterPrivateIPAddressVersion", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.PrivateIPAddressVersion", + "valueType": { + "$id": "337", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "338", + "kind": "enumvalue", + "name": "IPv4", + "value": "IPv4", + "valueType": { + "$id": "339", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "336" + }, + "doc": "The IP configuration's private IP is IPv4.", + "decorators": [] + }, + { + "$id": "340", + "kind": "enumvalue", + "name": "IPv6", + "value": "IPv6", + "valueType": { + "$id": "341", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "336" + }, + "doc": "The IP configuration's private IP is IPv6.", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "doc": "Specifies whether the IP configuration's private IP is IPv4 or IPv6. Default is IPv4.", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "342", + "kind": "enum", + "name": "ServiceFabricManagedClusterPublicIPAddressVersion", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.PublicIPAddressVersion", + "valueType": { + "$id": "343", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "344", + "kind": "enumvalue", + "name": "IPv4", + "value": "IPv4", + "valueType": { + "$id": "345", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "342" + }, + "doc": "The IP configuration's public IP is IPv4.", + "decorators": [] + }, + { + "$id": "346", + "kind": "enumvalue", + "name": "IPv6", + "value": "IPv6", + "valueType": { + "$id": "347", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "342" + }, + "doc": "The IP configuration's public IP is IPv6.", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "doc": "Specifies whether the IP configuration's public IP is IPv4 or IPv6. Default is IPv4.", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "348", + "kind": "enum", + "name": "ServiceFabricManagedClusterUpdateType", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.UpdateType", + "valueType": { + "$id": "349", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "350", + "kind": "enumvalue", + "name": "Default", + "value": "Default", + "valueType": { + "$id": "351", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "348" + }, + "doc": "The operation will proceed in all specified nodes at the same time.", + "decorators": [] + }, + { + "$id": "352", + "kind": "enumvalue", + "name": "ByUpgradeDomain", + "value": "ByUpgradeDomain", + "valueType": { + "$id": "353", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "348" + }, + "doc": "The operation will proceed one upgrade domain at a time, checking the health in between each to continue.", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "doc": "Specifies the way the operation will be performed.", + "isFixed": false, + "isFlags": false, + "usage": "Input,Json", + "decorators": [] + }, + { + "$id": "354", + "kind": "enum", + "name": "NodeTypeSkuScaleType", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypeSkuScaleType", + "valueType": { + "$id": "355", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "356", + "kind": "enumvalue", + "name": "None", + "value": "None", + "valueType": { + "$id": "357", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "354" + }, + "doc": "Node count is not adjustable in any way (e.g. it is fixed).", + "decorators": [] + }, + { + "$id": "358", + "kind": "enumvalue", + "name": "Manual", + "value": "Manual", + "valueType": { + "$id": "359", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "354" + }, + "doc": "The user must manually scale out/in.", + "decorators": [] + }, + { + "$id": "360", + "kind": "enumvalue", + "name": "Automatic", + "value": "Automatic", + "valueType": { + "$id": "361", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "354" + }, + "doc": "Automatic scale is allowed.", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "doc": "Node type capacity scale type.", + "isFixed": false, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "362", + "kind": "enum", + "name": "Versions", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.Versions", + "valueType": { + "$id": "363", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "364", + "kind": "enumvalue", + "name": "v2024_11_01_preview", + "value": "2024-11-01-preview", + "valueType": { + "$id": "365", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "362" + }, + "doc": "The 2024-11-01-preview API version.", + "decorators": [] + }, + { + "$id": "366", + "kind": "enumvalue", + "name": "v2025_03_01_preview", + "value": "2025-03-01-preview", + "valueType": { + "$id": "367", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "362" + }, + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "doc": "The available API versions.", + "isFixed": true, + "isFlags": false, + "usage": "ApiVersionEnum", + "decorators": [] + } + ], + "models": [ + { + "$id": "368", + "kind": "model", + "name": "OperationListResult", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.OperationListResult", + "usage": "Output,Json", + "doc": "Describes the result of the request to list Service Fabric resource provider operations.", + "decorators": [], + "properties": [ + { + "$id": "369", + "kind": "property", + "name": "value", + "serializedName": "value", + "doc": "The OperationResult items on this page", + "type": { + "$id": "370", + "kind": "array", + "name": "ArrayOperationResult", + "valueType": { + "$id": "371", + "kind": "model", + "name": "OperationResult", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.OperationResult", + "usage": "Output,Json", + "doc": "Available operation list result", + "decorators": [], + "properties": [ + { + "$id": "372", + "kind": "property", + "name": "name", + "serializedName": "name", + "doc": "The name of the operation.", + "type": { + "$id": "373", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.OperationResult.name", + "serializationOptions": { + "$id": "374", + "json": { + "$id": "375", + "name": "name" + } + } + }, + { + "$id": "376", + "kind": "property", + "name": "isDataAction", + "serializedName": "isDataAction", + "doc": "Indicates whether the operation is a data action", + "type": { + "$id": "377", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.OperationResult.isDataAction", + "serializationOptions": { + "$id": "378", + "json": { + "$id": "379", + "name": "isDataAction" + } + } + }, + { + "$id": "380", + "kind": "property", + "name": "display", + "serializedName": "display", + "doc": "The object that represents the operation.", + "type": { + "$id": "381", + "kind": "model", + "name": "AvailableOperationDisplay", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.AvailableOperationDisplay", + "usage": "Output,Json", + "doc": "Operation supported by the Service Fabric resource provider", + "decorators": [], + "properties": [ + { + "$id": "382", + "kind": "property", + "name": "provider", + "serializedName": "provider", + "doc": "The name of the provider.", + "type": { + "$id": "383", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.AvailableOperationDisplay.provider", + "serializationOptions": { + "$id": "384", + "json": { + "$id": "385", + "name": "provider" + } + } + }, + { + "$id": "386", + "kind": "property", + "name": "resource", + "serializedName": "resource", + "doc": "The resource on which the operation is performed", + "type": { + "$id": "387", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.AvailableOperationDisplay.resource", + "serializationOptions": { + "$id": "388", + "json": { + "$id": "389", + "name": "resource" + } + } + }, + { + "$id": "390", + "kind": "property", + "name": "operation", + "serializedName": "operation", + "doc": "The operation that can be performed.", + "type": { + "$id": "391", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.AvailableOperationDisplay.operation", + "serializationOptions": { + "$id": "392", + "json": { + "$id": "393", + "name": "operation" + } + } + }, + { + "$id": "394", + "kind": "property", + "name": "description", + "serializedName": "description", + "doc": "Operation description", + "type": { + "$id": "395", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.AvailableOperationDisplay.description", + "serializationOptions": { + "$id": "396", + "json": { + "$id": "397", + "name": "description" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.OperationResult.display", + "serializationOptions": { + "$id": "398", + "json": { + "$id": "399", + "name": "display" + } + } + }, + { + "$id": "400", + "kind": "property", + "name": "origin", + "serializedName": "origin", + "doc": "Origin result", + "type": { + "$id": "401", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.OperationResult.origin", + "serializationOptions": { + "$id": "402", + "json": { + "$id": "403", + "name": "origin" + } + } + }, + { + "$id": "404", + "kind": "property", + "name": "nextLink", + "serializedName": "nextLink", + "doc": "The URL to use for getting the next set of results.", + "type": { + "$id": "405", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.OperationResult.nextLink", + "serializationOptions": { + "$id": "406", + "json": { + "$id": "407", + "name": "nextLink" + } + } + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.OperationListResult.value", + "serializationOptions": { + "$id": "408", + "json": { + "$id": "409", + "name": "value" + } + } + }, + { + "$id": "410", + "kind": "property", + "name": "nextLink", + "serializedName": "nextLink", + "doc": "The link to the next page of items", + "type": { + "$id": "411", + "kind": "url", + "name": "ResourceLocation", + "crossLanguageDefinitionId": "TypeSpec.Rest.ResourceLocation", + "baseType": { + "$id": "412", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.OperationListResult.nextLink", + "serializationOptions": { + "$id": "413", + "json": { + "$id": "414", + "name": "nextLink" + } + } + } + ] + }, + { + "$ref": "371" + }, + { + "$ref": "381" + }, + { + "$id": "415", + "kind": "model", + "name": "ErrorResponse", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorResponse", + "usage": "Json,Exception", + "doc": "Common error response for all Azure Resource Manager APIs to return error details for failed operations.", + "decorators": [], + "properties": [ + { + "$id": "416", + "kind": "property", + "name": "error", + "serializedName": "error", + "doc": "The error object.", + "type": { + "$id": "417", + "kind": "model", + "name": "ErrorDetail", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorDetail", + "usage": "Json,Exception,LroPolling", + "doc": "The error detail.", + "decorators": [], + "properties": [ + { + "$id": "418", + "kind": "property", + "name": "code", + "serializedName": "code", + "doc": "The error code.", + "type": { + "$id": "419", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorDetail.code", + "serializationOptions": { + "$id": "420", + "json": { + "$id": "421", + "name": "code" + } + } + }, + { + "$id": "422", + "kind": "property", + "name": "message", + "serializedName": "message", + "doc": "The error message.", + "type": { + "$id": "423", + "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": "424", + "json": { + "$id": "425", + "name": "message" + } + } + }, + { + "$id": "426", + "kind": "property", + "name": "target", + "serializedName": "target", + "doc": "The error target.", + "type": { + "$id": "427", + "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": "428", + "json": { + "$id": "429", + "name": "target" + } + } + }, + { + "$id": "430", + "kind": "property", + "name": "details", + "serializedName": "details", + "doc": "The error details.", + "type": { + "$id": "431", + "kind": "array", + "name": "ArrayErrorDetail", + "valueType": { + "$ref": "417" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorDetail.details", + "serializationOptions": { + "$id": "432", + "json": { + "$id": "433", + "name": "details" + } + } + }, + { + "$id": "434", + "kind": "property", + "name": "additionalInfo", + "serializedName": "additionalInfo", + "doc": "The error additional info.", + "type": { + "$id": "435", + "kind": "array", + "name": "ArrayErrorAdditionalInfo", + "valueType": { + "$id": "436", + "kind": "model", + "name": "ErrorAdditionalInfo", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorAdditionalInfo", + "usage": "Json,Exception,LroPolling", + "doc": "The resource management error additional info.", + "decorators": [], + "properties": [ + { + "$id": "437", + "kind": "property", + "name": "type", + "serializedName": "type", + "doc": "The additional info type.", + "type": { + "$id": "438", + "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": "439", + "json": { + "$id": "440", + "name": "type" + } + } + }, + { + "$id": "441", + "kind": "property", + "name": "info", + "serializedName": "info", + "doc": "The additional info.", + "type": { + "$id": "442", + "kind": "model", + "name": "ErrorAdditionalInfoInfo", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorAdditionalInfo.info.anonymous", + "usage": "Json,Exception,LroPolling", + "decorators": [], + "properties": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorAdditionalInfo.info", + "serializationOptions": { + "$id": "443", + "json": { + "$id": "444", + "name": "info" + } + } + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorDetail.additionalInfo", + "serializationOptions": { + "$id": "445", + "json": { + "$id": "446", + "name": "additionalInfo" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorResponse.error", + "serializationOptions": { + "$id": "447", + "json": { + "$id": "448", + "name": "error" + } + } + } + ] + }, + { + "$ref": "417" + }, + { + "$ref": "436" + }, + { + "$ref": "442" + }, + { + "$id": "449", + "kind": "model", + "name": "ServiceFabricManagedApplication", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ApplicationResource", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "The application resource.", + "decorators": [], + "baseModel": { + "$id": "450", + "kind": "model", + "name": "ProxyResource", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ProxyResource", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location", + "decorators": [], + "baseModel": { + "$id": "451", + "kind": "model", + "name": "Resource", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.Resource", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Common fields that are returned in the response for all Azure Resource Manager resources", + "decorators": [], + "properties": [ + { + "$id": "452", + "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": "453", + "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": "454", + "json": { + "$id": "455", + "name": "id" + } + } + }, + { + "$id": "456", + "kind": "property", + "name": "name", + "serializedName": "name", + "doc": "The name of the resource", + "type": { + "$id": "457", + "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": "458", + "json": { + "$id": "459", + "name": "name" + } + } + }, + { + "$id": "460", + "kind": "property", + "name": "type", + "serializedName": "type", + "doc": "The type of the resource. E.g. \"Microsoft.Compute/virtualMachines\" or \"Microsoft.Storage/storageAccounts\"", + "type": { + "$id": "461", + "kind": "string", + "name": "armResourceType", + "crossLanguageDefinitionId": "Azure.Core.armResourceType", + "baseType": { + "$id": "462", + "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": "463", + "json": { + "$id": "464", + "name": "type" + } + } + }, + { + "$id": "465", + "kind": "property", + "name": "systemData", + "serializedName": "systemData", + "doc": "Azure Resource Manager metadata containing createdBy and modifiedBy information.", + "type": { + "$id": "466", + "kind": "model", + "name": "SystemData", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.SystemData", + "usage": "Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Metadata pertaining to creation and last modification of the resource.", + "decorators": [], + "properties": [ + { + "$id": "467", + "kind": "property", + "name": "createdBy", + "serializedName": "createdBy", + "doc": "The identity that created the resource.", + "type": { + "$id": "468", + "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": "469", + "json": { + "$id": "470", + "name": "createdBy" + } + } + }, + { + "$id": "471", + "kind": "property", + "name": "createdByType", + "serializedName": "createdByType", + "doc": "The type of identity that created the resource.", + "type": { + "$ref": "24" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.SystemData.createdByType", + "serializationOptions": { + "$id": "472", + "json": { + "$id": "473", + "name": "createdByType" + } + } + }, + { + "$id": "474", + "kind": "property", + "name": "createdAt", + "serializedName": "createdAt", + "doc": "The timestamp of resource creation (UTC).", + "type": { + "$id": "475", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "rfc3339", + "wireType": { + "$id": "476", + "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": "477", + "json": { + "$id": "478", + "name": "createdAt" + } + } + }, + { + "$id": "479", + "kind": "property", + "name": "lastModifiedBy", + "serializedName": "lastModifiedBy", + "doc": "The identity that last modified the resource.", + "type": { + "$id": "480", + "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": "481", + "json": { + "$id": "482", + "name": "lastModifiedBy" + } + } + }, + { + "$id": "483", + "kind": "property", + "name": "lastModifiedByType", + "serializedName": "lastModifiedByType", + "doc": "The type of identity that last modified the resource.", + "type": { + "$ref": "24" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.SystemData.lastModifiedByType", + "serializationOptions": { + "$id": "484", + "json": { + "$id": "485", + "name": "lastModifiedByType" + } + } + }, + { + "$id": "486", + "kind": "property", + "name": "lastModifiedAt", + "serializedName": "lastModifiedAt", + "doc": "The timestamp of resource last modification (UTC)", + "type": { + "$id": "487", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "rfc3339", + "wireType": { + "$id": "488", + "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": "489", + "json": { + "$id": "490", + "name": "lastModifiedAt" + } + } + } + ] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.Resource.systemData", + "serializationOptions": { + "$id": "491", + "json": { + "$id": "492", + "name": "systemData" + } + } + } + ] + }, + "properties": [] + }, + "properties": [ + { + "$id": "493", + "kind": "property", + "name": "properties", + "serializedName": "properties", + "doc": "The application resource properties.", + "type": { + "$id": "494", + "kind": "model", + "name": "ApplicationResourceProperties", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ApplicationResourceProperties", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "The application resource properties.", + "decorators": [], + "properties": [ + { + "$id": "495", + "kind": "property", + "name": "provisioningState", + "serializedName": "provisioningState", + "doc": "The current deployment or provisioning state, which only appears in the response", + "type": { + "$id": "496", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ApplicationResourceProperties.provisioningState", + "serializationOptions": { + "$id": "497", + "json": { + "$id": "498", + "name": "provisioningState" + } + } + }, + { + "$id": "499", + "kind": "property", + "name": "version", + "serializedName": "version", + "doc": "The version of the application type as defined in the application manifest.\nThis name must be the full Arm Resource ID for the referenced application type version.", + "type": { + "$id": "500", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ApplicationResourceProperties.version", + "serializationOptions": { + "$id": "501", + "json": { + "$id": "502", + "name": "version" + } + } + }, + { + "$id": "503", + "kind": "property", + "name": "parameters", + "serializedName": "parameters", + "doc": "List of application parameters with overridden values from their default values specified in the application manifest.", + "type": { + "$id": "504", + "kind": "dict", + "keyType": { + "$id": "505", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "valueType": { + "$id": "506", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ApplicationResourceProperties.parameters", + "serializationOptions": { + "$id": "507", + "json": { + "$id": "508", + "name": "parameters" + } + } + }, + { + "$id": "509", + "kind": "property", + "name": "upgradePolicy", + "serializedName": "upgradePolicy", + "doc": "Describes the policy for a monitored application upgrade.", + "type": { + "$id": "510", + "kind": "model", + "name": "ApplicationUpgradePolicy", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ApplicationUpgradePolicy", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Describes the policy for a monitored application upgrade.", + "decorators": [], + "properties": [ + { + "$id": "511", + "kind": "property", + "name": "applicationHealthPolicy", + "serializedName": "applicationHealthPolicy", + "doc": "Defines a health policy used to evaluate the health of an application or one of its children entities.", + "type": { + "$id": "512", + "kind": "model", + "name": "ApplicationHealthPolicy", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ApplicationHealthPolicy", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Defines a health policy used to evaluate the health of an application or one of its children entities.", + "decorators": [], + "properties": [ + { + "$id": "513", + "kind": "property", + "name": "considerWarningAsError", + "serializedName": "considerWarningAsError", + "doc": "Indicates whether warnings are treated with the same severity as errors.", + "type": { + "$id": "514", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ApplicationHealthPolicy.considerWarningAsError", + "serializationOptions": { + "$id": "515", + "json": { + "$id": "516", + "name": "considerWarningAsError" + } + } + }, + { + "$id": "517", + "kind": "property", + "name": "maxPercentUnhealthyDeployedApplications", + "serializedName": "maxPercentUnhealthyDeployedApplications", + "doc": "The maximum allowed percentage of unhealthy deployed applications. Allowed values are Byte values from zero to 100.\nThe percentage represents the maximum tolerated percentage of deployed applications that can be unhealthy before the application is considered in error.\nThis is calculated by dividing the number of unhealthy deployed applications over the number of nodes where the application is currently deployed on in the cluster.\nThe computation rounds up to tolerate one failure on small numbers of nodes. Default percentage is zero.", + "type": { + "$id": "518", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ApplicationHealthPolicy.maxPercentUnhealthyDeployedApplications", + "serializationOptions": { + "$id": "519", + "json": { + "$id": "520", + "name": "maxPercentUnhealthyDeployedApplications" + } + } + }, + { + "$id": "521", + "kind": "property", + "name": "defaultServiceTypeHealthPolicy", + "serializedName": "defaultServiceTypeHealthPolicy", + "doc": "The health policy used by default to evaluate the health of a service type.", + "type": { + "$id": "522", + "kind": "model", + "name": "ServiceTypeHealthPolicy", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ServiceTypeHealthPolicy", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Represents the health policy used to evaluate the health of services belonging to a service type.", + "decorators": [], + "properties": [ + { + "$id": "523", + "kind": "property", + "name": "maxPercentUnhealthyServices", + "serializedName": "maxPercentUnhealthyServices", + "doc": "The maximum allowed percentage of unhealthy services.\n\nThe percentage represents the maximum tolerated percentage of services that can be unhealthy before the application is considered in error.\nIf the percentage is respected but there is at least one unhealthy service, the health is evaluated as Warning.\nThis is calculated by dividing the number of unhealthy services of the specific service type over the total number of services of the specific service type.\nThe computation rounds up to tolerate one failure on small numbers of services.", + "type": { + "$id": "524", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ServiceTypeHealthPolicy.maxPercentUnhealthyServices", + "serializationOptions": { + "$id": "525", + "json": { + "$id": "526", + "name": "maxPercentUnhealthyServices" + } + } + }, + { + "$id": "527", + "kind": "property", + "name": "maxPercentUnhealthyPartitionsPerService", + "serializedName": "maxPercentUnhealthyPartitionsPerService", + "doc": "The maximum allowed percentage of unhealthy partitions per service.\n\nThe percentage represents the maximum tolerated percentage of partitions that can be unhealthy before the service is considered in error.\nIf the percentage is respected but there is at least one unhealthy partition, the health is evaluated as Warning.\nThe percentage is calculated by dividing the number of unhealthy partitions over the total number of partitions in the service.\nThe computation rounds up to tolerate one failure on small numbers of partitions.", + "type": { + "$id": "528", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ServiceTypeHealthPolicy.maxPercentUnhealthyPartitionsPerService", + "serializationOptions": { + "$id": "529", + "json": { + "$id": "530", + "name": "maxPercentUnhealthyPartitionsPerService" + } + } + }, + { + "$id": "531", + "kind": "property", + "name": "maxPercentUnhealthyReplicasPerPartition", + "serializedName": "maxPercentUnhealthyReplicasPerPartition", + "doc": "The maximum allowed percentage of unhealthy replicas per partition.\n\nThe percentage represents the maximum tolerated percentage of replicas that can be unhealthy before the partition is considered in error.\nIf the percentage is respected but there is at least one unhealthy replica, the health is evaluated as Warning.\nThe percentage is calculated by dividing the number of unhealthy replicas over the total number of replicas in the partition.\nThe computation rounds up to tolerate one failure on small numbers of replicas.", + "type": { + "$id": "532", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ServiceTypeHealthPolicy.maxPercentUnhealthyReplicasPerPartition", + "serializationOptions": { + "$id": "533", + "json": { + "$id": "534", + "name": "maxPercentUnhealthyReplicasPerPartition" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ApplicationHealthPolicy.defaultServiceTypeHealthPolicy", + "serializationOptions": { + "$id": "535", + "json": { + "$id": "536", + "name": "defaultServiceTypeHealthPolicy" + } + } + }, + { + "$id": "537", + "kind": "property", + "name": "serviceTypeHealthPolicyMap", + "serializedName": "serviceTypeHealthPolicyMap", + "doc": "The map with service type health policy per service type name. The map is empty by default.", + "type": { + "$id": "538", + "kind": "dict", + "keyType": { + "$id": "539", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "valueType": { + "$ref": "522" + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ApplicationHealthPolicy.serviceTypeHealthPolicyMap", + "serializationOptions": { + "$id": "540", + "json": { + "$id": "541", + "name": "serviceTypeHealthPolicyMap" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ApplicationUpgradePolicy.applicationHealthPolicy", + "serializationOptions": { + "$id": "542", + "json": { + "$id": "543", + "name": "applicationHealthPolicy" + } + } + }, + { + "$id": "544", + "kind": "property", + "name": "forceRestart", + "serializedName": "forceRestart", + "doc": "If true, then processes are forcefully restarted during upgrade even when the code version has not changed (the upgrade only changes configuration or data).", + "type": { + "$id": "545", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ApplicationUpgradePolicy.forceRestart", + "serializationOptions": { + "$id": "546", + "json": { + "$id": "547", + "name": "forceRestart" + } + } + }, + { + "$id": "548", + "kind": "property", + "name": "rollingUpgradeMonitoringPolicy", + "serializedName": "rollingUpgradeMonitoringPolicy", + "doc": "The policy used for monitoring the application upgrade", + "type": { + "$id": "549", + "kind": "model", + "name": "RollingUpgradeMonitoringPolicy", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.RollingUpgradeMonitoringPolicy", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "The policy used for monitoring the application upgrade", + "decorators": [], + "properties": [ + { + "$id": "550", + "kind": "property", + "name": "failureAction", + "serializedName": "failureAction", + "doc": "The compensating action to perform when a Monitored upgrade encounters monitoring policy or health policy violations. Invalid indicates the failure action is invalid. Rollback specifies that the upgrade will start rolling back automatically. Manual indicates that the upgrade will switch to UnmonitoredManual upgrade mode.", + "type": { + "$ref": "2" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.RollingUpgradeMonitoringPolicy.failureAction", + "serializationOptions": { + "$id": "551", + "json": { + "$id": "552", + "name": "failureAction" + } + } + }, + { + "$id": "553", + "kind": "property", + "name": "healthCheckWaitDuration", + "serializedName": "healthCheckWaitDuration", + "doc": "The amount of time to wait after completing an upgrade domain before applying health policies. It is interpreted as a string representing an ISO 8601 duration with following format \"hh:mm:ss.fff\".", + "type": { + "$id": "554", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.RollingUpgradeMonitoringPolicy.healthCheckWaitDuration", + "serializationOptions": { + "$id": "555", + "json": { + "$id": "556", + "name": "healthCheckWaitDuration" + } + } + }, + { + "$id": "557", + "kind": "property", + "name": "healthCheckStableDuration", + "serializedName": "healthCheckStableDuration", + "doc": "The amount of time that the application or cluster must remain healthy before the upgrade proceeds to the next upgrade domain. It is interpreted as a string representing an ISO 8601 duration with following format \"hh:mm:ss.fff\".", + "type": { + "$id": "558", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.RollingUpgradeMonitoringPolicy.healthCheckStableDuration", + "serializationOptions": { + "$id": "559", + "json": { + "$id": "560", + "name": "healthCheckStableDuration" + } + } + }, + { + "$id": "561", + "kind": "property", + "name": "healthCheckRetryTimeout", + "serializedName": "healthCheckRetryTimeout", + "doc": "The amount of time to retry health evaluation when the application or cluster is unhealthy before FailureAction is executed. It is interpreted as a string representing an ISO 8601 duration with following format \"hh:mm:ss.fff\".", + "type": { + "$id": "562", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.RollingUpgradeMonitoringPolicy.healthCheckRetryTimeout", + "serializationOptions": { + "$id": "563", + "json": { + "$id": "564", + "name": "healthCheckRetryTimeout" + } + } + }, + { + "$id": "565", + "kind": "property", + "name": "upgradeTimeout", + "serializedName": "upgradeTimeout", + "doc": "The amount of time the overall upgrade has to complete before FailureAction is executed. Cannot be larger than 12 hours. It is interpreted as a string representing an ISO 8601 duration with following format \"hh:mm:ss.fff\".", + "type": { + "$id": "566", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.RollingUpgradeMonitoringPolicy.upgradeTimeout", + "serializationOptions": { + "$id": "567", + "json": { + "$id": "568", + "name": "upgradeTimeout" + } + } + }, + { + "$id": "569", + "kind": "property", + "name": "upgradeDomainTimeout", + "serializedName": "upgradeDomainTimeout", + "doc": "The amount of time each upgrade domain has to complete before FailureAction is executed. Cannot be larger than 12 hours. It is interpreted as a string representing an ISO 8601 duration with following format \"hh:mm:ss.fff\".", + "type": { + "$id": "570", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.RollingUpgradeMonitoringPolicy.upgradeDomainTimeout", + "serializationOptions": { + "$id": "571", + "json": { + "$id": "572", + "name": "upgradeDomainTimeout" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ApplicationUpgradePolicy.rollingUpgradeMonitoringPolicy", + "serializationOptions": { + "$id": "573", + "json": { + "$id": "574", + "name": "rollingUpgradeMonitoringPolicy" + } + } + }, + { + "$id": "575", + "kind": "property", + "name": "InstanceCloseDelayDurationInSeconds", + "serializedName": "instanceCloseDelayDuration", + "doc": "Duration in seconds, to wait before a stateless instance is closed, to allow the active requests to drain gracefully. This would be effective when the instance is closing during the application/cluster upgrade, only for those instances which have a non-zero delay duration configured in the service description.", + "type": { + "$id": "576", + "kind": "int64", + "name": "int64", + "crossLanguageDefinitionId": "TypeSpec.int64", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ApplicationUpgradePolicy.instanceCloseDelayDuration", + "serializationOptions": { + "$id": "577", + "json": { + "$id": "578", + "name": "instanceCloseDelayDuration" + } + } + }, + { + "$id": "579", + "kind": "property", + "name": "upgradeMode", + "serializedName": "upgradeMode", + "doc": "The mode used to monitor health during a rolling upgrade. The values are Monitored, and UnmonitoredAuto.", + "type": { + "$ref": "8" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ApplicationUpgradePolicy.upgradeMode", + "serializationOptions": { + "$id": "580", + "json": { + "$id": "581", + "name": "upgradeMode" + } + } + }, + { + "$id": "582", + "kind": "property", + "name": "upgradeReplicaSetCheckTimeout", + "serializedName": "upgradeReplicaSetCheckTimeout", + "doc": "The maximum amount of time to block processing of an upgrade domain and prevent loss of availability when there are unexpected issues. When this timeout expires, processing of the upgrade domain will proceed regardless of availability loss issues. The timeout is reset at the start of each upgrade domain. Valid values are between 0 and 42949672925 inclusive. (unsigned 32-bit integer). Unit is in seconds.", + "type": { + "$id": "583", + "kind": "int64", + "name": "int64", + "crossLanguageDefinitionId": "TypeSpec.int64", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ApplicationUpgradePolicy.upgradeReplicaSetCheckTimeout", + "serializationOptions": { + "$id": "584", + "json": { + "$id": "585", + "name": "upgradeReplicaSetCheckTimeout" + } + } + }, + { + "$id": "586", + "kind": "property", + "name": "recreateApplication", + "serializedName": "recreateApplication", + "doc": "Determines whether the application should be recreated on update. If value=true, the rest of the upgrade policy parameters are not allowed.", + "type": { + "$id": "587", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ApplicationUpgradePolicy.recreateApplication", + "serializationOptions": { + "$id": "588", + "json": { + "$id": "589", + "name": "recreateApplication" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ApplicationResourceProperties.upgradePolicy", + "serializationOptions": { + "$id": "590", + "json": { + "$id": "591", + "name": "upgradePolicy" + } + } + }, + { + "$id": "592", + "kind": "property", + "name": "managedIdentities", + "serializedName": "managedIdentities", + "doc": "List of user assigned identities for the application, each mapped to a friendly name.", + "type": { + "$id": "593", + "kind": "array", + "name": "ArrayApplicationUserAssignedIdentity", + "valueType": { + "$id": "594", + "kind": "model", + "name": "ApplicationUserAssignedIdentityInfo", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ApplicationUserAssignedIdentity", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "User assigned identity for the application.", + "decorators": [], + "properties": [ + { + "$id": "595", + "kind": "property", + "name": "name", + "serializedName": "name", + "doc": "The friendly name of user assigned identity.", + "type": { + "$id": "596", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ApplicationUserAssignedIdentity.name", + "serializationOptions": { + "$id": "597", + "json": { + "$id": "598", + "name": "name" + } + } + }, + { + "$id": "599", + "kind": "property", + "name": "principalId", + "serializedName": "principalId", + "doc": "The principal id of user assigned identity.", + "type": { + "$id": "600", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ApplicationUserAssignedIdentity.principalId", + "serializationOptions": { + "$id": "601", + "json": { + "$id": "602", + "name": "principalId" + } + } + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ApplicationResourceProperties.managedIdentities", + "serializationOptions": { + "$id": "603", + "json": { + "$id": "604", + "name": "managedIdentities" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": true, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ApplicationResource.properties", + "serializationOptions": { + "$id": "605", + "json": { + "$id": "606", + "name": "properties" + } + } + }, + { + "$id": "607", + "kind": "path", + "name": "name", + "serializedName": "name", + "doc": "The name of the application resource.", + "type": { + "$id": "608", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": true, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ApplicationResource.name", + "discriminator": false, + "flatten": false + }, + { + "$id": "609", + "kind": "property", + "name": "tags", + "serializedName": "tags", + "doc": "Resource tags.", + "type": { + "$id": "610", + "kind": "dict", + "keyType": { + "$id": "611", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "valueType": { + "$id": "612", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ApplicationResource.tags", + "serializationOptions": { + "$id": "613", + "json": { + "$id": "614", + "name": "tags" + } + } + }, + { + "$id": "615", + "kind": "property", + "name": "identity", + "serializedName": "identity", + "doc": "Describes the managed identities for an Azure resource.", + "type": { + "$id": "616", + "kind": "model", + "name": "ManagedIdentity", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedIdentity", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Describes the managed identities for an Azure resource.", + "decorators": [], + "properties": [ + { + "$id": "617", + "kind": "property", + "name": "principalId", + "serializedName": "principalId", + "doc": "The principal id of the managed identity. This property will only be provided for a system assigned identity.", + "type": { + "$id": "618", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedIdentity.principalId", + "serializationOptions": { + "$id": "619", + "json": { + "$id": "620", + "name": "principalId" + } + } + }, + { + "$id": "621", + "kind": "property", + "name": "tenantId", + "serializedName": "tenantId", + "doc": "The tenant id of the managed identity. This property will only be provided for a system assigned identity.", + "type": { + "$id": "622", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedIdentity.tenantId", + "serializationOptions": { + "$id": "623", + "json": { + "$id": "624", + "name": "tenantId" + } + } + }, + { + "$id": "625", + "kind": "property", + "name": "type", + "serializedName": "type", + "doc": "The type of managed identity for the resource.", + "type": { + "$ref": "14" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedIdentity.type", + "serializationOptions": { + "$id": "626", + "json": { + "$id": "627", + "name": "type" + } + } + }, + { + "$id": "628", + "kind": "property", + "name": "userAssignedIdentities", + "serializedName": "userAssignedIdentities", + "doc": "The list of user identities associated with the resource. The user identity dictionary key references will be ARM resource ids in the form:\n'/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'.", + "type": { + "$id": "629", + "kind": "dict", + "keyType": { + "$id": "630", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "valueType": { + "$id": "631", + "kind": "model", + "name": "UserAssignedIdentity", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.UserAssignedIdentity", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "User assigned identity.", + "decorators": [], + "properties": [ + { + "$id": "632", + "kind": "property", + "name": "principalId", + "serializedName": "principalId", + "doc": "The principal id of user assigned identity.", + "type": { + "$id": "633", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.UserAssignedIdentity.principalId", + "serializationOptions": { + "$id": "634", + "json": { + "$id": "635", + "name": "principalId" + } + } + }, + { + "$id": "636", + "kind": "property", + "name": "clientId", + "serializedName": "clientId", + "doc": "The client id of user assigned identity.", + "type": { + "$id": "637", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.UserAssignedIdentity.clientId", + "serializationOptions": { + "$id": "638", + "json": { + "$id": "639", + "name": "clientId" + } + } + } + ] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedIdentity.userAssignedIdentities", + "serializationOptions": { + "$id": "640", + "json": { + "$id": "641", + "name": "userAssignedIdentities" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ApplicationResource.identity", + "serializationOptions": { + "$id": "642", + "json": { + "$id": "643", + "name": "identity" + } + } + }, + { + "$id": "644", + "kind": "property", + "name": "location", + "serializedName": "location", + "doc": "The geo-location where the resource lives", + "type": { + "$id": "645", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ApplicationResource.location", + "serializationOptions": { + "$id": "646", + "json": { + "$id": "647", + "name": "location" + } + } + } + ] + }, + { + "$ref": "494" + }, + { + "$ref": "510" + }, + { + "$ref": "512" + }, + { + "$ref": "522" + }, + { + "$ref": "549" + }, + { + "$ref": "594" + }, + { + "$ref": "616" + }, + { + "$ref": "631" + }, + { + "$ref": "450" + }, + { + "$ref": "451" + }, + { + "$ref": "466" + }, + { + "$id": "648", + "kind": "model", + "name": "ArmOperationStatusResourceProvisioningState", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Azure.ResourceManager.ArmOperationStatus", + "usage": "LroPolling", + "doc": "Standard Azure Resource Manager operation status response", + "decorators": [], + "properties": [ + { + "$id": "649", + "kind": "property", + "name": "status", + "serializedName": "status", + "doc": "The operation status", + "type": { + "$ref": "34" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.ArmOperationStatus.status", + "serializationOptions": { + "$id": "650", + "json": { + "$id": "651", + "name": "status" + } + } + }, + { + "$id": "652", + "kind": "path", + "name": "id", + "serializedName": "id", + "doc": "The unique identifier for the operationStatus resource", + "type": { + "$id": "653", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.ArmOperationStatus.id", + "discriminator": false, + "flatten": false + }, + { + "$id": "654", + "kind": "property", + "name": "name", + "serializedName": "name", + "doc": "The name of the operationStatus resource", + "type": { + "$id": "655", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.ArmOperationStatus.name", + "serializationOptions": { + "$id": "656", + "json": { + "$id": "657", + "name": "name" + } + } + }, + { + "$id": "658", + "kind": "property", + "name": "startTime", + "serializedName": "startTime", + "doc": "Operation start time", + "type": { + "$id": "659", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "rfc3339", + "wireType": { + "$id": "660", + "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": "661", + "json": { + "$id": "662", + "name": "startTime" + } + } + }, + { + "$id": "663", + "kind": "property", + "name": "endTime", + "serializedName": "endTime", + "doc": "Operation complete time", + "type": { + "$id": "664", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "rfc3339", + "wireType": { + "$id": "665", + "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": "666", + "json": { + "$id": "667", + "name": "endTime" + } + } + }, + { + "$id": "668", + "kind": "property", + "name": "percentComplete", + "serializedName": "percentComplete", + "doc": "The progress made toward completing the operation", + "type": { + "$id": "669", + "kind": "float64", + "name": "float64", + "crossLanguageDefinitionId": "TypeSpec.float64", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.ArmOperationStatus.percentComplete", + "serializationOptions": { + "$id": "670", + "json": { + "$id": "671", + "name": "percentComplete" + } + } + }, + { + "$id": "672", + "kind": "property", + "name": "error", + "serializedName": "error", + "doc": "Errors that occurred if the operation ended with Canceled or Failed status", + "type": { + "$ref": "417" + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.ArmOperationStatus.error", + "serializationOptions": { + "$id": "673", + "json": { + "$id": "674", + "name": "error" + } + } + } + ] + }, + { + "$id": "675", + "kind": "model", + "name": "ApplicationUpdateParameters", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ApplicationUpdateParameters", + "usage": "Input,Json", + "doc": "Application update request.", + "decorators": [], + "properties": [ + { + "$id": "676", + "kind": "property", + "name": "tags", + "serializedName": "tags", + "doc": "Application update parameters", + "type": { + "$id": "677", + "kind": "dict", + "keyType": { + "$id": "678", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "valueType": { + "$id": "679", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ApplicationUpdateParameters.tags", + "serializationOptions": { + "$id": "680", + "json": { + "$id": "681", + "name": "tags" + } + } + } + ] + }, + { + "$id": "682", + "kind": "model", + "name": "ApplicationResourceList", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ApplicationResourceList", + "usage": "Output,Json", + "doc": "The list of application resources.", + "decorators": [], + "properties": [ + { + "$id": "683", + "kind": "property", + "name": "value", + "serializedName": "value", + "doc": "The ApplicationResource items on this page", + "type": { + "$id": "684", + "kind": "array", + "name": "ArrayApplicationResource", + "valueType": { + "$ref": "449" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ApplicationResourceList.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": "Microsoft.ServiceFabric.ApplicationResourceList.nextLink", + "serializationOptions": { + "$id": "690", + "json": { + "$id": "691", + "name": "nextLink" + } + } + } + ] + }, + { + "$id": "692", + "kind": "model", + "name": "RuntimeResumeApplicationUpgradeParameters", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.RuntimeResumeApplicationUpgradeParameters", + "usage": "Input,Json", + "doc": "Parameters for Resume Upgrade action. The upgrade domain name must be specified.", + "decorators": [], + "properties": [ + { + "$id": "693", + "kind": "property", + "name": "upgradeDomainName", + "serializedName": "upgradeDomainName", + "doc": "The upgrade domain name. Expected to be the next upgrade domain if the application is upgrading.", + "type": { + "$id": "694", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.RuntimeResumeApplicationUpgradeParameters.upgradeDomainName", + "serializationOptions": { + "$id": "695", + "json": { + "$id": "696", + "name": "upgradeDomainName" + } + } + } + ] + }, + { + "$id": "697", + "kind": "model", + "name": "ServiceFabricManagedApplicationType", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ApplicationTypeResource", + "usage": "Input,Output,Json", + "doc": "The application type name resource", + "decorators": [], + "baseModel": { + "$ref": "450" + }, + "properties": [ + { + "$id": "698", + "kind": "property", + "name": "properties", + "serializedName": "properties", + "doc": "The application type name properties", + "type": { + "$id": "699", + "kind": "model", + "name": "ApplicationTypeResourceProperties", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ApplicationTypeResourceProperties", + "usage": "Input,Output,Json", + "doc": "The application type name properties", + "decorators": [], + "properties": [ + { + "$id": "700", + "kind": "property", + "name": "provisioningState", + "serializedName": "provisioningState", + "doc": "The current deployment or provisioning state, which only appears in the response.", + "type": { + "$id": "701", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ApplicationTypeResourceProperties.provisioningState", + "serializationOptions": { + "$id": "702", + "json": { + "$id": "703", + "name": "provisioningState" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": true, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ApplicationTypeResource.properties", + "serializationOptions": { + "$id": "704", + "json": { + "$id": "705", + "name": "properties" + } + } + }, + { + "$id": "706", + "kind": "path", + "name": "name", + "serializedName": "name", + "doc": "The name of the application type name resource.", + "type": { + "$id": "707", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": true, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ApplicationTypeResource.name", + "discriminator": false, + "flatten": false + }, + { + "$id": "708", + "kind": "property", + "name": "tags", + "serializedName": "tags", + "doc": "Resource tags.", + "type": { + "$id": "709", + "kind": "dict", + "keyType": { + "$id": "710", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "valueType": { + "$id": "711", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ApplicationTypeResource.tags", + "serializationOptions": { + "$id": "712", + "json": { + "$id": "713", + "name": "tags" + } + } + }, + { + "$id": "714", + "kind": "property", + "name": "location", + "serializedName": "location", + "doc": "The geo-location where the resource lives", + "type": { + "$id": "715", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ApplicationTypeResource.location", + "serializationOptions": { + "$id": "716", + "json": { + "$id": "717", + "name": "location" + } + } + } + ] + }, + { + "$ref": "699" + }, + { + "$id": "718", + "kind": "model", + "name": "ApplicationTypeUpdateParameters", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ApplicationTypeUpdateParameters", + "usage": "Input,Json", + "doc": "Application type update request", + "decorators": [], + "properties": [ + { + "$id": "719", + "kind": "property", + "name": "tags", + "serializedName": "tags", + "doc": "Application type update parameters", + "type": { + "$id": "720", + "kind": "dict", + "keyType": { + "$id": "721", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "valueType": { + "$id": "722", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ApplicationTypeUpdateParameters.tags", + "serializationOptions": { + "$id": "723", + "json": { + "$id": "724", + "name": "tags" + } + } + } + ] + }, + { + "$id": "725", + "kind": "model", + "name": "ApplicationTypeResourceList", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ApplicationTypeResourceList", + "usage": "Output,Json", + "doc": "The list of application type names.", + "decorators": [], + "properties": [ + { + "$id": "726", + "kind": "property", + "name": "value", + "serializedName": "value", + "doc": "The ApplicationTypeResource items on this page", + "type": { + "$id": "727", + "kind": "array", + "name": "ArrayApplicationTypeResource", + "valueType": { + "$ref": "697" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ApplicationTypeResourceList.value", + "serializationOptions": { + "$id": "728", + "json": { + "$id": "729", + "name": "value" + } + } + }, + { + "$id": "730", + "kind": "property", + "name": "nextLink", + "serializedName": "nextLink", + "doc": "The link to the next page of items", + "type": { + "$id": "731", + "kind": "url", + "name": "ResourceLocation", + "crossLanguageDefinitionId": "TypeSpec.Rest.ResourceLocation", + "baseType": { + "$id": "732", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ApplicationTypeResourceList.nextLink", + "serializationOptions": { + "$id": "733", + "json": { + "$id": "734", + "name": "nextLink" + } + } + } + ] + }, + { + "$id": "735", + "kind": "model", + "name": "ServiceFabricManagedApplicationTypeVersion", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ApplicationTypeVersionResource", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "An application type version resource for the specified application type name resource.", + "decorators": [], + "baseModel": { + "$ref": "450" + }, + "properties": [ + { + "$id": "736", + "kind": "property", + "name": "properties", + "serializedName": "properties", + "doc": "The properties of the application type version resource.", + "type": { + "$id": "737", + "kind": "model", + "name": "ApplicationTypeVersionResourceProperties", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ApplicationTypeVersionResourceProperties", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "The properties of the application type version resource.", + "decorators": [], + "properties": [ + { + "$id": "738", + "kind": "property", + "name": "provisioningState", + "serializedName": "provisioningState", + "doc": "The current deployment or provisioning state, which only appears in the response", + "type": { + "$id": "739", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ApplicationTypeVersionResourceProperties.provisioningState", + "serializationOptions": { + "$id": "740", + "json": { + "$id": "741", + "name": "provisioningState" + } + } + }, + { + "$id": "742", + "kind": "property", + "name": "appPackageUrl", + "serializedName": "appPackageUrl", + "doc": "The URL to the application package", + "type": { + "$id": "743", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ApplicationTypeVersionResourceProperties.appPackageUrl", + "serializationOptions": { + "$id": "744", + "json": { + "$id": "745", + "name": "appPackageUrl" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": true, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ApplicationTypeVersionResource.properties", + "serializationOptions": { + "$id": "746", + "json": { + "$id": "747", + "name": "properties" + } + } + }, + { + "$id": "748", + "kind": "path", + "name": "name", + "serializedName": "name", + "doc": "The application type version.", + "type": { + "$id": "749", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": true, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ApplicationTypeVersionResource.name", + "discriminator": false, + "flatten": false + }, + { + "$id": "750", + "kind": "property", + "name": "tags", + "serializedName": "tags", + "doc": "Resource tags.", + "type": { + "$id": "751", + "kind": "dict", + "keyType": { + "$id": "752", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "valueType": { + "$id": "753", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ApplicationTypeVersionResource.tags", + "serializationOptions": { + "$id": "754", + "json": { + "$id": "755", + "name": "tags" + } + } + }, + { + "$id": "756", + "kind": "property", + "name": "location", + "serializedName": "location", + "doc": "The geo-location where the resource lives", + "type": { + "$id": "757", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ApplicationTypeVersionResource.location", + "serializationOptions": { + "$id": "758", + "json": { + "$id": "759", + "name": "location" + } + } + } + ] + }, + { + "$ref": "737" + }, + { + "$id": "760", + "kind": "model", + "name": "ApplicationTypeVersionUpdateParameters", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ApplicationTypeVersionUpdateParameters", + "usage": "Input,Json", + "doc": "Application type version update request", + "decorators": [], + "properties": [ + { + "$id": "761", + "kind": "property", + "name": "tags", + "serializedName": "tags", + "doc": "Application type version update parameters", + "type": { + "$id": "762", + "kind": "dict", + "keyType": { + "$id": "763", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "valueType": { + "$id": "764", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ApplicationTypeVersionUpdateParameters.tags", + "serializationOptions": { + "$id": "765", + "json": { + "$id": "766", + "name": "tags" + } + } + } + ] + }, + { + "$id": "767", + "kind": "model", + "name": "ApplicationTypeVersionResourceList", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ApplicationTypeVersionResourceList", + "usage": "Output,Json", + "doc": "The list of application type version resources for the specified application type name resource.", + "decorators": [], + "properties": [ + { + "$id": "768", + "kind": "property", + "name": "value", + "serializedName": "value", + "doc": "The ApplicationTypeVersionResource items on this page", + "type": { + "$id": "769", + "kind": "array", + "name": "ArrayApplicationTypeVersionResource", + "valueType": { + "$ref": "735" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ApplicationTypeVersionResourceList.value", + "serializationOptions": { + "$id": "770", + "json": { + "$id": "771", + "name": "value" + } + } + }, + { + "$id": "772", + "kind": "property", + "name": "nextLink", + "serializedName": "nextLink", + "doc": "The link to the next page of items", + "type": { + "$id": "773", + "kind": "url", + "name": "ResourceLocation", + "crossLanguageDefinitionId": "TypeSpec.Rest.ResourceLocation", + "baseType": { + "$id": "774", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ApplicationTypeVersionResourceList.nextLink", + "serializationOptions": { + "$id": "775", + "json": { + "$id": "776", + "name": "nextLink" + } + } + } + ] + }, + { + "$id": "777", + "kind": "model", + "name": "ServiceFabricManagedService", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ServiceResource", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "The service resource.", + "decorators": [], + "baseModel": { + "$ref": "450" + }, + "properties": [ + { + "$id": "778", + "kind": "property", + "name": "properties", + "serializedName": "properties", + "doc": "The service resource properties.", + "type": { + "$id": "779", + "kind": "model", + "name": "ManagedServiceProperties", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ServiceResourceProperties", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "The service resource properties.", + "decorators": [], + "discriminatorProperty": { + "$id": "780", + "kind": "property", + "name": "serviceKind", + "serializedName": "serviceKind", + "doc": "The kind of service (Stateless or Stateful).", + "type": { + "$ref": "42" + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ServiceResourceProperties.serviceKind", + "serializationOptions": { + "$id": "781", + "json": { + "$id": "782", + "name": "serviceKind" + } + } + }, + "baseModel": { + "$id": "783", + "kind": "model", + "name": "ManagedServiceBaseProperties", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ServiceResourcePropertiesBase", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "The common service resource properties.", + "decorators": [], + "properties": [ + { + "$id": "784", + "kind": "property", + "name": "placementConstraints", + "serializedName": "placementConstraints", + "doc": "The placement constraints as a string. Placement constraints are boolean expressions on node properties and allow for restricting a service to particular nodes based on the service requirements. For example, to place a service on nodes where NodeType is blue specify the following: \"NodeColor == blue)\".", + "type": { + "$id": "785", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ServiceResourcePropertiesBase.placementConstraints", + "serializationOptions": { + "$id": "786", + "json": { + "$id": "787", + "name": "placementConstraints" + } + } + }, + { + "$id": "788", + "kind": "property", + "name": "correlationScheme", + "serializedName": "correlationScheme", + "doc": "A list that describes the correlation of the service with other services.", + "type": { + "$id": "789", + "kind": "array", + "name": "ArrayServiceCorrelation", + "valueType": { + "$id": "790", + "kind": "model", + "name": "ManagedServiceCorrelation", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ServiceCorrelation", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Creates a particular correlation between services.", + "decorators": [], + "properties": [ + { + "$id": "791", + "kind": "property", + "name": "scheme", + "serializedName": "scheme", + "doc": "The ServiceCorrelationScheme which describes the relationship between this service and the service specified via ServiceName.", + "type": { + "$ref": "62" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ServiceCorrelation.scheme", + "serializationOptions": { + "$id": "792", + "json": { + "$id": "793", + "name": "scheme" + } + } + }, + { + "$id": "794", + "kind": "property", + "name": "serviceName", + "serializedName": "serviceName", + "doc": "The Arm Resource ID of the service that the correlation relationship is established with.", + "type": { + "$id": "795", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ServiceCorrelation.serviceName", + "serializationOptions": { + "$id": "796", + "json": { + "$id": "797", + "name": "serviceName" + } + } + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ServiceResourcePropertiesBase.correlationScheme", + "serializationOptions": { + "$id": "798", + "json": { + "$id": "799", + "name": "correlationScheme" + } + } + }, + { + "$id": "800", + "kind": "property", + "name": "serviceLoadMetrics", + "serializedName": "serviceLoadMetrics", + "doc": "The service load metrics is given as an array of ServiceLoadMetric objects.", + "type": { + "$id": "801", + "kind": "array", + "name": "ArrayServiceLoadMetric", + "valueType": { + "$id": "802", + "kind": "model", + "name": "ManagedServiceLoadMetric", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ServiceLoadMetric", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Specifies a metric to load balance a service during runtime.", + "decorators": [], + "properties": [ + { + "$id": "803", + "kind": "property", + "name": "name", + "serializedName": "name", + "doc": "The name of the metric. If the service chooses to report load during runtime, the load metric name should match the name that is specified in Name exactly. Note that metric names are case sensitive.", + "type": { + "$id": "804", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ServiceLoadMetric.name", + "serializationOptions": { + "$id": "805", + "json": { + "$id": "806", + "name": "name" + } + } + }, + { + "$id": "807", + "kind": "property", + "name": "weight", + "serializedName": "weight", + "doc": "The service load metric relative weight, compared to other metrics configured for this service, as a number.", + "type": { + "$ref": "68" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ServiceLoadMetric.weight", + "serializationOptions": { + "$id": "808", + "json": { + "$id": "809", + "name": "weight" + } + } + }, + { + "$id": "810", + "kind": "property", + "name": "primaryDefaultLoad", + "serializedName": "primaryDefaultLoad", + "doc": "Used only for Stateful services. The default amount of load, as a number, that this service creates for this metric when it is a Primary replica.", + "type": { + "$id": "811", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ServiceLoadMetric.primaryDefaultLoad", + "serializationOptions": { + "$id": "812", + "json": { + "$id": "813", + "name": "primaryDefaultLoad" + } + } + }, + { + "$id": "814", + "kind": "property", + "name": "secondaryDefaultLoad", + "serializedName": "secondaryDefaultLoad", + "doc": "Used only for Stateful services. The default amount of load, as a number, that this service creates for this metric when it is a Secondary replica.", + "type": { + "$id": "815", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ServiceLoadMetric.secondaryDefaultLoad", + "serializationOptions": { + "$id": "816", + "json": { + "$id": "817", + "name": "secondaryDefaultLoad" + } + } + }, + { + "$id": "818", + "kind": "property", + "name": "defaultLoad", + "serializedName": "defaultLoad", + "doc": "Used only for Stateless services. The default amount of load, as a number, that this service creates for this metric.", + "type": { + "$id": "819", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ServiceLoadMetric.defaultLoad", + "serializationOptions": { + "$id": "820", + "json": { + "$id": "821", + "name": "defaultLoad" + } + } + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ServiceResourcePropertiesBase.serviceLoadMetrics", + "serializationOptions": { + "$id": "822", + "json": { + "$id": "823", + "name": "serviceLoadMetrics" + } + } + }, + { + "$id": "824", + "kind": "property", + "name": "servicePlacementPolicies", + "serializedName": "servicePlacementPolicies", + "doc": "A list that describes the correlation of the service with other services.", + "type": { + "$id": "825", + "kind": "array", + "name": "ArrayServicePlacementPolicy", + "valueType": { + "$id": "826", + "kind": "model", + "name": "ManagedServicePlacementPolicy", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ServicePlacementPolicy", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Describes the policy to be used for placement of a Service Fabric service.", + "decorators": [], + "discriminatorProperty": { + "$id": "827", + "kind": "property", + "name": "type", + "serializedName": "type", + "type": { + "$ref": "78" + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ServicePlacementPolicy.type", + "serializationOptions": { + "$id": "828", + "json": { + "$id": "829", + "name": "type" + } + } + }, + "properties": [ + { + "$ref": "827" + } + ], + "discriminatedSubtypes": { + "$id": "830", + "InvalidDomain": { + "$id": "831", + "kind": "model", + "name": "ServicePlacementInvalidDomainPolicy", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ServicePlacementInvalidDomainPolicy", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Describes the policy to be used for placement of a Service Fabric service where a particular fault or upgrade domain should not be used for placement of the instances or replicas of that service.", + "discriminatorValue": "InvalidDomain", + "decorators": [], + "baseModel": { + "$ref": "826" + }, + "properties": [ + { + "$id": "832", + "kind": "property", + "name": "domainName", + "serializedName": "domainName", + "doc": "The name of the domain that should not be used for placement.", + "type": { + "$id": "833", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ServicePlacementInvalidDomainPolicy.domainName", + "serializationOptions": { + "$id": "834", + "json": { + "$id": "835", + "name": "domainName" + } + } + }, + { + "$id": "836", + "kind": "property", + "name": "type", + "serializedName": "type", + "doc": "The type of placement policy for a service fabric service. Following are the possible values.", + "type": { + "$id": "837", + "kind": "constant", + "valueType": { + "$id": "838", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "InvalidDomain", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ServicePlacementInvalidDomainPolicy.type", + "serializationOptions": { + "$id": "839", + "json": { + "$id": "840", + "name": "type" + } + } + } + ] + }, + "RequiredDomain": { + "$id": "841", + "kind": "model", + "name": "ServicePlacementRequiredDomainPolicy", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ServicePlacementRequiredDomainPolicy", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Describes the policy to be used for placement of a Service Fabric service where the instances or replicas of that service must be placed in a particular domain.", + "discriminatorValue": "RequiredDomain", + "decorators": [], + "baseModel": { + "$ref": "826" + }, + "properties": [ + { + "$id": "842", + "kind": "property", + "name": "domainName", + "serializedName": "domainName", + "doc": "The name of the domain that should used for placement as per this policy.", + "type": { + "$id": "843", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ServicePlacementRequiredDomainPolicy.domainName", + "serializationOptions": { + "$id": "844", + "json": { + "$id": "845", + "name": "domainName" + } + } + }, + { + "$id": "846", + "kind": "property", + "name": "type", + "serializedName": "type", + "doc": "The type of placement policy for a service fabric service. Following are the possible values.", + "type": { + "$id": "847", + "kind": "constant", + "valueType": { + "$id": "848", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "RequiredDomain", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ServicePlacementRequiredDomainPolicy.type", + "serializationOptions": { + "$id": "849", + "json": { + "$id": "850", + "name": "type" + } + } + } + ] + }, + "PreferredPrimaryDomain": { + "$id": "851", + "kind": "model", + "name": "ServicePlacementPreferPrimaryDomainPolicy", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ServicePlacementPreferPrimaryDomainPolicy", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Describes the policy to be used for placement of a Service Fabric service where the service's\nPrimary replicas should optimally be placed in a particular domain.\n\nThis placement policy is usually used with fault domains in scenarios where the Service Fabric\ncluster is geographically distributed in order to indicate that a service's primary replica should\nbe located in a particular fault domain, which in geo-distributed scenarios usually aligns with regional\nor datacenter boundaries. Note that since this is an optimization it is possible that the Primary replica\nmay not end up located in this domain due to failures, capacity limits, or other constraints.", + "discriminatorValue": "PreferredPrimaryDomain", + "decorators": [], + "baseModel": { + "$ref": "826" + }, + "properties": [ + { + "$id": "852", + "kind": "property", + "name": "domainName", + "serializedName": "domainName", + "doc": "The name of the domain that should used for placement as per this policy.", + "type": { + "$id": "853", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ServicePlacementPreferPrimaryDomainPolicy.domainName", + "serializationOptions": { + "$id": "854", + "json": { + "$id": "855", + "name": "domainName" + } + } + }, + { + "$id": "856", + "kind": "property", + "name": "type", + "serializedName": "type", + "doc": "The type of placement policy for a service fabric service. Following are the possible values.", + "type": { + "$id": "857", + "kind": "constant", + "valueType": { + "$id": "858", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "PreferredPrimaryDomain", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ServicePlacementPreferPrimaryDomainPolicy.type", + "serializationOptions": { + "$id": "859", + "json": { + "$id": "860", + "name": "type" + } + } + } + ] + }, + "RequiredDomainDistribution": { + "$id": "861", + "kind": "model", + "name": "ServicePlacementRequireDomainDistributionPolicy", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ServicePlacementRequireDomainDistributionPolicy", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Describes the policy to be used for placement of a Service Fabric service where two replicas\nfrom the same partition should never be placed in the same fault or upgrade domain.\n\nWhile this is not common it can expose the service to an increased risk of concurrent failures\ndue to unplanned outages or other cases of subsequent/concurrent failures. As an example, consider\na case where replicas are deployed across different data center, with one replica per location.\nIn the event that one of the datacenters goes offline, normally the replica that was placed in that\ndatacenter will be packed into one of the remaining datacenters. If this is not desirable then this\npolicy should be set.", + "discriminatorValue": "RequiredDomainDistribution", + "decorators": [], + "baseModel": { + "$ref": "826" + }, + "properties": [ + { + "$id": "862", + "kind": "property", + "name": "domainName", + "serializedName": "domainName", + "doc": "The name of the domain that should used for placement as per this policy.", + "type": { + "$id": "863", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ServicePlacementRequireDomainDistributionPolicy.domainName", + "serializationOptions": { + "$id": "864", + "json": { + "$id": "865", + "name": "domainName" + } + } + }, + { + "$id": "866", + "kind": "property", + "name": "type", + "serializedName": "type", + "doc": "The type of placement policy for a service fabric service. Following are the possible values.", + "type": { + "$id": "867", + "kind": "constant", + "valueType": { + "$id": "868", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "RequiredDomainDistribution", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ServicePlacementRequireDomainDistributionPolicy.type", + "serializationOptions": { + "$id": "869", + "json": { + "$id": "870", + "name": "type" + } + } + } + ] + }, + "NonPartiallyPlaceService": { + "$id": "871", + "kind": "model", + "name": "ServicePlacementNonPartiallyPlaceServicePolicy", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ServicePlacementNonPartiallyPlaceServicePolicy", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "The type of placement policy for a service fabric service. Following are the possible values.", + "discriminatorValue": "NonPartiallyPlaceService", + "decorators": [], + "baseModel": { + "$ref": "826" + }, + "properties": [ + { + "$id": "872", + "kind": "property", + "name": "type", + "serializedName": "type", + "type": { + "$id": "873", + "kind": "constant", + "valueType": { + "$id": "874", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "NonPartiallyPlaceService", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ServicePlacementNonPartiallyPlaceServicePolicy.type", + "serializationOptions": { + "$id": "875", + "json": { + "$id": "876", + "name": "type" + } + } + } + ] + } + } + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ServiceResourcePropertiesBase.servicePlacementPolicies", + "serializationOptions": { + "$id": "877", + "json": { + "$id": "878", + "name": "servicePlacementPolicies" + } + } + }, + { + "$id": "879", + "kind": "property", + "name": "defaultMoveCost", + "serializedName": "defaultMoveCost", + "doc": "Specifies the move cost for the service.", + "type": { + "$ref": "90" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ServiceResourcePropertiesBase.defaultMoveCost", + "serializationOptions": { + "$id": "880", + "json": { + "$id": "881", + "name": "defaultMoveCost" + } + } + }, + { + "$id": "882", + "kind": "property", + "name": "scalingPolicies", + "serializedName": "scalingPolicies", + "doc": "Scaling policies for this service.", + "type": { + "$id": "883", + "kind": "array", + "name": "ArrayScalingPolicy", + "valueType": { + "$id": "884", + "kind": "model", + "name": "ManagedServiceScalingPolicy", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ScalingPolicy", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Specifies a metric to load balance a service during runtime.", + "decorators": [], + "properties": [ + { + "$id": "885", + "kind": "property", + "name": "scalingMechanism", + "serializedName": "scalingMechanism", + "doc": "Specifies the mechanism associated with this scaling policy", + "type": { + "$id": "886", + "kind": "model", + "name": "ManagedServiceScalingMechanism", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ScalingMechanism", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Describes the mechanism for performing a scaling operation.", + "decorators": [], + "discriminatorProperty": { + "$id": "887", + "kind": "property", + "name": "kind", + "serializedName": "kind", + "type": { + "$ref": "100" + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ScalingMechanism.kind", + "serializationOptions": { + "$id": "888", + "json": { + "$id": "889", + "name": "kind" + } + } + }, + "properties": [ + { + "$ref": "887" + } + ], + "discriminatedSubtypes": { + "$id": "890", + "AddRemoveIncrementalNamedPartition": { + "$id": "891", + "kind": "model", + "name": "NamedPartitionAddOrRemoveScalingMechanism", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.AddRemoveIncrementalNamedPartitionScalingMechanism", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Represents a scaling mechanism for adding or removing named partitions of a stateless service. Partition names are in the format '0','1'...'N-1'.", + "discriminatorValue": "AddRemoveIncrementalNamedPartition", + "decorators": [], + "baseModel": { + "$ref": "886" + }, + "properties": [ + { + "$id": "892", + "kind": "property", + "name": "minPartitionCount", + "serializedName": "minPartitionCount", + "doc": "Minimum number of named partitions of the service.", + "type": { + "$id": "893", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.AddRemoveIncrementalNamedPartitionScalingMechanism.minPartitionCount", + "serializationOptions": { + "$id": "894", + "json": { + "$id": "895", + "name": "minPartitionCount" + } + } + }, + { + "$id": "896", + "kind": "property", + "name": "maxPartitionCount", + "serializedName": "maxPartitionCount", + "doc": "Maximum number of named partitions of the service.", + "type": { + "$id": "897", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.AddRemoveIncrementalNamedPartitionScalingMechanism.maxPartitionCount", + "serializationOptions": { + "$id": "898", + "json": { + "$id": "899", + "name": "maxPartitionCount" + } + } + }, + { + "$id": "900", + "kind": "property", + "name": "scaleIncrement", + "serializedName": "scaleIncrement", + "doc": "The number of instances to add or remove during a scaling operation.", + "type": { + "$id": "901", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.AddRemoveIncrementalNamedPartitionScalingMechanism.scaleIncrement", + "serializationOptions": { + "$id": "902", + "json": { + "$id": "903", + "name": "scaleIncrement" + } + } + }, + { + "$id": "904", + "kind": "property", + "name": "kind", + "serializedName": "kind", + "doc": "Specifies the mechanism associated with this scaling policy.", + "type": { + "$id": "905", + "kind": "constant", + "valueType": { + "$id": "906", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "AddRemoveIncrementalNamedPartition", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.AddRemoveIncrementalNamedPartitionScalingMechanism.kind", + "serializationOptions": { + "$id": "907", + "json": { + "$id": "908", + "name": "kind" + } + } + } + ] + }, + "ScalePartitionInstanceCount": { + "$id": "909", + "kind": "model", + "name": "PartitionInstanceCountScalingMechanism", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.PartitionInstanceCountScaleMechanism", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Represents a scaling mechanism for adding or removing instances of stateless service partition.", + "discriminatorValue": "ScalePartitionInstanceCount", + "decorators": [], + "baseModel": { + "$ref": "886" + }, + "properties": [ + { + "$id": "910", + "kind": "property", + "name": "minInstanceCount", + "serializedName": "minInstanceCount", + "doc": "Minimum number of instances of the partition.", + "type": { + "$id": "911", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.PartitionInstanceCountScaleMechanism.minInstanceCount", + "serializationOptions": { + "$id": "912", + "json": { + "$id": "913", + "name": "minInstanceCount" + } + } + }, + { + "$id": "914", + "kind": "property", + "name": "maxInstanceCount", + "serializedName": "maxInstanceCount", + "doc": "Maximum number of instances of the partition.", + "type": { + "$id": "915", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.PartitionInstanceCountScaleMechanism.maxInstanceCount", + "serializationOptions": { + "$id": "916", + "json": { + "$id": "917", + "name": "maxInstanceCount" + } + } + }, + { + "$id": "918", + "kind": "property", + "name": "scaleIncrement", + "serializedName": "scaleIncrement", + "doc": "The number of instances to add or remove during a scaling operation.", + "type": { + "$id": "919", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.PartitionInstanceCountScaleMechanism.scaleIncrement", + "serializationOptions": { + "$id": "920", + "json": { + "$id": "921", + "name": "scaleIncrement" + } + } + }, + { + "$id": "922", + "kind": "property", + "name": "kind", + "serializedName": "kind", + "doc": "Specifies the mechanism associated with this scaling policy.", + "type": { + "$id": "923", + "kind": "constant", + "valueType": { + "$id": "924", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "ScalePartitionInstanceCount", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.PartitionInstanceCountScaleMechanism.kind", + "serializationOptions": { + "$id": "925", + "json": { + "$id": "926", + "name": "kind" + } + } + } + ] + } + } + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ScalingPolicy.scalingMechanism", + "serializationOptions": { + "$id": "927", + "json": { + "$id": "928", + "name": "scalingMechanism" + } + } + }, + { + "$id": "929", + "kind": "property", + "name": "scalingTrigger", + "serializedName": "scalingTrigger", + "doc": "Specifies the trigger associated with this scaling policy.", + "type": { + "$id": "930", + "kind": "model", + "name": "ManagedServiceScalingTrigger", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ScalingTrigger", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Describes the trigger for performing a scaling operation.", + "decorators": [], + "discriminatorProperty": { + "$id": "931", + "kind": "property", + "name": "kind", + "serializedName": "kind", + "type": { + "$ref": "106" + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ScalingTrigger.kind", + "serializationOptions": { + "$id": "932", + "json": { + "$id": "933", + "name": "kind" + } + } + }, + "properties": [ + { + "$ref": "931" + } + ], + "discriminatedSubtypes": { + "$id": "934", + "AveragePartitionLoadTrigger": { + "$id": "935", + "kind": "model", + "name": "AveragePartitionLoadScalingTrigger", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.AveragePartitionLoadScalingTrigger", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Represents a scaling trigger related to an average load of a metric/resource of a partition.", + "discriminatorValue": "AveragePartitionLoadTrigger", + "decorators": [], + "baseModel": { + "$ref": "930" + }, + "properties": [ + { + "$id": "936", + "kind": "property", + "name": "metricName", + "serializedName": "metricName", + "doc": "The name of the metric for which usage should be tracked.", + "type": { + "$id": "937", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.AveragePartitionLoadScalingTrigger.metricName", + "serializationOptions": { + "$id": "938", + "json": { + "$id": "939", + "name": "metricName" + } + } + }, + { + "$id": "940", + "kind": "property", + "name": "lowerLoadThreshold", + "serializedName": "lowerLoadThreshold", + "doc": "The lower limit of the load below which a scale in operation should be performed.", + "type": { + "$id": "941", + "kind": "float64", + "name": "float64", + "crossLanguageDefinitionId": "TypeSpec.float64", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.AveragePartitionLoadScalingTrigger.lowerLoadThreshold", + "serializationOptions": { + "$id": "942", + "json": { + "$id": "943", + "name": "lowerLoadThreshold" + } + } + }, + { + "$id": "944", + "kind": "property", + "name": "upperLoadThreshold", + "serializedName": "upperLoadThreshold", + "doc": "The upper limit of the load beyond which a scale out operation should be performed.", + "type": { + "$id": "945", + "kind": "float64", + "name": "float64", + "crossLanguageDefinitionId": "TypeSpec.float64", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.AveragePartitionLoadScalingTrigger.upperLoadThreshold", + "serializationOptions": { + "$id": "946", + "json": { + "$id": "947", + "name": "upperLoadThreshold" + } + } + }, + { + "$id": "948", + "kind": "property", + "name": "scaleInterval", + "serializedName": "scaleInterval", + "doc": "The period in seconds on which a decision is made whether to scale or not. This property should come in ISO 8601 format \"hh:mm:ss\".", + "type": { + "$id": "949", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.AveragePartitionLoadScalingTrigger.scaleInterval", + "serializationOptions": { + "$id": "950", + "json": { + "$id": "951", + "name": "scaleInterval" + } + } + }, + { + "$id": "952", + "kind": "property", + "name": "kind", + "serializedName": "kind", + "doc": "Specifies the trigger associated with this scaling policy.", + "type": { + "$id": "953", + "kind": "constant", + "valueType": { + "$id": "954", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "AveragePartitionLoadTrigger", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.AveragePartitionLoadScalingTrigger.kind", + "serializationOptions": { + "$id": "955", + "json": { + "$id": "956", + "name": "kind" + } + } + } + ] + }, + "AverageServiceLoadTrigger": { + "$id": "957", + "kind": "model", + "name": "AverageServiceLoadScalingTrigger", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.AverageServiceLoadScalingTrigger", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Represents a scaling policy related to an average load of a metric/resource of a service.", + "discriminatorValue": "AverageServiceLoadTrigger", + "decorators": [], + "baseModel": { + "$ref": "930" + }, + "properties": [ + { + "$id": "958", + "kind": "property", + "name": "metricName", + "serializedName": "metricName", + "doc": "The name of the metric for which usage should be tracked.", + "type": { + "$id": "959", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.AverageServiceLoadScalingTrigger.metricName", + "serializationOptions": { + "$id": "960", + "json": { + "$id": "961", + "name": "metricName" + } + } + }, + { + "$id": "962", + "kind": "property", + "name": "lowerLoadThreshold", + "serializedName": "lowerLoadThreshold", + "doc": "The lower limit of the load below which a scale in operation should be performed.", + "type": { + "$id": "963", + "kind": "float64", + "name": "float64", + "crossLanguageDefinitionId": "TypeSpec.float64", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.AverageServiceLoadScalingTrigger.lowerLoadThreshold", + "serializationOptions": { + "$id": "964", + "json": { + "$id": "965", + "name": "lowerLoadThreshold" + } + } + }, + { + "$id": "966", + "kind": "property", + "name": "upperLoadThreshold", + "serializedName": "upperLoadThreshold", + "doc": "The upper limit of the load beyond which a scale out operation should be performed.", + "type": { + "$id": "967", + "kind": "float64", + "name": "float64", + "crossLanguageDefinitionId": "TypeSpec.float64", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.AverageServiceLoadScalingTrigger.upperLoadThreshold", + "serializationOptions": { + "$id": "968", + "json": { + "$id": "969", + "name": "upperLoadThreshold" + } + } + }, + { + "$id": "970", + "kind": "property", + "name": "scaleInterval", + "serializedName": "scaleInterval", + "doc": "The period in seconds on which a decision is made whether to scale or not. This property should come in ISO 8601 format \"hh:mm:ss\".", + "type": { + "$id": "971", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.AverageServiceLoadScalingTrigger.scaleInterval", + "serializationOptions": { + "$id": "972", + "json": { + "$id": "973", + "name": "scaleInterval" + } + } + }, + { + "$id": "974", + "kind": "property", + "name": "useOnlyPrimaryLoad", + "serializedName": "useOnlyPrimaryLoad", + "doc": "Flag determines whether only the load of primary replica should be considered for scaling. If set to true, then trigger will only consider the load of primary replicas of stateful service. If set to false, trigger will consider load of all replicas. This parameter cannot be set to true for stateless service.", + "type": { + "$id": "975", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.AverageServiceLoadScalingTrigger.useOnlyPrimaryLoad", + "serializationOptions": { + "$id": "976", + "json": { + "$id": "977", + "name": "useOnlyPrimaryLoad" + } + } + }, + { + "$id": "978", + "kind": "property", + "name": "kind", + "serializedName": "kind", + "doc": "Specifies the trigger associated with this scaling policy.", + "type": { + "$id": "979", + "kind": "constant", + "valueType": { + "$id": "980", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "AverageServiceLoadTrigger", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.AverageServiceLoadScalingTrigger.kind", + "serializationOptions": { + "$id": "981", + "json": { + "$id": "982", + "name": "kind" + } + } + } + ] + } + } + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ScalingPolicy.scalingTrigger", + "serializationOptions": { + "$id": "983", + "json": { + "$id": "984", + "name": "scalingTrigger" + } + } + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ServiceResourcePropertiesBase.scalingPolicies", + "serializationOptions": { + "$id": "985", + "json": { + "$id": "986", + "name": "scalingPolicies" + } + } + } + ] + }, + "properties": [ + { + "$id": "987", + "kind": "property", + "name": "provisioningState", + "serializedName": "provisioningState", + "doc": "The current deployment or provisioning state, which only appears in the response", + "type": { + "$id": "988", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ServiceResourceProperties.provisioningState", + "serializationOptions": { + "$id": "989", + "json": { + "$id": "990", + "name": "provisioningState" + } + } + }, + { + "$ref": "780" + }, + { + "$id": "991", + "kind": "property", + "name": "serviceTypeName", + "serializedName": "serviceTypeName", + "doc": "The name of the service type", + "type": { + "$id": "992", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ServiceResourceProperties.serviceTypeName", + "serializationOptions": { + "$id": "993", + "json": { + "$id": "994", + "name": "serviceTypeName" + } + } + }, + { + "$id": "995", + "kind": "property", + "name": "partitionDescription", + "serializedName": "partitionDescription", + "doc": "Describes how the service is partitioned.", + "type": { + "$id": "996", + "kind": "model", + "name": "ManagedServicePartitionScheme", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.Partition", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Describes how the service is partitioned.", + "decorators": [], + "discriminatorProperty": { + "$id": "997", + "kind": "property", + "name": "partitionScheme", + "serializedName": "partitionScheme", + "type": { + "$ref": "48" + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.Partition.partitionScheme", + "serializationOptions": { + "$id": "998", + "json": { + "$id": "999", + "name": "partitionScheme" + } + } + }, + "properties": [ + { + "$ref": "997" + } + ], + "discriminatedSubtypes": { + "$id": "1000", + "UniformInt64Range": { + "$id": "1001", + "kind": "model", + "name": "UniformInt64RangePartitionScheme", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.UniformInt64RangePartitionScheme", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Describes a partitioning scheme where an integer range is allocated evenly across a number of partitions.", + "discriminatorValue": "UniformInt64Range", + "decorators": [], + "baseModel": { + "$ref": "996" + }, + "properties": [ + { + "$id": "1002", + "kind": "property", + "name": "count", + "serializedName": "count", + "doc": "The number of partitions.", + "type": { + "$id": "1003", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.UniformInt64RangePartitionScheme.count", + "serializationOptions": { + "$id": "1004", + "json": { + "$id": "1005", + "name": "count" + } + } + }, + { + "$id": "1006", + "kind": "property", + "name": "lowKey", + "serializedName": "lowKey", + "doc": "The lower bound of the partition key range that\nshould be split between the partition ‘Count’", + "type": { + "$id": "1007", + "kind": "int64", + "name": "int64", + "crossLanguageDefinitionId": "TypeSpec.int64", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.UniformInt64RangePartitionScheme.lowKey", + "serializationOptions": { + "$id": "1008", + "json": { + "$id": "1009", + "name": "lowKey" + } + } + }, + { + "$id": "1010", + "kind": "property", + "name": "highKey", + "serializedName": "highKey", + "doc": "The upper bound of the partition key range that\nshould be split between the partition ‘Count’", + "type": { + "$id": "1011", + "kind": "int64", + "name": "int64", + "crossLanguageDefinitionId": "TypeSpec.int64", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.UniformInt64RangePartitionScheme.highKey", + "serializationOptions": { + "$id": "1012", + "json": { + "$id": "1013", + "name": "highKey" + } + } + }, + { + "$id": "1014", + "kind": "property", + "name": "partitionScheme", + "serializedName": "partitionScheme", + "doc": "Specifies how the service is partitioned.", + "type": { + "$id": "1015", + "kind": "constant", + "valueType": { + "$id": "1016", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "UniformInt64Range", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.UniformInt64RangePartitionScheme.partitionScheme", + "serializationOptions": { + "$id": "1017", + "json": { + "$id": "1018", + "name": "partitionScheme" + } + } + } + ] + }, + "Singleton": { + "$id": "1019", + "kind": "model", + "name": "SingletonPartitionScheme", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.SingletonPartitionScheme", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Describes the partition scheme of a singleton-partitioned, or non-partitioned service.", + "discriminatorValue": "Singleton", + "decorators": [], + "baseModel": { + "$ref": "996" + }, + "properties": [ + { + "$id": "1020", + "kind": "property", + "name": "partitionScheme", + "serializedName": "partitionScheme", + "doc": "Specifies how the service is partitioned.", + "type": { + "$id": "1021", + "kind": "constant", + "valueType": { + "$id": "1022", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "Singleton", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.SingletonPartitionScheme.partitionScheme", + "serializationOptions": { + "$id": "1023", + "json": { + "$id": "1024", + "name": "partitionScheme" + } + } + } + ] + }, + "Named": { + "$id": "1025", + "kind": "model", + "name": "NamedPartitionScheme", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NamedPartitionScheme", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Describes the named partition scheme of the service.", + "discriminatorValue": "Named", + "decorators": [], + "baseModel": { + "$ref": "996" + }, + "properties": [ + { + "$id": "1026", + "kind": "property", + "name": "names", + "serializedName": "names", + "doc": "Array for the names of the partitions.", + "type": { + "$id": "1027", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "1028", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NamedPartitionScheme.names", + "serializationOptions": { + "$id": "1029", + "json": { + "$id": "1030", + "name": "names" + } + } + }, + { + "$id": "1031", + "kind": "property", + "name": "partitionScheme", + "serializedName": "partitionScheme", + "doc": "Specifies how the service is partitioned.", + "type": { + "$id": "1032", + "kind": "constant", + "valueType": { + "$id": "1033", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "Named", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NamedPartitionScheme.partitionScheme", + "serializationOptions": { + "$id": "1034", + "json": { + "$id": "1035", + "name": "partitionScheme" + } + } + } + ] + } + } + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ServiceResourceProperties.partitionDescription", + "serializationOptions": { + "$id": "1036", + "json": { + "$id": "1037", + "name": "partitionDescription" + } + } + }, + { + "$id": "1038", + "kind": "property", + "name": "servicePackageActivationMode", + "serializedName": "servicePackageActivationMode", + "doc": "The activation Mode of the service package", + "type": { + "$ref": "56" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ServiceResourceProperties.servicePackageActivationMode", + "serializationOptions": { + "$id": "1039", + "json": { + "$id": "1040", + "name": "servicePackageActivationMode" + } + } + }, + { + "$id": "1041", + "kind": "property", + "name": "serviceDnsName", + "serializedName": "serviceDnsName", + "doc": "Dns name used for the service. If this is specified, then the DNS name can be used to return the IP addresses of service endpoints for application layer protocols (e.g., HTTP).\nWhen updating serviceDnsName, old name may be temporarily resolvable. However, rely on new name.\nWhen removing serviceDnsName, removed name may temporarily be resolvable. Do not rely on the name being unresolvable.", + "type": { + "$id": "1042", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ServiceResourceProperties.serviceDnsName", + "serializationOptions": { + "$id": "1043", + "json": { + "$id": "1044", + "name": "serviceDnsName" + } + } + } + ], + "discriminatedSubtypes": { + "$id": "1045", + "Stateful": { + "$id": "1046", + "kind": "model", + "name": "StatefulServiceProperties", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.StatefulServiceProperties", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "The properties of a stateful service resource.", + "discriminatorValue": "Stateful", + "decorators": [], + "baseModel": { + "$ref": "779" + }, + "properties": [ + { + "$id": "1047", + "kind": "property", + "name": "hasPersistedState", + "serializedName": "hasPersistedState", + "doc": "A flag indicating whether this is a persistent service which stores states on the local disk. If it is then the value of this property is true, if not it is false.", + "type": { + "$id": "1048", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.StatefulServiceProperties.hasPersistedState", + "serializationOptions": { + "$id": "1049", + "json": { + "$id": "1050", + "name": "hasPersistedState" + } + } + }, + { + "$id": "1051", + "kind": "property", + "name": "targetReplicaSetSize", + "serializedName": "targetReplicaSetSize", + "doc": "The target replica set size as a number.", + "type": { + "$id": "1052", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.StatefulServiceProperties.targetReplicaSetSize", + "serializationOptions": { + "$id": "1053", + "json": { + "$id": "1054", + "name": "targetReplicaSetSize" + } + } + }, + { + "$id": "1055", + "kind": "property", + "name": "minReplicaSetSize", + "serializedName": "minReplicaSetSize", + "doc": "The minimum replica set size as a number.", + "type": { + "$id": "1056", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.StatefulServiceProperties.minReplicaSetSize", + "serializationOptions": { + "$id": "1057", + "json": { + "$id": "1058", + "name": "minReplicaSetSize" + } + } + }, + { + "$id": "1059", + "kind": "property", + "name": "replicaRestartWaitDuration", + "serializedName": "replicaRestartWaitDuration", + "doc": "The duration between when a replica goes down and when a new replica is created, represented in ISO 8601 format \"hh:mm:ss\".", + "type": { + "$id": "1060", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.StatefulServiceProperties.replicaRestartWaitDuration", + "serializationOptions": { + "$id": "1061", + "json": { + "$id": "1062", + "name": "replicaRestartWaitDuration" + } + } + }, + { + "$id": "1063", + "kind": "property", + "name": "quorumLossWaitDuration", + "serializedName": "quorumLossWaitDuration", + "doc": "The maximum duration for which a partition is allowed to be in a state of quorum loss, represented in ISO 8601 format \"hh:mm:ss\".", + "type": { + "$id": "1064", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.StatefulServiceProperties.quorumLossWaitDuration", + "serializationOptions": { + "$id": "1065", + "json": { + "$id": "1066", + "name": "quorumLossWaitDuration" + } + } + }, + { + "$id": "1067", + "kind": "property", + "name": "standByReplicaKeepDuration", + "serializedName": "standByReplicaKeepDuration", + "doc": "The definition on how long StandBy replicas should be maintained before being removed, represented in ISO 8601 format \"hh:mm:ss\".", + "type": { + "$id": "1068", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.StatefulServiceProperties.standByReplicaKeepDuration", + "serializationOptions": { + "$id": "1069", + "json": { + "$id": "1070", + "name": "standByReplicaKeepDuration" + } + } + }, + { + "$id": "1071", + "kind": "property", + "name": "servicePlacementTimeLimit", + "serializedName": "servicePlacementTimeLimit", + "doc": "The duration for which replicas can stay InBuild before reporting that build is stuck, represented in ISO 8601 format \"hh:mm:ss\".", + "type": { + "$id": "1072", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.StatefulServiceProperties.servicePlacementTimeLimit", + "serializationOptions": { + "$id": "1073", + "json": { + "$id": "1074", + "name": "servicePlacementTimeLimit" + } + } + }, + { + "$id": "1075", + "kind": "property", + "name": "serviceKind", + "serializedName": "serviceKind", + "doc": "The kind of service (Stateless or Stateful).", + "type": { + "$id": "1076", + "kind": "constant", + "valueType": { + "$id": "1077", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "Stateful", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.StatefulServiceProperties.serviceKind", + "serializationOptions": { + "$id": "1078", + "json": { + "$id": "1079", + "name": "serviceKind" + } + } + } + ] + }, + "Stateless": { + "$id": "1080", + "kind": "model", + "name": "StatelessServiceProperties", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.StatelessServiceProperties", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "The properties of a stateless service resource.", + "discriminatorValue": "Stateless", + "decorators": [], + "baseModel": { + "$ref": "779" + }, + "properties": [ + { + "$id": "1081", + "kind": "property", + "name": "instanceCount", + "serializedName": "instanceCount", + "doc": "The instance count.", + "type": { + "$id": "1082", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.StatelessServiceProperties.instanceCount", + "serializationOptions": { + "$id": "1083", + "json": { + "$id": "1084", + "name": "instanceCount" + } + } + }, + { + "$id": "1085", + "kind": "property", + "name": "minInstanceCount", + "serializedName": "minInstanceCount", + "doc": "MinInstanceCount is the minimum number of instances that must be up to meet the EnsureAvailability safety check during operations like upgrade or deactivate node. The actual number that is used is max( MinInstanceCount, ceil( MinInstancePercentage/100.0 * InstanceCount) ). Note, if InstanceCount is set to -1, during MinInstanceCount computation -1 is first converted into the number of nodes on which the instances are allowed to be placed according to the placement constraints on the service.", + "type": { + "$id": "1086", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.StatelessServiceProperties.minInstanceCount", + "serializationOptions": { + "$id": "1087", + "json": { + "$id": "1088", + "name": "minInstanceCount" + } + } + }, + { + "$id": "1089", + "kind": "property", + "name": "minInstancePercentage", + "serializedName": "minInstancePercentage", + "doc": "MinInstancePercentage is the minimum percentage of InstanceCount that must be up to meet the EnsureAvailability safety check during operations like upgrade or deactivate node. The actual number that is used is max( MinInstanceCount, ceil( MinInstancePercentage/100.0 * InstanceCount) ). Note, if InstanceCount is set to -1, during MinInstancePercentage computation, -1 is first converted into the number of nodes on which the instances are allowed to be placed according to the placement constraints on the service.", + "type": { + "$id": "1090", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.StatelessServiceProperties.minInstancePercentage", + "serializationOptions": { + "$id": "1091", + "json": { + "$id": "1092", + "name": "minInstancePercentage" + } + } + }, + { + "$id": "1093", + "kind": "property", + "name": "serviceKind", + "serializedName": "serviceKind", + "doc": "The kind of service (Stateless or Stateful).", + "type": { + "$id": "1094", + "kind": "constant", + "valueType": { + "$id": "1095", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "Stateless", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.StatelessServiceProperties.serviceKind", + "serializationOptions": { + "$id": "1096", + "json": { + "$id": "1097", + "name": "serviceKind" + } + } + } + ] + } + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ServiceResource.properties", + "serializationOptions": { + "$id": "1098", + "json": { + "$id": "1099", + "name": "properties" + } + } + }, + { + "$id": "1100", + "kind": "path", + "name": "name", + "serializedName": "name", + "doc": "The name of the service resource in the format of {applicationName}~{serviceName}.", + "type": { + "$id": "1101", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": true, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ServiceResource.name", + "discriminator": false, + "flatten": false + }, + { + "$id": "1102", + "kind": "property", + "name": "tags", + "serializedName": "tags", + "doc": "Resource tags.", + "type": { + "$id": "1103", + "kind": "dict", + "keyType": { + "$id": "1104", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "valueType": { + "$id": "1105", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ServiceResource.tags", + "serializationOptions": { + "$id": "1106", + "json": { + "$id": "1107", + "name": "tags" + } + } + }, + { + "$id": "1108", + "kind": "property", + "name": "location", + "serializedName": "location", + "doc": "The geo-location where the resource lives", + "type": { + "$id": "1109", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ServiceResource.location", + "serializationOptions": { + "$id": "1110", + "json": { + "$id": "1111", + "name": "location" + } + } + } + ] + }, + { + "$ref": "779" + }, + { + "$ref": "996" + }, + { + "$ref": "1001" + }, + { + "$ref": "1019" + }, + { + "$ref": "1025" + }, + { + "$ref": "783" + }, + { + "$ref": "790" + }, + { + "$ref": "802" + }, + { + "$ref": "826" + }, + { + "$ref": "831" + }, + { + "$ref": "841" + }, + { + "$ref": "851" + }, + { + "$ref": "861" + }, + { + "$ref": "871" + }, + { + "$ref": "884" + }, + { + "$ref": "886" + }, + { + "$ref": "891" + }, + { + "$ref": "909" + }, + { + "$ref": "930" + }, + { + "$ref": "935" + }, + { + "$ref": "957" + }, + { + "$ref": "1046" + }, + { + "$ref": "1080" + }, + { + "$id": "1112", + "kind": "model", + "name": "ServiceUpdateParameters", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ServiceUpdateParameters", + "usage": "Input,Json", + "doc": "Service update request", + "decorators": [], + "properties": [ + { + "$id": "1113", + "kind": "property", + "name": "tags", + "serializedName": "tags", + "doc": "Service update parameters", + "type": { + "$id": "1114", + "kind": "dict", + "keyType": { + "$id": "1115", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "valueType": { + "$id": "1116", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ServiceUpdateParameters.tags", + "serializationOptions": { + "$id": "1117", + "json": { + "$id": "1118", + "name": "tags" + } + } + } + ] + }, + { + "$id": "1119", + "kind": "model", + "name": "ServiceResourceList", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ServiceResourceList", + "usage": "Output,Json", + "doc": "The list of service resources.", + "decorators": [], + "properties": [ + { + "$id": "1120", + "kind": "property", + "name": "value", + "serializedName": "value", + "doc": "The ServiceResource items on this page", + "type": { + "$id": "1121", + "kind": "array", + "name": "ArrayServiceResource", + "valueType": { + "$ref": "777" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ServiceResourceList.value", + "serializationOptions": { + "$id": "1122", + "json": { + "$id": "1123", + "name": "value" + } + } + }, + { + "$id": "1124", + "kind": "property", + "name": "nextLink", + "serializedName": "nextLink", + "doc": "The link to the next page of items", + "type": { + "$id": "1125", + "kind": "url", + "name": "ResourceLocation", + "crossLanguageDefinitionId": "TypeSpec.Rest.ResourceLocation", + "baseType": { + "$id": "1126", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ServiceResourceList.nextLink", + "serializationOptions": { + "$id": "1127", + "json": { + "$id": "1128", + "name": "nextLink" + } + } + } + ] + }, + { + "$id": "1129", + "kind": "model", + "name": "ServiceFabricManagedClusterVersion", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedClusterCodeVersionResult", + "usage": "Output,Json", + "doc": "The result of the Service Fabric runtime versions", + "decorators": [], + "properties": [ + { + "$id": "1130", + "kind": "property", + "name": "id", + "serializedName": "id", + "doc": "The identification of the result", + "type": { + "$id": "1131", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedClusterCodeVersionResult.id", + "serializationOptions": { + "$id": "1132", + "json": { + "$id": "1133", + "name": "id" + } + } + }, + { + "$id": "1134", + "kind": "property", + "name": "name", + "serializedName": "name", + "doc": "The name of the result", + "type": { + "$id": "1135", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedClusterCodeVersionResult.name", + "serializationOptions": { + "$id": "1136", + "json": { + "$id": "1137", + "name": "name" + } + } + }, + { + "$id": "1138", + "kind": "property", + "name": "type", + "serializedName": "type", + "doc": "The result resource type", + "type": { + "$id": "1139", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedClusterCodeVersionResult.type", + "serializationOptions": { + "$id": "1140", + "json": { + "$id": "1141", + "name": "type" + } + } + }, + { + "$id": "1142", + "kind": "property", + "name": "properties", + "serializedName": "properties", + "doc": "The detail of the Service Fabric runtime version result", + "type": { + "$id": "1143", + "kind": "model", + "name": "ManagedClusterVersionDetails", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedClusterVersionDetails", + "usage": "Output,Json", + "doc": "The detail of the Service Fabric runtime version result", + "decorators": [], + "properties": [ + { + "$id": "1144", + "kind": "property", + "name": "clusterCodeVersion", + "serializedName": "clusterCodeVersion", + "doc": "The Service Fabric runtime version of the cluster.", + "type": { + "$id": "1145", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedClusterVersionDetails.clusterCodeVersion", + "serializationOptions": { + "$id": "1146", + "json": { + "$id": "1147", + "name": "clusterCodeVersion" + } + } + }, + { + "$id": "1148", + "kind": "property", + "name": "VersionSupportExpireOn", + "serializedName": "supportExpiryUtc", + "doc": "The date of expiry of support of the version.", + "type": { + "$id": "1149", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "rfc3339", + "wireType": { + "$id": "1150", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedClusterVersionDetails.supportExpiryUtc", + "serializationOptions": { + "$id": "1151", + "json": { + "$id": "1152", + "name": "supportExpiryUtc" + } + } + }, + { + "$id": "1153", + "kind": "property", + "name": "osType", + "serializedName": "osType", + "doc": "Cluster operating system, the default will be Windows", + "type": { + "$ref": "112" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedClusterVersionDetails.osType", + "serializationOptions": { + "$id": "1154", + "json": { + "$id": "1155", + "name": "osType" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": true, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedClusterCodeVersionResult.properties", + "serializationOptions": { + "$id": "1156", + "json": { + "$id": "1157", + "name": "properties" + } + } + } + ] + }, + { + "$ref": "1143" + }, + { + "$id": "1158", + "kind": "model", + "name": "ServiceFabricManagedUnsupportedVmSize", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedVMSize", + "usage": "Output,Json", + "doc": "Describes a VM Sizes.", + "decorators": [], + "properties": [ + { + "$id": "1159", + "kind": "property", + "name": "properties", + "serializedName": "properties", + "doc": "VM Size properties.", + "type": { + "$id": "1160", + "kind": "model", + "name": "VMSize", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.VMSize", + "usage": "Output,Json", + "doc": "VM Sizes properties.", + "decorators": [], + "properties": [ + { + "$id": "1161", + "kind": "property", + "name": "size", + "serializedName": "size", + "doc": "VM Size name.", + "type": { + "$id": "1162", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.VMSize.size", + "serializationOptions": { + "$id": "1163", + "json": { + "$id": "1164", + "name": "size" + } + } + } + ] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedVMSize.properties", + "serializationOptions": { + "$id": "1165", + "json": { + "$id": "1166", + "name": "properties" + } + } + }, + { + "$id": "1167", + "kind": "property", + "name": "id", + "serializedName": "id", + "doc": "VM Size id.", + "type": { + "$id": "1168", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedVMSize.id", + "serializationOptions": { + "$id": "1169", + "json": { + "$id": "1170", + "name": "id" + } + } + }, + { + "$id": "1171", + "kind": "property", + "name": "name", + "serializedName": "name", + "doc": "VM Size name.", + "type": { + "$id": "1172", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedVMSize.name", + "serializationOptions": { + "$id": "1173", + "json": { + "$id": "1174", + "name": "name" + } + } + }, + { + "$id": "1175", + "kind": "property", + "name": "type", + "serializedName": "type", + "doc": "VM Size type.", + "type": { + "$id": "1176", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedVMSize.type", + "serializationOptions": { + "$id": "1177", + "json": { + "$id": "1178", + "name": "type" + } + } + } + ] + }, + { + "$ref": "1160" + }, + { + "$id": "1179", + "kind": "model", + "name": "ManagedVMSizesResult", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedVMSizesResult", + "usage": "Output,Json", + "doc": "Describes the result of the request to list Managed VM Sizes for Service Fabric Managed Clusters.", + "decorators": [], + "properties": [ + { + "$id": "1180", + "kind": "property", + "name": "value", + "serializedName": "value", + "doc": "The ManagedVMSize items on this page", + "type": { + "$id": "1181", + "kind": "array", + "name": "ArrayManagedVmSize", + "valueType": { + "$ref": "1158" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedVMSizesResult.value", + "serializationOptions": { + "$id": "1182", + "json": { + "$id": "1183", + "name": "value" + } + } + }, + { + "$id": "1184", + "kind": "property", + "name": "nextLink", + "serializedName": "nextLink", + "doc": "The link to the next page of items", + "type": { + "$id": "1185", + "kind": "url", + "name": "ResourceLocation", + "crossLanguageDefinitionId": "TypeSpec.Rest.ResourceLocation", + "baseType": { + "$id": "1186", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedVMSizesResult.nextLink", + "serializationOptions": { + "$id": "1187", + "json": { + "$id": "1188", + "name": "nextLink" + } + } + } + ] + }, + { + "$id": "1189", + "kind": "model", + "name": "ServiceFabricManagedCluster", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedCluster", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "The managed cluster resource", + "decorators": [], + "baseModel": { + "$id": "1190", + "kind": "model", + "name": "TrackedResource", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.TrackedResource", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location'", + "decorators": [], + "baseModel": { + "$ref": "451" + }, + "properties": [ + { + "$id": "1191", + "kind": "property", + "name": "tags", + "serializedName": "tags", + "doc": "Resource tags.", + "type": { + "$id": "1192", + "kind": "dict", + "keyType": { + "$id": "1193", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "valueType": { + "$id": "1194", + "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": "1195", + "json": { + "$id": "1196", + "name": "tags" + } + } + }, + { + "$id": "1197", + "kind": "property", + "name": "location", + "serializedName": "location", + "doc": "The geo-location where the resource lives", + "type": { + "$id": "1198", + "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": "1199", + "json": { + "$id": "1200", + "name": "location" + } + } + } + ] + }, + "properties": [ + { + "$id": "1201", + "kind": "property", + "name": "properties", + "serializedName": "properties", + "doc": "The managed cluster resource properties", + "type": { + "$id": "1202", + "kind": "model", + "name": "ManagedClusterProperties", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedClusterProperties", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Describes the managed cluster resource properties.", + "decorators": [], + "properties": [ + { + "$id": "1203", + "kind": "property", + "name": "dnsName", + "serializedName": "dnsName", + "doc": "The cluster dns name.", + "type": { + "$id": "1204", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedClusterProperties.dnsName", + "serializationOptions": { + "$id": "1205", + "json": { + "$id": "1206", + "name": "dnsName" + } + } + }, + { + "$id": "1207", + "kind": "property", + "name": "fqdn", + "serializedName": "fqdn", + "doc": "The fully qualified domain name associated with the public load balancer of the cluster.", + "type": { + "$id": "1208", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedClusterProperties.fqdn", + "serializationOptions": { + "$id": "1209", + "json": { + "$id": "1210", + "name": "fqdn" + } + } + }, + { + "$id": "1211", + "kind": "property", + "name": "ipv4Address", + "serializedName": "ipv4Address", + "doc": "The IPv4 address associated with the public load balancer of the cluster.", + "type": { + "$id": "1212", + "kind": "string", + "name": "ipV4Address", + "crossLanguageDefinitionId": "Azure.Core.ipV4Address", + "baseType": { + "$id": "1213", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedClusterProperties.ipv4Address", + "serializationOptions": { + "$id": "1214", + "json": { + "$id": "1215", + "name": "ipv4Address" + } + } + }, + { + "$id": "1216", + "kind": "property", + "name": "-|uuid", + "serializedName": "clusterId", + "doc": "A service generated unique identifier for the cluster resource.", + "type": { + "$id": "1217", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "1218", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedClusterProperties.clusterId", + "serializationOptions": { + "$id": "1219", + "json": { + "$id": "1220", + "name": "clusterId" + } + } + }, + { + "$id": "1221", + "kind": "property", + "name": "clusterState", + "serializedName": "clusterState", + "doc": "The current state of the cluster.", + "type": { + "$ref": "120" + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedClusterProperties.clusterState", + "serializationOptions": { + "$id": "1222", + "json": { + "$id": "1223", + "name": "clusterState" + } + } + }, + { + "$id": "1224", + "kind": "property", + "name": "-|any", + "serializedName": "clusterCertificateThumbprints", + "doc": "List of thumbprints of the cluster certificates.", + "type": { + "$id": "1225", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "1226", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedClusterProperties.clusterCertificateThumbprints", + "serializationOptions": { + "$id": "1227", + "json": { + "$id": "1228", + "name": "clusterCertificateThumbprints" + } + } + }, + { + "$id": "1229", + "kind": "property", + "name": "clientConnectionPort", + "serializedName": "clientConnectionPort", + "doc": "The port used for client connections to the cluster.", + "type": { + "$id": "1230", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedClusterProperties.clientConnectionPort", + "serializationOptions": { + "$id": "1231", + "json": { + "$id": "1232", + "name": "clientConnectionPort" + } + } + }, + { + "$id": "1233", + "kind": "property", + "name": "httpGatewayConnectionPort", + "serializedName": "httpGatewayConnectionPort", + "doc": "The port used for HTTP connections to the cluster.", + "type": { + "$id": "1234", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedClusterProperties.httpGatewayConnectionPort", + "serializationOptions": { + "$id": "1235", + "json": { + "$id": "1236", + "name": "httpGatewayConnectionPort" + } + } + }, + { + "$id": "1237", + "kind": "property", + "name": "adminUserName", + "serializedName": "adminUserName", + "doc": "VM admin user name.", + "type": { + "$id": "1238", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedClusterProperties.adminUserName", + "serializationOptions": { + "$id": "1239", + "json": { + "$id": "1240", + "name": "adminUserName" + } + } + }, + { + "$id": "1241", + "kind": "property", + "name": "adminPassword", + "serializedName": "adminPassword", + "doc": "VM admin user password.", + "type": { + "$id": "1242", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedClusterProperties.adminPassword", + "serializationOptions": { + "$id": "1243", + "json": { + "$id": "1244", + "name": "adminPassword" + } + } + }, + { + "$id": "1245", + "kind": "property", + "name": "loadBalancingRules", + "serializedName": "loadBalancingRules", + "doc": "Load balancing rules that are applied to the public load balancer of the cluster.", + "type": { + "$id": "1246", + "kind": "array", + "name": "ArrayLoadBalancingRule", + "valueType": { + "$id": "1247", + "kind": "model", + "name": "ManagedClusterLoadBalancingRule", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.LoadBalancingRule", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Describes a load balancing rule.", + "decorators": [], + "properties": [ + { + "$id": "1248", + "kind": "property", + "name": "frontendPort", + "serializedName": "frontendPort", + "doc": "The port for the external endpoint. Port numbers for each rule must be unique within the Load Balancer. Acceptable values are between 1 and 65534.", + "type": { + "$id": "1249", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.LoadBalancingRule.frontendPort", + "serializationOptions": { + "$id": "1250", + "json": { + "$id": "1251", + "name": "frontendPort" + } + } + }, + { + "$id": "1252", + "kind": "property", + "name": "backendPort", + "serializedName": "backendPort", + "doc": "The port used for internal connections on the endpoint. Acceptable values are between 1 and 65535.", + "type": { + "$id": "1253", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.LoadBalancingRule.backendPort", + "serializationOptions": { + "$id": "1254", + "json": { + "$id": "1255", + "name": "backendPort" + } + } + }, + { + "$id": "1256", + "kind": "property", + "name": "protocol", + "serializedName": "protocol", + "doc": "The reference to the transport protocol used by the load balancing rule.", + "type": { + "$ref": "134" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.LoadBalancingRule.protocol", + "serializationOptions": { + "$id": "1257", + "json": { + "$id": "1258", + "name": "protocol" + } + } + }, + { + "$id": "1259", + "kind": "property", + "name": "probePort", + "serializedName": "probePort", + "doc": "The prob port used by the load balancing rule. Acceptable values are between 1 and 65535.", + "type": { + "$id": "1260", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.LoadBalancingRule.probePort", + "serializationOptions": { + "$id": "1261", + "json": { + "$id": "1262", + "name": "probePort" + } + } + }, + { + "$id": "1263", + "kind": "property", + "name": "probeProtocol", + "serializedName": "probeProtocol", + "doc": "the reference to the load balancer probe used by the load balancing rule.", + "type": { + "$ref": "140" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.LoadBalancingRule.probeProtocol", + "serializationOptions": { + "$id": "1264", + "json": { + "$id": "1265", + "name": "probeProtocol" + } + } + }, + { + "$id": "1266", + "kind": "property", + "name": "probeRequestPath", + "serializedName": "probeRequestPath", + "doc": "The probe request path. Only supported for HTTP/HTTPS probes.", + "type": { + "$id": "1267", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.LoadBalancingRule.probeRequestPath", + "serializationOptions": { + "$id": "1268", + "json": { + "$id": "1269", + "name": "probeRequestPath" + } + } + }, + { + "$id": "1270", + "kind": "property", + "name": "loadDistribution", + "serializedName": "loadDistribution", + "doc": "The load distribution policy for this rule.", + "type": { + "$id": "1271", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.LoadBalancingRule.loadDistribution", + "serializationOptions": { + "$id": "1272", + "json": { + "$id": "1273", + "name": "loadDistribution" + } + } + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedClusterProperties.loadBalancingRules", + "serializationOptions": { + "$id": "1274", + "json": { + "$id": "1275", + "name": "loadBalancingRules" + } + } + }, + { + "$id": "1276", + "kind": "property", + "name": "IsRdpAccessAllowed", + "serializedName": "allowRdpAccess", + "doc": "Setting this to true enables RDP access to the VM. The default NSG rule opens RDP port to Internet which can be overridden with custom Network Security Rules. The default value for this setting is false.", + "type": { + "$id": "1277", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedClusterProperties.allowRdpAccess", + "serializationOptions": { + "$id": "1278", + "json": { + "$id": "1279", + "name": "allowRdpAccess" + } + } + }, + { + "$id": "1280", + "kind": "property", + "name": "networkSecurityRules", + "serializedName": "networkSecurityRules", + "doc": "Custom Network Security Rules that are applied to the Virtual Network of the cluster.", + "type": { + "$id": "1281", + "kind": "array", + "name": "ArrayNetworkSecurityRule", + "valueType": { + "$id": "1282", + "kind": "model", + "name": "ServiceFabricManagedNetworkSecurityRule", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NetworkSecurityRule", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Describes a network security rule.", + "decorators": [], + "properties": [ + { + "$id": "1283", + "kind": "property", + "name": "name", + "serializedName": "name", + "doc": "Network security rule name.", + "type": { + "$id": "1284", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NetworkSecurityRule.name", + "serializationOptions": { + "$id": "1285", + "json": { + "$id": "1286", + "name": "name" + } + } + }, + { + "$id": "1287", + "kind": "property", + "name": "description", + "serializedName": "description", + "doc": "Network security rule description.", + "type": { + "$id": "1288", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NetworkSecurityRule.description", + "serializationOptions": { + "$id": "1289", + "json": { + "$id": "1290", + "name": "description" + } + } + }, + { + "$id": "1291", + "kind": "property", + "name": "protocol", + "serializedName": "protocol", + "doc": "Network protocol this rule applies to.", + "type": { + "$ref": "148" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NetworkSecurityRule.protocol", + "serializationOptions": { + "$id": "1292", + "json": { + "$id": "1293", + "name": "protocol" + } + } + }, + { + "$id": "1294", + "kind": "property", + "name": "sourceAddressPrefixes", + "serializedName": "sourceAddressPrefixes", + "doc": "The CIDR or source IP ranges.", + "type": { + "$id": "1295", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "1296", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NetworkSecurityRule.sourceAddressPrefixes", + "serializationOptions": { + "$id": "1297", + "json": { + "$id": "1298", + "name": "sourceAddressPrefixes" + } + } + }, + { + "$id": "1299", + "kind": "property", + "name": "destinationAddressPrefixes", + "serializedName": "destinationAddressPrefixes", + "doc": "The destination address prefixes. CIDR or destination IP ranges.", + "type": { + "$id": "1300", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "1301", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NetworkSecurityRule.destinationAddressPrefixes", + "serializationOptions": { + "$id": "1302", + "json": { + "$id": "1303", + "name": "destinationAddressPrefixes" + } + } + }, + { + "$id": "1304", + "kind": "property", + "name": "sourcePortRanges", + "serializedName": "sourcePortRanges", + "doc": "The source port ranges.", + "type": { + "$id": "1305", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "1306", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NetworkSecurityRule.sourcePortRanges", + "serializationOptions": { + "$id": "1307", + "json": { + "$id": "1308", + "name": "sourcePortRanges" + } + } + }, + { + "$id": "1309", + "kind": "property", + "name": "destinationPortRanges", + "serializedName": "destinationPortRanges", + "doc": "The destination port ranges.", + "type": { + "$id": "1310", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "1311", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NetworkSecurityRule.destinationPortRanges", + "serializationOptions": { + "$id": "1312", + "json": { + "$id": "1313", + "name": "destinationPortRanges" + } + } + }, + { + "$id": "1314", + "kind": "property", + "name": "sourceAddressPrefix", + "serializedName": "sourceAddressPrefix", + "doc": "The CIDR or source IP range. Asterisk '*' can also be used to match all source IPs. Default tags such as 'VirtualNetwork', 'AzureLoadBalancer' and 'Internet' can also be used. If this is an ingress rule, specifies where network traffic originates from.", + "type": { + "$id": "1315", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NetworkSecurityRule.sourceAddressPrefix", + "serializationOptions": { + "$id": "1316", + "json": { + "$id": "1317", + "name": "sourceAddressPrefix" + } + } + }, + { + "$id": "1318", + "kind": "property", + "name": "destinationAddressPrefix", + "serializedName": "destinationAddressPrefix", + "doc": "The destination address prefix. CIDR or destination IP range. Asterisk '*' can also be used to match all source IPs. Default tags such as 'VirtualNetwork', 'AzureLoadBalancer' and 'Internet' can also be used.", + "type": { + "$id": "1319", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NetworkSecurityRule.destinationAddressPrefix", + "serializationOptions": { + "$id": "1320", + "json": { + "$id": "1321", + "name": "destinationAddressPrefix" + } + } + }, + { + "$id": "1322", + "kind": "property", + "name": "sourcePortRange", + "serializedName": "sourcePortRange", + "doc": "The source port or range. Integer or range between 0 and 65535. Asterisk '*' can also be used to match all ports.", + "type": { + "$id": "1323", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NetworkSecurityRule.sourcePortRange", + "serializationOptions": { + "$id": "1324", + "json": { + "$id": "1325", + "name": "sourcePortRange" + } + } + }, + { + "$id": "1326", + "kind": "property", + "name": "destinationPortRange", + "serializedName": "destinationPortRange", + "doc": "he destination port or range. Integer or range between 0 and 65535. Asterisk '*' can also be used to match all ports.", + "type": { + "$id": "1327", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NetworkSecurityRule.destinationPortRange", + "serializationOptions": { + "$id": "1328", + "json": { + "$id": "1329", + "name": "destinationPortRange" + } + } + }, + { + "$id": "1330", + "kind": "property", + "name": "access", + "serializedName": "access", + "doc": "The network traffic is allowed or denied.", + "type": { + "$ref": "164" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NetworkSecurityRule.access", + "serializationOptions": { + "$id": "1331", + "json": { + "$id": "1332", + "name": "access" + } + } + }, + { + "$id": "1333", + "kind": "property", + "name": "priority", + "serializedName": "priority", + "doc": "The priority of the rule. The value can be in the range 1000 to 3000. Values outside this range are reserved for Service Fabric ManagerCluster Resource Provider. The priority number must be unique for each rule in the collection. The lower the priority number, the higher the priority of the rule.", + "type": { + "$id": "1334", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NetworkSecurityRule.priority", + "serializationOptions": { + "$id": "1335", + "json": { + "$id": "1336", + "name": "priority" + } + } + }, + { + "$id": "1337", + "kind": "property", + "name": "direction", + "serializedName": "direction", + "doc": "Network security rule direction.", + "type": { + "$ref": "170" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NetworkSecurityRule.direction", + "serializationOptions": { + "$id": "1338", + "json": { + "$id": "1339", + "name": "direction" + } + } + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedClusterProperties.networkSecurityRules", + "serializationOptions": { + "$id": "1340", + "json": { + "$id": "1341", + "name": "networkSecurityRules" + } + } + }, + { + "$id": "1342", + "kind": "property", + "name": "clients", + "serializedName": "clients", + "doc": "Client certificates that are allowed to manage the cluster.", + "type": { + "$id": "1343", + "kind": "array", + "name": "ArrayClientCertificate", + "valueType": { + "$id": "1344", + "kind": "model", + "name": "ManagedClusterClientCertificate", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ClientCertificate", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Client certificate definition.", + "decorators": [], + "properties": [ + { + "$id": "1345", + "kind": "property", + "name": "isAdmin", + "serializedName": "isAdmin", + "doc": "Indicates if the client certificate has admin access to the cluster. Non admin clients can perform only read only operations on the cluster.", + "type": { + "$id": "1346", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ClientCertificate.isAdmin", + "serializationOptions": { + "$id": "1347", + "json": { + "$id": "1348", + "name": "isAdmin" + } + } + }, + { + "$id": "1349", + "kind": "property", + "name": "thumbprint", + "serializedName": "thumbprint", + "doc": "Certificate thumbprint.", + "type": { + "$id": "1350", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ClientCertificate.thumbprint", + "serializationOptions": { + "$id": "1351", + "json": { + "$id": "1352", + "name": "thumbprint" + } + } + }, + { + "$id": "1353", + "kind": "property", + "name": "commonName", + "serializedName": "commonName", + "doc": "Certificate common name.", + "type": { + "$id": "1354", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ClientCertificate.commonName", + "serializationOptions": { + "$id": "1355", + "json": { + "$id": "1356", + "name": "commonName" + } + } + }, + { + "$id": "1357", + "kind": "property", + "name": "issuerThumbprint", + "serializedName": "issuerThumbprint", + "doc": "Issuer thumbprint for the certificate. Only used together with CommonName.", + "type": { + "$id": "1358", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ClientCertificate.issuerThumbprint", + "serializationOptions": { + "$id": "1359", + "json": { + "$id": "1360", + "name": "issuerThumbprint" + } + } + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedClusterProperties.clients", + "serializationOptions": { + "$id": "1361", + "json": { + "$id": "1362", + "name": "clients" + } + } + }, + { + "$id": "1363", + "kind": "property", + "name": "azureActiveDirectory", + "serializedName": "azureActiveDirectory", + "doc": "The AAD authentication settings of the cluster.", + "type": { + "$id": "1364", + "kind": "model", + "name": "ManagedClusterAzureActiveDirectory", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.AzureActiveDirectory", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "The settings to enable AAD authentication on the cluster.", + "decorators": [], + "properties": [ + { + "$id": "1365", + "kind": "property", + "name": "tenantId", + "serializedName": "tenantId", + "doc": "Azure active directory tenant id.", + "type": { + "$id": "1366", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "1367", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.AzureActiveDirectory.tenantId", + "serializationOptions": { + "$id": "1368", + "json": { + "$id": "1369", + "name": "tenantId" + } + } + }, + { + "$id": "1370", + "kind": "property", + "name": "clusterApplication", + "serializedName": "clusterApplication", + "doc": "Azure active directory cluster application id.", + "type": { + "$id": "1371", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.AzureActiveDirectory.clusterApplication", + "serializationOptions": { + "$id": "1372", + "json": { + "$id": "1373", + "name": "clusterApplication" + } + } + }, + { + "$id": "1374", + "kind": "property", + "name": "clientApplication", + "serializedName": "clientApplication", + "doc": "Azure active directory client application id.", + "type": { + "$id": "1375", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.AzureActiveDirectory.clientApplication", + "serializationOptions": { + "$id": "1376", + "json": { + "$id": "1377", + "name": "clientApplication" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedClusterProperties.azureActiveDirectory", + "serializationOptions": { + "$id": "1378", + "json": { + "$id": "1379", + "name": "azureActiveDirectory" + } + } + }, + { + "$id": "1380", + "kind": "property", + "name": "fabricSettings", + "serializedName": "fabricSettings", + "doc": "The list of custom fabric settings to configure the cluster.", + "type": { + "$id": "1381", + "kind": "array", + "name": "ArraySettingsSectionDescription", + "valueType": { + "$id": "1382", + "kind": "model", + "name": "ClusterFabricSettingsSection", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.SettingsSectionDescription", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Describes a section in the fabric settings of the cluster.", + "decorators": [], + "properties": [ + { + "$id": "1383", + "kind": "property", + "name": "name", + "serializedName": "name", + "doc": "The section name of the fabric settings.", + "type": { + "$id": "1384", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.SettingsSectionDescription.name", + "serializationOptions": { + "$id": "1385", + "json": { + "$id": "1386", + "name": "name" + } + } + }, + { + "$id": "1387", + "kind": "property", + "name": "parameters", + "serializedName": "parameters", + "doc": "The collection of parameters in the section.", + "type": { + "$id": "1388", + "kind": "array", + "name": "ArraySettingsParameterDescription", + "valueType": { + "$id": "1389", + "kind": "model", + "name": "ClusterFabricSettingsParameterDescription", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.SettingsParameterDescription", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Describes a parameter in fabric settings of the cluster.", + "decorators": [], + "properties": [ + { + "$id": "1390", + "kind": "property", + "name": "name", + "serializedName": "name", + "doc": "The parameter name of fabric setting.", + "type": { + "$id": "1391", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.SettingsParameterDescription.name", + "serializationOptions": { + "$id": "1392", + "json": { + "$id": "1393", + "name": "name" + } + } + }, + { + "$id": "1394", + "kind": "property", + "name": "value", + "serializedName": "value", + "doc": "The parameter value of fabric setting.", + "type": { + "$id": "1395", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.SettingsParameterDescription.value", + "serializationOptions": { + "$id": "1396", + "json": { + "$id": "1397", + "name": "value" + } + } + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.SettingsSectionDescription.parameters", + "serializationOptions": { + "$id": "1398", + "json": { + "$id": "1399", + "name": "parameters" + } + } + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedClusterProperties.fabricSettings", + "serializationOptions": { + "$id": "1400", + "json": { + "$id": "1401", + "name": "fabricSettings" + } + } + }, + { + "$id": "1402", + "kind": "property", + "name": "provisioningState", + "serializedName": "provisioningState", + "doc": "The provisioning state of the managed cluster resource.", + "type": { + "$ref": "176" + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedClusterProperties.provisioningState", + "serializationOptions": { + "$id": "1403", + "json": { + "$id": "1404", + "name": "provisioningState" + } + } + }, + { + "$id": "1405", + "kind": "property", + "name": "clusterCodeVersion", + "serializedName": "clusterCodeVersion", + "doc": "The Service Fabric runtime version of the cluster. This property is required when **clusterUpgradeMode** is set to 'Manual'. To get list of available Service Fabric versions for new clusters use [ClusterVersion API](./ClusterVersion.md). To get the list of available version for existing clusters use **availableClusterVersions**.", + "type": { + "$id": "1406", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedClusterProperties.clusterCodeVersion", + "serializationOptions": { + "$id": "1407", + "json": { + "$id": "1408", + "name": "clusterCodeVersion" + } + } + }, + { + "$id": "1409", + "kind": "property", + "name": "clusterUpgradeMode", + "serializedName": "clusterUpgradeMode", + "doc": "The upgrade mode of the cluster when new Service Fabric runtime version is available.", + "type": { + "$ref": "198" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedClusterProperties.clusterUpgradeMode", + "serializationOptions": { + "$id": "1410", + "json": { + "$id": "1411", + "name": "clusterUpgradeMode" + } + } + }, + { + "$id": "1412", + "kind": "property", + "name": "clusterUpgradeCadence", + "serializedName": "clusterUpgradeCadence", + "doc": "Indicates when new cluster runtime version upgrades will be applied after they are released. By default is Wave0. Only applies when **clusterUpgradeMode** is set to 'Automatic'.", + "type": { + "$ref": "204" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedClusterProperties.clusterUpgradeCadence", + "serializationOptions": { + "$id": "1413", + "json": { + "$id": "1414", + "name": "clusterUpgradeCadence" + } + } + }, + { + "$id": "1415", + "kind": "property", + "name": "AddOnFeatures", + "serializedName": "addonFeatures", + "doc": "List of add-on features to enable on the cluster.", + "type": { + "$id": "1416", + "kind": "array", + "name": "ArrayManagedClusterAddOnFeature", + "valueType": { + "$ref": "212" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedClusterProperties.addonFeatures", + "serializationOptions": { + "$id": "1417", + "json": { + "$id": "1418", + "name": "addonFeatures" + } + } + }, + { + "$id": "1419", + "kind": "property", + "name": "IsAutoOSUpgradeEnabled", + "serializedName": "enableAutoOSUpgrade", + "doc": "Enables automatic OS upgrade for node types created using OS images with version 'latest'. The default value for this setting is false.", + "type": { + "$id": "1420", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedClusterProperties.enableAutoOSUpgrade", + "serializationOptions": { + "$id": "1421", + "json": { + "$id": "1422", + "name": "enableAutoOSUpgrade" + } + } + }, + { + "$id": "1423", + "kind": "property", + "name": "HasZoneResiliency", + "serializedName": "zonalResiliency", + "doc": "Indicates if the cluster has zone resiliency.", + "type": { + "$id": "1424", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedClusterProperties.zonalResiliency", + "serializationOptions": { + "$id": "1425", + "json": { + "$id": "1426", + "name": "zonalResiliency" + } + } + }, + { + "$id": "1427", + "kind": "property", + "name": "applicationTypeVersionsCleanupPolicy", + "serializedName": "applicationTypeVersionsCleanupPolicy", + "doc": "The policy used to clean up unused versions.", + "type": { + "$id": "1428", + "kind": "model", + "name": "ApplicationTypeVersionsCleanupPolicy", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ApplicationTypeVersionsCleanupPolicy", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "The policy used to clean up unused versions. When the policy is not specified explicitly, the default unused application versions to keep will be 3.", + "decorators": [], + "properties": [ + { + "$id": "1429", + "kind": "property", + "name": "maxUnusedVersionsToKeep", + "serializedName": "maxUnusedVersionsToKeep", + "doc": "Number of unused versions per application type to keep.", + "type": { + "$id": "1430", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ApplicationTypeVersionsCleanupPolicy.maxUnusedVersionsToKeep", + "serializationOptions": { + "$id": "1431", + "json": { + "$id": "1432", + "name": "maxUnusedVersionsToKeep" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedClusterProperties.applicationTypeVersionsCleanupPolicy", + "serializationOptions": { + "$id": "1433", + "json": { + "$id": "1434", + "name": "applicationTypeVersionsCleanupPolicy" + } + } + }, + { + "$id": "1435", + "kind": "property", + "name": "IsIPv6Enabled", + "serializedName": "enableIpv6", + "doc": "Setting this to true creates IPv6 address space for the default VNet used by the cluster. This setting cannot be changed once the cluster is created. The default value for this setting is false.", + "type": { + "$id": "1436", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedClusterProperties.enableIpv6", + "serializationOptions": { + "$id": "1437", + "json": { + "$id": "1438", + "name": "enableIpv6" + } + } + }, + { + "$id": "1439", + "kind": "property", + "name": "subnetId", + "serializedName": "subnetId", + "doc": "If specified, the node types for the cluster are created in this subnet instead of the default VNet. The **networkSecurityRules** specified for the cluster are also applied to this subnet. This setting cannot be changed once the cluster is created.", + "type": { + "$id": "1440", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedClusterProperties.subnetId", + "serializationOptions": { + "$id": "1441", + "json": { + "$id": "1442", + "name": "subnetId" + } + } + }, + { + "$id": "1443", + "kind": "property", + "name": "ipTags", + "serializedName": "ipTags", + "doc": "The list of IP tags associated with the default public IP address of the cluster.", + "type": { + "$id": "1444", + "kind": "array", + "name": "ArrayIpTag", + "valueType": { + "$id": "1445", + "kind": "model", + "name": "ManagedClusterIPTag", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.IpTag", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "The IP tag associated with the public IP address.", + "decorators": [], + "properties": [ + { + "$id": "1446", + "kind": "property", + "name": "ipTagType", + "serializedName": "ipTagType", + "doc": "IP tag type. Example: FirstPartyUsage.", + "type": { + "$id": "1447", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.IpTag.ipTagType", + "serializationOptions": { + "$id": "1448", + "json": { + "$id": "1449", + "name": "ipTagType" + } + } + }, + { + "$id": "1450", + "kind": "property", + "name": "tag", + "serializedName": "tag", + "doc": "IP tag associated with the public IP. Example: SQL, Storage etc.", + "type": { + "$id": "1451", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.IpTag.tag", + "serializationOptions": { + "$id": "1452", + "json": { + "$id": "1453", + "name": "tag" + } + } + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedClusterProperties.ipTags", + "serializationOptions": { + "$id": "1454", + "json": { + "$id": "1455", + "name": "ipTags" + } + } + }, + { + "$id": "1456", + "kind": "property", + "name": "ipv6Address", + "serializedName": "ipv6Address", + "doc": "IPv6 address for the cluster if IPv6 is enabled.", + "type": { + "$id": "1457", + "kind": "string", + "name": "ipV6Address", + "crossLanguageDefinitionId": "Azure.Core.ipV6Address", + "baseType": { + "$id": "1458", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedClusterProperties.ipv6Address", + "serializationOptions": { + "$id": "1459", + "json": { + "$id": "1460", + "name": "ipv6Address" + } + } + }, + { + "$id": "1461", + "kind": "property", + "name": "IsServicePublicIPEnabled", + "serializedName": "enableServicePublicIP", + "doc": "Setting this to true will link the IPv4 address as the ServicePublicIP of the IPv6 address. It can only be set to True if IPv6 is enabled on the cluster.", + "type": { + "$id": "1462", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedClusterProperties.enableServicePublicIP", + "serializationOptions": { + "$id": "1463", + "json": { + "$id": "1464", + "name": "enableServicePublicIP" + } + } + }, + { + "$id": "1465", + "kind": "property", + "name": "auxiliarySubnets", + "serializedName": "auxiliarySubnets", + "doc": "Auxiliary subnets for the cluster.", + "type": { + "$id": "1466", + "kind": "array", + "name": "ArraySubnet", + "valueType": { + "$id": "1467", + "kind": "model", + "name": "ManagedClusterSubnet", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.Subnet", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Describes a Subnet.", + "decorators": [], + "properties": [ + { + "$id": "1468", + "kind": "property", + "name": "name", + "serializedName": "name", + "doc": "Subnet name.", + "type": { + "$id": "1469", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.Subnet.name", + "serializationOptions": { + "$id": "1470", + "json": { + "$id": "1471", + "name": "name" + } + } + }, + { + "$id": "1472", + "kind": "property", + "name": "IsIPv6Enabled", + "serializedName": "enableIpv6", + "doc": "Indicates wether to enable Ipv6 or not. If not provided, it will take the same configuration as the cluster.", + "type": { + "$id": "1473", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.Subnet.enableIpv6", + "serializationOptions": { + "$id": "1474", + "json": { + "$id": "1475", + "name": "enableIpv6" + } + } + }, + { + "$id": "1476", + "kind": "property", + "name": "privateEndpointNetworkPolicies", + "serializedName": "privateEndpointNetworkPolicies", + "doc": "Enable or Disable apply network policies on private end point in the subnet.", + "type": { + "$ref": "220" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.Subnet.privateEndpointNetworkPolicies", + "serializationOptions": { + "$id": "1477", + "json": { + "$id": "1478", + "name": "privateEndpointNetworkPolicies" + } + } + }, + { + "$id": "1479", + "kind": "property", + "name": "privateLinkServiceNetworkPolicies", + "serializedName": "privateLinkServiceNetworkPolicies", + "doc": "Enable or Disable apply network policies on private link service in the subnet.", + "type": { + "$ref": "226" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.Subnet.privateLinkServiceNetworkPolicies", + "serializationOptions": { + "$id": "1480", + "json": { + "$id": "1481", + "name": "privateLinkServiceNetworkPolicies" + } + } + }, + { + "$id": "1482", + "kind": "property", + "name": "networkSecurityGroupId", + "serializedName": "networkSecurityGroupId", + "doc": "Full resource id for the network security group.", + "type": { + "$id": "1483", + "kind": "string", + "name": "armResourceIdentifier", + "crossLanguageDefinitionId": "Azure.Core.armResourceIdentifier", + "baseType": { + "$id": "1484", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.Subnet.networkSecurityGroupId", + "serializationOptions": { + "$id": "1485", + "json": { + "$id": "1486", + "name": "networkSecurityGroupId" + } + } + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedClusterProperties.auxiliarySubnets", + "serializationOptions": { + "$id": "1487", + "json": { + "$id": "1488", + "name": "auxiliarySubnets" + } + } + }, + { + "$id": "1489", + "kind": "property", + "name": "serviceEndpoints", + "serializedName": "serviceEndpoints", + "doc": "Service endpoints for subnets in the cluster.", + "type": { + "$id": "1490", + "kind": "array", + "name": "ArrayServiceEndpoint", + "valueType": { + "$id": "1491", + "kind": "model", + "name": "ManagedClusterServiceEndpoint", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ServiceEndpoint", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "The service endpoint properties.", + "decorators": [], + "properties": [ + { + "$id": "1492", + "kind": "property", + "name": "service", + "serializedName": "service", + "doc": "The type of the endpoint service.", + "type": { + "$id": "1493", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ServiceEndpoint.service", + "serializationOptions": { + "$id": "1494", + "json": { + "$id": "1495", + "name": "service" + } + } + }, + { + "$id": "1496", + "kind": "property", + "name": "-|azure-location", + "serializedName": "locations", + "doc": "A list of locations.", + "type": { + "$id": "1497", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "1498", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ServiceEndpoint.locations", + "serializationOptions": { + "$id": "1499", + "json": { + "$id": "1500", + "name": "locations" + } + } + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedClusterProperties.serviceEndpoints", + "serializationOptions": { + "$id": "1501", + "json": { + "$id": "1502", + "name": "serviceEndpoints" + } + } + }, + { + "$id": "1503", + "kind": "property", + "name": "zonalUpdateMode", + "serializedName": "zonalUpdateMode", + "doc": "Indicates the update mode for Cross Az clusters.", + "type": { + "$ref": "232" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedClusterProperties.zonalUpdateMode", + "serializationOptions": { + "$id": "1504", + "json": { + "$id": "1505", + "name": "zonalUpdateMode" + } + } + }, + { + "$id": "1506", + "kind": "property", + "name": "useCustomVnet", + "serializedName": "useCustomVnet", + "doc": "For new clusters, this parameter indicates that it uses Bring your own VNet, but the subnet is specified at node type level; and for such clusters, the subnetId property is required for node types.", + "type": { + "$id": "1507", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedClusterProperties.useCustomVnet", + "serializationOptions": { + "$id": "1508", + "json": { + "$id": "1509", + "name": "useCustomVnet" + } + } + }, + { + "$id": "1510", + "kind": "property", + "name": "publicIPPrefixId", + "serializedName": "publicIPPrefixId", + "doc": "Specify the resource id of a public IPv4 prefix that the load balancer will allocate a public IPv4 address from. This setting cannot be changed once the cluster is created.", + "type": { + "$id": "1511", + "kind": "string", + "name": "armResourceIdentifier", + "crossLanguageDefinitionId": "Azure.Core.armResourceIdentifier", + "baseType": { + "$id": "1512", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedClusterProperties.publicIPPrefixId", + "serializationOptions": { + "$id": "1513", + "json": { + "$id": "1514", + "name": "publicIPPrefixId" + } + } + }, + { + "$id": "1515", + "kind": "property", + "name": "publicIPv6PrefixId", + "serializedName": "publicIPv6PrefixId", + "doc": "Specify the resource id of a public IPv6 prefix that the load balancer will allocate a public IPv6 address from. This setting cannot be changed once the cluster is created.", + "type": { + "$id": "1516", + "kind": "string", + "name": "armResourceIdentifier", + "crossLanguageDefinitionId": "Azure.Core.armResourceIdentifier", + "baseType": { + "$id": "1517", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedClusterProperties.publicIPv6PrefixId", + "serializationOptions": { + "$id": "1518", + "json": { + "$id": "1519", + "name": "publicIPv6PrefixId" + } + } + }, + { + "$id": "1520", + "kind": "property", + "name": "ddosProtectionPlanId", + "serializedName": "ddosProtectionPlanId", + "doc": "Specify the resource id of a DDoS network protection plan that will be associated with the virtual network of the cluster.", + "type": { + "$id": "1521", + "kind": "string", + "name": "armResourceIdentifier", + "crossLanguageDefinitionId": "Azure.Core.armResourceIdentifier", + "baseType": { + "$id": "1522", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedClusterProperties.ddosProtectionPlanId", + "serializationOptions": { + "$id": "1523", + "json": { + "$id": "1524", + "name": "ddosProtectionPlanId" + } + } + }, + { + "$id": "1525", + "kind": "property", + "name": "upgradeDescription", + "serializedName": "upgradeDescription", + "doc": "The policy to use when upgrading the cluster.", + "type": { + "$id": "1526", + "kind": "model", + "name": "ManagedClusterUpgradePolicy", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ClusterUpgradePolicy", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Describes the policy used when upgrading the cluster.", + "decorators": [], + "properties": [ + { + "$id": "1527", + "kind": "property", + "name": "forceRestart", + "serializedName": "forceRestart", + "doc": "If true, then processes are forcefully restarted during upgrade even when the code version has not changed (the upgrade only changes configuration or data).", + "type": { + "$id": "1528", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ClusterUpgradePolicy.forceRestart", + "serializationOptions": { + "$id": "1529", + "json": { + "$id": "1530", + "name": "forceRestart" + } + } + }, + { + "$id": "1531", + "kind": "property", + "name": "healthPolicy", + "serializedName": "healthPolicy", + "doc": "The cluster health policy defines a health policy used to evaluate the health of the cluster during a cluster upgrade.", + "type": { + "$id": "1532", + "kind": "model", + "name": "ManagedClusterHealthPolicy", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ClusterHealthPolicy", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Defines a health policy used to evaluate the health of the cluster or of a cluster node.", + "decorators": [], + "properties": [ + { + "$id": "1533", + "kind": "property", + "name": "maxPercentUnhealthyNodes", + "serializedName": "maxPercentUnhealthyNodes", + "doc": "The maximum allowed percentage of unhealthy nodes before reporting an error. For example, to allow 10% of nodes to be unhealthy, this value would be 10.\n\nThe percentage represents the maximum tolerated percentage of nodes that can be unhealthy before the cluster is considered in error.\nIf the percentage is respected but there is at least one unhealthy node, the health is evaluated as Warning.\nThe percentage is calculated by dividing the number of unhealthy nodes over the total number of nodes in the cluster.\nThe computation rounds up to tolerate one failure on small numbers of nodes. Default percentage is zero.\n\nIn large clusters, some nodes will always be down or out for repairs, so this percentage should be configured to tolerate that.", + "type": { + "$id": "1534", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ClusterHealthPolicy.maxPercentUnhealthyNodes", + "serializationOptions": { + "$id": "1535", + "json": { + "$id": "1536", + "name": "maxPercentUnhealthyNodes" + } + } + }, + { + "$id": "1537", + "kind": "property", + "name": "maxPercentUnhealthyApplications", + "serializedName": "maxPercentUnhealthyApplications", + "doc": "The maximum allowed percentage of unhealthy applications before reporting an error. For example, to allow 10% of applications to be unhealthy, this value would be 10.\n\nThe percentage represents the maximum tolerated percentage of applications that can be unhealthy before the cluster is considered in error.\nIf the percentage is respected but there is at least one unhealthy application, the health is evaluated as Warning.\nThis is calculated by dividing the number of unhealthy applications over the total number of application instances in the cluster, excluding applications of application types that are included in the ApplicationTypeHealthPolicyMap.\nThe computation rounds up to tolerate one failure on small numbers of applications. Default percentage is zero.", + "type": { + "$id": "1538", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ClusterHealthPolicy.maxPercentUnhealthyApplications", + "serializationOptions": { + "$id": "1539", + "json": { + "$id": "1540", + "name": "maxPercentUnhealthyApplications" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ClusterUpgradePolicy.healthPolicy", + "serializationOptions": { + "$id": "1541", + "json": { + "$id": "1542", + "name": "healthPolicy" + } + } + }, + { + "$id": "1543", + "kind": "property", + "name": "deltaHealthPolicy", + "serializedName": "deltaHealthPolicy", + "doc": "The cluster delta health policy defines a health policy used to evaluate the health of the cluster during a cluster upgrade.", + "type": { + "$id": "1544", + "kind": "model", + "name": "ManagedClusterUpgradeDeltaHealthPolicy", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ClusterUpgradeDeltaHealthPolicy", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Describes the delta health policies for the cluster upgrade.", + "decorators": [], + "properties": [ + { + "$id": "1545", + "kind": "property", + "name": "maxPercentDeltaUnhealthyNodes", + "serializedName": "maxPercentDeltaUnhealthyNodes", + "doc": "The maximum allowed percentage of nodes health degradation allowed during cluster upgrades.\nThe delta is measured between the state of the nodes at the beginning of upgrade and the state of the nodes at the time of the health evaluation.\nThe check is performed after every upgrade domain upgrade completion to make sure the global state of the cluster is within tolerated limits.", + "type": { + "$id": "1546", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ClusterUpgradeDeltaHealthPolicy.maxPercentDeltaUnhealthyNodes", + "serializationOptions": { + "$id": "1547", + "json": { + "$id": "1548", + "name": "maxPercentDeltaUnhealthyNodes" + } + } + }, + { + "$id": "1549", + "kind": "property", + "name": "maxPercentUpgradeDomainDeltaUnhealthyNodes", + "serializedName": "maxPercentUpgradeDomainDeltaUnhealthyNodes", + "doc": "The maximum allowed percentage of upgrade domain nodes health degradation allowed during cluster upgrades.\nThe delta is measured between the state of the upgrade domain nodes at the beginning of upgrade and the state of the upgrade domain nodes at the time of the health evaluation.\nThe check is performed after every upgrade domain upgrade completion for all completed upgrade domains to make sure the state of the upgrade domains is within tolerated limits.", + "type": { + "$id": "1550", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ClusterUpgradeDeltaHealthPolicy.maxPercentUpgradeDomainDeltaUnhealthyNodes", + "serializationOptions": { + "$id": "1551", + "json": { + "$id": "1552", + "name": "maxPercentUpgradeDomainDeltaUnhealthyNodes" + } + } + }, + { + "$id": "1553", + "kind": "property", + "name": "maxPercentDeltaUnhealthyApplications", + "serializedName": "maxPercentDeltaUnhealthyApplications", + "doc": "The maximum allowed percentage of applications health degradation allowed during cluster upgrades.\nThe delta is measured between the state of the applications at the beginning of upgrade and the state of the applications at the time of the health evaluation.\nThe check is performed after every upgrade domain upgrade completion to make sure the global state of the cluster is within tolerated limits. System services are not included in this.\nNOTE: This value will overwrite the value specified in properties.UpgradeDescription.HealthPolicy.MaxPercentUnhealthyApplications", + "type": { + "$id": "1554", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ClusterUpgradeDeltaHealthPolicy.maxPercentDeltaUnhealthyApplications", + "serializationOptions": { + "$id": "1555", + "json": { + "$id": "1556", + "name": "maxPercentDeltaUnhealthyApplications" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ClusterUpgradePolicy.deltaHealthPolicy", + "serializationOptions": { + "$id": "1557", + "json": { + "$id": "1558", + "name": "deltaHealthPolicy" + } + } + }, + { + "$id": "1559", + "kind": "property", + "name": "monitoringPolicy", + "serializedName": "monitoringPolicy", + "doc": "The cluster monitoring policy describes the parameters for monitoring an upgrade in Monitored mode.", + "type": { + "$id": "1560", + "kind": "model", + "name": "ManagedClusterMonitoringPolicy", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ClusterMonitoringPolicy", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Describes the monitoring policies for the cluster upgrade.", + "decorators": [], + "properties": [ + { + "$id": "1561", + "kind": "property", + "name": "healthCheckWaitDuration", + "serializedName": "healthCheckWaitDuration", + "doc": "The length of time to wait after completing an upgrade domain before performing health checks. The duration can be in either hh:mm:ss or in d.hh:mm:ss.ms format.", + "type": { + "$id": "1562", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ClusterMonitoringPolicy.healthCheckWaitDuration", + "serializationOptions": { + "$id": "1563", + "json": { + "$id": "1564", + "name": "healthCheckWaitDuration" + } + } + }, + { + "$id": "1565", + "kind": "property", + "name": "healthCheckStableDuration", + "serializedName": "healthCheckStableDuration", + "doc": "The amount of time that the application or cluster must remain healthy before the upgrade proceeds to the next upgrade domain. The duration can be in either hh:mm:ss or in d.hh:mm:ss.ms format.", + "type": { + "$id": "1566", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ClusterMonitoringPolicy.healthCheckStableDuration", + "serializationOptions": { + "$id": "1567", + "json": { + "$id": "1568", + "name": "healthCheckStableDuration" + } + } + }, + { + "$id": "1569", + "kind": "property", + "name": "healthCheckRetryTimeout", + "serializedName": "healthCheckRetryTimeout", + "doc": "The amount of time to retry health evaluation when the application or cluster is unhealthy before the upgrade rolls back. The timeout can be in either hh:mm:ss or in d.hh:mm:ss.ms format.", + "type": { + "$id": "1570", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ClusterMonitoringPolicy.healthCheckRetryTimeout", + "serializationOptions": { + "$id": "1571", + "json": { + "$id": "1572", + "name": "healthCheckRetryTimeout" + } + } + }, + { + "$id": "1573", + "kind": "property", + "name": "upgradeTimeout", + "serializedName": "upgradeTimeout", + "doc": "The amount of time the overall upgrade has to complete before the upgrade rolls back. The timeout can be in either hh:mm:ss or in d.hh:mm:ss.ms format.", + "type": { + "$id": "1574", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ClusterMonitoringPolicy.upgradeTimeout", + "serializationOptions": { + "$id": "1575", + "json": { + "$id": "1576", + "name": "upgradeTimeout" + } + } + }, + { + "$id": "1577", + "kind": "property", + "name": "upgradeDomainTimeout", + "serializedName": "upgradeDomainTimeout", + "doc": "The amount of time each upgrade domain has to complete before the upgrade rolls back. The timeout can be in either hh:mm:ss or in d.hh:mm:ss.ms format.", + "type": { + "$id": "1578", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ClusterMonitoringPolicy.upgradeDomainTimeout", + "serializationOptions": { + "$id": "1579", + "json": { + "$id": "1580", + "name": "upgradeDomainTimeout" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ClusterUpgradePolicy.monitoringPolicy", + "serializationOptions": { + "$id": "1581", + "json": { + "$id": "1582", + "name": "monitoringPolicy" + } + } + }, + { + "$id": "1583", + "kind": "property", + "name": "upgradeReplicaSetCheckTimeout", + "serializedName": "upgradeReplicaSetCheckTimeout", + "doc": "The maximum amount of time to block processing of an upgrade domain and prevent loss of availability when there are unexpected issues.\nWhen this timeout expires, processing of the upgrade domain will proceed regardless of availability loss issues.\nThe timeout is reset at the start of each upgrade domain. The timeout can be in either hh:mm:ss or in d.hh:mm:ss.ms format.\nThis value must be between 00:00:00 and 49710.06:28:15 (unsigned 32 bit integer for seconds)", + "type": { + "$id": "1584", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ClusterUpgradePolicy.upgradeReplicaSetCheckTimeout", + "serializationOptions": { + "$id": "1585", + "json": { + "$id": "1586", + "name": "upgradeReplicaSetCheckTimeout" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedClusterProperties.upgradeDescription", + "serializationOptions": { + "$id": "1587", + "json": { + "$id": "1588", + "name": "upgradeDescription" + } + } + }, + { + "$id": "1589", + "kind": "property", + "name": "httpGatewayTokenAuthConnectionPort", + "serializedName": "httpGatewayTokenAuthConnectionPort", + "doc": "The port used for token-auth based HTTPS connections to the cluster. Cannot be set to the same port as HttpGatewayEndpoint.", + "type": { + "$id": "1590", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedClusterProperties.httpGatewayTokenAuthConnectionPort", + "serializationOptions": { + "$id": "1591", + "json": { + "$id": "1592", + "name": "httpGatewayTokenAuthConnectionPort" + } + } + }, + { + "$id": "1593", + "kind": "property", + "name": "IsHttpGatewayExclusiveAuthModeEnabled", + "serializedName": "enableHttpGatewayExclusiveAuthMode", + "doc": "If true, token-based authentication is not allowed on the HttpGatewayEndpoint. This is required to support TLS versions 1.3 and above. If token-based authentication is used, HttpGatewayTokenAuthConnectionPort must be defined.", + "type": { + "$id": "1594", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedClusterProperties.enableHttpGatewayExclusiveAuthMode", + "serializationOptions": { + "$id": "1595", + "json": { + "$id": "1596", + "name": "enableHttpGatewayExclusiveAuthMode" + } + } + }, + { + "$id": "1597", + "kind": "property", + "name": "autoGeneratedDomainNameLabelScope", + "serializedName": "autoGeneratedDomainNameLabelScope", + "doc": "This property is the entry point to using a public CA cert for your cluster cert. It specifies the level of reuse allowed for the custom FQDN created, matching the subject of the public CA cert.", + "type": { + "$ref": "238" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedClusterProperties.autoGeneratedDomainNameLabelScope", + "serializationOptions": { + "$id": "1598", + "json": { + "$id": "1599", + "name": "autoGeneratedDomainNameLabelScope" + } + } + }, + { + "$id": "1600", + "kind": "property", + "name": "allocatedOutboundPorts", + "serializedName": "allocatedOutboundPorts", + "doc": "The number of outbound ports allocated for SNAT for each node in the backend pool of the default load balancer. The default value is 0 which provides dynamic port allocation based on pool size.", + "type": { + "$id": "1601", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedClusterProperties.allocatedOutboundPorts", + "serializationOptions": { + "$id": "1602", + "json": { + "$id": "1603", + "name": "allocatedOutboundPorts" + } + } + }, + { + "$id": "1604", + "kind": "property", + "name": "VMImage", + "serializedName": "VMImage", + "doc": "The VM image the node types are configured with. This property controls the Service Fabric component packages to be used for the cluster. Allowed values are: 'Windows'. The default value is 'Windows'.", + "type": { + "$id": "1605", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedClusterProperties.VMImage", + "serializationOptions": { + "$id": "1606", + "json": { + "$id": "1607", + "name": "VMImage" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": true, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedCluster.properties", + "serializationOptions": { + "$id": "1608", + "json": { + "$id": "1609", + "name": "properties" + } + } + }, + { + "$id": "1610", + "kind": "path", + "name": "name", + "serializedName": "name", + "doc": "The name of the cluster resource.", + "type": { + "$id": "1611", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": true, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedCluster.name", + "discriminator": false, + "flatten": false + }, + { + "$id": "1612", + "kind": "property", + "name": "etag", + "serializedName": "etag", + "doc": "If eTag is provided in the response body, it may also be provided as a header per the normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields.\",", + "type": { + "$id": "1613", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedCluster.etag", + "serializationOptions": { + "$id": "1614", + "json": { + "$id": "1615", + "name": "etag" + } + } + }, + { + "$id": "1616", + "kind": "property", + "name": "sku", + "serializedName": "sku", + "doc": "The sku of the managed cluster", + "type": { + "$id": "1617", + "kind": "model", + "name": "Sku", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.Sku", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Service Fabric managed cluster Sku definition", + "decorators": [], + "properties": [ + { + "$id": "1618", + "kind": "property", + "name": "name", + "serializedName": "name", + "doc": "Sku Name.", + "type": { + "$ref": "248" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.Sku.name", + "serializationOptions": { + "$id": "1619", + "json": { + "$id": "1620", + "name": "name" + } + } + } + ] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedCluster.sku", + "serializationOptions": { + "$id": "1621", + "json": { + "$id": "1622", + "name": "sku" + } + } + } + ] + }, + { + "$ref": "1202" + }, + { + "$ref": "1247" + }, + { + "$ref": "1282" + }, + { + "$ref": "1344" + }, + { + "$ref": "1364" + }, + { + "$ref": "1382" + }, + { + "$ref": "1389" + }, + { + "$ref": "1428" + }, + { + "$ref": "1445" + }, + { + "$ref": "1467" + }, + { + "$ref": "1491" + }, + { + "$ref": "1526" + }, + { + "$ref": "1532" + }, + { + "$ref": "1544" + }, + { + "$ref": "1560" + }, + { + "$ref": "1617" + }, + { + "$ref": "1190" + }, + { + "$id": "1623", + "kind": "model", + "name": "ManagedClusterUpdateParameters", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedClusterUpdateParameters", + "usage": "Input,Json", + "doc": "Managed cluster update request", + "decorators": [], + "properties": [ + { + "$id": "1624", + "kind": "property", + "name": "tags", + "serializedName": "tags", + "doc": "Managed cluster update parameters", + "type": { + "$id": "1625", + "kind": "dict", + "keyType": { + "$id": "1626", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "valueType": { + "$id": "1627", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedClusterUpdateParameters.tags", + "serializationOptions": { + "$id": "1628", + "json": { + "$id": "1629", + "name": "tags" + } + } + } + ] + }, + { + "$id": "1630", + "kind": "model", + "name": "ManagedClusterListResult", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Azure.ResourceManager.ResourceListResult", + "usage": "Output,Json", + "doc": "The response of a ManagedCluster list operation.", + "decorators": [], + "properties": [ + { + "$id": "1631", + "kind": "property", + "name": "value", + "serializedName": "value", + "doc": "The ManagedCluster items on this page", + "type": { + "$id": "1632", + "kind": "array", + "name": "ArrayManagedCluster", + "valueType": { + "$ref": "1189" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.ResourceListResult.value", + "serializationOptions": { + "$id": "1633", + "json": { + "$id": "1634", + "name": "value" + } + } + }, + { + "$id": "1635", + "kind": "property", + "name": "nextLink", + "serializedName": "nextLink", + "doc": "The link to the next page of items", + "type": { + "$id": "1636", + "kind": "url", + "name": "ResourceLocation", + "crossLanguageDefinitionId": "TypeSpec.Rest.ResourceLocation", + "baseType": { + "$id": "1637", + "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": "1638", + "json": { + "$id": "1639", + "name": "nextLink" + } + } + } + ] + }, + { + "$id": "1640", + "kind": "model", + "name": "FaultSimulationIdContent", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.FaultSimulationIdContent", + "usage": "Input,Json", + "doc": "Parameters for Fault Simulation id.", + "decorators": [], + "properties": [ + { + "$id": "1641", + "kind": "property", + "name": "simulationId", + "serializedName": "simulationId", + "doc": "unique identifier for the fault simulation.", + "type": { + "$id": "1642", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.FaultSimulationIdContent.simulationId", + "serializationOptions": { + "$id": "1643", + "json": { + "$id": "1644", + "name": "simulationId" + } + } + } + ] + }, + { + "$id": "1645", + "kind": "model", + "name": "FaultSimulation", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.FaultSimulation", + "usage": "Output,Json,LroFinalEnvelope", + "doc": "Fault simulation object with status.", + "decorators": [], + "properties": [ + { + "$id": "1646", + "kind": "property", + "name": "simulationId", + "serializedName": "simulationId", + "doc": "unique identifier for the fault simulation.", + "type": { + "$id": "1647", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.FaultSimulation.simulationId", + "serializationOptions": { + "$id": "1648", + "json": { + "$id": "1649", + "name": "simulationId" + } + } + }, + { + "$id": "1650", + "kind": "property", + "name": "status", + "serializedName": "status", + "doc": "Fault simulation status", + "type": { + "$ref": "254" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.FaultSimulation.status", + "serializationOptions": { + "$id": "1651", + "json": { + "$id": "1652", + "name": "status" + } + } + }, + { + "$id": "1653", + "kind": "property", + "name": "startTime", + "serializedName": "startTime", + "doc": "The start time of the fault simulation.", + "type": { + "$id": "1654", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "rfc3339", + "wireType": { + "$id": "1655", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.FaultSimulation.startTime", + "serializationOptions": { + "$id": "1656", + "json": { + "$id": "1657", + "name": "startTime" + } + } + }, + { + "$id": "1658", + "kind": "property", + "name": "endTime", + "serializedName": "endTime", + "doc": "The end time of the fault simulation.", + "type": { + "$id": "1659", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "rfc3339", + "wireType": { + "$id": "1660", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.FaultSimulation.endTime", + "serializationOptions": { + "$id": "1661", + "json": { + "$id": "1662", + "name": "endTime" + } + } + }, + { + "$id": "1663", + "kind": "property", + "name": "details", + "serializedName": "details", + "doc": "Fault simulation details", + "type": { + "$id": "1664", + "kind": "model", + "name": "FaultSimulationDetails", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.FaultSimulationDetails", + "usage": "Output,Json,LroFinalEnvelope", + "doc": "Details for Fault Simulation.", + "decorators": [], + "properties": [ + { + "$id": "1665", + "kind": "property", + "name": "clusterId", + "serializedName": "clusterId", + "doc": "unique identifier for the cluster resource.", + "type": { + "$id": "1666", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.FaultSimulationDetails.clusterId", + "serializationOptions": { + "$id": "1667", + "json": { + "$id": "1668", + "name": "clusterId" + } + } + }, + { + "$id": "1669", + "kind": "property", + "name": "operationId", + "serializedName": "operationId", + "doc": "unique identifier for the operation associated with the fault simulation.", + "type": { + "$id": "1670", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.FaultSimulationDetails.operationId", + "serializationOptions": { + "$id": "1671", + "json": { + "$id": "1672", + "name": "operationId" + } + } + }, + { + "$id": "1673", + "kind": "property", + "name": "nodeTypeFaultSimulation", + "serializedName": "nodeTypeFaultSimulation", + "doc": "List of node type simulations associated with the cluster fault simulation.", + "type": { + "$id": "1674", + "kind": "array", + "name": "ArrayNodeTypeFaultSimulation", + "valueType": { + "$id": "1675", + "kind": "model", + "name": "NodeTypeFaultSimulation", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypeFaultSimulation", + "usage": "Output,Json,LroFinalEnvelope", + "doc": "Node type fault simulation object with status.", + "decorators": [], + "properties": [ + { + "$id": "1676", + "kind": "property", + "name": "nodeTypeName", + "serializedName": "nodeTypeName", + "doc": "Node type name.", + "type": { + "$id": "1677", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypeFaultSimulation.nodeTypeName", + "serializationOptions": { + "$id": "1678", + "json": { + "$id": "1679", + "name": "nodeTypeName" + } + } + }, + { + "$id": "1680", + "kind": "property", + "name": "status", + "serializedName": "status", + "doc": "Fault simulation status", + "type": { + "$ref": "254" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypeFaultSimulation.status", + "serializationOptions": { + "$id": "1681", + "json": { + "$id": "1682", + "name": "status" + } + } + }, + { + "$id": "1683", + "kind": "property", + "name": "operationId", + "serializedName": "operationId", + "doc": "Current or latest asynchronous operation identifier on the node type.", + "type": { + "$id": "1684", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypeFaultSimulation.operationId", + "serializationOptions": { + "$id": "1685", + "json": { + "$id": "1686", + "name": "operationId" + } + } + }, + { + "$id": "1687", + "kind": "property", + "name": "operationStatus", + "serializedName": "operationStatus", + "doc": "Current or latest asynchronous operation status on the node type", + "type": { + "$ref": "268" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypeFaultSimulation.operationStatus", + "serializationOptions": { + "$id": "1688", + "json": { + "$id": "1689", + "name": "operationStatus" + } + } + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.FaultSimulationDetails.nodeTypeFaultSimulation", + "serializationOptions": { + "$id": "1690", + "json": { + "$id": "1691", + "name": "nodeTypeFaultSimulation" + } + } + }, + { + "$id": "1692", + "kind": "property", + "name": "parameters", + "serializedName": "parameters", + "doc": "Fault simulation parameters.", + "type": { + "$id": "1693", + "kind": "model", + "name": "FaultSimulationContent", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.FaultSimulationContent", + "usage": "Input,Output,Json,LroFinalEnvelope", + "doc": "Parameters for Fault Simulation action.", + "decorators": [], + "discriminatorProperty": { + "$id": "1694", + "kind": "property", + "name": "faultKind", + "serializedName": "faultKind", + "doc": "The kind of fault to be simulated.", + "type": { + "$ref": "282" + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.FaultSimulationContent.faultKind", + "serializationOptions": { + "$id": "1695", + "json": { + "$id": "1696", + "name": "faultKind" + } + } + }, + "properties": [ + { + "$ref": "1694" + }, + { + "$id": "1697", + "kind": "property", + "name": "force", + "serializedName": "force", + "doc": "Force the action to go through without any check on the cluster.", + "type": { + "$id": "1698", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.FaultSimulationContent.force", + "serializationOptions": { + "$id": "1699", + "json": { + "$id": "1700", + "name": "force" + } + } + }, + { + "$id": "1701", + "kind": "property", + "name": "constraints", + "serializedName": "constraints", + "doc": "Constraints for Fault Simulation action.", + "type": { + "$id": "1702", + "kind": "model", + "name": "FaultSimulationConstraints", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.FaultSimulationConstraints", + "usage": "Input,Output,Json,LroFinalEnvelope", + "doc": "Constraints for Fault Simulation action.", + "decorators": [], + "properties": [ + { + "$id": "1703", + "kind": "property", + "name": "expirationTime", + "serializedName": "expirationTime", + "doc": "The absolute expiration timestamp (UTC) after which this fault simulation should be stopped if it's still active.", + "type": { + "$id": "1704", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "rfc3339", + "wireType": { + "$id": "1705", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.FaultSimulationConstraints.expirationTime", + "serializationOptions": { + "$id": "1706", + "json": { + "$id": "1707", + "name": "expirationTime" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.FaultSimulationContent.constraints", + "serializationOptions": { + "$id": "1708", + "json": { + "$id": "1709", + "name": "constraints" + } + } + } + ], + "discriminatedSubtypes": { + "$id": "1710", + "Zone": { + "$id": "1711", + "kind": "model", + "name": "ZoneFaultSimulationContent", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ZoneFaultSimulationContent", + "usage": "Input,Output,Json,LroFinalEnvelope", + "doc": "Parameters for Zone Fault Simulation action.", + "discriminatorValue": "Zone", + "decorators": [], + "baseModel": { + "$ref": "1693" + }, + "properties": [ + { + "$id": "1712", + "kind": "property", + "name": "zones", + "serializedName": "zones", + "doc": "Indicates the zones of the fault simulation.", + "type": { + "$id": "1713", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "1714", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ZoneFaultSimulationContent.zones", + "serializationOptions": { + "$id": "1715", + "json": { + "$id": "1716", + "name": "zones" + } + } + }, + { + "$id": "1717", + "kind": "property", + "name": "faultKind", + "serializedName": "faultKind", + "doc": "The kind of fault simulation.", + "type": { + "$id": "1718", + "kind": "constant", + "valueType": { + "$id": "1719", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "Zone", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ZoneFaultSimulationContent.faultKind", + "serializationOptions": { + "$id": "1720", + "json": { + "$id": "1721", + "name": "faultKind" + } + } + } + ] + } + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.FaultSimulationDetails.parameters", + "serializationOptions": { + "$id": "1722", + "json": { + "$id": "1723", + "name": "parameters" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.FaultSimulation.details", + "serializationOptions": { + "$id": "1724", + "json": { + "$id": "1725", + "name": "details" + } + } + } + ] + }, + { + "$ref": "1664" + }, + { + "$ref": "1675" + }, + { + "$ref": "1693" + }, + { + "$ref": "1702" + }, + { + "$ref": "1711" + }, + { + "$id": "1726", + "kind": "model", + "name": "FaultSimulationListResult", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.FaultSimulationListResult", + "usage": "Output,Json", + "doc": "Fault simulation list results", + "decorators": [], + "properties": [ + { + "$id": "1727", + "kind": "property", + "name": "value", + "serializedName": "value", + "doc": "The FaultSimulation items on this page", + "type": { + "$id": "1728", + "kind": "array", + "name": "ArrayFaultSimulation", + "valueType": { + "$ref": "1645" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.FaultSimulationListResult.value", + "serializationOptions": { + "$id": "1729", + "json": { + "$id": "1730", + "name": "value" + } + } + }, + { + "$id": "1731", + "kind": "property", + "name": "nextLink", + "serializedName": "nextLink", + "doc": "The link to the next page of items", + "type": { + "$id": "1732", + "kind": "url", + "name": "ResourceLocation", + "crossLanguageDefinitionId": "TypeSpec.Rest.ResourceLocation", + "baseType": { + "$id": "1733", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.FaultSimulationListResult.nextLink", + "serializationOptions": { + "$id": "1734", + "json": { + "$id": "1735", + "name": "nextLink" + } + } + } + ] + }, + { + "$id": "1736", + "kind": "model", + "name": "FaultSimulationContentWrapper", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.FaultSimulationContentWrapper", + "usage": "Input,Json", + "doc": "Fault Simulation Request for Start action.", + "decorators": [], + "properties": [ + { + "$id": "1737", + "kind": "property", + "name": "parameters", + "serializedName": "parameters", + "doc": "Parameters for Fault Simulation start action.", + "type": { + "$ref": "1693" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.FaultSimulationContentWrapper.parameters", + "serializationOptions": { + "$id": "1738", + "json": { + "$id": "1739", + "name": "parameters" + } + } + } + ] + }, + { + "$id": "1740", + "kind": "model", + "name": "ManagedAzResiliencyStatus", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedAzResiliencyStatusContent", + "usage": "Output,Json", + "doc": "Describes the result of the request to list Managed VM Sizes for Service Fabric Managed Clusters.", + "decorators": [], + "properties": [ + { + "$id": "1741", + "kind": "property", + "name": "baseResourceStatus", + "serializedName": "baseResourceStatus", + "doc": "List of Managed VM Sizes for Service Fabric Managed Clusters.", + "type": { + "$id": "1742", + "kind": "array", + "name": "ArrayResourceAzStatus", + "valueType": { + "$id": "1743", + "kind": "model", + "name": "ResourceAzStatus", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ResourceAzStatus", + "usage": "Output,Json", + "doc": "Describes Az Resiliency status of Base resources", + "decorators": [], + "properties": [ + { + "$id": "1744", + "kind": "property", + "name": "resourceName", + "serializedName": "resourceName", + "doc": "VM Size properties.", + "type": { + "$id": "1745", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ResourceAzStatus.resourceName", + "serializationOptions": { + "$id": "1746", + "json": { + "$id": "1747", + "name": "resourceName" + } + } + }, + { + "$id": "1748", + "kind": "property", + "name": "-|resource-type", + "serializedName": "resourceType", + "doc": "VM Size id.", + "type": { + "$id": "1749", + "kind": "string", + "name": "armResourceType", + "crossLanguageDefinitionId": "Azure.Core.armResourceType", + "baseType": { + "$id": "1750", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ResourceAzStatus.resourceType", + "serializationOptions": { + "$id": "1751", + "json": { + "$id": "1752", + "name": "resourceType" + } + } + }, + { + "$id": "1753", + "kind": "property", + "name": "isZoneResilient", + "serializedName": "isZoneResilient", + "doc": "VM Size name.", + "type": { + "$id": "1754", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ResourceAzStatus.isZoneResilient", + "serializationOptions": { + "$id": "1755", + "json": { + "$id": "1756", + "name": "isZoneResilient" + } + } + }, + { + "$id": "1757", + "kind": "property", + "name": "details", + "serializedName": "details", + "doc": "Zone resiliency status details for the resource.", + "type": { + "$id": "1758", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ResourceAzStatus.details", + "serializationOptions": { + "$id": "1759", + "json": { + "$id": "1760", + "name": "details" + } + } + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedAzResiliencyStatusContent.baseResourceStatus", + "serializationOptions": { + "$id": "1761", + "json": { + "$id": "1762", + "name": "baseResourceStatus" + } + } + }, + { + "$id": "1763", + "kind": "property", + "name": "isClusterZoneResilient", + "serializedName": "isClusterZoneResilient", + "doc": "URL to get the next set of Managed VM Sizes if there are any.", + "type": { + "$id": "1764", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedAzResiliencyStatusContent.isClusterZoneResilient", + "serializationOptions": { + "$id": "1765", + "json": { + "$id": "1766", + "name": "isClusterZoneResilient" + } + } + } + ] + }, + { + "$ref": "1743" + }, + { + "$id": "1767", + "kind": "model", + "name": "ManagedMaintenanceWindowStatus", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedMaintenanceWindowStatusContent", + "usage": "Output,Json", + "doc": "Describes the maintenance window status of the Service Fabric Managed Cluster.", + "decorators": [], + "properties": [ + { + "$id": "1768", + "kind": "property", + "name": "isWindowEnabled", + "serializedName": "isWindowEnabled", + "doc": "If maintenance window is enabled on this cluster.", + "type": { + "$id": "1769", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedMaintenanceWindowStatusContent.isWindowEnabled", + "serializationOptions": { + "$id": "1770", + "json": { + "$id": "1771", + "name": "isWindowEnabled" + } + } + }, + { + "$id": "1772", + "kind": "property", + "name": "isRegionReady", + "serializedName": "isRegionReady", + "doc": "Indicates if the region is ready to configure maintenance windows.", + "type": { + "$id": "1773", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedMaintenanceWindowStatusContent.isRegionReady", + "serializationOptions": { + "$id": "1774", + "json": { + "$id": "1775", + "name": "isRegionReady" + } + } + }, + { + "$id": "1776", + "kind": "property", + "name": "isWindowActive", + "serializedName": "isWindowActive", + "doc": "If maintenance window is active.", + "type": { + "$id": "1777", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedMaintenanceWindowStatusContent.isWindowActive", + "serializationOptions": { + "$id": "1778", + "json": { + "$id": "1779", + "name": "isWindowActive" + } + } + }, + { + "$id": "1780", + "kind": "property", + "name": "canApplyUpdates", + "serializedName": "canApplyUpdates", + "doc": "If updates can be applied.", + "type": { + "$id": "1781", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedMaintenanceWindowStatusContent.canApplyUpdates", + "serializationOptions": { + "$id": "1782", + "json": { + "$id": "1783", + "name": "canApplyUpdates" + } + } + }, + { + "$id": "1784", + "kind": "property", + "name": "LastWindowStatusUpdatedOn", + "serializedName": "lastWindowStatusUpdateAtUTC", + "doc": "Last window update time in UTC.", + "type": { + "$id": "1785", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "rfc3339", + "wireType": { + "$id": "1786", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedMaintenanceWindowStatusContent.lastWindowStatusUpdateAtUTC", + "serializationOptions": { + "$id": "1787", + "json": { + "$id": "1788", + "name": "lastWindowStatusUpdateAtUTC" + } + } + }, + { + "$id": "1789", + "kind": "property", + "name": "LastWindowStartOn", + "serializedName": "lastWindowStartTimeUTC", + "doc": "Last window start time in UTC.", + "type": { + "$id": "1790", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "rfc3339", + "wireType": { + "$id": "1791", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedMaintenanceWindowStatusContent.lastWindowStartTimeUTC", + "serializationOptions": { + "$id": "1792", + "json": { + "$id": "1793", + "name": "lastWindowStartTimeUTC" + } + } + }, + { + "$id": "1794", + "kind": "property", + "name": "LastWindowEndOn", + "serializedName": "lastWindowEndTimeUTC", + "doc": "Last window end time in UTC.", + "type": { + "$id": "1795", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "rfc3339", + "wireType": { + "$id": "1796", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedMaintenanceWindowStatusContent.lastWindowEndTimeUTC", + "serializationOptions": { + "$id": "1797", + "json": { + "$id": "1798", + "name": "lastWindowEndTimeUTC" + } + } + } + ] + }, + { + "$id": "1799", + "kind": "model", + "name": "ServiceFabricManagedNodeType", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeType", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Describes a node type in the cluster, each node type represents sub set of nodes in the cluster.", + "decorators": [], + "baseModel": { + "$ref": "450" + }, + "properties": [ + { + "$id": "1800", + "kind": "property", + "name": "properties", + "serializedName": "properties", + "doc": "The node type properties", + "type": { + "$id": "1801", + "kind": "model", + "name": "NodeTypeProperties", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypeProperties", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Describes a node type in the cluster, each node type represents sub set of nodes in the cluster.", + "decorators": [], + "properties": [ + { + "$id": "1802", + "kind": "property", + "name": "isPrimary", + "serializedName": "isPrimary", + "doc": "Indicates the Service Fabric system services for the cluster will run on this node type. This setting cannot be changed once the node type is created.", + "type": { + "$id": "1803", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypeProperties.isPrimary", + "serializationOptions": { + "$id": "1804", + "json": { + "$id": "1805", + "name": "isPrimary" + } + } + }, + { + "$id": "1806", + "kind": "property", + "name": "vmInstanceCount", + "serializedName": "vmInstanceCount", + "doc": "The number of nodes in the node type. **Values:** -1 - Use when auto scale rules are configured or sku.capacity is defined 0 - Not supported >0 - Use for manual scale.", + "type": { + "$id": "1807", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypeProperties.vmInstanceCount", + "serializationOptions": { + "$id": "1808", + "json": { + "$id": "1809", + "name": "vmInstanceCount" + } + } + }, + { + "$id": "1810", + "kind": "property", + "name": "DataDiskSizeInGB", + "serializedName": "dataDiskSizeGB", + "doc": "Disk size for the managed disk attached to the vms on the node type in GBs.", + "type": { + "$id": "1811", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypeProperties.dataDiskSizeGB", + "serializationOptions": { + "$id": "1812", + "json": { + "$id": "1813", + "name": "dataDiskSizeGB" + } + } + }, + { + "$id": "1814", + "kind": "property", + "name": "dataDiskType", + "serializedName": "dataDiskType", + "doc": "Managed data disk type. Specifies the storage account type for the managed disk", + "type": { + "$ref": "286" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypeProperties.dataDiskType", + "serializationOptions": { + "$id": "1815", + "json": { + "$id": "1816", + "name": "dataDiskType" + } + } + }, + { + "$id": "1817", + "kind": "property", + "name": "dataDiskLetter", + "serializedName": "dataDiskLetter", + "doc": "Managed data disk letter. It can not use the reserved letter C or D and it can not change after created.", + "type": { + "$id": "1818", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypeProperties.dataDiskLetter", + "serializationOptions": { + "$id": "1819", + "json": { + "$id": "1820", + "name": "dataDiskLetter" + } + } + }, + { + "$id": "1821", + "kind": "property", + "name": "placementProperties", + "serializedName": "placementProperties", + "doc": "The placement tags applied to nodes in the node type, which can be used to indicate where certain services (workload) should run.", + "type": { + "$id": "1822", + "kind": "dict", + "keyType": { + "$id": "1823", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "valueType": { + "$id": "1824", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypeProperties.placementProperties", + "serializationOptions": { + "$id": "1825", + "json": { + "$id": "1826", + "name": "placementProperties" + } + } + }, + { + "$id": "1827", + "kind": "property", + "name": "capacities", + "serializedName": "capacities", + "doc": "The capacity tags applied to the nodes in the node type, the cluster resource manager uses these tags to understand how much resource a node has.", + "type": { + "$id": "1828", + "kind": "dict", + "keyType": { + "$id": "1829", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "valueType": { + "$id": "1830", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypeProperties.capacities", + "serializationOptions": { + "$id": "1831", + "json": { + "$id": "1832", + "name": "capacities" + } + } + }, + { + "$id": "1833", + "kind": "property", + "name": "applicationPorts", + "serializedName": "applicationPorts", + "doc": "The range of ports from which cluster assigned port to Service Fabric applications.", + "type": { + "$id": "1834", + "kind": "model", + "name": "EndpointRangeDescription", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.EndpointRangeDescription", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Port range details", + "decorators": [], + "properties": [ + { + "$id": "1835", + "kind": "property", + "name": "startPort", + "serializedName": "startPort", + "doc": "Starting port of a range of ports", + "type": { + "$id": "1836", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.EndpointRangeDescription.startPort", + "serializationOptions": { + "$id": "1837", + "json": { + "$id": "1838", + "name": "startPort" + } + } + }, + { + "$id": "1839", + "kind": "property", + "name": "endPort", + "serializedName": "endPort", + "doc": "End port of a range of ports", + "type": { + "$id": "1840", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.EndpointRangeDescription.endPort", + "serializationOptions": { + "$id": "1841", + "json": { + "$id": "1842", + "name": "endPort" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypeProperties.applicationPorts", + "serializationOptions": { + "$id": "1843", + "json": { + "$id": "1844", + "name": "applicationPorts" + } + } + }, + { + "$id": "1845", + "kind": "property", + "name": "ephemeralPorts", + "serializedName": "ephemeralPorts", + "doc": "The range of ephemeral ports that nodes in this node type should be configured with.", + "type": { + "$ref": "1834" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypeProperties.ephemeralPorts", + "serializationOptions": { + "$id": "1846", + "json": { + "$id": "1847", + "name": "ephemeralPorts" + } + } + }, + { + "$id": "1848", + "kind": "property", + "name": "vmSize", + "serializedName": "vmSize", + "doc": "The size of virtual machines in the pool. All virtual machines in a pool are the same size. For example, Standard_D3.", + "type": { + "$id": "1849", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypeProperties.vmSize", + "serializationOptions": { + "$id": "1850", + "json": { + "$id": "1851", + "name": "vmSize" + } + } + }, + { + "$id": "1852", + "kind": "property", + "name": "vmImagePublisher", + "serializedName": "vmImagePublisher", + "doc": "The publisher of the Azure Virtual Machines Marketplace image. For example, Canonical or MicrosoftWindowsServer.", + "type": { + "$id": "1853", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypeProperties.vmImagePublisher", + "serializationOptions": { + "$id": "1854", + "json": { + "$id": "1855", + "name": "vmImagePublisher" + } + } + }, + { + "$id": "1856", + "kind": "property", + "name": "vmImageOffer", + "serializedName": "vmImageOffer", + "doc": "The offer type of the Azure Virtual Machines Marketplace image. For example, UbuntuServer or WindowsServer.", + "type": { + "$id": "1857", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypeProperties.vmImageOffer", + "serializationOptions": { + "$id": "1858", + "json": { + "$id": "1859", + "name": "vmImageOffer" + } + } + }, + { + "$id": "1860", + "kind": "property", + "name": "vmImageSku", + "serializedName": "vmImageSku", + "doc": "The SKU of the Azure Virtual Machines Marketplace image. For example, 14.04.0-LTS or 2012-R2-Datacenter.", + "type": { + "$id": "1861", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypeProperties.vmImageSku", + "serializationOptions": { + "$id": "1862", + "json": { + "$id": "1863", + "name": "vmImageSku" + } + } + }, + { + "$id": "1864", + "kind": "property", + "name": "vmImageVersion", + "serializedName": "vmImageVersion", + "doc": "The version of the Azure Virtual Machines Marketplace image. A value of 'latest' can be specified to select the latest version of an image. If omitted, the default is 'latest'.", + "type": { + "$id": "1865", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypeProperties.vmImageVersion", + "serializationOptions": { + "$id": "1866", + "json": { + "$id": "1867", + "name": "vmImageVersion" + } + } + }, + { + "$id": "1868", + "kind": "property", + "name": "vmSecrets", + "serializedName": "vmSecrets", + "doc": "The secrets to install in the virtual machines.", + "type": { + "$id": "1869", + "kind": "array", + "name": "ArrayVaultSecretGroup", + "valueType": { + "$id": "1870", + "kind": "model", + "name": "NodeTypeVaultSecretGroup", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.VaultSecretGroup", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Specifies set of certificates that should be installed onto the virtual machines.", + "decorators": [], + "properties": [ + { + "$id": "1871", + "kind": "property", + "name": "sourceVault", + "serializedName": "sourceVault", + "doc": "The relative URL of the Key Vault containing all of the certificates in VaultCertificates.", + "type": { + "$id": "1872", + "kind": "model", + "name": "SubResource", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.SubResource", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Azure resource identifier.", + "decorators": [], + "properties": [ + { + "$id": "1873", + "kind": "property", + "name": "id", + "serializedName": "id", + "doc": "Azure resource identifier.", + "type": { + "$id": "1874", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.SubResource.id", + "serializationOptions": { + "$id": "1875", + "json": { + "$id": "1876", + "name": "id" + } + } + } + ] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.VaultSecretGroup.sourceVault", + "serializationOptions": { + "$id": "1877", + "json": { + "$id": "1878", + "name": "sourceVault" + } + } + }, + { + "$id": "1879", + "kind": "property", + "name": "vaultCertificates", + "serializedName": "vaultCertificates", + "doc": "The list of key vault references in SourceVault which contain certificates.", + "type": { + "$id": "1880", + "kind": "array", + "name": "ArrayVaultCertificate", + "valueType": { + "$id": "1881", + "kind": "model", + "name": "NodeTypeVaultCertificate", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.VaultCertificate", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Describes a single certificate reference in a Key Vault, and where the certificate should reside on the VM.", + "decorators": [], + "properties": [ + { + "$id": "1882", + "kind": "property", + "name": "certificateUrl", + "serializedName": "certificateUrl", + "doc": "This is the URL of a certificate that has been uploaded to Key Vault as a secret. For adding a secret to the Key Vault, see [Add a key or secret to the key vault](https://docs.microsoft.com/azure/key-vault/key-vault-get-started/#add).", + "type": { + "$id": "1883", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.VaultCertificate.certificateUrl", + "serializationOptions": { + "$id": "1884", + "json": { + "$id": "1885", + "name": "certificateUrl" + } + } + }, + { + "$id": "1886", + "kind": "property", + "name": "certificateStore", + "serializedName": "certificateStore", + "doc": "For Windows VMs, specifies the certificate store on the Virtual Machine to which the certificate should be added. The specified certificate store is implicitly in the LocalMachine account. For Linux VMs, the certificate file is placed under the /var/lib/waagent directory, with the file name {UppercaseThumbprint}.crt for the X509 certificate file and {UppercaseThumbprint}.prv for private key. Both of these files are .pem formatted.", + "type": { + "$id": "1887", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.VaultCertificate.certificateStore", + "serializationOptions": { + "$id": "1888", + "json": { + "$id": "1889", + "name": "certificateStore" + } + } + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.VaultSecretGroup.vaultCertificates", + "serializationOptions": { + "$id": "1890", + "json": { + "$id": "1891", + "name": "vaultCertificates" + } + } + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypeProperties.vmSecrets", + "serializationOptions": { + "$id": "1892", + "json": { + "$id": "1893", + "name": "vmSecrets" + } + } + }, + { + "$id": "1894", + "kind": "property", + "name": "vmExtensions", + "serializedName": "vmExtensions", + "doc": "Set of extensions that should be installed onto the virtual machines.", + "type": { + "$id": "1895", + "kind": "array", + "name": "ArrayVmssExtension", + "valueType": { + "$id": "1896", + "kind": "model", + "name": "NodeTypeVmssExtension", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.VMSSExtension", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Specifies set of extensions that should be installed onto the virtual machines.", + "decorators": [], + "properties": [ + { + "$id": "1897", + "kind": "property", + "name": "name", + "serializedName": "name", + "doc": "The name of the extension.", + "type": { + "$id": "1898", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.VMSSExtension.name", + "serializationOptions": { + "$id": "1899", + "json": { + "$id": "1900", + "name": "name" + } + } + }, + { + "$id": "1901", + "kind": "property", + "name": "properties", + "serializedName": "properties", + "doc": "Describes the properties of a Virtual Machine Scale Set Extension.", + "type": { + "$id": "1902", + "kind": "model", + "name": "VmssExtensionProperties", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.VMSSExtensionProperties", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Describes the properties of a Virtual Machine Scale Set Extension.", + "decorators": [], + "properties": [ + { + "$id": "1903", + "kind": "property", + "name": "publisher", + "serializedName": "publisher", + "doc": "The name of the extension handler publisher.", + "type": { + "$id": "1904", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.VMSSExtensionProperties.publisher", + "serializationOptions": { + "$id": "1905", + "json": { + "$id": "1906", + "name": "publisher" + } + } + }, + { + "$id": "1907", + "kind": "property", + "name": "type", + "serializedName": "type", + "doc": "Specifies the type of the extension; an example is \"CustomScriptExtension\".", + "type": { + "$id": "1908", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.VMSSExtensionProperties.type", + "serializationOptions": { + "$id": "1909", + "json": { + "$id": "1910", + "name": "type" + } + } + }, + { + "$id": "1911", + "kind": "property", + "name": "typeHandlerVersion", + "serializedName": "typeHandlerVersion", + "doc": "Specifies the version of the script handler.", + "type": { + "$id": "1912", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.VMSSExtensionProperties.typeHandlerVersion", + "serializationOptions": { + "$id": "1913", + "json": { + "$id": "1914", + "name": "typeHandlerVersion" + } + } + }, + { + "$id": "1915", + "kind": "property", + "name": "autoUpgradeMinorVersion", + "serializedName": "autoUpgradeMinorVersion", + "doc": "Indicates whether the extension should use a newer minor version if one is available at deployment time. Once deployed, however, the extension will not upgrade minor versions unless redeployed, even with this property set to true.", + "type": { + "$id": "1916", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.VMSSExtensionProperties.autoUpgradeMinorVersion", + "serializationOptions": { + "$id": "1917", + "json": { + "$id": "1918", + "name": "autoUpgradeMinorVersion" + } + } + }, + { + "$id": "1919", + "kind": "property", + "name": "settings", + "serializedName": "settings", + "doc": "Json formatted public settings for the extension.", + "type": { + "$id": "1920", + "kind": "model", + "name": "VMSSExtensionPropertiesSettings", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.VMSSExtensionProperties.settings.anonymous", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "decorators": [], + "properties": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.VMSSExtensionProperties.settings", + "serializationOptions": { + "$id": "1921", + "json": { + "$id": "1922", + "name": "settings" + } + } + }, + { + "$id": "1923", + "kind": "property", + "name": "protectedSettings", + "serializedName": "protectedSettings", + "doc": "The extension can contain either protectedSettings or protectedSettingsFromKeyVault or no protected settings at all.", + "type": { + "$id": "1924", + "kind": "model", + "name": "VMSSExtensionPropertiesProtectedSettings", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.VMSSExtensionProperties.protectedSettings.anonymous", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "decorators": [], + "properties": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.VMSSExtensionProperties.protectedSettings", + "serializationOptions": { + "$id": "1925", + "json": { + "$id": "1926", + "name": "protectedSettings" + } + } + }, + { + "$id": "1927", + "kind": "property", + "name": "forceUpdateTag", + "serializedName": "forceUpdateTag", + "doc": "If a value is provided and is different from the previous value, the extension handler will be forced to update even if the extension configuration has not changed.", + "type": { + "$id": "1928", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.VMSSExtensionProperties.forceUpdateTag", + "serializationOptions": { + "$id": "1929", + "json": { + "$id": "1930", + "name": "forceUpdateTag" + } + } + }, + { + "$id": "1931", + "kind": "property", + "name": "provisionAfterExtensions", + "serializedName": "provisionAfterExtensions", + "doc": "Collection of extension names after which this extension needs to be provisioned.", + "type": { + "$id": "1932", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "1933", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.VMSSExtensionProperties.provisionAfterExtensions", + "serializationOptions": { + "$id": "1934", + "json": { + "$id": "1935", + "name": "provisionAfterExtensions" + } + } + }, + { + "$id": "1936", + "kind": "property", + "name": "provisioningState", + "serializedName": "provisioningState", + "doc": "The provisioning state, which only appears in the response.", + "type": { + "$id": "1937", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.VMSSExtensionProperties.provisioningState", + "serializationOptions": { + "$id": "1938", + "json": { + "$id": "1939", + "name": "provisioningState" + } + } + }, + { + "$id": "1940", + "kind": "property", + "name": "IsAutomaticUpgradeEnabled", + "serializedName": "enableAutomaticUpgrade", + "doc": "Indicates whether the extension should be automatically upgraded by the platform if there is a newer version of the extension available.", + "type": { + "$id": "1941", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.VMSSExtensionProperties.enableAutomaticUpgrade", + "serializationOptions": { + "$id": "1942", + "json": { + "$id": "1943", + "name": "enableAutomaticUpgrade" + } + } + }, + { + "$id": "1944", + "kind": "property", + "name": "setupOrder", + "serializedName": "setupOrder", + "doc": "Indicates the setup order for the extension.", + "type": { + "$id": "1945", + "kind": "array", + "name": "ArrayVmssExtensionSetupOrder", + "valueType": { + "$ref": "300" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.VMSSExtensionProperties.setupOrder", + "serializationOptions": { + "$id": "1946", + "json": { + "$id": "1947", + "name": "setupOrder" + } + } + } + ] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": true, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.VMSSExtension.properties", + "serializationOptions": { + "$id": "1948", + "json": { + "$id": "1949", + "name": "properties" + } + } + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypeProperties.vmExtensions", + "serializationOptions": { + "$id": "1950", + "json": { + "$id": "1951", + "name": "vmExtensions" + } + } + }, + { + "$id": "1952", + "kind": "property", + "name": "vmManagedIdentity", + "serializedName": "vmManagedIdentity", + "doc": "Identities to assign to the virtual machine scale set under the node type.", + "type": { + "$id": "1953", + "kind": "model", + "name": "VmManagedIdentity", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.VmManagedIdentity", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Identities for the virtual machine scale set under the node type.", + "decorators": [], + "properties": [ + { + "$id": "1954", + "kind": "property", + "name": "-|arm-id", + "serializedName": "userAssignedIdentities", + "doc": "The list of user identities associated with the virtual machine scale set under the node type. Each entry will be an ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'.", + "type": { + "$id": "1955", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "1956", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.VmManagedIdentity.userAssignedIdentities", + "serializationOptions": { + "$id": "1957", + "json": { + "$id": "1958", + "name": "userAssignedIdentities" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypeProperties.vmManagedIdentity", + "serializationOptions": { + "$id": "1959", + "json": { + "$id": "1960", + "name": "vmManagedIdentity" + } + } + }, + { + "$id": "1961", + "kind": "property", + "name": "isStateless", + "serializedName": "isStateless", + "doc": "Indicates if the node type can only host Stateless workloads.", + "type": { + "$id": "1962", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypeProperties.isStateless", + "serializationOptions": { + "$id": "1963", + "json": { + "$id": "1964", + "name": "isStateless" + } + } + }, + { + "$id": "1965", + "kind": "property", + "name": "HasMultiplePlacementGroups", + "serializedName": "multiplePlacementGroups", + "doc": "Indicates if scale set associated with the node type can be composed of multiple placement groups.", + "type": { + "$id": "1966", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypeProperties.multiplePlacementGroups", + "serializationOptions": { + "$id": "1967", + "json": { + "$id": "1968", + "name": "multiplePlacementGroups" + } + } + }, + { + "$id": "1969", + "kind": "property", + "name": "frontendConfigurations", + "serializedName": "frontendConfigurations", + "doc": "Indicates the node type uses its own frontend configurations instead of the default one for the cluster. This setting can only be specified for non-primary node types and can not be added or removed after the node type is created.", + "type": { + "$id": "1970", + "kind": "array", + "name": "ArrayFrontendConfiguration", + "valueType": { + "$id": "1971", + "kind": "model", + "name": "NodeTypeFrontendConfiguration", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.FrontendConfiguration", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Describes the frontend configurations for the node type.", + "decorators": [], + "properties": [ + { + "$id": "1972", + "kind": "property", + "name": "ipAddressType", + "serializedName": "ipAddressType", + "doc": "The IP address type of this frontend configuration. If omitted the default value is IPv4.", + "type": { + "$ref": "304" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.FrontendConfiguration.ipAddressType", + "serializationOptions": { + "$id": "1973", + "json": { + "$id": "1974", + "name": "ipAddressType" + } + } + }, + { + "$id": "1975", + "kind": "property", + "name": "loadBalancerBackendAddressPoolId", + "serializedName": "loadBalancerBackendAddressPoolId", + "doc": "The resource Id of the Load Balancer backend address pool that the VM instances of the node type are associated with. The format of the resource Id is '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/backendAddressPools/{backendAddressPoolName}'.", + "type": { + "$id": "1976", + "kind": "string", + "name": "armResourceIdentifier", + "crossLanguageDefinitionId": "Azure.Core.armResourceIdentifier", + "baseType": { + "$id": "1977", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.FrontendConfiguration.loadBalancerBackendAddressPoolId", + "serializationOptions": { + "$id": "1978", + "json": { + "$id": "1979", + "name": "loadBalancerBackendAddressPoolId" + } + } + }, + { + "$id": "1980", + "kind": "property", + "name": "loadBalancerInboundNatPoolId", + "serializedName": "loadBalancerInboundNatPoolId", + "doc": "The resource Id of the Load Balancer inbound NAT pool that the VM instances of the node type are associated with. The format of the resource Id is '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/inboundNatPools/{inboundNatPoolName}'.", + "type": { + "$id": "1981", + "kind": "string", + "name": "armResourceIdentifier", + "crossLanguageDefinitionId": "Azure.Core.armResourceIdentifier", + "baseType": { + "$id": "1982", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.FrontendConfiguration.loadBalancerInboundNatPoolId", + "serializationOptions": { + "$id": "1983", + "json": { + "$id": "1984", + "name": "loadBalancerInboundNatPoolId" + } + } + }, + { + "$id": "1985", + "kind": "property", + "name": "applicationGatewayBackendAddressPoolId", + "serializedName": "applicationGatewayBackendAddressPoolId", + "doc": "The resource Id of application gateway backend address pool. The format of the resource Id is '/subscriptions//resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}/backendAddressPools/{backendAddressPoolName}'.", + "type": { + "$id": "1986", + "kind": "string", + "name": "armResourceIdentifier", + "crossLanguageDefinitionId": "Azure.Core.armResourceIdentifier", + "baseType": { + "$id": "1987", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.FrontendConfiguration.applicationGatewayBackendAddressPoolId", + "serializationOptions": { + "$id": "1988", + "json": { + "$id": "1989", + "name": "applicationGatewayBackendAddressPoolId" + } + } + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypeProperties.frontendConfigurations", + "serializationOptions": { + "$id": "1990", + "json": { + "$id": "1991", + "name": "frontendConfigurations" + } + } + }, + { + "$id": "1992", + "kind": "property", + "name": "networkSecurityRules", + "serializedName": "networkSecurityRules", + "doc": "The Network Security Rules for this node type. This setting can only be specified for node types that are configured with frontend configurations.", + "type": { + "$id": "1993", + "kind": "array", + "name": "ArrayNetworkSecurityRule", + "valueType": { + "$ref": "1282" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypeProperties.networkSecurityRules", + "serializationOptions": { + "$id": "1994", + "json": { + "$id": "1995", + "name": "networkSecurityRules" + } + } + }, + { + "$id": "1996", + "kind": "property", + "name": "additionalDataDisks", + "serializedName": "additionalDataDisks", + "doc": "Additional managed data disks.", + "type": { + "$id": "1997", + "kind": "array", + "name": "ArrayVmssDataDisk", + "valueType": { + "$id": "1998", + "kind": "model", + "name": "NodeTypeVmssDataDisk", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.VmssDataDisk", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Managed data disk description.", + "decorators": [], + "properties": [ + { + "$id": "1999", + "kind": "property", + "name": "lun", + "serializedName": "lun", + "doc": "Specifies the logical unit number of the data disk. This value is used to identify data disks within the VM and therefore must be unique for each data disk attached to a VM. Lun 0 is reserved for the service fabric data disk.", + "type": { + "$id": "2000", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.VmssDataDisk.lun", + "serializationOptions": { + "$id": "2001", + "json": { + "$id": "2002", + "name": "lun" + } + } + }, + { + "$id": "2003", + "kind": "property", + "name": "DiskSizeInGB", + "serializedName": "diskSizeGB", + "doc": "Disk size for each vm in the node type in GBs.", + "type": { + "$id": "2004", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.VmssDataDisk.diskSizeGB", + "serializationOptions": { + "$id": "2005", + "json": { + "$id": "2006", + "name": "diskSizeGB" + } + } + }, + { + "$id": "2007", + "kind": "property", + "name": "diskType", + "serializedName": "diskType", + "doc": "Managed data disk type. Specifies the storage account type for the managed disk", + "type": { + "$ref": "286" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.VmssDataDisk.diskType", + "serializationOptions": { + "$id": "2008", + "json": { + "$id": "2009", + "name": "diskType" + } + } + }, + { + "$id": "2010", + "kind": "property", + "name": "diskLetter", + "serializedName": "diskLetter", + "doc": "Managed data disk letter. It can not use the reserved letter C or D and it can not change after created.", + "type": { + "$id": "2011", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.VmssDataDisk.diskLetter", + "serializationOptions": { + "$id": "2012", + "json": { + "$id": "2013", + "name": "diskLetter" + } + } + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypeProperties.additionalDataDisks", + "serializationOptions": { + "$id": "2014", + "json": { + "$id": "2015", + "name": "additionalDataDisks" + } + } + }, + { + "$id": "2016", + "kind": "property", + "name": "IsEncryptionAtHostEnabled", + "serializedName": "enableEncryptionAtHost", + "doc": "Enable or disable the Host Encryption for the virtual machines on the node type. This will enable the encryption for all the disks including Resource/Temp disk at host itself. Default: The Encryption at host will be disabled unless this property is set to true for the resource.", + "type": { + "$id": "2017", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypeProperties.enableEncryptionAtHost", + "serializationOptions": { + "$id": "2018", + "json": { + "$id": "2019", + "name": "enableEncryptionAtHost" + } + } + }, + { + "$id": "2020", + "kind": "property", + "name": "provisioningState", + "serializedName": "provisioningState", + "doc": "The provisioning state of the node type resource.", + "type": { + "$ref": "176" + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypeProperties.provisioningState", + "serializationOptions": { + "$id": "2021", + "json": { + "$id": "2022", + "name": "provisioningState" + } + } + }, + { + "$id": "2023", + "kind": "property", + "name": "IsAcceleratedNetworkingEnabled", + "serializedName": "enableAcceleratedNetworking", + "doc": "Specifies whether the network interface is accelerated networking-enabled.", + "type": { + "$id": "2024", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypeProperties.enableAcceleratedNetworking", + "serializationOptions": { + "$id": "2025", + "json": { + "$id": "2026", + "name": "enableAcceleratedNetworking" + } + } + }, + { + "$id": "2027", + "kind": "property", + "name": "useDefaultPublicLoadBalancer", + "serializedName": "useDefaultPublicLoadBalancer", + "doc": "Specifies whether the use public load balancer. If not specified and the node type doesn't have its own frontend configuration, it will be attached to the default load balancer. If the node type uses its own Load balancer and useDefaultPublicLoadBalancer is true, then the frontend has to be an Internal Load Balancer. If the node type uses its own Load balancer and useDefaultPublicLoadBalancer is false or not set, then the custom load balancer must include a public load balancer to provide outbound connectivity.", + "type": { + "$id": "2028", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypeProperties.useDefaultPublicLoadBalancer", + "serializationOptions": { + "$id": "2029", + "json": { + "$id": "2030", + "name": "useDefaultPublicLoadBalancer" + } + } + }, + { + "$id": "2031", + "kind": "property", + "name": "useTempDataDisk", + "serializedName": "useTempDataDisk", + "doc": "Specifies whether to use the temporary disk for the service fabric data root, in which case no managed data disk will be attached and the temporary disk will be used. It is only allowed for stateless node types.", + "type": { + "$id": "2032", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypeProperties.useTempDataDisk", + "serializationOptions": { + "$id": "2033", + "json": { + "$id": "2034", + "name": "useTempDataDisk" + } + } + }, + { + "$id": "2035", + "kind": "property", + "name": "IsOverProvisioningEnabled", + "serializedName": "enableOverProvisioning", + "doc": "Specifies whether the node type should be overprovisioned. It is only allowed for stateless node types.", + "type": { + "$id": "2036", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypeProperties.enableOverProvisioning", + "serializationOptions": { + "$id": "2037", + "json": { + "$id": "2038", + "name": "enableOverProvisioning" + } + } + }, + { + "$id": "2039", + "kind": "property", + "name": "zones", + "serializedName": "zones", + "doc": "Specifies the availability zones where the node type would span across. If the cluster is not spanning across availability zones, initiates az migration for the cluster.", + "type": { + "$id": "2040", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "2041", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypeProperties.zones", + "serializationOptions": { + "$id": "2042", + "json": { + "$id": "2043", + "name": "zones" + } + } + }, + { + "$id": "2044", + "kind": "property", + "name": "isSpotVM", + "serializedName": "isSpotVM", + "doc": "Indicates whether the node type will be Spot Virtual Machines. Azure will allocate the VMs if there is capacity available and the VMs can be evicted at any time.", + "type": { + "$id": "2045", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypeProperties.isSpotVM", + "serializationOptions": { + "$id": "2046", + "json": { + "$id": "2047", + "name": "isSpotVM" + } + } + }, + { + "$id": "2048", + "kind": "property", + "name": "hostGroupId", + "serializedName": "hostGroupId", + "doc": "Specifies the full host group resource Id. This property is used for deploying on azure dedicated hosts.", + "type": { + "$id": "2049", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypeProperties.hostGroupId", + "serializationOptions": { + "$id": "2050", + "json": { + "$id": "2051", + "name": "hostGroupId" + } + } + }, + { + "$id": "2052", + "kind": "property", + "name": "useEphemeralOSDisk", + "serializedName": "useEphemeralOSDisk", + "doc": "Indicates whether to use ephemeral os disk. The sku selected on the vmSize property needs to support this feature.", + "type": { + "$id": "2053", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypeProperties.useEphemeralOSDisk", + "serializationOptions": { + "$id": "2054", + "json": { + "$id": "2055", + "name": "useEphemeralOSDisk" + } + } + }, + { + "$id": "2056", + "kind": "property", + "name": "spotRestoreTimeout", + "serializedName": "spotRestoreTimeout", + "doc": "Indicates the time duration after which the platform will not try to restore the VMSS SPOT instances specified as ISO 8601.", + "type": { + "$id": "2057", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypeProperties.spotRestoreTimeout", + "serializationOptions": { + "$id": "2058", + "json": { + "$id": "2059", + "name": "spotRestoreTimeout" + } + } + }, + { + "$id": "2060", + "kind": "property", + "name": "evictionPolicy", + "serializedName": "evictionPolicy", + "doc": "Specifies the eviction policy for virtual machines in a SPOT node type. Default is Delete.", + "type": { + "$ref": "310" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypeProperties.evictionPolicy", + "serializationOptions": { + "$id": "2061", + "json": { + "$id": "2062", + "name": "evictionPolicy" + } + } + }, + { + "$id": "2063", + "kind": "property", + "name": "vmImageResourceId", + "serializedName": "vmImageResourceId", + "doc": "Indicates the resource id of the vm image. This parameter is used for custom vm image.", + "type": { + "$id": "2064", + "kind": "string", + "name": "armResourceIdentifier", + "crossLanguageDefinitionId": "Azure.Core.armResourceIdentifier", + "baseType": { + "$id": "2065", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypeProperties.vmImageResourceId", + "serializationOptions": { + "$id": "2066", + "json": { + "$id": "2067", + "name": "vmImageResourceId" + } + } + }, + { + "$id": "2068", + "kind": "property", + "name": "subnetId", + "serializedName": "subnetId", + "doc": "Indicates the resource id of the subnet for the node type.", + "type": { + "$id": "2069", + "kind": "string", + "name": "armResourceIdentifier", + "crossLanguageDefinitionId": "Azure.Core.armResourceIdentifier", + "baseType": { + "$id": "2070", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypeProperties.subnetId", + "serializationOptions": { + "$id": "2071", + "json": { + "$id": "2072", + "name": "subnetId" + } + } + }, + { + "$id": "2073", + "kind": "property", + "name": "vmSetupActions", + "serializedName": "vmSetupActions", + "doc": "Specifies the actions to be performed on the vms before bootstrapping the service fabric runtime.", + "type": { + "$id": "2074", + "kind": "array", + "name": "ArrayVmSetupAction", + "valueType": { + "$ref": "316" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypeProperties.vmSetupActions", + "serializationOptions": { + "$id": "2075", + "json": { + "$id": "2076", + "name": "vmSetupActions" + } + } + }, + { + "$id": "2077", + "kind": "property", + "name": "securityType", + "serializedName": "securityType", + "doc": "Specifies the security type of the nodeType. Supported values include Standard, TrustedLaunch and ConfidentialVM.", + "type": { + "$ref": "322" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypeProperties.securityType", + "serializationOptions": { + "$id": "2078", + "json": { + "$id": "2079", + "name": "securityType" + } + } + }, + { + "$id": "2080", + "kind": "property", + "name": "securityEncryptionType", + "serializedName": "securityEncryptionType", + "doc": "Specifies the EncryptionType of the managed disk. It is set to DiskWithVMGuestState for encryption of the managed disk along with VMGuestState blob and VMGuestStateOnly for encryption of just the VMGuestState blob. Note: It can be set for only Confidential VMs.", + "type": { + "$ref": "330" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypeProperties.securityEncryptionType", + "serializationOptions": { + "$id": "2081", + "json": { + "$id": "2082", + "name": "securityEncryptionType" + } + } + }, + { + "$id": "2083", + "kind": "property", + "name": "IsSecureBootEnabled", + "serializedName": "secureBootEnabled", + "doc": "Specifies whether secure boot should be enabled on the nodeType. Can only be used with TrustedLaunch and ConfidentialVM SecurityType.", + "type": { + "$id": "2084", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypeProperties.secureBootEnabled", + "serializationOptions": { + "$id": "2085", + "json": { + "$id": "2086", + "name": "secureBootEnabled" + } + } + }, + { + "$id": "2087", + "kind": "property", + "name": "IsNodePublicIPEnabled", + "serializedName": "enableNodePublicIP", + "doc": "Specifies whether each node is allocated its own public IPv4 address. This is only supported on secondary node types with custom Load Balancers.", + "type": { + "$id": "2088", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypeProperties.enableNodePublicIP", + "serializationOptions": { + "$id": "2089", + "json": { + "$id": "2090", + "name": "enableNodePublicIP" + } + } + }, + { + "$id": "2091", + "kind": "property", + "name": "IsNodePublicIPv6Enabled", + "serializedName": "enableNodePublicIPv6", + "doc": "Specifies whether each node is allocated its own public IPv6 address. This is only supported on secondary node types with custom Load Balancers.", + "type": { + "$id": "2092", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypeProperties.enableNodePublicIPv6", + "serializationOptions": { + "$id": "2093", + "json": { + "$id": "2094", + "name": "enableNodePublicIPv6" + } + } + }, + { + "$id": "2095", + "kind": "property", + "name": "vmSharedGalleryImageId", + "serializedName": "vmSharedGalleryImageId", + "doc": "Indicates the resource id of the vm shared galleries image. This parameter is used for custom vm image.", + "type": { + "$id": "2096", + "kind": "string", + "name": "armResourceIdentifier", + "crossLanguageDefinitionId": "Azure.Core.armResourceIdentifier", + "baseType": { + "$id": "2097", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypeProperties.vmSharedGalleryImageId", + "serializationOptions": { + "$id": "2098", + "json": { + "$id": "2099", + "name": "vmSharedGalleryImageId" + } + } + }, + { + "$id": "2100", + "kind": "property", + "name": "natGatewayId", + "serializedName": "natGatewayId", + "doc": "Specifies the resource id of a NAT Gateway to attach to the subnet of this node type. Node type must use custom load balancer.", + "type": { + "$id": "2101", + "kind": "string", + "name": "armResourceIdentifier", + "crossLanguageDefinitionId": "Azure.Core.armResourceIdentifier", + "baseType": { + "$id": "2102", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypeProperties.natGatewayId", + "serializationOptions": { + "$id": "2103", + "json": { + "$id": "2104", + "name": "natGatewayId" + } + } + }, + { + "$id": "2105", + "kind": "property", + "name": "natConfigurations", + "serializedName": "natConfigurations", + "doc": "Specifies the NAT configuration on default public Load Balancer for the node type. This is only supported for node types use the default public Load Balancer.", + "type": { + "$id": "2106", + "kind": "array", + "name": "ArrayNodeTypeNatConfig", + "valueType": { + "$id": "2107", + "kind": "model", + "name": "NodeTypeNatConfig", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypeNatConfig", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Provides information about NAT configuration on the default public Load Balancer for the node type.", + "decorators": [], + "properties": [ + { + "$id": "2108", + "kind": "property", + "name": "backendPort", + "serializedName": "backendPort", + "doc": "The internal port for the NAT configuration.", + "type": { + "$id": "2109", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypeNatConfig.backendPort", + "serializationOptions": { + "$id": "2110", + "json": { + "$id": "2111", + "name": "backendPort" + } + } + }, + { + "$id": "2112", + "kind": "property", + "name": "frontendPortRangeStart", + "serializedName": "frontendPortRangeStart", + "doc": "The port range start for the external endpoint.", + "type": { + "$id": "2113", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypeNatConfig.frontendPortRangeStart", + "serializationOptions": { + "$id": "2114", + "json": { + "$id": "2115", + "name": "frontendPortRangeStart" + } + } + }, + { + "$id": "2116", + "kind": "property", + "name": "frontendPortRangeEnd", + "serializedName": "frontendPortRangeEnd", + "doc": "The port range end for the external endpoint.", + "type": { + "$id": "2117", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypeNatConfig.frontendPortRangeEnd", + "serializationOptions": { + "$id": "2118", + "json": { + "$id": "2119", + "name": "frontendPortRangeEnd" + } + } + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypeProperties.natConfigurations", + "serializationOptions": { + "$id": "2120", + "json": { + "$id": "2121", + "name": "natConfigurations" + } + } + }, + { + "$id": "2122", + "kind": "property", + "name": "vmImagePlan", + "serializedName": "vmImagePlan", + "doc": "Specifies information about the marketplace image used to create the virtual machine. This element is only used for marketplace images. Before you can use a marketplace image from an API, you must enable the image for programmatic use. In the Azure portal, find the marketplace image that you want to use and then click Want to deploy programmatically, Get Started ->. Enter any required information and then click Save.", + "type": { + "$id": "2123", + "kind": "model", + "name": "VmImagePlan", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.VmImagePlan", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Specifies information about the marketplace image used to create the virtual machine. This element is only used for marketplace images. Before you can use a marketplace image from an API, you must enable the image for programmatic use. In the Azure portal, find the marketplace image that you want to use and then click Want to deploy programmatically, Get Started. Enter any required information and then click Save.", + "decorators": [], + "properties": [ + { + "$id": "2124", + "kind": "property", + "name": "name", + "serializedName": "name", + "doc": "The plan ID.", + "type": { + "$id": "2125", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.VmImagePlan.name", + "serializationOptions": { + "$id": "2126", + "json": { + "$id": "2127", + "name": "name" + } + } + }, + { + "$id": "2128", + "kind": "property", + "name": "product", + "serializedName": "product", + "doc": "Specifies the product of the image from the marketplace. This is the same value as Offer under the imageReference element.", + "type": { + "$id": "2129", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.VmImagePlan.product", + "serializationOptions": { + "$id": "2130", + "json": { + "$id": "2131", + "name": "product" + } + } + }, + { + "$id": "2132", + "kind": "property", + "name": "promotionCode", + "serializedName": "promotionCode", + "doc": "The promotion code.", + "type": { + "$id": "2133", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.VmImagePlan.promotionCode", + "serializationOptions": { + "$id": "2134", + "json": { + "$id": "2135", + "name": "promotionCode" + } + } + }, + { + "$id": "2136", + "kind": "property", + "name": "publisher", + "serializedName": "publisher", + "doc": "The publisher ID.", + "type": { + "$id": "2137", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.VmImagePlan.publisher", + "serializationOptions": { + "$id": "2138", + "json": { + "$id": "2139", + "name": "publisher" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypeProperties.vmImagePlan", + "serializationOptions": { + "$id": "2140", + "json": { + "$id": "2141", + "name": "vmImagePlan" + } + } + }, + { + "$id": "2142", + "kind": "property", + "name": "serviceArtifactReferenceId", + "serializedName": "serviceArtifactReferenceId", + "doc": "Specifies the service artifact reference id used to set same image version for all virtual machines in the scale set when using 'latest' image version.", + "type": { + "$id": "2143", + "kind": "string", + "name": "armResourceIdentifier", + "crossLanguageDefinitionId": "Azure.Core.armResourceIdentifier", + "baseType": { + "$id": "2144", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypeProperties.serviceArtifactReferenceId", + "serializationOptions": { + "$id": "2145", + "json": { + "$id": "2146", + "name": "serviceArtifactReferenceId" + } + } + }, + { + "$id": "2147", + "kind": "property", + "name": "dscpConfigurationId", + "serializedName": "dscpConfigurationId", + "doc": "Specifies the resource id of the DSCP configuration to apply to the node type network interface.", + "type": { + "$id": "2148", + "kind": "string", + "name": "armResourceIdentifier", + "crossLanguageDefinitionId": "Azure.Core.armResourceIdentifier", + "baseType": { + "$id": "2149", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypeProperties.dscpConfigurationId", + "serializationOptions": { + "$id": "2150", + "json": { + "$id": "2151", + "name": "dscpConfigurationId" + } + } + }, + { + "$id": "2152", + "kind": "property", + "name": "additionalNetworkInterfaceConfigurations", + "serializedName": "additionalNetworkInterfaceConfigurations", + "doc": "Specifies the settings for any additional secondary network interfaces to attach to the node type.", + "type": { + "$id": "2153", + "kind": "array", + "name": "ArrayAdditionalNetworkInterfaceConfiguration", + "valueType": { + "$id": "2154", + "kind": "model", + "name": "AdditionalNetworkInterfaceConfiguration", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.AdditionalNetworkInterfaceConfiguration", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Specifies the settings for a network interface to attach to the node type.", + "decorators": [], + "properties": [ + { + "$id": "2155", + "kind": "property", + "name": "name", + "serializedName": "name", + "doc": "Name of the network interface.", + "type": { + "$id": "2156", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.AdditionalNetworkInterfaceConfiguration.name", + "serializationOptions": { + "$id": "2157", + "json": { + "$id": "2158", + "name": "name" + } + } + }, + { + "$id": "2159", + "kind": "property", + "name": "enableAcceleratedNetworking", + "serializedName": "enableAcceleratedNetworking", + "doc": "Specifies whether the network interface is accelerated networking-enabled.", + "type": { + "$id": "2160", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.AdditionalNetworkInterfaceConfiguration.enableAcceleratedNetworking", + "serializationOptions": { + "$id": "2161", + "json": { + "$id": "2162", + "name": "enableAcceleratedNetworking" + } + } + }, + { + "$id": "2163", + "kind": "property", + "name": "dscpConfiguration", + "serializedName": "dscpConfiguration", + "doc": "Specifies the DSCP configuration to apply to the network interface.", + "type": { + "$ref": "1872" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.AdditionalNetworkInterfaceConfiguration.dscpConfiguration", + "serializationOptions": { + "$id": "2164", + "json": { + "$id": "2165", + "name": "dscpConfiguration" + } + } + }, + { + "$id": "2166", + "kind": "property", + "name": "ipConfigurations", + "serializedName": "ipConfigurations", + "doc": "Specifies the IP configurations of the network interface.", + "type": { + "$id": "2167", + "kind": "array", + "name": "ArrayIpConfiguration", + "valueType": { + "$id": "2168", + "kind": "model", + "name": "ServiceFabricManagedClusterIPConfiguration", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.IpConfiguration", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Specifies an IP configuration of the network interface.", + "decorators": [], + "properties": [ + { + "$id": "2169", + "kind": "property", + "name": "name", + "serializedName": "name", + "doc": "Name of the network interface.", + "type": { + "$id": "2170", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.IpConfiguration.name", + "serializationOptions": { + "$id": "2171", + "json": { + "$id": "2172", + "name": "name" + } + } + }, + { + "$id": "2173", + "kind": "property", + "name": "applicationGatewayBackendAddressPools", + "serializedName": "applicationGatewayBackendAddressPools", + "doc": "Specifies an array of references to backend address pools of application gateways. A node type can reference backend address pools of multiple application gateways. Multiple node types cannot use the same application gateway.", + "type": { + "$id": "2174", + "kind": "array", + "name": "ArraySubResource", + "valueType": { + "$ref": "1872" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.IpConfiguration.applicationGatewayBackendAddressPools", + "serializationOptions": { + "$id": "2175", + "json": { + "$id": "2176", + "name": "applicationGatewayBackendAddressPools" + } + } + }, + { + "$id": "2177", + "kind": "property", + "name": "loadBalancerBackendAddressPools", + "serializedName": "loadBalancerBackendAddressPools", + "doc": "Specifies an array of references to backend address pools of load balancers. A node type can reference backend address pools of one public and one internal load balancer. Multiple node types cannot use the same basic sku load balancer.", + "type": { + "$id": "2178", + "kind": "array", + "name": "ArraySubResource", + "valueType": { + "$ref": "1872" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.IpConfiguration.loadBalancerBackendAddressPools", + "serializationOptions": { + "$id": "2179", + "json": { + "$id": "2180", + "name": "loadBalancerBackendAddressPools" + } + } + }, + { + "$id": "2181", + "kind": "property", + "name": "loadBalancerInboundNatPools", + "serializedName": "loadBalancerInboundNatPools", + "doc": "Specifies an array of references to inbound Nat pools of the load balancers. A node type can reference inbound nat pools of one public and one internal load balancer. Multiple node types cannot use the same basic sku load balancer.", + "type": { + "$id": "2182", + "kind": "array", + "name": "ArraySubResource", + "valueType": { + "$ref": "1872" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.IpConfiguration.loadBalancerInboundNatPools", + "serializationOptions": { + "$id": "2183", + "json": { + "$id": "2184", + "name": "loadBalancerInboundNatPools" + } + } + }, + { + "$id": "2185", + "kind": "property", + "name": "subnet", + "serializedName": "subnet", + "doc": "Specifies the subnet of the network interface.", + "type": { + "$ref": "1872" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.IpConfiguration.subnet", + "serializationOptions": { + "$id": "2186", + "json": { + "$id": "2187", + "name": "subnet" + } + } + }, + { + "$id": "2188", + "kind": "property", + "name": "privateIPAddressVersion", + "serializedName": "privateIPAddressVersion", + "doc": "Specifies whether the IP configuration's private IP is IPv4 or IPv6. Default is IPv4.", + "type": { + "$ref": "336" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.IpConfiguration.privateIPAddressVersion", + "serializationOptions": { + "$id": "2189", + "json": { + "$id": "2190", + "name": "privateIPAddressVersion" + } + } + }, + { + "$id": "2191", + "kind": "property", + "name": "publicIPAddressConfiguration", + "serializedName": "publicIPAddressConfiguration", + "doc": "The public IP address configuration of the network interface.", + "type": { + "$id": "2192", + "kind": "model", + "name": "ServiceFabricManagedClusterPublicIPAddressConfiguration", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.PublicIPAddressConfiguration", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "The public IP address configuration of the network interface.", + "decorators": [], + "properties": [ + { + "$id": "2193", + "kind": "property", + "name": "name", + "serializedName": "name", + "doc": "Name of the network interface.", + "type": { + "$id": "2194", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.PublicIPAddressConfiguration.name", + "serializationOptions": { + "$id": "2195", + "json": { + "$id": "2196", + "name": "name" + } + } + }, + { + "$id": "2197", + "kind": "property", + "name": "ipTags", + "serializedName": "ipTags", + "doc": "Specifies the list of IP tags associated with the public IP address.", + "type": { + "$id": "2198", + "kind": "array", + "name": "ArrayIpTag", + "valueType": { + "$ref": "1445" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.PublicIPAddressConfiguration.ipTags", + "serializationOptions": { + "$id": "2199", + "json": { + "$id": "2200", + "name": "ipTags" + } + } + }, + { + "$id": "2201", + "kind": "property", + "name": "publicIPAddressVersion", + "serializedName": "publicIPAddressVersion", + "doc": "Specifies whether the IP configuration's public IP is IPv4 or IPv6. Default is IPv4.", + "type": { + "$ref": "342" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.PublicIPAddressConfiguration.publicIPAddressVersion", + "serializationOptions": { + "$id": "2202", + "json": { + "$id": "2203", + "name": "publicIPAddressVersion" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.IpConfiguration.publicIPAddressConfiguration", + "serializationOptions": { + "$id": "2204", + "json": { + "$id": "2205", + "name": "publicIPAddressConfiguration" + } + } + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.AdditionalNetworkInterfaceConfiguration.ipConfigurations", + "serializationOptions": { + "$id": "2206", + "json": { + "$id": "2207", + "name": "ipConfigurations" + } + } + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypeProperties.additionalNetworkInterfaceConfigurations", + "serializationOptions": { + "$id": "2208", + "json": { + "$id": "2209", + "name": "additionalNetworkInterfaceConfigurations" + } + } + }, + { + "$id": "2210", + "kind": "property", + "name": "computerNamePrefix", + "serializedName": "computerNamePrefix", + "doc": "Specifies the computer name prefix. Limited to 9 characters. If specified, allows for a longer name to be specified for the node type name.", + "type": { + "$id": "2211", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypeProperties.computerNamePrefix", + "serializationOptions": { + "$id": "2212", + "json": { + "$id": "2213", + "name": "computerNamePrefix" + } + } + }, + { + "$id": "2214", + "kind": "property", + "name": "vmApplications", + "serializedName": "vmApplications", + "doc": "Specifies the gallery applications that should be made available to the underlying VMSS.", + "type": { + "$id": "2215", + "kind": "array", + "name": "ArrayVmApplication", + "valueType": { + "$id": "2216", + "kind": "model", + "name": "ServiceFabricManagedVmApplication", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.VmApplication", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Specifies the gallery application that should be made available to the underlying VMSS.", + "decorators": [], + "properties": [ + { + "$id": "2217", + "kind": "property", + "name": "configurationReference", + "serializedName": "configurationReference", + "doc": "Optional, Specifies the uri to an azure blob that will replace the default configuration for the package if provided.", + "type": { + "$id": "2218", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.VmApplication.configurationReference", + "serializationOptions": { + "$id": "2219", + "json": { + "$id": "2220", + "name": "configurationReference" + } + } + }, + { + "$id": "2221", + "kind": "property", + "name": "enableAutomaticUpgrade", + "serializedName": "enableAutomaticUpgrade", + "doc": "If set to true, when a new Gallery Application version is available in PIR/SIG, it will be automatically updated for the underlying VMSS.", + "type": { + "$id": "2222", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.VmApplication.enableAutomaticUpgrade", + "serializationOptions": { + "$id": "2223", + "json": { + "$id": "2224", + "name": "enableAutomaticUpgrade" + } + } + }, + { + "$id": "2225", + "kind": "property", + "name": "order", + "serializedName": "order", + "doc": "Optional, Specifies the order in which the packages have to be installed.", + "type": { + "$id": "2226", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.VmApplication.order", + "serializationOptions": { + "$id": "2227", + "json": { + "$id": "2228", + "name": "order" + } + } + }, + { + "$id": "2229", + "kind": "property", + "name": "packageReferenceId", + "serializedName": "packageReferenceId", + "doc": "Specifies the GalleryApplicationVersion resource id on the form of /subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/applications/{application}/versions/{version}.", + "type": { + "$id": "2230", + "kind": "string", + "name": "armResourceIdentifier", + "crossLanguageDefinitionId": "Azure.Core.armResourceIdentifier", + "baseType": { + "$id": "2231", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.VmApplication.packageReferenceId", + "serializationOptions": { + "$id": "2232", + "json": { + "$id": "2233", + "name": "packageReferenceId" + } + } + }, + { + "$id": "2234", + "kind": "property", + "name": "vmGalleryTags", + "serializedName": "vmGalleryTags", + "doc": "Optional, Specifies a passthrough value for more generic context. Accepts a JSON-formatted string e.g. '{\"Tag1\":\"Value1\",\"Tag2\":\"Value2\"}'.", + "type": { + "$id": "2235", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.VmApplication.vmGalleryTags", + "serializationOptions": { + "$id": "2236", + "json": { + "$id": "2237", + "name": "vmGalleryTags" + } + } + }, + { + "$id": "2238", + "kind": "property", + "name": "treatFailureAsDeploymentFailure", + "serializedName": "treatFailureAsDeploymentFailure", + "doc": "Optional, If true, any failure for any operation in the VmApplication will fail the deployment.", + "type": { + "$id": "2239", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.VmApplication.treatFailureAsDeploymentFailure", + "serializationOptions": { + "$id": "2240", + "json": { + "$id": "2241", + "name": "treatFailureAsDeploymentFailure" + } + } + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypeProperties.vmApplications", + "serializationOptions": { + "$id": "2242", + "json": { + "$id": "2243", + "name": "vmApplications" + } + } + }, + { + "$id": "2244", + "kind": "property", + "name": "zoneBalance", + "serializedName": "zoneBalance", + "doc": "Setting this to true allows stateless node types to scale out without equal distribution across zones.", + "type": { + "$id": "2245", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypeProperties.zoneBalance", + "serializationOptions": { + "$id": "2246", + "json": { + "$id": "2247", + "name": "zoneBalance" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": true, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeType.properties", + "serializationOptions": { + "$id": "2248", + "json": { + "$id": "2249", + "name": "properties" + } + } + }, + { + "$id": "2250", + "kind": "path", + "name": "name", + "serializedName": "name", + "doc": "The name of the node type.", + "type": { + "$id": "2251", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": true, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeType.name", + "discriminator": false, + "flatten": false + }, + { + "$id": "2252", + "kind": "property", + "name": "tags", + "serializedName": "tags", + "doc": "Resource tags.", + "type": { + "$id": "2253", + "kind": "dict", + "keyType": { + "$id": "2254", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "valueType": { + "$id": "2255", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeType.tags", + "serializationOptions": { + "$id": "2256", + "json": { + "$id": "2257", + "name": "tags" + } + } + }, + { + "$id": "2258", + "kind": "property", + "name": "sku", + "serializedName": "sku", + "doc": "The node type sku.", + "type": { + "$id": "2259", + "kind": "model", + "name": "NodeTypeSku", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypeSku", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Describes a node type sku.", + "decorators": [], + "properties": [ + { + "$id": "2260", + "kind": "property", + "name": "name", + "serializedName": "name", + "doc": "The sku name. Name is internally generated and is used in auto-scale scenarios. Property does not allow to be changed to other values than generated. To avoid deployment errors please omit the property.", + "type": { + "$id": "2261", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypeSku.name", + "serializationOptions": { + "$id": "2262", + "json": { + "$id": "2263", + "name": "name" + } + } + }, + { + "$id": "2264", + "kind": "property", + "name": "tier", + "serializedName": "tier", + "doc": "Specifies the tier of the node type. Possible Values: **Standard**", + "type": { + "$id": "2265", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypeSku.tier", + "serializationOptions": { + "$id": "2266", + "json": { + "$id": "2267", + "name": "tier" + } + } + }, + { + "$id": "2268", + "kind": "property", + "name": "capacity", + "serializedName": "capacity", + "doc": "The number of nodes in the node type. If present in request it will override properties.vmInstanceCount.", + "type": { + "$id": "2269", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypeSku.capacity", + "serializationOptions": { + "$id": "2270", + "json": { + "$id": "2271", + "name": "capacity" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeType.sku", + "serializationOptions": { + "$id": "2272", + "json": { + "$id": "2273", + "name": "sku" + } + } + } + ] + }, + { + "$ref": "1801" + }, + { + "$ref": "1834" + }, + { + "$ref": "1870" + }, + { + "$ref": "1872" + }, + { + "$ref": "1881" + }, + { + "$ref": "1896" + }, + { + "$ref": "1902" + }, + { + "$ref": "1920" + }, + { + "$ref": "1924" + }, + { + "$ref": "1953" + }, + { + "$ref": "1971" + }, + { + "$ref": "1998" + }, + { + "$ref": "2107" + }, + { + "$ref": "2123" + }, + { + "$ref": "2154" + }, + { + "$ref": "2168" + }, + { + "$ref": "2192" + }, + { + "$ref": "2216" + }, + { + "$ref": "2259" + }, + { + "$id": "2274", + "kind": "model", + "name": "NodeTypeUpdateParameters", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypeUpdateParameters", + "usage": "Input,Json", + "doc": "Node type update request", + "decorators": [], + "properties": [ + { + "$id": "2275", + "kind": "property", + "name": "tags", + "serializedName": "tags", + "doc": "Node type update parameters", + "type": { + "$id": "2276", + "kind": "dict", + "keyType": { + "$id": "2277", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "valueType": { + "$id": "2278", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypeUpdateParameters.tags", + "serializationOptions": { + "$id": "2279", + "json": { + "$id": "2280", + "name": "tags" + } + } + }, + { + "$id": "2281", + "kind": "property", + "name": "sku", + "serializedName": "sku", + "doc": "The node type sku.", + "type": { + "$ref": "2259" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypeUpdateParameters.sku", + "serializationOptions": { + "$id": "2282", + "json": { + "$id": "2283", + "name": "sku" + } + } + } + ] + }, + { + "$id": "2284", + "kind": "model", + "name": "NodeTypeListResult", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Azure.ResourceManager.ResourceListResult", + "usage": "Output,Json", + "doc": "The response of a NodeType list operation.", + "decorators": [], + "properties": [ + { + "$id": "2285", + "kind": "property", + "name": "value", + "serializedName": "value", + "doc": "The NodeType items on this page", + "type": { + "$id": "2286", + "kind": "array", + "name": "ArrayNodeType", + "valueType": { + "$ref": "1799" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.ResourceListResult.value", + "serializationOptions": { + "$id": "2287", + "json": { + "$id": "2288", + "name": "value" + } + } + }, + { + "$id": "2289", + "kind": "property", + "name": "nextLink", + "serializedName": "nextLink", + "doc": "The link to the next page of items", + "type": { + "$id": "2290", + "kind": "url", + "name": "ResourceLocation", + "crossLanguageDefinitionId": "TypeSpec.Rest.ResourceLocation", + "baseType": { + "$id": "2291", + "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": "2292", + "json": { + "$id": "2293", + "name": "nextLink" + } + } + } + ] + }, + { + "$id": "2294", + "kind": "model", + "name": "NodeTypeActionContent", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypeActionParameters", + "usage": "Input,Json", + "doc": "Parameters for Node type action. If nodes are not specified on the parameters, the operation will be performed in all nodes of the node type one upgrade domain at a time.", + "decorators": [], + "properties": [ + { + "$id": "2295", + "kind": "property", + "name": "nodes", + "serializedName": "nodes", + "doc": "List of node names from the node type.", + "type": { + "$id": "2296", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "2297", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypeActionParameters.nodes", + "serializationOptions": { + "$id": "2298", + "json": { + "$id": "2299", + "name": "nodes" + } + } + }, + { + "$id": "2300", + "kind": "property", + "name": "IsForced", + "serializedName": "force", + "doc": "Force the action to go through.", + "type": { + "$id": "2301", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypeActionParameters.force", + "serializationOptions": { + "$id": "2302", + "json": { + "$id": "2303", + "name": "force" + } + } + }, + { + "$id": "2304", + "kind": "property", + "name": "updateType", + "serializedName": "updateType", + "doc": "Specifies the way the operation will be performed.", + "type": { + "$ref": "348" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypeActionParameters.updateType", + "serializationOptions": { + "$id": "2305", + "json": { + "$id": "2306", + "name": "updateType" + } + } + } + ] + }, + { + "$id": "2307", + "kind": "model", + "name": "NodeTypeListSkuResult", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypeListSkuResult", + "usage": "Output,Json", + "doc": "Node type available sku list results", + "decorators": [], + "properties": [ + { + "$id": "2308", + "kind": "property", + "name": "value", + "serializedName": "value", + "doc": "The NodeTypeAvailableSku items on this page", + "type": { + "$id": "2309", + "kind": "array", + "name": "ArrayNodeTypeAvailableSku", + "valueType": { + "$id": "2310", + "kind": "model", + "name": "NodeTypeAvailableSku", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypeAvailableSku", + "usage": "Output,Json", + "doc": "Defines the type of sku available for a node type", + "decorators": [], + "properties": [ + { + "$id": "2311", + "kind": "property", + "name": "-|resource-type", + "serializedName": "resourceType", + "doc": "The type of resource the sku applies to. Value: Microsoft.ServiceFabric/managedClusters/nodeTypes.", + "type": { + "$id": "2312", + "kind": "string", + "name": "armResourceType", + "crossLanguageDefinitionId": "Azure.Core.armResourceType", + "baseType": { + "$id": "2313", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypeAvailableSku.resourceType", + "serializationOptions": { + "$id": "2314", + "json": { + "$id": "2315", + "name": "resourceType" + } + } + }, + { + "$id": "2316", + "kind": "property", + "name": "sku", + "serializedName": "sku", + "doc": "The supported SKU for a for node type.", + "type": { + "$id": "2317", + "kind": "model", + "name": "NodeTypeSupportedSku", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypeSupportedSku", + "usage": "Output,Json", + "doc": "Describes a node type supported sku.", + "decorators": [], + "properties": [ + { + "$id": "2318", + "kind": "property", + "name": "name", + "serializedName": "name", + "doc": "The sku name.", + "type": { + "$id": "2319", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypeSupportedSku.name", + "serializationOptions": { + "$id": "2320", + "json": { + "$id": "2321", + "name": "name" + } + } + }, + { + "$id": "2322", + "kind": "property", + "name": "tier", + "serializedName": "tier", + "doc": "Specifies the tier of the node type. Possible Values: **Standard**", + "type": { + "$id": "2323", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypeSupportedSku.tier", + "serializationOptions": { + "$id": "2324", + "json": { + "$id": "2325", + "name": "tier" + } + } + } + ] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypeAvailableSku.sku", + "serializationOptions": { + "$id": "2326", + "json": { + "$id": "2327", + "name": "sku" + } + } + }, + { + "$id": "2328", + "kind": "property", + "name": "capacity", + "serializedName": "capacity", + "doc": "Provides information about how the node count can be scaled.", + "type": { + "$id": "2329", + "kind": "model", + "name": "NodeTypeSkuCapacity", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypeSkuCapacity", + "usage": "Output,Json", + "doc": "Provides information about how node type can be scaled.", + "decorators": [], + "properties": [ + { + "$id": "2330", + "kind": "property", + "name": "minimum", + "serializedName": "minimum", + "doc": "Lowest permitted node count in a node type.", + "type": { + "$id": "2331", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypeSkuCapacity.minimum", + "serializationOptions": { + "$id": "2332", + "json": { + "$id": "2333", + "name": "minimum" + } + } + }, + { + "$id": "2334", + "kind": "property", + "name": "maximum", + "serializedName": "maximum", + "doc": "Highest permitted node count in a node type.", + "type": { + "$id": "2335", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypeSkuCapacity.maximum", + "serializationOptions": { + "$id": "2336", + "json": { + "$id": "2337", + "name": "maximum" + } + } + }, + { + "$id": "2338", + "kind": "property", + "name": "default", + "serializedName": "default", + "doc": "Default node count in a node type.", + "type": { + "$id": "2339", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypeSkuCapacity.default", + "serializationOptions": { + "$id": "2340", + "json": { + "$id": "2341", + "name": "default" + } + } + }, + { + "$id": "2342", + "kind": "property", + "name": "scaleType", + "serializedName": "scaleType", + "doc": "Node type capacity scale type.", + "type": { + "$ref": "354" + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypeSkuCapacity.scaleType", + "serializationOptions": { + "$id": "2343", + "json": { + "$id": "2344", + "name": "scaleType" + } + } + } + ] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypeAvailableSku.capacity", + "serializationOptions": { + "$id": "2345", + "json": { + "$id": "2346", + "name": "capacity" + } + } + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypeListSkuResult.value", + "serializationOptions": { + "$id": "2347", + "json": { + "$id": "2348", + "name": "value" + } + } + }, + { + "$id": "2349", + "kind": "property", + "name": "nextLink", + "serializedName": "nextLink", + "doc": "The link to the next page of items", + "type": { + "$id": "2350", + "kind": "url", + "name": "ResourceLocation", + "crossLanguageDefinitionId": "TypeSpec.Rest.ResourceLocation", + "baseType": { + "$id": "2351", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypeListSkuResult.nextLink", + "serializationOptions": { + "$id": "2352", + "json": { + "$id": "2353", + "name": "nextLink" + } + } + } + ] + }, + { + "$ref": "2310" + }, + { + "$ref": "2317" + }, + { + "$ref": "2329" + }, + { + "$id": "2354", + "kind": "model", + "name": "LongRunningOperationResult", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.LongRunningOperationResult", + "usage": "Output,Json", + "doc": "Long running operation result.", + "decorators": [], + "properties": [ + { + "$id": "2355", + "kind": "property", + "name": "name", + "serializedName": "name", + "doc": "The name of the operation.", + "type": { + "$id": "2356", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.LongRunningOperationResult.name", + "serializationOptions": { + "$id": "2357", + "json": { + "$id": "2358", + "name": "name" + } + } + }, + { + "$id": "2359", + "kind": "property", + "name": "startTime", + "serializedName": "startTime", + "doc": "The start time of the operation.", + "type": { + "$id": "2360", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "rfc3339", + "wireType": { + "$id": "2361", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.LongRunningOperationResult.startTime", + "serializationOptions": { + "$id": "2362", + "json": { + "$id": "2363", + "name": "startTime" + } + } + }, + { + "$id": "2364", + "kind": "property", + "name": "endTime", + "serializedName": "endTime", + "doc": "The end time of the operation.", + "type": { + "$id": "2365", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "rfc3339", + "wireType": { + "$id": "2366", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.LongRunningOperationResult.endTime", + "serializationOptions": { + "$id": "2367", + "json": { + "$id": "2368", + "name": "endTime" + } + } + }, + { + "$id": "2369", + "kind": "property", + "name": "percentComplete", + "serializedName": "percentComplete", + "doc": "The completion percentage of the operation.", + "type": { + "$id": "2370", + "kind": "float64", + "name": "float64", + "crossLanguageDefinitionId": "TypeSpec.float64", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.LongRunningOperationResult.percentComplete", + "serializationOptions": { + "$id": "2371", + "json": { + "$id": "2372", + "name": "percentComplete" + } + } + }, + { + "$id": "2373", + "kind": "property", + "name": "status", + "serializedName": "status", + "doc": "The status of the operation.", + "type": { + "$id": "2374", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.LongRunningOperationResult.status", + "serializationOptions": { + "$id": "2375", + "json": { + "$id": "2376", + "name": "status" + } + } + }, + { + "$id": "2377", + "kind": "property", + "name": "error", + "serializedName": "error", + "doc": "The operation error.", + "type": { + "$id": "2378", + "kind": "model", + "name": "ErrorModelError", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ErrorModelError", + "usage": "Output,Json", + "doc": "The error details.", + "decorators": [], + "properties": [ + { + "$id": "2379", + "kind": "property", + "name": "code", + "serializedName": "code", + "doc": "The error code.", + "type": { + "$id": "2380", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ErrorModelError.code", + "serializationOptions": { + "$id": "2381", + "json": { + "$id": "2382", + "name": "code" + } + } + }, + { + "$id": "2383", + "kind": "property", + "name": "message", + "serializedName": "message", + "doc": "The error message.", + "type": { + "$id": "2384", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ErrorModelError.message", + "serializationOptions": { + "$id": "2385", + "json": { + "$id": "2386", + "name": "message" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.LongRunningOperationResult.error", + "serializationOptions": { + "$id": "2387", + "json": { + "$id": "2388", + "name": "error" + } + } + } + ] + }, + { + "$ref": "2378" + } + ], + "clients": [ + { + "$id": "2389", + "kind": "client", + "name": "ServiceFabricClient", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "doc": "Service Fabric Managed Clusters Management Client", + "methods": [], + "parameters": [ + { + "$id": "2390", + "name": "endpoint", + "nameInRequest": "endpoint", + "doc": "Service host", + "type": { + "$id": "2391", + "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": "2392", + "type": { + "$id": "2393", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "https://management.azure.com" + } + } + ], + "decorators": [ + { + "$id": "2394", + "name": "TypeSpec.@service", + "arguments": { + "$id": "2395", + "options": { + "$id": "2396", + "title": "ServiceFabricManagedClustersManagementClient" + } + } + } + ], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric", + "apiVersions": [ + "2024-11-01-preview", + "2025-03-01-preview" + ], + "children": [ + { + "$id": "2397", + "kind": "client", + "name": "Operations", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "methods": [ + { + "$id": "2398", + "kind": "paging", + "name": "list", + "accessibility": "public", + "apiVersions": [ + "2024-11-01-preview", + "2025-03-01-preview" + ], + "doc": "Get the list of available Service Fabric resource provider API operations.", + "summary": "Lists all of the available Service Fabric resource provider API operations.", + "operation": { + "$id": "2399", + "name": "list", + "resourceName": "Operations", + "summary": "Lists all of the available Service Fabric resource provider API operations.", + "doc": "Get the list of available Service Fabric resource provider API operations.", + "accessibility": "public", + "parameters": [ + { + "$id": "2400", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "2401", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "2402", + "type": { + "$id": "2403", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-03-01-preview" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2404", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "2405", + "kind": "constant", + "valueType": { + "$id": "2406", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "2407", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "368" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "GET", + "uri": "{endpoint}", + "path": "/providers/Microsoft.ServiceFabric/operations", + "bufferResponse": true, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.Operations.list", + "decorators": [], + "examples": [ + { + "$id": "2408", + "kind": "http", + "name": "List the operations for the provider", + "description": "List the operations for the provider", + "filePath": "2025-03-01-preview/OperationsList_example.json", + "parameters": [ + { + "$id": "2409", + "parameter": { + "$ref": "2400" + }, + "value": { + "$id": "2410", + "kind": "string", + "type": { + "$ref": "2401" + }, + "value": "2025-03-01-preview" + } + } + ], + "responses": [ + { + "$id": "2411", + "response": { + "$ref": "2407" + }, + "statusCode": 200, + "bodyValue": { + "$id": "2412", + "kind": "model", + "type": { + "$ref": "368" + }, + "value": { + "$id": "2413", + "value": { + "$id": "2414", + "kind": "array", + "type": { + "$ref": "370" + }, + "value": [ + { + "$id": "2415", + "kind": "model", + "type": { + "$ref": "371" + }, + "value": { + "$id": "2416", + "name": { + "$id": "2417", + "kind": "string", + "type": { + "$ref": "373" + }, + "value": "Microsoft.ServiceFabric/managedClusters/read" + }, + "display": { + "$id": "2418", + "kind": "model", + "type": { + "$ref": "381" + }, + "value": { + "$id": "2419", + "provider": { + "$id": "2420", + "kind": "string", + "type": { + "$ref": "383" + }, + "value": "Microsoft ServiceFabric" + }, + "resource": { + "$id": "2421", + "kind": "string", + "type": { + "$ref": "387" + }, + "value": "managedClusters" + }, + "operation": { + "$id": "2422", + "kind": "string", + "type": { + "$ref": "391" + }, + "value": "Read Cluster" + }, + "description": { + "$id": "2423", + "kind": "string", + "type": { + "$ref": "395" + }, + "value": "Read any Cluster" + } + } + } + } + }, + { + "$id": "2424", + "kind": "model", + "type": { + "$ref": "371" + }, + "value": { + "$id": "2425", + "name": { + "$id": "2426", + "kind": "string", + "type": { + "$ref": "373" + }, + "value": "Microsoft.ServiceFabric/managedClusters/write" + }, + "display": { + "$id": "2427", + "kind": "model", + "type": { + "$ref": "381" + }, + "value": { + "$id": "2428", + "provider": { + "$id": "2429", + "kind": "string", + "type": { + "$ref": "383" + }, + "value": "Microsoft ServiceFabric" + }, + "resource": { + "$id": "2430", + "kind": "string", + "type": { + "$ref": "387" + }, + "value": "managedClusters" + }, + "operation": { + "$id": "2431", + "kind": "string", + "type": { + "$ref": "391" + }, + "value": "Create or Update Cluster" + }, + "description": { + "$id": "2432", + "kind": "string", + "type": { + "$ref": "395" + }, + "value": "Create or Update any Cluster" + } + } + } + } + }, + { + "$id": "2433", + "kind": "model", + "type": { + "$ref": "371" + }, + "value": { + "$id": "2434", + "name": { + "$id": "2435", + "kind": "string", + "type": { + "$ref": "373" + }, + "value": "Microsoft.ServiceFabric/managedClusters/delete" + }, + "display": { + "$id": "2436", + "kind": "model", + "type": { + "$ref": "381" + }, + "value": { + "$id": "2437", + "provider": { + "$id": "2438", + "kind": "string", + "type": { + "$ref": "383" + }, + "value": "Microsoft ServiceFabric" + }, + "resource": { + "$id": "2439", + "kind": "string", + "type": { + "$ref": "387" + }, + "value": "managedClusters" + }, + "operation": { + "$id": "2440", + "kind": "string", + "type": { + "$ref": "391" + }, + "value": "Delete Cluster" + }, + "description": { + "$id": "2441", + "kind": "string", + "type": { + "$ref": "395" + }, + "value": "Delete any Cluster" + } + } + } + } + }, + { + "$id": "2442", + "kind": "model", + "type": { + "$ref": "371" + }, + "value": { + "$id": "2443", + "name": { + "$id": "2444", + "kind": "string", + "type": { + "$ref": "373" + }, + "value": "Microsoft.ServiceFabric/nodeTypes/read" + }, + "display": { + "$id": "2445", + "kind": "model", + "type": { + "$ref": "381" + }, + "value": { + "$id": "2446", + "provider": { + "$id": "2447", + "kind": "string", + "type": { + "$ref": "383" + }, + "value": "Microsoft ServiceFabric" + }, + "resource": { + "$id": "2448", + "kind": "string", + "type": { + "$ref": "387" + }, + "value": "nodeTypes" + }, + "operation": { + "$id": "2449", + "kind": "string", + "type": { + "$ref": "391" + }, + "value": "Read Node type" + }, + "description": { + "$id": "2450", + "kind": "string", + "type": { + "$ref": "395" + }, + "value": "Read any Node type" + } + } + } + } + }, + { + "$id": "2451", + "kind": "model", + "type": { + "$ref": "371" + }, + "value": { + "$id": "2452", + "name": { + "$id": "2453", + "kind": "string", + "type": { + "$ref": "373" + }, + "value": "Microsoft.ServiceFabric/nodeTypes/write" + }, + "display": { + "$id": "2454", + "kind": "model", + "type": { + "$ref": "381" + }, + "value": { + "$id": "2455", + "provider": { + "$id": "2456", + "kind": "string", + "type": { + "$ref": "383" + }, + "value": "Microsoft ServiceFabric" + }, + "resource": { + "$id": "2457", + "kind": "string", + "type": { + "$ref": "387" + }, + "value": "nodeTypes" + }, + "operation": { + "$id": "2458", + "kind": "string", + "type": { + "$ref": "391" + }, + "value": "Create or Update Node type" + }, + "description": { + "$id": "2459", + "kind": "string", + "type": { + "$ref": "395" + }, + "value": "Create or Update any Node type" + } + } + } + } + }, + { + "$id": "2460", + "kind": "model", + "type": { + "$ref": "371" + }, + "value": { + "$id": "2461", + "name": { + "$id": "2462", + "kind": "string", + "type": { + "$ref": "373" + }, + "value": "Microsoft.ServiceFabric/nodeTypes/delete" + }, + "display": { + "$id": "2463", + "kind": "model", + "type": { + "$ref": "381" + }, + "value": { + "$id": "2464", + "provider": { + "$id": "2465", + "kind": "string", + "type": { + "$ref": "383" + }, + "value": "Microsoft ServiceFabric" + }, + "resource": { + "$id": "2466", + "kind": "string", + "type": { + "$ref": "387" + }, + "value": "nodeTypes" + }, + "operation": { + "$id": "2467", + "kind": "string", + "type": { + "$ref": "391" + }, + "value": "Delete Node type" + }, + "description": { + "$id": "2468", + "kind": "string", + "type": { + "$ref": "395" + }, + "value": "Delete any Node type" + } + } + } + } + }, + { + "$id": "2469", + "kind": "model", + "type": { + "$ref": "371" + }, + "value": { + "$id": "2470", + "name": { + "$id": "2471", + "kind": "string", + "type": { + "$ref": "373" + }, + "value": "Microsoft.ServiceFabric/nodeTypes/restart/action" + }, + "display": { + "$id": "2472", + "kind": "model", + "type": { + "$ref": "381" + }, + "value": { + "$id": "2473", + "provider": { + "$id": "2474", + "kind": "string", + "type": { + "$ref": "383" + }, + "value": "Microsoft ServiceFabric" + }, + "resource": { + "$id": "2475", + "kind": "string", + "type": { + "$ref": "387" + }, + "value": "nodeTypes" + }, + "operation": { + "$id": "2476", + "kind": "string", + "type": { + "$ref": "391" + }, + "value": "Restart nodes from Node type" + }, + "description": { + "$id": "2477", + "kind": "string", + "type": { + "$ref": "395" + }, + "value": "Restart nodes from Node type" + } + } + } + } + }, + { + "$id": "2478", + "kind": "model", + "type": { + "$ref": "371" + }, + "value": { + "$id": "2479", + "name": { + "$id": "2480", + "kind": "string", + "type": { + "$ref": "373" + }, + "value": "Microsoft.ServiceFabric/nodeTypes/reimage/action" + }, + "display": { + "$id": "2481", + "kind": "model", + "type": { + "$ref": "381" + }, + "value": { + "$id": "2482", + "provider": { + "$id": "2483", + "kind": "string", + "type": { + "$ref": "383" + }, + "value": "Microsoft ServiceFabric" + }, + "resource": { + "$id": "2484", + "kind": "string", + "type": { + "$ref": "387" + }, + "value": "nodeTypes" + }, + "operation": { + "$id": "2485", + "kind": "string", + "type": { + "$ref": "391" + }, + "value": "Reimage nodes from Node type" + }, + "description": { + "$id": "2486", + "kind": "string", + "type": { + "$ref": "395" + }, + "value": "Reimage nodes from Node type" + } + } + } + } + }, + { + "$id": "2487", + "kind": "model", + "type": { + "$ref": "371" + }, + "value": { + "$id": "2488", + "name": { + "$id": "2489", + "kind": "string", + "type": { + "$ref": "373" + }, + "value": "Microsoft.ServiceFabric/nodeTypes/deleteNode/action" + }, + "display": { + "$id": "2490", + "kind": "model", + "type": { + "$ref": "381" + }, + "value": { + "$id": "2491", + "provider": { + "$id": "2492", + "kind": "string", + "type": { + "$ref": "383" + }, + "value": "Microsoft ServiceFabric" + }, + "resource": { + "$id": "2493", + "kind": "string", + "type": { + "$ref": "387" + }, + "value": "nodeTypes" + }, + "operation": { + "$id": "2494", + "kind": "string", + "type": { + "$ref": "391" + }, + "value": "Delete nodes from Node type" + }, + "description": { + "$id": "2495", + "kind": "string", + "type": { + "$ref": "395" + }, + "value": "Delete nodes from Node type" + } + } + } + } + } + ] + } + } + } + } + ] + } + ] + }, + "parameters": [ + { + "$id": "2496", + "name": "accept", + "nameInRequest": "accept", + "type": { + "$ref": "2405" + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "response": { + "$id": "2497", + "type": { + "$id": "2498", + "kind": "array", + "name": "ArrayOperationResult", + "valueType": { + "$ref": "371" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "resultSegments": [ + "value" + ] + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.Operations.list", + "pagingMetadata": { + "$id": "2499", + "itemPropertySegments": [ + "value" + ], + "nextLink": { + "$id": "2500", + "responseSegments": [ + "nextLink" + ], + "responseLocation": "Body" + } + } + } + ], + "parameters": [ + { + "$id": "2501", + "name": "endpoint", + "nameInRequest": "endpoint", + "doc": "Service host", + "type": { + "$id": "2502", + "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": "2503", + "type": { + "$id": "2504", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "https://management.azure.com" + } + } + ], + "decorators": [ + { + "$id": "2505", + "name": "Azure.ResourceManager.@armResourceOperations", + "arguments": { + "$id": "2506" + } + } + ], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.Operations", + "apiVersions": [ + "2024-11-01-preview", + "2025-03-01-preview" + ], + "parent": { + "$ref": "2389" + } + }, + { + "$id": "2507", + "kind": "client", + "name": "Applications", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "methods": [ + { + "$id": "2508", + "kind": "basic", + "name": "get", + "accessibility": "public", + "apiVersions": [ + "2024-11-01-preview", + "2025-03-01-preview" + ], + "doc": "Get a Service Fabric managed application resource created or in the process of being created in the Service Fabric cluster resource.", + "operation": { + "$id": "2509", + "name": "get", + "resourceName": "ApplicationResource", + "doc": "Get a Service Fabric managed application resource created or in the process of being created in the Service Fabric cluster resource.", + "accessibility": "public", + "parameters": [ + { + "$id": "2510", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "2511", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "2512", + "type": { + "$id": "2513", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-03-01-preview" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2514", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "2515", + "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": "2516", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "2517", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2518", + "name": "clusterName", + "nameInRequest": "clusterName", + "doc": "The name of the cluster resource.", + "type": { + "$id": "2519", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2520", + "name": "applicationName", + "nameInRequest": "applicationName", + "doc": "The name of the application resource.", + "type": { + "$id": "2521", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2522", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "2523", + "kind": "constant", + "valueType": { + "$id": "2524", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "2525", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "449" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "GET", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications/{applicationName}", + "bufferResponse": true, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.Applications.get", + "decorators": [], + "examples": [ + { + "$id": "2526", + "kind": "http", + "name": "Get an application", + "description": "Get an application", + "filePath": "2025-03-01-preview/ApplicationGetOperation_example.json", + "parameters": [ + { + "$id": "2527", + "parameter": { + "$ref": "2510" + }, + "value": { + "$id": "2528", + "kind": "string", + "type": { + "$ref": "2511" + }, + "value": "2025-03-01-preview" + } + }, + { + "$id": "2529", + "parameter": { + "$ref": "2520" + }, + "value": { + "$id": "2530", + "kind": "string", + "type": { + "$ref": "2521" + }, + "value": "myApp" + } + }, + { + "$id": "2531", + "parameter": { + "$ref": "2518" + }, + "value": { + "$id": "2532", + "kind": "string", + "type": { + "$ref": "2519" + }, + "value": "myCluster" + } + }, + { + "$id": "2533", + "parameter": { + "$ref": "2516" + }, + "value": { + "$id": "2534", + "kind": "string", + "type": { + "$ref": "2517" + }, + "value": "resRg" + } + }, + { + "$id": "2535", + "parameter": { + "$ref": "2514" + }, + "value": { + "$id": "2536", + "kind": "string", + "type": { + "$ref": "2515" + }, + "value": "00000000-0000-0000-0000-000000000000" + } + } + ], + "responses": [ + { + "$id": "2537", + "response": { + "$ref": "2525" + }, + "statusCode": 200, + "bodyValue": { + "$id": "2538", + "kind": "model", + "type": { + "$ref": "449" + }, + "value": { + "$id": "2539", + "name": { + "$id": "2540", + "kind": "string", + "type": { + "$ref": "457" + }, + "value": "myApp" + }, + "type": { + "$id": "2541", + "kind": "string", + "type": { + "$ref": "461" + }, + "value": "Microsoft.ServiceFabric/managedClusters/applications" + }, + "id": { + "$id": "2542", + "kind": "string", + "type": { + "$ref": "453" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/managedclusters/myCluster/applications/myApp" + }, + "location": { + "$id": "2543", + "kind": "string", + "type": { + "$ref": "645" + }, + "value": "eastus" + }, + "properties": { + "$id": "2544", + "kind": "model", + "type": { + "$ref": "494" + }, + "value": { + "$id": "2545", + "parameters": { + "$id": "2546", + "kind": "dict", + "type": { + "$ref": "504" + }, + "value": { + "$id": "2547", + "param1": { + "$id": "2548", + "kind": "string", + "type": { + "$ref": "506" + }, + "value": "value1" + } + } + }, + "provisioningState": { + "$id": "2549", + "kind": "string", + "type": { + "$ref": "496" + }, + "value": "Updating" + }, + "upgradePolicy": { + "$id": "2550", + "kind": "model", + "type": { + "$ref": "510" + }, + "value": { + "$id": "2551", + "applicationHealthPolicy": { + "$id": "2552", + "kind": "model", + "type": { + "$ref": "512" + }, + "value": { + "$id": "2553", + "considerWarningAsError": { + "$id": "2554", + "kind": "boolean", + "type": { + "$ref": "514" + }, + "value": true + }, + "defaultServiceTypeHealthPolicy": { + "$id": "2555", + "kind": "model", + "type": { + "$ref": "522" + }, + "value": { + "$id": "2556", + "maxPercentUnhealthyPartitionsPerService": { + "$id": "2557", + "kind": "number", + "type": { + "$ref": "528" + }, + "value": 0 + }, + "maxPercentUnhealthyReplicasPerPartition": { + "$id": "2558", + "kind": "number", + "type": { + "$ref": "532" + }, + "value": 0 + }, + "maxPercentUnhealthyServices": { + "$id": "2559", + "kind": "number", + "type": { + "$ref": "524" + }, + "value": 0 + } + } + }, + "maxPercentUnhealthyDeployedApplications": { + "$id": "2560", + "kind": "number", + "type": { + "$ref": "518" + }, + "value": 0 + }, + "serviceTypeHealthPolicyMap": { + "$id": "2561", + "kind": "dict", + "type": { + "$ref": "538" + }, + "value": { + "$id": "2562", + "service1": { + "$id": "2563", + "kind": "model", + "type": { + "$ref": "522" + }, + "value": { + "$id": "2564", + "maxPercentUnhealthyPartitionsPerService": { + "$id": "2565", + "kind": "number", + "type": { + "$ref": "528" + }, + "value": 30 + }, + "maxPercentUnhealthyReplicasPerPartition": { + "$id": "2566", + "kind": "number", + "type": { + "$ref": "532" + }, + "value": 30 + }, + "maxPercentUnhealthyServices": { + "$id": "2567", + "kind": "number", + "type": { + "$ref": "524" + }, + "value": 30 + } + } + } + } + } + } + }, + "forceRestart": { + "$id": "2568", + "kind": "boolean", + "type": { + "$ref": "545" + }, + "value": false + }, + "instanceCloseDelayDuration": { + "$id": "2569", + "kind": "number", + "type": { + "$ref": "576" + }, + "value": 600 + }, + "recreateApplication": { + "$id": "2570", + "kind": "boolean", + "type": { + "$ref": "587" + }, + "value": false + }, + "rollingUpgradeMonitoringPolicy": { + "$id": "2571", + "kind": "model", + "type": { + "$ref": "549" + }, + "value": { + "$id": "2572", + "failureAction": { + "$id": "2573", + "kind": "string", + "type": { + "$ref": "2" + }, + "value": "Rollback" + }, + "healthCheckRetryTimeout": { + "$id": "2574", + "kind": "string", + "type": { + "$ref": "562" + }, + "value": "00:10:00" + }, + "healthCheckStableDuration": { + "$id": "2575", + "kind": "string", + "type": { + "$ref": "558" + }, + "value": "00:05:00" + }, + "healthCheckWaitDuration": { + "$id": "2576", + "kind": "string", + "type": { + "$ref": "554" + }, + "value": "00:02:00" + }, + "upgradeDomainTimeout": { + "$id": "2577", + "kind": "string", + "type": { + "$ref": "570" + }, + "value": "00:15:00" + }, + "upgradeTimeout": { + "$id": "2578", + "kind": "string", + "type": { + "$ref": "566" + }, + "value": "01:00:00" + } + } + }, + "upgradeMode": { + "$id": "2579", + "kind": "string", + "type": { + "$ref": "8" + }, + "value": "UnmonitoredAuto" + }, + "upgradeReplicaSetCheckTimeout": { + "$id": "2580", + "kind": "number", + "type": { + "$ref": "583" + }, + "value": 3600 + } + } + }, + "version": { + "$id": "2581", + "kind": "string", + "type": { + "$ref": "500" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/managedclusters/myCluster/applicationTypes/myAppType/versions/1.0" + } + } + }, + "tags": { + "$id": "2582", + "kind": "dict", + "type": { + "$ref": "610" + }, + "value": { + "$id": "2583" + } + } + } + } + } + ] + } + ] + }, + "parameters": [ + { + "$id": "2584", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "2585", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2586", + "name": "clusterName", + "nameInRequest": "clusterName", + "doc": "The name of the cluster resource.", + "type": { + "$id": "2587", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2588", + "name": "applicationName", + "nameInRequest": "applicationName", + "doc": "The name of the application resource.", + "type": { + "$id": "2589", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2590", + "name": "accept", + "nameInRequest": "accept", + "type": { + "$ref": "2523" + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "response": { + "$id": "2591", + "type": { + "$ref": "449" + } + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.Applications.get" + }, + { + "$id": "2592", + "kind": "lro", + "name": "createOrUpdate", + "accessibility": "public", + "apiVersions": [ + "2024-11-01-preview", + "2025-03-01-preview" + ], + "doc": "Create or update a Service Fabric managed application resource with the specified name.", + "operation": { + "$id": "2593", + "name": "createOrUpdate", + "resourceName": "ApplicationResource", + "doc": "Create or update a Service Fabric managed application resource with the specified name.", + "accessibility": "public", + "parameters": [ + { + "$id": "2594", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "2595", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "2596", + "type": { + "$id": "2597", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-03-01-preview" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2598", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "2599", + "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": "2600", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "2601", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2602", + "name": "clusterName", + "nameInRequest": "clusterName", + "doc": "The name of the cluster resource.", + "type": { + "$id": "2603", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2604", + "name": "applicationName", + "nameInRequest": "applicationName", + "doc": "The name of the application resource.", + "type": { + "$id": "2605", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2606", + "name": "contentType", + "nameInRequest": "Content-Type", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$id": "2607", + "kind": "constant", + "valueType": { + "$id": "2608", + "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": "2609", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "2610", + "kind": "constant", + "valueType": { + "$id": "2611", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "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": "2612", + "name": "parameters", + "nameInRequest": "parameters", + "doc": "The application resource.", + "type": { + "$ref": "449" + }, + "location": "Body", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "2613", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "449" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + }, + { + "$id": "2614", + "statusCodes": [ + 202 + ], + "bodyType": { + "$ref": "449" + }, + "headers": [ + { + "$id": "2615", + "name": "azureAsyncOperation", + "nameInResponse": "Azure-AsyncOperation", + "doc": "A link to the status monitor", + "type": { + "$id": "2616", + "kind": "url", + "name": "ResourceLocation", + "crossLanguageDefinitionId": "TypeSpec.Rest.ResourceLocation", + "baseType": { + "$id": "2617", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url", + "decorators": [] + }, + "decorators": [] + } + }, + { + "$id": "2618", + "name": "location", + "nameInResponse": "Location", + "doc": "The Location header contains the URL where the status of the long running operation can be checked.", + "type": { + "$id": "2619", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + } + ], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "PUT", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications/{applicationName}", + "requestMediaTypes": [ + "application/json" + ], + "bufferResponse": true, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.Applications.createOrUpdate", + "decorators": [], + "examples": [ + { + "$id": "2620", + "kind": "http", + "name": "Put an application with maximum parameters", + "description": "Put an application with maximum parameters", + "filePath": "2025-03-01-preview/ApplicationPutOperation_example_max.json", + "parameters": [ + { + "$id": "2621", + "parameter": { + "$ref": "2594" + }, + "value": { + "$id": "2622", + "kind": "string", + "type": { + "$ref": "2595" + }, + "value": "2025-03-01-preview" + } + }, + { + "$id": "2623", + "parameter": { + "$ref": "2604" + }, + "value": { + "$id": "2624", + "kind": "string", + "type": { + "$ref": "2605" + }, + "value": "myApp" + } + }, + { + "$id": "2625", + "parameter": { + "$ref": "2602" + }, + "value": { + "$id": "2626", + "kind": "string", + "type": { + "$ref": "2603" + }, + "value": "myCluster" + } + }, + { + "$id": "2627", + "parameter": { + "$ref": "2600" + }, + "value": { + "$id": "2628", + "kind": "string", + "type": { + "$ref": "2601" + }, + "value": "resRg" + } + }, + { + "$id": "2629", + "parameter": { + "$ref": "2598" + }, + "value": { + "$id": "2630", + "kind": "string", + "type": { + "$ref": "2599" + }, + "value": "00000000-0000-0000-0000-000000000000" + } + } + ], + "responses": [ + { + "$id": "2631", + "response": { + "$ref": "2613" + }, + "statusCode": 200, + "bodyValue": { + "$id": "2632", + "kind": "model", + "type": { + "$ref": "449" + }, + "value": { + "$id": "2633", + "name": { + "$id": "2634", + "kind": "string", + "type": { + "$ref": "457" + }, + "value": "myApp" + }, + "type": { + "$id": "2635", + "kind": "string", + "type": { + "$ref": "461" + }, + "value": "Microsoft.ServiceFabric/managedClusters/applications" + }, + "id": { + "$id": "2636", + "kind": "string", + "type": { + "$ref": "453" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/managedclusters/myCluster/applications/myApp" + }, + "location": { + "$id": "2637", + "kind": "string", + "type": { + "$ref": "645" + }, + "value": "eastus" + }, + "properties": { + "$id": "2638", + "kind": "model", + "type": { + "$ref": "494" + }, + "value": { + "$id": "2639", + "parameters": { + "$id": "2640", + "kind": "dict", + "type": { + "$ref": "504" + }, + "value": { + "$id": "2641", + "param1": { + "$id": "2642", + "kind": "string", + "type": { + "$ref": "506" + }, + "value": "value1" + } + } + }, + "provisioningState": { + "$id": "2643", + "kind": "string", + "type": { + "$ref": "496" + }, + "value": "Creating" + }, + "upgradePolicy": { + "$id": "2644", + "kind": "model", + "type": { + "$ref": "510" + }, + "value": { + "$id": "2645", + "applicationHealthPolicy": { + "$id": "2646", + "kind": "model", + "type": { + "$ref": "512" + }, + "value": { + "$id": "2647", + "considerWarningAsError": { + "$id": "2648", + "kind": "boolean", + "type": { + "$ref": "514" + }, + "value": true + }, + "defaultServiceTypeHealthPolicy": { + "$id": "2649", + "kind": "model", + "type": { + "$ref": "522" + }, + "value": { + "$id": "2650", + "maxPercentUnhealthyPartitionsPerService": { + "$id": "2651", + "kind": "number", + "type": { + "$ref": "528" + }, + "value": 0 + }, + "maxPercentUnhealthyReplicasPerPartition": { + "$id": "2652", + "kind": "number", + "type": { + "$ref": "532" + }, + "value": 0 + }, + "maxPercentUnhealthyServices": { + "$id": "2653", + "kind": "number", + "type": { + "$ref": "524" + }, + "value": 0 + } + } + }, + "maxPercentUnhealthyDeployedApplications": { + "$id": "2654", + "kind": "number", + "type": { + "$ref": "518" + }, + "value": 0 + }, + "serviceTypeHealthPolicyMap": { + "$id": "2655", + "kind": "dict", + "type": { + "$ref": "538" + }, + "value": { + "$id": "2656", + "service1": { + "$id": "2657", + "kind": "model", + "type": { + "$ref": "522" + }, + "value": { + "$id": "2658", + "maxPercentUnhealthyPartitionsPerService": { + "$id": "2659", + "kind": "number", + "type": { + "$ref": "528" + }, + "value": 30 + }, + "maxPercentUnhealthyReplicasPerPartition": { + "$id": "2660", + "kind": "number", + "type": { + "$ref": "532" + }, + "value": 30 + }, + "maxPercentUnhealthyServices": { + "$id": "2661", + "kind": "number", + "type": { + "$ref": "524" + }, + "value": 30 + } + } + } + } + } + } + }, + "forceRestart": { + "$id": "2662", + "kind": "boolean", + "type": { + "$ref": "545" + }, + "value": false + }, + "instanceCloseDelayDuration": { + "$id": "2663", + "kind": "number", + "type": { + "$ref": "576" + }, + "value": 600 + }, + "recreateApplication": { + "$id": "2664", + "kind": "boolean", + "type": { + "$ref": "587" + }, + "value": false + }, + "rollingUpgradeMonitoringPolicy": { + "$id": "2665", + "kind": "model", + "type": { + "$ref": "549" + }, + "value": { + "$id": "2666", + "failureAction": { + "$id": "2667", + "kind": "string", + "type": { + "$ref": "2" + }, + "value": "Rollback" + }, + "healthCheckRetryTimeout": { + "$id": "2668", + "kind": "string", + "type": { + "$ref": "562" + }, + "value": "00:10:00" + }, + "healthCheckStableDuration": { + "$id": "2669", + "kind": "string", + "type": { + "$ref": "558" + }, + "value": "00:05:00" + }, + "healthCheckWaitDuration": { + "$id": "2670", + "kind": "string", + "type": { + "$ref": "554" + }, + "value": "00:02:00" + }, + "upgradeDomainTimeout": { + "$id": "2671", + "kind": "string", + "type": { + "$ref": "570" + }, + "value": "00:15:00" + }, + "upgradeTimeout": { + "$id": "2672", + "kind": "string", + "type": { + "$ref": "566" + }, + "value": "01:00:00" + } + } + }, + "upgradeMode": { + "$id": "2673", + "kind": "string", + "type": { + "$ref": "8" + }, + "value": "UnmonitoredAuto" + }, + "upgradeReplicaSetCheckTimeout": { + "$id": "2674", + "kind": "number", + "type": { + "$ref": "583" + }, + "value": 3600 + } + } + }, + "version": { + "$id": "2675", + "kind": "string", + "type": { + "$ref": "500" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/managedclusters/myCluster/applicationTypes/myAppType/versions/1.0" + } + } + }, + "tags": { + "$id": "2676", + "kind": "dict", + "type": { + "$ref": "610" + }, + "value": { + "$id": "2677", + "a": { + "$id": "2678", + "kind": "string", + "type": { + "$ref": "612" + }, + "value": "b" + } + } + } + } + } + }, + { + "$id": "2679", + "response": { + "$ref": "2614" + }, + "statusCode": 202, + "bodyValue": { + "$id": "2680", + "kind": "model", + "type": { + "$ref": "449" + }, + "value": { + "$id": "2681", + "name": { + "$id": "2682", + "kind": "string", + "type": { + "$ref": "457" + }, + "value": "myApp" + }, + "type": { + "$id": "2683", + "kind": "string", + "type": { + "$ref": "461" + }, + "value": "Microsoft.ServiceFabric/managedClusters/applications" + }, + "id": { + "$id": "2684", + "kind": "string", + "type": { + "$ref": "453" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/managedclusters/myCluster/applications/myApp" + }, + "properties": { + "$id": "2685", + "kind": "model", + "type": { + "$ref": "494" + }, + "value": { + "$id": "2686", + "parameters": { + "$id": "2687", + "kind": "dict", + "type": { + "$ref": "504" + }, + "value": { + "$id": "2688", + "param1": { + "$id": "2689", + "kind": "string", + "type": { + "$ref": "506" + }, + "value": "value1" + } + } + }, + "provisioningState": { + "$id": "2690", + "kind": "string", + "type": { + "$ref": "496" + }, + "value": "Updating" + }, + "upgradePolicy": { + "$id": "2691", + "kind": "model", + "type": { + "$ref": "510" + }, + "value": { + "$id": "2692", + "applicationHealthPolicy": { + "$id": "2693", + "kind": "model", + "type": { + "$ref": "512" + }, + "value": { + "$id": "2694", + "considerWarningAsError": { + "$id": "2695", + "kind": "boolean", + "type": { + "$ref": "514" + }, + "value": true + }, + "defaultServiceTypeHealthPolicy": { + "$id": "2696", + "kind": "model", + "type": { + "$ref": "522" + }, + "value": { + "$id": "2697", + "maxPercentUnhealthyPartitionsPerService": { + "$id": "2698", + "kind": "number", + "type": { + "$ref": "528" + }, + "value": 0 + }, + "maxPercentUnhealthyReplicasPerPartition": { + "$id": "2699", + "kind": "number", + "type": { + "$ref": "532" + }, + "value": 0 + }, + "maxPercentUnhealthyServices": { + "$id": "2700", + "kind": "number", + "type": { + "$ref": "524" + }, + "value": 0 + } + } + }, + "maxPercentUnhealthyDeployedApplications": { + "$id": "2701", + "kind": "number", + "type": { + "$ref": "518" + }, + "value": 0 + }, + "serviceTypeHealthPolicyMap": { + "$id": "2702", + "kind": "dict", + "type": { + "$ref": "538" + }, + "value": { + "$id": "2703", + "service1": { + "$id": "2704", + "kind": "model", + "type": { + "$ref": "522" + }, + "value": { + "$id": "2705", + "maxPercentUnhealthyPartitionsPerService": { + "$id": "2706", + "kind": "number", + "type": { + "$ref": "528" + }, + "value": 30 + }, + "maxPercentUnhealthyReplicasPerPartition": { + "$id": "2707", + "kind": "number", + "type": { + "$ref": "532" + }, + "value": 30 + }, + "maxPercentUnhealthyServices": { + "$id": "2708", + "kind": "number", + "type": { + "$ref": "524" + }, + "value": 30 + } + } + } + } + } + } + }, + "forceRestart": { + "$id": "2709", + "kind": "boolean", + "type": { + "$ref": "545" + }, + "value": false + }, + "instanceCloseDelayDuration": { + "$id": "2710", + "kind": "number", + "type": { + "$ref": "576" + }, + "value": 600 + }, + "recreateApplication": { + "$id": "2711", + "kind": "boolean", + "type": { + "$ref": "587" + }, + "value": false + }, + "rollingUpgradeMonitoringPolicy": { + "$id": "2712", + "kind": "model", + "type": { + "$ref": "549" + }, + "value": { + "$id": "2713", + "failureAction": { + "$id": "2714", + "kind": "string", + "type": { + "$ref": "2" + }, + "value": "Rollback" + }, + "healthCheckRetryTimeout": { + "$id": "2715", + "kind": "string", + "type": { + "$ref": "562" + }, + "value": "00:10:00" + }, + "healthCheckStableDuration": { + "$id": "2716", + "kind": "string", + "type": { + "$ref": "558" + }, + "value": "00:05:00" + }, + "healthCheckWaitDuration": { + "$id": "2717", + "kind": "string", + "type": { + "$ref": "554" + }, + "value": "00:02:00" + }, + "upgradeDomainTimeout": { + "$id": "2718", + "kind": "string", + "type": { + "$ref": "570" + }, + "value": "00:15:00" + }, + "upgradeTimeout": { + "$id": "2719", + "kind": "string", + "type": { + "$ref": "566" + }, + "value": "01:00:00" + } + } + }, + "upgradeMode": { + "$id": "2720", + "kind": "string", + "type": { + "$ref": "8" + }, + "value": "UnmonitoredAuto" + }, + "upgradeReplicaSetCheckTimeout": { + "$id": "2721", + "kind": "number", + "type": { + "$ref": "583" + }, + "value": 3600 + } + } + }, + "version": { + "$id": "2722", + "kind": "string", + "type": { + "$ref": "500" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/managedclusters/myCluster/applicationTypes/myAppType/versions/1.0" + } + } + }, + "tags": { + "$id": "2723", + "kind": "dict", + "type": { + "$ref": "610" + }, + "value": { + "$id": "2724", + "a": { + "$id": "2725", + "kind": "string", + "type": { + "$ref": "612" + }, + "value": "b" + } + } + } + } + } + } + ] + }, + { + "$id": "2726", + "kind": "http", + "name": "Put an application with minimum parameters", + "description": "Put an application with minimum parameters", + "filePath": "2025-03-01-preview/ApplicationPutOperation_example_min.json", + "parameters": [ + { + "$id": "2727", + "parameter": { + "$ref": "2594" + }, + "value": { + "$id": "2728", + "kind": "string", + "type": { + "$ref": "2595" + }, + "value": "2025-03-01-preview" + } + }, + { + "$id": "2729", + "parameter": { + "$ref": "2604" + }, + "value": { + "$id": "2730", + "kind": "string", + "type": { + "$ref": "2605" + }, + "value": "myApp" + } + }, + { + "$id": "2731", + "parameter": { + "$ref": "2602" + }, + "value": { + "$id": "2732", + "kind": "string", + "type": { + "$ref": "2603" + }, + "value": "myCluster" + } + }, + { + "$id": "2733", + "parameter": { + "$ref": "2600" + }, + "value": { + "$id": "2734", + "kind": "string", + "type": { + "$ref": "2601" + }, + "value": "resRg" + } + }, + { + "$id": "2735", + "parameter": { + "$ref": "2598" + }, + "value": { + "$id": "2736", + "kind": "string", + "type": { + "$ref": "2599" + }, + "value": "00000000-0000-0000-0000-000000000000" + } + } + ], + "responses": [ + { + "$id": "2737", + "response": { + "$ref": "2613" + }, + "statusCode": 200, + "bodyValue": { + "$id": "2738", + "kind": "model", + "type": { + "$ref": "449" + }, + "value": { + "$id": "2739", + "name": { + "$id": "2740", + "kind": "string", + "type": { + "$ref": "457" + }, + "value": "myApp" + }, + "type": { + "$id": "2741", + "kind": "string", + "type": { + "$ref": "461" + }, + "value": "Microsoft.ServiceFabric/managedClusters/applications" + }, + "id": { + "$id": "2742", + "kind": "string", + "type": { + "$ref": "453" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/managedclusters/myCluster/applications/myApp" + }, + "location": { + "$id": "2743", + "kind": "string", + "type": { + "$ref": "645" + }, + "value": "eastus" + }, + "properties": { + "$id": "2744", + "kind": "model", + "type": { + "$ref": "494" + }, + "value": { + "$id": "2745", + "parameters": { + "$id": "2746", + "kind": "dict", + "type": { + "$ref": "504" + }, + "value": { + "$id": "2747", + "param1": { + "$id": "2748", + "kind": "string", + "type": { + "$ref": "506" + }, + "value": "value1" + } + } + }, + "provisioningState": { + "$id": "2749", + "kind": "string", + "type": { + "$ref": "496" + }, + "value": "Updating" + }, + "upgradePolicy": { + "$id": "2750", + "kind": "model", + "type": { + "$ref": "510" + }, + "value": { + "$id": "2751", + "applicationHealthPolicy": { + "$id": "2752", + "kind": "model", + "type": { + "$ref": "512" + }, + "value": { + "$id": "2753", + "considerWarningAsError": { + "$id": "2754", + "kind": "boolean", + "type": { + "$ref": "514" + }, + "value": true + }, + "defaultServiceTypeHealthPolicy": { + "$id": "2755", + "kind": "model", + "type": { + "$ref": "522" + }, + "value": { + "$id": "2756", + "maxPercentUnhealthyPartitionsPerService": { + "$id": "2757", + "kind": "number", + "type": { + "$ref": "528" + }, + "value": 0 + }, + "maxPercentUnhealthyReplicasPerPartition": { + "$id": "2758", + "kind": "number", + "type": { + "$ref": "532" + }, + "value": 0 + }, + "maxPercentUnhealthyServices": { + "$id": "2759", + "kind": "number", + "type": { + "$ref": "524" + }, + "value": 0 + } + } + }, + "maxPercentUnhealthyDeployedApplications": { + "$id": "2760", + "kind": "number", + "type": { + "$ref": "518" + }, + "value": 0 + }, + "serviceTypeHealthPolicyMap": { + "$id": "2761", + "kind": "dict", + "type": { + "$ref": "538" + }, + "value": { + "$id": "2762", + "service1": { + "$id": "2763", + "kind": "model", + "type": { + "$ref": "522" + }, + "value": { + "$id": "2764", + "maxPercentUnhealthyPartitionsPerService": { + "$id": "2765", + "kind": "number", + "type": { + "$ref": "528" + }, + "value": 30 + }, + "maxPercentUnhealthyReplicasPerPartition": { + "$id": "2766", + "kind": "number", + "type": { + "$ref": "532" + }, + "value": 30 + }, + "maxPercentUnhealthyServices": { + "$id": "2767", + "kind": "number", + "type": { + "$ref": "524" + }, + "value": 30 + } + } + } + } + } + } + }, + "forceRestart": { + "$id": "2768", + "kind": "boolean", + "type": { + "$ref": "545" + }, + "value": false + }, + "instanceCloseDelayDuration": { + "$id": "2769", + "kind": "number", + "type": { + "$ref": "576" + }, + "value": 600 + }, + "recreateApplication": { + "$id": "2770", + "kind": "boolean", + "type": { + "$ref": "587" + }, + "value": false + }, + "rollingUpgradeMonitoringPolicy": { + "$id": "2771", + "kind": "model", + "type": { + "$ref": "549" + }, + "value": { + "$id": "2772", + "failureAction": { + "$id": "2773", + "kind": "string", + "type": { + "$ref": "2" + }, + "value": "Rollback" + }, + "healthCheckRetryTimeout": { + "$id": "2774", + "kind": "string", + "type": { + "$ref": "562" + }, + "value": "00:10:00" + }, + "healthCheckStableDuration": { + "$id": "2775", + "kind": "string", + "type": { + "$ref": "558" + }, + "value": "00:05:00" + }, + "healthCheckWaitDuration": { + "$id": "2776", + "kind": "string", + "type": { + "$ref": "554" + }, + "value": "00:02:00" + }, + "upgradeDomainTimeout": { + "$id": "2777", + "kind": "string", + "type": { + "$ref": "570" + }, + "value": "00:15:00" + }, + "upgradeTimeout": { + "$id": "2778", + "kind": "string", + "type": { + "$ref": "566" + }, + "value": "01:00:00" + } + } + }, + "upgradeMode": { + "$id": "2779", + "kind": "string", + "type": { + "$ref": "8" + }, + "value": "UnmonitoredAuto" + }, + "upgradeReplicaSetCheckTimeout": { + "$id": "2780", + "kind": "number", + "type": { + "$ref": "583" + }, + "value": 3600 + } + } + }, + "version": { + "$id": "2781", + "kind": "string", + "type": { + "$ref": "500" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/managedclusters/myCluster/applicationTypes/myAppType/versions/1.0" + } + } + } + } + } + }, + { + "$id": "2782", + "response": { + "$ref": "2614" + }, + "statusCode": 202, + "bodyValue": { + "$id": "2783", + "kind": "model", + "type": { + "$ref": "449" + }, + "value": { + "$id": "2784", + "name": { + "$id": "2785", + "kind": "string", + "type": { + "$ref": "457" + }, + "value": "myCluster" + }, + "type": { + "$id": "2786", + "kind": "string", + "type": { + "$ref": "461" + }, + "value": "Microsoft.ServiceFabric/managedClusters/applications" + }, + "id": { + "$id": "2787", + "kind": "string", + "type": { + "$ref": "453" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/managedclusters/myCluster/applications/myApp" + }, + "properties": { + "$id": "2788", + "kind": "model", + "type": { + "$ref": "494" + }, + "value": { + "$id": "2789", + "provisioningState": { + "$id": "2790", + "kind": "string", + "type": { + "$ref": "496" + }, + "value": "Updating" + }, + "version": { + "$id": "2791", + "kind": "string", + "type": { + "$ref": "500" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/managedclusters/myCluster/applicationTypes/myAppType/versions/1.0" + } + } + } + } + } + } + ] + } + ] + }, + "parameters": [ + { + "$id": "2792", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "2793", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2794", + "name": "clusterName", + "nameInRequest": "clusterName", + "doc": "The name of the cluster resource.", + "type": { + "$id": "2795", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2796", + "name": "applicationName", + "nameInRequest": "applicationName", + "doc": "The name of the application resource.", + "type": { + "$id": "2797", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2798", + "name": "parameters", + "nameInRequest": "resource", + "doc": "The application resource.", + "type": { + "$ref": "449" + }, + "location": "Body", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2799", + "name": "contentType", + "nameInRequest": "contentType", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$id": "2800", + "kind": "constant", + "valueType": { + "$id": "2801", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "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": "2802", + "name": "accept", + "nameInRequest": "accept", + "type": { + "$id": "2803", + "kind": "constant", + "valueType": { + "$id": "2804", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "response": { + "$id": "2805", + "type": { + "$ref": "449" + } + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.Applications.createOrUpdate", + "lroMetadata": { + "$id": "2806", + "finalStateVia": 1, + "finalResponse": { + "$id": "2807", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "449" + } + } + } + }, + { + "$id": "2808", + "kind": "basic", + "name": "update", + "accessibility": "public", + "apiVersions": [ + "2024-11-01-preview", + "2025-03-01-preview" + ], + "doc": "Updates the tags of an application resource of a given managed cluster.", + "operation": { + "$id": "2809", + "name": "update", + "resourceName": "ApplicationResource", + "doc": "Updates the tags of an application resource of a given managed cluster.", + "accessibility": "public", + "parameters": [ + { + "$id": "2810", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "2811", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "2812", + "type": { + "$id": "2813", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-03-01-preview" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2814", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "2815", + "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": "2816", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "2817", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2818", + "name": "clusterName", + "nameInRequest": "clusterName", + "doc": "The name of the cluster resource.", + "type": { + "$id": "2819", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2820", + "name": "applicationName", + "nameInRequest": "applicationName", + "doc": "The name of the application resource.", + "type": { + "$id": "2821", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2822", + "name": "contentType", + "nameInRequest": "Content-Type", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$id": "2823", + "kind": "constant", + "valueType": { + "$id": "2824", + "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": "2825", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "2826", + "kind": "constant", + "valueType": { + "$id": "2827", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "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": "2828", + "name": "parameters", + "nameInRequest": "parameters", + "doc": "The application resource updated tags.", + "type": { + "$ref": "675" + }, + "location": "Body", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "2829", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "449" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "PATCH", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications/{applicationName}", + "requestMediaTypes": [ + "application/json" + ], + "bufferResponse": true, + "generateProtocolMethod": true, + "generateConvenienceMethod": false, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.Applications.update", + "decorators": [], + "examples": [ + { + "$id": "2830", + "kind": "http", + "name": "Patch an application", + "description": "Patch an application", + "filePath": "2025-03-01-preview/ApplicationPatchOperation_example.json", + "parameters": [ + { + "$id": "2831", + "parameter": { + "$ref": "2810" + }, + "value": { + "$id": "2832", + "kind": "string", + "type": { + "$ref": "2811" + }, + "value": "2025-03-01-preview" + } + }, + { + "$id": "2833", + "parameter": { + "$ref": "2820" + }, + "value": { + "$id": "2834", + "kind": "string", + "type": { + "$ref": "2821" + }, + "value": "myApp" + } + }, + { + "$id": "2835", + "parameter": { + "$ref": "2818" + }, + "value": { + "$id": "2836", + "kind": "string", + "type": { + "$ref": "2819" + }, + "value": "myCluster" + } + }, + { + "$id": "2837", + "parameter": { + "$ref": "2816" + }, + "value": { + "$id": "2838", + "kind": "string", + "type": { + "$ref": "2817" + }, + "value": "resRg" + } + }, + { + "$id": "2839", + "parameter": { + "$ref": "2814" + }, + "value": { + "$id": "2840", + "kind": "string", + "type": { + "$ref": "2815" + }, + "value": "00000000-0000-0000-0000-000000000000" + } + } + ], + "responses": [ + { + "$id": "2841", + "response": { + "$ref": "2829" + }, + "statusCode": 200, + "bodyValue": { + "$id": "2842", + "kind": "model", + "type": { + "$ref": "449" + }, + "value": { + "$id": "2843", + "name": { + "$id": "2844", + "kind": "string", + "type": { + "$ref": "457" + }, + "value": "myApp" + }, + "type": { + "$id": "2845", + "kind": "string", + "type": { + "$ref": "461" + }, + "value": "Microsoft.ServiceFabric/managedClusters/applications" + }, + "id": { + "$id": "2846", + "kind": "string", + "type": { + "$ref": "453" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/managedclusters/myCluster/applications/myApp" + }, + "location": { + "$id": "2847", + "kind": "string", + "type": { + "$ref": "645" + }, + "value": "eastus" + }, + "properties": { + "$id": "2848", + "kind": "model", + "type": { + "$ref": "494" + }, + "value": { + "$id": "2849", + "parameters": { + "$id": "2850", + "kind": "dict", + "type": { + "$ref": "504" + }, + "value": { + "$id": "2851", + "param1": { + "$id": "2852", + "kind": "string", + "type": { + "$ref": "506" + }, + "value": "value1" + } + } + }, + "provisioningState": { + "$id": "2853", + "kind": "string", + "type": { + "$ref": "496" + }, + "value": "Succeeded" + }, + "upgradePolicy": { + "$id": "2854", + "kind": "model", + "type": { + "$ref": "510" + }, + "value": { + "$id": "2855", + "applicationHealthPolicy": { + "$id": "2856", + "kind": "model", + "type": { + "$ref": "512" + }, + "value": { + "$id": "2857", + "considerWarningAsError": { + "$id": "2858", + "kind": "boolean", + "type": { + "$ref": "514" + }, + "value": true + }, + "defaultServiceTypeHealthPolicy": { + "$id": "2859", + "kind": "model", + "type": { + "$ref": "522" + }, + "value": { + "$id": "2860", + "maxPercentUnhealthyPartitionsPerService": { + "$id": "2861", + "kind": "number", + "type": { + "$ref": "528" + }, + "value": 0 + }, + "maxPercentUnhealthyReplicasPerPartition": { + "$id": "2862", + "kind": "number", + "type": { + "$ref": "532" + }, + "value": 0 + }, + "maxPercentUnhealthyServices": { + "$id": "2863", + "kind": "number", + "type": { + "$ref": "524" + }, + "value": 0 + } + } + }, + "maxPercentUnhealthyDeployedApplications": { + "$id": "2864", + "kind": "number", + "type": { + "$ref": "518" + }, + "value": 0 + }, + "serviceTypeHealthPolicyMap": { + "$id": "2865", + "kind": "dict", + "type": { + "$ref": "538" + }, + "value": { + "$id": "2866", + "service1": { + "$id": "2867", + "kind": "model", + "type": { + "$ref": "522" + }, + "value": { + "$id": "2868", + "maxPercentUnhealthyPartitionsPerService": { + "$id": "2869", + "kind": "number", + "type": { + "$ref": "528" + }, + "value": 30 + }, + "maxPercentUnhealthyReplicasPerPartition": { + "$id": "2870", + "kind": "number", + "type": { + "$ref": "532" + }, + "value": 30 + }, + "maxPercentUnhealthyServices": { + "$id": "2871", + "kind": "number", + "type": { + "$ref": "524" + }, + "value": 30 + } + } + } + } + } + } + }, + "forceRestart": { + "$id": "2872", + "kind": "boolean", + "type": { + "$ref": "545" + }, + "value": false + }, + "instanceCloseDelayDuration": { + "$id": "2873", + "kind": "number", + "type": { + "$ref": "576" + }, + "value": 600 + }, + "recreateApplication": { + "$id": "2874", + "kind": "boolean", + "type": { + "$ref": "587" + }, + "value": false + }, + "rollingUpgradeMonitoringPolicy": { + "$id": "2875", + "kind": "model", + "type": { + "$ref": "549" + }, + "value": { + "$id": "2876", + "failureAction": { + "$id": "2877", + "kind": "string", + "type": { + "$ref": "2" + }, + "value": "Rollback" + }, + "healthCheckRetryTimeout": { + "$id": "2878", + "kind": "string", + "type": { + "$ref": "562" + }, + "value": "00:10:00" + }, + "healthCheckStableDuration": { + "$id": "2879", + "kind": "string", + "type": { + "$ref": "558" + }, + "value": "00:05:00" + }, + "healthCheckWaitDuration": { + "$id": "2880", + "kind": "string", + "type": { + "$ref": "554" + }, + "value": "00:02:00" + }, + "upgradeDomainTimeout": { + "$id": "2881", + "kind": "string", + "type": { + "$ref": "570" + }, + "value": "00:15:00" + }, + "upgradeTimeout": { + "$id": "2882", + "kind": "string", + "type": { + "$ref": "566" + }, + "value": "01:00:00" + } + } + }, + "upgradeMode": { + "$id": "2883", + "kind": "string", + "type": { + "$ref": "8" + }, + "value": "UnmonitoredAuto" + }, + "upgradeReplicaSetCheckTimeout": { + "$id": "2884", + "kind": "number", + "type": { + "$ref": "583" + }, + "value": 3600 + } + } + }, + "version": { + "$id": "2885", + "kind": "string", + "type": { + "$ref": "500" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/managedclusters/myCluster/applicationTypes/myAppType/versions/1.0" + } + } + }, + "tags": { + "$id": "2886", + "kind": "dict", + "type": { + "$ref": "610" + }, + "value": { + "$id": "2887", + "a": { + "$id": "2888", + "kind": "string", + "type": { + "$ref": "612" + }, + "value": "b" + } + } + } + } + } + } + ] + } + ] + }, + "parameters": [ + { + "$id": "2889", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "2890", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2891", + "name": "clusterName", + "nameInRequest": "clusterName", + "doc": "The name of the cluster resource.", + "type": { + "$id": "2892", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2893", + "name": "applicationName", + "nameInRequest": "applicationName", + "doc": "The name of the application resource.", + "type": { + "$id": "2894", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2895", + "name": "parameters", + "nameInRequest": "properties", + "doc": "The application resource updated tags.", + "type": { + "$ref": "675" + }, + "location": "Body", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2896", + "name": "contentType", + "nameInRequest": "contentType", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$ref": "2823" + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2897", + "name": "accept", + "nameInRequest": "accept", + "type": { + "$ref": "2826" + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "response": { + "$id": "2898", + "type": { + "$ref": "449" + } + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.Applications.update" + }, + { + "$id": "2899", + "kind": "lro", + "name": "delete", + "accessibility": "public", + "apiVersions": [ + "2024-11-01-preview", + "2025-03-01-preview" + ], + "doc": "Delete a Service Fabric managed application resource with the specified name.", + "operation": { + "$id": "2900", + "name": "delete", + "resourceName": "ApplicationResource", + "doc": "Delete a Service Fabric managed application resource with the specified name.", + "accessibility": "public", + "parameters": [ + { + "$id": "2901", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "2902", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "2903", + "type": { + "$id": "2904", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-03-01-preview" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2905", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "2906", + "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": "2907", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "2908", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2909", + "name": "clusterName", + "nameInRequest": "clusterName", + "doc": "The name of the cluster resource.", + "type": { + "$id": "2910", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2911", + "name": "applicationName", + "nameInRequest": "applicationName", + "doc": "The name of the application resource.", + "type": { + "$id": "2912", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2913", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "2914", + "kind": "constant", + "valueType": { + "$id": "2915", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "2916", + "statusCodes": [ + 202 + ], + "headers": [ + { + "$id": "2917", + "name": "azureAsyncOperation", + "nameInResponse": "Azure-AsyncOperation", + "doc": "A link to the status monitor", + "type": { + "$id": "2918", + "kind": "url", + "name": "ResourceLocation", + "crossLanguageDefinitionId": "TypeSpec.Rest.ResourceLocation", + "baseType": { + "$id": "2919", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url", + "decorators": [] + }, + "decorators": [] + } + }, + { + "$id": "2920", + "name": "location", + "nameInResponse": "Location", + "doc": "The Location header contains the URL where the status of the long running operation can be checked.", + "type": { + "$id": "2921", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + } + ], + "isErrorResponse": false + }, + { + "$id": "2922", + "statusCodes": [ + 204 + ], + "headers": [], + "isErrorResponse": false + } + ], + "httpMethod": "DELETE", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications/{applicationName}", + "bufferResponse": true, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.Applications.delete", + "decorators": [], + "examples": [ + { + "$id": "2923", + "kind": "http", + "name": "Delete an application", + "description": "Delete an application", + "filePath": "2025-03-01-preview/ApplicationDeleteOperation_example.json", + "parameters": [ + { + "$id": "2924", + "parameter": { + "$ref": "2901" + }, + "value": { + "$id": "2925", + "kind": "string", + "type": { + "$ref": "2902" + }, + "value": "2025-03-01-preview" + } + }, + { + "$id": "2926", + "parameter": { + "$ref": "2911" + }, + "value": { + "$id": "2927", + "kind": "string", + "type": { + "$ref": "2912" + }, + "value": "myApp" + } + }, + { + "$id": "2928", + "parameter": { + "$ref": "2909" + }, + "value": { + "$id": "2929", + "kind": "string", + "type": { + "$ref": "2910" + }, + "value": "myCluster" + } + }, + { + "$id": "2930", + "parameter": { + "$ref": "2907" + }, + "value": { + "$id": "2931", + "kind": "string", + "type": { + "$ref": "2908" + }, + "value": "resRg" + } + }, + { + "$id": "2932", + "parameter": { + "$ref": "2905" + }, + "value": { + "$id": "2933", + "kind": "string", + "type": { + "$ref": "2906" + }, + "value": "00000000-0000-0000-0000-000000000000" + } + } + ], + "responses": [ + { + "$id": "2934", + "response": { + "$ref": "2916" + }, + "statusCode": 202 + }, + { + "$id": "2935", + "response": { + "$ref": "2922" + }, + "statusCode": 204 + } + ] + } + ] + }, + "parameters": [ + { + "$id": "2936", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "2937", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2938", + "name": "clusterName", + "nameInRequest": "clusterName", + "doc": "The name of the cluster resource.", + "type": { + "$id": "2939", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2940", + "name": "applicationName", + "nameInRequest": "applicationName", + "doc": "The name of the application resource.", + "type": { + "$id": "2941", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2942", + "name": "accept", + "nameInRequest": "accept", + "type": { + "$id": "2943", + "kind": "constant", + "valueType": { + "$id": "2944", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "response": { + "$id": "2945" + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.Applications.delete", + "lroMetadata": { + "$id": "2946", + "finalStateVia": 1, + "finalResponse": { + "$id": "2947", + "statusCodes": [ + 204 + ] + } + } + }, + { + "$id": "2948", + "kind": "paging", + "name": "list", + "accessibility": "public", + "apiVersions": [ + "2024-11-01-preview", + "2025-03-01-preview" + ], + "doc": "Gets all managed application resources created or in the process of being created in the Service Fabric cluster resource.", + "operation": { + "$id": "2949", + "name": "list", + "resourceName": "ApplicationResource", + "doc": "Gets all managed application resources created or in the process of being created in the Service Fabric cluster resource.", + "accessibility": "public", + "parameters": [ + { + "$id": "2950", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "2951", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "2952", + "type": { + "$id": "2953", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-03-01-preview" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2954", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "2955", + "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": "2956", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "2957", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2958", + "name": "clusterName", + "nameInRequest": "clusterName", + "doc": "The name of the cluster resource.", + "type": { + "$id": "2959", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2960", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "2961", + "kind": "constant", + "valueType": { + "$id": "2962", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "2963", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "682" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "GET", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications", + "bufferResponse": true, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.Applications.list", + "decorators": [], + "examples": [ + { + "$id": "2964", + "kind": "http", + "name": "Get a list of application resources", + "description": "Get a list of application resources", + "filePath": "2025-03-01-preview/ApplicationListOperation_example.json", + "parameters": [ + { + "$id": "2965", + "parameter": { + "$ref": "2950" + }, + "value": { + "$id": "2966", + "kind": "string", + "type": { + "$ref": "2951" + }, + "value": "2025-03-01-preview" + } + }, + { + "$id": "2967", + "parameter": { + "$ref": "2958" + }, + "value": { + "$id": "2968", + "kind": "string", + "type": { + "$ref": "2959" + }, + "value": "myCluster" + } + }, + { + "$id": "2969", + "parameter": { + "$ref": "2956" + }, + "value": { + "$id": "2970", + "kind": "string", + "type": { + "$ref": "2957" + }, + "value": "resRg" + } + }, + { + "$id": "2971", + "parameter": { + "$ref": "2954" + }, + "value": { + "$id": "2972", + "kind": "string", + "type": { + "$ref": "2955" + }, + "value": "00000000-0000-0000-0000-000000000000" + } + } + ], + "responses": [ + { + "$id": "2973", + "response": { + "$ref": "2963" + }, + "statusCode": 200, + "bodyValue": { + "$id": "2974", + "kind": "model", + "type": { + "$ref": "682" + }, + "value": { + "$id": "2975", + "nextLink": { + "$id": "2976", + "kind": "string", + "type": { + "$ref": "688" + }, + "value": "http://examplelink.com" + }, + "value": { + "$id": "2977", + "kind": "array", + "type": { + "$ref": "684" + }, + "value": [ + { + "$id": "2978", + "kind": "model", + "type": { + "$ref": "449" + }, + "value": { + "$id": "2979", + "name": { + "$id": "2980", + "kind": "string", + "type": { + "$ref": "457" + }, + "value": "myApp" + }, + "type": { + "$id": "2981", + "kind": "string", + "type": { + "$ref": "461" + }, + "value": "Microsoft.ServiceFabric/managedClusters/applications" + }, + "id": { + "$id": "2982", + "kind": "string", + "type": { + "$ref": "453" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/managedclusters/myCluster/applications/myApp" + }, + "properties": { + "$id": "2983", + "kind": "model", + "type": { + "$ref": "494" + }, + "value": { + "$id": "2984", + "provisioningState": { + "$id": "2985", + "kind": "string", + "type": { + "$ref": "496" + }, + "value": "Updating" + }, + "version": { + "$id": "2986", + "kind": "string", + "type": { + "$ref": "500" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/managedclusters/myCluster/applicationTypes/myAppType/versions/1.0" + } + } + } + } + } + ] + } + } + } + } + ] + } + ] + }, + "parameters": [ + { + "$id": "2987", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "2988", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2989", + "name": "clusterName", + "nameInRequest": "clusterName", + "doc": "The name of the cluster resource.", + "type": { + "$id": "2990", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2991", + "name": "accept", + "nameInRequest": "accept", + "type": { + "$ref": "2961" + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "response": { + "$id": "2992", + "type": { + "$id": "2993", + "kind": "array", + "name": "ArrayApplicationResource", + "valueType": { + "$ref": "449" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "resultSegments": [ + "value" + ] + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.Applications.list", + "pagingMetadata": { + "$id": "2994", + "itemPropertySegments": [ + "value" + ], + "nextLink": { + "$id": "2995", + "responseSegments": [ + "nextLink" + ], + "responseLocation": "Body" + } + } + }, + { + "$id": "2996", + "kind": "lro", + "name": "readUpgrade", + "accessibility": "public", + "apiVersions": [ + "2024-11-01-preview", + "2025-03-01-preview" + ], + "doc": "Get the status of the latest application upgrade. It will query the cluster to find the status of the latest application upgrade.", + "operation": { + "$id": "2997", + "name": "readUpgrade", + "resourceName": "Applications", + "doc": "Get the status of the latest application upgrade. It will query the cluster to find the status of the latest application upgrade.", + "accessibility": "public", + "parameters": [ + { + "$id": "2998", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "2999", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "3000", + "type": { + "$id": "3001", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-03-01-preview" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3002", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "3003", + "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": "3004", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "3005", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3006", + "name": "clusterName", + "nameInRequest": "clusterName", + "doc": "The name of the cluster resource.", + "type": { + "$id": "3007", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3008", + "name": "applicationName", + "nameInRequest": "applicationName", + "doc": "The name of the application resource.", + "type": { + "$id": "3009", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3010", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "3011", + "kind": "constant", + "valueType": { + "$id": "3012", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "3013", + "statusCodes": [ + 202 + ], + "headers": [ + { + "$id": "3014", + "name": "azureAsyncOperation", + "nameInResponse": "Azure-AsyncOperation", + "doc": "A link to the status monitor", + "type": { + "$id": "3015", + "kind": "url", + "name": "ResourceLocation", + "crossLanguageDefinitionId": "TypeSpec.Rest.ResourceLocation", + "baseType": { + "$id": "3016", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url", + "decorators": [] + }, + "decorators": [] + } + }, + { + "$id": "3017", + "name": "location", + "nameInResponse": "Location", + "doc": "The Location header contains the URL where the status of the long running operation can be checked.", + "type": { + "$id": "3018", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + } + ], + "isErrorResponse": false + } + ], + "httpMethod": "POST", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications/{applicationName}/fetchUpgradeStatus", + "bufferResponse": true, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.Applications.readUpgrade", + "decorators": [], + "examples": [ + { + "$id": "3019", + "kind": "http", + "name": "Get an application upgrade", + "description": "Get an application upgrade", + "filePath": "2025-03-01-preview/ApplicationActionGetUpgrade_example.json", + "parameters": [ + { + "$id": "3020", + "parameter": { + "$ref": "2998" + }, + "value": { + "$id": "3021", + "kind": "string", + "type": { + "$ref": "2999" + }, + "value": "2025-03-01-preview" + } + }, + { + "$id": "3022", + "parameter": { + "$ref": "3008" + }, + "value": { + "$id": "3023", + "kind": "string", + "type": { + "$ref": "3009" + }, + "value": "myApp" + } + }, + { + "$id": "3024", + "parameter": { + "$ref": "3006" + }, + "value": { + "$id": "3025", + "kind": "string", + "type": { + "$ref": "3007" + }, + "value": "myCluster" + } + }, + { + "$id": "3026", + "parameter": { + "$ref": "3004" + }, + "value": { + "$id": "3027", + "kind": "string", + "type": { + "$ref": "3005" + }, + "value": "resRg" + } + }, + { + "$id": "3028", + "parameter": { + "$ref": "3002" + }, + "value": { + "$id": "3029", + "kind": "string", + "type": { + "$ref": "3003" + }, + "value": "00000000-0000-0000-0000-000000000000" + } + } + ], + "responses": [ + { + "$id": "3030", + "response": { + "$ref": "3013" + }, + "statusCode": 202 + } + ] + } + ] + }, + "parameters": [ + { + "$id": "3031", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "3032", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3033", + "name": "clusterName", + "nameInRequest": "clusterName", + "doc": "The name of the cluster resource.", + "type": { + "$id": "3034", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3035", + "name": "applicationName", + "nameInRequest": "applicationName", + "doc": "The name of the application resource.", + "type": { + "$id": "3036", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3037", + "name": "accept", + "nameInRequest": "accept", + "type": { + "$id": "3038", + "kind": "constant", + "valueType": { + "$id": "3039", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "response": { + "$id": "3040" + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.Applications.readUpgrade", + "lroMetadata": { + "$id": "3041", + "finalStateVia": 1, + "finalResponse": { + "$id": "3042", + "statusCodes": [ + 200 + ] + } + } + }, + { + "$id": "3043", + "kind": "lro", + "name": "resumeUpgrade", + "accessibility": "public", + "apiVersions": [ + "2024-11-01-preview", + "2025-03-01-preview" + ], + "doc": "Send a request to resume the current application upgrade. This will resume the application upgrade from where it was paused.", + "operation": { + "$id": "3044", + "name": "resumeUpgrade", + "resourceName": "Applications", + "doc": "Send a request to resume the current application upgrade. This will resume the application upgrade from where it was paused.", + "accessibility": "public", + "parameters": [ + { + "$id": "3045", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "3046", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "3047", + "type": { + "$id": "3048", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-03-01-preview" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3049", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "3050", + "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": "3051", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "3052", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3053", + "name": "clusterName", + "nameInRequest": "clusterName", + "doc": "The name of the cluster resource.", + "type": { + "$id": "3054", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3055", + "name": "applicationName", + "nameInRequest": "applicationName", + "doc": "The name of the application resource.", + "type": { + "$id": "3056", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3057", + "name": "contentType", + "nameInRequest": "Content-Type", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$id": "3058", + "kind": "constant", + "valueType": { + "$id": "3059", + "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": "3060", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "3061", + "kind": "constant", + "valueType": { + "$id": "3062", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "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": "3063", + "name": "parameters", + "nameInRequest": "parameters", + "doc": "The parameters for resuming an application upgrade.", + "type": { + "$ref": "692" + }, + "location": "Body", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "3064", + "statusCodes": [ + 202 + ], + "headers": [ + { + "$id": "3065", + "name": "azureAsyncOperation", + "nameInResponse": "Azure-AsyncOperation", + "doc": "A link to the status monitor", + "type": { + "$id": "3066", + "kind": "url", + "name": "ResourceLocation", + "crossLanguageDefinitionId": "TypeSpec.Rest.ResourceLocation", + "baseType": { + "$id": "3067", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url", + "decorators": [] + }, + "decorators": [] + } + }, + { + "$id": "3068", + "name": "location", + "nameInResponse": "Location", + "doc": "The Location header contains the URL where the status of the long running operation can be checked.", + "type": { + "$id": "3069", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + } + ], + "isErrorResponse": false + } + ], + "httpMethod": "POST", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications/{applicationName}/resumeUpgrade", + "requestMediaTypes": [ + "application/json" + ], + "bufferResponse": true, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.Applications.resumeUpgrade", + "decorators": [], + "examples": [ + { + "$id": "3070", + "kind": "http", + "name": "Resume upgrade", + "description": "Resume upgrade", + "filePath": "2025-03-01-preview/ApplicationActionResumeUpgrade_example.json", + "parameters": [ + { + "$id": "3071", + "parameter": { + "$ref": "3045" + }, + "value": { + "$id": "3072", + "kind": "string", + "type": { + "$ref": "3046" + }, + "value": "2025-03-01-preview" + } + }, + { + "$id": "3073", + "parameter": { + "$ref": "3055" + }, + "value": { + "$id": "3074", + "kind": "string", + "type": { + "$ref": "3056" + }, + "value": "myApp" + } + }, + { + "$id": "3075", + "parameter": { + "$ref": "3053" + }, + "value": { + "$id": "3076", + "kind": "string", + "type": { + "$ref": "3054" + }, + "value": "myCluster" + } + }, + { + "$id": "3077", + "parameter": { + "$ref": "3051" + }, + "value": { + "$id": "3078", + "kind": "string", + "type": { + "$ref": "3052" + }, + "value": "resRg" + } + }, + { + "$id": "3079", + "parameter": { + "$ref": "3049" + }, + "value": { + "$id": "3080", + "kind": "string", + "type": { + "$ref": "3050" + }, + "value": "00000000-0000-0000-0000-000000000000" + } + } + ], + "responses": [ + { + "$id": "3081", + "response": { + "$ref": "3064" + }, + "statusCode": 202 + } + ] + } + ] + }, + "parameters": [ + { + "$id": "3082", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "3083", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3084", + "name": "clusterName", + "nameInRequest": "clusterName", + "doc": "The name of the cluster resource.", + "type": { + "$id": "3085", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3086", + "name": "applicationName", + "nameInRequest": "applicationName", + "doc": "The name of the application resource.", + "type": { + "$id": "3087", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3088", + "name": "parameters", + "nameInRequest": "body", + "doc": "The parameters for resuming an application upgrade.", + "type": { + "$ref": "692" + }, + "location": "Body", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3089", + "name": "contentType", + "nameInRequest": "contentType", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$id": "3090", + "kind": "constant", + "valueType": { + "$id": "3091", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "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": "3092", + "name": "accept", + "nameInRequest": "accept", + "type": { + "$id": "3093", + "kind": "constant", + "valueType": { + "$id": "3094", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "response": { + "$id": "3095" + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.Applications.resumeUpgrade", + "lroMetadata": { + "$id": "3096", + "finalStateVia": 1, + "finalResponse": { + "$id": "3097", + "statusCodes": [ + 200 + ] + } + } + }, + { + "$id": "3098", + "kind": "lro", + "name": "startRollback", + "accessibility": "public", + "apiVersions": [ + "2024-11-01-preview", + "2025-03-01-preview" + ], + "doc": "Send a request to start a rollback of the current application upgrade. This will start rolling back the application to the previous version.", + "operation": { + "$id": "3099", + "name": "startRollback", + "resourceName": "Applications", + "doc": "Send a request to start a rollback of the current application upgrade. This will start rolling back the application to the previous version.", + "accessibility": "public", + "parameters": [ + { + "$id": "3100", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "3101", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "3102", + "type": { + "$id": "3103", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-03-01-preview" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3104", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "3105", + "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": "3106", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "3107", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3108", + "name": "clusterName", + "nameInRequest": "clusterName", + "doc": "The name of the cluster resource.", + "type": { + "$id": "3109", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3110", + "name": "applicationName", + "nameInRequest": "applicationName", + "doc": "The name of the application resource.", + "type": { + "$id": "3111", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3112", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "3113", + "kind": "constant", + "valueType": { + "$id": "3114", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "3115", + "statusCodes": [ + 202 + ], + "headers": [ + { + "$id": "3116", + "name": "azureAsyncOperation", + "nameInResponse": "Azure-AsyncOperation", + "doc": "A link to the status monitor", + "type": { + "$id": "3117", + "kind": "url", + "name": "ResourceLocation", + "crossLanguageDefinitionId": "TypeSpec.Rest.ResourceLocation", + "baseType": { + "$id": "3118", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url", + "decorators": [] + }, + "decorators": [] + } + }, + { + "$id": "3119", + "name": "location", + "nameInResponse": "Location", + "doc": "The Location header contains the URL where the status of the long running operation can be checked.", + "type": { + "$id": "3120", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + } + ], + "isErrorResponse": false + } + ], + "httpMethod": "POST", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications/{applicationName}/startRollback", + "bufferResponse": true, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.Applications.startRollback", + "decorators": [], + "examples": [ + { + "$id": "3121", + "kind": "http", + "name": "Start an application upgrade rollback", + "description": "Start an application upgrade rollback", + "filePath": "2025-03-01-preview/ApplicationActionStartRollback_example.json", + "parameters": [ + { + "$id": "3122", + "parameter": { + "$ref": "3100" + }, + "value": { + "$id": "3123", + "kind": "string", + "type": { + "$ref": "3101" + }, + "value": "2025-03-01-preview" + } + }, + { + "$id": "3124", + "parameter": { + "$ref": "3110" + }, + "value": { + "$id": "3125", + "kind": "string", + "type": { + "$ref": "3111" + }, + "value": "myApp" + } + }, + { + "$id": "3126", + "parameter": { + "$ref": "3108" + }, + "value": { + "$id": "3127", + "kind": "string", + "type": { + "$ref": "3109" + }, + "value": "myCluster" + } + }, + { + "$id": "3128", + "parameter": { + "$ref": "3106" + }, + "value": { + "$id": "3129", + "kind": "string", + "type": { + "$ref": "3107" + }, + "value": "resRg" + } + }, + { + "$id": "3130", + "parameter": { + "$ref": "3104" + }, + "value": { + "$id": "3131", + "kind": "string", + "type": { + "$ref": "3105" + }, + "value": "00000000-0000-0000-0000-000000000000" + } + } + ], + "responses": [ + { + "$id": "3132", + "response": { + "$ref": "3115" + }, + "statusCode": 202 + } + ] + } + ] + }, + "parameters": [ + { + "$id": "3133", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "3134", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3135", + "name": "clusterName", + "nameInRequest": "clusterName", + "doc": "The name of the cluster resource.", + "type": { + "$id": "3136", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3137", + "name": "applicationName", + "nameInRequest": "applicationName", + "doc": "The name of the application resource.", + "type": { + "$id": "3138", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3139", + "name": "accept", + "nameInRequest": "accept", + "type": { + "$id": "3140", + "kind": "constant", + "valueType": { + "$id": "3141", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "response": { + "$id": "3142" + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.Applications.startRollback", + "lroMetadata": { + "$id": "3143", + "finalStateVia": 1, + "finalResponse": { + "$id": "3144", + "statusCodes": [ + 200 + ] + } + } + } + ], + "parameters": [ + { + "$id": "3145", + "name": "endpoint", + "nameInRequest": "endpoint", + "doc": "Service host", + "type": { + "$id": "3146", + "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": "3147", + "type": { + "$id": "3148", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "https://management.azure.com" + } + } + ], + "decorators": [ + { + "$id": "3149", + "name": "Azure.ResourceManager.@armResourceOperations", + "arguments": { + "$id": "3150" + } + } + ], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.Applications", + "apiVersions": [ + "2024-11-01-preview", + "2025-03-01-preview" + ], + "parent": { + "$ref": "2389" + } + }, + { + "$id": "3151", + "kind": "client", + "name": "ApplicationTypes", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "methods": [ + { + "$id": "3152", + "kind": "basic", + "name": "get", + "accessibility": "public", + "apiVersions": [ + "2024-11-01-preview", + "2025-03-01-preview" + ], + "doc": "Get a Service Fabric application type name resource created or in the process of being created in the Service Fabric managed cluster resource.", + "operation": { + "$id": "3153", + "name": "get", + "resourceName": "ApplicationTypeResource", + "doc": "Get a Service Fabric application type name resource created or in the process of being created in the Service Fabric managed cluster resource.", + "accessibility": "public", + "parameters": [ + { + "$id": "3154", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "3155", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "3156", + "type": { + "$id": "3157", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-03-01-preview" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3158", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "3159", + "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": "3160", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "3161", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3162", + "name": "clusterName", + "nameInRequest": "clusterName", + "doc": "The name of the cluster resource.", + "type": { + "$id": "3163", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3164", + "name": "applicationTypeName", + "nameInRequest": "applicationTypeName", + "doc": "The name of the application type name resource.", + "type": { + "$id": "3165", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3166", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "3167", + "kind": "constant", + "valueType": { + "$id": "3168", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "3169", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "697" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "GET", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applicationTypes/{applicationTypeName}", + "bufferResponse": true, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ApplicationTypes.get", + "decorators": [], + "examples": [ + { + "$id": "3170", + "kind": "http", + "name": "Get an application type", + "description": "Get an application type", + "filePath": "2025-03-01-preview/ApplicationTypeNameGetOperation_example.json", + "parameters": [ + { + "$id": "3171", + "parameter": { + "$ref": "3154" + }, + "value": { + "$id": "3172", + "kind": "string", + "type": { + "$ref": "3155" + }, + "value": "2025-03-01-preview" + } + }, + { + "$id": "3173", + "parameter": { + "$ref": "3164" + }, + "value": { + "$id": "3174", + "kind": "string", + "type": { + "$ref": "3165" + }, + "value": "myAppType" + } + }, + { + "$id": "3175", + "parameter": { + "$ref": "3162" + }, + "value": { + "$id": "3176", + "kind": "string", + "type": { + "$ref": "3163" + }, + "value": "myCluster" + } + }, + { + "$id": "3177", + "parameter": { + "$ref": "3160" + }, + "value": { + "$id": "3178", + "kind": "string", + "type": { + "$ref": "3161" + }, + "value": "resRg" + } + }, + { + "$id": "3179", + "parameter": { + "$ref": "3158" + }, + "value": { + "$id": "3180", + "kind": "string", + "type": { + "$ref": "3159" + }, + "value": "00000000-0000-0000-0000-000000000000" + } + } + ], + "responses": [ + { + "$id": "3181", + "response": { + "$ref": "3169" + }, + "statusCode": 200, + "bodyValue": { + "$id": "3182", + "kind": "model", + "type": { + "$ref": "697" + }, + "value": { + "$id": "3183", + "name": { + "$id": "3184", + "kind": "string", + "type": { + "$ref": "457" + }, + "value": "myAppType" + }, + "type": { + "$id": "3185", + "kind": "string", + "type": { + "$ref": "461" + }, + "value": "Microsoft.ServiceFabric/managedClusters/applicationTypes" + }, + "id": { + "$id": "3186", + "kind": "string", + "type": { + "$ref": "453" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/managedclusters/myCluster/applicationTypes/myAppType" + }, + "properties": { + "$id": "3187", + "kind": "model", + "type": { + "$ref": "699" + }, + "value": { + "$id": "3188", + "provisioningState": { + "$id": "3189", + "kind": "string", + "type": { + "$ref": "701" + }, + "value": "Succeeded" + } + } + } + } + } + } + ] + } + ] + }, + "parameters": [ + { + "$id": "3190", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "3191", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3192", + "name": "clusterName", + "nameInRequest": "clusterName", + "doc": "The name of the cluster resource.", + "type": { + "$id": "3193", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3194", + "name": "applicationTypeName", + "nameInRequest": "applicationTypeName", + "doc": "The name of the application type name resource.", + "type": { + "$id": "3195", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3196", + "name": "accept", + "nameInRequest": "accept", + "type": { + "$ref": "3167" + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "response": { + "$id": "3197", + "type": { + "$ref": "697" + } + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ApplicationTypes.get" + }, + { + "$id": "3198", + "kind": "basic", + "name": "createOrUpdate", + "accessibility": "public", + "apiVersions": [ + "2024-11-01-preview", + "2025-03-01-preview" + ], + "doc": "Create or update a Service Fabric managed application type name resource with the specified name.", + "operation": { + "$id": "3199", + "name": "createOrUpdate", + "resourceName": "ApplicationTypeResource", + "doc": "Create or update a Service Fabric managed application type name resource with the specified name.", + "accessibility": "public", + "parameters": [ + { + "$id": "3200", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "3201", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "3202", + "type": { + "$id": "3203", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-03-01-preview" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3204", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "3205", + "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": "3206", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "3207", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3208", + "name": "clusterName", + "nameInRequest": "clusterName", + "doc": "The name of the cluster resource.", + "type": { + "$id": "3209", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3210", + "name": "applicationTypeName", + "nameInRequest": "applicationTypeName", + "doc": "The name of the application type name resource.", + "type": { + "$id": "3211", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3212", + "name": "contentType", + "nameInRequest": "Content-Type", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$id": "3213", + "kind": "constant", + "valueType": { + "$id": "3214", + "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": "3215", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "3216", + "kind": "constant", + "valueType": { + "$id": "3217", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "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": "3218", + "name": "parameters", + "nameInRequest": "parameters", + "doc": "The application type name resource.", + "type": { + "$ref": "697" + }, + "location": "Body", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "3219", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "697" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "PUT", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applicationTypes/{applicationTypeName}", + "requestMediaTypes": [ + "application/json" + ], + "bufferResponse": true, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ApplicationTypes.createOrUpdate", + "decorators": [], + "examples": [ + { + "$id": "3220", + "kind": "http", + "name": "Put an application type", + "description": "Put an application type", + "filePath": "2025-03-01-preview/ApplicationTypeNamePutOperation_example.json", + "parameters": [ + { + "$id": "3221", + "parameter": { + "$ref": "3200" + }, + "value": { + "$id": "3222", + "kind": "string", + "type": { + "$ref": "3201" + }, + "value": "2025-03-01-preview" + } + }, + { + "$id": "3223", + "parameter": { + "$ref": "3210" + }, + "value": { + "$id": "3224", + "kind": "string", + "type": { + "$ref": "3211" + }, + "value": "myAppType" + } + }, + { + "$id": "3225", + "parameter": { + "$ref": "3208" + }, + "value": { + "$id": "3226", + "kind": "string", + "type": { + "$ref": "3209" + }, + "value": "myCluster" + } + }, + { + "$id": "3227", + "parameter": { + "$ref": "3206" + }, + "value": { + "$id": "3228", + "kind": "string", + "type": { + "$ref": "3207" + }, + "value": "resRg" + } + }, + { + "$id": "3229", + "parameter": { + "$ref": "3204" + }, + "value": { + "$id": "3230", + "kind": "string", + "type": { + "$ref": "3205" + }, + "value": "00000000-0000-0000-0000-000000000000" + } + } + ], + "responses": [ + { + "$id": "3231", + "response": { + "$ref": "3219" + }, + "statusCode": 200, + "bodyValue": { + "$id": "3232", + "kind": "model", + "type": { + "$ref": "697" + }, + "value": { + "$id": "3233", + "name": { + "$id": "3234", + "kind": "string", + "type": { + "$ref": "457" + }, + "value": "myAppType" + }, + "type": { + "$id": "3235", + "kind": "string", + "type": { + "$ref": "461" + }, + "value": "Microsoft.ServiceFabric/managedClusters/applicationTypes" + }, + "id": { + "$id": "3236", + "kind": "string", + "type": { + "$ref": "453" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/managedclusters/myCluster/applicationTypes/myAppType" + }, + "properties": { + "$id": "3237", + "kind": "model", + "type": { + "$ref": "699" + }, + "value": { + "$id": "3238", + "provisioningState": { + "$id": "3239", + "kind": "string", + "type": { + "$ref": "701" + }, + "value": "Succeeded" + } + } + } + } + } + } + ] + } + ] + }, + "parameters": [ + { + "$id": "3240", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "3241", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3242", + "name": "clusterName", + "nameInRequest": "clusterName", + "doc": "The name of the cluster resource.", + "type": { + "$id": "3243", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3244", + "name": "applicationTypeName", + "nameInRequest": "applicationTypeName", + "doc": "The name of the application type name resource.", + "type": { + "$id": "3245", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3246", + "name": "parameters", + "nameInRequest": "resource", + "doc": "The application type name resource.", + "type": { + "$ref": "697" + }, + "location": "Body", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3247", + "name": "contentType", + "nameInRequest": "contentType", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$ref": "3213" + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3248", + "name": "accept", + "nameInRequest": "accept", + "type": { + "$ref": "3216" + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "response": { + "$id": "3249", + "type": { + "$ref": "697" + } + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ApplicationTypes.createOrUpdate" + }, + { + "$id": "3250", + "kind": "basic", + "name": "update", + "accessibility": "public", + "apiVersions": [ + "2024-11-01-preview", + "2025-03-01-preview" + ], + "doc": "Updates the tags of an application type resource of a given managed cluster.", + "operation": { + "$id": "3251", + "name": "update", + "resourceName": "ApplicationTypeResource", + "doc": "Updates the tags of an application type resource of a given managed cluster.", + "accessibility": "public", + "parameters": [ + { + "$id": "3252", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "3253", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "3254", + "type": { + "$id": "3255", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-03-01-preview" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3256", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "3257", + "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": "3258", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "3259", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3260", + "name": "clusterName", + "nameInRequest": "clusterName", + "doc": "The name of the cluster resource.", + "type": { + "$id": "3261", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3262", + "name": "applicationTypeName", + "nameInRequest": "applicationTypeName", + "doc": "The name of the application type name resource.", + "type": { + "$id": "3263", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3264", + "name": "contentType", + "nameInRequest": "Content-Type", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$id": "3265", + "kind": "constant", + "valueType": { + "$id": "3266", + "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": "3267", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "3268", + "kind": "constant", + "valueType": { + "$id": "3269", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "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": "3270", + "name": "parameters", + "nameInRequest": "parameters", + "doc": "The application type resource updated tags.", + "type": { + "$ref": "718" + }, + "location": "Body", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "3271", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "697" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "PATCH", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applicationTypes/{applicationTypeName}", + "requestMediaTypes": [ + "application/json" + ], + "bufferResponse": true, + "generateProtocolMethod": true, + "generateConvenienceMethod": false, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ApplicationTypes.update", + "decorators": [], + "examples": [ + { + "$id": "3272", + "kind": "http", + "name": "Patch an application type", + "description": "Patch an application type", + "filePath": "2025-03-01-preview/ApplicationTypeNamePatchOperation_example.json", + "parameters": [ + { + "$id": "3273", + "parameter": { + "$ref": "3252" + }, + "value": { + "$id": "3274", + "kind": "string", + "type": { + "$ref": "3253" + }, + "value": "2025-03-01-preview" + } + }, + { + "$id": "3275", + "parameter": { + "$ref": "3262" + }, + "value": { + "$id": "3276", + "kind": "string", + "type": { + "$ref": "3263" + }, + "value": "myAppType" + } + }, + { + "$id": "3277", + "parameter": { + "$ref": "3260" + }, + "value": { + "$id": "3278", + "kind": "string", + "type": { + "$ref": "3261" + }, + "value": "myCluster" + } + }, + { + "$id": "3279", + "parameter": { + "$ref": "3258" + }, + "value": { + "$id": "3280", + "kind": "string", + "type": { + "$ref": "3259" + }, + "value": "resRg" + } + }, + { + "$id": "3281", + "parameter": { + "$ref": "3256" + }, + "value": { + "$id": "3282", + "kind": "string", + "type": { + "$ref": "3257" + }, + "value": "00000000-0000-0000-0000-000000000000" + } + } + ], + "responses": [ + { + "$id": "3283", + "response": { + "$ref": "3271" + }, + "statusCode": 200, + "bodyValue": { + "$id": "3284", + "kind": "model", + "type": { + "$ref": "697" + }, + "value": { + "$id": "3285", + "name": { + "$id": "3286", + "kind": "string", + "type": { + "$ref": "457" + }, + "value": "myAppType" + }, + "type": { + "$id": "3287", + "kind": "string", + "type": { + "$ref": "461" + }, + "value": "Microsoft.ServiceFabric/managedClusters/applicationTypes" + }, + "id": { + "$id": "3288", + "kind": "string", + "type": { + "$ref": "453" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/managedclusters/myCluster/applicationTypes/myAppType" + }, + "properties": { + "$id": "3289", + "kind": "model", + "type": { + "$ref": "699" + }, + "value": { + "$id": "3290", + "provisioningState": { + "$id": "3291", + "kind": "string", + "type": { + "$ref": "701" + }, + "value": "Succeeded" + } + } + }, + "tags": { + "$id": "3292", + "kind": "dict", + "type": { + "$ref": "709" + }, + "value": { + "$id": "3293", + "a": { + "$id": "3294", + "kind": "string", + "type": { + "$ref": "711" + }, + "value": "b" + } + } + } + } + } + } + ] + } + ] + }, + "parameters": [ + { + "$id": "3295", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "3296", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3297", + "name": "clusterName", + "nameInRequest": "clusterName", + "doc": "The name of the cluster resource.", + "type": { + "$id": "3298", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3299", + "name": "applicationTypeName", + "nameInRequest": "applicationTypeName", + "doc": "The name of the application type name resource.", + "type": { + "$id": "3300", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3301", + "name": "parameters", + "nameInRequest": "properties", + "doc": "The application type resource updated tags.", + "type": { + "$ref": "718" + }, + "location": "Body", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3302", + "name": "contentType", + "nameInRequest": "contentType", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$ref": "3265" + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3303", + "name": "accept", + "nameInRequest": "accept", + "type": { + "$ref": "3268" + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "response": { + "$id": "3304", + "type": { + "$ref": "697" + } + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ApplicationTypes.update" + }, + { + "$id": "3305", + "kind": "lro", + "name": "delete", + "accessibility": "public", + "apiVersions": [ + "2024-11-01-preview", + "2025-03-01-preview" + ], + "doc": "Delete a Service Fabric managed application type name resource with the specified name.", + "operation": { + "$id": "3306", + "name": "delete", + "resourceName": "ApplicationTypeResource", + "doc": "Delete a Service Fabric managed application type name resource with the specified name.", + "accessibility": "public", + "parameters": [ + { + "$id": "3307", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "3308", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "3309", + "type": { + "$id": "3310", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-03-01-preview" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3311", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "3312", + "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": "3313", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "3314", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3315", + "name": "clusterName", + "nameInRequest": "clusterName", + "doc": "The name of the cluster resource.", + "type": { + "$id": "3316", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3317", + "name": "applicationTypeName", + "nameInRequest": "applicationTypeName", + "doc": "The name of the application type name resource.", + "type": { + "$id": "3318", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3319", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "3320", + "kind": "constant", + "valueType": { + "$id": "3321", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "3322", + "statusCodes": [ + 202 + ], + "headers": [ + { + "$id": "3323", + "name": "azureAsyncOperation", + "nameInResponse": "Azure-AsyncOperation", + "doc": "A link to the status monitor", + "type": { + "$id": "3324", + "kind": "url", + "name": "ResourceLocation", + "crossLanguageDefinitionId": "TypeSpec.Rest.ResourceLocation", + "baseType": { + "$id": "3325", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url", + "decorators": [] + }, + "decorators": [] + } + }, + { + "$id": "3326", + "name": "location", + "nameInResponse": "Location", + "doc": "The Location header contains the URL where the status of the long running operation can be checked.", + "type": { + "$id": "3327", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + } + ], + "isErrorResponse": false + }, + { + "$id": "3328", + "statusCodes": [ + 204 + ], + "headers": [], + "isErrorResponse": false + } + ], + "httpMethod": "DELETE", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applicationTypes/{applicationTypeName}", + "bufferResponse": true, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ApplicationTypes.delete", + "decorators": [], + "examples": [ + { + "$id": "3329", + "kind": "http", + "name": "Delete an application type", + "description": "Delete an application type", + "filePath": "2025-03-01-preview/ApplicationTypeNameDeleteOperation_example.json", + "parameters": [ + { + "$id": "3330", + "parameter": { + "$ref": "3307" + }, + "value": { + "$id": "3331", + "kind": "string", + "type": { + "$ref": "3308" + }, + "value": "2025-03-01-preview" + } + }, + { + "$id": "3332", + "parameter": { + "$ref": "3317" + }, + "value": { + "$id": "3333", + "kind": "string", + "type": { + "$ref": "3318" + }, + "value": "myAppType" + } + }, + { + "$id": "3334", + "parameter": { + "$ref": "3315" + }, + "value": { + "$id": "3335", + "kind": "string", + "type": { + "$ref": "3316" + }, + "value": "myCluster" + } + }, + { + "$id": "3336", + "parameter": { + "$ref": "3313" + }, + "value": { + "$id": "3337", + "kind": "string", + "type": { + "$ref": "3314" + }, + "value": "resRg" + } + }, + { + "$id": "3338", + "parameter": { + "$ref": "3311" + }, + "value": { + "$id": "3339", + "kind": "string", + "type": { + "$ref": "3312" + }, + "value": "00000000-0000-0000-0000-000000000000" + } + } + ], + "responses": [ + { + "$id": "3340", + "response": { + "$ref": "3322" + }, + "statusCode": 202 + }, + { + "$id": "3341", + "response": { + "$ref": "3328" + }, + "statusCode": 204 + } + ] + } + ] + }, + "parameters": [ + { + "$id": "3342", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "3343", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3344", + "name": "clusterName", + "nameInRequest": "clusterName", + "doc": "The name of the cluster resource.", + "type": { + "$id": "3345", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3346", + "name": "applicationTypeName", + "nameInRequest": "applicationTypeName", + "doc": "The name of the application type name resource.", + "type": { + "$id": "3347", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3348", + "name": "accept", + "nameInRequest": "accept", + "type": { + "$id": "3349", + "kind": "constant", + "valueType": { + "$id": "3350", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "response": { + "$id": "3351" + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ApplicationTypes.delete", + "lroMetadata": { + "$id": "3352", + "finalStateVia": 1, + "finalResponse": { + "$id": "3353", + "statusCodes": [ + 204 + ] + } + } + }, + { + "$id": "3354", + "kind": "paging", + "name": "list", + "accessibility": "public", + "apiVersions": [ + "2024-11-01-preview", + "2025-03-01-preview" + ], + "doc": "Gets all application type name resources created or in the process of being created in the Service Fabric managed cluster resource.", + "operation": { + "$id": "3355", + "name": "list", + "resourceName": "ApplicationTypeResource", + "doc": "Gets all application type name resources created or in the process of being created in the Service Fabric managed cluster resource.", + "accessibility": "public", + "parameters": [ + { + "$id": "3356", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "3357", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "3358", + "type": { + "$id": "3359", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-03-01-preview" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3360", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "3361", + "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": "3362", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "3363", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3364", + "name": "clusterName", + "nameInRequest": "clusterName", + "doc": "The name of the cluster resource.", + "type": { + "$id": "3365", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3366", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "3367", + "kind": "constant", + "valueType": { + "$id": "3368", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "3369", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "725" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "GET", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applicationTypes", + "bufferResponse": true, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ApplicationTypes.list", + "decorators": [], + "examples": [ + { + "$id": "3370", + "kind": "http", + "name": "Get a list of application type name resources", + "description": "Get a list of application type name resources", + "filePath": "2025-03-01-preview/ApplicationTypeNameListOperation_example.json", + "parameters": [ + { + "$id": "3371", + "parameter": { + "$ref": "3356" + }, + "value": { + "$id": "3372", + "kind": "string", + "type": { + "$ref": "3357" + }, + "value": "2025-03-01-preview" + } + }, + { + "$id": "3373", + "parameter": { + "$ref": "3364" + }, + "value": { + "$id": "3374", + "kind": "string", + "type": { + "$ref": "3365" + }, + "value": "myCluster" + } + }, + { + "$id": "3375", + "parameter": { + "$ref": "3362" + }, + "value": { + "$id": "3376", + "kind": "string", + "type": { + "$ref": "3363" + }, + "value": "resRg" + } + }, + { + "$id": "3377", + "parameter": { + "$ref": "3360" + }, + "value": { + "$id": "3378", + "kind": "string", + "type": { + "$ref": "3361" + }, + "value": "00000000-0000-0000-0000-000000000000" + } + } + ], + "responses": [ + { + "$id": "3379", + "response": { + "$ref": "3369" + }, + "statusCode": 200, + "bodyValue": { + "$id": "3380", + "kind": "model", + "type": { + "$ref": "725" + }, + "value": { + "$id": "3381", + "nextLink": { + "$id": "3382", + "kind": "string", + "type": { + "$ref": "731" + }, + "value": "http://examplelink.com" + }, + "value": { + "$id": "3383", + "kind": "array", + "type": { + "$ref": "727" + }, + "value": [ + { + "$id": "3384", + "kind": "model", + "type": { + "$ref": "697" + }, + "value": { + "$id": "3385", + "name": { + "$id": "3386", + "kind": "string", + "type": { + "$ref": "457" + }, + "value": "myAppType" + }, + "type": { + "$id": "3387", + "kind": "string", + "type": { + "$ref": "461" + }, + "value": "Microsoft.ServiceFabric/managedClusters/applicationTypes" + }, + "id": { + "$id": "3388", + "kind": "string", + "type": { + "$ref": "453" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/managedclusters/myCluster/applicationTypes/myAppType" + }, + "properties": { + "$id": "3389", + "kind": "model", + "type": { + "$ref": "699" + }, + "value": { + "$id": "3390", + "provisioningState": { + "$id": "3391", + "kind": "string", + "type": { + "$ref": "701" + }, + "value": "Succeeded" + } + } + } + } + } + ] + } + } + } + } + ] + } + ] + }, + "parameters": [ + { + "$id": "3392", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "3393", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3394", + "name": "clusterName", + "nameInRequest": "clusterName", + "doc": "The name of the cluster resource.", + "type": { + "$id": "3395", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3396", + "name": "accept", + "nameInRequest": "accept", + "type": { + "$ref": "3367" + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "response": { + "$id": "3397", + "type": { + "$id": "3398", + "kind": "array", + "name": "ArrayApplicationTypeResource", + "valueType": { + "$ref": "697" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "resultSegments": [ + "value" + ] + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ApplicationTypes.list", + "pagingMetadata": { + "$id": "3399", + "itemPropertySegments": [ + "value" + ], + "nextLink": { + "$id": "3400", + "responseSegments": [ + "nextLink" + ], + "responseLocation": "Body" + } + } + } + ], + "parameters": [ + { + "$id": "3401", + "name": "endpoint", + "nameInRequest": "endpoint", + "doc": "Service host", + "type": { + "$id": "3402", + "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": "3403", + "type": { + "$id": "3404", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "https://management.azure.com" + } + } + ], + "decorators": [ + { + "$id": "3405", + "name": "Azure.ResourceManager.@armResourceOperations", + "arguments": { + "$id": "3406" + } + } + ], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ApplicationTypes", + "apiVersions": [ + "2024-11-01-preview", + "2025-03-01-preview" + ], + "parent": { + "$ref": "2389" + } + }, + { + "$id": "3407", + "kind": "client", + "name": "ApplicationTypeVersions", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "methods": [ + { + "$id": "3408", + "kind": "basic", + "name": "get", + "accessibility": "public", + "apiVersions": [ + "2024-11-01-preview", + "2025-03-01-preview" + ], + "doc": "Get a Service Fabric managed application type version resource created or in the process of being created in the Service Fabric managed application type name resource.", + "operation": { + "$id": "3409", + "name": "get", + "resourceName": "ApplicationTypeVersionResource", + "doc": "Get a Service Fabric managed application type version resource created or in the process of being created in the Service Fabric managed application type name resource.", + "accessibility": "public", + "parameters": [ + { + "$id": "3410", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "3411", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "3412", + "type": { + "$id": "3413", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-03-01-preview" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3414", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "3415", + "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": "3416", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "3417", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3418", + "name": "clusterName", + "nameInRequest": "clusterName", + "doc": "The name of the cluster resource.", + "type": { + "$id": "3419", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3420", + "name": "applicationTypeName", + "nameInRequest": "applicationTypeName", + "doc": "The name of the application type name resource.", + "type": { + "$id": "3421", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3422", + "name": "version", + "nameInRequest": "version", + "doc": "The application type version.", + "type": { + "$id": "3423", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3424", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "3425", + "kind": "constant", + "valueType": { + "$id": "3426", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "3427", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "735" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "GET", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applicationTypes/{applicationTypeName}/versions/{version}", + "bufferResponse": true, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ApplicationTypeVersions.get", + "decorators": [], + "examples": [ + { + "$id": "3428", + "kind": "http", + "name": "Get an application type version", + "description": "Get an application type version", + "filePath": "2025-03-01-preview/ApplicationTypeVersionGetOperation_example.json", + "parameters": [ + { + "$id": "3429", + "parameter": { + "$ref": "3410" + }, + "value": { + "$id": "3430", + "kind": "string", + "type": { + "$ref": "3411" + }, + "value": "2025-03-01-preview" + } + }, + { + "$id": "3431", + "parameter": { + "$ref": "3420" + }, + "value": { + "$id": "3432", + "kind": "string", + "type": { + "$ref": "3421" + }, + "value": "myAppType" + } + }, + { + "$id": "3433", + "parameter": { + "$ref": "3418" + }, + "value": { + "$id": "3434", + "kind": "string", + "type": { + "$ref": "3419" + }, + "value": "myCluster" + } + }, + { + "$id": "3435", + "parameter": { + "$ref": "3416" + }, + "value": { + "$id": "3436", + "kind": "string", + "type": { + "$ref": "3417" + }, + "value": "resRg" + } + }, + { + "$id": "3437", + "parameter": { + "$ref": "3414" + }, + "value": { + "$id": "3438", + "kind": "string", + "type": { + "$ref": "3415" + }, + "value": "00000000-0000-0000-0000-000000000000" + } + }, + { + "$id": "3439", + "parameter": { + "$ref": "3422" + }, + "value": { + "$id": "3440", + "kind": "string", + "type": { + "$ref": "3423" + }, + "value": "1.0" + } + } + ], + "responses": [ + { + "$id": "3441", + "response": { + "$ref": "3427" + }, + "statusCode": 200, + "bodyValue": { + "$id": "3442", + "kind": "model", + "type": { + "$ref": "735" + }, + "value": { + "$id": "3443", + "name": { + "$id": "3444", + "kind": "string", + "type": { + "$ref": "457" + }, + "value": "1.0" + }, + "type": { + "$id": "3445", + "kind": "string", + "type": { + "$ref": "461" + }, + "value": "Microsoft.ServiceFabric/managedClusters/applicationTypes/versions" + }, + "id": { + "$id": "3446", + "kind": "string", + "type": { + "$ref": "453" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/managedclusters/myCluster/applicationTypes/myAppType/versions/1.0" + }, + "properties": { + "$id": "3447", + "kind": "model", + "type": { + "$ref": "737" + }, + "value": { + "$id": "3448", + "appPackageUrl": { + "$id": "3449", + "kind": "string", + "type": { + "$ref": "743" + }, + "value": "http://fakelink.test.com/MyAppType" + }, + "provisioningState": { + "$id": "3450", + "kind": "string", + "type": { + "$ref": "739" + }, + "value": "Updating" + } + } + } + } + } + } + ] + } + ] + }, + "parameters": [ + { + "$id": "3451", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "3452", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3453", + "name": "clusterName", + "nameInRequest": "clusterName", + "doc": "The name of the cluster resource.", + "type": { + "$id": "3454", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3455", + "name": "applicationTypeName", + "nameInRequest": "applicationTypeName", + "doc": "The name of the application type name resource.", + "type": { + "$id": "3456", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3457", + "name": "version", + "nameInRequest": "version", + "doc": "The application type version.", + "type": { + "$id": "3458", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3459", + "name": "accept", + "nameInRequest": "accept", + "type": { + "$ref": "3425" + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "response": { + "$id": "3460", + "type": { + "$ref": "735" + } + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ApplicationTypeVersions.get" + }, + { + "$id": "3461", + "kind": "lro", + "name": "createOrUpdate", + "accessibility": "public", + "apiVersions": [ + "2024-11-01-preview", + "2025-03-01-preview" + ], + "doc": "Create or update a Service Fabric managed application type version resource with the specified name.", + "operation": { + "$id": "3462", + "name": "createOrUpdate", + "resourceName": "ApplicationTypeVersionResource", + "doc": "Create or update a Service Fabric managed application type version resource with the specified name.", + "accessibility": "public", + "parameters": [ + { + "$id": "3463", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "3464", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "3465", + "type": { + "$id": "3466", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-03-01-preview" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3467", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "3468", + "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": "3469", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "3470", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3471", + "name": "clusterName", + "nameInRequest": "clusterName", + "doc": "The name of the cluster resource.", + "type": { + "$id": "3472", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3473", + "name": "applicationTypeName", + "nameInRequest": "applicationTypeName", + "doc": "The name of the application type name resource.", + "type": { + "$id": "3474", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3475", + "name": "version", + "nameInRequest": "version", + "doc": "The application type version.", + "type": { + "$id": "3476", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3477", + "name": "contentType", + "nameInRequest": "Content-Type", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$id": "3478", + "kind": "constant", + "valueType": { + "$id": "3479", + "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": "3480", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "3481", + "kind": "constant", + "valueType": { + "$id": "3482", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "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": "3483", + "name": "parameters", + "nameInRequest": "parameters", + "doc": "The application type version resource.", + "type": { + "$ref": "735" + }, + "location": "Body", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "3484", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "735" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + }, + { + "$id": "3485", + "statusCodes": [ + 202 + ], + "bodyType": { + "$ref": "735" + }, + "headers": [ + { + "$id": "3486", + "name": "azureAsyncOperation", + "nameInResponse": "Azure-AsyncOperation", + "doc": "A link to the status monitor", + "type": { + "$id": "3487", + "kind": "url", + "name": "ResourceLocation", + "crossLanguageDefinitionId": "TypeSpec.Rest.ResourceLocation", + "baseType": { + "$id": "3488", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url", + "decorators": [] + }, + "decorators": [] + } + }, + { + "$id": "3489", + "name": "location", + "nameInResponse": "Location", + "doc": "The Location header contains the URL where the status of the long running operation can be checked.", + "type": { + "$id": "3490", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + } + ], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "PUT", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applicationTypes/{applicationTypeName}/versions/{version}", + "requestMediaTypes": [ + "application/json" + ], + "bufferResponse": true, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ApplicationTypeVersions.createOrUpdate", + "decorators": [], + "examples": [ + { + "$id": "3491", + "kind": "http", + "name": "Put an application type version", + "description": "Put an application type version", + "filePath": "2025-03-01-preview/ApplicationTypeVersionPutOperation_example.json", + "parameters": [ + { + "$id": "3492", + "parameter": { + "$ref": "3463" + }, + "value": { + "$id": "3493", + "kind": "string", + "type": { + "$ref": "3464" + }, + "value": "2025-03-01-preview" + } + }, + { + "$id": "3494", + "parameter": { + "$ref": "3473" + }, + "value": { + "$id": "3495", + "kind": "string", + "type": { + "$ref": "3474" + }, + "value": "myAppType" + } + }, + { + "$id": "3496", + "parameter": { + "$ref": "3471" + }, + "value": { + "$id": "3497", + "kind": "string", + "type": { + "$ref": "3472" + }, + "value": "myCluster" + } + }, + { + "$id": "3498", + "parameter": { + "$ref": "3469" + }, + "value": { + "$id": "3499", + "kind": "string", + "type": { + "$ref": "3470" + }, + "value": "resRg" + } + }, + { + "$id": "3500", + "parameter": { + "$ref": "3467" + }, + "value": { + "$id": "3501", + "kind": "string", + "type": { + "$ref": "3468" + }, + "value": "00000000-0000-0000-0000-000000000000" + } + }, + { + "$id": "3502", + "parameter": { + "$ref": "3475" + }, + "value": { + "$id": "3503", + "kind": "string", + "type": { + "$ref": "3476" + }, + "value": "1.0" + } + } + ], + "responses": [ + { + "$id": "3504", + "response": { + "$ref": "3484" + }, + "statusCode": 200, + "bodyValue": { + "$id": "3505", + "kind": "model", + "type": { + "$ref": "735" + }, + "value": { + "$id": "3506", + "name": { + "$id": "3507", + "kind": "string", + "type": { + "$ref": "457" + }, + "value": "1.0" + }, + "type": { + "$id": "3508", + "kind": "string", + "type": { + "$ref": "461" + }, + "value": "Microsoft.ServiceFabric/managedClusters/applicationTypes/versions" + }, + "id": { + "$id": "3509", + "kind": "string", + "type": { + "$ref": "453" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/managedclusters/myCluster/applicationTypes/myAppType/versions/1.0" + }, + "properties": { + "$id": "3510", + "kind": "model", + "type": { + "$ref": "737" + }, + "value": { + "$id": "3511", + "appPackageUrl": { + "$id": "3512", + "kind": "string", + "type": { + "$ref": "743" + }, + "value": "http://fakelink.test.com/MyAppType" + }, + "provisioningState": { + "$id": "3513", + "kind": "string", + "type": { + "$ref": "739" + }, + "value": "Creating" + } + } + } + } + } + }, + { + "$id": "3514", + "response": { + "$ref": "3485" + }, + "statusCode": 202, + "bodyValue": { + "$id": "3515", + "kind": "model", + "type": { + "$ref": "735" + }, + "value": { + "$id": "3516", + "name": { + "$id": "3517", + "kind": "string", + "type": { + "$ref": "457" + }, + "value": "1.0" + }, + "type": { + "$id": "3518", + "kind": "string", + "type": { + "$ref": "461" + }, + "value": "Microsoft.ServiceFabric/managedClusters/applicationTypes/versions" + }, + "id": { + "$id": "3519", + "kind": "string", + "type": { + "$ref": "453" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/managedclusters/myCluster/applicationTypes/myAppType/versions/1.0" + }, + "properties": { + "$id": "3520", + "kind": "model", + "type": { + "$ref": "737" + }, + "value": { + "$id": "3521", + "appPackageUrl": { + "$id": "3522", + "kind": "string", + "type": { + "$ref": "743" + }, + "value": "http://fakelink.test.com/MyAppType" + }, + "provisioningState": { + "$id": "3523", + "kind": "string", + "type": { + "$ref": "739" + }, + "value": "Updating" + } + } + } + } + } + } + ] + } + ] + }, + "parameters": [ + { + "$id": "3524", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "3525", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3526", + "name": "clusterName", + "nameInRequest": "clusterName", + "doc": "The name of the cluster resource.", + "type": { + "$id": "3527", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3528", + "name": "applicationTypeName", + "nameInRequest": "applicationTypeName", + "doc": "The name of the application type name resource.", + "type": { + "$id": "3529", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3530", + "name": "version", + "nameInRequest": "version", + "doc": "The application type version.", + "type": { + "$id": "3531", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3532", + "name": "parameters", + "nameInRequest": "resource", + "doc": "The application type version resource.", + "type": { + "$ref": "735" + }, + "location": "Body", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3533", + "name": "contentType", + "nameInRequest": "contentType", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$id": "3534", + "kind": "constant", + "valueType": { + "$id": "3535", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "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": "3536", + "name": "accept", + "nameInRequest": "accept", + "type": { + "$id": "3537", + "kind": "constant", + "valueType": { + "$id": "3538", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "response": { + "$id": "3539", + "type": { + "$ref": "735" + } + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ApplicationTypeVersions.createOrUpdate", + "lroMetadata": { + "$id": "3540", + "finalStateVia": 1, + "finalResponse": { + "$id": "3541", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "735" + } + } + } + }, + { + "$id": "3542", + "kind": "basic", + "name": "update", + "accessibility": "public", + "apiVersions": [ + "2024-11-01-preview", + "2025-03-01-preview" + ], + "doc": "Updates the tags of an application type version resource of a given managed cluster.", + "operation": { + "$id": "3543", + "name": "update", + "resourceName": "ApplicationTypeVersionResource", + "doc": "Updates the tags of an application type version resource of a given managed cluster.", + "accessibility": "public", + "parameters": [ + { + "$id": "3544", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "3545", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "3546", + "type": { + "$id": "3547", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-03-01-preview" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3548", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "3549", + "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": "3550", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "3551", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3552", + "name": "clusterName", + "nameInRequest": "clusterName", + "doc": "The name of the cluster resource.", + "type": { + "$id": "3553", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3554", + "name": "applicationTypeName", + "nameInRequest": "applicationTypeName", + "doc": "The name of the application type name resource.", + "type": { + "$id": "3555", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3556", + "name": "version", + "nameInRequest": "version", + "doc": "The application type version.", + "type": { + "$id": "3557", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3558", + "name": "contentType", + "nameInRequest": "Content-Type", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$id": "3559", + "kind": "constant", + "valueType": { + "$id": "3560", + "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": "3561", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "3562", + "kind": "constant", + "valueType": { + "$id": "3563", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "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": "3564", + "name": "parameters", + "nameInRequest": "parameters", + "doc": "The application type version resource updated tags.", + "type": { + "$ref": "760" + }, + "location": "Body", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "3565", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "735" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "PATCH", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applicationTypes/{applicationTypeName}/versions/{version}", + "requestMediaTypes": [ + "application/json" + ], + "bufferResponse": true, + "generateProtocolMethod": true, + "generateConvenienceMethod": false, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ApplicationTypeVersions.update", + "decorators": [], + "examples": [ + { + "$id": "3566", + "kind": "http", + "name": "Patch an application type version", + "description": "Patch an application type version", + "filePath": "2025-03-01-preview/ApplicationTypeVersionPatchOperation_example.json", + "parameters": [ + { + "$id": "3567", + "parameter": { + "$ref": "3544" + }, + "value": { + "$id": "3568", + "kind": "string", + "type": { + "$ref": "3545" + }, + "value": "2025-03-01-preview" + } + }, + { + "$id": "3569", + "parameter": { + "$ref": "3554" + }, + "value": { + "$id": "3570", + "kind": "string", + "type": { + "$ref": "3555" + }, + "value": "myAppType" + } + }, + { + "$id": "3571", + "parameter": { + "$ref": "3552" + }, + "value": { + "$id": "3572", + "kind": "string", + "type": { + "$ref": "3553" + }, + "value": "myCluster" + } + }, + { + "$id": "3573", + "parameter": { + "$ref": "3550" + }, + "value": { + "$id": "3574", + "kind": "string", + "type": { + "$ref": "3551" + }, + "value": "resRg" + } + }, + { + "$id": "3575", + "parameter": { + "$ref": "3548" + }, + "value": { + "$id": "3576", + "kind": "string", + "type": { + "$ref": "3549" + }, + "value": "00000000-0000-0000-0000-000000000000" + } + }, + { + "$id": "3577", + "parameter": { + "$ref": "3556" + }, + "value": { + "$id": "3578", + "kind": "string", + "type": { + "$ref": "3557" + }, + "value": "1.0" + } + } + ], + "responses": [ + { + "$id": "3579", + "response": { + "$ref": "3565" + }, + "statusCode": 200, + "bodyValue": { + "$id": "3580", + "kind": "model", + "type": { + "$ref": "735" + }, + "value": { + "$id": "3581", + "name": { + "$id": "3582", + "kind": "string", + "type": { + "$ref": "457" + }, + "value": "1.0" + }, + "type": { + "$id": "3583", + "kind": "string", + "type": { + "$ref": "461" + }, + "value": "Microsoft.ServiceFabric/managedClusters/applicationTypes/versions" + }, + "id": { + "$id": "3584", + "kind": "string", + "type": { + "$ref": "453" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/managedclusters/myCluster/applicationTypes/myAppType/versions/1.0" + }, + "properties": { + "$id": "3585", + "kind": "model", + "type": { + "$ref": "737" + }, + "value": { + "$id": "3586", + "appPackageUrl": { + "$id": "3587", + "kind": "string", + "type": { + "$ref": "743" + }, + "value": "http://fakelink.test.com/MyAppType" + }, + "provisioningState": { + "$id": "3588", + "kind": "string", + "type": { + "$ref": "739" + }, + "value": "Succeeded" + } + } + }, + "tags": { + "$id": "3589", + "kind": "dict", + "type": { + "$ref": "751" + }, + "value": { + "$id": "3590", + "a": { + "$id": "3591", + "kind": "string", + "type": { + "$ref": "753" + }, + "value": "b" + } + } + } + } + } + } + ] + } + ] + }, + "parameters": [ + { + "$id": "3592", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "3593", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3594", + "name": "clusterName", + "nameInRequest": "clusterName", + "doc": "The name of the cluster resource.", + "type": { + "$id": "3595", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3596", + "name": "applicationTypeName", + "nameInRequest": "applicationTypeName", + "doc": "The name of the application type name resource.", + "type": { + "$id": "3597", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3598", + "name": "version", + "nameInRequest": "version", + "doc": "The application type version.", + "type": { + "$id": "3599", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3600", + "name": "parameters", + "nameInRequest": "properties", + "doc": "The application type version resource updated tags.", + "type": { + "$ref": "760" + }, + "location": "Body", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3601", + "name": "contentType", + "nameInRequest": "contentType", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$ref": "3559" + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3602", + "name": "accept", + "nameInRequest": "accept", + "type": { + "$ref": "3562" + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "response": { + "$id": "3603", + "type": { + "$ref": "735" + } + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ApplicationTypeVersions.update" + }, + { + "$id": "3604", + "kind": "lro", + "name": "delete", + "accessibility": "public", + "apiVersions": [ + "2024-11-01-preview", + "2025-03-01-preview" + ], + "doc": "Delete a Service Fabric managed application type version resource with the specified name.", + "operation": { + "$id": "3605", + "name": "delete", + "resourceName": "ApplicationTypeVersionResource", + "doc": "Delete a Service Fabric managed application type version resource with the specified name.", + "accessibility": "public", + "parameters": [ + { + "$id": "3606", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "3607", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "3608", + "type": { + "$id": "3609", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-03-01-preview" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3610", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "3611", + "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": "3612", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "3613", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3614", + "name": "clusterName", + "nameInRequest": "clusterName", + "doc": "The name of the cluster resource.", + "type": { + "$id": "3615", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3616", + "name": "applicationTypeName", + "nameInRequest": "applicationTypeName", + "doc": "The name of the application type name resource.", + "type": { + "$id": "3617", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3618", + "name": "version", + "nameInRequest": "version", + "doc": "The application type version.", + "type": { + "$id": "3619", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3620", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "3621", + "kind": "constant", + "valueType": { + "$id": "3622", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "3623", + "statusCodes": [ + 202 + ], + "headers": [ + { + "$id": "3624", + "name": "azureAsyncOperation", + "nameInResponse": "Azure-AsyncOperation", + "doc": "A link to the status monitor", + "type": { + "$id": "3625", + "kind": "url", + "name": "ResourceLocation", + "crossLanguageDefinitionId": "TypeSpec.Rest.ResourceLocation", + "baseType": { + "$id": "3626", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url", + "decorators": [] + }, + "decorators": [] + } + }, + { + "$id": "3627", + "name": "location", + "nameInResponse": "Location", + "doc": "The Location header contains the URL where the status of the long running operation can be checked.", + "type": { + "$id": "3628", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + } + ], + "isErrorResponse": false + }, + { + "$id": "3629", + "statusCodes": [ + 204 + ], + "headers": [], + "isErrorResponse": false + } + ], + "httpMethod": "DELETE", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applicationTypes/{applicationTypeName}/versions/{version}", + "bufferResponse": true, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ApplicationTypeVersions.delete", + "decorators": [], + "examples": [ + { + "$id": "3630", + "kind": "http", + "name": "Delete an application type version", + "description": "Delete an application type version", + "filePath": "2025-03-01-preview/ApplicationTypeVersionDeleteOperation_example.json", + "parameters": [ + { + "$id": "3631", + "parameter": { + "$ref": "3606" + }, + "value": { + "$id": "3632", + "kind": "string", + "type": { + "$ref": "3607" + }, + "value": "2025-03-01-preview" + } + }, + { + "$id": "3633", + "parameter": { + "$ref": "3616" + }, + "value": { + "$id": "3634", + "kind": "string", + "type": { + "$ref": "3617" + }, + "value": "myAppType" + } + }, + { + "$id": "3635", + "parameter": { + "$ref": "3614" + }, + "value": { + "$id": "3636", + "kind": "string", + "type": { + "$ref": "3615" + }, + "value": "myCluster" + } + }, + { + "$id": "3637", + "parameter": { + "$ref": "3612" + }, + "value": { + "$id": "3638", + "kind": "string", + "type": { + "$ref": "3613" + }, + "value": "resRg" + } + }, + { + "$id": "3639", + "parameter": { + "$ref": "3610" + }, + "value": { + "$id": "3640", + "kind": "string", + "type": { + "$ref": "3611" + }, + "value": "00000000-0000-0000-0000-000000000000" + } + }, + { + "$id": "3641", + "parameter": { + "$ref": "3618" + }, + "value": { + "$id": "3642", + "kind": "string", + "type": { + "$ref": "3619" + }, + "value": "1.0" + } + } + ], + "responses": [ + { + "$id": "3643", + "response": { + "$ref": "3623" + }, + "statusCode": 202 + }, + { + "$id": "3644", + "response": { + "$ref": "3629" + }, + "statusCode": 204 + } + ] + } + ] + }, + "parameters": [ + { + "$id": "3645", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "3646", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3647", + "name": "clusterName", + "nameInRequest": "clusterName", + "doc": "The name of the cluster resource.", + "type": { + "$id": "3648", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3649", + "name": "applicationTypeName", + "nameInRequest": "applicationTypeName", + "doc": "The name of the application type name resource.", + "type": { + "$id": "3650", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3651", + "name": "version", + "nameInRequest": "version", + "doc": "The application type version.", + "type": { + "$id": "3652", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3653", + "name": "accept", + "nameInRequest": "accept", + "type": { + "$id": "3654", + "kind": "constant", + "valueType": { + "$id": "3655", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "response": { + "$id": "3656" + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ApplicationTypeVersions.delete", + "lroMetadata": { + "$id": "3657", + "finalStateVia": 1, + "finalResponse": { + "$id": "3658", + "statusCodes": [ + 204 + ] + } + } + }, + { + "$id": "3659", + "kind": "paging", + "name": "listByApplicationTypes", + "accessibility": "public", + "apiVersions": [ + "2024-11-01-preview", + "2025-03-01-preview" + ], + "doc": "Gets all application type version resources created or in the process of being created in the Service Fabric managed application type name resource.", + "operation": { + "$id": "3660", + "name": "listByApplicationTypes", + "resourceName": "ApplicationTypeVersionResource", + "doc": "Gets all application type version resources created or in the process of being created in the Service Fabric managed application type name resource.", + "accessibility": "public", + "parameters": [ + { + "$id": "3661", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "3662", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "3663", + "type": { + "$id": "3664", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-03-01-preview" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3665", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "3666", + "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": "3667", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "3668", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3669", + "name": "clusterName", + "nameInRequest": "clusterName", + "doc": "The name of the cluster resource.", + "type": { + "$id": "3670", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3671", + "name": "applicationTypeName", + "nameInRequest": "applicationTypeName", + "doc": "The name of the application type name resource.", + "type": { + "$id": "3672", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3673", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "3674", + "kind": "constant", + "valueType": { + "$id": "3675", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "3676", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "767" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "GET", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applicationTypes/{applicationTypeName}/versions", + "bufferResponse": true, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ApplicationTypeVersions.listByApplicationTypes", + "decorators": [], + "examples": [ + { + "$id": "3677", + "kind": "http", + "name": "Get a list of application type version resources", + "description": "Get a list of application type version resources", + "filePath": "2025-03-01-preview/ApplicationTypeVersionListOperation_example.json", + "parameters": [ + { + "$id": "3678", + "parameter": { + "$ref": "3661" + }, + "value": { + "$id": "3679", + "kind": "string", + "type": { + "$ref": "3662" + }, + "value": "2025-03-01-preview" + } + }, + { + "$id": "3680", + "parameter": { + "$ref": "3671" + }, + "value": { + "$id": "3681", + "kind": "string", + "type": { + "$ref": "3672" + }, + "value": "myAppType" + } + }, + { + "$id": "3682", + "parameter": { + "$ref": "3669" + }, + "value": { + "$id": "3683", + "kind": "string", + "type": { + "$ref": "3670" + }, + "value": "myCluster" + } + }, + { + "$id": "3684", + "parameter": { + "$ref": "3667" + }, + "value": { + "$id": "3685", + "kind": "string", + "type": { + "$ref": "3668" + }, + "value": "resRg" + } + }, + { + "$id": "3686", + "parameter": { + "$ref": "3665" + }, + "value": { + "$id": "3687", + "kind": "string", + "type": { + "$ref": "3666" + }, + "value": "00000000-0000-0000-0000-000000000000" + } + } + ], + "responses": [ + { + "$id": "3688", + "response": { + "$ref": "3676" + }, + "statusCode": 200, + "bodyValue": { + "$id": "3689", + "kind": "model", + "type": { + "$ref": "767" + }, + "value": { + "$id": "3690", + "nextLink": { + "$id": "3691", + "kind": "string", + "type": { + "$ref": "773" + }, + "value": "http://examplelink.com" + }, + "value": { + "$id": "3692", + "kind": "array", + "type": { + "$ref": "769" + }, + "value": [ + { + "$id": "3693", + "kind": "model", + "type": { + "$ref": "735" + }, + "value": { + "$id": "3694", + "name": { + "$id": "3695", + "kind": "string", + "type": { + "$ref": "457" + }, + "value": "1.0" + }, + "type": { + "$id": "3696", + "kind": "string", + "type": { + "$ref": "461" + }, + "value": "Microsoft.ServiceFabric/managedClusters/applicationTypes/versions" + }, + "id": { + "$id": "3697", + "kind": "string", + "type": { + "$ref": "453" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/managedclusters/myCluster/applicationTypes/myAppType/versions/1.0" + }, + "properties": { + "$id": "3698", + "kind": "model", + "type": { + "$ref": "737" + }, + "value": { + "$id": "3699", + "appPackageUrl": { + "$id": "3700", + "kind": "string", + "type": { + "$ref": "743" + }, + "value": "http://fakelink.test.com/MyAppType" + }, + "provisioningState": { + "$id": "3701", + "kind": "string", + "type": { + "$ref": "739" + }, + "value": "Updating" + } + } + } + } + } + ] + } + } + } + } + ] + } + ] + }, + "parameters": [ + { + "$id": "3702", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "3703", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3704", + "name": "clusterName", + "nameInRequest": "clusterName", + "doc": "The name of the cluster resource.", + "type": { + "$id": "3705", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3706", + "name": "applicationTypeName", + "nameInRequest": "applicationTypeName", + "doc": "The name of the application type name resource.", + "type": { + "$id": "3707", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3708", + "name": "accept", + "nameInRequest": "accept", + "type": { + "$ref": "3674" + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "response": { + "$id": "3709", + "type": { + "$id": "3710", + "kind": "array", + "name": "ArrayApplicationTypeVersionResource", + "valueType": { + "$ref": "735" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "resultSegments": [ + "value" + ] + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ApplicationTypeVersions.listByApplicationTypes", + "pagingMetadata": { + "$id": "3711", + "itemPropertySegments": [ + "value" + ], + "nextLink": { + "$id": "3712", + "responseSegments": [ + "nextLink" + ], + "responseLocation": "Body" + } + } + } + ], + "parameters": [ + { + "$id": "3713", + "name": "endpoint", + "nameInRequest": "endpoint", + "doc": "Service host", + "type": { + "$id": "3714", + "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": "3715", + "type": { + "$id": "3716", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "https://management.azure.com" + } + } + ], + "decorators": [ + { + "$id": "3717", + "name": "Azure.ResourceManager.@armResourceOperations", + "arguments": { + "$id": "3718" + } + } + ], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ApplicationTypeVersions", + "apiVersions": [ + "2024-11-01-preview", + "2025-03-01-preview" + ], + "parent": { + "$ref": "2389" + } + }, + { + "$id": "3719", + "kind": "client", + "name": "Services", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "methods": [ + { + "$id": "3720", + "kind": "basic", + "name": "get", + "accessibility": "public", + "apiVersions": [ + "2024-11-01-preview", + "2025-03-01-preview" + ], + "doc": "Get a Service Fabric service resource created or in the process of being created in the Service Fabric managed application resource.", + "operation": { + "$id": "3721", + "name": "get", + "resourceName": "ServiceResource", + "doc": "Get a Service Fabric service resource created or in the process of being created in the Service Fabric managed application resource.", + "accessibility": "public", + "parameters": [ + { + "$id": "3722", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "3723", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "3724", + "type": { + "$id": "3725", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-03-01-preview" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3726", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "3727", + "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": "3728", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "3729", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3730", + "name": "clusterName", + "nameInRequest": "clusterName", + "doc": "The name of the cluster resource.", + "type": { + "$id": "3731", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3732", + "name": "applicationName", + "nameInRequest": "applicationName", + "doc": "The name of the application resource.", + "type": { + "$id": "3733", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3734", + "name": "serviceName", + "nameInRequest": "serviceName", + "doc": "The name of the service resource in the format of {applicationName}~{serviceName}.", + "type": { + "$id": "3735", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3736", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "3737", + "kind": "constant", + "valueType": { + "$id": "3738", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "3739", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "777" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "GET", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications/{applicationName}/services/{serviceName}", + "bufferResponse": true, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.Services.get", + "decorators": [], + "examples": [ + { + "$id": "3740", + "kind": "http", + "name": "Get a service", + "description": "Get a service", + "filePath": "2025-03-01-preview/ServiceGetOperation_example.json", + "parameters": [ + { + "$id": "3741", + "parameter": { + "$ref": "3722" + }, + "value": { + "$id": "3742", + "kind": "string", + "type": { + "$ref": "3723" + }, + "value": "2025-03-01-preview" + } + }, + { + "$id": "3743", + "parameter": { + "$ref": "3732" + }, + "value": { + "$id": "3744", + "kind": "string", + "type": { + "$ref": "3733" + }, + "value": "myApp" + } + }, + { + "$id": "3745", + "parameter": { + "$ref": "3730" + }, + "value": { + "$id": "3746", + "kind": "string", + "type": { + "$ref": "3731" + }, + "value": "myCluster" + } + }, + { + "$id": "3747", + "parameter": { + "$ref": "3728" + }, + "value": { + "$id": "3748", + "kind": "string", + "type": { + "$ref": "3729" + }, + "value": "resRg" + } + }, + { + "$id": "3749", + "parameter": { + "$ref": "3734" + }, + "value": { + "$id": "3750", + "kind": "string", + "type": { + "$ref": "3735" + }, + "value": "myService" + } + }, + { + "$id": "3751", + "parameter": { + "$ref": "3726" + }, + "value": { + "$id": "3752", + "kind": "string", + "type": { + "$ref": "3727" + }, + "value": "00000000-0000-0000-0000-000000000000" + } + } + ], + "responses": [ + { + "$id": "3753", + "response": { + "$ref": "3739" + }, + "statusCode": 200, + "bodyValue": { + "$id": "3754", + "kind": "model", + "type": { + "$ref": "777" + }, + "value": { + "$id": "3755", + "name": { + "$id": "3756", + "kind": "string", + "type": { + "$ref": "457" + }, + "value": "myService" + }, + "type": { + "$id": "3757", + "kind": "string", + "type": { + "$ref": "461" + }, + "value": "Microsoft.ServiceFabric/managedClusters/applications/services" + }, + "id": { + "$id": "3758", + "kind": "string", + "type": { + "$ref": "453" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/managedclusters/myCluster/applications/myApp/services/myService" + }, + "properties": { + "$id": "3759", + "kind": "model", + "type": { + "$ref": "1080" + }, + "value": { + "$id": "3760", + "defaultMoveCost": { + "$id": "3761", + "kind": "string", + "type": { + "$ref": "90" + }, + "value": "Medium" + }, + "instanceCount": { + "$id": "3762", + "kind": "number", + "type": { + "$ref": "1082" + }, + "value": 5 + }, + "partitionDescription": { + "$id": "3763", + "kind": "model", + "type": { + "$ref": "1019" + }, + "value": { + "$id": "3764", + "partitionScheme": { + "$id": "3765", + "kind": "string", + "type": { + "$ref": "1021" + }, + "value": "Singleton" + } + } + }, + "placementConstraints": { + "$id": "3766", + "kind": "string", + "type": { + "$ref": "785" + }, + "value": "NodeType==frontend" + }, + "provisioningState": { + "$id": "3767", + "kind": "string", + "type": { + "$ref": "988" + }, + "value": "Updating" + }, + "serviceKind": { + "$id": "3768", + "kind": "string", + "type": { + "$ref": "1094" + }, + "value": "Stateless" + }, + "serviceLoadMetrics": { + "$id": "3769", + "kind": "array", + "type": { + "$ref": "801" + }, + "value": [ + { + "$id": "3770", + "kind": "model", + "type": { + "$ref": "802" + }, + "value": { + "$id": "3771", + "name": { + "$id": "3772", + "kind": "string", + "type": { + "$ref": "804" + }, + "value": "metric1" + }, + "weight": { + "$id": "3773", + "kind": "string", + "type": { + "$ref": "68" + }, + "value": "Low" + } + } + } + ] + }, + "servicePackageActivationMode": { + "$id": "3774", + "kind": "string", + "type": { + "$ref": "56" + }, + "value": "SharedProcess" + }, + "servicePlacementPolicies": { + "$id": "3775", + "kind": "array", + "type": { + "$ref": "825" + }, + "value": [] + }, + "serviceTypeName": { + "$id": "3776", + "kind": "string", + "type": { + "$ref": "992" + }, + "value": "myServiceType" + } + } + } + } + } + } + ] + } + ] + }, + "parameters": [ + { + "$id": "3777", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "3778", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3779", + "name": "clusterName", + "nameInRequest": "clusterName", + "doc": "The name of the cluster resource.", + "type": { + "$id": "3780", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3781", + "name": "applicationName", + "nameInRequest": "applicationName", + "doc": "The name of the application resource.", + "type": { + "$id": "3782", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3783", + "name": "serviceName", + "nameInRequest": "serviceName", + "doc": "The name of the service resource in the format of {applicationName}~{serviceName}.", + "type": { + "$id": "3784", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3785", + "name": "accept", + "nameInRequest": "accept", + "type": { + "$ref": "3737" + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "response": { + "$id": "3786", + "type": { + "$ref": "777" + } + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.Services.get" + }, + { + "$id": "3787", + "kind": "lro", + "name": "createOrUpdate", + "accessibility": "public", + "apiVersions": [ + "2024-11-01-preview", + "2025-03-01-preview" + ], + "doc": "Create or update a Service Fabric managed service resource with the specified name.", + "operation": { + "$id": "3788", + "name": "createOrUpdate", + "resourceName": "ServiceResource", + "doc": "Create or update a Service Fabric managed service resource with the specified name.", + "accessibility": "public", + "parameters": [ + { + "$id": "3789", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "3790", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "3791", + "type": { + "$id": "3792", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-03-01-preview" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3793", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "3794", + "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": "3795", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "3796", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3797", + "name": "clusterName", + "nameInRequest": "clusterName", + "doc": "The name of the cluster resource.", + "type": { + "$id": "3798", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3799", + "name": "applicationName", + "nameInRequest": "applicationName", + "doc": "The name of the application resource.", + "type": { + "$id": "3800", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3801", + "name": "serviceName", + "nameInRequest": "serviceName", + "doc": "The name of the service resource in the format of {applicationName}~{serviceName}.", + "type": { + "$id": "3802", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3803", + "name": "contentType", + "nameInRequest": "Content-Type", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$id": "3804", + "kind": "constant", + "valueType": { + "$id": "3805", + "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": "3806", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "3807", + "kind": "constant", + "valueType": { + "$id": "3808", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "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": "3809", + "name": "parameters", + "nameInRequest": "parameters", + "doc": "The service resource.", + "type": { + "$ref": "777" + }, + "location": "Body", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "3810", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "777" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + }, + { + "$id": "3811", + "statusCodes": [ + 202 + ], + "bodyType": { + "$ref": "777" + }, + "headers": [ + { + "$id": "3812", + "name": "azureAsyncOperation", + "nameInResponse": "Azure-AsyncOperation", + "doc": "A link to the status monitor", + "type": { + "$id": "3813", + "kind": "url", + "name": "ResourceLocation", + "crossLanguageDefinitionId": "TypeSpec.Rest.ResourceLocation", + "baseType": { + "$id": "3814", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url", + "decorators": [] + }, + "decorators": [] + } + }, + { + "$id": "3815", + "name": "location", + "nameInResponse": "Location", + "doc": "The Location header contains the URL where the status of the long running operation can be checked.", + "type": { + "$id": "3816", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + } + ], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "PUT", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications/{applicationName}/services/{serviceName}", + "requestMediaTypes": [ + "application/json" + ], + "bufferResponse": true, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.Services.createOrUpdate", + "decorators": [], + "examples": [ + { + "$id": "3817", + "kind": "http", + "name": "Put a service with maximum parameters", + "description": "Put a service with maximum parameters", + "filePath": "2025-03-01-preview/ServicePutOperation_example_max.json", + "parameters": [ + { + "$id": "3818", + "parameter": { + "$ref": "3789" + }, + "value": { + "$id": "3819", + "kind": "string", + "type": { + "$ref": "3790" + }, + "value": "2025-03-01-preview" + } + }, + { + "$id": "3820", + "parameter": { + "$ref": "3799" + }, + "value": { + "$id": "3821", + "kind": "string", + "type": { + "$ref": "3800" + }, + "value": "myApp" + } + }, + { + "$id": "3822", + "parameter": { + "$ref": "3797" + }, + "value": { + "$id": "3823", + "kind": "string", + "type": { + "$ref": "3798" + }, + "value": "myCluster" + } + }, + { + "$id": "3824", + "parameter": { + "$ref": "3795" + }, + "value": { + "$id": "3825", + "kind": "string", + "type": { + "$ref": "3796" + }, + "value": "resRg" + } + }, + { + "$id": "3826", + "parameter": { + "$ref": "3801" + }, + "value": { + "$id": "3827", + "kind": "string", + "type": { + "$ref": "3802" + }, + "value": "myService" + } + }, + { + "$id": "3828", + "parameter": { + "$ref": "3793" + }, + "value": { + "$id": "3829", + "kind": "string", + "type": { + "$ref": "3794" + }, + "value": "00000000-0000-0000-0000-000000000000" + } + } + ], + "responses": [ + { + "$id": "3830", + "response": { + "$ref": "3810" + }, + "statusCode": 200, + "bodyValue": { + "$id": "3831", + "kind": "model", + "type": { + "$ref": "777" + }, + "value": { + "$id": "3832", + "name": { + "$id": "3833", + "kind": "string", + "type": { + "$ref": "457" + }, + "value": "myService" + }, + "type": { + "$id": "3834", + "kind": "string", + "type": { + "$ref": "461" + }, + "value": "Microsoft.ServiceFabric/managedClusters/applications/services" + }, + "id": { + "$id": "3835", + "kind": "string", + "type": { + "$ref": "453" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/managedclusters/myCluster/applications/myApp/services/myService" + }, + "properties": { + "$id": "3836", + "kind": "model", + "type": { + "$ref": "1080" + }, + "value": { + "$id": "3837", + "correlationScheme": { + "$id": "3838", + "kind": "array", + "type": { + "$ref": "789" + }, + "value": [ + { + "$id": "3839", + "kind": "model", + "type": { + "$ref": "790" + }, + "value": { + "$id": "3840", + "scheme": { + "$id": "3841", + "kind": "string", + "type": { + "$ref": "62" + }, + "value": "AlignedAffinity" + }, + "serviceName": { + "$id": "3842", + "kind": "string", + "type": { + "$ref": "795" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/managedclusters/myCluster/applications/myApp/services/myService1" + } + } + } + ] + }, + "defaultMoveCost": { + "$id": "3843", + "kind": "string", + "type": { + "$ref": "90" + }, + "value": "Medium" + }, + "instanceCount": { + "$id": "3844", + "kind": "number", + "type": { + "$ref": "1082" + }, + "value": 5 + }, + "minInstanceCount": { + "$id": "3845", + "kind": "number", + "type": { + "$ref": "1086" + }, + "value": 3 + }, + "minInstancePercentage": { + "$id": "3846", + "kind": "number", + "type": { + "$ref": "1090" + }, + "value": 30 + }, + "partitionDescription": { + "$id": "3847", + "kind": "model", + "type": { + "$ref": "1019" + }, + "value": { + "$id": "3848", + "partitionScheme": { + "$id": "3849", + "kind": "string", + "type": { + "$ref": "1021" + }, + "value": "Singleton" + } + } + }, + "placementConstraints": { + "$id": "3850", + "kind": "string", + "type": { + "$ref": "785" + }, + "value": "NodeType==frontend" + }, + "provisioningState": { + "$id": "3851", + "kind": "string", + "type": { + "$ref": "988" + }, + "value": "Creating" + }, + "scalingPolicies": { + "$id": "3852", + "kind": "array", + "type": { + "$ref": "883" + }, + "value": [ + { + "$id": "3853", + "kind": "model", + "type": { + "$ref": "884" + }, + "value": { + "$id": "3854", + "scalingMechanism": { + "$id": "3855", + "kind": "model", + "type": { + "$ref": "909" + }, + "value": { + "$id": "3856", + "kind": { + "$id": "3857", + "kind": "string", + "type": { + "$ref": "923" + }, + "value": "ScalePartitionInstanceCount" + }, + "maxInstanceCount": { + "$id": "3858", + "kind": "number", + "type": { + "$ref": "915" + }, + "value": 9 + }, + "minInstanceCount": { + "$id": "3859", + "kind": "number", + "type": { + "$ref": "911" + }, + "value": 3 + }, + "scaleIncrement": { + "$id": "3860", + "kind": "number", + "type": { + "$ref": "919" + }, + "value": 2 + } + } + }, + "scalingTrigger": { + "$id": "3861", + "kind": "model", + "type": { + "$ref": "935" + }, + "value": { + "$id": "3862", + "kind": { + "$id": "3863", + "kind": "string", + "type": { + "$ref": "953" + }, + "value": "AveragePartitionLoadTrigger" + }, + "lowerLoadThreshold": { + "$id": "3864", + "kind": "number", + "type": { + "$ref": "941" + }, + "value": 2 + }, + "metricName": { + "$id": "3865", + "kind": "string", + "type": { + "$ref": "937" + }, + "value": "metricName" + }, + "scaleInterval": { + "$id": "3866", + "kind": "string", + "type": { + "$ref": "949" + }, + "value": "00:01:00" + }, + "upperLoadThreshold": { + "$id": "3867", + "kind": "number", + "type": { + "$ref": "945" + }, + "value": 8 + } + } + } + } + } + ] + }, + "serviceDnsName": { + "$id": "3868", + "kind": "string", + "type": { + "$ref": "1042" + }, + "value": "myservicednsname.myApp" + }, + "serviceKind": { + "$id": "3869", + "kind": "string", + "type": { + "$ref": "1094" + }, + "value": "Stateless" + }, + "serviceLoadMetrics": { + "$id": "3870", + "kind": "array", + "type": { + "$ref": "801" + }, + "value": [ + { + "$id": "3871", + "kind": "model", + "type": { + "$ref": "802" + }, + "value": { + "$id": "3872", + "name": { + "$id": "3873", + "kind": "string", + "type": { + "$ref": "804" + }, + "value": "metric1" + }, + "defaultLoad": { + "$id": "3874", + "kind": "number", + "type": { + "$ref": "819" + }, + "value": 3 + }, + "weight": { + "$id": "3875", + "kind": "string", + "type": { + "$ref": "68" + }, + "value": "Low" + } + } + } + ] + }, + "servicePackageActivationMode": { + "$id": "3876", + "kind": "string", + "type": { + "$ref": "56" + }, + "value": "SharedProcess" + }, + "servicePlacementPolicies": { + "$id": "3877", + "kind": "array", + "type": { + "$ref": "825" + }, + "value": [ + { + "$id": "3878", + "kind": "model", + "type": { + "$ref": "871" + }, + "value": { + "$id": "3879", + "type": { + "$id": "3880", + "kind": "string", + "type": { + "$ref": "873" + }, + "value": "NonPartiallyPlaceService" + } + } + } + ] + }, + "serviceTypeName": { + "$id": "3881", + "kind": "string", + "type": { + "$ref": "992" + }, + "value": "myServiceType" + } + } + }, + "tags": { + "$id": "3882", + "kind": "dict", + "type": { + "$ref": "1103" + }, + "value": { + "$id": "3883", + "a": { + "$id": "3884", + "kind": "string", + "type": { + "$ref": "1105" + }, + "value": "b" + } + } + } + } + } + }, + { + "$id": "3885", + "response": { + "$ref": "3811" + }, + "statusCode": 202, + "bodyValue": { + "$id": "3886", + "kind": "model", + "type": { + "$ref": "777" + }, + "value": { + "$id": "3887", + "name": { + "$id": "3888", + "kind": "string", + "type": { + "$ref": "457" + }, + "value": "myService" + }, + "type": { + "$id": "3889", + "kind": "string", + "type": { + "$ref": "461" + }, + "value": "Microsoft.ServiceFabric/managedClusters/applications/services" + }, + "id": { + "$id": "3890", + "kind": "string", + "type": { + "$ref": "453" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/managedclusters/myCluster/applications/myApp/services/myService" + }, + "properties": { + "$id": "3891", + "kind": "model", + "type": { + "$ref": "1080" + }, + "value": { + "$id": "3892", + "correlationScheme": { + "$id": "3893", + "kind": "array", + "type": { + "$ref": "789" + }, + "value": [ + { + "$id": "3894", + "kind": "model", + "type": { + "$ref": "790" + }, + "value": { + "$id": "3895", + "scheme": { + "$id": "3896", + "kind": "string", + "type": { + "$ref": "62" + }, + "value": "AlignedAffinity" + }, + "serviceName": { + "$id": "3897", + "kind": "string", + "type": { + "$ref": "795" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/managedclusters/myCluster/applications/myApp/services/myService1" + } + } + } + ] + }, + "defaultMoveCost": { + "$id": "3898", + "kind": "string", + "type": { + "$ref": "90" + }, + "value": "Medium" + }, + "instanceCount": { + "$id": "3899", + "kind": "number", + "type": { + "$ref": "1082" + }, + "value": 5 + }, + "minInstanceCount": { + "$id": "3900", + "kind": "number", + "type": { + "$ref": "1086" + }, + "value": 3 + }, + "minInstancePercentage": { + "$id": "3901", + "kind": "number", + "type": { + "$ref": "1090" + }, + "value": 30 + }, + "partitionDescription": { + "$id": "3902", + "kind": "model", + "type": { + "$ref": "1019" + }, + "value": { + "$id": "3903", + "partitionScheme": { + "$id": "3904", + "kind": "string", + "type": { + "$ref": "1021" + }, + "value": "Singleton" + } + } + }, + "placementConstraints": { + "$id": "3905", + "kind": "string", + "type": { + "$ref": "785" + }, + "value": "NodeType==frontend" + }, + "provisioningState": { + "$id": "3906", + "kind": "string", + "type": { + "$ref": "988" + }, + "value": "Updating" + }, + "scalingPolicies": { + "$id": "3907", + "kind": "array", + "type": { + "$ref": "883" + }, + "value": [ + { + "$id": "3908", + "kind": "model", + "type": { + "$ref": "884" + }, + "value": { + "$id": "3909", + "scalingMechanism": { + "$id": "3910", + "kind": "model", + "type": { + "$ref": "909" + }, + "value": { + "$id": "3911", + "kind": { + "$id": "3912", + "kind": "string", + "type": { + "$ref": "923" + }, + "value": "ScalePartitionInstanceCount" + }, + "maxInstanceCount": { + "$id": "3913", + "kind": "number", + "type": { + "$ref": "915" + }, + "value": 9 + }, + "minInstanceCount": { + "$id": "3914", + "kind": "number", + "type": { + "$ref": "911" + }, + "value": 3 + }, + "scaleIncrement": { + "$id": "3915", + "kind": "number", + "type": { + "$ref": "919" + }, + "value": 2 + } + } + }, + "scalingTrigger": { + "$id": "3916", + "kind": "model", + "type": { + "$ref": "935" + }, + "value": { + "$id": "3917", + "kind": { + "$id": "3918", + "kind": "string", + "type": { + "$ref": "953" + }, + "value": "AveragePartitionLoadTrigger" + }, + "lowerLoadThreshold": { + "$id": "3919", + "kind": "number", + "type": { + "$ref": "941" + }, + "value": 2 + }, + "metricName": { + "$id": "3920", + "kind": "string", + "type": { + "$ref": "937" + }, + "value": "metricName" + }, + "scaleInterval": { + "$id": "3921", + "kind": "string", + "type": { + "$ref": "949" + }, + "value": "00:01:00" + }, + "upperLoadThreshold": { + "$id": "3922", + "kind": "number", + "type": { + "$ref": "945" + }, + "value": 8 + } + } + } + } + } + ] + }, + "serviceDnsName": { + "$id": "3923", + "kind": "string", + "type": { + "$ref": "1042" + }, + "value": "myservicednsname.myApp" + }, + "serviceKind": { + "$id": "3924", + "kind": "string", + "type": { + "$ref": "1094" + }, + "value": "Stateless" + }, + "serviceLoadMetrics": { + "$id": "3925", + "kind": "array", + "type": { + "$ref": "801" + }, + "value": [ + { + "$id": "3926", + "kind": "model", + "type": { + "$ref": "802" + }, + "value": { + "$id": "3927", + "name": { + "$id": "3928", + "kind": "string", + "type": { + "$ref": "804" + }, + "value": "metric1" + }, + "defaultLoad": { + "$id": "3929", + "kind": "number", + "type": { + "$ref": "819" + }, + "value": 3 + }, + "weight": { + "$id": "3930", + "kind": "string", + "type": { + "$ref": "68" + }, + "value": "Low" + } + } + } + ] + }, + "servicePackageActivationMode": { + "$id": "3931", + "kind": "string", + "type": { + "$ref": "56" + }, + "value": "SharedProcess" + }, + "servicePlacementPolicies": { + "$id": "3932", + "kind": "array", + "type": { + "$ref": "825" + }, + "value": [ + { + "$id": "3933", + "kind": "model", + "type": { + "$ref": "871" + }, + "value": { + "$id": "3934", + "type": { + "$id": "3935", + "kind": "string", + "type": { + "$ref": "873" + }, + "value": "NonPartiallyPlaceService" + } + } + } + ] + }, + "serviceTypeName": { + "$id": "3936", + "kind": "string", + "type": { + "$ref": "992" + }, + "value": "myServiceType" + } + } + }, + "tags": { + "$id": "3937", + "kind": "dict", + "type": { + "$ref": "1103" + }, + "value": { + "$id": "3938", + "a": { + "$id": "3939", + "kind": "string", + "type": { + "$ref": "1105" + }, + "value": "b" + } + } + } + } + } + } + ] + }, + { + "$id": "3940", + "kind": "http", + "name": "Put a service with minimum parameters", + "description": "Put a service with minimum parameters", + "filePath": "2025-03-01-preview/ServicePutOperation_example_min.json", + "parameters": [ + { + "$id": "3941", + "parameter": { + "$ref": "3789" + }, + "value": { + "$id": "3942", + "kind": "string", + "type": { + "$ref": "3790" + }, + "value": "2025-03-01-preview" + } + }, + { + "$id": "3943", + "parameter": { + "$ref": "3799" + }, + "value": { + "$id": "3944", + "kind": "string", + "type": { + "$ref": "3800" + }, + "value": "myApp" + } + }, + { + "$id": "3945", + "parameter": { + "$ref": "3797" + }, + "value": { + "$id": "3946", + "kind": "string", + "type": { + "$ref": "3798" + }, + "value": "myCluster" + } + }, + { + "$id": "3947", + "parameter": { + "$ref": "3795" + }, + "value": { + "$id": "3948", + "kind": "string", + "type": { + "$ref": "3796" + }, + "value": "resRg" + } + }, + { + "$id": "3949", + "parameter": { + "$ref": "3801" + }, + "value": { + "$id": "3950", + "kind": "string", + "type": { + "$ref": "3802" + }, + "value": "myService" + } + }, + { + "$id": "3951", + "parameter": { + "$ref": "3793" + }, + "value": { + "$id": "3952", + "kind": "string", + "type": { + "$ref": "3794" + }, + "value": "00000000-0000-0000-0000-000000000000" + } + } + ], + "responses": [ + { + "$id": "3953", + "response": { + "$ref": "3810" + }, + "statusCode": 200, + "bodyValue": { + "$id": "3954", + "kind": "model", + "type": { + "$ref": "777" + }, + "value": { + "$id": "3955", + "name": { + "$id": "3956", + "kind": "string", + "type": { + "$ref": "457" + }, + "value": "myService" + }, + "type": { + "$id": "3957", + "kind": "string", + "type": { + "$ref": "461" + }, + "value": "Microsoft.ServiceFabric/managedClusters/applications/services" + }, + "id": { + "$id": "3958", + "kind": "string", + "type": { + "$ref": "453" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/managedclusters/myCluster/applications/myApp/services/myService" + }, + "properties": { + "$id": "3959", + "kind": "model", + "type": { + "$ref": "1080" + }, + "value": { + "$id": "3960", + "instanceCount": { + "$id": "3961", + "kind": "number", + "type": { + "$ref": "1082" + }, + "value": 1 + }, + "partitionDescription": { + "$id": "3962", + "kind": "model", + "type": { + "$ref": "1019" + }, + "value": { + "$id": "3963", + "partitionScheme": { + "$id": "3964", + "kind": "string", + "type": { + "$ref": "1021" + }, + "value": "Singleton" + } + } + }, + "provisioningState": { + "$id": "3965", + "kind": "string", + "type": { + "$ref": "988" + }, + "value": "Creating" + }, + "serviceKind": { + "$id": "3966", + "kind": "string", + "type": { + "$ref": "1094" + }, + "value": "Stateless" + }, + "serviceTypeName": { + "$id": "3967", + "kind": "string", + "type": { + "$ref": "992" + }, + "value": "myServiceType" + } + } + } + } + } + }, + { + "$id": "3968", + "response": { + "$ref": "3811" + }, + "statusCode": 202, + "bodyValue": { + "$id": "3969", + "kind": "model", + "type": { + "$ref": "777" + }, + "value": { + "$id": "3970", + "name": { + "$id": "3971", + "kind": "string", + "type": { + "$ref": "457" + }, + "value": "myService" + }, + "type": { + "$id": "3972", + "kind": "string", + "type": { + "$ref": "461" + }, + "value": "Microsoft.ServiceFabric/managedClusters/applications/services" + }, + "id": { + "$id": "3973", + "kind": "string", + "type": { + "$ref": "453" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/managedclusters/myCluster/applications/myApp/services/myService" + }, + "properties": { + "$id": "3974", + "kind": "model", + "type": { + "$ref": "1080" + }, + "value": { + "$id": "3975", + "instanceCount": { + "$id": "3976", + "kind": "number", + "type": { + "$ref": "1082" + }, + "value": 1 + }, + "partitionDescription": { + "$id": "3977", + "kind": "model", + "type": { + "$ref": "1019" + }, + "value": { + "$id": "3978", + "partitionScheme": { + "$id": "3979", + "kind": "string", + "type": { + "$ref": "1021" + }, + "value": "Singleton" + } + } + }, + "provisioningState": { + "$id": "3980", + "kind": "string", + "type": { + "$ref": "988" + }, + "value": "Updating" + }, + "serviceKind": { + "$id": "3981", + "kind": "string", + "type": { + "$ref": "1094" + }, + "value": "Stateless" + }, + "serviceTypeName": { + "$id": "3982", + "kind": "string", + "type": { + "$ref": "992" + }, + "value": "myServiceType" + } + } + } + } + } + } + ] + } + ] + }, + "parameters": [ + { + "$id": "3983", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "3984", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3985", + "name": "clusterName", + "nameInRequest": "clusterName", + "doc": "The name of the cluster resource.", + "type": { + "$id": "3986", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3987", + "name": "applicationName", + "nameInRequest": "applicationName", + "doc": "The name of the application resource.", + "type": { + "$id": "3988", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3989", + "name": "serviceName", + "nameInRequest": "serviceName", + "doc": "The name of the service resource in the format of {applicationName}~{serviceName}.", + "type": { + "$id": "3990", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3991", + "name": "parameters", + "nameInRequest": "resource", + "doc": "The service resource.", + "type": { + "$ref": "777" + }, + "location": "Body", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3992", + "name": "contentType", + "nameInRequest": "contentType", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$id": "3993", + "kind": "constant", + "valueType": { + "$id": "3994", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "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": "3995", + "name": "accept", + "nameInRequest": "accept", + "type": { + "$id": "3996", + "kind": "constant", + "valueType": { + "$id": "3997", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "response": { + "$id": "3998", + "type": { + "$ref": "777" + } + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.Services.createOrUpdate", + "lroMetadata": { + "$id": "3999", + "finalStateVia": 1, + "finalResponse": { + "$id": "4000", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "777" + } + } + } + }, + { + "$id": "4001", + "kind": "basic", + "name": "update", + "accessibility": "public", + "apiVersions": [ + "2024-11-01-preview", + "2025-03-01-preview" + ], + "doc": "Updates the tags of a service resource of a given managed cluster.", + "operation": { + "$id": "4002", + "name": "update", + "resourceName": "ServiceResource", + "doc": "Updates the tags of a service resource of a given managed cluster.", + "accessibility": "public", + "parameters": [ + { + "$id": "4003", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "4004", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "4005", + "type": { + "$id": "4006", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-03-01-preview" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4007", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "4008", + "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": "4009", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "4010", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4011", + "name": "clusterName", + "nameInRequest": "clusterName", + "doc": "The name of the cluster resource.", + "type": { + "$id": "4012", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4013", + "name": "applicationName", + "nameInRequest": "applicationName", + "doc": "The name of the application resource.", + "type": { + "$id": "4014", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4015", + "name": "serviceName", + "nameInRequest": "serviceName", + "doc": "The name of the service resource in the format of {applicationName}~{serviceName}.", + "type": { + "$id": "4016", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4017", + "name": "contentType", + "nameInRequest": "Content-Type", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$id": "4018", + "kind": "constant", + "valueType": { + "$id": "4019", + "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": "4020", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "4021", + "kind": "constant", + "valueType": { + "$id": "4022", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4023", + "name": "parameters", + "nameInRequest": "parameters", + "doc": "The service resource updated tags.", + "type": { + "$ref": "1112" + }, + "location": "Body", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "4024", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "777" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "PATCH", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications/{applicationName}/services/{serviceName}", + "requestMediaTypes": [ + "application/json" + ], + "bufferResponse": true, + "generateProtocolMethod": true, + "generateConvenienceMethod": false, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.Services.update", + "decorators": [], + "examples": [ + { + "$id": "4025", + "kind": "http", + "name": "Patch a service", + "description": "Patch a service", + "filePath": "2025-03-01-preview/ServicePatchOperation_example.json", + "parameters": [ + { + "$id": "4026", + "parameter": { + "$ref": "4003" + }, + "value": { + "$id": "4027", + "kind": "string", + "type": { + "$ref": "4004" + }, + "value": "2025-03-01-preview" + } + }, + { + "$id": "4028", + "parameter": { + "$ref": "4013" + }, + "value": { + "$id": "4029", + "kind": "string", + "type": { + "$ref": "4014" + }, + "value": "myApp" + } + }, + { + "$id": "4030", + "parameter": { + "$ref": "4011" + }, + "value": { + "$id": "4031", + "kind": "string", + "type": { + "$ref": "4012" + }, + "value": "myCluster" + } + }, + { + "$id": "4032", + "parameter": { + "$ref": "4009" + }, + "value": { + "$id": "4033", + "kind": "string", + "type": { + "$ref": "4010" + }, + "value": "resRg" + } + }, + { + "$id": "4034", + "parameter": { + "$ref": "4015" + }, + "value": { + "$id": "4035", + "kind": "string", + "type": { + "$ref": "4016" + }, + "value": "myService" + } + }, + { + "$id": "4036", + "parameter": { + "$ref": "4007" + }, + "value": { + "$id": "4037", + "kind": "string", + "type": { + "$ref": "4008" + }, + "value": "00000000-0000-0000-0000-000000000000" + } + } + ], + "responses": [ + { + "$id": "4038", + "response": { + "$ref": "4024" + }, + "statusCode": 200, + "bodyValue": { + "$id": "4039", + "kind": "model", + "type": { + "$ref": "777" + }, + "value": { + "$id": "4040", + "name": { + "$id": "4041", + "kind": "string", + "type": { + "$ref": "457" + }, + "value": "myService" + }, + "type": { + "$id": "4042", + "kind": "string", + "type": { + "$ref": "461" + }, + "value": "Microsoft.ServiceFabric/managedClusters/applications/services" + }, + "id": { + "$id": "4043", + "kind": "string", + "type": { + "$ref": "453" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/managedclusters/myCluster/applications/myApp/services/myService" + }, + "properties": { + "$id": "4044", + "kind": "model", + "type": { + "$ref": "1080" + }, + "value": { + "$id": "4045", + "correlationScheme": { + "$id": "4046", + "kind": "array", + "type": { + "$ref": "789" + }, + "value": [ + { + "$id": "4047", + "kind": "model", + "type": { + "$ref": "790" + }, + "value": { + "$id": "4048", + "scheme": { + "$id": "4049", + "kind": "string", + "type": { + "$ref": "62" + }, + "value": "AlignedAffinity" + }, + "serviceName": { + "$id": "4050", + "kind": "string", + "type": { + "$ref": "795" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/managedclusters/myCluster/applications/myApp/services/myService1" + } + } + } + ] + }, + "defaultMoveCost": { + "$id": "4051", + "kind": "string", + "type": { + "$ref": "90" + }, + "value": "Medium" + }, + "instanceCount": { + "$id": "4052", + "kind": "number", + "type": { + "$ref": "1082" + }, + "value": 5 + }, + "minInstanceCount": { + "$id": "4053", + "kind": "number", + "type": { + "$ref": "1086" + }, + "value": 3 + }, + "minInstancePercentage": { + "$id": "4054", + "kind": "number", + "type": { + "$ref": "1090" + }, + "value": 30 + }, + "partitionDescription": { + "$id": "4055", + "kind": "model", + "type": { + "$ref": "1019" + }, + "value": { + "$id": "4056", + "partitionScheme": { + "$id": "4057", + "kind": "string", + "type": { + "$ref": "1021" + }, + "value": "Singleton" + } + } + }, + "placementConstraints": { + "$id": "4058", + "kind": "string", + "type": { + "$ref": "785" + }, + "value": "NodeType==frontend" + }, + "provisioningState": { + "$id": "4059", + "kind": "string", + "type": { + "$ref": "988" + }, + "value": "Succeeded" + }, + "scalingPolicies": { + "$id": "4060", + "kind": "array", + "type": { + "$ref": "883" + }, + "value": [ + { + "$id": "4061", + "kind": "model", + "type": { + "$ref": "884" + }, + "value": { + "$id": "4062", + "scalingMechanism": { + "$id": "4063", + "kind": "model", + "type": { + "$ref": "909" + }, + "value": { + "$id": "4064", + "kind": { + "$id": "4065", + "kind": "string", + "type": { + "$ref": "923" + }, + "value": "ScalePartitionInstanceCount" + }, + "maxInstanceCount": { + "$id": "4066", + "kind": "number", + "type": { + "$ref": "915" + }, + "value": 9 + }, + "minInstanceCount": { + "$id": "4067", + "kind": "number", + "type": { + "$ref": "911" + }, + "value": 3 + }, + "scaleIncrement": { + "$id": "4068", + "kind": "number", + "type": { + "$ref": "919" + }, + "value": 2 + } + } + }, + "scalingTrigger": { + "$id": "4069", + "kind": "model", + "type": { + "$ref": "935" + }, + "value": { + "$id": "4070", + "kind": { + "$id": "4071", + "kind": "string", + "type": { + "$ref": "953" + }, + "value": "AveragePartitionLoadTrigger" + }, + "lowerLoadThreshold": { + "$id": "4072", + "kind": "number", + "type": { + "$ref": "941" + }, + "value": 2 + }, + "metricName": { + "$id": "4073", + "kind": "string", + "type": { + "$ref": "937" + }, + "value": "metricName" + }, + "scaleInterval": { + "$id": "4074", + "kind": "string", + "type": { + "$ref": "949" + }, + "value": "00:01:00" + }, + "upperLoadThreshold": { + "$id": "4075", + "kind": "number", + "type": { + "$ref": "945" + }, + "value": 8 + } + } + } + } + } + ] + }, + "serviceKind": { + "$id": "4076", + "kind": "string", + "type": { + "$ref": "1094" + }, + "value": "Stateless" + }, + "serviceLoadMetrics": { + "$id": "4077", + "kind": "array", + "type": { + "$ref": "801" + }, + "value": [ + { + "$id": "4078", + "kind": "model", + "type": { + "$ref": "802" + }, + "value": { + "$id": "4079", + "name": { + "$id": "4080", + "kind": "string", + "type": { + "$ref": "804" + }, + "value": "metric1" + }, + "defaultLoad": { + "$id": "4081", + "kind": "number", + "type": { + "$ref": "819" + }, + "value": 3 + }, + "weight": { + "$id": "4082", + "kind": "string", + "type": { + "$ref": "68" + }, + "value": "Low" + } + } + } + ] + }, + "servicePackageActivationMode": { + "$id": "4083", + "kind": "string", + "type": { + "$ref": "56" + }, + "value": "SharedProcess" + }, + "servicePlacementPolicies": { + "$id": "4084", + "kind": "array", + "type": { + "$ref": "825" + }, + "value": [ + { + "$id": "4085", + "kind": "model", + "type": { + "$ref": "871" + }, + "value": { + "$id": "4086", + "type": { + "$id": "4087", + "kind": "string", + "type": { + "$ref": "873" + }, + "value": "NonPartiallyPlaceService" + } + } + } + ] + }, + "serviceTypeName": { + "$id": "4088", + "kind": "string", + "type": { + "$ref": "992" + }, + "value": "myServiceType" + } + } + }, + "tags": { + "$id": "4089", + "kind": "dict", + "type": { + "$ref": "1103" + }, + "value": { + "$id": "4090", + "a": { + "$id": "4091", + "kind": "string", + "type": { + "$ref": "1105" + }, + "value": "b" + } + } + } + } + } + } + ] + } + ] + }, + "parameters": [ + { + "$id": "4092", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "4093", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4094", + "name": "clusterName", + "nameInRequest": "clusterName", + "doc": "The name of the cluster resource.", + "type": { + "$id": "4095", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4096", + "name": "applicationName", + "nameInRequest": "applicationName", + "doc": "The name of the application resource.", + "type": { + "$id": "4097", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4098", + "name": "serviceName", + "nameInRequest": "serviceName", + "doc": "The name of the service resource in the format of {applicationName}~{serviceName}.", + "type": { + "$id": "4099", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4100", + "name": "parameters", + "nameInRequest": "properties", + "doc": "The service resource updated tags.", + "type": { + "$ref": "1112" + }, + "location": "Body", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4101", + "name": "contentType", + "nameInRequest": "contentType", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$ref": "4018" + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4102", + "name": "accept", + "nameInRequest": "accept", + "type": { + "$ref": "4021" + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "response": { + "$id": "4103", + "type": { + "$ref": "777" + } + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.Services.update" + }, + { + "$id": "4104", + "kind": "lro", + "name": "delete", + "accessibility": "public", + "apiVersions": [ + "2024-11-01-preview", + "2025-03-01-preview" + ], + "doc": "Delete a Service Fabric managed service resource with the specified name.", + "operation": { + "$id": "4105", + "name": "delete", + "resourceName": "ServiceResource", + "doc": "Delete a Service Fabric managed service resource with the specified name.", + "accessibility": "public", + "parameters": [ + { + "$id": "4106", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "4107", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "4108", + "type": { + "$id": "4109", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-03-01-preview" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4110", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "4111", + "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": "4112", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "4113", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4114", + "name": "clusterName", + "nameInRequest": "clusterName", + "doc": "The name of the cluster resource.", + "type": { + "$id": "4115", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4116", + "name": "applicationName", + "nameInRequest": "applicationName", + "doc": "The name of the application resource.", + "type": { + "$id": "4117", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4118", + "name": "serviceName", + "nameInRequest": "serviceName", + "doc": "The name of the service resource in the format of {applicationName}~{serviceName}.", + "type": { + "$id": "4119", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4120", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "4121", + "kind": "constant", + "valueType": { + "$id": "4122", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "4123", + "statusCodes": [ + 202 + ], + "headers": [ + { + "$id": "4124", + "name": "azureAsyncOperation", + "nameInResponse": "Azure-AsyncOperation", + "doc": "A link to the status monitor", + "type": { + "$id": "4125", + "kind": "url", + "name": "ResourceLocation", + "crossLanguageDefinitionId": "TypeSpec.Rest.ResourceLocation", + "baseType": { + "$id": "4126", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url", + "decorators": [] + }, + "decorators": [] + } + }, + { + "$id": "4127", + "name": "location", + "nameInResponse": "Location", + "doc": "The Location header contains the URL where the status of the long running operation can be checked.", + "type": { + "$id": "4128", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + } + ], + "isErrorResponse": false + }, + { + "$id": "4129", + "statusCodes": [ + 204 + ], + "headers": [], + "isErrorResponse": false + } + ], + "httpMethod": "DELETE", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications/{applicationName}/services/{serviceName}", + "bufferResponse": true, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.Services.delete", + "decorators": [], + "examples": [ + { + "$id": "4130", + "kind": "http", + "name": "Delete a service", + "description": "Delete a service", + "filePath": "2025-03-01-preview/ServiceDeleteOperation_example.json", + "parameters": [ + { + "$id": "4131", + "parameter": { + "$ref": "4106" + }, + "value": { + "$id": "4132", + "kind": "string", + "type": { + "$ref": "4107" + }, + "value": "2025-03-01-preview" + } + }, + { + "$id": "4133", + "parameter": { + "$ref": "4116" + }, + "value": { + "$id": "4134", + "kind": "string", + "type": { + "$ref": "4117" + }, + "value": "myApp" + } + }, + { + "$id": "4135", + "parameter": { + "$ref": "4114" + }, + "value": { + "$id": "4136", + "kind": "string", + "type": { + "$ref": "4115" + }, + "value": "myCluster" + } + }, + { + "$id": "4137", + "parameter": { + "$ref": "4112" + }, + "value": { + "$id": "4138", + "kind": "string", + "type": { + "$ref": "4113" + }, + "value": "resRg" + } + }, + { + "$id": "4139", + "parameter": { + "$ref": "4118" + }, + "value": { + "$id": "4140", + "kind": "string", + "type": { + "$ref": "4119" + }, + "value": "myService" + } + }, + { + "$id": "4141", + "parameter": { + "$ref": "4110" + }, + "value": { + "$id": "4142", + "kind": "string", + "type": { + "$ref": "4111" + }, + "value": "00000000-0000-0000-0000-000000000000" + } + } + ], + "responses": [ + { + "$id": "4143", + "response": { + "$ref": "4123" + }, + "statusCode": 202 + }, + { + "$id": "4144", + "response": { + "$ref": "4129" + }, + "statusCode": 204 + } + ] + } + ] + }, + "parameters": [ + { + "$id": "4145", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "4146", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4147", + "name": "clusterName", + "nameInRequest": "clusterName", + "doc": "The name of the cluster resource.", + "type": { + "$id": "4148", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4149", + "name": "applicationName", + "nameInRequest": "applicationName", + "doc": "The name of the application resource.", + "type": { + "$id": "4150", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4151", + "name": "serviceName", + "nameInRequest": "serviceName", + "doc": "The name of the service resource in the format of {applicationName}~{serviceName}.", + "type": { + "$id": "4152", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4153", + "name": "accept", + "nameInRequest": "accept", + "type": { + "$id": "4154", + "kind": "constant", + "valueType": { + "$id": "4155", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "response": { + "$id": "4156" + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.Services.delete", + "lroMetadata": { + "$id": "4157", + "finalStateVia": 1, + "finalResponse": { + "$id": "4158", + "statusCodes": [ + 204 + ] + } + } + }, + { + "$id": "4159", + "kind": "paging", + "name": "listByApplications", + "accessibility": "public", + "apiVersions": [ + "2024-11-01-preview", + "2025-03-01-preview" + ], + "doc": "Gets all service resources created or in the process of being created in the Service Fabric managed application resource.", + "operation": { + "$id": "4160", + "name": "listByApplications", + "resourceName": "ServiceResource", + "doc": "Gets all service resources created or in the process of being created in the Service Fabric managed application resource.", + "accessibility": "public", + "parameters": [ + { + "$id": "4161", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "4162", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "4163", + "type": { + "$id": "4164", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-03-01-preview" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4165", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "4166", + "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": "4167", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "4168", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4169", + "name": "clusterName", + "nameInRequest": "clusterName", + "doc": "The name of the cluster resource.", + "type": { + "$id": "4170", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4171", + "name": "applicationName", + "nameInRequest": "applicationName", + "doc": "The name of the application resource.", + "type": { + "$id": "4172", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4173", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "4174", + "kind": "constant", + "valueType": { + "$id": "4175", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "4176", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "1119" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "GET", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications/{applicationName}/services", + "bufferResponse": true, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.Services.listByApplications", + "decorators": [], + "examples": [ + { + "$id": "4177", + "kind": "http", + "name": "Get a list of service resources", + "description": "Get a list of service resources", + "filePath": "2025-03-01-preview/ServiceListOperation_example.json", + "parameters": [ + { + "$id": "4178", + "parameter": { + "$ref": "4161" + }, + "value": { + "$id": "4179", + "kind": "string", + "type": { + "$ref": "4162" + }, + "value": "2025-03-01-preview" + } + }, + { + "$id": "4180", + "parameter": { + "$ref": "4171" + }, + "value": { + "$id": "4181", + "kind": "string", + "type": { + "$ref": "4172" + }, + "value": "myApp" + } + }, + { + "$id": "4182", + "parameter": { + "$ref": "4169" + }, + "value": { + "$id": "4183", + "kind": "string", + "type": { + "$ref": "4170" + }, + "value": "myCluster" + } + }, + { + "$id": "4184", + "parameter": { + "$ref": "4167" + }, + "value": { + "$id": "4185", + "kind": "string", + "type": { + "$ref": "4168" + }, + "value": "resRg" + } + }, + { + "$id": "4186", + "parameter": { + "$ref": "4165" + }, + "value": { + "$id": "4187", + "kind": "string", + "type": { + "$ref": "4166" + }, + "value": "00000000-0000-0000-0000-000000000000" + } + } + ], + "responses": [ + { + "$id": "4188", + "response": { + "$ref": "4176" + }, + "statusCode": 200, + "bodyValue": { + "$id": "4189", + "kind": "model", + "type": { + "$ref": "1119" + }, + "value": { + "$id": "4190", + "nextLink": { + "$id": "4191", + "kind": "string", + "type": { + "$ref": "1125" + }, + "value": "http://examplelink.com" + }, + "value": { + "$id": "4192", + "kind": "array", + "type": { + "$ref": "1121" + }, + "value": [ + { + "$id": "4193", + "kind": "model", + "type": { + "$ref": "777" + }, + "value": { + "$id": "4194", + "name": { + "$id": "4195", + "kind": "string", + "type": { + "$ref": "457" + }, + "value": "myService" + }, + "type": { + "$id": "4196", + "kind": "string", + "type": { + "$ref": "461" + }, + "value": "Microsoft.ServiceFabric/managedClusters/applications/services" + }, + "id": { + "$id": "4197", + "kind": "string", + "type": { + "$ref": "453" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/managedclusters/myCluster/applications/myApp/services/myService" + }, + "properties": { + "$id": "4198", + "kind": "model", + "type": { + "$ref": "1080" + }, + "value": { + "$id": "4199", + "instanceCount": { + "$id": "4200", + "kind": "number", + "type": { + "$ref": "1082" + }, + "value": 1 + }, + "partitionDescription": { + "$id": "4201", + "kind": "model", + "type": { + "$ref": "1019" + }, + "value": { + "$id": "4202", + "partitionScheme": { + "$id": "4203", + "kind": "string", + "type": { + "$ref": "1021" + }, + "value": "Singleton" + } + } + }, + "provisioningState": { + "$id": "4204", + "kind": "string", + "type": { + "$ref": "988" + }, + "value": "Updating" + }, + "serviceKind": { + "$id": "4205", + "kind": "string", + "type": { + "$ref": "1094" + }, + "value": "Stateless" + }, + "serviceLoadMetrics": { + "$id": "4206", + "kind": "array", + "type": { + "$ref": "801" + }, + "value": [ + { + "$id": "4207", + "kind": "model", + "type": { + "$ref": "802" + }, + "value": { + "$id": "4208", + "name": { + "$id": "4209", + "kind": "string", + "type": { + "$ref": "804" + }, + "value": "metric1" + }, + "weight": { + "$id": "4210", + "kind": "string", + "type": { + "$ref": "68" + }, + "value": "Low" + } + } + } + ] + }, + "servicePackageActivationMode": { + "$id": "4211", + "kind": "string", + "type": { + "$ref": "56" + }, + "value": "SharedProcess" + }, + "serviceTypeName": { + "$id": "4212", + "kind": "string", + "type": { + "$ref": "992" + }, + "value": "myServiceType" + } + } + } + } + } + ] + } + } + } + } + ] + } + ] + }, + "parameters": [ + { + "$id": "4213", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "4214", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4215", + "name": "clusterName", + "nameInRequest": "clusterName", + "doc": "The name of the cluster resource.", + "type": { + "$id": "4216", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4217", + "name": "applicationName", + "nameInRequest": "applicationName", + "doc": "The name of the application resource.", + "type": { + "$id": "4218", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4219", + "name": "accept", + "nameInRequest": "accept", + "type": { + "$ref": "4174" + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "response": { + "$id": "4220", + "type": { + "$id": "4221", + "kind": "array", + "name": "ArrayServiceResource", + "valueType": { + "$ref": "777" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "resultSegments": [ + "value" + ] + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.Services.listByApplications", + "pagingMetadata": { + "$id": "4222", + "itemPropertySegments": [ + "value" + ], + "nextLink": { + "$id": "4223", + "responseSegments": [ + "nextLink" + ], + "responseLocation": "Body" + } + } + } + ], + "parameters": [ + { + "$id": "4224", + "name": "endpoint", + "nameInRequest": "endpoint", + "doc": "Service host", + "type": { + "$id": "4225", + "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": "4226", + "type": { + "$id": "4227", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "https://management.azure.com" + } + } + ], + "decorators": [ + { + "$id": "4228", + "name": "Azure.ResourceManager.@armResourceOperations", + "arguments": { + "$id": "4229" + } + } + ], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.Services", + "apiVersions": [ + "2024-11-01-preview", + "2025-03-01-preview" + ], + "parent": { + "$ref": "2389" + } + }, + { + "$id": "4230", + "kind": "client", + "name": "ManagedClusterVersion", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "methods": [ + { + "$id": "4231", + "kind": "basic", + "name": "get", + "accessibility": "public", + "apiVersions": [ + "2024-11-01-preview", + "2025-03-01-preview" + ], + "doc": "Gets information about an available Service Fabric managed cluster code version.", + "summary": "Gets information about a Service Fabric managed cluster code version available in the specified location.", + "operation": { + "$id": "4232", + "name": "get", + "resourceName": "ManagedClusterVersion", + "summary": "Gets information about a Service Fabric managed cluster code version available in the specified location.", + "doc": "Gets information about an available Service Fabric managed cluster code version.", + "accessibility": "public", + "parameters": [ + { + "$id": "4233", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "4234", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "4235", + "type": { + "$id": "4236", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-03-01-preview" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4237", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "4238", + "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": "4239", + "name": "location", + "nameInRequest": "location", + "doc": "The location for the cluster code versions. This is different from cluster location.", + "type": { + "$id": "4240", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4241", + "name": "clusterVersion", + "nameInRequest": "clusterVersion", + "doc": "The cluster code version.", + "type": { + "$id": "4242", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4243", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "4244", + "kind": "constant", + "valueType": { + "$id": "4245", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "4246", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "1129" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "GET", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/providers/Microsoft.ServiceFabric/locations/{location}/managedClusterVersions/{clusterVersion}", + "bufferResponse": true, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedClusterVersion.get", + "decorators": [], + "examples": [ + { + "$id": "4247", + "kind": "http", + "name": "Get cluster version", + "description": "Get cluster version", + "filePath": "2025-03-01-preview/ManagedClusterVersionGet_example.json", + "parameters": [ + { + "$id": "4248", + "parameter": { + "$ref": "4233" + }, + "value": { + "$id": "4249", + "kind": "string", + "type": { + "$ref": "4234" + }, + "value": "2025-03-01-preview" + } + }, + { + "$id": "4250", + "parameter": { + "$ref": "4241" + }, + "value": { + "$id": "4251", + "kind": "string", + "type": { + "$ref": "4242" + }, + "value": "7.2.477.9590" + } + }, + { + "$id": "4252", + "parameter": { + "$ref": "4239" + }, + "value": { + "$id": "4253", + "kind": "string", + "type": { + "$ref": "4240" + }, + "value": "eastus" + } + }, + { + "$id": "4254", + "parameter": { + "$ref": "4237" + }, + "value": { + "$id": "4255", + "kind": "string", + "type": { + "$ref": "4238" + }, + "value": "00000000-0000-0000-0000-000000000000" + } + } + ], + "responses": [ + { + "$id": "4256", + "response": { + "$ref": "4246" + }, + "statusCode": 200, + "bodyValue": { + "$id": "4257", + "kind": "model", + "type": { + "$ref": "1129" + }, + "value": { + "$id": "4258", + "name": { + "$id": "4259", + "kind": "string", + "type": { + "$ref": "1135" + }, + "value": "7.2.477.9590" + }, + "type": { + "$id": "4260", + "kind": "string", + "type": { + "$ref": "1139" + }, + "value": "Microsoft.ServiceFabric/locations/environments/managedClusterVersions" + }, + "id": { + "$id": "4261", + "kind": "string", + "type": { + "$ref": "1131" + }, + "value": "subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ServiceFabric/locations/eastus/environments/Windows/managedClusterVersions/7.2.477.9590" + }, + "properties": { + "$id": "4262", + "kind": "model", + "type": { + "$ref": "1143" + }, + "value": { + "$id": "4263", + "clusterCodeVersion": { + "$id": "4264", + "kind": "string", + "type": { + "$ref": "1145" + }, + "value": "7.2.477.9590" + }, + "osType": { + "$id": "4265", + "kind": "string", + "type": { + "$ref": "112" + }, + "value": "Windows" + }, + "supportExpiryUtc": { + "$id": "4266", + "kind": "string", + "type": { + "$ref": "1149" + }, + "value": "2021-11-30T00:00:00" + } + } + } + } + } + } + ] + } + ] + }, + "parameters": [ + { + "$id": "4267", + "name": "location", + "nameInRequest": "location", + "doc": "The location for the cluster code versions. This is different from cluster location.", + "type": { + "$id": "4268", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4269", + "name": "clusterVersion", + "nameInRequest": "clusterVersion", + "doc": "The cluster code version.", + "type": { + "$id": "4270", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4271", + "name": "accept", + "nameInRequest": "accept", + "type": { + "$ref": "4244" + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "response": { + "$id": "4272", + "type": { + "$ref": "1129" + } + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedClusterVersion.get" + }, + { + "$id": "4273", + "kind": "basic", + "name": "list", + "accessibility": "public", + "apiVersions": [ + "2024-11-01-preview", + "2025-03-01-preview" + ], + "doc": "Gets all available code versions for Service Fabric cluster resources by location.", + "summary": "Gets the list of Service Fabric cluster code versions available for the specified location.", + "operation": { + "$id": "4274", + "name": "list", + "resourceName": "ManagedClusterVersion", + "summary": "Gets the list of Service Fabric cluster code versions available for the specified location.", + "doc": "Gets all available code versions for Service Fabric cluster resources by location.", + "accessibility": "public", + "parameters": [ + { + "$id": "4275", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "4276", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "4277", + "type": { + "$id": "4278", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-03-01-preview" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4279", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "4280", + "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": "4281", + "name": "location", + "nameInRequest": "location", + "doc": "The location for the cluster code versions. This is different from cluster location.", + "type": { + "$id": "4282", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4283", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "4284", + "kind": "constant", + "valueType": { + "$id": "4285", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "4286", + "statusCodes": [ + 200 + ], + "bodyType": { + "$id": "4287", + "kind": "array", + "name": "ArrayManagedClusterCodeVersionResult", + "valueType": { + "$ref": "1129" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "GET", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/providers/Microsoft.ServiceFabric/locations/{location}/managedClusterVersions", + "bufferResponse": true, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedClusterVersion.list", + "decorators": [], + "examples": [ + { + "$id": "4288", + "kind": "http", + "name": "List cluster versions", + "description": "List cluster versions", + "filePath": "2025-03-01-preview/ManagedClusterVersionList_example.json", + "parameters": [ + { + "$id": "4289", + "parameter": { + "$ref": "4275" + }, + "value": { + "$id": "4290", + "kind": "string", + "type": { + "$ref": "4276" + }, + "value": "2025-03-01-preview" + } + }, + { + "$id": "4291", + "parameter": { + "$ref": "4281" + }, + "value": { + "$id": "4292", + "kind": "string", + "type": { + "$ref": "4282" + }, + "value": "eastus" + } + }, + { + "$id": "4293", + "parameter": { + "$ref": "4279" + }, + "value": { + "$id": "4294", + "kind": "string", + "type": { + "$ref": "4280" + }, + "value": "00000000-0000-0000-0000-000000000000" + } + } + ], + "responses": [ + { + "$id": "4295", + "response": { + "$ref": "4286" + }, + "statusCode": 200, + "bodyValue": { + "$id": "4296", + "kind": "array", + "type": { + "$ref": "4287" + }, + "value": [ + { + "$id": "4297", + "kind": "model", + "type": { + "$ref": "1129" + }, + "value": { + "$id": "4298", + "name": { + "$id": "4299", + "kind": "string", + "type": { + "$ref": "1135" + }, + "value": "7.2.457.9590" + }, + "type": { + "$id": "4300", + "kind": "string", + "type": { + "$ref": "1139" + }, + "value": "Microsoft.ServiceFabric/locations/environments/managedClusterVersions" + }, + "id": { + "$id": "4301", + "kind": "string", + "type": { + "$ref": "1131" + }, + "value": "subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ServiceFabric/locations/eastus/environments/Windows/managedClusterVersions/7.2.457.9590" + }, + "properties": { + "$id": "4302", + "kind": "model", + "type": { + "$ref": "1143" + }, + "value": { + "$id": "4303", + "clusterCodeVersion": { + "$id": "4304", + "kind": "string", + "type": { + "$ref": "1145" + }, + "value": "7.2.457.9590" + }, + "osType": { + "$id": "4305", + "kind": "string", + "type": { + "$ref": "112" + }, + "value": "Windows" + }, + "supportExpiryUtc": { + "$id": "4306", + "kind": "string", + "type": { + "$ref": "1149" + }, + "value": "2021-11-30T00:00:00" + } + } + } + } + }, + { + "$id": "4307", + "kind": "model", + "type": { + "$ref": "1129" + }, + "value": { + "$id": "4308", + "name": { + "$id": "4309", + "kind": "string", + "type": { + "$ref": "1135" + }, + "value": "7.2.477.9590" + }, + "type": { + "$id": "4310", + "kind": "string", + "type": { + "$ref": "1139" + }, + "value": "Microsoft.ServiceFabric/locations/environments/managedClusterVersions" + }, + "id": { + "$id": "4311", + "kind": "string", + "type": { + "$ref": "1131" + }, + "value": "subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ServiceFabric/locations/eastus/environments/Windows/managedClusterVersions/7.2.477.9590" + }, + "properties": { + "$id": "4312", + "kind": "model", + "type": { + "$ref": "1143" + }, + "value": { + "$id": "4313", + "clusterCodeVersion": { + "$id": "4314", + "kind": "string", + "type": { + "$ref": "1145" + }, + "value": "7.2.477.9590" + }, + "osType": { + "$id": "4315", + "kind": "string", + "type": { + "$ref": "112" + }, + "value": "Windows" + }, + "supportExpiryUtc": { + "$id": "4316", + "kind": "string", + "type": { + "$ref": "1149" + }, + "value": "2021-11-30T00:00:00" + } + } + } + } + } + ] + } + } + ] + } + ] + }, + "parameters": [ + { + "$id": "4317", + "name": "location", + "nameInRequest": "location", + "doc": "The location for the cluster code versions. This is different from cluster location.", + "type": { + "$id": "4318", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4319", + "name": "accept", + "nameInRequest": "accept", + "type": { + "$ref": "4284" + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "response": { + "$id": "4320", + "type": { + "$ref": "4287" + } + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedClusterVersion.list" + }, + { + "$id": "4321", + "kind": "basic", + "name": "GetManagedClusterVersionByEnvironment", + "accessibility": "public", + "apiVersions": [ + "2024-11-01-preview", + "2025-03-01-preview" + ], + "doc": "Gets information about an available Service Fabric cluster code version by environment.", + "summary": "Gets information about a Service Fabric cluster code version available for the specified environment.", + "operation": { + "$id": "4322", + "name": "GetManagedClusterVersionByEnvironment", + "resourceName": "ManagedClusterVersion", + "summary": "Gets information about a Service Fabric cluster code version available for the specified environment.", + "doc": "Gets information about an available Service Fabric cluster code version by environment.", + "accessibility": "public", + "parameters": [ + { + "$id": "4323", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "4324", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "4325", + "type": { + "$id": "4326", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-03-01-preview" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4327", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "4328", + "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": "4329", + "name": "location", + "nameInRequest": "location", + "doc": "The location for the cluster code versions. This is different from cluster location.", + "type": { + "$id": "4330", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4331", + "name": "environment", + "nameInRequest": "environment", + "doc": "The operating system of the cluster.", + "type": { + "$ref": "116" + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4332", + "name": "clusterVersion", + "nameInRequest": "clusterVersion", + "doc": "The cluster code version.", + "type": { + "$id": "4333", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4334", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "4335", + "kind": "constant", + "valueType": { + "$id": "4336", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "4337", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "1129" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "GET", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/providers/Microsoft.ServiceFabric/locations/{location}/environments/{environment}/managedClusterVersions/{clusterVersion}", + "bufferResponse": true, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedClusterVersion.getByEnvironment", + "decorators": [], + "examples": [ + { + "$id": "4338", + "kind": "http", + "name": "Get cluster version by environment", + "description": "Get cluster version by environment", + "filePath": "2025-03-01-preview/ManagedClusterVersionGetByEnvironment_example.json", + "parameters": [ + { + "$id": "4339", + "parameter": { + "$ref": "4323" + }, + "value": { + "$id": "4340", + "kind": "string", + "type": { + "$ref": "4324" + }, + "value": "2025-03-01-preview" + } + }, + { + "$id": "4341", + "parameter": { + "$ref": "4332" + }, + "value": { + "$id": "4342", + "kind": "string", + "type": { + "$ref": "4333" + }, + "value": "7.2.477.9590" + } + }, + { + "$id": "4343", + "parameter": { + "$ref": "4331" + }, + "value": { + "$id": "4344", + "kind": "string", + "type": { + "$ref": "116" + }, + "value": "Windows" + } + }, + { + "$id": "4345", + "parameter": { + "$ref": "4329" + }, + "value": { + "$id": "4346", + "kind": "string", + "type": { + "$ref": "4330" + }, + "value": "eastus" + } + }, + { + "$id": "4347", + "parameter": { + "$ref": "4327" + }, + "value": { + "$id": "4348", + "kind": "string", + "type": { + "$ref": "4328" + }, + "value": "00000000-0000-0000-0000-000000000000" + } + } + ], + "responses": [ + { + "$id": "4349", + "response": { + "$ref": "4337" + }, + "statusCode": 200, + "bodyValue": { + "$id": "4350", + "kind": "model", + "type": { + "$ref": "1129" + }, + "value": { + "$id": "4351", + "name": { + "$id": "4352", + "kind": "string", + "type": { + "$ref": "1135" + }, + "value": "7.2.477.9590" + }, + "type": { + "$id": "4353", + "kind": "string", + "type": { + "$ref": "1139" + }, + "value": "Microsoft.ServiceFabric/locations/environments/managedClusterVersions" + }, + "id": { + "$id": "4354", + "kind": "string", + "type": { + "$ref": "1131" + }, + "value": "subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ServiceFabric/locations/eastus/environments/Windows/managedClusterVersions/7.2.477.9590" + }, + "properties": { + "$id": "4355", + "kind": "model", + "type": { + "$ref": "1143" + }, + "value": { + "$id": "4356", + "clusterCodeVersion": { + "$id": "4357", + "kind": "string", + "type": { + "$ref": "1145" + }, + "value": "7.2.477.9590" + }, + "osType": { + "$id": "4358", + "kind": "string", + "type": { + "$ref": "112" + }, + "value": "Windows" + }, + "supportExpiryUtc": { + "$id": "4359", + "kind": "string", + "type": { + "$ref": "1149" + }, + "value": "2021-11-30T00:00:00" + } + } + } + } + } + } + ] + } + ] + }, + "parameters": [ + { + "$id": "4360", + "name": "location", + "nameInRequest": "location", + "doc": "The location for the cluster code versions. This is different from cluster location.", + "type": { + "$id": "4361", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4362", + "name": "environment", + "nameInRequest": "environment", + "doc": "The operating system of the cluster.", + "type": { + "$ref": "116" + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4363", + "name": "clusterVersion", + "nameInRequest": "clusterVersion", + "doc": "The cluster code version.", + "type": { + "$id": "4364", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4365", + "name": "accept", + "nameInRequest": "accept", + "type": { + "$ref": "4335" + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "response": { + "$id": "4366", + "type": { + "$ref": "1129" + } + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedClusterVersion.getByEnvironment" + }, + { + "$id": "4367", + "kind": "basic", + "name": "listByEnvironment", + "accessibility": "public", + "apiVersions": [ + "2024-11-01-preview", + "2025-03-01-preview" + ], + "doc": "Gets all available code versions for Service Fabric cluster resources by environment.", + "summary": "Gets the list of Service Fabric cluster code versions available for the specified environment.", + "operation": { + "$id": "4368", + "name": "listByEnvironment", + "resourceName": "ManagedClusterVersion", + "summary": "Gets the list of Service Fabric cluster code versions available for the specified environment.", + "doc": "Gets all available code versions for Service Fabric cluster resources by environment.", + "accessibility": "public", + "parameters": [ + { + "$id": "4369", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "4370", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "4371", + "type": { + "$id": "4372", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-03-01-preview" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4373", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "4374", + "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": "4375", + "name": "location", + "nameInRequest": "location", + "doc": "The location for the cluster code versions. This is different from cluster location.", + "type": { + "$id": "4376", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4377", + "name": "environment", + "nameInRequest": "environment", + "doc": "The operating system of the cluster.", + "type": { + "$ref": "116" + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4378", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "4379", + "kind": "constant", + "valueType": { + "$id": "4380", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "4381", + "statusCodes": [ + 200 + ], + "bodyType": { + "$id": "4382", + "kind": "array", + "name": "ArrayManagedClusterCodeVersionResult", + "valueType": { + "$ref": "1129" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "GET", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/providers/Microsoft.ServiceFabric/locations/{location}/environments/{environment}/managedClusterVersions", + "bufferResponse": true, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedClusterVersion.listByEnvironment", + "decorators": [], + "examples": [ + { + "$id": "4383", + "kind": "http", + "name": "List cluster versions by environment", + "description": "List cluster versions by environment", + "filePath": "2025-03-01-preview/ManagedClusterVersionListByEnvironment.json", + "parameters": [ + { + "$id": "4384", + "parameter": { + "$ref": "4369" + }, + "value": { + "$id": "4385", + "kind": "string", + "type": { + "$ref": "4370" + }, + "value": "2025-03-01-preview" + } + }, + { + "$id": "4386", + "parameter": { + "$ref": "4377" + }, + "value": { + "$id": "4387", + "kind": "string", + "type": { + "$ref": "116" + }, + "value": "Windows" + } + }, + { + "$id": "4388", + "parameter": { + "$ref": "4375" + }, + "value": { + "$id": "4389", + "kind": "string", + "type": { + "$ref": "4376" + }, + "value": "eastus" + } + }, + { + "$id": "4390", + "parameter": { + "$ref": "4373" + }, + "value": { + "$id": "4391", + "kind": "string", + "type": { + "$ref": "4374" + }, + "value": "00000000-0000-0000-0000-000000000000" + } + } + ], + "responses": [ + { + "$id": "4392", + "response": { + "$ref": "4381" + }, + "statusCode": 200, + "bodyValue": { + "$id": "4393", + "kind": "array", + "type": { + "$ref": "4382" + }, + "value": [ + { + "$id": "4394", + "kind": "model", + "type": { + "$ref": "1129" + }, + "value": { + "$id": "4395", + "name": { + "$id": "4396", + "kind": "string", + "type": { + "$ref": "1135" + }, + "value": "7.2.457.9590" + }, + "type": { + "$id": "4397", + "kind": "string", + "type": { + "$ref": "1139" + }, + "value": "Microsoft.ServiceFabric/locations/environments/managedClusterVersions" + }, + "id": { + "$id": "4398", + "kind": "string", + "type": { + "$ref": "1131" + }, + "value": "subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ServiceFabric/locations/eastus/environments/Windows/managedClusterVersions/7.2.457.9590" + }, + "properties": { + "$id": "4399", + "kind": "model", + "type": { + "$ref": "1143" + }, + "value": { + "$id": "4400", + "clusterCodeVersion": { + "$id": "4401", + "kind": "string", + "type": { + "$ref": "1145" + }, + "value": "7.2.457.9590" + }, + "osType": { + "$id": "4402", + "kind": "string", + "type": { + "$ref": "112" + }, + "value": "Windows" + }, + "supportExpiryUtc": { + "$id": "4403", + "kind": "string", + "type": { + "$ref": "1149" + }, + "value": "2021-11-30T00:00:00" + } + } + } + } + }, + { + "$id": "4404", + "kind": "model", + "type": { + "$ref": "1129" + }, + "value": { + "$id": "4405", + "name": { + "$id": "4406", + "kind": "string", + "type": { + "$ref": "1135" + }, + "value": "7.2.477.9590" + }, + "type": { + "$id": "4407", + "kind": "string", + "type": { + "$ref": "1139" + }, + "value": "Microsoft.ServiceFabric/locations/environments/managedClusterVersions" + }, + "id": { + "$id": "4408", + "kind": "string", + "type": { + "$ref": "1131" + }, + "value": "subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ServiceFabric/locations/eastus/environments/Windows/managedClusterVersions/7.2.477.9590" + }, + "properties": { + "$id": "4409", + "kind": "model", + "type": { + "$ref": "1143" + }, + "value": { + "$id": "4410", + "clusterCodeVersion": { + "$id": "4411", + "kind": "string", + "type": { + "$ref": "1145" + }, + "value": "7.2.477.9590" + }, + "osType": { + "$id": "4412", + "kind": "string", + "type": { + "$ref": "112" + }, + "value": "Windows" + }, + "supportExpiryUtc": { + "$id": "4413", + "kind": "string", + "type": { + "$ref": "1149" + }, + "value": "2021-11-30T00:00:00" + } + } + } + } + } + ] + } + } + ] + } + ] + }, + "parameters": [ + { + "$id": "4414", + "name": "location", + "nameInRequest": "location", + "doc": "The location for the cluster code versions. This is different from cluster location.", + "type": { + "$id": "4415", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4416", + "name": "environment", + "nameInRequest": "environment", + "doc": "The operating system of the cluster.", + "type": { + "$ref": "116" + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4417", + "name": "accept", + "nameInRequest": "accept", + "type": { + "$ref": "4379" + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "response": { + "$id": "4418", + "type": { + "$ref": "4382" + } + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedClusterVersion.listByEnvironment" + } + ], + "parameters": [ + { + "$id": "4419", + "name": "endpoint", + "nameInRequest": "endpoint", + "doc": "Service host", + "type": { + "$id": "4420", + "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": "4421", + "type": { + "$id": "4422", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "https://management.azure.com" + } + } + ], + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedClusterVersion", + "apiVersions": [ + "2024-11-01-preview", + "2025-03-01-preview" + ], + "parent": { + "$ref": "2389" + } + }, + { + "$id": "4423", + "kind": "client", + "name": "ManagedUnsupportedVMSizes", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "methods": [ + { + "$id": "4424", + "kind": "basic", + "name": "GetManagedUnsupportedVmSize", + "accessibility": "public", + "apiVersions": [ + "2024-11-01-preview", + "2025-03-01-preview" + ], + "doc": "Get unsupported vm size for Service Fabric Managed Clusters.", + "operation": { + "$id": "4425", + "name": "GetManagedUnsupportedVmSize", + "resourceName": "ManagedUnsupportedVMSizes", + "doc": "Get unsupported vm size for Service Fabric Managed Clusters.", + "accessibility": "public", + "parameters": [ + { + "$id": "4426", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "4427", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "4428", + "type": { + "$id": "4429", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-03-01-preview" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4430", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "4431", + "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": "4432", + "name": "location", + "nameInRequest": "location", + "doc": "The location for the cluster code versions. This is different from cluster location.", + "type": { + "$id": "4433", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4434", + "name": "vmSize", + "nameInRequest": "vmSize", + "doc": "VM Size name.", + "type": { + "$id": "4435", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4436", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "4437", + "kind": "constant", + "valueType": { + "$id": "4438", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "4439", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "1158" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "GET", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/providers/Microsoft.ServiceFabric/locations/{location}/managedUnsupportedVMSizes/{vmSize}", + "bufferResponse": true, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedUnsupportedVMSizes.get", + "decorators": [], + "examples": [ + { + "$id": "4440", + "kind": "http", + "name": "Get unsupported vm sizes", + "description": "Get unsupported vm sizes", + "filePath": "2025-03-01-preview/managedUnsupportedVMSizesGet_example.json", + "parameters": [ + { + "$id": "4441", + "parameter": { + "$ref": "4426" + }, + "value": { + "$id": "4442", + "kind": "string", + "type": { + "$ref": "4427" + }, + "value": "2025-03-01-preview" + } + }, + { + "$id": "4443", + "parameter": { + "$ref": "4432" + }, + "value": { + "$id": "4444", + "kind": "string", + "type": { + "$ref": "4433" + }, + "value": "eastus" + } + }, + { + "$id": "4445", + "parameter": { + "$ref": "4430" + }, + "value": { + "$id": "4446", + "kind": "string", + "type": { + "$ref": "4431" + }, + "value": "00000000-0000-0000-0000-000000000000" + } + }, + { + "$id": "4447", + "parameter": { + "$ref": "4434" + }, + "value": { + "$id": "4448", + "kind": "string", + "type": { + "$ref": "4435" + }, + "value": "Standard_B1ls1" + } + } + ], + "responses": [ + { + "$id": "4449", + "response": { + "$ref": "4439" + }, + "statusCode": 200, + "bodyValue": { + "$id": "4450", + "kind": "model", + "type": { + "$ref": "1158" + }, + "value": { + "$id": "4451", + "name": { + "$id": "4452", + "kind": "string", + "type": { + "$ref": "1172" + }, + "value": "Standard_B1ls1" + }, + "type": { + "$id": "4453", + "kind": "string", + "type": { + "$ref": "1176" + }, + "value": "Microsoft.ServiceFabric/locations/managedVMSizes" + }, + "id": { + "$id": "4454", + "kind": "string", + "type": { + "$ref": "1168" + }, + "value": "subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ServiceFabric/locations/eastus/managedVMSizes/Standard_B1ls1" + }, + "properties": { + "$id": "4455", + "kind": "model", + "type": { + "$ref": "1160" + }, + "value": { + "$id": "4456", + "size": { + "$id": "4457", + "kind": "string", + "type": { + "$ref": "1162" + }, + "value": "Standard_B1ls1" + } + } + } + } + } + } + ] + } + ] + }, + "parameters": [ + { + "$id": "4458", + "name": "location", + "nameInRequest": "location", + "doc": "The location for the cluster code versions. This is different from cluster location.", + "type": { + "$id": "4459", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4460", + "name": "vmSize", + "nameInRequest": "vmSize", + "doc": "VM Size name.", + "type": { + "$id": "4461", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4462", + "name": "accept", + "nameInRequest": "accept", + "type": { + "$ref": "4437" + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "response": { + "$id": "4463", + "type": { + "$ref": "1158" + } + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedUnsupportedVMSizes.get" + }, + { + "$id": "4464", + "kind": "paging", + "name": "GetManagedUnsupportedVmSizes", + "accessibility": "public", + "apiVersions": [ + "2024-11-01-preview", + "2025-03-01-preview" + ], + "doc": "Get the lists of unsupported vm sizes for Service Fabric Managed Clusters.", + "operation": { + "$id": "4465", + "name": "GetManagedUnsupportedVmSizes", + "resourceName": "ManagedUnsupportedVMSizes", + "doc": "Get the lists of unsupported vm sizes for Service Fabric Managed Clusters.", + "accessibility": "public", + "parameters": [ + { + "$id": "4466", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "4467", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "4468", + "type": { + "$id": "4469", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-03-01-preview" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4470", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "4471", + "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": "4472", + "name": "location", + "nameInRequest": "location", + "doc": "The location for the cluster code versions. This is different from cluster location.", + "type": { + "$id": "4473", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4474", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "4475", + "kind": "constant", + "valueType": { + "$id": "4476", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "4477", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "1179" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "GET", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/providers/Microsoft.ServiceFabric/locations/{location}/managedUnsupportedVMSizes", + "bufferResponse": true, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedUnsupportedVMSizes.list", + "decorators": [], + "examples": [ + { + "$id": "4478", + "kind": "http", + "name": "List unsupported vm sizes", + "description": "List unsupported vm sizes", + "filePath": "2025-03-01-preview/managedUnsupportedVMSizesList_example.json", + "parameters": [ + { + "$id": "4479", + "parameter": { + "$ref": "4466" + }, + "value": { + "$id": "4480", + "kind": "string", + "type": { + "$ref": "4467" + }, + "value": "2025-03-01-preview" + } + }, + { + "$id": "4481", + "parameter": { + "$ref": "4472" + }, + "value": { + "$id": "4482", + "kind": "string", + "type": { + "$ref": "4473" + }, + "value": "eastus" + } + }, + { + "$id": "4483", + "parameter": { + "$ref": "4470" + }, + "value": { + "$id": "4484", + "kind": "string", + "type": { + "$ref": "4471" + }, + "value": "00000000-0000-0000-0000-000000000000" + } + } + ], + "responses": [ + { + "$id": "4485", + "response": { + "$ref": "4477" + }, + "statusCode": 200, + "bodyValue": { + "$id": "4486", + "kind": "model", + "type": { + "$ref": "1179" + }, + "value": { + "$id": "4487", + "value": { + "$id": "4488", + "kind": "array", + "type": { + "$ref": "1181" + }, + "value": [ + { + "$id": "4489", + "kind": "model", + "type": { + "$ref": "1158" + }, + "value": { + "$id": "4490", + "name": { + "$id": "4491", + "kind": "string", + "type": { + "$ref": "1172" + }, + "value": "Standard_B1ls1" + }, + "type": { + "$id": "4492", + "kind": "string", + "type": { + "$ref": "1176" + }, + "value": "Microsoft.ServiceFabric/locations/managedVMSizes" + }, + "id": { + "$id": "4493", + "kind": "string", + "type": { + "$ref": "1168" + }, + "value": "subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ServiceFabric/locations/eastus/managedVMSizes/Standard_B1ls1" + }, + "properties": { + "$id": "4494", + "kind": "model", + "type": { + "$ref": "1160" + }, + "value": { + "$id": "4495", + "size": { + "$id": "4496", + "kind": "string", + "type": { + "$ref": "1162" + }, + "value": "Standard_B1ls1" + } + } + } + } + }, + { + "$id": "4497", + "kind": "model", + "type": { + "$ref": "1158" + }, + "value": { + "$id": "4498", + "name": { + "$id": "4499", + "kind": "string", + "type": { + "$ref": "1172" + }, + "value": "Standard_B1s" + }, + "type": { + "$id": "4500", + "kind": "string", + "type": { + "$ref": "1176" + }, + "value": "Microsoft.ServiceFabric/locations/managedVMSizes" + }, + "id": { + "$id": "4501", + "kind": "string", + "type": { + "$ref": "1168" + }, + "value": "subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ServiceFabric/locations/eastus/managedVMSizes/Standard_B1s" + }, + "properties": { + "$id": "4502", + "kind": "model", + "type": { + "$ref": "1160" + }, + "value": { + "$id": "4503", + "size": { + "$id": "4504", + "kind": "string", + "type": { + "$ref": "1162" + }, + "value": "Standard_B1s" + } + } + } + } + }, + { + "$id": "4505", + "kind": "model", + "type": { + "$ref": "1158" + }, + "value": { + "$id": "4506", + "name": { + "$id": "4507", + "kind": "string", + "type": { + "$ref": "1172" + }, + "value": "Standard_B1ms" + }, + "type": { + "$id": "4508", + "kind": "string", + "type": { + "$ref": "1176" + }, + "value": "Microsoft.ServiceFabric/locations/managedVMSizes" + }, + "id": { + "$id": "4509", + "kind": "string", + "type": { + "$ref": "1168" + }, + "value": "subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ServiceFabric/locations/eastus/managedVMSizes/Standard_B1ms" + }, + "properties": { + "$id": "4510", + "kind": "model", + "type": { + "$ref": "1160" + }, + "value": { + "$id": "4511", + "size": { + "$id": "4512", + "kind": "string", + "type": { + "$ref": "1162" + }, + "value": "Standard_B1ms" + } + } + } + } + }, + { + "$id": "4513", + "kind": "model", + "type": { + "$ref": "1158" + }, + "value": { + "$id": "4514", + "name": { + "$id": "4515", + "kind": "string", + "type": { + "$ref": "1172" + }, + "value": "Standard_B2s" + }, + "type": { + "$id": "4516", + "kind": "string", + "type": { + "$ref": "1176" + }, + "value": "Microsoft.ServiceFabric/locations/managedVMSizes" + }, + "id": { + "$id": "4517", + "kind": "string", + "type": { + "$ref": "1168" + }, + "value": "subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ServiceFabric/locations/eastus/managedVMSizes/Standard_B2s" + }, + "properties": { + "$id": "4518", + "kind": "model", + "type": { + "$ref": "1160" + }, + "value": { + "$id": "4519", + "size": { + "$id": "4520", + "kind": "string", + "type": { + "$ref": "1162" + }, + "value": "Standard_B2s" + } + } + } + } + }, + { + "$id": "4521", + "kind": "model", + "type": { + "$ref": "1158" + }, + "value": { + "$id": "4522", + "name": { + "$id": "4523", + "kind": "string", + "type": { + "$ref": "1172" + }, + "value": "Standard_B2ms" + }, + "type": { + "$id": "4524", + "kind": "string", + "type": { + "$ref": "1176" + }, + "value": "Microsoft.ServiceFabric/locations/managedVMSizes" + }, + "id": { + "$id": "4525", + "kind": "string", + "type": { + "$ref": "1168" + }, + "value": "subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ServiceFabric/locations/eastus/managedVMSizes/Standard_B2ms" + }, + "properties": { + "$id": "4526", + "kind": "model", + "type": { + "$ref": "1160" + }, + "value": { + "$id": "4527", + "size": { + "$id": "4528", + "kind": "string", + "type": { + "$ref": "1162" + }, + "value": "Standard_B2ms" + } + } + } + } + }, + { + "$id": "4529", + "kind": "model", + "type": { + "$ref": "1158" + }, + "value": { + "$id": "4530", + "name": { + "$id": "4531", + "kind": "string", + "type": { + "$ref": "1172" + }, + "value": "Standard_B4ms" + }, + "type": { + "$id": "4532", + "kind": "string", + "type": { + "$ref": "1176" + }, + "value": "Microsoft.ServiceFabric/locations/managedVMSizes" + }, + "id": { + "$id": "4533", + "kind": "string", + "type": { + "$ref": "1168" + }, + "value": "subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ServiceFabric/locations/eastus/managedVMSizes/Standard_B4ms" + }, + "properties": { + "$id": "4534", + "kind": "model", + "type": { + "$ref": "1160" + }, + "value": { + "$id": "4535", + "size": { + "$id": "4536", + "kind": "string", + "type": { + "$ref": "1162" + }, + "value": "Standard_B4ms" + } + } + } + } + }, + { + "$id": "4537", + "kind": "model", + "type": { + "$ref": "1158" + }, + "value": { + "$id": "4538", + "name": { + "$id": "4539", + "kind": "string", + "type": { + "$ref": "1172" + }, + "value": "Standard_B8ms" + }, + "type": { + "$id": "4540", + "kind": "string", + "type": { + "$ref": "1176" + }, + "value": "Microsoft.ServiceFabric/locations/managedVMSizes" + }, + "id": { + "$id": "4541", + "kind": "string", + "type": { + "$ref": "1168" + }, + "value": "subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ServiceFabric/locations/eastus/managedVMSizes/Standard_B8ms" + }, + "properties": { + "$id": "4542", + "kind": "model", + "type": { + "$ref": "1160" + }, + "value": { + "$id": "4543", + "size": { + "$id": "4544", + "kind": "string", + "type": { + "$ref": "1162" + }, + "value": "Standard_B8ms" + } + } + } + } + }, + { + "$id": "4545", + "kind": "model", + "type": { + "$ref": "1158" + }, + "value": { + "$id": "4546", + "name": { + "$id": "4547", + "kind": "string", + "type": { + "$ref": "1172" + }, + "value": "Standard_A1_v2" + }, + "type": { + "$id": "4548", + "kind": "string", + "type": { + "$ref": "1176" + }, + "value": "Microsoft.ServiceFabric/locations/managedVMSizes" + }, + "id": { + "$id": "4549", + "kind": "string", + "type": { + "$ref": "1168" + }, + "value": "subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ServiceFabric/locations/eastus/managedVMSizes/Standard_A1_v2" + }, + "properties": { + "$id": "4550", + "kind": "model", + "type": { + "$ref": "1160" + }, + "value": { + "$id": "4551", + "size": { + "$id": "4552", + "kind": "string", + "type": { + "$ref": "1162" + }, + "value": "Standard_A1_v2" + } + } + } + } + }, + { + "$id": "4553", + "kind": "model", + "type": { + "$ref": "1158" + }, + "value": { + "$id": "4554", + "name": { + "$id": "4555", + "kind": "string", + "type": { + "$ref": "1172" + }, + "value": "Standard_A2_v2" + }, + "type": { + "$id": "4556", + "kind": "string", + "type": { + "$ref": "1176" + }, + "value": "Microsoft.ServiceFabric/locations/managedVMSizes" + }, + "id": { + "$id": "4557", + "kind": "string", + "type": { + "$ref": "1168" + }, + "value": "subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ServiceFabric/locations/eastus/managedVMSizes/Standard_A2_v2" + }, + "properties": { + "$id": "4558", + "kind": "model", + "type": { + "$ref": "1160" + }, + "value": { + "$id": "4559", + "size": { + "$id": "4560", + "kind": "string", + "type": { + "$ref": "1162" + }, + "value": "Standard_A2_v2" + } + } + } + } + }, + { + "$id": "4561", + "kind": "model", + "type": { + "$ref": "1158" + }, + "value": { + "$id": "4562", + "name": { + "$id": "4563", + "kind": "string", + "type": { + "$ref": "1172" + }, + "value": "Standard_A4_v2" + }, + "type": { + "$id": "4564", + "kind": "string", + "type": { + "$ref": "1176" + }, + "value": "Microsoft.ServiceFabric/locations/managedVMSizes" + }, + "id": { + "$id": "4565", + "kind": "string", + "type": { + "$ref": "1168" + }, + "value": "subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ServiceFabric/locations/eastus/managedVMSizes/Standard_A4_v2" + }, + "properties": { + "$id": "4566", + "kind": "model", + "type": { + "$ref": "1160" + }, + "value": { + "$id": "4567", + "size": { + "$id": "4568", + "kind": "string", + "type": { + "$ref": "1162" + }, + "value": "Standard_A4_v2" + } + } + } + } + }, + { + "$id": "4569", + "kind": "model", + "type": { + "$ref": "1158" + }, + "value": { + "$id": "4570", + "name": { + "$id": "4571", + "kind": "string", + "type": { + "$ref": "1172" + }, + "value": "Standard_A8_v2" + }, + "type": { + "$id": "4572", + "kind": "string", + "type": { + "$ref": "1176" + }, + "value": "Microsoft.ServiceFabric/locations/managedVMSizes" + }, + "id": { + "$id": "4573", + "kind": "string", + "type": { + "$ref": "1168" + }, + "value": "subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ServiceFabric/locations/eastus/managedVMSizes/Standard_A8_v2" + }, + "properties": { + "$id": "4574", + "kind": "model", + "type": { + "$ref": "1160" + }, + "value": { + "$id": "4575", + "size": { + "$id": "4576", + "kind": "string", + "type": { + "$ref": "1162" + }, + "value": "Standard_A8_v2" + } + } + } + } + }, + { + "$id": "4577", + "kind": "model", + "type": { + "$ref": "1158" + }, + "value": { + "$id": "4578", + "name": { + "$id": "4579", + "kind": "string", + "type": { + "$ref": "1172" + }, + "value": "Standard_A2m_v2" + }, + "type": { + "$id": "4580", + "kind": "string", + "type": { + "$ref": "1176" + }, + "value": "Microsoft.ServiceFabric/locations/managedVMSizes" + }, + "id": { + "$id": "4581", + "kind": "string", + "type": { + "$ref": "1168" + }, + "value": "subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ServiceFabric/locations/eastus/managedVMSizes/Standard_A2m_v2" + }, + "properties": { + "$id": "4582", + "kind": "model", + "type": { + "$ref": "1160" + }, + "value": { + "$id": "4583", + "size": { + "$id": "4584", + "kind": "string", + "type": { + "$ref": "1162" + }, + "value": "Standard_A2m_v2" + } + } + } + } + }, + { + "$id": "4585", + "kind": "model", + "type": { + "$ref": "1158" + }, + "value": { + "$id": "4586", + "name": { + "$id": "4587", + "kind": "string", + "type": { + "$ref": "1172" + }, + "value": "Standard_A4m_v2" + }, + "type": { + "$id": "4588", + "kind": "string", + "type": { + "$ref": "1176" + }, + "value": "Microsoft.ServiceFabric/locations/managedVMSizes" + }, + "id": { + "$id": "4589", + "kind": "string", + "type": { + "$ref": "1168" + }, + "value": "subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ServiceFabric/locations/eastus/managedVMSizes/Standard_A4m_v2" + }, + "properties": { + "$id": "4590", + "kind": "model", + "type": { + "$ref": "1160" + }, + "value": { + "$id": "4591", + "size": { + "$id": "4592", + "kind": "string", + "type": { + "$ref": "1162" + }, + "value": "Standard_A4m_v2" + } + } + } + } + }, + { + "$id": "4593", + "kind": "model", + "type": { + "$ref": "1158" + }, + "value": { + "$id": "4594", + "name": { + "$id": "4595", + "kind": "string", + "type": { + "$ref": "1172" + }, + "value": "Standard_A8m_v2" + }, + "type": { + "$id": "4596", + "kind": "string", + "type": { + "$ref": "1176" + }, + "value": "Microsoft.ServiceFabric/locations/managedVMSizes" + }, + "id": { + "$id": "4597", + "kind": "string", + "type": { + "$ref": "1168" + }, + "value": "subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ServiceFabric/locations/eastus/managedVMSizes/Standard_A8m_v2" + }, + "properties": { + "$id": "4598", + "kind": "model", + "type": { + "$ref": "1160" + }, + "value": { + "$id": "4599", + "size": { + "$id": "4600", + "kind": "string", + "type": { + "$ref": "1162" + }, + "value": "Standard_A8m_v2" + } + } + } + } + }, + { + "$id": "4601", + "kind": "model", + "type": { + "$ref": "1158" + }, + "value": { + "$id": "4602", + "name": { + "$id": "4603", + "kind": "string", + "type": { + "$ref": "1172" + }, + "value": "Basic_A0" + }, + "type": { + "$id": "4604", + "kind": "string", + "type": { + "$ref": "1176" + }, + "value": "Microsoft.ServiceFabric/locations/managedVMSizes" + }, + "id": { + "$id": "4605", + "kind": "string", + "type": { + "$ref": "1168" + }, + "value": "subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ServiceFabric/locations/eastus/managedVMSizes/Basic_A0" + }, + "properties": { + "$id": "4606", + "kind": "model", + "type": { + "$ref": "1160" + }, + "value": { + "$id": "4607", + "size": { + "$id": "4608", + "kind": "string", + "type": { + "$ref": "1162" + }, + "value": "Basic_A0" + } + } + } + } + }, + { + "$id": "4609", + "kind": "model", + "type": { + "$ref": "1158" + }, + "value": { + "$id": "4610", + "name": { + "$id": "4611", + "kind": "string", + "type": { + "$ref": "1172" + }, + "value": "Basic_A1" + }, + "type": { + "$id": "4612", + "kind": "string", + "type": { + "$ref": "1176" + }, + "value": "Microsoft.ServiceFabric/locations/managedVMSizes" + }, + "id": { + "$id": "4613", + "kind": "string", + "type": { + "$ref": "1168" + }, + "value": "subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ServiceFabric/locations/eastus/managedVMSizes/Basic_A1" + }, + "properties": { + "$id": "4614", + "kind": "model", + "type": { + "$ref": "1160" + }, + "value": { + "$id": "4615", + "size": { + "$id": "4616", + "kind": "string", + "type": { + "$ref": "1162" + }, + "value": "Basic_A1" + } + } + } + } + }, + { + "$id": "4617", + "kind": "model", + "type": { + "$ref": "1158" + }, + "value": { + "$id": "4618", + "name": { + "$id": "4619", + "kind": "string", + "type": { + "$ref": "1172" + }, + "value": "Basic_A2" + }, + "type": { + "$id": "4620", + "kind": "string", + "type": { + "$ref": "1176" + }, + "value": "Microsoft.ServiceFabric/locations/managedVMSizes" + }, + "id": { + "$id": "4621", + "kind": "string", + "type": { + "$ref": "1168" + }, + "value": "subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ServiceFabric/locations/eastus/managedVMSizes/Basic_A2" + }, + "properties": { + "$id": "4622", + "kind": "model", + "type": { + "$ref": "1160" + }, + "value": { + "$id": "4623", + "size": { + "$id": "4624", + "kind": "string", + "type": { + "$ref": "1162" + }, + "value": "Basic_A2" + } + } + } + } + }, + { + "$id": "4625", + "kind": "model", + "type": { + "$ref": "1158" + }, + "value": { + "$id": "4626", + "name": { + "$id": "4627", + "kind": "string", + "type": { + "$ref": "1172" + }, + "value": "Basic_A3" + }, + "type": { + "$id": "4628", + "kind": "string", + "type": { + "$ref": "1176" + }, + "value": "Microsoft.ServiceFabric/locations/managedVMSizes" + }, + "id": { + "$id": "4629", + "kind": "string", + "type": { + "$ref": "1168" + }, + "value": "subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ServiceFabric/locations/eastus/managedVMSizes/Basic_A3" + }, + "properties": { + "$id": "4630", + "kind": "model", + "type": { + "$ref": "1160" + }, + "value": { + "$id": "4631", + "size": { + "$id": "4632", + "kind": "string", + "type": { + "$ref": "1162" + }, + "value": "Basic_A3" + } + } + } + } + }, + { + "$id": "4633", + "kind": "model", + "type": { + "$ref": "1158" + }, + "value": { + "$id": "4634", + "name": { + "$id": "4635", + "kind": "string", + "type": { + "$ref": "1172" + }, + "value": "Basic_A4" + }, + "type": { + "$id": "4636", + "kind": "string", + "type": { + "$ref": "1176" + }, + "value": "Microsoft.ServiceFabric/locations/managedVMSizes" + }, + "id": { + "$id": "4637", + "kind": "string", + "type": { + "$ref": "1168" + }, + "value": "subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ServiceFabric/locations/eastus/managedVMSizes/Basic_A4" + }, + "properties": { + "$id": "4638", + "kind": "model", + "type": { + "$ref": "1160" + }, + "value": { + "$id": "4639", + "size": { + "$id": "4640", + "kind": "string", + "type": { + "$ref": "1162" + }, + "value": "Basic_A4" + } + } + } + } + }, + { + "$id": "4641", + "kind": "model", + "type": { + "$ref": "1158" + }, + "value": { + "$id": "4642", + "name": { + "$id": "4643", + "kind": "string", + "type": { + "$ref": "1172" + }, + "value": "Standard_A0" + }, + "type": { + "$id": "4644", + "kind": "string", + "type": { + "$ref": "1176" + }, + "value": "Microsoft.ServiceFabric/locations/managedVMSizes" + }, + "id": { + "$id": "4645", + "kind": "string", + "type": { + "$ref": "1168" + }, + "value": "subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ServiceFabric/locations/eastus/managedVMSizes/Standard_A0" + }, + "properties": { + "$id": "4646", + "kind": "model", + "type": { + "$ref": "1160" + }, + "value": { + "$id": "4647", + "size": { + "$id": "4648", + "kind": "string", + "type": { + "$ref": "1162" + }, + "value": "Standard_A0" + } + } + } + } + } + ] + } + } + } + } + ] + } + ] + }, + "parameters": [ + { + "$id": "4649", + "name": "location", + "nameInRequest": "location", + "doc": "The location for the cluster code versions. This is different from cluster location.", + "type": { + "$id": "4650", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4651", + "name": "accept", + "nameInRequest": "accept", + "type": { + "$ref": "4475" + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "response": { + "$id": "4652", + "type": { + "$id": "4653", + "kind": "array", + "name": "ArrayManagedVmSize", + "valueType": { + "$ref": "1158" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "resultSegments": [ + "value" + ] + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedUnsupportedVMSizes.list", + "pagingMetadata": { + "$id": "4654", + "itemPropertySegments": [ + "value" + ], + "nextLink": { + "$id": "4655", + "responseSegments": [ + "nextLink" + ], + "responseLocation": "Body" + } + } + } + ], + "parameters": [ + { + "$id": "4656", + "name": "endpoint", + "nameInRequest": "endpoint", + "doc": "Service host", + "type": { + "$id": "4657", + "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": "4658", + "type": { + "$id": "4659", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "https://management.azure.com" + } + } + ], + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedUnsupportedVMSizes", + "apiVersions": [ + "2024-11-01-preview", + "2025-03-01-preview" + ], + "parent": { + "$ref": "2389" + } + }, + { + "$id": "4660", + "kind": "client", + "name": "ManagedClusters", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "methods": [ + { + "$id": "4661", + "kind": "basic", + "name": "get", + "accessibility": "public", + "apiVersions": [ + "2024-11-01-preview", + "2025-03-01-preview" + ], + "doc": "Get a Service Fabric managed cluster resource created or in the process of being created in the specified resource group.", + "operation": { + "$id": "4662", + "name": "get", + "resourceName": "ManagedCluster", + "doc": "Get a Service Fabric managed cluster resource created or in the process of being created in the specified resource group.", + "accessibility": "public", + "parameters": [ + { + "$id": "4663", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "4664", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "4665", + "type": { + "$id": "4666", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-03-01-preview" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4667", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "4668", + "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": "4669", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "4670", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4671", + "name": "clusterName", + "nameInRequest": "clusterName", + "doc": "The name of the cluster resource.", + "type": { + "$id": "4672", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4673", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "4674", + "kind": "constant", + "valueType": { + "$id": "4675", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "4676", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "1189" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "GET", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}", + "bufferResponse": true, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedClusters.get", + "decorators": [], + "examples": [ + { + "$id": "4677", + "kind": "http", + "name": "Get a cluster", + "description": "Get a cluster", + "filePath": "2025-03-01-preview/ManagedClusterGetOperation_example.json", + "parameters": [ + { + "$id": "4678", + "parameter": { + "$ref": "4663" + }, + "value": { + "$id": "4679", + "kind": "string", + "type": { + "$ref": "4664" + }, + "value": "2025-03-01-preview" + } + }, + { + "$id": "4680", + "parameter": { + "$ref": "4671" + }, + "value": { + "$id": "4681", + "kind": "string", + "type": { + "$ref": "4672" + }, + "value": "myCluster" + } + }, + { + "$id": "4682", + "parameter": { + "$ref": "4669" + }, + "value": { + "$id": "4683", + "kind": "string", + "type": { + "$ref": "4670" + }, + "value": "resRg" + } + }, + { + "$id": "4684", + "parameter": { + "$ref": "4667" + }, + "value": { + "$id": "4685", + "kind": "string", + "type": { + "$ref": "4668" + }, + "value": "00000000-0000-0000-0000-000000000000" + } + } + ], + "responses": [ + { + "$id": "4686", + "response": { + "$ref": "4676" + }, + "statusCode": 200, + "bodyValue": { + "$id": "4687", + "kind": "model", + "type": { + "$ref": "1189" + }, + "value": { + "$id": "4688", + "name": { + "$id": "4689", + "kind": "string", + "type": { + "$ref": "457" + }, + "value": "myCluster" + }, + "type": { + "$id": "4690", + "kind": "string", + "type": { + "$ref": "461" + }, + "value": "Microsoft.ServiceFabric/managedClusters" + }, + "etag": { + "$id": "4691", + "kind": "string", + "type": { + "$ref": "1613" + }, + "value": "W/\"636462502169240745\"" + }, + "id": { + "$id": "4692", + "kind": "string", + "type": { + "$ref": "453" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/managedClusters/myCluster" + }, + "location": { + "$id": "4693", + "kind": "string", + "type": { + "$ref": "1198" + }, + "value": "eastus" + }, + "properties": { + "$id": "4694", + "kind": "model", + "type": { + "$ref": "1202" + }, + "value": { + "$id": "4695", + "adminUserName": { + "$id": "4696", + "kind": "string", + "type": { + "$ref": "1238" + }, + "value": "vmadmin" + }, + "clientConnectionPort": { + "$id": "4697", + "kind": "number", + "type": { + "$ref": "1230" + }, + "value": 19000 + }, + "clusterCertificateThumbprints": { + "$id": "4698", + "kind": "array", + "type": { + "$ref": "1225" + }, + "value": [ + { + "$id": "4699", + "kind": "string", + "type": { + "$ref": "1226" + }, + "value": "12599211F8F14C90AFA9532AD79A6F2CA1C00622" + } + ] + }, + "clusterCodeVersion": { + "$id": "4700", + "kind": "string", + "type": { + "$ref": "1406" + }, + "value": "7.1.168.9494" + }, + "clusterId": { + "$id": "4701", + "kind": "string", + "type": { + "$ref": "1217" + }, + "value": "92584666-9889-4ae8-8d02-91902923d37f" + }, + "clusterState": { + "$id": "4702", + "kind": "string", + "type": { + "$ref": "120" + }, + "value": "WaitingForNodes" + }, + "clusterUpgradeCadence": { + "$id": "4703", + "kind": "string", + "type": { + "$ref": "204" + }, + "value": "Wave0" + }, + "clusterUpgradeMode": { + "$id": "4704", + "kind": "string", + "type": { + "$ref": "198" + }, + "value": "Automatic" + }, + "dnsName": { + "$id": "4705", + "kind": "string", + "type": { + "$ref": "1204" + }, + "value": "myCluster" + }, + "fabricSettings": { + "$id": "4706", + "kind": "array", + "type": { + "$ref": "1381" + }, + "value": [ + { + "$id": "4707", + "kind": "model", + "type": { + "$ref": "1382" + }, + "value": { + "$id": "4708", + "name": { + "$id": "4709", + "kind": "string", + "type": { + "$ref": "1384" + }, + "value": "ManagedIdentityTokenService" + }, + "parameters": { + "$id": "4710", + "kind": "array", + "type": { + "$ref": "1388" + }, + "value": [ + { + "$id": "4711", + "kind": "model", + "type": { + "$ref": "1389" + }, + "value": { + "$id": "4712", + "name": { + "$id": "4713", + "kind": "string", + "type": { + "$ref": "1391" + }, + "value": "IsEnabled" + }, + "value": { + "$id": "4714", + "kind": "string", + "type": { + "$ref": "1395" + }, + "value": "true" + } + } + } + ] + } + } + } + ] + }, + "fqdn": { + "$id": "4715", + "kind": "string", + "type": { + "$ref": "1208" + }, + "value": "MyCluster.eastus.cloudapp.azure.com" + }, + "httpGatewayConnectionPort": { + "$id": "4716", + "kind": "number", + "type": { + "$ref": "1234" + }, + "value": 19080 + }, + "loadBalancingRules": { + "$id": "4717", + "kind": "array", + "type": { + "$ref": "1246" + }, + "value": [ + { + "$id": "4718", + "kind": "model", + "type": { + "$ref": "1247" + }, + "value": { + "$id": "4719", + "backendPort": { + "$id": "4720", + "kind": "number", + "type": { + "$ref": "1253" + }, + "value": 80 + }, + "frontendPort": { + "$id": "4721", + "kind": "number", + "type": { + "$ref": "1249" + }, + "value": 80 + }, + "probePort": { + "$id": "4722", + "kind": "number", + "type": { + "$ref": "1260" + }, + "value": 80 + }, + "probeProtocol": { + "$id": "4723", + "kind": "string", + "type": { + "$ref": "140" + }, + "value": "http" + }, + "protocol": { + "$id": "4724", + "kind": "string", + "type": { + "$ref": "134" + }, + "value": "http" + } + } + }, + { + "$id": "4725", + "kind": "model", + "type": { + "$ref": "1247" + }, + "value": { + "$id": "4726", + "backendPort": { + "$id": "4727", + "kind": "number", + "type": { + "$ref": "1253" + }, + "value": 443 + }, + "frontendPort": { + "$id": "4728", + "kind": "number", + "type": { + "$ref": "1249" + }, + "value": 443 + }, + "probePort": { + "$id": "4729", + "kind": "number", + "type": { + "$ref": "1260" + }, + "value": 443 + }, + "probeProtocol": { + "$id": "4730", + "kind": "string", + "type": { + "$ref": "140" + }, + "value": "http" + }, + "protocol": { + "$id": "4731", + "kind": "string", + "type": { + "$ref": "134" + }, + "value": "http" + } + } + }, + { + "$id": "4732", + "kind": "model", + "type": { + "$ref": "1247" + }, + "value": { + "$id": "4733", + "backendPort": { + "$id": "4734", + "kind": "number", + "type": { + "$ref": "1253" + }, + "value": 10000 + }, + "frontendPort": { + "$id": "4735", + "kind": "number", + "type": { + "$ref": "1249" + }, + "value": 10000 + }, + "probePort": { + "$id": "4736", + "kind": "number", + "type": { + "$ref": "1260" + }, + "value": 10000 + }, + "probeProtocol": { + "$id": "4737", + "kind": "string", + "type": { + "$ref": "140" + }, + "value": "tcp" + }, + "protocol": { + "$id": "4738", + "kind": "string", + "type": { + "$ref": "134" + }, + "value": "tcp" + } + } + } + ] + }, + "provisioningState": { + "$id": "4739", + "kind": "string", + "type": { + "$ref": "176" + }, + "value": "Succeeded" + } + } + }, + "sku": { + "$id": "4740", + "kind": "model", + "type": { + "$ref": "1617" + }, + "value": { + "$id": "4741", + "name": { + "$id": "4742", + "kind": "string", + "type": { + "$ref": "248" + }, + "value": "Standard" + } + } + }, + "tags": { + "$id": "4743", + "kind": "dict", + "type": { + "$ref": "1192" + }, + "value": { + "$id": "4744" + } + } + } + } + } + ] + } + ] + }, + "parameters": [ + { + "$id": "4745", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "4746", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4747", + "name": "clusterName", + "nameInRequest": "clusterName", + "doc": "The name of the cluster resource.", + "type": { + "$id": "4748", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4749", + "name": "accept", + "nameInRequest": "accept", + "type": { + "$ref": "4674" + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "response": { + "$id": "4750", + "type": { + "$ref": "1189" + } + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedClusters.get" + }, + { + "$id": "4751", + "kind": "lro", + "name": "createOrUpdate", + "accessibility": "public", + "apiVersions": [ + "2024-11-01-preview", + "2025-03-01-preview" + ], + "doc": "Create or update a Service Fabric managed cluster resource with the specified name.", + "operation": { + "$id": "4752", + "name": "createOrUpdate", + "resourceName": "ManagedCluster", + "doc": "Create or update a Service Fabric managed cluster resource with the specified name.", + "accessibility": "public", + "parameters": [ + { + "$id": "4753", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "4754", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "4755", + "type": { + "$id": "4756", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-03-01-preview" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4757", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "4758", + "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": "4759", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "4760", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4761", + "name": "clusterName", + "nameInRequest": "clusterName", + "doc": "The name of the cluster resource.", + "type": { + "$id": "4762", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4763", + "name": "contentType", + "nameInRequest": "Content-Type", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$id": "4764", + "kind": "constant", + "valueType": { + "$id": "4765", + "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": "4766", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "4767", + "kind": "constant", + "valueType": { + "$id": "4768", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "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": "4769", + "name": "parameters", + "nameInRequest": "parameters", + "doc": "The cluster resource.", + "type": { + "$ref": "1189" + }, + "location": "Body", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "4770", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "1189" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + }, + { + "$id": "4771", + "statusCodes": [ + 202 + ], + "bodyType": { + "$ref": "1189" + }, + "headers": [ + { + "$id": "4772", + "name": "azureAsyncOperation", + "nameInResponse": "Azure-AsyncOperation", + "doc": "A link to the status monitor", + "type": { + "$id": "4773", + "kind": "url", + "name": "ResourceLocation", + "crossLanguageDefinitionId": "TypeSpec.Rest.ResourceLocation", + "baseType": { + "$id": "4774", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url", + "decorators": [] + }, + "decorators": [] + } + }, + { + "$id": "4775", + "name": "location", + "nameInResponse": "Location", + "doc": "The Location header contains the URL where the status of the long running operation can be checked.", + "type": { + "$id": "4776", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + } + ], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "PUT", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}", + "requestMediaTypes": [ + "application/json" + ], + "bufferResponse": true, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedClusters.createOrUpdate", + "decorators": [], + "examples": [ + { + "$id": "4777", + "kind": "http", + "name": "Put a cluster with maximum parameters", + "description": "Put a cluster with maximum parameters", + "filePath": "2025-03-01-preview/ManagedClusterPutOperation_example_max.json", + "parameters": [ + { + "$id": "4778", + "parameter": { + "$ref": "4753" + }, + "value": { + "$id": "4779", + "kind": "string", + "type": { + "$ref": "4754" + }, + "value": "2025-03-01-preview" + } + }, + { + "$id": "4780", + "parameter": { + "$ref": "4761" + }, + "value": { + "$id": "4781", + "kind": "string", + "type": { + "$ref": "4762" + }, + "value": "mycluster" + } + }, + { + "$id": "4782", + "parameter": { + "$ref": "4759" + }, + "value": { + "$id": "4783", + "kind": "string", + "type": { + "$ref": "4760" + }, + "value": "resRg" + } + }, + { + "$id": "4784", + "parameter": { + "$ref": "4757" + }, + "value": { + "$id": "4785", + "kind": "string", + "type": { + "$ref": "4758" + }, + "value": "00000000-0000-0000-0000-000000000000" + } + } + ], + "responses": [ + { + "$id": "4786", + "response": { + "$ref": "4770" + }, + "statusCode": 200, + "bodyValue": { + "$id": "4787", + "kind": "model", + "type": { + "$ref": "1189" + }, + "value": { + "$id": "4788", + "name": { + "$id": "4789", + "kind": "string", + "type": { + "$ref": "457" + }, + "value": "myCluster" + }, + "type": { + "$id": "4790", + "kind": "string", + "type": { + "$ref": "461" + }, + "value": "Microsoft.ServiceFabric/managedClusters" + }, + "etag": { + "$id": "4791", + "kind": "string", + "type": { + "$ref": "1613" + }, + "value": "W/\"636462502169240745\"" + }, + "id": { + "$id": "4792", + "kind": "string", + "type": { + "$ref": "453" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/managedClusters/myCluster" + }, + "location": { + "$id": "4793", + "kind": "string", + "type": { + "$ref": "1198" + }, + "value": "eastus" + }, + "properties": { + "$id": "4794", + "kind": "model", + "type": { + "$ref": "1202" + }, + "value": { + "$id": "4795", + "addonFeatures": { + "$id": "4796", + "kind": "array", + "type": { + "$ref": "1416" + }, + "value": [ + { + "$id": "4797", + "kind": "string", + "type": { + "$ref": "212" + }, + "value": "DnsService" + }, + { + "$id": "4798", + "kind": "string", + "type": { + "$ref": "212" + }, + "value": "BackupRestoreService" + }, + { + "$id": "4799", + "kind": "string", + "type": { + "$ref": "212" + }, + "value": "ResourceMonitorService" + } + ] + }, + "adminUserName": { + "$id": "4800", + "kind": "string", + "type": { + "$ref": "1238" + }, + "value": "vmadmin" + }, + "allocatedOutboundPorts": { + "$id": "4801", + "kind": "number", + "type": { + "$ref": "1601" + }, + "value": 0 + }, + "allowRdpAccess": { + "$id": "4802", + "kind": "boolean", + "type": { + "$ref": "1277" + }, + "value": true + }, + "applicationTypeVersionsCleanupPolicy": { + "$id": "4803", + "kind": "model", + "type": { + "$ref": "1428" + }, + "value": { + "$id": "4804", + "maxUnusedVersionsToKeep": { + "$id": "4805", + "kind": "number", + "type": { + "$ref": "1430" + }, + "value": 3 + } + } + }, + "autoGeneratedDomainNameLabelScope": { + "$id": "4806", + "kind": "string", + "type": { + "$ref": "238" + }, + "value": "SubscriptionReuse" + }, + "auxiliarySubnets": { + "$id": "4807", + "kind": "array", + "type": { + "$ref": "1466" + }, + "value": [ + { + "$id": "4808", + "kind": "model", + "type": { + "$ref": "1467" + }, + "value": { + "$id": "4809", + "name": { + "$id": "4810", + "kind": "string", + "type": { + "$ref": "1469" + }, + "value": "testSubnet1" + }, + "enableIpv6": { + "$id": "4811", + "kind": "boolean", + "type": { + "$ref": "1473" + }, + "value": true + }, + "networkSecurityGroupId": { + "$id": "4812", + "kind": "string", + "type": { + "$ref": "1483" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.Network/networkSecurityGroups/sn1" + }, + "privateEndpointNetworkPolicies": { + "$id": "4813", + "kind": "string", + "type": { + "$ref": "220" + }, + "value": "enabled" + }, + "privateLinkServiceNetworkPolicies": { + "$id": "4814", + "kind": "string", + "type": { + "$ref": "226" + }, + "value": "enabled" + } + } + } + ] + }, + "clientConnectionPort": { + "$id": "4815", + "kind": "number", + "type": { + "$ref": "1230" + }, + "value": 19000 + }, + "clusterCertificateThumbprints": { + "$id": "4816", + "kind": "array", + "type": { + "$ref": "1225" + }, + "value": [ + { + "$id": "4817", + "kind": "string", + "type": { + "$ref": "1226" + }, + "value": "12599211F8F14C90AFA9532AD79A6F2CA1C00622" + } + ] + }, + "clusterCodeVersion": { + "$id": "4818", + "kind": "string", + "type": { + "$ref": "1406" + }, + "value": "7.1.168.9494" + }, + "clusterId": { + "$id": "4819", + "kind": "string", + "type": { + "$ref": "1217" + }, + "value": "92584666-9889-4ae8-8d02-91902923d37f" + }, + "clusterState": { + "$id": "4820", + "kind": "string", + "type": { + "$ref": "120" + }, + "value": "WaitingForNodes" + }, + "clusterUpgradeMode": { + "$id": "4821", + "kind": "string", + "type": { + "$ref": "198" + }, + "value": "Manual" + }, + "ddosProtectionPlanId": { + "$id": "4822", + "kind": "string", + "type": { + "$ref": "1521" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.Network/ddosProtectionPlans/myDDoSProtectionPlan" + }, + "dnsName": { + "$id": "4823", + "kind": "string", + "type": { + "$ref": "1204" + }, + "value": "mycluster" + }, + "enableAutoOSUpgrade": { + "$id": "4824", + "kind": "boolean", + "type": { + "$ref": "1420" + }, + "value": true + }, + "enableHttpGatewayExclusiveAuthMode": { + "$id": "4825", + "kind": "boolean", + "type": { + "$ref": "1594" + }, + "value": true + }, + "enableIpv6": { + "$id": "4826", + "kind": "boolean", + "type": { + "$ref": "1436" + }, + "value": true + }, + "enableServicePublicIP": { + "$id": "4827", + "kind": "boolean", + "type": { + "$ref": "1462" + }, + "value": true + }, + "fabricSettings": { + "$id": "4828", + "kind": "array", + "type": { + "$ref": "1381" + }, + "value": [ + { + "$id": "4829", + "kind": "model", + "type": { + "$ref": "1382" + }, + "value": { + "$id": "4830", + "name": { + "$id": "4831", + "kind": "string", + "type": { + "$ref": "1384" + }, + "value": "ManagedIdentityTokenService" + }, + "parameters": { + "$id": "4832", + "kind": "array", + "type": { + "$ref": "1388" + }, + "value": [ + { + "$id": "4833", + "kind": "model", + "type": { + "$ref": "1389" + }, + "value": { + "$id": "4834", + "name": { + "$id": "4835", + "kind": "string", + "type": { + "$ref": "1391" + }, + "value": "IsEnabled" + }, + "value": { + "$id": "4836", + "kind": "string", + "type": { + "$ref": "1395" + }, + "value": "true" + } + } + } + ] + } + } + } + ] + }, + "fqdn": { + "$id": "4837", + "kind": "string", + "type": { + "$ref": "1208" + }, + "value": "mycluster.eastus.cloudapp.azure.com" + }, + "httpGatewayConnectionPort": { + "$id": "4838", + "kind": "number", + "type": { + "$ref": "1234" + }, + "value": 19080 + }, + "httpGatewayTokenAuthConnectionPort": { + "$id": "4839", + "kind": "number", + "type": { + "$ref": "1590" + }, + "value": 19081 + }, + "ipTags": { + "$id": "4840", + "kind": "array", + "type": { + "$ref": "1444" + }, + "value": [ + { + "$id": "4841", + "kind": "model", + "type": { + "$ref": "1445" + }, + "value": { + "$id": "4842", + "ipTagType": { + "$id": "4843", + "kind": "string", + "type": { + "$ref": "1447" + }, + "value": "FirstPartyUsage" + }, + "tag": { + "$id": "4844", + "kind": "string", + "type": { + "$ref": "1451" + }, + "value": "SQL" + } + } + } + ] + }, + "ipv6Address": { + "$id": "4845", + "kind": "string", + "type": { + "$ref": "1457" + }, + "value": "0000:0000:0000:0000:0000:0000:0000:0000" + }, + "loadBalancingRules": { + "$id": "4846", + "kind": "array", + "type": { + "$ref": "1246" + }, + "value": [ + { + "$id": "4847", + "kind": "model", + "type": { + "$ref": "1247" + }, + "value": { + "$id": "4848", + "backendPort": { + "$id": "4849", + "kind": "number", + "type": { + "$ref": "1253" + }, + "value": 80 + }, + "frontendPort": { + "$id": "4850", + "kind": "number", + "type": { + "$ref": "1249" + }, + "value": 80 + }, + "probePort": { + "$id": "4851", + "kind": "number", + "type": { + "$ref": "1260" + }, + "value": 80 + }, + "probeProtocol": { + "$id": "4852", + "kind": "string", + "type": { + "$ref": "140" + }, + "value": "http" + }, + "protocol": { + "$id": "4853", + "kind": "string", + "type": { + "$ref": "134" + }, + "value": "http" + } + } + }, + { + "$id": "4854", + "kind": "model", + "type": { + "$ref": "1247" + }, + "value": { + "$id": "4855", + "backendPort": { + "$id": "4856", + "kind": "number", + "type": { + "$ref": "1253" + }, + "value": 443 + }, + "frontendPort": { + "$id": "4857", + "kind": "number", + "type": { + "$ref": "1249" + }, + "value": 443 + }, + "probePort": { + "$id": "4858", + "kind": "number", + "type": { + "$ref": "1260" + }, + "value": 443 + }, + "probeProtocol": { + "$id": "4859", + "kind": "string", + "type": { + "$ref": "140" + }, + "value": "http" + }, + "protocol": { + "$id": "4860", + "kind": "string", + "type": { + "$ref": "134" + }, + "value": "http" + } + } + }, + { + "$id": "4861", + "kind": "model", + "type": { + "$ref": "1247" + }, + "value": { + "$id": "4862", + "backendPort": { + "$id": "4863", + "kind": "number", + "type": { + "$ref": "1253" + }, + "value": 10000 + }, + "frontendPort": { + "$id": "4864", + "kind": "number", + "type": { + "$ref": "1249" + }, + "value": 10000 + }, + "loadDistribution": { + "$id": "4865", + "kind": "string", + "type": { + "$ref": "1271" + }, + "value": "Default" + }, + "probePort": { + "$id": "4866", + "kind": "number", + "type": { + "$ref": "1260" + }, + "value": 10000 + }, + "probeProtocol": { + "$id": "4867", + "kind": "string", + "type": { + "$ref": "140" + }, + "value": "tcp" + }, + "protocol": { + "$id": "4868", + "kind": "string", + "type": { + "$ref": "134" + }, + "value": "tcp" + } + } + } + ] + }, + "networkSecurityRules": { + "$id": "4869", + "kind": "array", + "type": { + "$ref": "1281" + }, + "value": [ + { + "$id": "4870", + "kind": "model", + "type": { + "$ref": "1282" + }, + "value": { + "$id": "4871", + "name": { + "$id": "4872", + "kind": "string", + "type": { + "$ref": "1284" + }, + "value": "TestName" + }, + "description": { + "$id": "4873", + "kind": "string", + "type": { + "$ref": "1288" + }, + "value": "Test description" + }, + "access": { + "$id": "4874", + "kind": "string", + "type": { + "$ref": "164" + }, + "value": "allow" + }, + "destinationAddressPrefixes": { + "$id": "4875", + "kind": "array", + "type": { + "$ref": "1300" + }, + "value": [ + { + "$id": "4876", + "kind": "string", + "type": { + "$ref": "1301" + }, + "value": "*" + } + ] + }, + "destinationPortRanges": { + "$id": "4877", + "kind": "array", + "type": { + "$ref": "1310" + }, + "value": [ + { + "$id": "4878", + "kind": "string", + "type": { + "$ref": "1311" + }, + "value": "*" + } + ] + }, + "direction": { + "$id": "4879", + "kind": "string", + "type": { + "$ref": "170" + }, + "value": "inbound" + }, + "priority": { + "$id": "4880", + "kind": "number", + "type": { + "$ref": "1334" + }, + "value": 1010 + }, + "sourceAddressPrefixes": { + "$id": "4881", + "kind": "array", + "type": { + "$ref": "1295" + }, + "value": [ + { + "$id": "4882", + "kind": "string", + "type": { + "$ref": "1296" + }, + "value": "*" + } + ] + }, + "sourcePortRanges": { + "$id": "4883", + "kind": "array", + "type": { + "$ref": "1305" + }, + "value": [ + { + "$id": "4884", + "kind": "string", + "type": { + "$ref": "1306" + }, + "value": "*" + } + ] + }, + "protocol": { + "$id": "4885", + "kind": "string", + "type": { + "$ref": "148" + }, + "value": "tcp" + } + } + }, + { + "$id": "4886", + "kind": "model", + "type": { + "$ref": "1282" + }, + "value": { + "$id": "4887", + "name": { + "$id": "4888", + "kind": "string", + "type": { + "$ref": "1284" + }, + "value": "AllowARM" + }, + "access": { + "$id": "4889", + "kind": "string", + "type": { + "$ref": "164" + }, + "value": "allow" + }, + "destinationAddressPrefix": { + "$id": "4890", + "kind": "string", + "type": { + "$ref": "1319" + }, + "value": "*" + }, + "destinationPortRange": { + "$id": "4891", + "kind": "string", + "type": { + "$ref": "1327" + }, + "value": "33500-33699" + }, + "direction": { + "$id": "4892", + "kind": "string", + "type": { + "$ref": "170" + }, + "value": "inbound" + }, + "priority": { + "$id": "4893", + "kind": "number", + "type": { + "$ref": "1334" + }, + "value": 2002 + }, + "sourceAddressPrefix": { + "$id": "4894", + "kind": "string", + "type": { + "$ref": "1315" + }, + "value": "AzureResourceManager" + }, + "sourcePortRange": { + "$id": "4895", + "kind": "string", + "type": { + "$ref": "1323" + }, + "value": "*" + }, + "protocol": { + "$id": "4896", + "kind": "string", + "type": { + "$ref": "148" + }, + "value": "*" + } + } + } + ] + }, + "provisioningState": { + "$id": "4897", + "kind": "string", + "type": { + "$ref": "176" + }, + "value": "Creating" + }, + "publicIPPrefixId": { + "$id": "4898", + "kind": "string", + "type": { + "$ref": "1511" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.Network/publicIPPrefixes/myPublicIPPrefix" + }, + "publicIPv6PrefixId": { + "$id": "4899", + "kind": "string", + "type": { + "$ref": "1516" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.Network/publicIPPrefixes/myPublicIPv6Prefix" + }, + "serviceEndpoints": { + "$id": "4900", + "kind": "array", + "type": { + "$ref": "1490" + }, + "value": [ + { + "$id": "4901", + "kind": "model", + "type": { + "$ref": "1491" + }, + "value": { + "$id": "4902", + "locations": { + "$id": "4903", + "kind": "array", + "type": { + "$ref": "1497" + }, + "value": [ + { + "$id": "4904", + "kind": "string", + "type": { + "$ref": "1498" + }, + "value": "eastus2" + }, + { + "$id": "4905", + "kind": "string", + "type": { + "$ref": "1498" + }, + "value": "usnorth" + } + ] + }, + "service": { + "$id": "4906", + "kind": "string", + "type": { + "$ref": "1493" + }, + "value": "Microsoft.Storage" + } + } + } + ] + }, + "upgradeDescription": { + "$id": "4907", + "kind": "model", + "type": { + "$ref": "1526" + }, + "value": { + "$id": "4908", + "deltaHealthPolicy": { + "$id": "4909", + "kind": "model", + "type": { + "$ref": "1544" + }, + "value": { + "$id": "4910", + "maxPercentDeltaUnhealthyApplications": { + "$id": "4911", + "kind": "number", + "type": { + "$ref": "1554" + }, + "value": 40 + }, + "maxPercentDeltaUnhealthyNodes": { + "$id": "4912", + "kind": "number", + "type": { + "$ref": "1546" + }, + "value": 20 + }, + "maxPercentUpgradeDomainDeltaUnhealthyNodes": { + "$id": "4913", + "kind": "number", + "type": { + "$ref": "1550" + }, + "value": 40 + } + } + }, + "forceRestart": { + "$id": "4914", + "kind": "boolean", + "type": { + "$ref": "1528" + }, + "value": false + }, + "healthPolicy": { + "$id": "4915", + "kind": "model", + "type": { + "$ref": "1532" + }, + "value": { + "$id": "4916", + "maxPercentUnhealthyApplications": { + "$id": "4917", + "kind": "number", + "type": { + "$ref": "1538" + }, + "value": 30 + }, + "maxPercentUnhealthyNodes": { + "$id": "4918", + "kind": "number", + "type": { + "$ref": "1534" + }, + "value": 10 + } + } + }, + "monitoringPolicy": { + "$id": "4919", + "kind": "model", + "type": { + "$ref": "1560" + }, + "value": { + "$id": "4920", + "healthCheckRetryTimeout": { + "$id": "4921", + "kind": "string", + "type": { + "$ref": "1570" + }, + "value": "00:55:00" + }, + "healthCheckStableDuration": { + "$id": "4922", + "kind": "string", + "type": { + "$ref": "1566" + }, + "value": "00:45:00" + }, + "healthCheckWaitDuration": { + "$id": "4923", + "kind": "string", + "type": { + "$ref": "1562" + }, + "value": "00:05:00" + }, + "upgradeDomainTimeout": { + "$id": "4924", + "kind": "string", + "type": { + "$ref": "1578" + }, + "value": "03:00:00" + }, + "upgradeTimeout": { + "$id": "4925", + "kind": "string", + "type": { + "$ref": "1574" + }, + "value": "12:00:00" + } + } + }, + "upgradeReplicaSetCheckTimeout": { + "$id": "4926", + "kind": "string", + "type": { + "$ref": "1584" + }, + "value": "49710.06:28:16" + } + } + }, + "useCustomVnet": { + "$id": "4927", + "kind": "boolean", + "type": { + "$ref": "1507" + }, + "value": true + }, + "zonalResiliency": { + "$id": "4928", + "kind": "boolean", + "type": { + "$ref": "1424" + }, + "value": true + }, + "zonalUpdateMode": { + "$id": "4929", + "kind": "string", + "type": { + "$ref": "232" + }, + "value": "Fast" + } + } + }, + "sku": { + "$id": "4930", + "kind": "model", + "type": { + "$ref": "1617" + }, + "value": { + "$id": "4931", + "name": { + "$id": "4932", + "kind": "string", + "type": { + "$ref": "248" + }, + "value": "Basic" + } + } + }, + "tags": { + "$id": "4933", + "kind": "dict", + "type": { + "$ref": "1192" + }, + "value": { + "$id": "4934" + } + } + } + } + }, + { + "$id": "4935", + "response": { + "$ref": "4771" + }, + "statusCode": 202, + "bodyValue": { + "$id": "4936", + "kind": "model", + "type": { + "$ref": "1189" + }, + "value": { + "$id": "4937", + "name": { + "$id": "4938", + "kind": "string", + "type": { + "$ref": "457" + }, + "value": "mycluster" + }, + "type": { + "$id": "4939", + "kind": "string", + "type": { + "$ref": "461" + }, + "value": "Microsoft.ServiceFabric/managedClusters" + }, + "etag": { + "$id": "4940", + "kind": "string", + "type": { + "$ref": "1613" + }, + "value": "W/\"636462502169240745\"" + }, + "id": { + "$id": "4941", + "kind": "string", + "type": { + "$ref": "453" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/managedClusters/myCluster" + }, + "location": { + "$id": "4942", + "kind": "string", + "type": { + "$ref": "1198" + }, + "value": "eastus" + }, + "properties": { + "$id": "4943", + "kind": "model", + "type": { + "$ref": "1202" + }, + "value": { + "$id": "4944", + "addonFeatures": { + "$id": "4945", + "kind": "array", + "type": { + "$ref": "1416" + }, + "value": [ + { + "$id": "4946", + "kind": "string", + "type": { + "$ref": "212" + }, + "value": "DnsService" + }, + { + "$id": "4947", + "kind": "string", + "type": { + "$ref": "212" + }, + "value": "BackupRestoreService" + }, + { + "$id": "4948", + "kind": "string", + "type": { + "$ref": "212" + }, + "value": "ResourceMonitorService" + } + ] + }, + "adminUserName": { + "$id": "4949", + "kind": "string", + "type": { + "$ref": "1238" + }, + "value": "vmadmin" + }, + "allocatedOutboundPorts": { + "$id": "4950", + "kind": "number", + "type": { + "$ref": "1601" + }, + "value": 0 + }, + "allowRdpAccess": { + "$id": "4951", + "kind": "boolean", + "type": { + "$ref": "1277" + }, + "value": true + }, + "applicationTypeVersionsCleanupPolicy": { + "$id": "4952", + "kind": "model", + "type": { + "$ref": "1428" + }, + "value": { + "$id": "4953", + "maxUnusedVersionsToKeep": { + "$id": "4954", + "kind": "number", + "type": { + "$ref": "1430" + }, + "value": 3 + } + } + }, + "autoGeneratedDomainNameLabelScope": { + "$id": "4955", + "kind": "string", + "type": { + "$ref": "238" + }, + "value": "SubscriptionReuse" + }, + "auxiliarySubnets": { + "$id": "4956", + "kind": "array", + "type": { + "$ref": "1466" + }, + "value": [ + { + "$id": "4957", + "kind": "model", + "type": { + "$ref": "1467" + }, + "value": { + "$id": "4958", + "name": { + "$id": "4959", + "kind": "string", + "type": { + "$ref": "1469" + }, + "value": "testSubnet1" + }, + "enableIpv6": { + "$id": "4960", + "kind": "boolean", + "type": { + "$ref": "1473" + }, + "value": true + }, + "networkSecurityGroupId": { + "$id": "4961", + "kind": "string", + "type": { + "$ref": "1483" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.Network/networkSecurityGroups/sn1" + }, + "privateEndpointNetworkPolicies": { + "$id": "4962", + "kind": "string", + "type": { + "$ref": "220" + }, + "value": "enabled" + }, + "privateLinkServiceNetworkPolicies": { + "$id": "4963", + "kind": "string", + "type": { + "$ref": "226" + }, + "value": "enabled" + } + } + } + ] + }, + "clientConnectionPort": { + "$id": "4964", + "kind": "number", + "type": { + "$ref": "1230" + }, + "value": 19000 + }, + "clusterCertificateThumbprints": { + "$id": "4965", + "kind": "array", + "type": { + "$ref": "1225" + }, + "value": [ + { + "$id": "4966", + "kind": "string", + "type": { + "$ref": "1226" + }, + "value": "12599211F8F14C90AFA9532AD79A6F2CA1C00622" + } + ] + }, + "clusterCodeVersion": { + "$id": "4967", + "kind": "string", + "type": { + "$ref": "1406" + }, + "value": "7.1.168.9494" + }, + "clusterId": { + "$id": "4968", + "kind": "string", + "type": { + "$ref": "1217" + }, + "value": "92584666-9889-4ae8-8d02-91902923d37f" + }, + "clusterState": { + "$id": "4969", + "kind": "string", + "type": { + "$ref": "120" + }, + "value": "WaitingForNodes" + }, + "clusterUpgradeMode": { + "$id": "4970", + "kind": "string", + "type": { + "$ref": "198" + }, + "value": "Manual" + }, + "ddosProtectionPlanId": { + "$id": "4971", + "kind": "string", + "type": { + "$ref": "1521" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.Network/ddosProtectionPlans/myDDoSProtectionPlan" + }, + "dnsName": { + "$id": "4972", + "kind": "string", + "type": { + "$ref": "1204" + }, + "value": "mycluster" + }, + "enableAutoOSUpgrade": { + "$id": "4973", + "kind": "boolean", + "type": { + "$ref": "1420" + }, + "value": true + }, + "enableHttpGatewayExclusiveAuthMode": { + "$id": "4974", + "kind": "boolean", + "type": { + "$ref": "1594" + }, + "value": true + }, + "enableIpv6": { + "$id": "4975", + "kind": "boolean", + "type": { + "$ref": "1436" + }, + "value": true + }, + "enableServicePublicIP": { + "$id": "4976", + "kind": "boolean", + "type": { + "$ref": "1462" + }, + "value": true + }, + "fabricSettings": { + "$id": "4977", + "kind": "array", + "type": { + "$ref": "1381" + }, + "value": [ + { + "$id": "4978", + "kind": "model", + "type": { + "$ref": "1382" + }, + "value": { + "$id": "4979", + "name": { + "$id": "4980", + "kind": "string", + "type": { + "$ref": "1384" + }, + "value": "ManagedIdentityTokenService" + }, + "parameters": { + "$id": "4981", + "kind": "array", + "type": { + "$ref": "1388" + }, + "value": [ + { + "$id": "4982", + "kind": "model", + "type": { + "$ref": "1389" + }, + "value": { + "$id": "4983", + "name": { + "$id": "4984", + "kind": "string", + "type": { + "$ref": "1391" + }, + "value": "IsEnabled" + }, + "value": { + "$id": "4985", + "kind": "string", + "type": { + "$ref": "1395" + }, + "value": "true" + } + } + } + ] + } + } + } + ] + }, + "fqdn": { + "$id": "4986", + "kind": "string", + "type": { + "$ref": "1208" + }, + "value": "mycluster.eastus.cloudapp.azure.com" + }, + "httpGatewayConnectionPort": { + "$id": "4987", + "kind": "number", + "type": { + "$ref": "1234" + }, + "value": 19080 + }, + "httpGatewayTokenAuthConnectionPort": { + "$id": "4988", + "kind": "number", + "type": { + "$ref": "1590" + }, + "value": 19081 + }, + "ipTags": { + "$id": "4989", + "kind": "array", + "type": { + "$ref": "1444" + }, + "value": [ + { + "$id": "4990", + "kind": "model", + "type": { + "$ref": "1445" + }, + "value": { + "$id": "4991", + "ipTagType": { + "$id": "4992", + "kind": "string", + "type": { + "$ref": "1447" + }, + "value": "FirstPartyUsage" + }, + "tag": { + "$id": "4993", + "kind": "string", + "type": { + "$ref": "1451" + }, + "value": "SQL" + } + } + } + ] + }, + "loadBalancingRules": { + "$id": "4994", + "kind": "array", + "type": { + "$ref": "1246" + }, + "value": [ + { + "$id": "4995", + "kind": "model", + "type": { + "$ref": "1247" + }, + "value": { + "$id": "4996", + "backendPort": { + "$id": "4997", + "kind": "number", + "type": { + "$ref": "1253" + }, + "value": 80 + }, + "frontendPort": { + "$id": "4998", + "kind": "number", + "type": { + "$ref": "1249" + }, + "value": 80 + }, + "probePort": { + "$id": "4999", + "kind": "number", + "type": { + "$ref": "1260" + }, + "value": 80 + }, + "probeProtocol": { + "$id": "5000", + "kind": "string", + "type": { + "$ref": "140" + }, + "value": "http" + }, + "protocol": { + "$id": "5001", + "kind": "string", + "type": { + "$ref": "134" + }, + "value": "http" + } + } + }, + { + "$id": "5002", + "kind": "model", + "type": { + "$ref": "1247" + }, + "value": { + "$id": "5003", + "backendPort": { + "$id": "5004", + "kind": "number", + "type": { + "$ref": "1253" + }, + "value": 443 + }, + "frontendPort": { + "$id": "5005", + "kind": "number", + "type": { + "$ref": "1249" + }, + "value": 443 + }, + "probePort": { + "$id": "5006", + "kind": "number", + "type": { + "$ref": "1260" + }, + "value": 443 + }, + "probeProtocol": { + "$id": "5007", + "kind": "string", + "type": { + "$ref": "140" + }, + "value": "http" + }, + "protocol": { + "$id": "5008", + "kind": "string", + "type": { + "$ref": "134" + }, + "value": "http" + } + } + }, + { + "$id": "5009", + "kind": "model", + "type": { + "$ref": "1247" + }, + "value": { + "$id": "5010", + "backendPort": { + "$id": "5011", + "kind": "number", + "type": { + "$ref": "1253" + }, + "value": 10000 + }, + "frontendPort": { + "$id": "5012", + "kind": "number", + "type": { + "$ref": "1249" + }, + "value": 10000 + }, + "loadDistribution": { + "$id": "5013", + "kind": "string", + "type": { + "$ref": "1271" + }, + "value": "Default" + }, + "probePort": { + "$id": "5014", + "kind": "number", + "type": { + "$ref": "1260" + }, + "value": 10000 + }, + "probeProtocol": { + "$id": "5015", + "kind": "string", + "type": { + "$ref": "140" + }, + "value": "tcp" + }, + "protocol": { + "$id": "5016", + "kind": "string", + "type": { + "$ref": "134" + }, + "value": "tcp" + } + } + } + ] + }, + "networkSecurityRules": { + "$id": "5017", + "kind": "array", + "type": { + "$ref": "1281" + }, + "value": [ + { + "$id": "5018", + "kind": "model", + "type": { + "$ref": "1282" + }, + "value": { + "$id": "5019", + "name": { + "$id": "5020", + "kind": "string", + "type": { + "$ref": "1284" + }, + "value": "TestName" + }, + "description": { + "$id": "5021", + "kind": "string", + "type": { + "$ref": "1288" + }, + "value": "Test description" + }, + "access": { + "$id": "5022", + "kind": "string", + "type": { + "$ref": "164" + }, + "value": "allow" + }, + "destinationAddressPrefixes": { + "$id": "5023", + "kind": "array", + "type": { + "$ref": "1300" + }, + "value": [ + { + "$id": "5024", + "kind": "string", + "type": { + "$ref": "1301" + }, + "value": "*" + } + ] + }, + "destinationPortRanges": { + "$id": "5025", + "kind": "array", + "type": { + "$ref": "1310" + }, + "value": [ + { + "$id": "5026", + "kind": "string", + "type": { + "$ref": "1311" + }, + "value": "*" + } + ] + }, + "direction": { + "$id": "5027", + "kind": "string", + "type": { + "$ref": "170" + }, + "value": "inbound" + }, + "priority": { + "$id": "5028", + "kind": "number", + "type": { + "$ref": "1334" + }, + "value": 1010 + }, + "sourceAddressPrefixes": { + "$id": "5029", + "kind": "array", + "type": { + "$ref": "1295" + }, + "value": [ + { + "$id": "5030", + "kind": "string", + "type": { + "$ref": "1296" + }, + "value": "*" + } + ] + }, + "sourcePortRanges": { + "$id": "5031", + "kind": "array", + "type": { + "$ref": "1305" + }, + "value": [ + { + "$id": "5032", + "kind": "string", + "type": { + "$ref": "1306" + }, + "value": "*" + } + ] + }, + "protocol": { + "$id": "5033", + "kind": "string", + "type": { + "$ref": "148" + }, + "value": "tcp" + } + } + }, + { + "$id": "5034", + "kind": "model", + "type": { + "$ref": "1282" + }, + "value": { + "$id": "5035", + "name": { + "$id": "5036", + "kind": "string", + "type": { + "$ref": "1284" + }, + "value": "AllowARM" + }, + "access": { + "$id": "5037", + "kind": "string", + "type": { + "$ref": "164" + }, + "value": "allow" + }, + "destinationAddressPrefix": { + "$id": "5038", + "kind": "string", + "type": { + "$ref": "1319" + }, + "value": "*" + }, + "destinationPortRange": { + "$id": "5039", + "kind": "string", + "type": { + "$ref": "1327" + }, + "value": "33500-33699" + }, + "direction": { + "$id": "5040", + "kind": "string", + "type": { + "$ref": "170" + }, + "value": "inbound" + }, + "priority": { + "$id": "5041", + "kind": "number", + "type": { + "$ref": "1334" + }, + "value": 2002 + }, + "sourceAddressPrefix": { + "$id": "5042", + "kind": "string", + "type": { + "$ref": "1315" + }, + "value": "AzureResourceManager" + }, + "sourcePortRange": { + "$id": "5043", + "kind": "string", + "type": { + "$ref": "1323" + }, + "value": "*" + }, + "protocol": { + "$id": "5044", + "kind": "string", + "type": { + "$ref": "148" + }, + "value": "*" + } + } + } + ] + }, + "provisioningState": { + "$id": "5045", + "kind": "string", + "type": { + "$ref": "176" + }, + "value": "Updating" + }, + "publicIPPrefixId": { + "$id": "5046", + "kind": "string", + "type": { + "$ref": "1511" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.Network/publicIPPrefixes/myPublicIPPrefix" + }, + "publicIPv6PrefixId": { + "$id": "5047", + "kind": "string", + "type": { + "$ref": "1516" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.Network/publicIPPrefixes/myPublicIPv6Prefix" + }, + "serviceEndpoints": { + "$id": "5048", + "kind": "array", + "type": { + "$ref": "1490" + }, + "value": [ + { + "$id": "5049", + "kind": "model", + "type": { + "$ref": "1491" + }, + "value": { + "$id": "5050", + "locations": { + "$id": "5051", + "kind": "array", + "type": { + "$ref": "1497" + }, + "value": [ + { + "$id": "5052", + "kind": "string", + "type": { + "$ref": "1498" + }, + "value": "eastus2" + }, + { + "$id": "5053", + "kind": "string", + "type": { + "$ref": "1498" + }, + "value": "usnorth" + } + ] + }, + "service": { + "$id": "5054", + "kind": "string", + "type": { + "$ref": "1493" + }, + "value": "Microsoft.Storage" + } + } + } + ] + }, + "upgradeDescription": { + "$id": "5055", + "kind": "model", + "type": { + "$ref": "1526" + }, + "value": { + "$id": "5056", + "deltaHealthPolicy": { + "$id": "5057", + "kind": "model", + "type": { + "$ref": "1544" + }, + "value": { + "$id": "5058", + "maxPercentDeltaUnhealthyApplications": { + "$id": "5059", + "kind": "number", + "type": { + "$ref": "1554" + }, + "value": 40 + }, + "maxPercentDeltaUnhealthyNodes": { + "$id": "5060", + "kind": "number", + "type": { + "$ref": "1546" + }, + "value": 20 + }, + "maxPercentUpgradeDomainDeltaUnhealthyNodes": { + "$id": "5061", + "kind": "number", + "type": { + "$ref": "1550" + }, + "value": 40 + } + } + }, + "forceRestart": { + "$id": "5062", + "kind": "boolean", + "type": { + "$ref": "1528" + }, + "value": false + }, + "healthPolicy": { + "$id": "5063", + "kind": "model", + "type": { + "$ref": "1532" + }, + "value": { + "$id": "5064", + "maxPercentUnhealthyApplications": { + "$id": "5065", + "kind": "number", + "type": { + "$ref": "1538" + }, + "value": 30 + }, + "maxPercentUnhealthyNodes": { + "$id": "5066", + "kind": "number", + "type": { + "$ref": "1534" + }, + "value": 10 + } + } + }, + "monitoringPolicy": { + "$id": "5067", + "kind": "model", + "type": { + "$ref": "1560" + }, + "value": { + "$id": "5068", + "healthCheckRetryTimeout": { + "$id": "5069", + "kind": "string", + "type": { + "$ref": "1570" + }, + "value": "00:55:00" + }, + "healthCheckStableDuration": { + "$id": "5070", + "kind": "string", + "type": { + "$ref": "1566" + }, + "value": "00:45:00" + }, + "healthCheckWaitDuration": { + "$id": "5071", + "kind": "string", + "type": { + "$ref": "1562" + }, + "value": "00:05:00" + }, + "upgradeDomainTimeout": { + "$id": "5072", + "kind": "string", + "type": { + "$ref": "1578" + }, + "value": "03:00:00" + }, + "upgradeTimeout": { + "$id": "5073", + "kind": "string", + "type": { + "$ref": "1574" + }, + "value": "12:00:00" + } + } + } + } + }, + "useCustomVnet": { + "$id": "5074", + "kind": "boolean", + "type": { + "$ref": "1507" + }, + "value": true + }, + "zonalResiliency": { + "$id": "5075", + "kind": "boolean", + "type": { + "$ref": "1424" + }, + "value": true + }, + "zonalUpdateMode": { + "$id": "5076", + "kind": "string", + "type": { + "$ref": "232" + }, + "value": "Fast" + } + } + }, + "sku": { + "$id": "5077", + "kind": "model", + "type": { + "$ref": "1617" + }, + "value": { + "$id": "5078", + "name": { + "$id": "5079", + "kind": "string", + "type": { + "$ref": "248" + }, + "value": "Basic" + } + } + }, + "tags": { + "$id": "5080", + "kind": "dict", + "type": { + "$ref": "1192" + }, + "value": { + "$id": "5081" + } + } + } + } + } + ] + }, + { + "$id": "5082", + "kind": "http", + "name": "Put a cluster with minimum parameters", + "description": "Put a cluster with minimum parameters", + "filePath": "2025-03-01-preview/ManagedClusterPutOperation_example_min.json", + "parameters": [ + { + "$id": "5083", + "parameter": { + "$ref": "4753" + }, + "value": { + "$id": "5084", + "kind": "string", + "type": { + "$ref": "4754" + }, + "value": "2025-03-01-preview" + } + }, + { + "$id": "5085", + "parameter": { + "$ref": "4761" + }, + "value": { + "$id": "5086", + "kind": "string", + "type": { + "$ref": "4762" + }, + "value": "myCluster" + } + }, + { + "$id": "5087", + "parameter": { + "$ref": "4759" + }, + "value": { + "$id": "5088", + "kind": "string", + "type": { + "$ref": "4760" + }, + "value": "resRg" + } + }, + { + "$id": "5089", + "parameter": { + "$ref": "4757" + }, + "value": { + "$id": "5090", + "kind": "string", + "type": { + "$ref": "4758" + }, + "value": "00000000-0000-0000-0000-000000000000" + } + } + ], + "responses": [ + { + "$id": "5091", + "response": { + "$ref": "4770" + }, + "statusCode": 200, + "bodyValue": { + "$id": "5092", + "kind": "model", + "type": { + "$ref": "1189" + }, + "value": { + "$id": "5093", + "name": { + "$id": "5094", + "kind": "string", + "type": { + "$ref": "457" + }, + "value": "myCluster" + }, + "type": { + "$id": "5095", + "kind": "string", + "type": { + "$ref": "461" + }, + "value": "Microsoft.ServiceFabric/managedClusters" + }, + "etag": { + "$id": "5096", + "kind": "string", + "type": { + "$ref": "1613" + }, + "value": "W/\"636462502169240745\"" + }, + "id": { + "$id": "5097", + "kind": "string", + "type": { + "$ref": "453" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/managedClusters/myCluster" + }, + "location": { + "$id": "5098", + "kind": "string", + "type": { + "$ref": "1198" + }, + "value": "eastus" + }, + "properties": { + "$id": "5099", + "kind": "model", + "type": { + "$ref": "1202" + }, + "value": { + "$id": "5100", + "adminUserName": { + "$id": "5101", + "kind": "string", + "type": { + "$ref": "1238" + }, + "value": "vmadmin" + }, + "clientConnectionPort": { + "$id": "5102", + "kind": "number", + "type": { + "$ref": "1230" + }, + "value": 19000 + }, + "clusterCertificateThumbprints": { + "$id": "5103", + "kind": "array", + "type": { + "$ref": "1225" + }, + "value": [ + { + "$id": "5104", + "kind": "string", + "type": { + "$ref": "1226" + }, + "value": "12599211F8F14C90AFA9532AD79A6F2CA1C00622" + } + ] + }, + "clusterId": { + "$id": "5105", + "kind": "string", + "type": { + "$ref": "1217" + }, + "value": "92584666-9889-4ae8-8d02-91902923d37f" + }, + "clusterState": { + "$id": "5106", + "kind": "string", + "type": { + "$ref": "120" + }, + "value": "WaitingForNodes" + }, + "clusterUpgradeCadence": { + "$id": "5107", + "kind": "string", + "type": { + "$ref": "204" + }, + "value": "Wave1" + }, + "clusterUpgradeMode": { + "$id": "5108", + "kind": "string", + "type": { + "$ref": "198" + }, + "value": "Automatic" + }, + "dnsName": { + "$id": "5109", + "kind": "string", + "type": { + "$ref": "1204" + }, + "value": "myCluster" + }, + "fabricSettings": { + "$id": "5110", + "kind": "array", + "type": { + "$ref": "1381" + }, + "value": [ + { + "$id": "5111", + "kind": "model", + "type": { + "$ref": "1382" + }, + "value": { + "$id": "5112", + "name": { + "$id": "5113", + "kind": "string", + "type": { + "$ref": "1384" + }, + "value": "ManagedIdentityTokenService" + }, + "parameters": { + "$id": "5114", + "kind": "array", + "type": { + "$ref": "1388" + }, + "value": [ + { + "$id": "5115", + "kind": "model", + "type": { + "$ref": "1389" + }, + "value": { + "$id": "5116", + "name": { + "$id": "5117", + "kind": "string", + "type": { + "$ref": "1391" + }, + "value": "IsEnabled" + }, + "value": { + "$id": "5118", + "kind": "string", + "type": { + "$ref": "1395" + }, + "value": "true" + } + } + } + ] + } + } + } + ] + }, + "fqdn": { + "$id": "5119", + "kind": "string", + "type": { + "$ref": "1208" + }, + "value": "MyCluster.eastus.cloudapp.azure.com" + }, + "httpGatewayConnectionPort": { + "$id": "5120", + "kind": "number", + "type": { + "$ref": "1234" + }, + "value": 19080 + }, + "loadBalancingRules": { + "$id": "5121", + "kind": "array", + "type": { + "$ref": "1246" + }, + "value": [] + }, + "provisioningState": { + "$id": "5122", + "kind": "string", + "type": { + "$ref": "176" + }, + "value": "Creating" + } + } + }, + "sku": { + "$id": "5123", + "kind": "model", + "type": { + "$ref": "1617" + }, + "value": { + "$id": "5124", + "name": { + "$id": "5125", + "kind": "string", + "type": { + "$ref": "248" + }, + "value": "Basic" + } + } + }, + "tags": { + "$id": "5126", + "kind": "dict", + "type": { + "$ref": "1192" + }, + "value": { + "$id": "5127" + } + } + } + } + }, + { + "$id": "5128", + "response": { + "$ref": "4771" + }, + "statusCode": 202, + "bodyValue": { + "$id": "5129", + "kind": "model", + "type": { + "$ref": "1189" + }, + "value": { + "$id": "5130", + "name": { + "$id": "5131", + "kind": "string", + "type": { + "$ref": "457" + }, + "value": "myCluster" + }, + "type": { + "$id": "5132", + "kind": "string", + "type": { + "$ref": "461" + }, + "value": "Microsoft.ServiceFabric/managedClusters" + }, + "etag": { + "$id": "5133", + "kind": "string", + "type": { + "$ref": "1613" + }, + "value": "W/\"636462502169240745\"" + }, + "id": { + "$id": "5134", + "kind": "string", + "type": { + "$ref": "453" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/managedClusters/myCluster" + }, + "location": { + "$id": "5135", + "kind": "string", + "type": { + "$ref": "1198" + }, + "value": "eastus" + }, + "properties": { + "$id": "5136", + "kind": "model", + "type": { + "$ref": "1202" + }, + "value": { + "$id": "5137", + "adminUserName": { + "$id": "5138", + "kind": "string", + "type": { + "$ref": "1238" + }, + "value": "vmadmin" + }, + "clientConnectionPort": { + "$id": "5139", + "kind": "number", + "type": { + "$ref": "1230" + }, + "value": 19000 + }, + "clusterCertificateThumbprints": { + "$id": "5140", + "kind": "array", + "type": { + "$ref": "1225" + }, + "value": [ + { + "$id": "5141", + "kind": "string", + "type": { + "$ref": "1226" + }, + "value": "12599211F8F14C90AFA9532AD79A6F2CA1C00622" + } + ] + }, + "clusterId": { + "$id": "5142", + "kind": "string", + "type": { + "$ref": "1217" + }, + "value": "92584666-9889-4ae8-8d02-91902923d37f" + }, + "clusterState": { + "$id": "5143", + "kind": "string", + "type": { + "$ref": "120" + }, + "value": "WaitingForNodes" + }, + "clusterUpgradeCadence": { + "$id": "5144", + "kind": "string", + "type": { + "$ref": "204" + }, + "value": "Wave1" + }, + "clusterUpgradeMode": { + "$id": "5145", + "kind": "string", + "type": { + "$ref": "198" + }, + "value": "Automatic" + }, + "dnsName": { + "$id": "5146", + "kind": "string", + "type": { + "$ref": "1204" + }, + "value": "myCluster" + }, + "fabricSettings": { + "$id": "5147", + "kind": "array", + "type": { + "$ref": "1381" + }, + "value": [ + { + "$id": "5148", + "kind": "model", + "type": { + "$ref": "1382" + }, + "value": { + "$id": "5149", + "name": { + "$id": "5150", + "kind": "string", + "type": { + "$ref": "1384" + }, + "value": "ManagedIdentityTokenService" + }, + "parameters": { + "$id": "5151", + "kind": "array", + "type": { + "$ref": "1388" + }, + "value": [ + { + "$id": "5152", + "kind": "model", + "type": { + "$ref": "1389" + }, + "value": { + "$id": "5153", + "name": { + "$id": "5154", + "kind": "string", + "type": { + "$ref": "1391" + }, + "value": "IsEnabled" + }, + "value": { + "$id": "5155", + "kind": "string", + "type": { + "$ref": "1395" + }, + "value": "true" + } + } + } + ] + } + } + } + ] + }, + "fqdn": { + "$id": "5156", + "kind": "string", + "type": { + "$ref": "1208" + }, + "value": "MyCluster.eastus.cloudapp.azure.com" + }, + "httpGatewayConnectionPort": { + "$id": "5157", + "kind": "number", + "type": { + "$ref": "1234" + }, + "value": 19080 + }, + "loadBalancingRules": { + "$id": "5158", + "kind": "array", + "type": { + "$ref": "1246" + }, + "value": [] + }, + "provisioningState": { + "$id": "5159", + "kind": "string", + "type": { + "$ref": "176" + }, + "value": "Updating" + } + } + }, + "sku": { + "$id": "5160", + "kind": "model", + "type": { + "$ref": "1617" + }, + "value": { + "$id": "5161", + "name": { + "$id": "5162", + "kind": "string", + "type": { + "$ref": "248" + }, + "value": "Basic" + } + } + }, + "tags": { + "$id": "5163", + "kind": "dict", + "type": { + "$ref": "1192" + }, + "value": { + "$id": "5164" + } + } + } + } + } + ] + } + ] + }, + "parameters": [ + { + "$id": "5165", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "5166", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5167", + "name": "clusterName", + "nameInRequest": "clusterName", + "doc": "The name of the cluster resource.", + "type": { + "$id": "5168", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5169", + "name": "parameters", + "nameInRequest": "resource", + "doc": "The cluster resource.", + "type": { + "$ref": "1189" + }, + "location": "Body", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5170", + "name": "contentType", + "nameInRequest": "contentType", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$id": "5171", + "kind": "constant", + "valueType": { + "$id": "5172", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "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": "5173", + "name": "accept", + "nameInRequest": "accept", + "type": { + "$id": "5174", + "kind": "constant", + "valueType": { + "$id": "5175", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "response": { + "$id": "5176", + "type": { + "$ref": "1189" + } + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedClusters.createOrUpdate", + "lroMetadata": { + "$id": "5177", + "finalStateVia": 1, + "finalResponse": { + "$id": "5178", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "1189" + } + } + } + }, + { + "$id": "5179", + "kind": "basic", + "name": "update", + "accessibility": "public", + "apiVersions": [ + "2024-11-01-preview", + "2025-03-01-preview" + ], + "doc": "Update the tags of of a Service Fabric managed cluster resource with the specified name.", + "operation": { + "$id": "5180", + "name": "update", + "resourceName": "ManagedCluster", + "doc": "Update the tags of of a Service Fabric managed cluster resource with the specified name.", + "accessibility": "public", + "parameters": [ + { + "$id": "5181", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "5182", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "5183", + "type": { + "$id": "5184", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-03-01-preview" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5185", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "5186", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5187", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "5188", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5189", + "name": "clusterName", + "nameInRequest": "clusterName", + "doc": "The name of the cluster resource.", + "type": { + "$id": "5190", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5191", + "name": "contentType", + "nameInRequest": "Content-Type", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$id": "5192", + "kind": "constant", + "valueType": { + "$id": "5193", + "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": "5194", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "5195", + "kind": "constant", + "valueType": { + "$id": "5196", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "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": "5197", + "name": "parameters", + "nameInRequest": "parameters", + "doc": "The managed cluster resource updated tags.", + "type": { + "$ref": "1623" + }, + "location": "Body", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "5198", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "1189" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "PATCH", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}", + "requestMediaTypes": [ + "application/json" + ], + "bufferResponse": true, + "generateProtocolMethod": true, + "generateConvenienceMethod": false, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedClusters.update", + "decorators": [], + "examples": [ + { + "$id": "5199", + "kind": "http", + "name": "Patch a managed cluster", + "description": "Patch a managed cluster", + "filePath": "2025-03-01-preview/ManagedClusterPatchOperation_example.json", + "parameters": [ + { + "$id": "5200", + "parameter": { + "$ref": "5181" + }, + "value": { + "$id": "5201", + "kind": "string", + "type": { + "$ref": "5182" + }, + "value": "2025-03-01-preview" + } + }, + { + "$id": "5202", + "parameter": { + "$ref": "5189" + }, + "value": { + "$id": "5203", + "kind": "string", + "type": { + "$ref": "5190" + }, + "value": "myCluster" + } + }, + { + "$id": "5204", + "parameter": { + "$ref": "5187" + }, + "value": { + "$id": "5205", + "kind": "string", + "type": { + "$ref": "5188" + }, + "value": "resRg" + } + }, + { + "$id": "5206", + "parameter": { + "$ref": "5185" + }, + "value": { + "$id": "5207", + "kind": "string", + "type": { + "$ref": "5186" + }, + "value": "00000000-0000-0000-0000-000000000000" + } + } + ], + "responses": [ + { + "$id": "5208", + "response": { + "$ref": "5198" + }, + "statusCode": 200, + "bodyValue": { + "$id": "5209", + "kind": "model", + "type": { + "$ref": "1189" + }, + "value": { + "$id": "5210", + "name": { + "$id": "5211", + "kind": "string", + "type": { + "$ref": "457" + }, + "value": "myCluster" + }, + "type": { + "$id": "5212", + "kind": "string", + "type": { + "$ref": "461" + }, + "value": "Microsoft.ServiceFabric/managedClusters" + }, + "etag": { + "$id": "5213", + "kind": "string", + "type": { + "$ref": "1613" + }, + "value": "W/\"636462502169240745\"" + }, + "id": { + "$id": "5214", + "kind": "string", + "type": { + "$ref": "453" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/managedClusters/myCluster" + }, + "location": { + "$id": "5215", + "kind": "string", + "type": { + "$ref": "1198" + }, + "value": "eastus" + }, + "properties": { + "$id": "5216", + "kind": "model", + "type": { + "$ref": "1202" + }, + "value": { + "$id": "5217", + "addonFeatures": { + "$id": "5218", + "kind": "array", + "type": { + "$ref": "1416" + }, + "value": [ + { + "$id": "5219", + "kind": "string", + "type": { + "$ref": "212" + }, + "value": "DnsService" + }, + { + "$id": "5220", + "kind": "string", + "type": { + "$ref": "212" + }, + "value": "BackupRestoreService" + }, + { + "$id": "5221", + "kind": "string", + "type": { + "$ref": "212" + }, + "value": "ResourceMonitorService" + } + ] + }, + "adminUserName": { + "$id": "5222", + "kind": "string", + "type": { + "$ref": "1238" + }, + "value": "vmadmin" + }, + "allowRdpAccess": { + "$id": "5223", + "kind": "boolean", + "type": { + "$ref": "1277" + }, + "value": true + }, + "clientConnectionPort": { + "$id": "5224", + "kind": "number", + "type": { + "$ref": "1230" + }, + "value": 19001 + }, + "clusterCertificateThumbprints": { + "$id": "5225", + "kind": "array", + "type": { + "$ref": "1225" + }, + "value": [ + { + "$id": "5226", + "kind": "string", + "type": { + "$ref": "1226" + }, + "value": "12599211F8F14C90AFA9532AD79A6F2CA1C00622" + } + ] + }, + "clusterCodeVersion": { + "$id": "5227", + "kind": "string", + "type": { + "$ref": "1406" + }, + "value": "7.1.168.9494" + }, + "clusterId": { + "$id": "5228", + "kind": "string", + "type": { + "$ref": "1217" + }, + "value": "92584666-9889-4ae8-8d02-91902923d37f" + }, + "clusterState": { + "$id": "5229", + "kind": "string", + "type": { + "$ref": "120" + }, + "value": "WaitingForNodes" + }, + "clusterUpgradeCadence": { + "$id": "5230", + "kind": "string", + "type": { + "$ref": "204" + }, + "value": "Wave0" + }, + "clusterUpgradeMode": { + "$id": "5231", + "kind": "string", + "type": { + "$ref": "198" + }, + "value": "Automatic" + }, + "dnsName": { + "$id": "5232", + "kind": "string", + "type": { + "$ref": "1204" + }, + "value": "myCluster" + }, + "enableAutoOSUpgrade": { + "$id": "5233", + "kind": "boolean", + "type": { + "$ref": "1420" + }, + "value": true + }, + "fabricSettings": { + "$id": "5234", + "kind": "array", + "type": { + "$ref": "1381" + }, + "value": [ + { + "$id": "5235", + "kind": "model", + "type": { + "$ref": "1382" + }, + "value": { + "$id": "5236", + "name": { + "$id": "5237", + "kind": "string", + "type": { + "$ref": "1384" + }, + "value": "ManagedIdentityTokenService" + }, + "parameters": { + "$id": "5238", + "kind": "array", + "type": { + "$ref": "1388" + }, + "value": [ + { + "$id": "5239", + "kind": "model", + "type": { + "$ref": "1389" + }, + "value": { + "$id": "5240", + "name": { + "$id": "5241", + "kind": "string", + "type": { + "$ref": "1391" + }, + "value": "IsEnabled" + }, + "value": { + "$id": "5242", + "kind": "string", + "type": { + "$ref": "1395" + }, + "value": "false" + } + } + } + ] + } + } + } + ] + }, + "fqdn": { + "$id": "5243", + "kind": "string", + "type": { + "$ref": "1208" + }, + "value": "MyCluster.eastus.cloudapp.azure.com" + }, + "httpGatewayConnectionPort": { + "$id": "5244", + "kind": "number", + "type": { + "$ref": "1234" + }, + "value": 19081 + }, + "loadBalancingRules": { + "$id": "5245", + "kind": "array", + "type": { + "$ref": "1246" + }, + "value": [ + { + "$id": "5246", + "kind": "model", + "type": { + "$ref": "1247" + }, + "value": { + "$id": "5247", + "backendPort": { + "$id": "5248", + "kind": "number", + "type": { + "$ref": "1253" + }, + "value": 80 + }, + "frontendPort": { + "$id": "5249", + "kind": "number", + "type": { + "$ref": "1249" + }, + "value": 80 + }, + "probePort": { + "$id": "5250", + "kind": "number", + "type": { + "$ref": "1260" + }, + "value": 80 + }, + "probeProtocol": { + "$id": "5251", + "kind": "string", + "type": { + "$ref": "140" + }, + "value": "http" + }, + "protocol": { + "$id": "5252", + "kind": "string", + "type": { + "$ref": "134" + }, + "value": "http" + } + } + }, + { + "$id": "5253", + "kind": "model", + "type": { + "$ref": "1247" + }, + "value": { + "$id": "5254", + "backendPort": { + "$id": "5255", + "kind": "number", + "type": { + "$ref": "1253" + }, + "value": 443 + }, + "frontendPort": { + "$id": "5256", + "kind": "number", + "type": { + "$ref": "1249" + }, + "value": 443 + }, + "probePort": { + "$id": "5257", + "kind": "number", + "type": { + "$ref": "1260" + }, + "value": 443 + }, + "probeProtocol": { + "$id": "5258", + "kind": "string", + "type": { + "$ref": "140" + }, + "value": "http" + }, + "protocol": { + "$id": "5259", + "kind": "string", + "type": { + "$ref": "134" + }, + "value": "http" + } + } + }, + { + "$id": "5260", + "kind": "model", + "type": { + "$ref": "1247" + }, + "value": { + "$id": "5261", + "backendPort": { + "$id": "5262", + "kind": "number", + "type": { + "$ref": "1253" + }, + "value": 10000 + }, + "frontendPort": { + "$id": "5263", + "kind": "number", + "type": { + "$ref": "1249" + }, + "value": 10000 + }, + "probePort": { + "$id": "5264", + "kind": "number", + "type": { + "$ref": "1260" + }, + "value": 10000 + }, + "probeProtocol": { + "$id": "5265", + "kind": "string", + "type": { + "$ref": "140" + }, + "value": "http" + }, + "protocol": { + "$id": "5266", + "kind": "string", + "type": { + "$ref": "134" + }, + "value": "tcp" + } + } + } + ] + }, + "networkSecurityRules": { + "$id": "5267", + "kind": "array", + "type": { + "$ref": "1281" + }, + "value": [ + { + "$id": "5268", + "kind": "model", + "type": { + "$ref": "1282" + }, + "value": { + "$id": "5269", + "name": { + "$id": "5270", + "kind": "string", + "type": { + "$ref": "1284" + }, + "value": "TestName" + }, + "description": { + "$id": "5271", + "kind": "string", + "type": { + "$ref": "1288" + }, + "value": "Test description" + }, + "access": { + "$id": "5272", + "kind": "string", + "type": { + "$ref": "164" + }, + "value": "allow" + }, + "destinationAddressPrefixes": { + "$id": "5273", + "kind": "array", + "type": { + "$ref": "1300" + }, + "value": [ + { + "$id": "5274", + "kind": "string", + "type": { + "$ref": "1301" + }, + "value": "*" + } + ] + }, + "destinationPortRanges": { + "$id": "5275", + "kind": "array", + "type": { + "$ref": "1310" + }, + "value": [ + { + "$id": "5276", + "kind": "string", + "type": { + "$ref": "1311" + }, + "value": "*" + } + ] + }, + "direction": { + "$id": "5277", + "kind": "string", + "type": { + "$ref": "170" + }, + "value": "inbound" + }, + "priority": { + "$id": "5278", + "kind": "number", + "type": { + "$ref": "1334" + }, + "value": 1010 + }, + "sourceAddressPrefixes": { + "$id": "5279", + "kind": "array", + "type": { + "$ref": "1295" + }, + "value": [ + { + "$id": "5280", + "kind": "string", + "type": { + "$ref": "1296" + }, + "value": "*" + } + ] + }, + "sourcePortRanges": { + "$id": "5281", + "kind": "array", + "type": { + "$ref": "1305" + }, + "value": [ + { + "$id": "5282", + "kind": "string", + "type": { + "$ref": "1306" + }, + "value": "*" + } + ] + }, + "protocol": { + "$id": "5283", + "kind": "string", + "type": { + "$ref": "148" + }, + "value": "tcp" + } + } + } + ] + }, + "provisioningState": { + "$id": "5284", + "kind": "string", + "type": { + "$ref": "176" + }, + "value": "Succeeded" + } + } + }, + "sku": { + "$id": "5285", + "kind": "model", + "type": { + "$ref": "1617" + }, + "value": { + "$id": "5286", + "name": { + "$id": "5287", + "kind": "string", + "type": { + "$ref": "248" + }, + "value": "Standard" + } + } + }, + "tags": { + "$id": "5288", + "kind": "dict", + "type": { + "$ref": "1192" + }, + "value": { + "$id": "5289", + "a": { + "$id": "5290", + "kind": "string", + "type": { + "$ref": "1194" + }, + "value": "b" + } + } + } + } + } + } + ] + } + ] + }, + "parameters": [ + { + "$id": "5291", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "5292", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5293", + "name": "clusterName", + "nameInRequest": "clusterName", + "doc": "The name of the cluster resource.", + "type": { + "$id": "5294", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5295", + "name": "parameters", + "nameInRequest": "properties", + "doc": "The managed cluster resource updated tags.", + "type": { + "$ref": "1623" + }, + "location": "Body", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5296", + "name": "contentType", + "nameInRequest": "contentType", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$ref": "5192" + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5297", + "name": "accept", + "nameInRequest": "accept", + "type": { + "$ref": "5195" + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "response": { + "$id": "5298", + "type": { + "$ref": "1189" + } + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedClusters.update" + }, + { + "$id": "5299", + "kind": "lro", + "name": "delete", + "accessibility": "public", + "apiVersions": [ + "2024-11-01-preview", + "2025-03-01-preview" + ], + "doc": "Delete a Service Fabric managed cluster resource with the specified name.", + "operation": { + "$id": "5300", + "name": "delete", + "resourceName": "ManagedCluster", + "doc": "Delete a Service Fabric managed cluster resource with the specified name.", + "accessibility": "public", + "parameters": [ + { + "$id": "5301", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "5302", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "5303", + "type": { + "$id": "5304", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-03-01-preview" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5305", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "5306", + "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": "5307", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "5308", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5309", + "name": "clusterName", + "nameInRequest": "clusterName", + "doc": "The name of the cluster resource.", + "type": { + "$id": "5310", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5311", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "5312", + "kind": "constant", + "valueType": { + "$id": "5313", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "5314", + "statusCodes": [ + 202 + ], + "headers": [ + { + "$id": "5315", + "name": "azureAsyncOperation", + "nameInResponse": "Azure-AsyncOperation", + "doc": "A link to the status monitor", + "type": { + "$id": "5316", + "kind": "url", + "name": "ResourceLocation", + "crossLanguageDefinitionId": "TypeSpec.Rest.ResourceLocation", + "baseType": { + "$id": "5317", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url", + "decorators": [] + }, + "decorators": [] + } + }, + { + "$id": "5318", + "name": "location", + "nameInResponse": "Location", + "doc": "The Location header contains the URL where the status of the long running operation can be checked.", + "type": { + "$id": "5319", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + } + ], + "isErrorResponse": false + }, + { + "$id": "5320", + "statusCodes": [ + 204 + ], + "headers": [], + "isErrorResponse": false + } + ], + "httpMethod": "DELETE", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}", + "bufferResponse": true, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedClusters.delete", + "decorators": [], + "examples": [ + { + "$id": "5321", + "kind": "http", + "name": "Delete a cluster", + "description": "Delete a cluster", + "filePath": "2025-03-01-preview/ManagedClusterDeleteOperation_example.json", + "parameters": [ + { + "$id": "5322", + "parameter": { + "$ref": "5301" + }, + "value": { + "$id": "5323", + "kind": "string", + "type": { + "$ref": "5302" + }, + "value": "2025-03-01-preview" + } + }, + { + "$id": "5324", + "parameter": { + "$ref": "5309" + }, + "value": { + "$id": "5325", + "kind": "string", + "type": { + "$ref": "5310" + }, + "value": "myCluster" + } + }, + { + "$id": "5326", + "parameter": { + "$ref": "5307" + }, + "value": { + "$id": "5327", + "kind": "string", + "type": { + "$ref": "5308" + }, + "value": "resRg" + } + }, + { + "$id": "5328", + "parameter": { + "$ref": "5305" + }, + "value": { + "$id": "5329", + "kind": "string", + "type": { + "$ref": "5306" + }, + "value": "00000000-0000-0000-0000-000000000000" + } + } + ], + "responses": [ + { + "$id": "5330", + "response": { + "$ref": "5314" + }, + "statusCode": 202 + }, + { + "$id": "5331", + "response": { + "$ref": "5320" + }, + "statusCode": 204 + } + ] + } + ] + }, + "parameters": [ + { + "$id": "5332", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "5333", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5334", + "name": "clusterName", + "nameInRequest": "clusterName", + "doc": "The name of the cluster resource.", + "type": { + "$id": "5335", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5336", + "name": "accept", + "nameInRequest": "accept", + "type": { + "$id": "5337", + "kind": "constant", + "valueType": { + "$id": "5338", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "response": { + "$id": "5339" + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedClusters.delete", + "lroMetadata": { + "$id": "5340", + "finalStateVia": 1, + "finalResponse": { + "$id": "5341", + "statusCodes": [ + 204 + ] + } + } + }, + { + "$id": "5342", + "kind": "paging", + "name": "listByResourceGroup", + "accessibility": "public", + "apiVersions": [ + "2024-11-01-preview", + "2025-03-01-preview" + ], + "doc": "Gets all Service Fabric cluster resources created or in the process of being created in the resource group.", + "operation": { + "$id": "5343", + "name": "listByResourceGroup", + "resourceName": "ManagedCluster", + "doc": "Gets all Service Fabric cluster resources created or in the process of being created in the resource group.", + "accessibility": "public", + "parameters": [ + { + "$id": "5344", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "5345", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "5346", + "type": { + "$id": "5347", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-03-01-preview" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5348", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "5349", + "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": "5350", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "5351", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5352", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "5353", + "kind": "constant", + "valueType": { + "$id": "5354", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "5355", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "1630" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "GET", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters", + "bufferResponse": true, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedClusters.listByResourceGroup", + "decorators": [], + "examples": [ + { + "$id": "5356", + "kind": "http", + "name": "List cluster by resource group", + "description": "List cluster by resource group", + "filePath": "2025-03-01-preview/ManagedClusterListByResourceGroupOperation_example.json", + "parameters": [ + { + "$id": "5357", + "parameter": { + "$ref": "5344" + }, + "value": { + "$id": "5358", + "kind": "string", + "type": { + "$ref": "5345" + }, + "value": "2025-03-01-preview" + } + }, + { + "$id": "5359", + "parameter": { + "$ref": "5350" + }, + "value": { + "$id": "5360", + "kind": "string", + "type": { + "$ref": "5351" + }, + "value": "resRg" + } + }, + { + "$id": "5361", + "parameter": { + "$ref": "5348" + }, + "value": { + "$id": "5362", + "kind": "string", + "type": { + "$ref": "5349" + }, + "value": "00000000-0000-0000-0000-000000000000" + } + } + ], + "responses": [ + { + "$id": "5363", + "response": { + "$ref": "5355" + }, + "statusCode": 200, + "bodyValue": { + "$id": "5364", + "kind": "model", + "type": { + "$ref": "1630" + }, + "value": { + "$id": "5365", + "nextLink": { + "$id": "5366", + "kind": "string", + "type": { + "$ref": "1636" + }, + "value": "http://examplelink.com" + }, + "value": { + "$id": "5367", + "kind": "array", + "type": { + "$ref": "1632" + }, + "value": [ + { + "$id": "5368", + "kind": "model", + "type": { + "$ref": "1189" + }, + "value": { + "$id": "5369", + "name": { + "$id": "5370", + "kind": "string", + "type": { + "$ref": "457" + }, + "value": "myCluster" + }, + "type": { + "$id": "5371", + "kind": "string", + "type": { + "$ref": "461" + }, + "value": "Microsoft.ServiceFabric/managedClusters" + }, + "etag": { + "$id": "5372", + "kind": "string", + "type": { + "$ref": "1613" + }, + "value": "W/\"636462502169240745\"" + }, + "id": { + "$id": "5373", + "kind": "string", + "type": { + "$ref": "453" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/managedClusters/myCluster" + }, + "location": { + "$id": "5374", + "kind": "string", + "type": { + "$ref": "1198" + }, + "value": "eastus" + }, + "properties": { + "$id": "5375", + "kind": "model", + "type": { + "$ref": "1202" + }, + "value": { + "$id": "5376", + "adminUserName": { + "$id": "5377", + "kind": "string", + "type": { + "$ref": "1238" + }, + "value": "vmadmin" + }, + "clientConnectionPort": { + "$id": "5378", + "kind": "number", + "type": { + "$ref": "1230" + }, + "value": 19000 + }, + "clusterCertificateThumbprints": { + "$id": "5379", + "kind": "array", + "type": { + "$ref": "1225" + }, + "value": [ + { + "$id": "5380", + "kind": "string", + "type": { + "$ref": "1226" + }, + "value": "12599211F8F14C90AFA9532AD79A6F2CA1C00622" + } + ] + }, + "clusterCodeVersion": { + "$id": "5381", + "kind": "string", + "type": { + "$ref": "1406" + }, + "value": "7.1.168.9494" + }, + "clusterId": { + "$id": "5382", + "kind": "string", + "type": { + "$ref": "1217" + }, + "value": "92584666-9889-4ae8-8d02-91902923d37f" + }, + "clusterState": { + "$id": "5383", + "kind": "string", + "type": { + "$ref": "120" + }, + "value": "WaitingForNodes" + }, + "clusterUpgradeCadence": { + "$id": "5384", + "kind": "string", + "type": { + "$ref": "204" + }, + "value": "Wave0" + }, + "clusterUpgradeMode": { + "$id": "5385", + "kind": "string", + "type": { + "$ref": "198" + }, + "value": "Automatic" + }, + "dnsName": { + "$id": "5386", + "kind": "string", + "type": { + "$ref": "1204" + }, + "value": "myCluster" + }, + "fabricSettings": { + "$id": "5387", + "kind": "array", + "type": { + "$ref": "1381" + }, + "value": [ + { + "$id": "5388", + "kind": "model", + "type": { + "$ref": "1382" + }, + "value": { + "$id": "5389", + "name": { + "$id": "5390", + "kind": "string", + "type": { + "$ref": "1384" + }, + "value": "ManagedIdentityTokenService" + }, + "parameters": { + "$id": "5391", + "kind": "array", + "type": { + "$ref": "1388" + }, + "value": [ + { + "$id": "5392", + "kind": "model", + "type": { + "$ref": "1389" + }, + "value": { + "$id": "5393", + "name": { + "$id": "5394", + "kind": "string", + "type": { + "$ref": "1391" + }, + "value": "IsEnabled" + }, + "value": { + "$id": "5395", + "kind": "string", + "type": { + "$ref": "1395" + }, + "value": "true" + } + } + } + ] + } + } + } + ] + }, + "fqdn": { + "$id": "5396", + "kind": "string", + "type": { + "$ref": "1208" + }, + "value": "MyCluster.eastus.cloudapp.azure.com" + }, + "httpGatewayConnectionPort": { + "$id": "5397", + "kind": "number", + "type": { + "$ref": "1234" + }, + "value": 19080 + }, + "loadBalancingRules": { + "$id": "5398", + "kind": "array", + "type": { + "$ref": "1246" + }, + "value": [] + }, + "provisioningState": { + "$id": "5399", + "kind": "string", + "type": { + "$ref": "176" + }, + "value": "Succeeded" + } + } + }, + "sku": { + "$id": "5400", + "kind": "model", + "type": { + "$ref": "1617" + }, + "value": { + "$id": "5401", + "name": { + "$id": "5402", + "kind": "string", + "type": { + "$ref": "248" + }, + "value": "Standard" + } + } + }, + "tags": { + "$id": "5403", + "kind": "dict", + "type": { + "$ref": "1192" + }, + "value": { + "$id": "5404" + } + } + } + }, + { + "$id": "5405", + "kind": "model", + "type": { + "$ref": "1189" + }, + "value": { + "$id": "5406", + "name": { + "$id": "5407", + "kind": "string", + "type": { + "$ref": "457" + }, + "value": "myCluster2" + }, + "type": { + "$id": "5408", + "kind": "string", + "type": { + "$ref": "461" + }, + "value": "Microsoft.ServiceFabric/managedClusters" + }, + "etag": { + "$id": "5409", + "kind": "string", + "type": { + "$ref": "1613" + }, + "value": "W/\"636462502164040075\"" + }, + "id": { + "$id": "5410", + "kind": "string", + "type": { + "$ref": "453" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/managedClusters/myCluster2" + }, + "location": { + "$id": "5411", + "kind": "string", + "type": { + "$ref": "1198" + }, + "value": "eastus" + }, + "properties": { + "$id": "5412", + "kind": "model", + "type": { + "$ref": "1202" + }, + "value": { + "$id": "5413", + "adminUserName": { + "$id": "5414", + "kind": "string", + "type": { + "$ref": "1238" + }, + "value": "vmadmin" + }, + "clientConnectionPort": { + "$id": "5415", + "kind": "number", + "type": { + "$ref": "1230" + }, + "value": 19000 + }, + "clusterCertificateThumbprints": { + "$id": "5416", + "kind": "array", + "type": { + "$ref": "1225" + }, + "value": [ + { + "$id": "5417", + "kind": "string", + "type": { + "$ref": "1226" + }, + "value": "12599211F8F14C90AFA9532AD79A6F2CA1C00622" + } + ] + }, + "clusterCodeVersion": { + "$id": "5418", + "kind": "string", + "type": { + "$ref": "1406" + }, + "value": "7.1.168.9494" + }, + "clusterId": { + "$id": "5419", + "kind": "string", + "type": { + "$ref": "1217" + }, + "value": "2747e469-b24e-4039-8a0a-46151419523f" + }, + "clusterState": { + "$id": "5420", + "kind": "string", + "type": { + "$ref": "120" + }, + "value": "WaitingForNodes" + }, + "clusterUpgradeCadence": { + "$id": "5421", + "kind": "string", + "type": { + "$ref": "204" + }, + "value": "Wave0" + }, + "clusterUpgradeMode": { + "$id": "5422", + "kind": "string", + "type": { + "$ref": "198" + }, + "value": "Automatic" + }, + "dnsName": { + "$id": "5423", + "kind": "string", + "type": { + "$ref": "1204" + }, + "value": "myCluster2" + }, + "fabricSettings": { + "$id": "5424", + "kind": "array", + "type": { + "$ref": "1381" + }, + "value": [ + { + "$id": "5425", + "kind": "model", + "type": { + "$ref": "1382" + }, + "value": { + "$id": "5426", + "name": { + "$id": "5427", + "kind": "string", + "type": { + "$ref": "1384" + }, + "value": "ManagedIdentityTokenService" + }, + "parameters": { + "$id": "5428", + "kind": "array", + "type": { + "$ref": "1388" + }, + "value": [ + { + "$id": "5429", + "kind": "model", + "type": { + "$ref": "1389" + }, + "value": { + "$id": "5430", + "name": { + "$id": "5431", + "kind": "string", + "type": { + "$ref": "1391" + }, + "value": "IsEnabled" + }, + "value": { + "$id": "5432", + "kind": "string", + "type": { + "$ref": "1395" + }, + "value": "true" + } + } + } + ] + } + } + } + ] + }, + "fqdn": { + "$id": "5433", + "kind": "string", + "type": { + "$ref": "1208" + }, + "value": "MyCluster.eastus.cloudapp.azure.com" + }, + "httpGatewayConnectionPort": { + "$id": "5434", + "kind": "number", + "type": { + "$ref": "1234" + }, + "value": 19080 + }, + "loadBalancingRules": { + "$id": "5435", + "kind": "array", + "type": { + "$ref": "1246" + }, + "value": [] + }, + "provisioningState": { + "$id": "5436", + "kind": "string", + "type": { + "$ref": "176" + }, + "value": "Succeeded" + } + } + }, + "sku": { + "$id": "5437", + "kind": "model", + "type": { + "$ref": "1617" + }, + "value": { + "$id": "5438", + "name": { + "$id": "5439", + "kind": "string", + "type": { + "$ref": "248" + }, + "value": "Standard" + } + } + }, + "tags": { + "$id": "5440", + "kind": "dict", + "type": { + "$ref": "1192" + }, + "value": { + "$id": "5441" + } + } + } + } + ] + } + } + } + } + ] + } + ] + }, + "parameters": [ + { + "$id": "5442", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "5443", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5444", + "name": "accept", + "nameInRequest": "accept", + "type": { + "$ref": "5353" + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "response": { + "$id": "5445", + "type": { + "$id": "5446", + "kind": "array", + "name": "ArrayManagedCluster", + "valueType": { + "$ref": "1189" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "resultSegments": [ + "value" + ] + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedClusters.listByResourceGroup", + "pagingMetadata": { + "$id": "5447", + "itemPropertySegments": [ + "value" + ], + "nextLink": { + "$id": "5448", + "responseSegments": [ + "nextLink" + ], + "responseLocation": "Body" + } + } + }, + { + "$id": "5449", + "kind": "paging", + "name": "listBySubscription", + "accessibility": "public", + "apiVersions": [ + "2024-11-01-preview", + "2025-03-01-preview" + ], + "doc": "Gets all Service Fabric cluster resources created or in the process of being created in the subscription.", + "operation": { + "$id": "5450", + "name": "listBySubscription", + "resourceName": "ManagedCluster", + "doc": "Gets all Service Fabric cluster resources created or in the process of being created in the subscription.", + "accessibility": "public", + "parameters": [ + { + "$id": "5451", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "5452", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "5453", + "type": { + "$id": "5454", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-03-01-preview" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5455", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "5456", + "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": "5457", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "5458", + "kind": "constant", + "valueType": { + "$id": "5459", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "5460", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "1630" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "GET", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/providers/Microsoft.ServiceFabric/managedClusters", + "bufferResponse": true, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedClusters.listBySubscription", + "decorators": [], + "examples": [ + { + "$id": "5461", + "kind": "http", + "name": "List managed clusters", + "description": "List managed clusters", + "filePath": "2025-03-01-preview/ManagedClusterListBySubscriptionOperation_example.json", + "parameters": [ + { + "$id": "5462", + "parameter": { + "$ref": "5451" + }, + "value": { + "$id": "5463", + "kind": "string", + "type": { + "$ref": "5452" + }, + "value": "2025-03-01-preview" + } + }, + { + "$id": "5464", + "parameter": { + "$ref": "5455" + }, + "value": { + "$id": "5465", + "kind": "string", + "type": { + "$ref": "5456" + }, + "value": "00000000-0000-0000-0000-000000000000" + } + } + ], + "responses": [ + { + "$id": "5466", + "response": { + "$ref": "5460" + }, + "statusCode": 200, + "bodyValue": { + "$id": "5467", + "kind": "model", + "type": { + "$ref": "1630" + }, + "value": { + "$id": "5468", + "nextLink": { + "$id": "5469", + "kind": "string", + "type": { + "$ref": "1636" + }, + "value": "http://examplelink.com" + }, + "value": { + "$id": "5470", + "kind": "array", + "type": { + "$ref": "1632" + }, + "value": [ + { + "$id": "5471", + "kind": "model", + "type": { + "$ref": "1189" + }, + "value": { + "$id": "5472", + "name": { + "$id": "5473", + "kind": "string", + "type": { + "$ref": "457" + }, + "value": "myCluster" + }, + "type": { + "$id": "5474", + "kind": "string", + "type": { + "$ref": "461" + }, + "value": "Microsoft.ServiceFabric/managedClusters" + }, + "etag": { + "$id": "5475", + "kind": "string", + "type": { + "$ref": "1613" + }, + "value": "W/\"636462502169240745\"" + }, + "id": { + "$id": "5476", + "kind": "string", + "type": { + "$ref": "453" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/managedClusters/myCluster" + }, + "location": { + "$id": "5477", + "kind": "string", + "type": { + "$ref": "1198" + }, + "value": "eastus" + }, + "properties": { + "$id": "5478", + "kind": "model", + "type": { + "$ref": "1202" + }, + "value": { + "$id": "5479", + "adminUserName": { + "$id": "5480", + "kind": "string", + "type": { + "$ref": "1238" + }, + "value": "vmadmin" + }, + "clientConnectionPort": { + "$id": "5481", + "kind": "number", + "type": { + "$ref": "1230" + }, + "value": 19000 + }, + "clusterCertificateThumbprints": { + "$id": "5482", + "kind": "array", + "type": { + "$ref": "1225" + }, + "value": [ + { + "$id": "5483", + "kind": "string", + "type": { + "$ref": "1226" + }, + "value": "12599211F8F14C90AFA9532AD79A6F2CA1C00622" + } + ] + }, + "clusterCodeVersion": { + "$id": "5484", + "kind": "string", + "type": { + "$ref": "1406" + }, + "value": "7.1.168.9494" + }, + "clusterId": { + "$id": "5485", + "kind": "string", + "type": { + "$ref": "1217" + }, + "value": "92584666-9889-4ae8-8d02-91902923d37f" + }, + "clusterState": { + "$id": "5486", + "kind": "string", + "type": { + "$ref": "120" + }, + "value": "WaitingForNodes" + }, + "clusterUpgradeCadence": { + "$id": "5487", + "kind": "string", + "type": { + "$ref": "204" + }, + "value": "Wave0" + }, + "clusterUpgradeMode": { + "$id": "5488", + "kind": "string", + "type": { + "$ref": "198" + }, + "value": "Automatic" + }, + "dnsName": { + "$id": "5489", + "kind": "string", + "type": { + "$ref": "1204" + }, + "value": "myCluster" + }, + "fabricSettings": { + "$id": "5490", + "kind": "array", + "type": { + "$ref": "1381" + }, + "value": [ + { + "$id": "5491", + "kind": "model", + "type": { + "$ref": "1382" + }, + "value": { + "$id": "5492", + "name": { + "$id": "5493", + "kind": "string", + "type": { + "$ref": "1384" + }, + "value": "ManagedIdentityTokenService" + }, + "parameters": { + "$id": "5494", + "kind": "array", + "type": { + "$ref": "1388" + }, + "value": [ + { + "$id": "5495", + "kind": "model", + "type": { + "$ref": "1389" + }, + "value": { + "$id": "5496", + "name": { + "$id": "5497", + "kind": "string", + "type": { + "$ref": "1391" + }, + "value": "IsEnabled" + }, + "value": { + "$id": "5498", + "kind": "string", + "type": { + "$ref": "1395" + }, + "value": "true" + } + } + } + ] + } + } + } + ] + }, + "fqdn": { + "$id": "5499", + "kind": "string", + "type": { + "$ref": "1208" + }, + "value": "MyCluster.eastus.cloudapp.azure.com" + }, + "httpGatewayConnectionPort": { + "$id": "5500", + "kind": "number", + "type": { + "$ref": "1234" + }, + "value": 19080 + }, + "loadBalancingRules": { + "$id": "5501", + "kind": "array", + "type": { + "$ref": "1246" + }, + "value": [] + }, + "provisioningState": { + "$id": "5502", + "kind": "string", + "type": { + "$ref": "176" + }, + "value": "Succeeded" + } + } + }, + "sku": { + "$id": "5503", + "kind": "model", + "type": { + "$ref": "1617" + }, + "value": { + "$id": "5504", + "name": { + "$id": "5505", + "kind": "string", + "type": { + "$ref": "248" + }, + "value": "Standard" + } + } + }, + "tags": { + "$id": "5506", + "kind": "dict", + "type": { + "$ref": "1192" + }, + "value": { + "$id": "5507" + } + } + } + }, + { + "$id": "5508", + "kind": "model", + "type": { + "$ref": "1189" + }, + "value": { + "$id": "5509", + "name": { + "$id": "5510", + "kind": "string", + "type": { + "$ref": "457" + }, + "value": "myCluster2" + }, + "type": { + "$id": "5511", + "kind": "string", + "type": { + "$ref": "461" + }, + "value": "Microsoft.ServiceFabric/managedClusters" + }, + "etag": { + "$id": "5512", + "kind": "string", + "type": { + "$ref": "1613" + }, + "value": "W/\"636462502164040075\"" + }, + "id": { + "$id": "5513", + "kind": "string", + "type": { + "$ref": "453" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/managedClusters/myCluster2" + }, + "location": { + "$id": "5514", + "kind": "string", + "type": { + "$ref": "1198" + }, + "value": "eastus" + }, + "properties": { + "$id": "5515", + "kind": "model", + "type": { + "$ref": "1202" + }, + "value": { + "$id": "5516", + "adminUserName": { + "$id": "5517", + "kind": "string", + "type": { + "$ref": "1238" + }, + "value": "vmadmin" + }, + "clientConnectionPort": { + "$id": "5518", + "kind": "number", + "type": { + "$ref": "1230" + }, + "value": 19000 + }, + "clusterCertificateThumbprints": { + "$id": "5519", + "kind": "array", + "type": { + "$ref": "1225" + }, + "value": [ + { + "$id": "5520", + "kind": "string", + "type": { + "$ref": "1226" + }, + "value": "12599211F8F14C90AFA9532AD79A6F2CA1C00622" + } + ] + }, + "clusterCodeVersion": { + "$id": "5521", + "kind": "string", + "type": { + "$ref": "1406" + }, + "value": "7.1.168.9494" + }, + "clusterId": { + "$id": "5522", + "kind": "string", + "type": { + "$ref": "1217" + }, + "value": "2747e469-b24e-4039-8a0a-46151419523f" + }, + "clusterState": { + "$id": "5523", + "kind": "string", + "type": { + "$ref": "120" + }, + "value": "WaitingForNodes" + }, + "clusterUpgradeCadence": { + "$id": "5524", + "kind": "string", + "type": { + "$ref": "204" + }, + "value": "Wave0" + }, + "clusterUpgradeMode": { + "$id": "5525", + "kind": "string", + "type": { + "$ref": "198" + }, + "value": "Automatic" + }, + "dnsName": { + "$id": "5526", + "kind": "string", + "type": { + "$ref": "1204" + }, + "value": "myCluster2" + }, + "fabricSettings": { + "$id": "5527", + "kind": "array", + "type": { + "$ref": "1381" + }, + "value": [ + { + "$id": "5528", + "kind": "model", + "type": { + "$ref": "1382" + }, + "value": { + "$id": "5529", + "name": { + "$id": "5530", + "kind": "string", + "type": { + "$ref": "1384" + }, + "value": "ManagedIdentityTokenService" + }, + "parameters": { + "$id": "5531", + "kind": "array", + "type": { + "$ref": "1388" + }, + "value": [ + { + "$id": "5532", + "kind": "model", + "type": { + "$ref": "1389" + }, + "value": { + "$id": "5533", + "name": { + "$id": "5534", + "kind": "string", + "type": { + "$ref": "1391" + }, + "value": "IsEnabled" + }, + "value": { + "$id": "5535", + "kind": "string", + "type": { + "$ref": "1395" + }, + "value": "true" + } + } + } + ] + } + } + } + ] + }, + "fqdn": { + "$id": "5536", + "kind": "string", + "type": { + "$ref": "1208" + }, + "value": "MyCluster.eastus.cloudapp.azure.com" + }, + "httpGatewayConnectionPort": { + "$id": "5537", + "kind": "number", + "type": { + "$ref": "1234" + }, + "value": 19080 + }, + "loadBalancingRules": { + "$id": "5538", + "kind": "array", + "type": { + "$ref": "1246" + }, + "value": [] + }, + "provisioningState": { + "$id": "5539", + "kind": "string", + "type": { + "$ref": "176" + }, + "value": "Succeeded" + } + } + }, + "sku": { + "$id": "5540", + "kind": "model", + "type": { + "$ref": "1617" + }, + "value": { + "$id": "5541", + "name": { + "$id": "5542", + "kind": "string", + "type": { + "$ref": "248" + }, + "value": "Standard" + } + } + }, + "tags": { + "$id": "5543", + "kind": "dict", + "type": { + "$ref": "1192" + }, + "value": { + "$id": "5544" + } + } + } + } + ] + } + } + } + } + ] + } + ] + }, + "parameters": [ + { + "$id": "5545", + "name": "accept", + "nameInRequest": "accept", + "type": { + "$ref": "5458" + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "response": { + "$id": "5546", + "type": { + "$id": "5547", + "kind": "array", + "name": "ArrayManagedCluster", + "valueType": { + "$ref": "1189" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "resultSegments": [ + "value" + ] + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedClusters.listBySubscription", + "pagingMetadata": { + "$id": "5548", + "itemPropertySegments": [ + "value" + ], + "nextLink": { + "$id": "5549", + "responseSegments": [ + "nextLink" + ], + "responseLocation": "Body" + } + } + }, + { + "$id": "5550", + "kind": "basic", + "name": "getFaultSimulation", + "accessibility": "public", + "apiVersions": [ + "2024-11-01-preview", + "2025-03-01-preview" + ], + "doc": "Gets a fault simulation by the simulationId.", + "operation": { + "$id": "5551", + "name": "getFaultSimulation", + "resourceName": "ManagedClusters", + "doc": "Gets a fault simulation by the simulationId.", + "accessibility": "public", + "parameters": [ + { + "$id": "5552", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "5553", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "5554", + "type": { + "$id": "5555", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-03-01-preview" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5556", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "5557", + "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": "5558", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "5559", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5560", + "name": "clusterName", + "nameInRequest": "clusterName", + "doc": "The name of the cluster resource.", + "type": { + "$id": "5561", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5562", + "name": "contentType", + "nameInRequest": "Content-Type", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$id": "5563", + "kind": "constant", + "valueType": { + "$id": "5564", + "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": "5565", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "5566", + "kind": "constant", + "valueType": { + "$id": "5567", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "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": "5568", + "name": "parameters", + "nameInRequest": "parameters", + "doc": "parameter with fault simulation id.", + "type": { + "$ref": "1640" + }, + "location": "Body", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "5569", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "1645" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "POST", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/getFaultSimulation", + "requestMediaTypes": [ + "application/json" + ], + "bufferResponse": true, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedClusters.getFaultSimulation", + "decorators": [] + }, + "parameters": [ + { + "$id": "5570", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "5571", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5572", + "name": "clusterName", + "nameInRequest": "clusterName", + "doc": "The name of the cluster resource.", + "type": { + "$id": "5573", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5574", + "name": "parameters", + "nameInRequest": "body", + "doc": "parameter with fault simulation id.", + "type": { + "$ref": "1640" + }, + "location": "Body", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5575", + "name": "contentType", + "nameInRequest": "contentType", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$ref": "5563" + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5576", + "name": "accept", + "nameInRequest": "accept", + "type": { + "$ref": "5566" + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "response": { + "$id": "5577", + "type": { + "$ref": "1645" + } + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedClusters.getFaultSimulation" + }, + { + "$id": "5578", + "kind": "paging", + "name": "listFaultSimulation", + "accessibility": "public", + "apiVersions": [ + "2024-11-01-preview", + "2025-03-01-preview" + ], + "doc": "Gets the list of recent fault simulations for the cluster.", + "operation": { + "$id": "5579", + "name": "listFaultSimulation", + "resourceName": "ManagedClusters", + "doc": "Gets the list of recent fault simulations for the cluster.", + "accessibility": "public", + "parameters": [ + { + "$id": "5580", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "5581", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "5582", + "type": { + "$id": "5583", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-03-01-preview" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5584", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "5585", + "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": "5586", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "5587", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5588", + "name": "clusterName", + "nameInRequest": "clusterName", + "doc": "The name of the cluster resource.", + "type": { + "$id": "5589", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5590", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "5591", + "kind": "constant", + "valueType": { + "$id": "5592", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "5593", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "1726" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "POST", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/listFaultSimulation", + "bufferResponse": true, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedClusters.listFaultSimulation", + "decorators": [] + }, + "parameters": [ + { + "$id": "5594", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "5595", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5596", + "name": "clusterName", + "nameInRequest": "clusterName", + "doc": "The name of the cluster resource.", + "type": { + "$id": "5597", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5598", + "name": "accept", + "nameInRequest": "accept", + "type": { + "$ref": "5591" + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "response": { + "$id": "5599", + "type": { + "$id": "5600", + "kind": "array", + "name": "ArrayFaultSimulation", + "valueType": { + "$ref": "1645" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "resultSegments": [ + "value" + ] + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedClusters.listFaultSimulation", + "pagingMetadata": { + "$id": "5601", + "itemPropertySegments": [ + "value" + ], + "nextLink": { + "$id": "5602", + "responseSegments": [ + "nextLink" + ], + "responseLocation": "Body" + } + } + }, + { + "$id": "5603", + "kind": "lro", + "name": "startFaultSimulation", + "accessibility": "public", + "apiVersions": [ + "2024-11-01-preview", + "2025-03-01-preview" + ], + "doc": "Starts a fault simulation on the cluster.", + "operation": { + "$id": "5604", + "name": "startFaultSimulation", + "resourceName": "ManagedClusters", + "doc": "Starts a fault simulation on the cluster.", + "accessibility": "public", + "parameters": [ + { + "$id": "5605", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "5606", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "5607", + "type": { + "$id": "5608", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-03-01-preview" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5609", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "5610", + "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": "5611", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "5612", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5613", + "name": "clusterName", + "nameInRequest": "clusterName", + "doc": "The name of the cluster resource.", + "type": { + "$id": "5614", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5615", + "name": "contentType", + "nameInRequest": "Content-Type", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$id": "5616", + "kind": "constant", + "valueType": { + "$id": "5617", + "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": "5618", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "5619", + "kind": "constant", + "valueType": { + "$id": "5620", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "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": "5621", + "name": "parameters", + "nameInRequest": "parameters", + "doc": "parameters describing the fault simulation.", + "type": { + "$ref": "1736" + }, + "location": "Body", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "5622", + "statusCodes": [ + 202 + ], + "headers": [ + { + "$id": "5623", + "name": "location", + "nameInResponse": "Location", + "doc": "The Location header contains the URL where the status of the long running operation can be checked.", + "type": { + "$id": "5624", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + { + "$id": "5625", + "name": "azureAsyncOperation", + "nameInResponse": "Azure-AsyncOperation", + "doc": "A link to the status monitor", + "type": { + "$id": "5626", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + } + ], + "isErrorResponse": false + } + ], + "httpMethod": "POST", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/startFaultSimulation", + "requestMediaTypes": [ + "application/json" + ], + "bufferResponse": true, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedClusters.startFaultSimulation", + "decorators": [] + }, + "parameters": [ + { + "$id": "5627", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "5628", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5629", + "name": "clusterName", + "nameInRequest": "clusterName", + "doc": "The name of the cluster resource.", + "type": { + "$id": "5630", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5631", + "name": "parameters", + "nameInRequest": "body", + "doc": "parameters describing the fault simulation.", + "type": { + "$ref": "1736" + }, + "location": "Body", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5632", + "name": "contentType", + "nameInRequest": "contentType", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$id": "5633", + "kind": "constant", + "valueType": { + "$id": "5634", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "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": "5635", + "name": "accept", + "nameInRequest": "accept", + "type": { + "$id": "5636", + "kind": "constant", + "valueType": { + "$id": "5637", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "response": { + "$id": "5638", + "type": { + "$ref": "1645" + } + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedClusters.startFaultSimulation", + "lroMetadata": { + "$id": "5639", + "finalStateVia": 1, + "finalResponse": { + "$id": "5640", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "1645" + } + } + } + }, + { + "$id": "5641", + "kind": "lro", + "name": "stopFaultSimulation", + "accessibility": "public", + "apiVersions": [ + "2024-11-01-preview", + "2025-03-01-preview" + ], + "doc": "Stops a fault simulation on the cluster.", + "operation": { + "$id": "5642", + "name": "stopFaultSimulation", + "resourceName": "ManagedClusters", + "doc": "Stops a fault simulation on the cluster.", + "accessibility": "public", + "parameters": [ + { + "$id": "5643", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "5644", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "5645", + "type": { + "$id": "5646", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-03-01-preview" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5647", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "5648", + "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": "5649", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "5650", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5651", + "name": "clusterName", + "nameInRequest": "clusterName", + "doc": "The name of the cluster resource.", + "type": { + "$id": "5652", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5653", + "name": "contentType", + "nameInRequest": "Content-Type", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$id": "5654", + "kind": "constant", + "valueType": { + "$id": "5655", + "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": "5656", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "5657", + "kind": "constant", + "valueType": { + "$id": "5658", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "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": "5659", + "name": "parameters", + "nameInRequest": "parameters", + "doc": "parameter with fault simulation id.", + "type": { + "$ref": "1640" + }, + "location": "Body", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "5660", + "statusCodes": [ + 202 + ], + "headers": [ + { + "$id": "5661", + "name": "location", + "nameInResponse": "Location", + "doc": "The Location header contains the URL where the status of the long running operation can be checked.", + "type": { + "$id": "5662", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + { + "$id": "5663", + "name": "azureAsyncOperation", + "nameInResponse": "Azure-AsyncOperation", + "doc": "A link to the status monitor", + "type": { + "$id": "5664", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + } + ], + "isErrorResponse": false + } + ], + "httpMethod": "POST", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/stopFaultSimulation", + "requestMediaTypes": [ + "application/json" + ], + "bufferResponse": true, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedClusters.stopFaultSimulation", + "decorators": [] + }, + "parameters": [ + { + "$id": "5665", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "5666", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5667", + "name": "clusterName", + "nameInRequest": "clusterName", + "doc": "The name of the cluster resource.", + "type": { + "$id": "5668", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5669", + "name": "parameters", + "nameInRequest": "body", + "doc": "parameter with fault simulation id.", + "type": { + "$ref": "1640" + }, + "location": "Body", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5670", + "name": "contentType", + "nameInRequest": "contentType", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$id": "5671", + "kind": "constant", + "valueType": { + "$id": "5672", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "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": "5673", + "name": "accept", + "nameInRequest": "accept", + "type": { + "$id": "5674", + "kind": "constant", + "valueType": { + "$id": "5675", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "response": { + "$id": "5676", + "type": { + "$ref": "1645" + } + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedClusters.stopFaultSimulation", + "lroMetadata": { + "$id": "5677", + "finalStateVia": 1, + "finalResponse": { + "$id": "5678", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "1645" + } + } + } + } + ], + "parameters": [ + { + "$id": "5679", + "name": "endpoint", + "nameInRequest": "endpoint", + "doc": "Service host", + "type": { + "$id": "5680", + "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": "5681", + "type": { + "$id": "5682", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "https://management.azure.com" + } + } + ], + "decorators": [ + { + "$id": "5683", + "name": "Azure.ResourceManager.@armResourceOperations", + "arguments": { + "$id": "5684" + } + } + ], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedClusters", + "apiVersions": [ + "2024-11-01-preview", + "2025-03-01-preview" + ], + "parent": { + "$ref": "2389" + } + }, + { + "$id": "5685", + "kind": "client", + "name": "ManagedAzResiliencyStatus", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "methods": [ + { + "$id": "5686", + "kind": "basic", + "name": "GetManagedAzResiliencyStatus", + "accessibility": "public", + "apiVersions": [ + "2024-11-01-preview", + "2025-03-01-preview" + ], + "doc": "Action to get Az Resiliency Status of all the Base resources constituting Service Fabric Managed Clusters.", + "operation": { + "$id": "5687", + "name": "GetManagedAzResiliencyStatus", + "resourceName": "ManagedAzResiliencyStatus", + "doc": "Action to get Az Resiliency Status of all the Base resources constituting Service Fabric Managed Clusters.", + "accessibility": "public", + "parameters": [ + { + "$id": "5688", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "5689", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "5690", + "type": { + "$id": "5691", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-03-01-preview" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5692", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "5693", + "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": "5694", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "5695", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5696", + "name": "clusterName", + "nameInRequest": "clusterName", + "doc": "The name of the cluster resource.", + "type": { + "$id": "5697", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5698", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "5699", + "kind": "constant", + "valueType": { + "$id": "5700", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "5701", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "1740" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "POST", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/getazresiliencystatus", + "bufferResponse": true, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedAzResiliencyStatus.get", + "decorators": [], + "examples": [ + { + "$id": "5702", + "kind": "http", + "name": "Az Resiliency status of Base Resources", + "description": "Az Resiliency status of Base Resources", + "filePath": "2025-03-01-preview/managedAzResiliencyStatusGet_example.json", + "parameters": [ + { + "$id": "5703", + "parameter": { + "$ref": "5688" + }, + "value": { + "$id": "5704", + "kind": "string", + "type": { + "$ref": "5689" + }, + "value": "2025-03-01-preview" + } + }, + { + "$id": "5705", + "parameter": { + "$ref": "5696" + }, + "value": { + "$id": "5706", + "kind": "string", + "type": { + "$ref": "5697" + }, + "value": "mycluster1" + } + }, + { + "$id": "5707", + "parameter": { + "$ref": "5694" + }, + "value": { + "$id": "5708", + "kind": "string", + "type": { + "$ref": "5695" + }, + "value": "resourceGroup1" + } + }, + { + "$id": "5709", + "parameter": { + "$ref": "5692" + }, + "value": { + "$id": "5710", + "kind": "string", + "type": { + "$ref": "5693" + }, + "value": "00000000-0000-0000-0000-000000000000" + } + } + ], + "responses": [ + { + "$id": "5711", + "response": { + "$ref": "5701" + }, + "statusCode": 200, + "bodyValue": { + "$id": "5712", + "kind": "model", + "type": { + "$ref": "1740" + }, + "value": { + "$id": "5713", + "baseResourceStatus": { + "$id": "5714", + "kind": "array", + "type": { + "$ref": "1742" + }, + "value": [ + { + "$id": "5715", + "kind": "model", + "type": { + "$ref": "1743" + }, + "value": { + "$id": "5716", + "isZoneResilient": { + "$id": "5717", + "kind": "boolean", + "type": { + "$ref": "1754" + }, + "value": false + }, + "resourceName": { + "$id": "5718", + "kind": "string", + "type": { + "$ref": "1745" + }, + "value": "mycluster1storage" + }, + "resourceType": { + "$id": "5719", + "kind": "string", + "type": { + "$ref": "1749" + }, + "value": "Microsoft.Storage/storageaccounts" + } + } + }, + { + "$id": "5720", + "kind": "model", + "type": { + "$ref": "1743" + }, + "value": { + "$id": "5721", + "isZoneResilient": { + "$id": "5722", + "kind": "boolean", + "type": { + "$ref": "1754" + }, + "value": true + }, + "resourceName": { + "$id": "5723", + "kind": "string", + "type": { + "$ref": "1745" + }, + "value": "PublicIP-mycluster1" + }, + "resourceType": { + "$id": "5724", + "kind": "string", + "type": { + "$ref": "1749" + }, + "value": "Microsoft.Network/publicIPAddress" + } + } + }, + { + "$id": "5725", + "kind": "model", + "type": { + "$ref": "1743" + }, + "value": { + "$id": "5726", + "isZoneResilient": { + "$id": "5727", + "kind": "boolean", + "type": { + "$ref": "1754" + }, + "value": false + }, + "resourceName": { + "$id": "5728", + "kind": "string", + "type": { + "$ref": "1745" + }, + "value": "Primary" + }, + "resourceType": { + "$id": "5729", + "kind": "string", + "type": { + "$ref": "1749" + }, + "value": "Microsoft.Compute/virtualmachinescalesets" + }, + "details": { + "$id": "5730", + "kind": "string", + "type": { + "$ref": "1758" + }, + "value": "Status: InProgress, ZonalNodes: 3, RegionalNodes: 3" + } + } + } + ] + }, + "isClusterZoneResilient": { + "$id": "5731", + "kind": "boolean", + "type": { + "$ref": "1764" + }, + "value": false + } + } + } + } + ] + } + ] + }, + "parameters": [ + { + "$id": "5732", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "5733", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5734", + "name": "clusterName", + "nameInRequest": "clusterName", + "doc": "The name of the cluster resource.", + "type": { + "$id": "5735", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5736", + "name": "accept", + "nameInRequest": "accept", + "type": { + "$ref": "5699" + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "response": { + "$id": "5737", + "type": { + "$ref": "1740" + } + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedAzResiliencyStatus.get" + } + ], + "parameters": [ + { + "$id": "5738", + "name": "endpoint", + "nameInRequest": "endpoint", + "doc": "Service host", + "type": { + "$id": "5739", + "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": "5740", + "type": { + "$id": "5741", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "https://management.azure.com" + } + } + ], + "decorators": [ + { + "$id": "5742", + "name": "Azure.ResourceManager.@armResourceOperations", + "arguments": { + "$id": "5743" + } + } + ], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedAzResiliencyStatus", + "apiVersions": [ + "2024-11-01-preview", + "2025-03-01-preview" + ], + "parent": { + "$ref": "2389" + } + }, + { + "$id": "5744", + "kind": "client", + "name": "ManagedApplyMaintenanceWindow", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "methods": [ + { + "$id": "5745", + "kind": "basic", + "name": "post", + "accessibility": "public", + "apiVersions": [ + "2024-11-01-preview", + "2025-03-01-preview" + ], + "doc": "Action to Apply Maintenance window on the Service Fabric Managed Clusters, right now. Any pending update will be applied.", + "operation": { + "$id": "5746", + "name": "post", + "resourceName": "ManagedApplyMaintenanceWindow", + "doc": "Action to Apply Maintenance window on the Service Fabric Managed Clusters, right now. Any pending update will be applied.", + "accessibility": "public", + "parameters": [ + { + "$id": "5747", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "5748", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "5749", + "type": { + "$id": "5750", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-03-01-preview" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5751", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "5752", + "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": "5753", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "5754", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5755", + "name": "clusterName", + "nameInRequest": "clusterName", + "doc": "The name of the cluster resource.", + "type": { + "$id": "5756", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5757", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "5758", + "kind": "constant", + "valueType": { + "$id": "5759", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "5760", + "statusCodes": [ + 200 + ], + "headers": [], + "isErrorResponse": false + } + ], + "httpMethod": "POST", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applyMaintenanceWindow", + "bufferResponse": true, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedApplyMaintenanceWindow.post", + "decorators": [], + "examples": [ + { + "$id": "5761", + "kind": "http", + "name": "Apply Maintenance Window Status", + "description": "Apply Maintenance Window Status", + "filePath": "2025-03-01-preview/ManagedApplyMaintenanceWindowPost_example.json", + "parameters": [ + { + "$id": "5762", + "parameter": { + "$ref": "5747" + }, + "value": { + "$id": "5763", + "kind": "string", + "type": { + "$ref": "5748" + }, + "value": "2025-03-01-preview" + } + }, + { + "$id": "5764", + "parameter": { + "$ref": "5755" + }, + "value": { + "$id": "5765", + "kind": "string", + "type": { + "$ref": "5756" + }, + "value": "mycluster1" + } + }, + { + "$id": "5766", + "parameter": { + "$ref": "5753" + }, + "value": { + "$id": "5767", + "kind": "string", + "type": { + "$ref": "5754" + }, + "value": "resourceGroup1" + } + }, + { + "$id": "5768", + "parameter": { + "$ref": "5751" + }, + "value": { + "$id": "5769", + "kind": "string", + "type": { + "$ref": "5752" + }, + "value": "00000000-0000-0000-0000-000000000000" + } + } + ], + "responses": [ + { + "$id": "5770", + "response": { + "$ref": "5760" + }, + "statusCode": 200 + } + ] + } + ] + }, + "parameters": [ + { + "$id": "5771", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "5772", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5773", + "name": "clusterName", + "nameInRequest": "clusterName", + "doc": "The name of the cluster resource.", + "type": { + "$id": "5774", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5775", + "name": "accept", + "nameInRequest": "accept", + "type": { + "$ref": "5758" + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "response": { + "$id": "5776" + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedApplyMaintenanceWindow.post" + } + ], + "parameters": [ + { + "$id": "5777", + "name": "endpoint", + "nameInRequest": "endpoint", + "doc": "Service host", + "type": { + "$id": "5778", + "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": "5779", + "type": { + "$id": "5780", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "https://management.azure.com" + } + } + ], + "decorators": [ + { + "$id": "5781", + "name": "Azure.ResourceManager.@armResourceOperations", + "arguments": { + "$id": "5782" + } + } + ], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedApplyMaintenanceWindow", + "apiVersions": [ + "2024-11-01-preview", + "2025-03-01-preview" + ], + "parent": { + "$ref": "2389" + } + }, + { + "$id": "5783", + "kind": "client", + "name": "ManagedMaintenanceWindowStatus", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "methods": [ + { + "$id": "5784", + "kind": "basic", + "name": "get", + "accessibility": "public", + "apiVersions": [ + "2024-11-01-preview", + "2025-03-01-preview" + ], + "doc": "Action to get Maintenance Window Status of the Service Fabric Managed Clusters.", + "operation": { + "$id": "5785", + "name": "get", + "resourceName": "ManagedMaintenanceWindowStatus", + "doc": "Action to get Maintenance Window Status of the Service Fabric Managed Clusters.", + "accessibility": "public", + "parameters": [ + { + "$id": "5786", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "5787", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "5788", + "type": { + "$id": "5789", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-03-01-preview" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5790", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "5791", + "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": "5792", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "5793", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5794", + "name": "clusterName", + "nameInRequest": "clusterName", + "doc": "The name of the cluster resource.", + "type": { + "$id": "5795", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5796", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "5797", + "kind": "constant", + "valueType": { + "$id": "5798", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "5799", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "1767" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "POST", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/getMaintenanceWindowStatus", + "bufferResponse": true, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedMaintenanceWindowStatus.get", + "decorators": [], + "examples": [ + { + "$id": "5800", + "kind": "http", + "name": "Get Maintenance Window Status", + "description": "Get Maintenance Window Status", + "filePath": "2025-03-01-preview/ManagedMaintenanceWindowStatusGet_example.json", + "parameters": [ + { + "$id": "5801", + "parameter": { + "$ref": "5786" + }, + "value": { + "$id": "5802", + "kind": "string", + "type": { + "$ref": "5787" + }, + "value": "2025-03-01-preview" + } + }, + { + "$id": "5803", + "parameter": { + "$ref": "5794" + }, + "value": { + "$id": "5804", + "kind": "string", + "type": { + "$ref": "5795" + }, + "value": "mycluster1" + } + }, + { + "$id": "5805", + "parameter": { + "$ref": "5792" + }, + "value": { + "$id": "5806", + "kind": "string", + "type": { + "$ref": "5793" + }, + "value": "resourceGroup1" + } + }, + { + "$id": "5807", + "parameter": { + "$ref": "5790" + }, + "value": { + "$id": "5808", + "kind": "string", + "type": { + "$ref": "5791" + }, + "value": "00000000-0000-0000-0000-000000000000" + } + } + ], + "responses": [ + { + "$id": "5809", + "response": { + "$ref": "5799" + }, + "statusCode": 200, + "bodyValue": { + "$id": "5810", + "kind": "model", + "type": { + "$ref": "1767" + }, + "value": { + "$id": "5811", + "canApplyUpdates": { + "$id": "5812", + "kind": "boolean", + "type": { + "$ref": "1781" + }, + "value": true + }, + "isRegionReady": { + "$id": "5813", + "kind": "boolean", + "type": { + "$ref": "1773" + }, + "value": true + }, + "isWindowActive": { + "$id": "5814", + "kind": "boolean", + "type": { + "$ref": "1777" + }, + "value": true + }, + "isWindowEnabled": { + "$id": "5815", + "kind": "boolean", + "type": { + "$ref": "1769" + }, + "value": false + }, + "lastWindowEndTimeUTC": { + "$id": "5816", + "kind": "string", + "type": { + "$ref": "1795" + }, + "value": "2023-04-30T00:00:00" + }, + "lastWindowStartTimeUTC": { + "$id": "5817", + "kind": "string", + "type": { + "$ref": "1790" + }, + "value": "2023-04-30T00:00:00" + }, + "lastWindowStatusUpdateAtUTC": { + "$id": "5818", + "kind": "string", + "type": { + "$ref": "1785" + }, + "value": "2023-04-30T00:00:00" + } + } + } + } + ] + } + ] + }, + "parameters": [ + { + "$id": "5819", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "5820", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5821", + "name": "clusterName", + "nameInRequest": "clusterName", + "doc": "The name of the cluster resource.", + "type": { + "$id": "5822", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5823", + "name": "accept", + "nameInRequest": "accept", + "type": { + "$ref": "5797" + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "response": { + "$id": "5824", + "type": { + "$ref": "1767" + } + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedMaintenanceWindowStatus.get" + } + ], + "parameters": [ + { + "$id": "5825", + "name": "endpoint", + "nameInRequest": "endpoint", + "doc": "Service host", + "type": { + "$id": "5826", + "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": "5827", + "type": { + "$id": "5828", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "https://management.azure.com" + } + } + ], + "decorators": [ + { + "$id": "5829", + "name": "Azure.ResourceManager.@armResourceOperations", + "arguments": { + "$id": "5830" + } + } + ], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedMaintenanceWindowStatus", + "apiVersions": [ + "2024-11-01-preview", + "2025-03-01-preview" + ], + "parent": { + "$ref": "2389" + } + }, + { + "$id": "5831", + "kind": "client", + "name": "NodeTypes", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "methods": [ + { + "$id": "5832", + "kind": "basic", + "name": "get", + "accessibility": "public", + "apiVersions": [ + "2024-11-01-preview", + "2025-03-01-preview" + ], + "doc": "Get a Service Fabric node type of a given managed cluster.", + "operation": { + "$id": "5833", + "name": "get", + "resourceName": "NodeType", + "doc": "Get a Service Fabric node type of a given managed cluster.", + "accessibility": "public", + "parameters": [ + { + "$id": "5834", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "5835", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "5836", + "type": { + "$id": "5837", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-03-01-preview" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5838", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "5839", + "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": "5840", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "5841", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5842", + "name": "clusterName", + "nameInRequest": "clusterName", + "doc": "The name of the cluster resource.", + "type": { + "$id": "5843", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5844", + "name": "nodeTypeName", + "nameInRequest": "nodeTypeName", + "doc": "The name of the node type.", + "type": { + "$id": "5845", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5846", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "5847", + "kind": "constant", + "valueType": { + "$id": "5848", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "5849", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "1799" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "GET", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/nodeTypes/{nodeTypeName}", + "bufferResponse": true, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypes.get", + "decorators": [], + "examples": [ + { + "$id": "5850", + "kind": "http", + "name": "Get a node type", + "description": "Get a node type", + "filePath": "2025-03-01-preview/NodeTypeGetOperation_example.json", + "parameters": [ + { + "$id": "5851", + "parameter": { + "$ref": "5834" + }, + "value": { + "$id": "5852", + "kind": "string", + "type": { + "$ref": "5835" + }, + "value": "2025-03-01-preview" + } + }, + { + "$id": "5853", + "parameter": { + "$ref": "5842" + }, + "value": { + "$id": "5854", + "kind": "string", + "type": { + "$ref": "5843" + }, + "value": "myCluster" + } + }, + { + "$id": "5855", + "parameter": { + "$ref": "5844" + }, + "value": { + "$id": "5856", + "kind": "string", + "type": { + "$ref": "5845" + }, + "value": "FE" + } + }, + { + "$id": "5857", + "parameter": { + "$ref": "5840" + }, + "value": { + "$id": "5858", + "kind": "string", + "type": { + "$ref": "5841" + }, + "value": "resRg" + } + }, + { + "$id": "5859", + "parameter": { + "$ref": "5838" + }, + "value": { + "$id": "5860", + "kind": "string", + "type": { + "$ref": "5839" + }, + "value": "00000000-0000-0000-0000-000000000000" + } + } + ], + "responses": [ + { + "$id": "5861", + "response": { + "$ref": "5849" + }, + "statusCode": 200, + "bodyValue": { + "$id": "5862", + "kind": "model", + "type": { + "$ref": "1799" + }, + "value": { + "$id": "5863", + "name": { + "$id": "5864", + "kind": "string", + "type": { + "$ref": "457" + }, + "value": "FE" + }, + "type": { + "$id": "5865", + "kind": "string", + "type": { + "$ref": "461" + }, + "value": "Microsoft.ServiceFabric/managedClusters/nodeTypes" + }, + "id": { + "$id": "5866", + "kind": "string", + "type": { + "$ref": "453" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/managedClusters/myCluster/nodeTypes/FE" + }, + "properties": { + "$id": "5867", + "kind": "model", + "type": { + "$ref": "1801" + }, + "value": { + "$id": "5868", + "capacities": { + "$id": "5869", + "kind": "dict", + "type": { + "$ref": "1828" + }, + "value": { + "$id": "5870" + } + }, + "dataDiskSizeGB": { + "$id": "5871", + "kind": "number", + "type": { + "$ref": "1811" + }, + "value": 100 + }, + "dataDiskType": { + "$id": "5872", + "kind": "string", + "type": { + "$ref": "286" + }, + "value": "StandardSSD_LRS" + }, + "isPrimary": { + "$id": "5873", + "kind": "boolean", + "type": { + "$ref": "1803" + }, + "value": true + }, + "isStateless": { + "$id": "5874", + "kind": "boolean", + "type": { + "$ref": "1962" + }, + "value": false + }, + "placementProperties": { + "$id": "5875", + "kind": "dict", + "type": { + "$ref": "1822" + }, + "value": { + "$id": "5876" + } + }, + "vmImageOffer": { + "$id": "5877", + "kind": "string", + "type": { + "$ref": "1857" + }, + "value": "WindowsServer" + }, + "vmImagePublisher": { + "$id": "5878", + "kind": "string", + "type": { + "$ref": "1853" + }, + "value": "MicrosoftWindowsServer" + }, + "vmImageSku": { + "$id": "5879", + "kind": "string", + "type": { + "$ref": "1861" + }, + "value": "2016-Datacenter" + }, + "vmImageVersion": { + "$id": "5880", + "kind": "string", + "type": { + "$ref": "1865" + }, + "value": "latest" + }, + "vmInstanceCount": { + "$id": "5881", + "kind": "number", + "type": { + "$ref": "1807" + }, + "value": 5 + }, + "vmSecrets": { + "$id": "5882", + "kind": "array", + "type": { + "$ref": "1869" + }, + "value": [ + { + "$id": "5883", + "kind": "model", + "type": { + "$ref": "1870" + }, + "value": { + "$id": "5884", + "sourceVault": { + "$id": "5885", + "kind": "model", + "type": { + "$ref": "1872" + }, + "value": { + "$id": "5886", + "id": { + "$id": "5887", + "kind": "string", + "type": { + "$ref": "1874" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.KeyVault/vaults/myVault" + } + } + }, + "vaultCertificates": { + "$id": "5888", + "kind": "array", + "type": { + "$ref": "1880" + }, + "value": [ + { + "$id": "5889", + "kind": "model", + "type": { + "$ref": "1881" + }, + "value": { + "$id": "5890", + "certificateStore": { + "$id": "5891", + "kind": "string", + "type": { + "$ref": "1887" + }, + "value": "My" + }, + "certificateUrl": { + "$id": "5892", + "kind": "string", + "type": { + "$ref": "1883" + }, + "value": "https://myVault.vault.azure.net:443/secrets/myCert/ef1a31d39e1f46bca33def54b6cda54c" + } + } + } + ] + } + } + } + ] + }, + "vmSize": { + "$id": "5893", + "kind": "string", + "type": { + "$ref": "1849" + }, + "value": "Standard_D2" + } + } + }, + "tags": { + "$id": "5894", + "kind": "dict", + "type": { + "$ref": "2253" + }, + "value": { + "$id": "5895" + } + } + } + } + } + ] + } + ] + }, + "parameters": [ + { + "$id": "5896", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "5897", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5898", + "name": "clusterName", + "nameInRequest": "clusterName", + "doc": "The name of the cluster resource.", + "type": { + "$id": "5899", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5900", + "name": "nodeTypeName", + "nameInRequest": "nodeTypeName", + "doc": "The name of the node type.", + "type": { + "$id": "5901", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5902", + "name": "accept", + "nameInRequest": "accept", + "type": { + "$ref": "5847" + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "response": { + "$id": "5903", + "type": { + "$ref": "1799" + } + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypes.get" + }, + { + "$id": "5904", + "kind": "lro", + "name": "createOrUpdate", + "accessibility": "public", + "apiVersions": [ + "2024-11-01-preview", + "2025-03-01-preview" + ], + "doc": "Create or update a Service Fabric node type of a given managed cluster.", + "operation": { + "$id": "5905", + "name": "createOrUpdate", + "resourceName": "NodeType", + "doc": "Create or update a Service Fabric node type of a given managed cluster.", + "accessibility": "public", + "parameters": [ + { + "$id": "5906", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "5907", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "5908", + "type": { + "$id": "5909", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-03-01-preview" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5910", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "5911", + "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": "5912", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "5913", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5914", + "name": "clusterName", + "nameInRequest": "clusterName", + "doc": "The name of the cluster resource.", + "type": { + "$id": "5915", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5916", + "name": "nodeTypeName", + "nameInRequest": "nodeTypeName", + "doc": "The name of the node type.", + "type": { + "$id": "5917", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5918", + "name": "contentType", + "nameInRequest": "Content-Type", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$id": "5919", + "kind": "constant", + "valueType": { + "$id": "5920", + "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": "5921", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "5922", + "kind": "constant", + "valueType": { + "$id": "5923", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "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": "5924", + "name": "parameters", + "nameInRequest": "parameters", + "doc": "The node type resource.", + "type": { + "$ref": "1799" + }, + "location": "Body", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "5925", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "1799" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + }, + { + "$id": "5926", + "statusCodes": [ + 202 + ], + "bodyType": { + "$ref": "1799" + }, + "headers": [ + { + "$id": "5927", + "name": "azureAsyncOperation", + "nameInResponse": "Azure-AsyncOperation", + "doc": "A link to the status monitor", + "type": { + "$id": "5928", + "kind": "url", + "name": "ResourceLocation", + "crossLanguageDefinitionId": "TypeSpec.Rest.ResourceLocation", + "baseType": { + "$id": "5929", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url", + "decorators": [] + }, + "decorators": [] + } + }, + { + "$id": "5930", + "name": "location", + "nameInResponse": "Location", + "doc": "The Location header contains the URL where the status of the long running operation can be checked.", + "type": { + "$id": "5931", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + } + ], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "PUT", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/nodeTypes/{nodeTypeName}", + "requestMediaTypes": [ + "application/json" + ], + "bufferResponse": true, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypes.createOrUpdate", + "decorators": [], + "examples": [ + { + "$id": "5932", + "kind": "http", + "name": "Put a node type with auto-scale parameters", + "description": "Put a node type with auto-scale parameters", + "filePath": "2025-03-01-preview/NodeTypePutOperationAutoScale_example.json", + "parameters": [ + { + "$id": "5933", + "parameter": { + "$ref": "5906" + }, + "value": { + "$id": "5934", + "kind": "string", + "type": { + "$ref": "5907" + }, + "value": "2025-03-01-preview" + } + }, + { + "$id": "5935", + "parameter": { + "$ref": "5914" + }, + "value": { + "$id": "5936", + "kind": "string", + "type": { + "$ref": "5915" + }, + "value": "myCluster" + } + }, + { + "$id": "5937", + "parameter": { + "$ref": "5916" + }, + "value": { + "$id": "5938", + "kind": "string", + "type": { + "$ref": "5917" + }, + "value": "BE" + } + }, + { + "$id": "5939", + "parameter": { + "$ref": "5912" + }, + "value": { + "$id": "5940", + "kind": "string", + "type": { + "$ref": "5913" + }, + "value": "resRg" + } + }, + { + "$id": "5941", + "parameter": { + "$ref": "5910" + }, + "value": { + "$id": "5942", + "kind": "string", + "type": { + "$ref": "5911" + }, + "value": "00000000-0000-0000-0000-000000000000" + } + } + ], + "responses": [ + { + "$id": "5943", + "response": { + "$ref": "5925" + }, + "statusCode": 200, + "bodyValue": { + "$id": "5944", + "kind": "model", + "type": { + "$ref": "1799" + }, + "value": { + "$id": "5945", + "name": { + "$id": "5946", + "kind": "string", + "type": { + "$ref": "457" + }, + "value": "BE" + }, + "type": { + "$id": "5947", + "kind": "string", + "type": { + "$ref": "461" + }, + "value": "Microsoft.ServiceFabric/managedClusters/nodeTypes" + }, + "id": { + "$id": "5948", + "kind": "string", + "type": { + "$ref": "453" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/managedClusters/myCluster/nodeTypes/BE" + }, + "properties": { + "$id": "5949", + "kind": "model", + "type": { + "$ref": "1801" + }, + "value": { + "$id": "5950", + "capacities": { + "$id": "5951", + "kind": "dict", + "type": { + "$ref": "1828" + }, + "value": { + "$id": "5952", + "ClientConnections": { + "$id": "5953", + "kind": "string", + "type": { + "$ref": "1830" + }, + "value": "65536" + } + } + }, + "dataDiskSizeGB": { + "$id": "5954", + "kind": "number", + "type": { + "$ref": "1811" + }, + "value": 200 + }, + "dataDiskType": { + "$id": "5955", + "kind": "string", + "type": { + "$ref": "286" + }, + "value": "Premium_LRS" + }, + "isPrimary": { + "$id": "5956", + "kind": "boolean", + "type": { + "$ref": "1803" + }, + "value": false + }, + "isStateless": { + "$id": "5957", + "kind": "boolean", + "type": { + "$ref": "1962" + }, + "value": true + }, + "multiplePlacementGroups": { + "$id": "5958", + "kind": "boolean", + "type": { + "$ref": "1966" + }, + "value": true + }, + "placementProperties": { + "$id": "5959", + "kind": "dict", + "type": { + "$ref": "1822" + }, + "value": { + "$id": "5960", + "HasSSD": { + "$id": "5961", + "kind": "string", + "type": { + "$ref": "1824" + }, + "value": "true" + }, + "NodeColor": { + "$id": "5962", + "kind": "string", + "type": { + "$ref": "1824" + }, + "value": "green" + }, + "SomeProperty": { + "$id": "5963", + "kind": "string", + "type": { + "$ref": "1824" + }, + "value": "5" + } + } + }, + "provisioningState": { + "$id": "5964", + "kind": "string", + "type": { + "$ref": "176" + }, + "value": "Creating" + }, + "vmExtensions": { + "$id": "5965", + "kind": "array", + "type": { + "$ref": "1895" + }, + "value": [ + { + "$id": "5966", + "kind": "model", + "type": { + "$ref": "1896" + }, + "value": { + "$id": "5967", + "name": { + "$id": "5968", + "kind": "string", + "type": { + "$ref": "1898" + }, + "value": "Microsoft.Azure.Geneva.GenevaMonitoring" + }, + "properties": { + "$id": "5969", + "kind": "model", + "type": { + "$ref": "1902" + }, + "value": { + "$id": "5970", + "type": { + "$id": "5971", + "kind": "string", + "type": { + "$ref": "1908" + }, + "value": "GenevaMonitoring" + }, + "autoUpgradeMinorVersion": { + "$id": "5972", + "kind": "boolean", + "type": { + "$ref": "1916" + }, + "value": true + }, + "forceUpdateTag": { + "$id": "5973", + "kind": "string", + "type": { + "$ref": "1928" + }, + "value": "v.1.0" + }, + "publisher": { + "$id": "5974", + "kind": "string", + "type": { + "$ref": "1904" + }, + "value": "Microsoft.Azure.Geneva" + }, + "settings": { + "$id": "5975", + "kind": "model", + "type": { + "$ref": "1920" + }, + "value": { + "$id": "5976" + } + }, + "typeHandlerVersion": { + "$id": "5977", + "kind": "string", + "type": { + "$ref": "1912" + }, + "value": "2.0" + } + } + } + } + } + ] + }, + "vmImageOffer": { + "$id": "5978", + "kind": "string", + "type": { + "$ref": "1857" + }, + "value": "WindowsServer" + }, + "vmImagePublisher": { + "$id": "5979", + "kind": "string", + "type": { + "$ref": "1853" + }, + "value": "MicrosoftWindowsServer" + }, + "vmImageSku": { + "$id": "5980", + "kind": "string", + "type": { + "$ref": "1861" + }, + "value": "2016-Datacenter-Server-Core" + }, + "vmImageVersion": { + "$id": "5981", + "kind": "string", + "type": { + "$ref": "1865" + }, + "value": "latest" + }, + "vmInstanceCount": { + "$id": "5982", + "kind": "number", + "type": { + "$ref": "1807" + }, + "value": 10 + }, + "vmManagedIdentity": { + "$id": "5983", + "kind": "model", + "type": { + "$ref": "1953" + }, + "value": { + "$id": "5984", + "userAssignedIdentities": { + "$id": "5985", + "kind": "array", + "type": { + "$ref": "1955" + }, + "value": [ + { + "$id": "5986", + "kind": "string", + "type": { + "$ref": "1956" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myIdentity" + }, + { + "$id": "5987", + "kind": "string", + "type": { + "$ref": "1956" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myIdentity2" + } + ] + } + } + }, + "vmSecrets": { + "$id": "5988", + "kind": "array", + "type": { + "$ref": "1869" + }, + "value": [ + { + "$id": "5989", + "kind": "model", + "type": { + "$ref": "1870" + }, + "value": { + "$id": "5990", + "sourceVault": { + "$id": "5991", + "kind": "model", + "type": { + "$ref": "1872" + }, + "value": { + "$id": "5992", + "id": { + "$id": "5993", + "kind": "string", + "type": { + "$ref": "1874" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.KeyVault/vaults/myVault" + } + } + }, + "vaultCertificates": { + "$id": "5994", + "kind": "array", + "type": { + "$ref": "1880" + }, + "value": [ + { + "$id": "5995", + "kind": "model", + "type": { + "$ref": "1881" + }, + "value": { + "$id": "5996", + "certificateStore": { + "$id": "5997", + "kind": "string", + "type": { + "$ref": "1887" + }, + "value": "My" + }, + "certificateUrl": { + "$id": "5998", + "kind": "string", + "type": { + "$ref": "1883" + }, + "value": "https://myVault.vault.azure.net:443/secrets/myCert/ef1a31d39e1f46bca33def54b6cda54c" + } + } + } + ] + } + } + } + ] + }, + "vmSize": { + "$id": "5999", + "kind": "string", + "type": { + "$ref": "1849" + }, + "value": "Standard_DS3" + } + } + }, + "sku": { + "$id": "6000", + "kind": "model", + "type": { + "$ref": "2259" + }, + "value": { + "$id": "6001", + "name": { + "$id": "6002", + "kind": "string", + "type": { + "$ref": "2261" + }, + "value": "Standard_S2" + }, + "capacity": { + "$id": "6003", + "kind": "number", + "type": { + "$ref": "2269" + }, + "value": 10 + }, + "tier": { + "$id": "6004", + "kind": "string", + "type": { + "$ref": "2265" + }, + "value": "Standard" + } + } + }, + "tags": { + "$id": "6005", + "kind": "dict", + "type": { + "$ref": "2253" + }, + "value": { + "$id": "6006" + } + } + } + } + }, + { + "$id": "6007", + "response": { + "$ref": "5926" + }, + "statusCode": 202, + "bodyValue": { + "$id": "6008", + "kind": "model", + "type": { + "$ref": "1799" + }, + "value": { + "$id": "6009", + "name": { + "$id": "6010", + "kind": "string", + "type": { + "$ref": "457" + }, + "value": "BE" + }, + "type": { + "$id": "6011", + "kind": "string", + "type": { + "$ref": "461" + }, + "value": "Microsoft.ServiceFabric/managedClusters/nodeTypes" + }, + "id": { + "$id": "6012", + "kind": "string", + "type": { + "$ref": "453" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/managedClusters/myCluster/nodeTypes/BE" + }, + "properties": { + "$id": "6013", + "kind": "model", + "type": { + "$ref": "1801" + }, + "value": { + "$id": "6014", + "capacities": { + "$id": "6015", + "kind": "dict", + "type": { + "$ref": "1828" + }, + "value": { + "$id": "6016", + "ClientConnections": { + "$id": "6017", + "kind": "string", + "type": { + "$ref": "1830" + }, + "value": "65536" + } + } + }, + "dataDiskSizeGB": { + "$id": "6018", + "kind": "number", + "type": { + "$ref": "1811" + }, + "value": 200 + }, + "dataDiskType": { + "$id": "6019", + "kind": "string", + "type": { + "$ref": "286" + }, + "value": "Premium_LRS" + }, + "isPrimary": { + "$id": "6020", + "kind": "boolean", + "type": { + "$ref": "1803" + }, + "value": false + }, + "isStateless": { + "$id": "6021", + "kind": "boolean", + "type": { + "$ref": "1962" + }, + "value": true + }, + "multiplePlacementGroups": { + "$id": "6022", + "kind": "boolean", + "type": { + "$ref": "1966" + }, + "value": true + }, + "placementProperties": { + "$id": "6023", + "kind": "dict", + "type": { + "$ref": "1822" + }, + "value": { + "$id": "6024", + "HasSSD": { + "$id": "6025", + "kind": "string", + "type": { + "$ref": "1824" + }, + "value": "true" + }, + "NodeColor": { + "$id": "6026", + "kind": "string", + "type": { + "$ref": "1824" + }, + "value": "green" + }, + "SomeProperty": { + "$id": "6027", + "kind": "string", + "type": { + "$ref": "1824" + }, + "value": "5" + } + } + }, + "provisioningState": { + "$id": "6028", + "kind": "string", + "type": { + "$ref": "176" + }, + "value": "Updating" + }, + "vmExtensions": { + "$id": "6029", + "kind": "array", + "type": { + "$ref": "1895" + }, + "value": [ + { + "$id": "6030", + "kind": "model", + "type": { + "$ref": "1896" + }, + "value": { + "$id": "6031", + "name": { + "$id": "6032", + "kind": "string", + "type": { + "$ref": "1898" + }, + "value": "Microsoft.Azure.Geneva.GenevaMonitoring" + }, + "properties": { + "$id": "6033", + "kind": "model", + "type": { + "$ref": "1902" + }, + "value": { + "$id": "6034", + "type": { + "$id": "6035", + "kind": "string", + "type": { + "$ref": "1908" + }, + "value": "GenevaMonitoring" + }, + "autoUpgradeMinorVersion": { + "$id": "6036", + "kind": "boolean", + "type": { + "$ref": "1916" + }, + "value": true + }, + "forceUpdateTag": { + "$id": "6037", + "kind": "string", + "type": { + "$ref": "1928" + }, + "value": "v.1.0" + }, + "publisher": { + "$id": "6038", + "kind": "string", + "type": { + "$ref": "1904" + }, + "value": "Microsoft.Azure.Geneva" + }, + "settings": { + "$id": "6039", + "kind": "model", + "type": { + "$ref": "1920" + }, + "value": { + "$id": "6040" + } + }, + "typeHandlerVersion": { + "$id": "6041", + "kind": "string", + "type": { + "$ref": "1912" + }, + "value": "2.0" + } + } + } + } + } + ] + }, + "vmImageOffer": { + "$id": "6042", + "kind": "string", + "type": { + "$ref": "1857" + }, + "value": "WindowsServer" + }, + "vmImagePublisher": { + "$id": "6043", + "kind": "string", + "type": { + "$ref": "1853" + }, + "value": "MicrosoftWindowsServer" + }, + "vmImageSku": { + "$id": "6044", + "kind": "string", + "type": { + "$ref": "1861" + }, + "value": "2016-Datacenter-Server-Core" + }, + "vmImageVersion": { + "$id": "6045", + "kind": "string", + "type": { + "$ref": "1865" + }, + "value": "latest" + }, + "vmInstanceCount": { + "$id": "6046", + "kind": "number", + "type": { + "$ref": "1807" + }, + "value": 10 + }, + "vmSecrets": { + "$id": "6047", + "kind": "array", + "type": { + "$ref": "1869" + }, + "value": [ + { + "$id": "6048", + "kind": "model", + "type": { + "$ref": "1870" + }, + "value": { + "$id": "6049", + "sourceVault": { + "$id": "6050", + "kind": "model", + "type": { + "$ref": "1872" + }, + "value": { + "$id": "6051", + "id": { + "$id": "6052", + "kind": "string", + "type": { + "$ref": "1874" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.KeyVault/vaults/myVault" + } + } + }, + "vaultCertificates": { + "$id": "6053", + "kind": "array", + "type": { + "$ref": "1880" + }, + "value": [ + { + "$id": "6054", + "kind": "model", + "type": { + "$ref": "1881" + }, + "value": { + "$id": "6055", + "certificateStore": { + "$id": "6056", + "kind": "string", + "type": { + "$ref": "1887" + }, + "value": "My" + }, + "certificateUrl": { + "$id": "6057", + "kind": "string", + "type": { + "$ref": "1883" + }, + "value": "https://myVault.vault.azure.net:443/secrets/myCert/ef1a31d39e1f46bca33def54b6cda54c" + } + } + } + ] + } + } + } + ] + }, + "vmSize": { + "$id": "6058", + "kind": "string", + "type": { + "$ref": "1849" + }, + "value": "Standard_DS3" + } + } + }, + "sku": { + "$id": "6059", + "kind": "model", + "type": { + "$ref": "2259" + }, + "value": { + "$id": "6060", + "name": { + "$id": "6061", + "kind": "string", + "type": { + "$ref": "2261" + }, + "value": "Standard_S2" + }, + "capacity": { + "$id": "6062", + "kind": "number", + "type": { + "$ref": "2269" + }, + "value": 10 + }, + "tier": { + "$id": "6063", + "kind": "string", + "type": { + "$ref": "2265" + }, + "value": "Standard" + } + } + }, + "tags": { + "$id": "6064", + "kind": "dict", + "type": { + "$ref": "2253" + }, + "value": { + "$id": "6065" + } + } + } + } + } + ] + }, + { + "$id": "6066", + "kind": "http", + "name": "Put node type with custom vm image", + "description": "Put node type with custom vm image", + "filePath": "2025-03-01-preview/NodeTypePutOperationCustomImage_example.json", + "parameters": [ + { + "$id": "6067", + "parameter": { + "$ref": "5906" + }, + "value": { + "$id": "6068", + "kind": "string", + "type": { + "$ref": "5907" + }, + "value": "2025-03-01-preview" + } + }, + { + "$id": "6069", + "parameter": { + "$ref": "5914" + }, + "value": { + "$id": "6070", + "kind": "string", + "type": { + "$ref": "5915" + }, + "value": "myCluster" + } + }, + { + "$id": "6071", + "parameter": { + "$ref": "5916" + }, + "value": { + "$id": "6072", + "kind": "string", + "type": { + "$ref": "5917" + }, + "value": "BE" + } + }, + { + "$id": "6073", + "parameter": { + "$ref": "5912" + }, + "value": { + "$id": "6074", + "kind": "string", + "type": { + "$ref": "5913" + }, + "value": "resRg" + } + }, + { + "$id": "6075", + "parameter": { + "$ref": "5910" + }, + "value": { + "$id": "6076", + "kind": "string", + "type": { + "$ref": "5911" + }, + "value": "00000000-0000-0000-0000-000000000000" + } + } + ], + "responses": [ + { + "$id": "6077", + "response": { + "$ref": "5925" + }, + "statusCode": 200, + "bodyValue": { + "$id": "6078", + "kind": "model", + "type": { + "$ref": "1799" + }, + "value": { + "$id": "6079", + "name": { + "$id": "6080", + "kind": "string", + "type": { + "$ref": "457" + }, + "value": "BE" + }, + "type": { + "$id": "6081", + "kind": "string", + "type": { + "$ref": "461" + }, + "value": "Microsoft.ServiceFabric/managedClusters/nodeTypes" + }, + "id": { + "$id": "6082", + "kind": "string", + "type": { + "$ref": "453" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/managedClusters/myCluster/nodeTypes/BE" + }, + "properties": { + "$id": "6083", + "kind": "model", + "type": { + "$ref": "1801" + }, + "value": { + "$id": "6084", + "capacities": { + "$id": "6085", + "kind": "dict", + "type": { + "$ref": "1828" + }, + "value": { + "$id": "6086" + } + }, + "dataDiskSizeGB": { + "$id": "6087", + "kind": "number", + "type": { + "$ref": "1811" + }, + "value": 200 + }, + "dataDiskType": { + "$id": "6088", + "kind": "string", + "type": { + "$ref": "286" + }, + "value": "StandardSSD_LRS" + }, + "isPrimary": { + "$id": "6089", + "kind": "boolean", + "type": { + "$ref": "1803" + }, + "value": false + }, + "isStateless": { + "$id": "6090", + "kind": "boolean", + "type": { + "$ref": "1962" + }, + "value": false + }, + "placementProperties": { + "$id": "6091", + "kind": "dict", + "type": { + "$ref": "1822" + }, + "value": { + "$id": "6092" + } + }, + "provisioningState": { + "$id": "6093", + "kind": "string", + "type": { + "$ref": "176" + }, + "value": "Creating" + }, + "vmImageResourceId": { + "$id": "6094", + "kind": "string", + "type": { + "$ref": "2064" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-custom-image/providers/Microsoft.Compute/galleries/myCustomImages/images/Win2019DC" + }, + "vmInstanceCount": { + "$id": "6095", + "kind": "number", + "type": { + "$ref": "1807" + }, + "value": 10 + }, + "vmSize": { + "$id": "6096", + "kind": "string", + "type": { + "$ref": "1849" + }, + "value": "Standard_D3" + } + } + }, + "tags": { + "$id": "6097", + "kind": "dict", + "type": { + "$ref": "2253" + }, + "value": { + "$id": "6098" + } + } + } + } + }, + { + "$id": "6099", + "response": { + "$ref": "5926" + }, + "statusCode": 202, + "bodyValue": { + "$id": "6100", + "kind": "model", + "type": { + "$ref": "1799" + }, + "value": { + "$id": "6101", + "name": { + "$id": "6102", + "kind": "string", + "type": { + "$ref": "457" + }, + "value": "BE" + }, + "type": { + "$id": "6103", + "kind": "string", + "type": { + "$ref": "461" + }, + "value": "Microsoft.ServiceFabric/managedClusters/nodeTypes" + }, + "id": { + "$id": "6104", + "kind": "string", + "type": { + "$ref": "453" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/managedClusters/myCluster/nodeTypes/BE" + }, + "properties": { + "$id": "6105", + "kind": "model", + "type": { + "$ref": "1801" + }, + "value": { + "$id": "6106", + "capacities": { + "$id": "6107", + "kind": "dict", + "type": { + "$ref": "1828" + }, + "value": { + "$id": "6108" + } + }, + "dataDiskSizeGB": { + "$id": "6109", + "kind": "number", + "type": { + "$ref": "1811" + }, + "value": 200 + }, + "dataDiskType": { + "$id": "6110", + "kind": "string", + "type": { + "$ref": "286" + }, + "value": "StandardSSD_LRS" + }, + "isPrimary": { + "$id": "6111", + "kind": "boolean", + "type": { + "$ref": "1803" + }, + "value": false + }, + "isStateless": { + "$id": "6112", + "kind": "boolean", + "type": { + "$ref": "1962" + }, + "value": false + }, + "placementProperties": { + "$id": "6113", + "kind": "dict", + "type": { + "$ref": "1822" + }, + "value": { + "$id": "6114" + } + }, + "provisioningState": { + "$id": "6115", + "kind": "string", + "type": { + "$ref": "176" + }, + "value": "Updating" + }, + "vmImageResourceId": { + "$id": "6116", + "kind": "string", + "type": { + "$ref": "2064" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-custom-image/providers/Microsoft.Compute/galleries/myCustomImages/images/Win2019DC" + }, + "vmInstanceCount": { + "$id": "6117", + "kind": "number", + "type": { + "$ref": "1807" + }, + "value": 10 + }, + "vmSize": { + "$id": "6118", + "kind": "string", + "type": { + "$ref": "1849" + }, + "value": "Standard_D3" + } + } + }, + "tags": { + "$id": "6119", + "kind": "dict", + "type": { + "$ref": "2253" + }, + "value": { + "$id": "6120" + } + } + } + } + } + ] + }, + { + "$id": "6121", + "kind": "http", + "name": "Put node type with shared galleries custom vm image", + "description": "Put node type with shared galleries custom vm image", + "filePath": "2025-03-01-preview/NodeTypePutOperationCustomSharedGalleriesImage_example.json", + "parameters": [ + { + "$id": "6122", + "parameter": { + "$ref": "5906" + }, + "value": { + "$id": "6123", + "kind": "string", + "type": { + "$ref": "5907" + }, + "value": "2025-03-01-preview" + } + }, + { + "$id": "6124", + "parameter": { + "$ref": "5914" + }, + "value": { + "$id": "6125", + "kind": "string", + "type": { + "$ref": "5915" + }, + "value": "myCluster" + } + }, + { + "$id": "6126", + "parameter": { + "$ref": "5916" + }, + "value": { + "$id": "6127", + "kind": "string", + "type": { + "$ref": "5917" + }, + "value": "BE" + } + }, + { + "$id": "6128", + "parameter": { + "$ref": "5912" + }, + "value": { + "$id": "6129", + "kind": "string", + "type": { + "$ref": "5913" + }, + "value": "resRg" + } + }, + { + "$id": "6130", + "parameter": { + "$ref": "5910" + }, + "value": { + "$id": "6131", + "kind": "string", + "type": { + "$ref": "5911" + }, + "value": "00000000-0000-0000-0000-000000000000" + } + } + ], + "responses": [ + { + "$id": "6132", + "response": { + "$ref": "5925" + }, + "statusCode": 200, + "bodyValue": { + "$id": "6133", + "kind": "model", + "type": { + "$ref": "1799" + }, + "value": { + "$id": "6134", + "name": { + "$id": "6135", + "kind": "string", + "type": { + "$ref": "457" + }, + "value": "BE" + }, + "type": { + "$id": "6136", + "kind": "string", + "type": { + "$ref": "461" + }, + "value": "Microsoft.ServiceFabric/managedClusters/nodeTypes" + }, + "id": { + "$id": "6137", + "kind": "string", + "type": { + "$ref": "453" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/managedClusters/myCluster/nodeTypes/BE" + }, + "properties": { + "$id": "6138", + "kind": "model", + "type": { + "$ref": "1801" + }, + "value": { + "$id": "6139", + "capacities": { + "$id": "6140", + "kind": "dict", + "type": { + "$ref": "1828" + }, + "value": { + "$id": "6141" + } + }, + "dataDiskSizeGB": { + "$id": "6142", + "kind": "number", + "type": { + "$ref": "1811" + }, + "value": 200 + }, + "dataDiskType": { + "$id": "6143", + "kind": "string", + "type": { + "$ref": "286" + }, + "value": "StandardSSD_LRS" + }, + "isPrimary": { + "$id": "6144", + "kind": "boolean", + "type": { + "$ref": "1803" + }, + "value": false + }, + "isStateless": { + "$id": "6145", + "kind": "boolean", + "type": { + "$ref": "1962" + }, + "value": false + }, + "placementProperties": { + "$id": "6146", + "kind": "dict", + "type": { + "$ref": "1822" + }, + "value": { + "$id": "6147" + } + }, + "provisioningState": { + "$id": "6148", + "kind": "string", + "type": { + "$ref": "176" + }, + "value": "Creating" + }, + "vmInstanceCount": { + "$id": "6149", + "kind": "number", + "type": { + "$ref": "1807" + }, + "value": 10 + }, + "vmSharedGalleryImageId": { + "$id": "6150", + "kind": "string", + "type": { + "$ref": "2096" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-custom-image/providers/Microsoft.Compute/sharedGalleries/35349201-a0b3-405e-8a23-9f1450984307-SFSHAREDGALLERY/images/TestNoProdContainerDImage/versions/latest" + }, + "vmSize": { + "$id": "6151", + "kind": "string", + "type": { + "$ref": "1849" + }, + "value": "Standard_D3" + } + } + }, + "tags": { + "$id": "6152", + "kind": "dict", + "type": { + "$ref": "2253" + }, + "value": { + "$id": "6153" + } + } + } + } + }, + { + "$id": "6154", + "response": { + "$ref": "5926" + }, + "statusCode": 202, + "bodyValue": { + "$id": "6155", + "kind": "model", + "type": { + "$ref": "1799" + }, + "value": { + "$id": "6156", + "name": { + "$id": "6157", + "kind": "string", + "type": { + "$ref": "457" + }, + "value": "BE" + }, + "type": { + "$id": "6158", + "kind": "string", + "type": { + "$ref": "461" + }, + "value": "Microsoft.ServiceFabric/managedClusters/nodeTypes" + }, + "id": { + "$id": "6159", + "kind": "string", + "type": { + "$ref": "453" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/managedClusters/myCluster/nodeTypes/BE" + }, + "properties": { + "$id": "6160", + "kind": "model", + "type": { + "$ref": "1801" + }, + "value": { + "$id": "6161", + "capacities": { + "$id": "6162", + "kind": "dict", + "type": { + "$ref": "1828" + }, + "value": { + "$id": "6163" + } + }, + "dataDiskSizeGB": { + "$id": "6164", + "kind": "number", + "type": { + "$ref": "1811" + }, + "value": 200 + }, + "dataDiskType": { + "$id": "6165", + "kind": "string", + "type": { + "$ref": "286" + }, + "value": "StandardSSD_LRS" + }, + "isPrimary": { + "$id": "6166", + "kind": "boolean", + "type": { + "$ref": "1803" + }, + "value": false + }, + "isStateless": { + "$id": "6167", + "kind": "boolean", + "type": { + "$ref": "1962" + }, + "value": false + }, + "placementProperties": { + "$id": "6168", + "kind": "dict", + "type": { + "$ref": "1822" + }, + "value": { + "$id": "6169" + } + }, + "provisioningState": { + "$id": "6170", + "kind": "string", + "type": { + "$ref": "176" + }, + "value": "Updating" + }, + "vmInstanceCount": { + "$id": "6171", + "kind": "number", + "type": { + "$ref": "1807" + }, + "value": 10 + }, + "vmSharedGalleryImageId": { + "$id": "6172", + "kind": "string", + "type": { + "$ref": "2096" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-custom-image/providers/Microsoft.Compute/sharedGalleries/35349201-a0b3-405e-8a23-9f1450984307-SFSHAREDGALLERY/images/TestNoProdContainerDImage/versions/latest" + }, + "vmSize": { + "$id": "6173", + "kind": "string", + "type": { + "$ref": "1849" + }, + "value": "Standard_D3" + } + } + }, + "tags": { + "$id": "6174", + "kind": "dict", + "type": { + "$ref": "2253" + }, + "value": { + "$id": "6175" + } + } + } + } + } + ] + }, + { + "$id": "6176", + "kind": "http", + "name": "Put node type with dedicated hosts", + "description": "Put node type with dedicated hosts", + "filePath": "2025-03-01-preview/NodeTypePutOperationDedicatedHost_example.json", + "parameters": [ + { + "$id": "6177", + "parameter": { + "$ref": "5906" + }, + "value": { + "$id": "6178", + "kind": "string", + "type": { + "$ref": "5907" + }, + "value": "2025-03-01-preview" + } + }, + { + "$id": "6179", + "parameter": { + "$ref": "5914" + }, + "value": { + "$id": "6180", + "kind": "string", + "type": { + "$ref": "5915" + }, + "value": "myCluster" + } + }, + { + "$id": "6181", + "parameter": { + "$ref": "5916" + }, + "value": { + "$id": "6182", + "kind": "string", + "type": { + "$ref": "5917" + }, + "value": "BE" + } + }, + { + "$id": "6183", + "parameter": { + "$ref": "5912" + }, + "value": { + "$id": "6184", + "kind": "string", + "type": { + "$ref": "5913" + }, + "value": "resRg" + } + }, + { + "$id": "6185", + "parameter": { + "$ref": "5910" + }, + "value": { + "$id": "6186", + "kind": "string", + "type": { + "$ref": "5911" + }, + "value": "00000000-0000-0000-0000-000000000000" + } + } + ], + "responses": [ + { + "$id": "6187", + "response": { + "$ref": "5925" + }, + "statusCode": 200, + "bodyValue": { + "$id": "6188", + "kind": "model", + "type": { + "$ref": "1799" + }, + "value": { + "$id": "6189", + "name": { + "$id": "6190", + "kind": "string", + "type": { + "$ref": "457" + }, + "value": "BE" + }, + "type": { + "$id": "6191", + "kind": "string", + "type": { + "$ref": "461" + }, + "value": "Microsoft.ServiceFabric/managedClusters/nodeTypes" + }, + "id": { + "$id": "6192", + "kind": "string", + "type": { + "$ref": "453" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/managedClusters/myCluster/nodeTypes/BE" + }, + "properties": { + "$id": "6193", + "kind": "model", + "type": { + "$ref": "1801" + }, + "value": { + "$id": "6194", + "capacities": { + "$id": "6195", + "kind": "dict", + "type": { + "$ref": "1828" + }, + "value": { + "$id": "6196" + } + }, + "dataDiskSizeGB": { + "$id": "6197", + "kind": "number", + "type": { + "$ref": "1811" + }, + "value": 200 + }, + "dataDiskType": { + "$id": "6198", + "kind": "string", + "type": { + "$ref": "286" + }, + "value": "StandardSSD_LRS" + }, + "hostGroupId": { + "$id": "6199", + "kind": "string", + "type": { + "$ref": "2049" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testhostgroupRG/providers/Microsoft.Compute/hostGroups/testHostGroup" + }, + "isPrimary": { + "$id": "6200", + "kind": "boolean", + "type": { + "$ref": "1803" + }, + "value": false + }, + "isStateless": { + "$id": "6201", + "kind": "boolean", + "type": { + "$ref": "1962" + }, + "value": false + }, + "placementProperties": { + "$id": "6202", + "kind": "dict", + "type": { + "$ref": "1822" + }, + "value": { + "$id": "6203" + } + }, + "provisioningState": { + "$id": "6204", + "kind": "string", + "type": { + "$ref": "176" + }, + "value": "Creating" + }, + "vmImageOffer": { + "$id": "6205", + "kind": "string", + "type": { + "$ref": "1857" + }, + "value": "WindowsServer" + }, + "vmImagePublisher": { + "$id": "6206", + "kind": "string", + "type": { + "$ref": "1853" + }, + "value": "MicrosoftWindowsServer" + }, + "vmImageSku": { + "$id": "6207", + "kind": "string", + "type": { + "$ref": "1861" + }, + "value": "2019-Datacenter" + }, + "vmImageVersion": { + "$id": "6208", + "kind": "string", + "type": { + "$ref": "1865" + }, + "value": "latest" + }, + "vmInstanceCount": { + "$id": "6209", + "kind": "number", + "type": { + "$ref": "1807" + }, + "value": 10 + }, + "vmSize": { + "$id": "6210", + "kind": "string", + "type": { + "$ref": "1849" + }, + "value": "Standard_D8s_v3" + }, + "zones": { + "$id": "6211", + "kind": "array", + "type": { + "$ref": "2040" + }, + "value": [ + { + "$id": "6212", + "kind": "string", + "type": { + "$ref": "2041" + }, + "value": "1" + } + ] + } + } + }, + "tags": { + "$id": "6213", + "kind": "dict", + "type": { + "$ref": "2253" + }, + "value": { + "$id": "6214" + } + } + } + } + }, + { + "$id": "6215", + "response": { + "$ref": "5926" + }, + "statusCode": 202, + "bodyValue": { + "$id": "6216", + "kind": "model", + "type": { + "$ref": "1799" + }, + "value": { + "$id": "6217", + "name": { + "$id": "6218", + "kind": "string", + "type": { + "$ref": "457" + }, + "value": "BE" + }, + "type": { + "$id": "6219", + "kind": "string", + "type": { + "$ref": "461" + }, + "value": "Microsoft.ServiceFabric/managedClusters/nodeTypes" + }, + "id": { + "$id": "6220", + "kind": "string", + "type": { + "$ref": "453" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/managedClusters/myCluster/nodeTypes/BE" + }, + "properties": { + "$id": "6221", + "kind": "model", + "type": { + "$ref": "1801" + }, + "value": { + "$id": "6222", + "capacities": { + "$id": "6223", + "kind": "dict", + "type": { + "$ref": "1828" + }, + "value": { + "$id": "6224" + } + }, + "dataDiskSizeGB": { + "$id": "6225", + "kind": "number", + "type": { + "$ref": "1811" + }, + "value": 200 + }, + "dataDiskType": { + "$id": "6226", + "kind": "string", + "type": { + "$ref": "286" + }, + "value": "StandardSSD_LRS" + }, + "hostGroupId": { + "$id": "6227", + "kind": "string", + "type": { + "$ref": "2049" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testhostgroupRG/providers/Microsoft.Compute/hostGroups/testHostGroup" + }, + "isPrimary": { + "$id": "6228", + "kind": "boolean", + "type": { + "$ref": "1803" + }, + "value": false + }, + "isStateless": { + "$id": "6229", + "kind": "boolean", + "type": { + "$ref": "1962" + }, + "value": false + }, + "placementProperties": { + "$id": "6230", + "kind": "dict", + "type": { + "$ref": "1822" + }, + "value": { + "$id": "6231" + } + }, + "provisioningState": { + "$id": "6232", + "kind": "string", + "type": { + "$ref": "176" + }, + "value": "Updating" + }, + "vmImageOffer": { + "$id": "6233", + "kind": "string", + "type": { + "$ref": "1857" + }, + "value": "WindowsServer" + }, + "vmImagePublisher": { + "$id": "6234", + "kind": "string", + "type": { + "$ref": "1853" + }, + "value": "MicrosoftWindowsServer" + }, + "vmImageSku": { + "$id": "6235", + "kind": "string", + "type": { + "$ref": "1861" + }, + "value": "2019-Datacenter" + }, + "vmImageVersion": { + "$id": "6236", + "kind": "string", + "type": { + "$ref": "1865" + }, + "value": "latest" + }, + "vmInstanceCount": { + "$id": "6237", + "kind": "number", + "type": { + "$ref": "1807" + }, + "value": 10 + }, + "vmSize": { + "$id": "6238", + "kind": "string", + "type": { + "$ref": "1849" + }, + "value": "Standard_D8s_v3" + }, + "zones": { + "$id": "6239", + "kind": "array", + "type": { + "$ref": "2040" + }, + "value": [ + { + "$id": "6240", + "kind": "string", + "type": { + "$ref": "2041" + }, + "value": "1" + } + ] + } + } + }, + "tags": { + "$id": "6241", + "kind": "dict", + "type": { + "$ref": "2253" + }, + "value": { + "$id": "6242" + } + } + } + } + } + ] + }, + { + "$id": "6243", + "kind": "http", + "name": "Put an stateless node type with temporary disk for service fabric", + "description": "Put an stateless node type with temporary disk for service fabric", + "filePath": "2025-03-01-preview/NodeTypePutOperationStateless_example.json", + "parameters": [ + { + "$id": "6244", + "parameter": { + "$ref": "5906" + }, + "value": { + "$id": "6245", + "kind": "string", + "type": { + "$ref": "5907" + }, + "value": "2025-03-01-preview" + } + }, + { + "$id": "6246", + "parameter": { + "$ref": "5914" + }, + "value": { + "$id": "6247", + "kind": "string", + "type": { + "$ref": "5915" + }, + "value": "myCluster" + } + }, + { + "$id": "6248", + "parameter": { + "$ref": "5916" + }, + "value": { + "$id": "6249", + "kind": "string", + "type": { + "$ref": "5917" + }, + "value": "BE" + } + }, + { + "$id": "6250", + "parameter": { + "$ref": "5912" + }, + "value": { + "$id": "6251", + "kind": "string", + "type": { + "$ref": "5913" + }, + "value": "resRg" + } + }, + { + "$id": "6252", + "parameter": { + "$ref": "5910" + }, + "value": { + "$id": "6253", + "kind": "string", + "type": { + "$ref": "5911" + }, + "value": "00000000-0000-0000-0000-000000000000" + } + } + ], + "responses": [ + { + "$id": "6254", + "response": { + "$ref": "5925" + }, + "statusCode": 200, + "bodyValue": { + "$id": "6255", + "kind": "model", + "type": { + "$ref": "1799" + }, + "value": { + "$id": "6256", + "name": { + "$id": "6257", + "kind": "string", + "type": { + "$ref": "457" + }, + "value": "BE" + }, + "type": { + "$id": "6258", + "kind": "string", + "type": { + "$ref": "461" + }, + "value": "Microsoft.ServiceFabric/managedClusters/nodeTypes" + }, + "id": { + "$id": "6259", + "kind": "string", + "type": { + "$ref": "453" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/managedClusters/myCluster/nodeTypes/BE" + }, + "properties": { + "$id": "6260", + "kind": "model", + "type": { + "$ref": "1801" + }, + "value": { + "$id": "6261", + "enableEncryptionAtHost": { + "$id": "6262", + "kind": "boolean", + "type": { + "$ref": "2017" + }, + "value": true + }, + "isPrimary": { + "$id": "6263", + "kind": "boolean", + "type": { + "$ref": "1803" + }, + "value": false + }, + "isStateless": { + "$id": "6264", + "kind": "boolean", + "type": { + "$ref": "1962" + }, + "value": true + }, + "multiplePlacementGroups": { + "$id": "6265", + "kind": "boolean", + "type": { + "$ref": "1966" + }, + "value": true + }, + "provisioningState": { + "$id": "6266", + "kind": "string", + "type": { + "$ref": "176" + }, + "value": "Creating" + }, + "useTempDataDisk": { + "$id": "6267", + "kind": "boolean", + "type": { + "$ref": "2032" + }, + "value": true + }, + "vmExtensions": { + "$id": "6268", + "kind": "array", + "type": { + "$ref": "1895" + }, + "value": [ + { + "$id": "6269", + "kind": "model", + "type": { + "$ref": "1896" + }, + "value": { + "$id": "6270", + "name": { + "$id": "6271", + "kind": "string", + "type": { + "$ref": "1898" + }, + "value": "Microsoft.Azure.Geneva.GenevaMonitoring" + }, + "properties": { + "$id": "6272", + "kind": "model", + "type": { + "$ref": "1902" + }, + "value": { + "$id": "6273", + "type": { + "$id": "6274", + "kind": "string", + "type": { + "$ref": "1908" + }, + "value": "GenevaMonitoring" + }, + "autoUpgradeMinorVersion": { + "$id": "6275", + "kind": "boolean", + "type": { + "$ref": "1916" + }, + "value": true + }, + "publisher": { + "$id": "6276", + "kind": "string", + "type": { + "$ref": "1904" + }, + "value": "Microsoft.Azure.Geneva" + }, + "settings": { + "$id": "6277", + "kind": "model", + "type": { + "$ref": "1920" + }, + "value": { + "$id": "6278" + } + }, + "typeHandlerVersion": { + "$id": "6279", + "kind": "string", + "type": { + "$ref": "1912" + }, + "value": "2.0" + } + } + } + } + } + ] + }, + "vmImageOffer": { + "$id": "6280", + "kind": "string", + "type": { + "$ref": "1857" + }, + "value": "WindowsServer" + }, + "vmImagePublisher": { + "$id": "6281", + "kind": "string", + "type": { + "$ref": "1853" + }, + "value": "MicrosoftWindowsServer" + }, + "vmImageSku": { + "$id": "6282", + "kind": "string", + "type": { + "$ref": "1861" + }, + "value": "2016-Datacenter-Server-Core" + }, + "vmImageVersion": { + "$id": "6283", + "kind": "string", + "type": { + "$ref": "1865" + }, + "value": "latest" + }, + "vmInstanceCount": { + "$id": "6284", + "kind": "number", + "type": { + "$ref": "1807" + }, + "value": 10 + }, + "vmSize": { + "$id": "6285", + "kind": "string", + "type": { + "$ref": "1849" + }, + "value": "Standard_DS3" + } + } + }, + "tags": { + "$id": "6286", + "kind": "dict", + "type": { + "$ref": "2253" + }, + "value": { + "$id": "6287" + } + } + } + } + }, + { + "$id": "6288", + "response": { + "$ref": "5926" + }, + "statusCode": 202, + "bodyValue": { + "$id": "6289", + "kind": "model", + "type": { + "$ref": "1799" + }, + "value": { + "$id": "6290", + "name": { + "$id": "6291", + "kind": "string", + "type": { + "$ref": "457" + }, + "value": "BE" + }, + "type": { + "$id": "6292", + "kind": "string", + "type": { + "$ref": "461" + }, + "value": "Microsoft.ServiceFabric/managedClusters/nodeTypes" + }, + "id": { + "$id": "6293", + "kind": "string", + "type": { + "$ref": "453" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/managedClusters/myCluster/nodeTypes/BE" + }, + "properties": { + "$id": "6294", + "kind": "model", + "type": { + "$ref": "1801" + }, + "value": { + "$id": "6295", + "enableEncryptionAtHost": { + "$id": "6296", + "kind": "boolean", + "type": { + "$ref": "2017" + }, + "value": true + }, + "isPrimary": { + "$id": "6297", + "kind": "boolean", + "type": { + "$ref": "1803" + }, + "value": false + }, + "isStateless": { + "$id": "6298", + "kind": "boolean", + "type": { + "$ref": "1962" + }, + "value": true + }, + "multiplePlacementGroups": { + "$id": "6299", + "kind": "boolean", + "type": { + "$ref": "1966" + }, + "value": true + }, + "provisioningState": { + "$id": "6300", + "kind": "string", + "type": { + "$ref": "176" + }, + "value": "Updating" + }, + "useTempDataDisk": { + "$id": "6301", + "kind": "boolean", + "type": { + "$ref": "2032" + }, + "value": true + }, + "vmExtensions": { + "$id": "6302", + "kind": "array", + "type": { + "$ref": "1895" + }, + "value": [ + { + "$id": "6303", + "kind": "model", + "type": { + "$ref": "1896" + }, + "value": { + "$id": "6304", + "name": { + "$id": "6305", + "kind": "string", + "type": { + "$ref": "1898" + }, + "value": "Microsoft.Azure.Geneva.GenevaMonitoring" + }, + "properties": { + "$id": "6306", + "kind": "model", + "type": { + "$ref": "1902" + }, + "value": { + "$id": "6307", + "type": { + "$id": "6308", + "kind": "string", + "type": { + "$ref": "1908" + }, + "value": "GenevaMonitoring" + }, + "autoUpgradeMinorVersion": { + "$id": "6309", + "kind": "boolean", + "type": { + "$ref": "1916" + }, + "value": true + }, + "publisher": { + "$id": "6310", + "kind": "string", + "type": { + "$ref": "1904" + }, + "value": "Microsoft.Azure.Geneva" + }, + "settings": { + "$id": "6311", + "kind": "model", + "type": { + "$ref": "1920" + }, + "value": { + "$id": "6312" + } + }, + "typeHandlerVersion": { + "$id": "6313", + "kind": "string", + "type": { + "$ref": "1912" + }, + "value": "2.0" + } + } + } + } + } + ] + }, + "vmImageOffer": { + "$id": "6314", + "kind": "string", + "type": { + "$ref": "1857" + }, + "value": "WindowsServer" + }, + "vmImagePublisher": { + "$id": "6315", + "kind": "string", + "type": { + "$ref": "1853" + }, + "value": "MicrosoftWindowsServer" + }, + "vmImageSku": { + "$id": "6316", + "kind": "string", + "type": { + "$ref": "1861" + }, + "value": "2016-Datacenter-Server-Core" + }, + "vmImageVersion": { + "$id": "6317", + "kind": "string", + "type": { + "$ref": "1865" + }, + "value": "latest" + }, + "vmInstanceCount": { + "$id": "6318", + "kind": "number", + "type": { + "$ref": "1807" + }, + "value": 10 + }, + "vmSize": { + "$id": "6319", + "kind": "string", + "type": { + "$ref": "1849" + }, + "value": "Standard_DS3" + } + } + }, + "tags": { + "$id": "6320", + "kind": "dict", + "type": { + "$ref": "2253" + }, + "value": { + "$id": "6321" + } + } + } + } + } + ] + }, + { + "$id": "6322", + "kind": "http", + "name": "Put node type with vm image plan ", + "description": "Put node type with vm image plan ", + "filePath": "2025-03-01-preview/NodeTypePutOperationVmImagePlan_example.json", + "parameters": [ + { + "$id": "6323", + "parameter": { + "$ref": "5906" + }, + "value": { + "$id": "6324", + "kind": "string", + "type": { + "$ref": "5907" + }, + "value": "2025-03-01-preview" + } + }, + { + "$id": "6325", + "parameter": { + "$ref": "5914" + }, + "value": { + "$id": "6326", + "kind": "string", + "type": { + "$ref": "5915" + }, + "value": "myCluster" + } + }, + { + "$id": "6327", + "parameter": { + "$ref": "5916" + }, + "value": { + "$id": "6328", + "kind": "string", + "type": { + "$ref": "5917" + }, + "value": "BE" + } + }, + { + "$id": "6329", + "parameter": { + "$ref": "5912" + }, + "value": { + "$id": "6330", + "kind": "string", + "type": { + "$ref": "5913" + }, + "value": "resRg" + } + }, + { + "$id": "6331", + "parameter": { + "$ref": "5910" + }, + "value": { + "$id": "6332", + "kind": "string", + "type": { + "$ref": "5911" + }, + "value": "00000000-0000-0000-0000-000000000000" + } + } + ], + "responses": [ + { + "$id": "6333", + "response": { + "$ref": "5925" + }, + "statusCode": 200, + "bodyValue": { + "$id": "6334", + "kind": "model", + "type": { + "$ref": "1799" + }, + "value": { + "$id": "6335", + "name": { + "$id": "6336", + "kind": "string", + "type": { + "$ref": "457" + }, + "value": "BE" + }, + "type": { + "$id": "6337", + "kind": "string", + "type": { + "$ref": "461" + }, + "value": "Microsoft.ServiceFabric/managedClusters/nodeTypes" + }, + "id": { + "$id": "6338", + "kind": "string", + "type": { + "$ref": "453" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/managedClusters/myCluster/nodeTypes/BE" + }, + "properties": { + "$id": "6339", + "kind": "model", + "type": { + "$ref": "1801" + }, + "value": { + "$id": "6340", + "capacities": { + "$id": "6341", + "kind": "dict", + "type": { + "$ref": "1828" + }, + "value": { + "$id": "6342" + } + }, + "dataDiskSizeGB": { + "$id": "6343", + "kind": "number", + "type": { + "$ref": "1811" + }, + "value": 200 + }, + "dataDiskType": { + "$id": "6344", + "kind": "string", + "type": { + "$ref": "286" + }, + "value": "StandardSSD_LRS" + }, + "isPrimary": { + "$id": "6345", + "kind": "boolean", + "type": { + "$ref": "1803" + }, + "value": false + }, + "isStateless": { + "$id": "6346", + "kind": "boolean", + "type": { + "$ref": "1962" + }, + "value": false + }, + "placementProperties": { + "$id": "6347", + "kind": "dict", + "type": { + "$ref": "1822" + }, + "value": { + "$id": "6348" + } + }, + "provisioningState": { + "$id": "6349", + "kind": "string", + "type": { + "$ref": "176" + }, + "value": "Creating" + }, + "vmImageOffer": { + "$id": "6350", + "kind": "string", + "type": { + "$ref": "1857" + }, + "value": "windows_2022_test" + }, + "vmImagePlan": { + "$id": "6351", + "kind": "model", + "type": { + "$ref": "2123" + }, + "value": { + "$id": "6352", + "name": { + "$id": "6353", + "kind": "string", + "type": { + "$ref": "2125" + }, + "value": "win_2022_test_20_10_gen2" + }, + "product": { + "$id": "6354", + "kind": "string", + "type": { + "$ref": "2129" + }, + "value": "windows_2022_test" + }, + "publisher": { + "$id": "6355", + "kind": "string", + "type": { + "$ref": "2137" + }, + "value": "testpublisher" + } + } + }, + "vmImagePublisher": { + "$id": "6356", + "kind": "string", + "type": { + "$ref": "1853" + }, + "value": "testpublisher" + }, + "vmImageSku": { + "$id": "6357", + "kind": "string", + "type": { + "$ref": "1861" + }, + "value": "win_2022_test_20_10_gen2" + }, + "vmImageVersion": { + "$id": "6358", + "kind": "string", + "type": { + "$ref": "1865" + }, + "value": "latest" + }, + "vmInstanceCount": { + "$id": "6359", + "kind": "number", + "type": { + "$ref": "1807" + }, + "value": 10 + }, + "vmSize": { + "$id": "6360", + "kind": "string", + "type": { + "$ref": "1849" + }, + "value": "Standard_D3" + } + } + }, + "tags": { + "$id": "6361", + "kind": "dict", + "type": { + "$ref": "2253" + }, + "value": { + "$id": "6362" + } + } + } + } + }, + { + "$id": "6363", + "response": { + "$ref": "5926" + }, + "statusCode": 202, + "bodyValue": { + "$id": "6364", + "kind": "model", + "type": { + "$ref": "1799" + }, + "value": { + "$id": "6365", + "name": { + "$id": "6366", + "kind": "string", + "type": { + "$ref": "457" + }, + "value": "BE" + }, + "type": { + "$id": "6367", + "kind": "string", + "type": { + "$ref": "461" + }, + "value": "Microsoft.ServiceFabric/managedClusters/nodeTypes" + }, + "id": { + "$id": "6368", + "kind": "string", + "type": { + "$ref": "453" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/managedClusters/myCluster/nodeTypes/BE" + }, + "properties": { + "$id": "6369", + "kind": "model", + "type": { + "$ref": "1801" + }, + "value": { + "$id": "6370", + "capacities": { + "$id": "6371", + "kind": "dict", + "type": { + "$ref": "1828" + }, + "value": { + "$id": "6372" + } + }, + "dataDiskSizeGB": { + "$id": "6373", + "kind": "number", + "type": { + "$ref": "1811" + }, + "value": 200 + }, + "dataDiskType": { + "$id": "6374", + "kind": "string", + "type": { + "$ref": "286" + }, + "value": "StandardSSD_LRS" + }, + "isPrimary": { + "$id": "6375", + "kind": "boolean", + "type": { + "$ref": "1803" + }, + "value": false + }, + "isStateless": { + "$id": "6376", + "kind": "boolean", + "type": { + "$ref": "1962" + }, + "value": false + }, + "placementProperties": { + "$id": "6377", + "kind": "dict", + "type": { + "$ref": "1822" + }, + "value": { + "$id": "6378" + } + }, + "provisioningState": { + "$id": "6379", + "kind": "string", + "type": { + "$ref": "176" + }, + "value": "Updating" + }, + "vmImageOffer": { + "$id": "6380", + "kind": "string", + "type": { + "$ref": "1857" + }, + "value": "windows_2022_test" + }, + "vmImagePlan": { + "$id": "6381", + "kind": "model", + "type": { + "$ref": "2123" + }, + "value": { + "$id": "6382", + "name": { + "$id": "6383", + "kind": "string", + "type": { + "$ref": "2125" + }, + "value": "win_2022_test_20_10_gen2" + }, + "product": { + "$id": "6384", + "kind": "string", + "type": { + "$ref": "2129" + }, + "value": "windows_2022_test" + }, + "publisher": { + "$id": "6385", + "kind": "string", + "type": { + "$ref": "2137" + }, + "value": "testpublisher" + } + } + }, + "vmImagePublisher": { + "$id": "6386", + "kind": "string", + "type": { + "$ref": "1853" + }, + "value": "testpublisher" + }, + "vmImageSku": { + "$id": "6387", + "kind": "string", + "type": { + "$ref": "1861" + }, + "value": "win_2022_test_20_10_gen2" + }, + "vmImageVersion": { + "$id": "6388", + "kind": "string", + "type": { + "$ref": "1865" + }, + "value": "latest" + }, + "vmInstanceCount": { + "$id": "6389", + "kind": "number", + "type": { + "$ref": "1807" + }, + "value": 10 + }, + "vmSize": { + "$id": "6390", + "kind": "string", + "type": { + "$ref": "1849" + }, + "value": "Standard_D3" + } + } + }, + "tags": { + "$id": "6391", + "kind": "dict", + "type": { + "$ref": "2253" + }, + "value": { + "$id": "6392" + } + } + } + } + } + ] + }, + { + "$id": "6393", + "kind": "http", + "name": "Put a node type with maximum parameters", + "description": "Put a node type with maximum parameters", + "filePath": "2025-03-01-preview/NodeTypePutOperation_example_max.json", + "parameters": [ + { + "$id": "6394", + "parameter": { + "$ref": "5906" + }, + "value": { + "$id": "6395", + "kind": "string", + "type": { + "$ref": "5907" + }, + "value": "2025-03-01-preview" + } + }, + { + "$id": "6396", + "parameter": { + "$ref": "5914" + }, + "value": { + "$id": "6397", + "kind": "string", + "type": { + "$ref": "5915" + }, + "value": "myCluster" + } + }, + { + "$id": "6398", + "parameter": { + "$ref": "5916" + }, + "value": { + "$id": "6399", + "kind": "string", + "type": { + "$ref": "5917" + }, + "value": "BE-testResourceGroup-testRegion-test" + } + }, + { + "$id": "6400", + "parameter": { + "$ref": "5912" + }, + "value": { + "$id": "6401", + "kind": "string", + "type": { + "$ref": "5913" + }, + "value": "resRg" + } + }, + { + "$id": "6402", + "parameter": { + "$ref": "5910" + }, + "value": { + "$id": "6403", + "kind": "string", + "type": { + "$ref": "5911" + }, + "value": "00000000-0000-0000-0000-000000000000" + } + } + ], + "responses": [ + { + "$id": "6404", + "response": { + "$ref": "5925" + }, + "statusCode": 200, + "bodyValue": { + "$id": "6405", + "kind": "model", + "type": { + "$ref": "1799" + }, + "value": { + "$id": "6406", + "name": { + "$id": "6407", + "kind": "string", + "type": { + "$ref": "457" + }, + "value": "BE" + }, + "type": { + "$id": "6408", + "kind": "string", + "type": { + "$ref": "461" + }, + "value": "Microsoft.ServiceFabric/managedClusters/nodeTypes" + }, + "id": { + "$id": "6409", + "kind": "string", + "type": { + "$ref": "453" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/managedClusters/myCluster/nodeTypes/BE" + }, + "properties": { + "$id": "6410", + "kind": "model", + "type": { + "$ref": "1801" + }, + "value": { + "$id": "6411", + "additionalDataDisks": { + "$id": "6412", + "kind": "array", + "type": { + "$ref": "1997" + }, + "value": [ + { + "$id": "6413", + "kind": "model", + "type": { + "$ref": "1998" + }, + "value": { + "$id": "6414", + "diskLetter": { + "$id": "6415", + "kind": "string", + "type": { + "$ref": "2011" + }, + "value": "F" + }, + "diskSizeGB": { + "$id": "6416", + "kind": "number", + "type": { + "$ref": "2004" + }, + "value": 256 + }, + "diskType": { + "$id": "6417", + "kind": "string", + "type": { + "$ref": "286" + }, + "value": "StandardSSD_LRS" + }, + "lun": { + "$id": "6418", + "kind": "number", + "type": { + "$ref": "2000" + }, + "value": 1 + } + } + }, + { + "$id": "6419", + "kind": "model", + "type": { + "$ref": "1998" + }, + "value": { + "$id": "6420", + "diskLetter": { + "$id": "6421", + "kind": "string", + "type": { + "$ref": "2011" + }, + "value": "G" + }, + "diskSizeGB": { + "$id": "6422", + "kind": "number", + "type": { + "$ref": "2004" + }, + "value": 150 + }, + "diskType": { + "$id": "6423", + "kind": "string", + "type": { + "$ref": "286" + }, + "value": "Premium_LRS" + }, + "lun": { + "$id": "6424", + "kind": "number", + "type": { + "$ref": "2000" + }, + "value": 2 + } + } + } + ] + }, + "additionalNetworkInterfaceConfigurations": { + "$id": "6425", + "kind": "array", + "type": { + "$ref": "2153" + }, + "value": [ + { + "$id": "6426", + "kind": "model", + "type": { + "$ref": "2154" + }, + "value": { + "$id": "6427", + "name": { + "$id": "6428", + "kind": "string", + "type": { + "$ref": "2156" + }, + "value": "nic-1" + }, + "dscpConfiguration": { + "$id": "6429", + "kind": "model", + "type": { + "$ref": "1872" + }, + "value": { + "$id": "6430", + "id": { + "$id": "6431", + "kind": "string", + "type": { + "$ref": "1874" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.Network/dscpConfigurations/myDscpConfig" + } + } + }, + "enableAcceleratedNetworking": { + "$id": "6432", + "kind": "boolean", + "type": { + "$ref": "2160" + }, + "value": true + }, + "ipConfigurations": { + "$id": "6433", + "kind": "array", + "type": { + "$ref": "2167" + }, + "value": [ + { + "$id": "6434", + "kind": "model", + "type": { + "$ref": "2168" + }, + "value": { + "$id": "6435", + "name": { + "$id": "6436", + "kind": "string", + "type": { + "$ref": "2170" + }, + "value": "ipconfig-1" + }, + "applicationGatewayBackendAddressPools": { + "$id": "6437", + "kind": "array", + "type": { + "$ref": "2174" + }, + "value": [ + { + "$id": "6438", + "kind": "model", + "type": { + "$ref": "1872" + }, + "value": { + "$id": "6439", + "id": { + "$id": "6440", + "kind": "string", + "type": { + "$ref": "1874" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.Network/applicationGateways/appgw-test/backendAddressPools/appgwBepoolTest" + } + } + } + ] + }, + "loadBalancerBackendAddressPools": { + "$id": "6441", + "kind": "array", + "type": { + "$ref": "2178" + }, + "value": [ + { + "$id": "6442", + "kind": "model", + "type": { + "$ref": "1872" + }, + "value": { + "$id": "6443", + "id": { + "$id": "6444", + "kind": "string", + "type": { + "$ref": "1874" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.Network/loadBalancers/test-LB/backendAddressPools/LoadBalancerBEAddressPool" + } + } + } + ] + }, + "loadBalancerInboundNatPools": { + "$id": "6445", + "kind": "array", + "type": { + "$ref": "2182" + }, + "value": [ + { + "$id": "6446", + "kind": "model", + "type": { + "$ref": "1872" + }, + "value": { + "$id": "6447", + "id": { + "$id": "6448", + "kind": "string", + "type": { + "$ref": "1874" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.Network/loadBalancers/test-LB/inboundNatPools/LoadBalancerNATPool" + } + } + } + ] + }, + "privateIPAddressVersion": { + "$id": "6449", + "kind": "string", + "type": { + "$ref": "336" + }, + "value": "IPv4" + }, + "publicIPAddressConfiguration": { + "$id": "6450", + "kind": "model", + "type": { + "$ref": "2192" + }, + "value": { + "$id": "6451", + "name": { + "$id": "6452", + "kind": "string", + "type": { + "$ref": "2194" + }, + "value": "publicip-1" + }, + "ipTags": { + "$id": "6453", + "kind": "array", + "type": { + "$ref": "2198" + }, + "value": [ + { + "$id": "6454", + "kind": "model", + "type": { + "$ref": "1445" + }, + "value": { + "$id": "6455", + "ipTagType": { + "$id": "6456", + "kind": "string", + "type": { + "$ref": "1447" + }, + "value": "RoutingPreference" + }, + "tag": { + "$id": "6457", + "kind": "string", + "type": { + "$ref": "1451" + }, + "value": "Internet" + } + } + } + ] + }, + "publicIPAddressVersion": { + "$id": "6458", + "kind": "string", + "type": { + "$ref": "342" + }, + "value": "IPv4" + } + } + }, + "subnet": { + "$id": "6459", + "kind": "model", + "type": { + "$ref": "1872" + }, + "value": { + "$id": "6460", + "id": { + "$id": "6461", + "kind": "string", + "type": { + "$ref": "1874" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1" + } + } + } + } + } + ] + } + } + } + ] + }, + "capacities": { + "$id": "6462", + "kind": "dict", + "type": { + "$ref": "1828" + }, + "value": { + "$id": "6463", + "ClientConnections": { + "$id": "6464", + "kind": "string", + "type": { + "$ref": "1830" + }, + "value": "65536" + } + } + }, + "dataDiskLetter": { + "$id": "6465", + "kind": "string", + "type": { + "$ref": "1818" + }, + "value": "S" + }, + "dataDiskSizeGB": { + "$id": "6466", + "kind": "number", + "type": { + "$ref": "1811" + }, + "value": 200 + }, + "dataDiskType": { + "$id": "6467", + "kind": "string", + "type": { + "$ref": "286" + }, + "value": "Premium_LRS" + }, + "dscpConfigurationId": { + "$id": "6468", + "kind": "string", + "type": { + "$ref": "2148" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.Network/dscpConfigurations/myDscpConfig" + }, + "enableAcceleratedNetworking": { + "$id": "6469", + "kind": "boolean", + "type": { + "$ref": "2024" + }, + "value": true + }, + "enableEncryptionAtHost": { + "$id": "6470", + "kind": "boolean", + "type": { + "$ref": "2017" + }, + "value": true + }, + "enableNodePublicIP": { + "$id": "6471", + "kind": "boolean", + "type": { + "$ref": "2088" + }, + "value": true + }, + "enableNodePublicIPv6": { + "$id": "6472", + "kind": "boolean", + "type": { + "$ref": "2092" + }, + "value": true + }, + "enableOverProvisioning": { + "$id": "6473", + "kind": "boolean", + "type": { + "$ref": "2036" + }, + "value": false + }, + "evictionPolicy": { + "$id": "6474", + "kind": "string", + "type": { + "$ref": "310" + }, + "value": "Deallocate" + }, + "frontendConfigurations": { + "$id": "6475", + "kind": "array", + "type": { + "$ref": "1970" + }, + "value": [ + { + "$id": "6476", + "kind": "model", + "type": { + "$ref": "1971" + }, + "value": { + "$id": "6477", + "applicationGatewayBackendAddressPoolId": { + "$id": "6478", + "kind": "string", + "type": { + "$ref": "1986" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.Network/applicationGateways/appgw-test/backendAddressPools/appgwBepoolTest" + }, + "loadBalancerBackendAddressPoolId": { + "$id": "6479", + "kind": "string", + "type": { + "$ref": "1976" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.Network/loadBalancers/test-LB/backendAddressPools/LoadBalancerBEAddressPool" + }, + "loadBalancerInboundNatPoolId": { + "$id": "6480", + "kind": "string", + "type": { + "$ref": "1981" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.Network/loadBalancers/test-LB/inboundNatPools/LoadBalancerNATPool" + } + } + } + ] + }, + "isPrimary": { + "$id": "6481", + "kind": "boolean", + "type": { + "$ref": "1803" + }, + "value": false + }, + "isSpotVM": { + "$id": "6482", + "kind": "boolean", + "type": { + "$ref": "2045" + }, + "value": true + }, + "isStateless": { + "$id": "6483", + "kind": "boolean", + "type": { + "$ref": "1962" + }, + "value": true + }, + "multiplePlacementGroups": { + "$id": "6484", + "kind": "boolean", + "type": { + "$ref": "1966" + }, + "value": true + }, + "natGatewayId": { + "$id": "6485", + "kind": "string", + "type": { + "$ref": "2101" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.Network/natGateways/myNatGateway" + }, + "placementProperties": { + "$id": "6486", + "kind": "dict", + "type": { + "$ref": "1822" + }, + "value": { + "$id": "6487", + "HasSSD": { + "$id": "6488", + "kind": "string", + "type": { + "$ref": "1824" + }, + "value": "true" + }, + "NodeColor": { + "$id": "6489", + "kind": "string", + "type": { + "$ref": "1824" + }, + "value": "green" + }, + "SomeProperty": { + "$id": "6490", + "kind": "string", + "type": { + "$ref": "1824" + }, + "value": "5" + } + } + }, + "provisioningState": { + "$id": "6491", + "kind": "string", + "type": { + "$ref": "176" + }, + "value": "Creating" + }, + "secureBootEnabled": { + "$id": "6492", + "kind": "boolean", + "type": { + "$ref": "2084" + }, + "value": true + }, + "securityType": { + "$id": "6493", + "kind": "string", + "type": { + "$ref": "322" + }, + "value": "ConfidentialVM" + }, + "securityEncryptionType": { + "$id": "6494", + "kind": "string", + "type": { + "$ref": "330" + }, + "value": "DiskWithVMGuestState" + }, + "serviceArtifactReferenceId": { + "$id": "6495", + "kind": "string", + "type": { + "$ref": "2143" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.Compute/galleries/myGallery/serviceArtifacts/myServiceArtifact/vmArtifactsProfiles/myVmArtifactProfile" + }, + "spotRestoreTimeout": { + "$id": "6496", + "kind": "string", + "type": { + "$ref": "2057" + }, + "value": "PT30M" + }, + "subnetId": { + "$id": "6497", + "kind": "string", + "type": { + "$ref": "2069" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1" + }, + "useDefaultPublicLoadBalancer": { + "$id": "6498", + "kind": "boolean", + "type": { + "$ref": "2028" + }, + "value": true + }, + "useEphemeralOSDisk": { + "$id": "6499", + "kind": "boolean", + "type": { + "$ref": "2053" + }, + "value": true + }, + "vmApplications": { + "$id": "6500", + "kind": "array", + "type": { + "$ref": "2215" + }, + "value": [ + { + "$id": "6501", + "kind": "model", + "type": { + "$ref": "2216" + }, + "value": { + "$id": "6502", + "configurationReference": { + "$id": "6503", + "kind": "string", + "type": { + "$ref": "2218" + }, + "value": "https://mystorageaccount.blob.core.windows.net/containername/blobname" + }, + "enableAutomaticUpgrade": { + "$id": "6504", + "kind": "boolean", + "type": { + "$ref": "2222" + }, + "value": true + }, + "order": { + "$id": "6505", + "kind": "number", + "type": { + "$ref": "2226" + }, + "value": 1 + }, + "packageReferenceId": { + "$id": "6506", + "kind": "string", + "type": { + "$ref": "2230" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.Compute/galleries/myGallery/applications/myApplication/versions/1.0.0" + }, + "treatFailureAsDeploymentFailure": { + "$id": "6507", + "kind": "boolean", + "type": { + "$ref": "2239" + }, + "value": false + }, + "vmGalleryTags": { + "$id": "6508", + "kind": "string", + "type": { + "$ref": "2235" + }, + "value": "{\"Tag1\":\"Value1\",\"Tag2\":\"Value2\"}" + } + } + } + ] + }, + "vmExtensions": { + "$id": "6509", + "kind": "array", + "type": { + "$ref": "1895" + }, + "value": [ + { + "$id": "6510", + "kind": "model", + "type": { + "$ref": "1896" + }, + "value": { + "$id": "6511", + "name": { + "$id": "6512", + "kind": "string", + "type": { + "$ref": "1898" + }, + "value": "Microsoft.Azure.Geneva.GenevaMonitoring" + }, + "properties": { + "$id": "6513", + "kind": "model", + "type": { + "$ref": "1902" + }, + "value": { + "$id": "6514", + "type": { + "$id": "6515", + "kind": "string", + "type": { + "$ref": "1908" + }, + "value": "GenevaMonitoring" + }, + "autoUpgradeMinorVersion": { + "$id": "6516", + "kind": "boolean", + "type": { + "$ref": "1916" + }, + "value": true + }, + "enableAutomaticUpgrade": { + "$id": "6517", + "kind": "boolean", + "type": { + "$ref": "1941" + }, + "value": true + }, + "forceUpdateTag": { + "$id": "6518", + "kind": "string", + "type": { + "$ref": "1928" + }, + "value": "v.1.0" + }, + "publisher": { + "$id": "6519", + "kind": "string", + "type": { + "$ref": "1904" + }, + "value": "Microsoft.Azure.Geneva" + }, + "settings": { + "$id": "6520", + "kind": "model", + "type": { + "$ref": "1920" + }, + "value": { + "$id": "6521" + } + }, + "setupOrder": { + "$id": "6522", + "kind": "array", + "type": { + "$ref": "1945" + }, + "value": [ + { + "$id": "6523", + "kind": "string", + "type": { + "$ref": "300" + }, + "value": "BeforeSFRuntime" + } + ] + }, + "typeHandlerVersion": { + "$id": "6524", + "kind": "string", + "type": { + "$ref": "1912" + }, + "value": "2.0" + } + } + } + } + } + ] + }, + "vmImageOffer": { + "$id": "6525", + "kind": "string", + "type": { + "$ref": "1857" + }, + "value": "WindowsServer" + }, + "vmImagePublisher": { + "$id": "6526", + "kind": "string", + "type": { + "$ref": "1853" + }, + "value": "MicrosoftWindowsServer" + }, + "vmImageSku": { + "$id": "6527", + "kind": "string", + "type": { + "$ref": "1861" + }, + "value": "2016-Datacenter-Server-Core" + }, + "vmImageVersion": { + "$id": "6528", + "kind": "string", + "type": { + "$ref": "1865" + }, + "value": "latest" + }, + "vmInstanceCount": { + "$id": "6529", + "kind": "number", + "type": { + "$ref": "1807" + }, + "value": 10 + }, + "vmManagedIdentity": { + "$id": "6530", + "kind": "model", + "type": { + "$ref": "1953" + }, + "value": { + "$id": "6531", + "userAssignedIdentities": { + "$id": "6532", + "kind": "array", + "type": { + "$ref": "1955" + }, + "value": [ + { + "$id": "6533", + "kind": "string", + "type": { + "$ref": "1956" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myIdentity" + }, + { + "$id": "6534", + "kind": "string", + "type": { + "$ref": "1956" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myIdentity2" + } + ] + } + } + }, + "vmSecrets": { + "$id": "6535", + "kind": "array", + "type": { + "$ref": "1869" + }, + "value": [ + { + "$id": "6536", + "kind": "model", + "type": { + "$ref": "1870" + }, + "value": { + "$id": "6537", + "sourceVault": { + "$id": "6538", + "kind": "model", + "type": { + "$ref": "1872" + }, + "value": { + "$id": "6539", + "id": { + "$id": "6540", + "kind": "string", + "type": { + "$ref": "1874" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.KeyVault/vaults/myVault" + } + } + }, + "vaultCertificates": { + "$id": "6541", + "kind": "array", + "type": { + "$ref": "1880" + }, + "value": [ + { + "$id": "6542", + "kind": "model", + "type": { + "$ref": "1881" + }, + "value": { + "$id": "6543", + "certificateStore": { + "$id": "6544", + "kind": "string", + "type": { + "$ref": "1887" + }, + "value": "My" + }, + "certificateUrl": { + "$id": "6545", + "kind": "string", + "type": { + "$ref": "1883" + }, + "value": "https://myVault.vault.azure.net:443/secrets/myCert/ef1a31d39e1f46bca33def54b6cda54c" + } + } + } + ] + } + } + } + ] + }, + "vmSetupActions": { + "$id": "6546", + "kind": "array", + "type": { + "$ref": "2074" + }, + "value": [ + { + "$id": "6547", + "kind": "string", + "type": { + "$ref": "316" + }, + "value": "EnableContainers" + }, + { + "$id": "6548", + "kind": "string", + "type": { + "$ref": "316" + }, + "value": "EnableHyperV" + } + ] + }, + "vmSize": { + "$id": "6549", + "kind": "string", + "type": { + "$ref": "1849" + }, + "value": "Standard_DS3" + }, + "zones": { + "$id": "6550", + "kind": "array", + "type": { + "$ref": "2040" + }, + "value": [ + { + "$id": "6551", + "kind": "string", + "type": { + "$ref": "2041" + }, + "value": "1" + }, + { + "$id": "6552", + "kind": "string", + "type": { + "$ref": "2041" + }, + "value": "2" + }, + { + "$id": "6553", + "kind": "string", + "type": { + "$ref": "2041" + }, + "value": "3" + } + ] + } + } + }, + "tags": { + "$id": "6554", + "kind": "dict", + "type": { + "$ref": "2253" + }, + "value": { + "$id": "6555" + } + } + } + } + }, + { + "$id": "6556", + "response": { + "$ref": "5926" + }, + "statusCode": 202, + "bodyValue": { + "$id": "6557", + "kind": "model", + "type": { + "$ref": "1799" + }, + "value": { + "$id": "6558", + "name": { + "$id": "6559", + "kind": "string", + "type": { + "$ref": "457" + }, + "value": "BE" + }, + "type": { + "$id": "6560", + "kind": "string", + "type": { + "$ref": "461" + }, + "value": "Microsoft.ServiceFabric/managedClusters/nodeTypes" + }, + "id": { + "$id": "6561", + "kind": "string", + "type": { + "$ref": "453" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/managedClusters/myCluster/nodeTypes/BE" + }, + "properties": { + "$id": "6562", + "kind": "model", + "type": { + "$ref": "1801" + }, + "value": { + "$id": "6563", + "additionalDataDisks": { + "$id": "6564", + "kind": "array", + "type": { + "$ref": "1997" + }, + "value": [ + { + "$id": "6565", + "kind": "model", + "type": { + "$ref": "1998" + }, + "value": { + "$id": "6566", + "diskLetter": { + "$id": "6567", + "kind": "string", + "type": { + "$ref": "2011" + }, + "value": "F" + }, + "diskSizeGB": { + "$id": "6568", + "kind": "number", + "type": { + "$ref": "2004" + }, + "value": 256 + }, + "diskType": { + "$id": "6569", + "kind": "string", + "type": { + "$ref": "286" + }, + "value": "StandardSSD_LRS" + }, + "lun": { + "$id": "6570", + "kind": "number", + "type": { + "$ref": "2000" + }, + "value": 1 + } + } + }, + { + "$id": "6571", + "kind": "model", + "type": { + "$ref": "1998" + }, + "value": { + "$id": "6572", + "diskLetter": { + "$id": "6573", + "kind": "string", + "type": { + "$ref": "2011" + }, + "value": "G" + }, + "diskSizeGB": { + "$id": "6574", + "kind": "number", + "type": { + "$ref": "2004" + }, + "value": 150 + }, + "diskType": { + "$id": "6575", + "kind": "string", + "type": { + "$ref": "286" + }, + "value": "Premium_LRS" + }, + "lun": { + "$id": "6576", + "kind": "number", + "type": { + "$ref": "2000" + }, + "value": 2 + } + } + } + ] + }, + "additionalNetworkInterfaceConfigurations": { + "$id": "6577", + "kind": "array", + "type": { + "$ref": "2153" + }, + "value": [ + { + "$id": "6578", + "kind": "model", + "type": { + "$ref": "2154" + }, + "value": { + "$id": "6579", + "name": { + "$id": "6580", + "kind": "string", + "type": { + "$ref": "2156" + }, + "value": "nic-1" + }, + "dscpConfiguration": { + "$id": "6581", + "kind": "model", + "type": { + "$ref": "1872" + }, + "value": { + "$id": "6582", + "id": { + "$id": "6583", + "kind": "string", + "type": { + "$ref": "1874" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.Network/dscpConfigurations/myDscpConfig" + } + } + }, + "enableAcceleratedNetworking": { + "$id": "6584", + "kind": "boolean", + "type": { + "$ref": "2160" + }, + "value": true + }, + "ipConfigurations": { + "$id": "6585", + "kind": "array", + "type": { + "$ref": "2167" + }, + "value": [ + { + "$id": "6586", + "kind": "model", + "type": { + "$ref": "2168" + }, + "value": { + "$id": "6587", + "name": { + "$id": "6588", + "kind": "string", + "type": { + "$ref": "2170" + }, + "value": "ipconfig-1" + }, + "applicationGatewayBackendAddressPools": { + "$id": "6589", + "kind": "array", + "type": { + "$ref": "2174" + }, + "value": [ + { + "$id": "6590", + "kind": "model", + "type": { + "$ref": "1872" + }, + "value": { + "$id": "6591", + "id": { + "$id": "6592", + "kind": "string", + "type": { + "$ref": "1874" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.Network/applicationGateways/appgw-test/backendAddressPools/appgwBepoolTest" + } + } + } + ] + }, + "loadBalancerBackendAddressPools": { + "$id": "6593", + "kind": "array", + "type": { + "$ref": "2178" + }, + "value": [ + { + "$id": "6594", + "kind": "model", + "type": { + "$ref": "1872" + }, + "value": { + "$id": "6595", + "id": { + "$id": "6596", + "kind": "string", + "type": { + "$ref": "1874" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.Network/loadBalancers/test-LB/backendAddressPools/LoadBalancerBEAddressPool" + } + } + } + ] + }, + "loadBalancerInboundNatPools": { + "$id": "6597", + "kind": "array", + "type": { + "$ref": "2182" + }, + "value": [ + { + "$id": "6598", + "kind": "model", + "type": { + "$ref": "1872" + }, + "value": { + "$id": "6599", + "id": { + "$id": "6600", + "kind": "string", + "type": { + "$ref": "1874" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.Network/loadBalancers/test-LB/inboundNatPools/LoadBalancerNATPool" + } + } + } + ] + }, + "privateIPAddressVersion": { + "$id": "6601", + "kind": "string", + "type": { + "$ref": "336" + }, + "value": "IPv4" + }, + "publicIPAddressConfiguration": { + "$id": "6602", + "kind": "model", + "type": { + "$ref": "2192" + }, + "value": { + "$id": "6603", + "name": { + "$id": "6604", + "kind": "string", + "type": { + "$ref": "2194" + }, + "value": "publicip-1" + }, + "ipTags": { + "$id": "6605", + "kind": "array", + "type": { + "$ref": "2198" + }, + "value": [ + { + "$id": "6606", + "kind": "model", + "type": { + "$ref": "1445" + }, + "value": { + "$id": "6607", + "ipTagType": { + "$id": "6608", + "kind": "string", + "type": { + "$ref": "1447" + }, + "value": "RoutingPreference" + }, + "tag": { + "$id": "6609", + "kind": "string", + "type": { + "$ref": "1451" + }, + "value": "Internet" + } + } + } + ] + }, + "publicIPAddressVersion": { + "$id": "6610", + "kind": "string", + "type": { + "$ref": "342" + }, + "value": "IPv4" + } + } + }, + "subnet": { + "$id": "6611", + "kind": "model", + "type": { + "$ref": "1872" + }, + "value": { + "$id": "6612", + "id": { + "$id": "6613", + "kind": "string", + "type": { + "$ref": "1874" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1" + } + } + } + } + } + ] + } + } + } + ] + }, + "capacities": { + "$id": "6614", + "kind": "dict", + "type": { + "$ref": "1828" + }, + "value": { + "$id": "6615", + "ClientConnections": { + "$id": "6616", + "kind": "string", + "type": { + "$ref": "1830" + }, + "value": "65536" + } + } + }, + "dataDiskLetter": { + "$id": "6617", + "kind": "string", + "type": { + "$ref": "1818" + }, + "value": "S" + }, + "dataDiskSizeGB": { + "$id": "6618", + "kind": "number", + "type": { + "$ref": "1811" + }, + "value": 200 + }, + "dataDiskType": { + "$id": "6619", + "kind": "string", + "type": { + "$ref": "286" + }, + "value": "Premium_LRS" + }, + "dscpConfigurationId": { + "$id": "6620", + "kind": "string", + "type": { + "$ref": "2148" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.Network/dscpConfigurations/myDscpConfig" + }, + "enableAcceleratedNetworking": { + "$id": "6621", + "kind": "boolean", + "type": { + "$ref": "2024" + }, + "value": true + }, + "enableEncryptionAtHost": { + "$id": "6622", + "kind": "boolean", + "type": { + "$ref": "2017" + }, + "value": true + }, + "enableNodePublicIP": { + "$id": "6623", + "kind": "boolean", + "type": { + "$ref": "2088" + }, + "value": true + }, + "enableNodePublicIPv6": { + "$id": "6624", + "kind": "boolean", + "type": { + "$ref": "2092" + }, + "value": true + }, + "enableOverProvisioning": { + "$id": "6625", + "kind": "boolean", + "type": { + "$ref": "2036" + }, + "value": false + }, + "evictionPolicy": { + "$id": "6626", + "kind": "string", + "type": { + "$ref": "310" + }, + "value": "Deallocate" + }, + "frontendConfigurations": { + "$id": "6627", + "kind": "array", + "type": { + "$ref": "1970" + }, + "value": [ + { + "$id": "6628", + "kind": "model", + "type": { + "$ref": "1971" + }, + "value": { + "$id": "6629", + "applicationGatewayBackendAddressPoolId": { + "$id": "6630", + "kind": "string", + "type": { + "$ref": "1986" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.Network/applicationGateways/appgw-test/backendAddressPools/appgwBepoolTest" + }, + "loadBalancerBackendAddressPoolId": { + "$id": "6631", + "kind": "string", + "type": { + "$ref": "1976" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.Network/loadBalancers/test-LB/backendAddressPools/LoadBalancerBEAddressPool" + }, + "loadBalancerInboundNatPoolId": { + "$id": "6632", + "kind": "string", + "type": { + "$ref": "1981" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.Network/loadBalancers/test-LB/inboundNatPools/LoadBalancerNATPool" + } + } + } + ] + }, + "isPrimary": { + "$id": "6633", + "kind": "boolean", + "type": { + "$ref": "1803" + }, + "value": false + }, + "isSpotVM": { + "$id": "6634", + "kind": "boolean", + "type": { + "$ref": "2045" + }, + "value": true + }, + "isStateless": { + "$id": "6635", + "kind": "boolean", + "type": { + "$ref": "1962" + }, + "value": true + }, + "multiplePlacementGroups": { + "$id": "6636", + "kind": "boolean", + "type": { + "$ref": "1966" + }, + "value": true + }, + "natGatewayId": { + "$id": "6637", + "kind": "string", + "type": { + "$ref": "2101" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.Network/natGateways/myNatGateway" + }, + "placementProperties": { + "$id": "6638", + "kind": "dict", + "type": { + "$ref": "1822" + }, + "value": { + "$id": "6639", + "HasSSD": { + "$id": "6640", + "kind": "string", + "type": { + "$ref": "1824" + }, + "value": "true" + }, + "NodeColor": { + "$id": "6641", + "kind": "string", + "type": { + "$ref": "1824" + }, + "value": "green" + }, + "SomeProperty": { + "$id": "6642", + "kind": "string", + "type": { + "$ref": "1824" + }, + "value": "5" + } + } + }, + "provisioningState": { + "$id": "6643", + "kind": "string", + "type": { + "$ref": "176" + }, + "value": "Updating" + }, + "secureBootEnabled": { + "$id": "6644", + "kind": "boolean", + "type": { + "$ref": "2084" + }, + "value": true + }, + "securityType": { + "$id": "6645", + "kind": "string", + "type": { + "$ref": "322" + }, + "value": "ConfidentialVM" + }, + "securityEncryptionType": { + "$id": "6646", + "kind": "string", + "type": { + "$ref": "330" + }, + "value": "DiskWithVMGuestState" + }, + "serviceArtifactReferenceId": { + "$id": "6647", + "kind": "string", + "type": { + "$ref": "2143" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.Compute/galleries/myGallery/serviceArtifacts/myServiceArtifact/vmArtifactsProfiles/myVmArtifactProfile" + }, + "spotRestoreTimeout": { + "$id": "6648", + "kind": "string", + "type": { + "$ref": "2057" + }, + "value": "PT30M" + }, + "subnetId": { + "$id": "6649", + "kind": "string", + "type": { + "$ref": "2069" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1" + }, + "useDefaultPublicLoadBalancer": { + "$id": "6650", + "kind": "boolean", + "type": { + "$ref": "2028" + }, + "value": true + }, + "useEphemeralOSDisk": { + "$id": "6651", + "kind": "boolean", + "type": { + "$ref": "2053" + }, + "value": true + }, + "vmApplications": { + "$id": "6652", + "kind": "array", + "type": { + "$ref": "2215" + }, + "value": [ + { + "$id": "6653", + "kind": "model", + "type": { + "$ref": "2216" + }, + "value": { + "$id": "6654", + "configurationReference": { + "$id": "6655", + "kind": "string", + "type": { + "$ref": "2218" + }, + "value": "https://mystorageaccount.blob.core.windows.net/containername/blobname" + }, + "enableAutomaticUpgrade": { + "$id": "6656", + "kind": "boolean", + "type": { + "$ref": "2222" + }, + "value": true + }, + "order": { + "$id": "6657", + "kind": "number", + "type": { + "$ref": "2226" + }, + "value": 1 + }, + "packageReferenceId": { + "$id": "6658", + "kind": "string", + "type": { + "$ref": "2230" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.Compute/galleries/myGallery/applications/myApplication/versions/1.0.0" + }, + "treatFailureAsDeploymentFailure": { + "$id": "6659", + "kind": "boolean", + "type": { + "$ref": "2239" + }, + "value": false + }, + "vmGalleryTags": { + "$id": "6660", + "kind": "string", + "type": { + "$ref": "2235" + }, + "value": "{\"Tag1\":\"Value1\",\"Tag2\":\"Value2\"}" + } + } + } + ] + }, + "vmExtensions": { + "$id": "6661", + "kind": "array", + "type": { + "$ref": "1895" + }, + "value": [ + { + "$id": "6662", + "kind": "model", + "type": { + "$ref": "1896" + }, + "value": { + "$id": "6663", + "name": { + "$id": "6664", + "kind": "string", + "type": { + "$ref": "1898" + }, + "value": "Microsoft.Azure.Geneva.GenevaMonitoring" + }, + "properties": { + "$id": "6665", + "kind": "model", + "type": { + "$ref": "1902" + }, + "value": { + "$id": "6666", + "type": { + "$id": "6667", + "kind": "string", + "type": { + "$ref": "1908" + }, + "value": "GenevaMonitoring" + }, + "autoUpgradeMinorVersion": { + "$id": "6668", + "kind": "boolean", + "type": { + "$ref": "1916" + }, + "value": true + }, + "enableAutomaticUpgrade": { + "$id": "6669", + "kind": "boolean", + "type": { + "$ref": "1941" + }, + "value": true + }, + "forceUpdateTag": { + "$id": "6670", + "kind": "string", + "type": { + "$ref": "1928" + }, + "value": "v.1.0" + }, + "publisher": { + "$id": "6671", + "kind": "string", + "type": { + "$ref": "1904" + }, + "value": "Microsoft.Azure.Geneva" + }, + "settings": { + "$id": "6672", + "kind": "model", + "type": { + "$ref": "1920" + }, + "value": { + "$id": "6673" + } + }, + "setupOrder": { + "$id": "6674", + "kind": "array", + "type": { + "$ref": "1945" + }, + "value": [ + { + "$id": "6675", + "kind": "string", + "type": { + "$ref": "300" + }, + "value": "BeforeSFRuntime" + } + ] + }, + "typeHandlerVersion": { + "$id": "6676", + "kind": "string", + "type": { + "$ref": "1912" + }, + "value": "2.0" + } + } + } + } + } + ] + }, + "vmImageOffer": { + "$id": "6677", + "kind": "string", + "type": { + "$ref": "1857" + }, + "value": "WindowsServer" + }, + "vmImagePublisher": { + "$id": "6678", + "kind": "string", + "type": { + "$ref": "1853" + }, + "value": "MicrosoftWindowsServer" + }, + "vmImageSku": { + "$id": "6679", + "kind": "string", + "type": { + "$ref": "1861" + }, + "value": "2016-Datacenter-Server-Core" + }, + "vmImageVersion": { + "$id": "6680", + "kind": "string", + "type": { + "$ref": "1865" + }, + "value": "latest" + }, + "vmInstanceCount": { + "$id": "6681", + "kind": "number", + "type": { + "$ref": "1807" + }, + "value": 10 + }, + "vmManagedIdentity": { + "$id": "6682", + "kind": "model", + "type": { + "$ref": "1953" + }, + "value": { + "$id": "6683", + "userAssignedIdentities": { + "$id": "6684", + "kind": "array", + "type": { + "$ref": "1955" + }, + "value": [ + { + "$id": "6685", + "kind": "string", + "type": { + "$ref": "1956" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myIdentity" + }, + { + "$id": "6686", + "kind": "string", + "type": { + "$ref": "1956" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myIdentity2" + } + ] + } + } + }, + "vmSecrets": { + "$id": "6687", + "kind": "array", + "type": { + "$ref": "1869" + }, + "value": [ + { + "$id": "6688", + "kind": "model", + "type": { + "$ref": "1870" + }, + "value": { + "$id": "6689", + "sourceVault": { + "$id": "6690", + "kind": "model", + "type": { + "$ref": "1872" + }, + "value": { + "$id": "6691", + "id": { + "$id": "6692", + "kind": "string", + "type": { + "$ref": "1874" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.KeyVault/vaults/myVault" + } + } + }, + "vaultCertificates": { + "$id": "6693", + "kind": "array", + "type": { + "$ref": "1880" + }, + "value": [ + { + "$id": "6694", + "kind": "model", + "type": { + "$ref": "1881" + }, + "value": { + "$id": "6695", + "certificateStore": { + "$id": "6696", + "kind": "string", + "type": { + "$ref": "1887" + }, + "value": "My" + }, + "certificateUrl": { + "$id": "6697", + "kind": "string", + "type": { + "$ref": "1883" + }, + "value": "https://myVault.vault.azure.net:443/secrets/myCert/ef1a31d39e1f46bca33def54b6cda54c" + } + } + } + ] + } + } + } + ] + }, + "vmSetupActions": { + "$id": "6698", + "kind": "array", + "type": { + "$ref": "2074" + }, + "value": [ + { + "$id": "6699", + "kind": "string", + "type": { + "$ref": "316" + }, + "value": "EnableContainers" + }, + { + "$id": "6700", + "kind": "string", + "type": { + "$ref": "316" + }, + "value": "EnableHyperV" + } + ] + }, + "vmSize": { + "$id": "6701", + "kind": "string", + "type": { + "$ref": "1849" + }, + "value": "Standard_DS3" + }, + "zones": { + "$id": "6702", + "kind": "array", + "type": { + "$ref": "2040" + }, + "value": [ + { + "$id": "6703", + "kind": "string", + "type": { + "$ref": "2041" + }, + "value": "1" + }, + { + "$id": "6704", + "kind": "string", + "type": { + "$ref": "2041" + }, + "value": "2" + }, + { + "$id": "6705", + "kind": "string", + "type": { + "$ref": "2041" + }, + "value": "3" + } + ] + } + } + }, + "tags": { + "$id": "6706", + "kind": "dict", + "type": { + "$ref": "2253" + }, + "value": { + "$id": "6707" + } + } + } + } + } + ] + }, + { + "$id": "6708", + "kind": "http", + "name": "Put a node type with minimum parameters", + "description": "Put a node type with minimum parameters", + "filePath": "2025-03-01-preview/NodeTypePutOperation_example_min.json", + "parameters": [ + { + "$id": "6709", + "parameter": { + "$ref": "5906" + }, + "value": { + "$id": "6710", + "kind": "string", + "type": { + "$ref": "5907" + }, + "value": "2025-03-01-preview" + } + }, + { + "$id": "6711", + "parameter": { + "$ref": "5914" + }, + "value": { + "$id": "6712", + "kind": "string", + "type": { + "$ref": "5915" + }, + "value": "myCluster" + } + }, + { + "$id": "6713", + "parameter": { + "$ref": "5916" + }, + "value": { + "$id": "6714", + "kind": "string", + "type": { + "$ref": "5917" + }, + "value": "BE" + } + }, + { + "$id": "6715", + "parameter": { + "$ref": "5912" + }, + "value": { + "$id": "6716", + "kind": "string", + "type": { + "$ref": "5913" + }, + "value": "resRg" + } + }, + { + "$id": "6717", + "parameter": { + "$ref": "5910" + }, + "value": { + "$id": "6718", + "kind": "string", + "type": { + "$ref": "5911" + }, + "value": "00000000-0000-0000-0000-000000000000" + } + } + ], + "responses": [ + { + "$id": "6719", + "response": { + "$ref": "5925" + }, + "statusCode": 200, + "bodyValue": { + "$id": "6720", + "kind": "model", + "type": { + "$ref": "1799" + }, + "value": { + "$id": "6721", + "name": { + "$id": "6722", + "kind": "string", + "type": { + "$ref": "457" + }, + "value": "BE" + }, + "type": { + "$id": "6723", + "kind": "string", + "type": { + "$ref": "461" + }, + "value": "Microsoft.ServiceFabric/managedClusters/nodeTypes" + }, + "id": { + "$id": "6724", + "kind": "string", + "type": { + "$ref": "453" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/managedClusters/myCluster/nodeTypes/BE" + }, + "properties": { + "$id": "6725", + "kind": "model", + "type": { + "$ref": "1801" + }, + "value": { + "$id": "6726", + "capacities": { + "$id": "6727", + "kind": "dict", + "type": { + "$ref": "1828" + }, + "value": { + "$id": "6728" + } + }, + "dataDiskSizeGB": { + "$id": "6729", + "kind": "number", + "type": { + "$ref": "1811" + }, + "value": 200 + }, + "dataDiskType": { + "$id": "6730", + "kind": "string", + "type": { + "$ref": "286" + }, + "value": "StandardSSD_LRS" + }, + "isPrimary": { + "$id": "6731", + "kind": "boolean", + "type": { + "$ref": "1803" + }, + "value": false + }, + "isStateless": { + "$id": "6732", + "kind": "boolean", + "type": { + "$ref": "1962" + }, + "value": false + }, + "placementProperties": { + "$id": "6733", + "kind": "dict", + "type": { + "$ref": "1822" + }, + "value": { + "$id": "6734" + } + }, + "provisioningState": { + "$id": "6735", + "kind": "string", + "type": { + "$ref": "176" + }, + "value": "Creating" + }, + "vmImageOffer": { + "$id": "6736", + "kind": "string", + "type": { + "$ref": "1857" + }, + "value": "WindowsServer" + }, + "vmImagePublisher": { + "$id": "6737", + "kind": "string", + "type": { + "$ref": "1853" + }, + "value": "MicrosoftWindowsServer" + }, + "vmImageSku": { + "$id": "6738", + "kind": "string", + "type": { + "$ref": "1861" + }, + "value": "2016-Datacenter-Server-Core" + }, + "vmImageVersion": { + "$id": "6739", + "kind": "string", + "type": { + "$ref": "1865" + }, + "value": "latest" + }, + "vmInstanceCount": { + "$id": "6740", + "kind": "number", + "type": { + "$ref": "1807" + }, + "value": 10 + }, + "vmSize": { + "$id": "6741", + "kind": "string", + "type": { + "$ref": "1849" + }, + "value": "Standard_D3" + } + } + }, + "tags": { + "$id": "6742", + "kind": "dict", + "type": { + "$ref": "2253" + }, + "value": { + "$id": "6743" + } + } + } + } + }, + { + "$id": "6744", + "response": { + "$ref": "5926" + }, + "statusCode": 202, + "bodyValue": { + "$id": "6745", + "kind": "model", + "type": { + "$ref": "1799" + }, + "value": { + "$id": "6746", + "name": { + "$id": "6747", + "kind": "string", + "type": { + "$ref": "457" + }, + "value": "BE" + }, + "type": { + "$id": "6748", + "kind": "string", + "type": { + "$ref": "461" + }, + "value": "Microsoft.ServiceFabric/managedClusters/nodeTypes" + }, + "id": { + "$id": "6749", + "kind": "string", + "type": { + "$ref": "453" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/managedClusters/myCluster/nodeTypes/BE" + }, + "properties": { + "$id": "6750", + "kind": "model", + "type": { + "$ref": "1801" + }, + "value": { + "$id": "6751", + "capacities": { + "$id": "6752", + "kind": "dict", + "type": { + "$ref": "1828" + }, + "value": { + "$id": "6753" + } + }, + "dataDiskSizeGB": { + "$id": "6754", + "kind": "number", + "type": { + "$ref": "1811" + }, + "value": 200 + }, + "dataDiskType": { + "$id": "6755", + "kind": "string", + "type": { + "$ref": "286" + }, + "value": "StandardSSD_LRS" + }, + "isPrimary": { + "$id": "6756", + "kind": "boolean", + "type": { + "$ref": "1803" + }, + "value": false + }, + "isStateless": { + "$id": "6757", + "kind": "boolean", + "type": { + "$ref": "1962" + }, + "value": false + }, + "placementProperties": { + "$id": "6758", + "kind": "dict", + "type": { + "$ref": "1822" + }, + "value": { + "$id": "6759" + } + }, + "provisioningState": { + "$id": "6760", + "kind": "string", + "type": { + "$ref": "176" + }, + "value": "Updating" + }, + "vmImageOffer": { + "$id": "6761", + "kind": "string", + "type": { + "$ref": "1857" + }, + "value": "WindowsServer" + }, + "vmImagePublisher": { + "$id": "6762", + "kind": "string", + "type": { + "$ref": "1853" + }, + "value": "MicrosoftWindowsServer" + }, + "vmImageSku": { + "$id": "6763", + "kind": "string", + "type": { + "$ref": "1861" + }, + "value": "2016-Datacenter-Server-Core" + }, + "vmImageVersion": { + "$id": "6764", + "kind": "string", + "type": { + "$ref": "1865" + }, + "value": "latest" + }, + "vmInstanceCount": { + "$id": "6765", + "kind": "number", + "type": { + "$ref": "1807" + }, + "value": 10 + }, + "vmSize": { + "$id": "6766", + "kind": "string", + "type": { + "$ref": "1849" + }, + "value": "Standard_D3" + } + } + }, + "tags": { + "$id": "6767", + "kind": "dict", + "type": { + "$ref": "2253" + }, + "value": { + "$id": "6768" + } + } + } + } + } + ] + } + ] + }, + "parameters": [ + { + "$id": "6769", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "6770", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "6771", + "name": "clusterName", + "nameInRequest": "clusterName", + "doc": "The name of the cluster resource.", + "type": { + "$id": "6772", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "6773", + "name": "nodeTypeName", + "nameInRequest": "nodeTypeName", + "doc": "The name of the node type.", + "type": { + "$id": "6774", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "6775", + "name": "parameters", + "nameInRequest": "resource", + "doc": "The node type resource.", + "type": { + "$ref": "1799" + }, + "location": "Body", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "6776", + "name": "contentType", + "nameInRequest": "contentType", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$id": "6777", + "kind": "constant", + "valueType": { + "$id": "6778", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "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": "6779", + "name": "accept", + "nameInRequest": "accept", + "type": { + "$id": "6780", + "kind": "constant", + "valueType": { + "$id": "6781", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "response": { + "$id": "6782", + "type": { + "$ref": "1799" + } + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypes.createOrUpdate", + "lroMetadata": { + "$id": "6783", + "finalStateVia": 1, + "finalResponse": { + "$id": "6784", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "1799" + } + } + } + }, + { + "$id": "6785", + "kind": "lro", + "name": "update", + "accessibility": "public", + "apiVersions": [ + "2024-11-01-preview", + "2025-03-01-preview" + ], + "doc": "Update the configuration of a node type of a given managed cluster, only updating tags.", + "operation": { + "$id": "6786", + "name": "update", + "resourceName": "NodeType", + "doc": "Update the configuration of a node type of a given managed cluster, only updating tags.", + "accessibility": "public", + "parameters": [ + { + "$id": "6787", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "6788", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "6789", + "type": { + "$id": "6790", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-03-01-preview" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "6791", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "6792", + "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": "6793", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "6794", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "6795", + "name": "clusterName", + "nameInRequest": "clusterName", + "doc": "The name of the cluster resource.", + "type": { + "$id": "6796", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "6797", + "name": "nodeTypeName", + "nameInRequest": "nodeTypeName", + "doc": "The name of the node type.", + "type": { + "$id": "6798", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "6799", + "name": "contentType", + "nameInRequest": "Content-Type", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$id": "6800", + "kind": "constant", + "valueType": { + "$id": "6801", + "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": "6802", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "6803", + "kind": "constant", + "valueType": { + "$id": "6804", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "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": "6805", + "name": "parameters", + "nameInRequest": "parameters", + "doc": "The parameters to update the node type configuration.", + "type": { + "$ref": "2274" + }, + "location": "Body", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "6806", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "1799" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + }, + { + "$id": "6807", + "statusCodes": [ + 202 + ], + "headers": [ + { + "$id": "6808", + "name": "azureAsyncOperation", + "nameInResponse": "Azure-AsyncOperation", + "doc": "A link to the status monitor", + "type": { + "$id": "6809", + "kind": "url", + "name": "ResourceLocation", + "crossLanguageDefinitionId": "TypeSpec.Rest.ResourceLocation", + "baseType": { + "$id": "6810", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url", + "decorators": [] + }, + "decorators": [] + } + }, + { + "$id": "6811", + "name": "location", + "nameInResponse": "Location", + "doc": "The Location header contains the URL where the status of the long running operation can be checked.", + "type": { + "$id": "6812", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + } + ], + "isErrorResponse": false + } + ], + "httpMethod": "PATCH", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/nodeTypes/{nodeTypeName}", + "requestMediaTypes": [ + "application/json" + ], + "bufferResponse": true, + "generateProtocolMethod": true, + "generateConvenienceMethod": false, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypes.update", + "decorators": [], + "examples": [ + { + "$id": "6813", + "kind": "http", + "name": "Patch a node type while auto-scaling", + "description": "Patch a node type while auto-scaling", + "filePath": "2025-03-01-preview/NodeTypePatchOperationAutoScale_example.json", + "parameters": [ + { + "$id": "6814", + "parameter": { + "$ref": "6787" + }, + "value": { + "$id": "6815", + "kind": "string", + "type": { + "$ref": "6788" + }, + "value": "2025-03-01-preview" + } + }, + { + "$id": "6816", + "parameter": { + "$ref": "6795" + }, + "value": { + "$id": "6817", + "kind": "string", + "type": { + "$ref": "6796" + }, + "value": "myCluster" + } + }, + { + "$id": "6818", + "parameter": { + "$ref": "6797" + }, + "value": { + "$id": "6819", + "kind": "string", + "type": { + "$ref": "6798" + }, + "value": "BE" + } + }, + { + "$id": "6820", + "parameter": { + "$ref": "6793" + }, + "value": { + "$id": "6821", + "kind": "string", + "type": { + "$ref": "6794" + }, + "value": "resRg" + } + }, + { + "$id": "6822", + "parameter": { + "$ref": "6791" + }, + "value": { + "$id": "6823", + "kind": "string", + "type": { + "$ref": "6792" + }, + "value": "00000000-0000-0000-0000-000000000000" + } + } + ], + "responses": [ + { + "$id": "6824", + "response": { + "$ref": "6806" + }, + "statusCode": 200, + "bodyValue": { + "$id": "6825", + "kind": "model", + "type": { + "$ref": "1799" + }, + "value": { + "$id": "6826", + "name": { + "$id": "6827", + "kind": "string", + "type": { + "$ref": "457" + }, + "value": "BE" + }, + "type": { + "$id": "6828", + "kind": "string", + "type": { + "$ref": "461" + }, + "value": "Microsoft.ServiceFabric/managedClusters/nodeTypes" + }, + "id": { + "$id": "6829", + "kind": "string", + "type": { + "$ref": "453" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/managedClusters/myCluster/nodeTypes/BE" + }, + "properties": { + "$id": "6830", + "kind": "model", + "type": { + "$ref": "1801" + }, + "value": { + "$id": "6831", + "capacities": { + "$id": "6832", + "kind": "dict", + "type": { + "$ref": "1828" + }, + "value": { + "$id": "6833", + "ClientConnections": { + "$id": "6834", + "kind": "string", + "type": { + "$ref": "1830" + }, + "value": "65536" + } + } + }, + "dataDiskSizeGB": { + "$id": "6835", + "kind": "number", + "type": { + "$ref": "1811" + }, + "value": 200 + }, + "dataDiskType": { + "$id": "6836", + "kind": "string", + "type": { + "$ref": "286" + }, + "value": "StandardSSD_LRS" + }, + "isPrimary": { + "$id": "6837", + "kind": "boolean", + "type": { + "$ref": "1803" + }, + "value": false + }, + "isStateless": { + "$id": "6838", + "kind": "boolean", + "type": { + "$ref": "1962" + }, + "value": false + }, + "placementProperties": { + "$id": "6839", + "kind": "dict", + "type": { + "$ref": "1822" + }, + "value": { + "$id": "6840", + "HasSSD": { + "$id": "6841", + "kind": "string", + "type": { + "$ref": "1824" + }, + "value": "true" + }, + "NodeColor": { + "$id": "6842", + "kind": "string", + "type": { + "$ref": "1824" + }, + "value": "green" + }, + "SomeProperty": { + "$id": "6843", + "kind": "string", + "type": { + "$ref": "1824" + }, + "value": "5" + } + } + }, + "provisioningState": { + "$id": "6844", + "kind": "string", + "type": { + "$ref": "176" + }, + "value": "Succeeded" + }, + "vmExtensions": { + "$id": "6845", + "kind": "array", + "type": { + "$ref": "1895" + }, + "value": [ + { + "$id": "6846", + "kind": "model", + "type": { + "$ref": "1896" + }, + "value": { + "$id": "6847", + "name": { + "$id": "6848", + "kind": "string", + "type": { + "$ref": "1898" + }, + "value": "Microsoft.Azure.Geneva.GenevaMonitoring" + }, + "properties": { + "$id": "6849", + "kind": "model", + "type": { + "$ref": "1902" + }, + "value": { + "$id": "6850", + "type": { + "$id": "6851", + "kind": "string", + "type": { + "$ref": "1908" + }, + "value": "GenevaMonitoring" + }, + "autoUpgradeMinorVersion": { + "$id": "6852", + "kind": "boolean", + "type": { + "$ref": "1916" + }, + "value": true + }, + "publisher": { + "$id": "6853", + "kind": "string", + "type": { + "$ref": "1904" + }, + "value": "Microsoft.Azure.Geneva" + }, + "settings": { + "$id": "6854", + "kind": "model", + "type": { + "$ref": "1920" + }, + "value": { + "$id": "6855" + } + }, + "typeHandlerVersion": { + "$id": "6856", + "kind": "string", + "type": { + "$ref": "1912" + }, + "value": "2.0" + } + } + } + } + } + ] + }, + "vmImageOffer": { + "$id": "6857", + "kind": "string", + "type": { + "$ref": "1857" + }, + "value": "WindowsServer" + }, + "vmImagePublisher": { + "$id": "6858", + "kind": "string", + "type": { + "$ref": "1853" + }, + "value": "MicrosoftWindowsServer" + }, + "vmImageSku": { + "$id": "6859", + "kind": "string", + "type": { + "$ref": "1861" + }, + "value": "2016-Datacenter-Server-Core" + }, + "vmImageVersion": { + "$id": "6860", + "kind": "string", + "type": { + "$ref": "1865" + }, + "value": "latest" + }, + "vmInstanceCount": { + "$id": "6861", + "kind": "number", + "type": { + "$ref": "1807" + }, + "value": 10 + }, + "vmManagedIdentity": { + "$id": "6862", + "kind": "model", + "type": { + "$ref": "1953" + }, + "value": { + "$id": "6863", + "userAssignedIdentities": { + "$id": "6864", + "kind": "array", + "type": { + "$ref": "1955" + }, + "value": [ + { + "$id": "6865", + "kind": "string", + "type": { + "$ref": "1956" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myIdentity" + } + ] + } + } + }, + "vmSecrets": { + "$id": "6866", + "kind": "array", + "type": { + "$ref": "1869" + }, + "value": [ + { + "$id": "6867", + "kind": "model", + "type": { + "$ref": "1870" + }, + "value": { + "$id": "6868", + "sourceVault": { + "$id": "6869", + "kind": "model", + "type": { + "$ref": "1872" + }, + "value": { + "$id": "6870", + "id": { + "$id": "6871", + "kind": "string", + "type": { + "$ref": "1874" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.KeyVault/vaults/myVault" + } + } + }, + "vaultCertificates": { + "$id": "6872", + "kind": "array", + "type": { + "$ref": "1880" + }, + "value": [ + { + "$id": "6873", + "kind": "model", + "type": { + "$ref": "1881" + }, + "value": { + "$id": "6874", + "certificateStore": { + "$id": "6875", + "kind": "string", + "type": { + "$ref": "1887" + }, + "value": "My" + }, + "certificateUrl": { + "$id": "6876", + "kind": "string", + "type": { + "$ref": "1883" + }, + "value": "https://myVault.vault.azure.net:443/secrets/myCert/ef1a31d39e1f46bca33def54b6cda54c" + } + } + } + ] + } + } + } + ] + }, + "vmSize": { + "$id": "6877", + "kind": "string", + "type": { + "$ref": "1849" + }, + "value": "Standard_D3" + } + } + }, + "sku": { + "$id": "6878", + "kind": "model", + "type": { + "$ref": "2259" + }, + "value": { + "$id": "6879", + "name": { + "$id": "6880", + "kind": "string", + "type": { + "$ref": "2261" + }, + "value": "Standard_S0" + }, + "capacity": { + "$id": "6881", + "kind": "number", + "type": { + "$ref": "2269" + }, + "value": 10 + }, + "tier": { + "$id": "6882", + "kind": "string", + "type": { + "$ref": "2265" + }, + "value": "Standard" + } + } + }, + "tags": { + "$id": "6883", + "kind": "dict", + "type": { + "$ref": "2253" + }, + "value": { + "$id": "6884", + "a": { + "$id": "6885", + "kind": "string", + "type": { + "$ref": "2255" + }, + "value": "b" + } + } + } + } + } + }, + { + "$id": "6886", + "response": { + "$ref": "6807" + }, + "statusCode": 202 + } + ] + }, + { + "$id": "6887", + "kind": "http", + "name": "Patch a node type", + "description": "Patch a node type", + "filePath": "2025-03-01-preview/NodeTypePatchOperation_example.json", + "parameters": [ + { + "$id": "6888", + "parameter": { + "$ref": "6787" + }, + "value": { + "$id": "6889", + "kind": "string", + "type": { + "$ref": "6788" + }, + "value": "2025-03-01-preview" + } + }, + { + "$id": "6890", + "parameter": { + "$ref": "6795" + }, + "value": { + "$id": "6891", + "kind": "string", + "type": { + "$ref": "6796" + }, + "value": "myCluster" + } + }, + { + "$id": "6892", + "parameter": { + "$ref": "6797" + }, + "value": { + "$id": "6893", + "kind": "string", + "type": { + "$ref": "6798" + }, + "value": "BE" + } + }, + { + "$id": "6894", + "parameter": { + "$ref": "6793" + }, + "value": { + "$id": "6895", + "kind": "string", + "type": { + "$ref": "6794" + }, + "value": "resRg" + } + }, + { + "$id": "6896", + "parameter": { + "$ref": "6791" + }, + "value": { + "$id": "6897", + "kind": "string", + "type": { + "$ref": "6792" + }, + "value": "00000000-0000-0000-0000-000000000000" + } + } + ], + "responses": [ + { + "$id": "6898", + "response": { + "$ref": "6806" + }, + "statusCode": 200, + "bodyValue": { + "$id": "6899", + "kind": "model", + "type": { + "$ref": "1799" + }, + "value": { + "$id": "6900", + "name": { + "$id": "6901", + "kind": "string", + "type": { + "$ref": "457" + }, + "value": "BE" + }, + "type": { + "$id": "6902", + "kind": "string", + "type": { + "$ref": "461" + }, + "value": "Microsoft.ServiceFabric/managedClusters/nodeTypes" + }, + "id": { + "$id": "6903", + "kind": "string", + "type": { + "$ref": "453" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/managedClusters/myCluster/nodeTypes/BE" + }, + "properties": { + "$id": "6904", + "kind": "model", + "type": { + "$ref": "1801" + }, + "value": { + "$id": "6905", + "capacities": { + "$id": "6906", + "kind": "dict", + "type": { + "$ref": "1828" + }, + "value": { + "$id": "6907", + "ClientConnections": { + "$id": "6908", + "kind": "string", + "type": { + "$ref": "1830" + }, + "value": "65536" + } + } + }, + "dataDiskSizeGB": { + "$id": "6909", + "kind": "number", + "type": { + "$ref": "1811" + }, + "value": 200 + }, + "dataDiskType": { + "$id": "6910", + "kind": "string", + "type": { + "$ref": "286" + }, + "value": "StandardSSD_LRS" + }, + "isPrimary": { + "$id": "6911", + "kind": "boolean", + "type": { + "$ref": "1803" + }, + "value": false + }, + "isStateless": { + "$id": "6912", + "kind": "boolean", + "type": { + "$ref": "1962" + }, + "value": false + }, + "placementProperties": { + "$id": "6913", + "kind": "dict", + "type": { + "$ref": "1822" + }, + "value": { + "$id": "6914", + "HasSSD": { + "$id": "6915", + "kind": "string", + "type": { + "$ref": "1824" + }, + "value": "true" + }, + "NodeColor": { + "$id": "6916", + "kind": "string", + "type": { + "$ref": "1824" + }, + "value": "green" + }, + "SomeProperty": { + "$id": "6917", + "kind": "string", + "type": { + "$ref": "1824" + }, + "value": "5" + } + } + }, + "provisioningState": { + "$id": "6918", + "kind": "string", + "type": { + "$ref": "176" + }, + "value": "Succeeded" + }, + "vmExtensions": { + "$id": "6919", + "kind": "array", + "type": { + "$ref": "1895" + }, + "value": [ + { + "$id": "6920", + "kind": "model", + "type": { + "$ref": "1896" + }, + "value": { + "$id": "6921", + "name": { + "$id": "6922", + "kind": "string", + "type": { + "$ref": "1898" + }, + "value": "Microsoft.Azure.Geneva.GenevaMonitoring" + }, + "properties": { + "$id": "6923", + "kind": "model", + "type": { + "$ref": "1902" + }, + "value": { + "$id": "6924", + "type": { + "$id": "6925", + "kind": "string", + "type": { + "$ref": "1908" + }, + "value": "GenevaMonitoring" + }, + "autoUpgradeMinorVersion": { + "$id": "6926", + "kind": "boolean", + "type": { + "$ref": "1916" + }, + "value": true + }, + "publisher": { + "$id": "6927", + "kind": "string", + "type": { + "$ref": "1904" + }, + "value": "Microsoft.Azure.Geneva" + }, + "settings": { + "$id": "6928", + "kind": "model", + "type": { + "$ref": "1920" + }, + "value": { + "$id": "6929" + } + }, + "typeHandlerVersion": { + "$id": "6930", + "kind": "string", + "type": { + "$ref": "1912" + }, + "value": "2.0" + } + } + } + } + } + ] + }, + "vmImageOffer": { + "$id": "6931", + "kind": "string", + "type": { + "$ref": "1857" + }, + "value": "WindowsServer" + }, + "vmImagePublisher": { + "$id": "6932", + "kind": "string", + "type": { + "$ref": "1853" + }, + "value": "MicrosoftWindowsServer" + }, + "vmImageSku": { + "$id": "6933", + "kind": "string", + "type": { + "$ref": "1861" + }, + "value": "2016-Datacenter-Server-Core" + }, + "vmImageVersion": { + "$id": "6934", + "kind": "string", + "type": { + "$ref": "1865" + }, + "value": "latest" + }, + "vmInstanceCount": { + "$id": "6935", + "kind": "number", + "type": { + "$ref": "1807" + }, + "value": 10 + }, + "vmManagedIdentity": { + "$id": "6936", + "kind": "model", + "type": { + "$ref": "1953" + }, + "value": { + "$id": "6937", + "userAssignedIdentities": { + "$id": "6938", + "kind": "array", + "type": { + "$ref": "1955" + }, + "value": [ + { + "$id": "6939", + "kind": "string", + "type": { + "$ref": "1956" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myIdentity" + } + ] + } + } + }, + "vmSecrets": { + "$id": "6940", + "kind": "array", + "type": { + "$ref": "1869" + }, + "value": [ + { + "$id": "6941", + "kind": "model", + "type": { + "$ref": "1870" + }, + "value": { + "$id": "6942", + "sourceVault": { + "$id": "6943", + "kind": "model", + "type": { + "$ref": "1872" + }, + "value": { + "$id": "6944", + "id": { + "$id": "6945", + "kind": "string", + "type": { + "$ref": "1874" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.KeyVault/vaults/myVault" + } + } + }, + "vaultCertificates": { + "$id": "6946", + "kind": "array", + "type": { + "$ref": "1880" + }, + "value": [ + { + "$id": "6947", + "kind": "model", + "type": { + "$ref": "1881" + }, + "value": { + "$id": "6948", + "certificateStore": { + "$id": "6949", + "kind": "string", + "type": { + "$ref": "1887" + }, + "value": "My" + }, + "certificateUrl": { + "$id": "6950", + "kind": "string", + "type": { + "$ref": "1883" + }, + "value": "https://myVault.vault.azure.net:443/secrets/myCert/ef1a31d39e1f46bca33def54b6cda54c" + } + } + } + ] + } + } + } + ] + }, + "vmSize": { + "$id": "6951", + "kind": "string", + "type": { + "$ref": "1849" + }, + "value": "Standard_D3" + } + } + }, + "tags": { + "$id": "6952", + "kind": "dict", + "type": { + "$ref": "2253" + }, + "value": { + "$id": "6953", + "a": { + "$id": "6954", + "kind": "string", + "type": { + "$ref": "2255" + }, + "value": "b" + } + } + } + } + } + }, + { + "$id": "6955", + "response": { + "$ref": "6807" + }, + "statusCode": 202 + } + ] + } + ] + }, + "parameters": [ + { + "$id": "6956", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "6957", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "6958", + "name": "clusterName", + "nameInRequest": "clusterName", + "doc": "The name of the cluster resource.", + "type": { + "$id": "6959", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "6960", + "name": "nodeTypeName", + "nameInRequest": "nodeTypeName", + "doc": "The name of the node type.", + "type": { + "$id": "6961", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "6962", + "name": "parameters", + "nameInRequest": "properties", + "doc": "The parameters to update the node type configuration.", + "type": { + "$ref": "2274" + }, + "location": "Body", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "6963", + "name": "contentType", + "nameInRequest": "contentType", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$id": "6964", + "kind": "constant", + "valueType": { + "$id": "6965", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "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": "6966", + "name": "accept", + "nameInRequest": "accept", + "type": { + "$id": "6967", + "kind": "constant", + "valueType": { + "$id": "6968", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "response": { + "$id": "6969", + "type": { + "$ref": "1799" + } + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypes.update", + "lroMetadata": { + "$id": "6970", + "finalStateVia": 1, + "finalResponse": { + "$id": "6971", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "1799" + } + } + } + }, + { + "$id": "6972", + "kind": "lro", + "name": "delete", + "accessibility": "public", + "apiVersions": [ + "2024-11-01-preview", + "2025-03-01-preview" + ], + "doc": "Delete a Service Fabric node type of a given managed cluster.", + "operation": { + "$id": "6973", + "name": "delete", + "resourceName": "NodeType", + "doc": "Delete a Service Fabric node type of a given managed cluster.", + "accessibility": "public", + "parameters": [ + { + "$id": "6974", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "6975", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "6976", + "type": { + "$id": "6977", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-03-01-preview" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "6978", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "6979", + "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": "6980", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "6981", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "6982", + "name": "clusterName", + "nameInRequest": "clusterName", + "doc": "The name of the cluster resource.", + "type": { + "$id": "6983", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "6984", + "name": "nodeTypeName", + "nameInRequest": "nodeTypeName", + "doc": "The name of the node type.", + "type": { + "$id": "6985", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "6986", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "6987", + "kind": "constant", + "valueType": { + "$id": "6988", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "6989", + "statusCodes": [ + 202 + ], + "headers": [ + { + "$id": "6990", + "name": "azureAsyncOperation", + "nameInResponse": "Azure-AsyncOperation", + "doc": "A link to the status monitor", + "type": { + "$id": "6991", + "kind": "url", + "name": "ResourceLocation", + "crossLanguageDefinitionId": "TypeSpec.Rest.ResourceLocation", + "baseType": { + "$id": "6992", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url", + "decorators": [] + }, + "decorators": [] + } + }, + { + "$id": "6993", + "name": "location", + "nameInResponse": "Location", + "doc": "The Location header contains the URL where the status of the long running operation can be checked.", + "type": { + "$id": "6994", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + } + ], + "isErrorResponse": false + }, + { + "$id": "6995", + "statusCodes": [ + 204 + ], + "headers": [], + "isErrorResponse": false + } + ], + "httpMethod": "DELETE", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/nodeTypes/{nodeTypeName}", + "bufferResponse": true, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypes.delete", + "decorators": [], + "examples": [ + { + "$id": "6996", + "kind": "http", + "name": "Delete a node type", + "description": "Delete a node type", + "filePath": "2025-03-01-preview/NodeTypeDeleteOperation_example.json", + "parameters": [ + { + "$id": "6997", + "parameter": { + "$ref": "6974" + }, + "value": { + "$id": "6998", + "kind": "string", + "type": { + "$ref": "6975" + }, + "value": "2025-03-01-preview" + } + }, + { + "$id": "6999", + "parameter": { + "$ref": "6982" + }, + "value": { + "$id": "7000", + "kind": "string", + "type": { + "$ref": "6983" + }, + "value": "myCluster" + } + }, + { + "$id": "7001", + "parameter": { + "$ref": "6984" + }, + "value": { + "$id": "7002", + "kind": "string", + "type": { + "$ref": "6985" + }, + "value": "BE" + } + }, + { + "$id": "7003", + "parameter": { + "$ref": "6980" + }, + "value": { + "$id": "7004", + "kind": "string", + "type": { + "$ref": "6981" + }, + "value": "resRg" + } + }, + { + "$id": "7005", + "parameter": { + "$ref": "6978" + }, + "value": { + "$id": "7006", + "kind": "string", + "type": { + "$ref": "6979" + }, + "value": "00000000-0000-0000-0000-000000000000" + } + } + ], + "responses": [ + { + "$id": "7007", + "response": { + "$ref": "6989" + }, + "statusCode": 202 + }, + { + "$id": "7008", + "response": { + "$ref": "6995" + }, + "statusCode": 204 + } + ] + } + ] + }, + "parameters": [ + { + "$id": "7009", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "7010", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7011", + "name": "clusterName", + "nameInRequest": "clusterName", + "doc": "The name of the cluster resource.", + "type": { + "$id": "7012", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7013", + "name": "nodeTypeName", + "nameInRequest": "nodeTypeName", + "doc": "The name of the node type.", + "type": { + "$id": "7014", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7015", + "name": "accept", + "nameInRequest": "accept", + "type": { + "$id": "7016", + "kind": "constant", + "valueType": { + "$id": "7017", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "response": { + "$id": "7018" + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypes.delete", + "lroMetadata": { + "$id": "7019", + "finalStateVia": 1, + "finalResponse": { + "$id": "7020", + "statusCodes": [ + 204 + ] + } + } + }, + { + "$id": "7021", + "kind": "paging", + "name": "listByManagedClusters", + "accessibility": "public", + "apiVersions": [ + "2024-11-01-preview", + "2025-03-01-preview" + ], + "doc": "Gets all Node types of the specified managed cluster.", + "operation": { + "$id": "7022", + "name": "listByManagedClusters", + "resourceName": "NodeType", + "doc": "Gets all Node types of the specified managed cluster.", + "accessibility": "public", + "parameters": [ + { + "$id": "7023", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "7024", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "7025", + "type": { + "$id": "7026", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-03-01-preview" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7027", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "7028", + "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": "7029", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "7030", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7031", + "name": "clusterName", + "nameInRequest": "clusterName", + "doc": "The name of the cluster resource.", + "type": { + "$id": "7032", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7033", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "7034", + "kind": "constant", + "valueType": { + "$id": "7035", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "7036", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "2284" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "GET", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/nodeTypes", + "bufferResponse": true, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypes.listByManagedClusters", + "decorators": [], + "examples": [ + { + "$id": "7037", + "kind": "http", + "name": "List node type of the specified managed cluster", + "description": "List node type of the specified managed cluster", + "filePath": "2025-03-01-preview/NodeTypeListOperation_example.json", + "parameters": [ + { + "$id": "7038", + "parameter": { + "$ref": "7023" + }, + "value": { + "$id": "7039", + "kind": "string", + "type": { + "$ref": "7024" + }, + "value": "2025-03-01-preview" + } + }, + { + "$id": "7040", + "parameter": { + "$ref": "7031" + }, + "value": { + "$id": "7041", + "kind": "string", + "type": { + "$ref": "7032" + }, + "value": "myCluster" + } + }, + { + "$id": "7042", + "parameter": { + "$ref": "7029" + }, + "value": { + "$id": "7043", + "kind": "string", + "type": { + "$ref": "7030" + }, + "value": "resRg" + } + }, + { + "$id": "7044", + "parameter": { + "$ref": "7027" + }, + "value": { + "$id": "7045", + "kind": "string", + "type": { + "$ref": "7028" + }, + "value": "00000000-0000-0000-0000-000000000000" + } + } + ], + "responses": [ + { + "$id": "7046", + "response": { + "$ref": "7036" + }, + "statusCode": 200, + "bodyValue": { + "$id": "7047", + "kind": "model", + "type": { + "$ref": "2284" + }, + "value": { + "$id": "7048", + "nextLink": { + "$id": "7049", + "kind": "string", + "type": { + "$ref": "2290" + }, + "value": "http://examplelink.com" + }, + "value": { + "$id": "7050", + "kind": "array", + "type": { + "$ref": "2286" + }, + "value": [ + { + "$id": "7051", + "kind": "model", + "type": { + "$ref": "1799" + }, + "value": { + "$id": "7052", + "name": { + "$id": "7053", + "kind": "string", + "type": { + "$ref": "457" + }, + "value": "FE" + }, + "type": { + "$id": "7054", + "kind": "string", + "type": { + "$ref": "461" + }, + "value": "Microsoft.ServiceFabric/managedClusters/nodeTypes" + }, + "id": { + "$id": "7055", + "kind": "string", + "type": { + "$ref": "453" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/managedClusters/myCluster/nodeTypes/FE" + }, + "properties": { + "$id": "7056", + "kind": "model", + "type": { + "$ref": "1801" + }, + "value": { + "$id": "7057", + "capacities": { + "$id": "7058", + "kind": "dict", + "type": { + "$ref": "1828" + }, + "value": { + "$id": "7059" + } + }, + "dataDiskSizeGB": { + "$id": "7060", + "kind": "number", + "type": { + "$ref": "1811" + }, + "value": 100 + }, + "dataDiskType": { + "$id": "7061", + "kind": "string", + "type": { + "$ref": "286" + }, + "value": "StandardSSD_LRS" + }, + "isPrimary": { + "$id": "7062", + "kind": "boolean", + "type": { + "$ref": "1803" + }, + "value": true + }, + "isStateless": { + "$id": "7063", + "kind": "boolean", + "type": { + "$ref": "1962" + }, + "value": false + }, + "placementProperties": { + "$id": "7064", + "kind": "dict", + "type": { + "$ref": "1822" + }, + "value": { + "$id": "7065" + } + }, + "vmImageOffer": { + "$id": "7066", + "kind": "string", + "type": { + "$ref": "1857" + }, + "value": "WindowsServer" + }, + "vmImagePublisher": { + "$id": "7067", + "kind": "string", + "type": { + "$ref": "1853" + }, + "value": "MicrosoftWindowsServer" + }, + "vmImageSku": { + "$id": "7068", + "kind": "string", + "type": { + "$ref": "1861" + }, + "value": "2016-Datacenter" + }, + "vmImageVersion": { + "$id": "7069", + "kind": "string", + "type": { + "$ref": "1865" + }, + "value": "latest" + }, + "vmInstanceCount": { + "$id": "7070", + "kind": "number", + "type": { + "$ref": "1807" + }, + "value": 5 + }, + "vmSize": { + "$id": "7071", + "kind": "string", + "type": { + "$ref": "1849" + }, + "value": "Standard_D2" + } + } + }, + "sku": { + "$id": "7072", + "kind": "model", + "type": { + "$ref": "2259" + }, + "value": { + "$id": "7073", + "name": { + "$id": "7074", + "kind": "string", + "type": { + "$ref": "2261" + }, + "value": "Standard_P0" + }, + "capacity": { + "$id": "7075", + "kind": "number", + "type": { + "$ref": "2269" + }, + "value": 5 + }, + "tier": { + "$id": "7076", + "kind": "string", + "type": { + "$ref": "2265" + }, + "value": "Standard" + } + } + }, + "tags": { + "$id": "7077", + "kind": "dict", + "type": { + "$ref": "2253" + }, + "value": { + "$id": "7078" + } + } + } + }, + { + "$id": "7079", + "kind": "model", + "type": { + "$ref": "1799" + }, + "value": { + "$id": "7080", + "name": { + "$id": "7081", + "kind": "string", + "type": { + "$ref": "457" + }, + "value": "BE" + }, + "type": { + "$id": "7082", + "kind": "string", + "type": { + "$ref": "461" + }, + "value": "Microsoft.ServiceFabric/managedClusters/nodeTypes" + }, + "id": { + "$id": "7083", + "kind": "string", + "type": { + "$ref": "453" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/managedClusters/myCluster/nodeTypes/BE" + }, + "properties": { + "$id": "7084", + "kind": "model", + "type": { + "$ref": "1801" + }, + "value": { + "$id": "7085", + "capacities": { + "$id": "7086", + "kind": "dict", + "type": { + "$ref": "1828" + }, + "value": { + "$id": "7087" + } + }, + "dataDiskSizeGB": { + "$id": "7088", + "kind": "number", + "type": { + "$ref": "1811" + }, + "value": 200 + }, + "dataDiskType": { + "$id": "7089", + "kind": "string", + "type": { + "$ref": "286" + }, + "value": "Premium_LRS" + }, + "isPrimary": { + "$id": "7090", + "kind": "boolean", + "type": { + "$ref": "1803" + }, + "value": false + }, + "isStateless": { + "$id": "7091", + "kind": "boolean", + "type": { + "$ref": "1962" + }, + "value": false + }, + "placementProperties": { + "$id": "7092", + "kind": "dict", + "type": { + "$ref": "1822" + }, + "value": { + "$id": "7093" + } + }, + "vmExtensions": { + "$id": "7094", + "kind": "array", + "type": { + "$ref": "1895" + }, + "value": [ + { + "$id": "7095", + "kind": "model", + "type": { + "$ref": "1896" + }, + "value": { + "$id": "7096", + "name": { + "$id": "7097", + "kind": "string", + "type": { + "$ref": "1898" + }, + "value": "Microsoft.Azure.Geneva.GenevaMonitoring" + }, + "properties": { + "$id": "7098", + "kind": "model", + "type": { + "$ref": "1902" + }, + "value": { + "$id": "7099", + "type": { + "$id": "7100", + "kind": "string", + "type": { + "$ref": "1908" + }, + "value": "GenevaMonitoring" + }, + "autoUpgradeMinorVersion": { + "$id": "7101", + "kind": "boolean", + "type": { + "$ref": "1916" + }, + "value": true + }, + "publisher": { + "$id": "7102", + "kind": "string", + "type": { + "$ref": "1904" + }, + "value": "Microsoft.Azure.Geneva" + }, + "settings": { + "$id": "7103", + "kind": "model", + "type": { + "$ref": "1920" + }, + "value": { + "$id": "7104" + } + }, + "typeHandlerVersion": { + "$id": "7105", + "kind": "string", + "type": { + "$ref": "1912" + }, + "value": "2.0" + } + } + } + } + } + ] + }, + "vmImageOffer": { + "$id": "7106", + "kind": "string", + "type": { + "$ref": "1857" + }, + "value": "WindowsServer" + }, + "vmImagePublisher": { + "$id": "7107", + "kind": "string", + "type": { + "$ref": "1853" + }, + "value": "MicrosoftWindowsServer" + }, + "vmImageSku": { + "$id": "7108", + "kind": "string", + "type": { + "$ref": "1861" + }, + "value": "2016-Datacenter-Server-Core" + }, + "vmImageVersion": { + "$id": "7109", + "kind": "string", + "type": { + "$ref": "1865" + }, + "value": "latest" + }, + "vmInstanceCount": { + "$id": "7110", + "kind": "number", + "type": { + "$ref": "1807" + }, + "value": 10 + }, + "vmSecrets": { + "$id": "7111", + "kind": "array", + "type": { + "$ref": "1869" + }, + "value": [ + { + "$id": "7112", + "kind": "model", + "type": { + "$ref": "1870" + }, + "value": { + "$id": "7113", + "sourceVault": { + "$id": "7114", + "kind": "model", + "type": { + "$ref": "1872" + }, + "value": { + "$id": "7115", + "id": { + "$id": "7116", + "kind": "string", + "type": { + "$ref": "1874" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.KeyVault/vaults/myVault" + } + } + }, + "vaultCertificates": { + "$id": "7117", + "kind": "array", + "type": { + "$ref": "1880" + }, + "value": [ + { + "$id": "7118", + "kind": "model", + "type": { + "$ref": "1881" + }, + "value": { + "$id": "7119", + "certificateStore": { + "$id": "7120", + "kind": "string", + "type": { + "$ref": "1887" + }, + "value": "My" + }, + "certificateUrl": { + "$id": "7121", + "kind": "string", + "type": { + "$ref": "1883" + }, + "value": "https://myVault.vault.azure.net:443/secrets/myCert/ef1a31d39e1f46bca33def54b6cda54c" + } + } + } + ] + } + } + } + ] + }, + "vmSize": { + "$id": "7122", + "kind": "string", + "type": { + "$ref": "1849" + }, + "value": "Standard_DS3" + } + } + }, + "sku": { + "$id": "7123", + "kind": "model", + "type": { + "$ref": "2259" + }, + "value": { + "$id": "7124", + "name": { + "$id": "7125", + "kind": "string", + "type": { + "$ref": "2261" + }, + "value": "Standard_S0" + }, + "capacity": { + "$id": "7126", + "kind": "number", + "type": { + "$ref": "2269" + }, + "value": 10 + }, + "tier": { + "$id": "7127", + "kind": "string", + "type": { + "$ref": "2265" + }, + "value": "Standard" + } + } + }, + "tags": { + "$id": "7128", + "kind": "dict", + "type": { + "$ref": "2253" + }, + "value": { + "$id": "7129" + } + } + } + } + ] + } + } + } + } + ] + } + ] + }, + "parameters": [ + { + "$id": "7130", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "7131", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7132", + "name": "clusterName", + "nameInRequest": "clusterName", + "doc": "The name of the cluster resource.", + "type": { + "$id": "7133", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7134", + "name": "accept", + "nameInRequest": "accept", + "type": { + "$ref": "7034" + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "response": { + "$id": "7135", + "type": { + "$id": "7136", + "kind": "array", + "name": "ArrayNodeType", + "valueType": { + "$ref": "1799" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "resultSegments": [ + "value" + ] + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypes.listByManagedClusters", + "pagingMetadata": { + "$id": "7137", + "itemPropertySegments": [ + "value" + ], + "nextLink": { + "$id": "7138", + "responseSegments": [ + "nextLink" + ], + "responseLocation": "Body" + } + } + }, + { + "$id": "7139", + "kind": "lro", + "name": "deallocate", + "accessibility": "public", + "apiVersions": [ + "2024-11-01-preview", + "2025-03-01-preview" + ], + "doc": "Deallocates one or more nodes on the node type. It will disable the fabric nodes, trigger a shutdown on the VMs and release them from the cluster.", + "operation": { + "$id": "7140", + "name": "deallocate", + "resourceName": "NodeTypes", + "doc": "Deallocates one or more nodes on the node type. It will disable the fabric nodes, trigger a shutdown on the VMs and release them from the cluster.", + "accessibility": "public", + "parameters": [ + { + "$id": "7141", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "7142", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "7143", + "type": { + "$id": "7144", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-03-01-preview" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7145", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "7146", + "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": "7147", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "7148", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7149", + "name": "clusterName", + "nameInRequest": "clusterName", + "doc": "The name of the cluster resource.", + "type": { + "$id": "7150", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7151", + "name": "nodeTypeName", + "nameInRequest": "nodeTypeName", + "doc": "The name of the node type.", + "type": { + "$id": "7152", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7153", + "name": "contentType", + "nameInRequest": "Content-Type", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$id": "7154", + "kind": "constant", + "valueType": { + "$id": "7155", + "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": "7156", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "7157", + "kind": "constant", + "valueType": { + "$id": "7158", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "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": "7159", + "name": "parameters", + "nameInRequest": "parameters", + "doc": "parameters for deallocate action.", + "type": { + "$ref": "2294" + }, + "location": "Body", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "7160", + "statusCodes": [ + 202 + ], + "headers": [ + { + "$id": "7161", + "name": "azureAsyncOperation", + "nameInResponse": "Azure-AsyncOperation", + "doc": "A link to the status monitor", + "type": { + "$id": "7162", + "kind": "url", + "name": "ResourceLocation", + "crossLanguageDefinitionId": "TypeSpec.Rest.ResourceLocation", + "baseType": { + "$id": "7163", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url", + "decorators": [] + }, + "decorators": [] + } + }, + { + "$id": "7164", + "name": "location", + "nameInResponse": "Location", + "doc": "The Location header contains the URL where the status of the long running operation can be checked.", + "type": { + "$id": "7165", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + } + ], + "isErrorResponse": false + } + ], + "httpMethod": "POST", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/nodeTypes/{nodeTypeName}/deallocate", + "requestMediaTypes": [ + "application/json" + ], + "bufferResponse": true, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypes.deallocate", + "decorators": [], + "examples": [ + { + "$id": "7166", + "kind": "http", + "name": "Deallocate nodes", + "description": "Deallocate nodes", + "filePath": "2025-03-01-preview/DeallocateNodes_example.json", + "parameters": [ + { + "$id": "7167", + "parameter": { + "$ref": "7141" + }, + "value": { + "$id": "7168", + "kind": "string", + "type": { + "$ref": "7142" + }, + "value": "2025-03-01-preview" + } + }, + { + "$id": "7169", + "parameter": { + "$ref": "7149" + }, + "value": { + "$id": "7170", + "kind": "string", + "type": { + "$ref": "7150" + }, + "value": "myCluster" + } + }, + { + "$id": "7171", + "parameter": { + "$ref": "7151" + }, + "value": { + "$id": "7172", + "kind": "string", + "type": { + "$ref": "7152" + }, + "value": "BE" + } + }, + { + "$id": "7173", + "parameter": { + "$ref": "7147" + }, + "value": { + "$id": "7174", + "kind": "string", + "type": { + "$ref": "7148" + }, + "value": "resRg" + } + }, + { + "$id": "7175", + "parameter": { + "$ref": "7145" + }, + "value": { + "$id": "7176", + "kind": "string", + "type": { + "$ref": "7146" + }, + "value": "00000000-0000-0000-0000-000000000000" + } + } + ], + "responses": [ + { + "$id": "7177", + "response": { + "$ref": "7160" + }, + "statusCode": 202 + } + ] + } + ] + }, + "parameters": [ + { + "$id": "7178", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "7179", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7180", + "name": "clusterName", + "nameInRequest": "clusterName", + "doc": "The name of the cluster resource.", + "type": { + "$id": "7181", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7182", + "name": "nodeTypeName", + "nameInRequest": "nodeTypeName", + "doc": "The name of the node type.", + "type": { + "$id": "7183", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7184", + "name": "parameters", + "nameInRequest": "body", + "doc": "parameters for deallocate action.", + "type": { + "$ref": "2294" + }, + "location": "Body", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7185", + "name": "contentType", + "nameInRequest": "contentType", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$id": "7186", + "kind": "constant", + "valueType": { + "$id": "7187", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "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": "7188", + "name": "accept", + "nameInRequest": "accept", + "type": { + "$id": "7189", + "kind": "constant", + "valueType": { + "$id": "7190", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "response": { + "$id": "7191" + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypes.deallocate", + "lroMetadata": { + "$id": "7192", + "finalStateVia": 1, + "finalResponse": { + "$id": "7193", + "statusCodes": [ + 200 + ] + } + } + }, + { + "$id": "7194", + "kind": "lro", + "name": "deleteNode", + "accessibility": "public", + "apiVersions": [ + "2024-11-01-preview", + "2025-03-01-preview" + ], + "doc": "Deletes one or more nodes on the node type. It will disable the fabric nodes, trigger a delete on the VMs and removes the state from the cluster.", + "operation": { + "$id": "7195", + "name": "deleteNode", + "resourceName": "NodeTypes", + "doc": "Deletes one or more nodes on the node type. It will disable the fabric nodes, trigger a delete on the VMs and removes the state from the cluster.", + "accessibility": "public", + "parameters": [ + { + "$id": "7196", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "7197", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "7198", + "type": { + "$id": "7199", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-03-01-preview" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7200", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "7201", + "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": "7202", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "7203", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7204", + "name": "clusterName", + "nameInRequest": "clusterName", + "doc": "The name of the cluster resource.", + "type": { + "$id": "7205", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7206", + "name": "nodeTypeName", + "nameInRequest": "nodeTypeName", + "doc": "The name of the node type.", + "type": { + "$id": "7207", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7208", + "name": "contentType", + "nameInRequest": "Content-Type", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$id": "7209", + "kind": "constant", + "valueType": { + "$id": "7210", + "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": "7211", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "7212", + "kind": "constant", + "valueType": { + "$id": "7213", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "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": "7214", + "name": "parameters", + "nameInRequest": "parameters", + "doc": "parameters for delete action.", + "type": { + "$ref": "2294" + }, + "location": "Body", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "7215", + "statusCodes": [ + 202 + ], + "headers": [ + { + "$id": "7216", + "name": "azureAsyncOperation", + "nameInResponse": "Azure-AsyncOperation", + "doc": "A link to the status monitor", + "type": { + "$id": "7217", + "kind": "url", + "name": "ResourceLocation", + "crossLanguageDefinitionId": "TypeSpec.Rest.ResourceLocation", + "baseType": { + "$id": "7218", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url", + "decorators": [] + }, + "decorators": [] + } + }, + { + "$id": "7219", + "name": "location", + "nameInResponse": "Location", + "doc": "The Location header contains the URL where the status of the long running operation can be checked.", + "type": { + "$id": "7220", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + } + ], + "isErrorResponse": false + } + ], + "httpMethod": "POST", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/nodeTypes/{nodeTypeName}/deleteNode", + "requestMediaTypes": [ + "application/json" + ], + "bufferResponse": true, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypes.deleteNode", + "decorators": [], + "examples": [ + { + "$id": "7221", + "kind": "http", + "name": "Delete nodes", + "description": "Delete nodes", + "filePath": "2025-03-01-preview/DeleteNodes_example.json", + "parameters": [ + { + "$id": "7222", + "parameter": { + "$ref": "7196" + }, + "value": { + "$id": "7223", + "kind": "string", + "type": { + "$ref": "7197" + }, + "value": "2025-03-01-preview" + } + }, + { + "$id": "7224", + "parameter": { + "$ref": "7204" + }, + "value": { + "$id": "7225", + "kind": "string", + "type": { + "$ref": "7205" + }, + "value": "myCluster" + } + }, + { + "$id": "7226", + "parameter": { + "$ref": "7206" + }, + "value": { + "$id": "7227", + "kind": "string", + "type": { + "$ref": "7207" + }, + "value": "BE" + } + }, + { + "$id": "7228", + "parameter": { + "$ref": "7202" + }, + "value": { + "$id": "7229", + "kind": "string", + "type": { + "$ref": "7203" + }, + "value": "resRg" + } + }, + { + "$id": "7230", + "parameter": { + "$ref": "7200" + }, + "value": { + "$id": "7231", + "kind": "string", + "type": { + "$ref": "7201" + }, + "value": "00000000-0000-0000-0000-000000000000" + } + } + ], + "responses": [ + { + "$id": "7232", + "response": { + "$ref": "7215" + }, + "statusCode": 202 + } + ] + } + ] + }, + "parameters": [ + { + "$id": "7233", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "7234", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7235", + "name": "clusterName", + "nameInRequest": "clusterName", + "doc": "The name of the cluster resource.", + "type": { + "$id": "7236", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7237", + "name": "nodeTypeName", + "nameInRequest": "nodeTypeName", + "doc": "The name of the node type.", + "type": { + "$id": "7238", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7239", + "name": "parameters", + "nameInRequest": "body", + "doc": "parameters for delete action.", + "type": { + "$ref": "2294" + }, + "location": "Body", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7240", + "name": "contentType", + "nameInRequest": "contentType", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$id": "7241", + "kind": "constant", + "valueType": { + "$id": "7242", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "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": "7243", + "name": "accept", + "nameInRequest": "accept", + "type": { + "$id": "7244", + "kind": "constant", + "valueType": { + "$id": "7245", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "response": { + "$id": "7246" + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypes.deleteNode", + "lroMetadata": { + "$id": "7247", + "finalStateVia": 1, + "finalResponse": { + "$id": "7248", + "statusCodes": [ + 200 + ] + } + } + }, + { + "$id": "7249", + "kind": "lro", + "name": "redeploy", + "accessibility": "public", + "apiVersions": [ + "2024-11-01-preview", + "2025-03-01-preview" + ], + "doc": "Redeploys one or more nodes on the node type. It will disable the fabric nodes, trigger a shut down on the VMs, move them to a new node, and power them back on.", + "operation": { + "$id": "7250", + "name": "redeploy", + "resourceName": "NodeTypes", + "doc": "Redeploys one or more nodes on the node type. It will disable the fabric nodes, trigger a shut down on the VMs, move them to a new node, and power them back on.", + "accessibility": "public", + "parameters": [ + { + "$id": "7251", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "7252", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "7253", + "type": { + "$id": "7254", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-03-01-preview" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7255", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "7256", + "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": "7257", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "7258", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7259", + "name": "clusterName", + "nameInRequest": "clusterName", + "doc": "The name of the cluster resource.", + "type": { + "$id": "7260", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7261", + "name": "nodeTypeName", + "nameInRequest": "nodeTypeName", + "doc": "The name of the node type.", + "type": { + "$id": "7262", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7263", + "name": "contentType", + "nameInRequest": "Content-Type", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$id": "7264", + "kind": "constant", + "valueType": { + "$id": "7265", + "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": "7266", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "7267", + "kind": "constant", + "valueType": { + "$id": "7268", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "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": "7269", + "name": "parameters", + "nameInRequest": "parameters", + "doc": "parameters for redeploy action.", + "type": { + "$ref": "2294" + }, + "location": "Body", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "7270", + "statusCodes": [ + 202 + ], + "headers": [ + { + "$id": "7271", + "name": "azureAsyncOperation", + "nameInResponse": "Azure-AsyncOperation", + "doc": "A link to the status monitor", + "type": { + "$id": "7272", + "kind": "url", + "name": "ResourceLocation", + "crossLanguageDefinitionId": "TypeSpec.Rest.ResourceLocation", + "baseType": { + "$id": "7273", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url", + "decorators": [] + }, + "decorators": [] + } + }, + { + "$id": "7274", + "name": "location", + "nameInResponse": "Location", + "doc": "The Location header contains the URL where the status of the long running operation can be checked.", + "type": { + "$id": "7275", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + } + ], + "isErrorResponse": false + } + ], + "httpMethod": "POST", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/nodeTypes/{nodeTypeName}/redeploy", + "requestMediaTypes": [ + "application/json" + ], + "bufferResponse": true, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypes.redeploy", + "decorators": [], + "examples": [ + { + "$id": "7276", + "kind": "http", + "name": "Redeploy all nodes by upgrade domain", + "description": "Redeploy all nodes by upgrade domain", + "filePath": "2025-03-01-preview/RedeployNodes_UD_example.json", + "parameters": [ + { + "$id": "7277", + "parameter": { + "$ref": "7251" + }, + "value": { + "$id": "7278", + "kind": "string", + "type": { + "$ref": "7252" + }, + "value": "2025-03-01-preview" + } + }, + { + "$id": "7279", + "parameter": { + "$ref": "7259" + }, + "value": { + "$id": "7280", + "kind": "string", + "type": { + "$ref": "7260" + }, + "value": "myCluster" + } + }, + { + "$id": "7281", + "parameter": { + "$ref": "7261" + }, + "value": { + "$id": "7282", + "kind": "string", + "type": { + "$ref": "7262" + }, + "value": "BE" + } + }, + { + "$id": "7283", + "parameter": { + "$ref": "7257" + }, + "value": { + "$id": "7284", + "kind": "string", + "type": { + "$ref": "7258" + }, + "value": "resRg" + } + }, + { + "$id": "7285", + "parameter": { + "$ref": "7255" + }, + "value": { + "$id": "7286", + "kind": "string", + "type": { + "$ref": "7256" + }, + "value": "00000000-0000-0000-0000-000000000000" + } + } + ], + "responses": [ + { + "$id": "7287", + "response": { + "$ref": "7270" + }, + "statusCode": 202 + } + ] + }, + { + "$id": "7288", + "kind": "http", + "name": "Redeploy nodes", + "description": "Redeploy nodes", + "filePath": "2025-03-01-preview/RedeployNodes_example.json", + "parameters": [ + { + "$id": "7289", + "parameter": { + "$ref": "7251" + }, + "value": { + "$id": "7290", + "kind": "string", + "type": { + "$ref": "7252" + }, + "value": "2025-03-01-preview" + } + }, + { + "$id": "7291", + "parameter": { + "$ref": "7259" + }, + "value": { + "$id": "7292", + "kind": "string", + "type": { + "$ref": "7260" + }, + "value": "myCluster" + } + }, + { + "$id": "7293", + "parameter": { + "$ref": "7261" + }, + "value": { + "$id": "7294", + "kind": "string", + "type": { + "$ref": "7262" + }, + "value": "BE" + } + }, + { + "$id": "7295", + "parameter": { + "$ref": "7257" + }, + "value": { + "$id": "7296", + "kind": "string", + "type": { + "$ref": "7258" + }, + "value": "resRg" + } + }, + { + "$id": "7297", + "parameter": { + "$ref": "7255" + }, + "value": { + "$id": "7298", + "kind": "string", + "type": { + "$ref": "7256" + }, + "value": "00000000-0000-0000-0000-000000000000" + } + } + ], + "responses": [ + { + "$id": "7299", + "response": { + "$ref": "7270" + }, + "statusCode": 202 + } + ] + } + ] + }, + "parameters": [ + { + "$id": "7300", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "7301", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7302", + "name": "clusterName", + "nameInRequest": "clusterName", + "doc": "The name of the cluster resource.", + "type": { + "$id": "7303", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7304", + "name": "nodeTypeName", + "nameInRequest": "nodeTypeName", + "doc": "The name of the node type.", + "type": { + "$id": "7305", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7306", + "name": "parameters", + "nameInRequest": "body", + "doc": "parameters for redeploy action.", + "type": { + "$ref": "2294" + }, + "location": "Body", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7307", + "name": "contentType", + "nameInRequest": "contentType", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$id": "7308", + "kind": "constant", + "valueType": { + "$id": "7309", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "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": "7310", + "name": "accept", + "nameInRequest": "accept", + "type": { + "$id": "7311", + "kind": "constant", + "valueType": { + "$id": "7312", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "response": { + "$id": "7313" + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypes.redeploy", + "lroMetadata": { + "$id": "7314", + "finalStateVia": 1, + "finalResponse": { + "$id": "7315", + "statusCodes": [ + 200 + ] + } + } + }, + { + "$id": "7316", + "kind": "lro", + "name": "reimage", + "accessibility": "public", + "apiVersions": [ + "2024-11-01-preview", + "2025-03-01-preview" + ], + "doc": "Reimages one or more nodes on the node type. It will disable the fabric nodes, trigger a reimage on the VMs and activate the nodes back again.", + "operation": { + "$id": "7317", + "name": "reimage", + "resourceName": "NodeTypes", + "doc": "Reimages one or more nodes on the node type. It will disable the fabric nodes, trigger a reimage on the VMs and activate the nodes back again.", + "accessibility": "public", + "parameters": [ + { + "$id": "7318", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "7319", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "7320", + "type": { + "$id": "7321", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-03-01-preview" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7322", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "7323", + "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": "7324", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "7325", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7326", + "name": "clusterName", + "nameInRequest": "clusterName", + "doc": "The name of the cluster resource.", + "type": { + "$id": "7327", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7328", + "name": "nodeTypeName", + "nameInRequest": "nodeTypeName", + "doc": "The name of the node type.", + "type": { + "$id": "7329", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7330", + "name": "contentType", + "nameInRequest": "Content-Type", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$id": "7331", + "kind": "constant", + "valueType": { + "$id": "7332", + "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": "7333", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "7334", + "kind": "constant", + "valueType": { + "$id": "7335", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "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": "7336", + "name": "parameters", + "nameInRequest": "parameters", + "doc": "parameters for reimage action.", + "type": { + "$ref": "2294" + }, + "location": "Body", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "7337", + "statusCodes": [ + 202 + ], + "headers": [ + { + "$id": "7338", + "name": "azureAsyncOperation", + "nameInResponse": "Azure-AsyncOperation", + "doc": "A link to the status monitor", + "type": { + "$id": "7339", + "kind": "url", + "name": "ResourceLocation", + "crossLanguageDefinitionId": "TypeSpec.Rest.ResourceLocation", + "baseType": { + "$id": "7340", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url", + "decorators": [] + }, + "decorators": [] + } + }, + { + "$id": "7341", + "name": "location", + "nameInResponse": "Location", + "doc": "The Location header contains the URL where the status of the long running operation can be checked.", + "type": { + "$id": "7342", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + } + ], + "isErrorResponse": false + } + ], + "httpMethod": "POST", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/nodeTypes/{nodeTypeName}/reimage", + "requestMediaTypes": [ + "application/json" + ], + "bufferResponse": true, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypes.reimage", + "decorators": [], + "examples": [ + { + "$id": "7343", + "kind": "http", + "name": "Reimage all nodes by upgrade domain", + "description": "Reimage all nodes by upgrade domain", + "filePath": "2025-03-01-preview/ReimageNodes_UD_example.json", + "parameters": [ + { + "$id": "7344", + "parameter": { + "$ref": "7318" + }, + "value": { + "$id": "7345", + "kind": "string", + "type": { + "$ref": "7319" + }, + "value": "2025-03-01-preview" + } + }, + { + "$id": "7346", + "parameter": { + "$ref": "7326" + }, + "value": { + "$id": "7347", + "kind": "string", + "type": { + "$ref": "7327" + }, + "value": "myCluster" + } + }, + { + "$id": "7348", + "parameter": { + "$ref": "7328" + }, + "value": { + "$id": "7349", + "kind": "string", + "type": { + "$ref": "7329" + }, + "value": "BE" + } + }, + { + "$id": "7350", + "parameter": { + "$ref": "7324" + }, + "value": { + "$id": "7351", + "kind": "string", + "type": { + "$ref": "7325" + }, + "value": "resRg" + } + }, + { + "$id": "7352", + "parameter": { + "$ref": "7322" + }, + "value": { + "$id": "7353", + "kind": "string", + "type": { + "$ref": "7323" + }, + "value": "00000000-0000-0000-0000-000000000000" + } + } + ], + "responses": [ + { + "$id": "7354", + "response": { + "$ref": "7337" + }, + "statusCode": 202 + } + ] + }, + { + "$id": "7355", + "kind": "http", + "name": "Reimage nodes", + "description": "Reimage nodes", + "filePath": "2025-03-01-preview/ReimageNodes_example.json", + "parameters": [ + { + "$id": "7356", + "parameter": { + "$ref": "7318" + }, + "value": { + "$id": "7357", + "kind": "string", + "type": { + "$ref": "7319" + }, + "value": "2025-03-01-preview" + } + }, + { + "$id": "7358", + "parameter": { + "$ref": "7326" + }, + "value": { + "$id": "7359", + "kind": "string", + "type": { + "$ref": "7327" + }, + "value": "myCluster" + } + }, + { + "$id": "7360", + "parameter": { + "$ref": "7328" + }, + "value": { + "$id": "7361", + "kind": "string", + "type": { + "$ref": "7329" + }, + "value": "BE" + } + }, + { + "$id": "7362", + "parameter": { + "$ref": "7324" + }, + "value": { + "$id": "7363", + "kind": "string", + "type": { + "$ref": "7325" + }, + "value": "resRg" + } + }, + { + "$id": "7364", + "parameter": { + "$ref": "7322" + }, + "value": { + "$id": "7365", + "kind": "string", + "type": { + "$ref": "7323" + }, + "value": "00000000-0000-0000-0000-000000000000" + } + } + ], + "responses": [ + { + "$id": "7366", + "response": { + "$ref": "7337" + }, + "statusCode": 202 + } + ] + } + ] + }, + "parameters": [ + { + "$id": "7367", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "7368", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7369", + "name": "clusterName", + "nameInRequest": "clusterName", + "doc": "The name of the cluster resource.", + "type": { + "$id": "7370", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7371", + "name": "nodeTypeName", + "nameInRequest": "nodeTypeName", + "doc": "The name of the node type.", + "type": { + "$id": "7372", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7373", + "name": "parameters", + "nameInRequest": "body", + "doc": "parameters for reimage action.", + "type": { + "$ref": "2294" + }, + "location": "Body", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7374", + "name": "contentType", + "nameInRequest": "contentType", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$id": "7375", + "kind": "constant", + "valueType": { + "$id": "7376", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "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": "7377", + "name": "accept", + "nameInRequest": "accept", + "type": { + "$id": "7378", + "kind": "constant", + "valueType": { + "$id": "7379", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "response": { + "$id": "7380" + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypes.reimage", + "lroMetadata": { + "$id": "7381", + "finalStateVia": 1, + "finalResponse": { + "$id": "7382", + "statusCodes": [ + 200 + ] + } + } + }, + { + "$id": "7383", + "kind": "lro", + "name": "restart", + "accessibility": "public", + "apiVersions": [ + "2024-11-01-preview", + "2025-03-01-preview" + ], + "doc": "Restarts one or more nodes on the node type. It will disable the fabric nodes, trigger a restart on the VMs and activate the nodes back again.", + "operation": { + "$id": "7384", + "name": "restart", + "resourceName": "NodeTypes", + "doc": "Restarts one or more nodes on the node type. It will disable the fabric nodes, trigger a restart on the VMs and activate the nodes back again.", + "accessibility": "public", + "parameters": [ + { + "$id": "7385", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "7386", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "7387", + "type": { + "$id": "7388", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-03-01-preview" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7389", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "7390", + "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": "7391", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "7392", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7393", + "name": "clusterName", + "nameInRequest": "clusterName", + "doc": "The name of the cluster resource.", + "type": { + "$id": "7394", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7395", + "name": "nodeTypeName", + "nameInRequest": "nodeTypeName", + "doc": "The name of the node type.", + "type": { + "$id": "7396", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7397", + "name": "contentType", + "nameInRequest": "Content-Type", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$id": "7398", + "kind": "constant", + "valueType": { + "$id": "7399", + "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": "7400", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "7401", + "kind": "constant", + "valueType": { + "$id": "7402", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "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": "7403", + "name": "parameters", + "nameInRequest": "parameters", + "doc": "parameters for restart action.", + "type": { + "$ref": "2294" + }, + "location": "Body", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "7404", + "statusCodes": [ + 202 + ], + "headers": [ + { + "$id": "7405", + "name": "azureAsyncOperation", + "nameInResponse": "Azure-AsyncOperation", + "doc": "A link to the status monitor", + "type": { + "$id": "7406", + "kind": "url", + "name": "ResourceLocation", + "crossLanguageDefinitionId": "TypeSpec.Rest.ResourceLocation", + "baseType": { + "$id": "7407", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url", + "decorators": [] + }, + "decorators": [] + } + }, + { + "$id": "7408", + "name": "location", + "nameInResponse": "Location", + "doc": "The Location header contains the URL where the status of the long running operation can be checked.", + "type": { + "$id": "7409", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + } + ], + "isErrorResponse": false + } + ], + "httpMethod": "POST", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/nodeTypes/{nodeTypeName}/restart", + "requestMediaTypes": [ + "application/json" + ], + "bufferResponse": true, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypes.restart", + "decorators": [], + "examples": [ + { + "$id": "7410", + "kind": "http", + "name": "Restart nodes", + "description": "Restart nodes", + "filePath": "2025-03-01-preview/RestartNodes_example.json", + "parameters": [ + { + "$id": "7411", + "parameter": { + "$ref": "7385" + }, + "value": { + "$id": "7412", + "kind": "string", + "type": { + "$ref": "7386" + }, + "value": "2025-03-01-preview" + } + }, + { + "$id": "7413", + "parameter": { + "$ref": "7393" + }, + "value": { + "$id": "7414", + "kind": "string", + "type": { + "$ref": "7394" + }, + "value": "myCluster" + } + }, + { + "$id": "7415", + "parameter": { + "$ref": "7395" + }, + "value": { + "$id": "7416", + "kind": "string", + "type": { + "$ref": "7396" + }, + "value": "BE" + } + }, + { + "$id": "7417", + "parameter": { + "$ref": "7391" + }, + "value": { + "$id": "7418", + "kind": "string", + "type": { + "$ref": "7392" + }, + "value": "resRg" + } + }, + { + "$id": "7419", + "parameter": { + "$ref": "7389" + }, + "value": { + "$id": "7420", + "kind": "string", + "type": { + "$ref": "7390" + }, + "value": "00000000-0000-0000-0000-000000000000" + } + } + ], + "responses": [ + { + "$id": "7421", + "response": { + "$ref": "7404" + }, + "statusCode": 202 + } + ] + } + ] + }, + "parameters": [ + { + "$id": "7422", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "7423", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7424", + "name": "clusterName", + "nameInRequest": "clusterName", + "doc": "The name of the cluster resource.", + "type": { + "$id": "7425", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7426", + "name": "nodeTypeName", + "nameInRequest": "nodeTypeName", + "doc": "The name of the node type.", + "type": { + "$id": "7427", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7428", + "name": "parameters", + "nameInRequest": "body", + "doc": "parameters for restart action.", + "type": { + "$ref": "2294" + }, + "location": "Body", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7429", + "name": "contentType", + "nameInRequest": "contentType", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$id": "7430", + "kind": "constant", + "valueType": { + "$id": "7431", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "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": "7432", + "name": "accept", + "nameInRequest": "accept", + "type": { + "$id": "7433", + "kind": "constant", + "valueType": { + "$id": "7434", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "response": { + "$id": "7435" + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypes.restart", + "lroMetadata": { + "$id": "7436", + "finalStateVia": 1, + "finalResponse": { + "$id": "7437", + "statusCodes": [ + 200 + ] + } + } + }, + { + "$id": "7438", + "kind": "lro", + "name": "start", + "accessibility": "public", + "apiVersions": [ + "2024-11-01-preview", + "2025-03-01-preview" + ], + "doc": "Starts one or more nodes on the node type. It will trigger an allocation of the fabric node if needed and activate them.", + "operation": { + "$id": "7439", + "name": "start", + "resourceName": "NodeTypes", + "doc": "Starts one or more nodes on the node type. It will trigger an allocation of the fabric node if needed and activate them.", + "accessibility": "public", + "parameters": [ + { + "$id": "7440", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "7441", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "7442", + "type": { + "$id": "7443", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-03-01-preview" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7444", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "7445", + "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": "7446", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "7447", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7448", + "name": "clusterName", + "nameInRequest": "clusterName", + "doc": "The name of the cluster resource.", + "type": { + "$id": "7449", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7450", + "name": "nodeTypeName", + "nameInRequest": "nodeTypeName", + "doc": "The name of the node type.", + "type": { + "$id": "7451", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7452", + "name": "contentType", + "nameInRequest": "Content-Type", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$id": "7453", + "kind": "constant", + "valueType": { + "$id": "7454", + "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": "7455", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "7456", + "kind": "constant", + "valueType": { + "$id": "7457", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "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": "7458", + "name": "parameters", + "nameInRequest": "parameters", + "doc": "parameters for start action.", + "type": { + "$ref": "2294" + }, + "location": "Body", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "7459", + "statusCodes": [ + 202 + ], + "headers": [ + { + "$id": "7460", + "name": "azureAsyncOperation", + "nameInResponse": "Azure-AsyncOperation", + "doc": "A link to the status monitor", + "type": { + "$id": "7461", + "kind": "url", + "name": "ResourceLocation", + "crossLanguageDefinitionId": "TypeSpec.Rest.ResourceLocation", + "baseType": { + "$id": "7462", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url", + "decorators": [] + }, + "decorators": [] + } + }, + { + "$id": "7463", + "name": "location", + "nameInResponse": "Location", + "doc": "The Location header contains the URL where the status of the long running operation can be checked.", + "type": { + "$id": "7464", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + } + ], + "isErrorResponse": false + } + ], + "httpMethod": "POST", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/nodeTypes/{nodeTypeName}/start", + "requestMediaTypes": [ + "application/json" + ], + "bufferResponse": true, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypes.start", + "decorators": [], + "examples": [ + { + "$id": "7465", + "kind": "http", + "name": "Start nodes", + "description": "Start nodes", + "filePath": "2025-03-01-preview/StartNodes_example.json", + "parameters": [ + { + "$id": "7466", + "parameter": { + "$ref": "7440" + }, + "value": { + "$id": "7467", + "kind": "string", + "type": { + "$ref": "7441" + }, + "value": "2025-03-01-preview" + } + }, + { + "$id": "7468", + "parameter": { + "$ref": "7448" + }, + "value": { + "$id": "7469", + "kind": "string", + "type": { + "$ref": "7449" + }, + "value": "myCluster" + } + }, + { + "$id": "7470", + "parameter": { + "$ref": "7450" + }, + "value": { + "$id": "7471", + "kind": "string", + "type": { + "$ref": "7451" + }, + "value": "BE" + } + }, + { + "$id": "7472", + "parameter": { + "$ref": "7446" + }, + "value": { + "$id": "7473", + "kind": "string", + "type": { + "$ref": "7447" + }, + "value": "resRg" + } + }, + { + "$id": "7474", + "parameter": { + "$ref": "7444" + }, + "value": { + "$id": "7475", + "kind": "string", + "type": { + "$ref": "7445" + }, + "value": "00000000-0000-0000-0000-000000000000" + } + } + ], + "responses": [ + { + "$id": "7476", + "response": { + "$ref": "7459" + }, + "statusCode": 202 + } + ] + } + ] + }, + "parameters": [ + { + "$id": "7477", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "7478", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7479", + "name": "clusterName", + "nameInRequest": "clusterName", + "doc": "The name of the cluster resource.", + "type": { + "$id": "7480", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7481", + "name": "nodeTypeName", + "nameInRequest": "nodeTypeName", + "doc": "The name of the node type.", + "type": { + "$id": "7482", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7483", + "name": "parameters", + "nameInRequest": "body", + "doc": "parameters for start action.", + "type": { + "$ref": "2294" + }, + "location": "Body", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7484", + "name": "contentType", + "nameInRequest": "contentType", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$id": "7485", + "kind": "constant", + "valueType": { + "$id": "7486", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "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": "7487", + "name": "accept", + "nameInRequest": "accept", + "type": { + "$id": "7488", + "kind": "constant", + "valueType": { + "$id": "7489", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "response": { + "$id": "7490" + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypes.start", + "lroMetadata": { + "$id": "7491", + "finalStateVia": 1, + "finalResponse": { + "$id": "7492", + "statusCodes": [ + 200 + ] + } + } + }, + { + "$id": "7493", + "kind": "lro", + "name": "startFaultSimulation", + "accessibility": "public", + "apiVersions": [ + "2024-11-01-preview", + "2025-03-01-preview" + ], + "doc": "Starts a fault simulation on the node type.", + "operation": { + "$id": "7494", + "name": "startFaultSimulation", + "resourceName": "NodeTypes", + "doc": "Starts a fault simulation on the node type.", + "accessibility": "public", + "parameters": [ + { + "$id": "7495", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "7496", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "7497", + "type": { + "$id": "7498", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-03-01-preview" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7499", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "7500", + "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": "7501", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "7502", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7503", + "name": "clusterName", + "nameInRequest": "clusterName", + "doc": "The name of the cluster resource.", + "type": { + "$id": "7504", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7505", + "name": "nodeTypeName", + "nameInRequest": "nodeTypeName", + "doc": "The name of the node type.", + "type": { + "$id": "7506", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7507", + "name": "contentType", + "nameInRequest": "Content-Type", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$id": "7508", + "kind": "constant", + "valueType": { + "$id": "7509", + "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": "7510", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "7511", + "kind": "constant", + "valueType": { + "$id": "7512", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "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": "7513", + "name": "parameters", + "nameInRequest": "parameters", + "doc": "parameters describing the fault simulation.", + "type": { + "$ref": "1736" + }, + "location": "Body", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "7514", + "statusCodes": [ + 202 + ], + "headers": [ + { + "$id": "7515", + "name": "location", + "nameInResponse": "Location", + "doc": "The Location header contains the URL where the status of the long running operation can be checked.", + "type": { + "$id": "7516", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + { + "$id": "7517", + "name": "azureAsyncOperation", + "nameInResponse": "Azure-AsyncOperation", + "doc": "A link to the status monitor", + "type": { + "$id": "7518", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + } + ], + "isErrorResponse": false + } + ], + "httpMethod": "POST", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/nodeTypes/{nodeTypeName}/startFaultSimulation", + "requestMediaTypes": [ + "application/json" + ], + "bufferResponse": true, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypes.startFaultSimulation", + "decorators": [] + }, + "parameters": [ + { + "$id": "7519", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "7520", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7521", + "name": "clusterName", + "nameInRequest": "clusterName", + "doc": "The name of the cluster resource.", + "type": { + "$id": "7522", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7523", + "name": "nodeTypeName", + "nameInRequest": "nodeTypeName", + "doc": "The name of the node type.", + "type": { + "$id": "7524", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7525", + "name": "parameters", + "nameInRequest": "body", + "doc": "parameters describing the fault simulation.", + "type": { + "$ref": "1736" + }, + "location": "Body", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7526", + "name": "contentType", + "nameInRequest": "contentType", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$id": "7527", + "kind": "constant", + "valueType": { + "$id": "7528", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "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": "7529", + "name": "accept", + "nameInRequest": "accept", + "type": { + "$id": "7530", + "kind": "constant", + "valueType": { + "$id": "7531", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "response": { + "$id": "7532", + "type": { + "$ref": "1645" + } + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypes.startFaultSimulation", + "lroMetadata": { + "$id": "7533", + "finalStateVia": 1, + "finalResponse": { + "$id": "7534", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "1645" + } + } + } + }, + { + "$id": "7535", + "kind": "lro", + "name": "stopFaultSimulation", + "accessibility": "public", + "apiVersions": [ + "2024-11-01-preview", + "2025-03-01-preview" + ], + "doc": "Stops a fault simulation on the node type.", + "operation": { + "$id": "7536", + "name": "stopFaultSimulation", + "resourceName": "NodeTypes", + "doc": "Stops a fault simulation on the node type.", + "accessibility": "public", + "parameters": [ + { + "$id": "7537", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "7538", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "7539", + "type": { + "$id": "7540", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-03-01-preview" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7541", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "7542", + "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": "7543", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "7544", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7545", + "name": "clusterName", + "nameInRequest": "clusterName", + "doc": "The name of the cluster resource.", + "type": { + "$id": "7546", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7547", + "name": "nodeTypeName", + "nameInRequest": "nodeTypeName", + "doc": "The name of the node type.", + "type": { + "$id": "7548", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7549", + "name": "contentType", + "nameInRequest": "Content-Type", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$id": "7550", + "kind": "constant", + "valueType": { + "$id": "7551", + "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": "7552", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "7553", + "kind": "constant", + "valueType": { + "$id": "7554", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "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": "7555", + "name": "parameters", + "nameInRequest": "parameters", + "doc": "parameter with fault simulation id.", + "type": { + "$ref": "1640" + }, + "location": "Body", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "7556", + "statusCodes": [ + 202 + ], + "headers": [ + { + "$id": "7557", + "name": "location", + "nameInResponse": "Location", + "doc": "The Location header contains the URL where the status of the long running operation can be checked.", + "type": { + "$id": "7558", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + { + "$id": "7559", + "name": "azureAsyncOperation", + "nameInResponse": "Azure-AsyncOperation", + "doc": "A link to the status monitor", + "type": { + "$id": "7560", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + } + ], + "isErrorResponse": false + } + ], + "httpMethod": "POST", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/nodeTypes/{nodeTypeName}/stopFaultSimulation", + "requestMediaTypes": [ + "application/json" + ], + "bufferResponse": true, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypes.stopFaultSimulation", + "decorators": [] + }, + "parameters": [ + { + "$id": "7561", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "7562", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7563", + "name": "clusterName", + "nameInRequest": "clusterName", + "doc": "The name of the cluster resource.", + "type": { + "$id": "7564", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7565", + "name": "nodeTypeName", + "nameInRequest": "nodeTypeName", + "doc": "The name of the node type.", + "type": { + "$id": "7566", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7567", + "name": "parameters", + "nameInRequest": "body", + "doc": "parameter with fault simulation id.", + "type": { + "$ref": "1640" + }, + "location": "Body", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7568", + "name": "contentType", + "nameInRequest": "contentType", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$id": "7569", + "kind": "constant", + "valueType": { + "$id": "7570", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "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": "7571", + "name": "accept", + "nameInRequest": "accept", + "type": { + "$id": "7572", + "kind": "constant", + "valueType": { + "$id": "7573", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "response": { + "$id": "7574", + "type": { + "$ref": "1645" + } + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypes.stopFaultSimulation", + "lroMetadata": { + "$id": "7575", + "finalStateVia": 1, + "finalResponse": { + "$id": "7576", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "1645" + } + } + } + }, + { + "$id": "7577", + "kind": "basic", + "name": "getFaultSimulation", + "accessibility": "public", + "apiVersions": [ + "2024-11-01-preview", + "2025-03-01-preview" + ], + "doc": "Gets a fault simulation by the simulationId.", + "operation": { + "$id": "7578", + "name": "getFaultSimulation", + "resourceName": "NodeTypes", + "doc": "Gets a fault simulation by the simulationId.", + "accessibility": "public", + "parameters": [ + { + "$id": "7579", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "7580", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "7581", + "type": { + "$id": "7582", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-03-01-preview" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7583", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "7584", + "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": "7585", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "7586", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7587", + "name": "clusterName", + "nameInRequest": "clusterName", + "doc": "The name of the cluster resource.", + "type": { + "$id": "7588", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7589", + "name": "nodeTypeName", + "nameInRequest": "nodeTypeName", + "doc": "The name of the node type.", + "type": { + "$id": "7590", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7591", + "name": "contentType", + "nameInRequest": "Content-Type", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$id": "7592", + "kind": "constant", + "valueType": { + "$id": "7593", + "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": "7594", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "7595", + "kind": "constant", + "valueType": { + "$id": "7596", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "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": "7597", + "name": "parameters", + "nameInRequest": "parameters", + "doc": "parameter with fault simulation id.", + "type": { + "$ref": "1640" + }, + "location": "Body", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "7598", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "1645" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "POST", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/nodeTypes/{nodeTypeName}/getFaultSimulation", + "requestMediaTypes": [ + "application/json" + ], + "bufferResponse": true, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypes.getFaultSimulation", + "decorators": [] + }, + "parameters": [ + { + "$id": "7599", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "7600", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7601", + "name": "clusterName", + "nameInRequest": "clusterName", + "doc": "The name of the cluster resource.", + "type": { + "$id": "7602", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7603", + "name": "nodeTypeName", + "nameInRequest": "nodeTypeName", + "doc": "The name of the node type.", + "type": { + "$id": "7604", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7605", + "name": "parameters", + "nameInRequest": "body", + "doc": "parameter with fault simulation id.", + "type": { + "$ref": "1640" + }, + "location": "Body", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7606", + "name": "contentType", + "nameInRequest": "contentType", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$ref": "7592" + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7607", + "name": "accept", + "nameInRequest": "accept", + "type": { + "$ref": "7595" + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "response": { + "$id": "7608", + "type": { + "$ref": "1645" + } + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypes.getFaultSimulation" + }, + { + "$id": "7609", + "kind": "paging", + "name": "listFaultSimulation", + "accessibility": "public", + "apiVersions": [ + "2024-11-01-preview", + "2025-03-01-preview" + ], + "doc": "Gets the list of recent fault simulations for the node type.", + "operation": { + "$id": "7610", + "name": "listFaultSimulation", + "resourceName": "NodeTypes", + "doc": "Gets the list of recent fault simulations for the node type.", + "accessibility": "public", + "parameters": [ + { + "$id": "7611", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "7612", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "7613", + "type": { + "$id": "7614", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-03-01-preview" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7615", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "7616", + "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": "7617", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "7618", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7619", + "name": "clusterName", + "nameInRequest": "clusterName", + "doc": "The name of the cluster resource.", + "type": { + "$id": "7620", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7621", + "name": "nodeTypeName", + "nameInRequest": "nodeTypeName", + "doc": "The name of the node type.", + "type": { + "$id": "7622", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7623", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "7624", + "kind": "constant", + "valueType": { + "$id": "7625", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "7626", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "1726" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "POST", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/nodeTypes/{nodeTypeName}/listFaultSimulation", + "bufferResponse": true, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypes.listFaultSimulation", + "decorators": [] + }, + "parameters": [ + { + "$id": "7627", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "7628", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7629", + "name": "clusterName", + "nameInRequest": "clusterName", + "doc": "The name of the cluster resource.", + "type": { + "$id": "7630", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7631", + "name": "nodeTypeName", + "nameInRequest": "nodeTypeName", + "doc": "The name of the node type.", + "type": { + "$id": "7632", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7633", + "name": "accept", + "nameInRequest": "accept", + "type": { + "$ref": "7624" + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "response": { + "$id": "7634", + "type": { + "$id": "7635", + "kind": "array", + "name": "ArrayFaultSimulation", + "valueType": { + "$ref": "1645" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "resultSegments": [ + "value" + ] + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypes.listFaultSimulation", + "pagingMetadata": { + "$id": "7636", + "itemPropertySegments": [ + "value" + ], + "nextLink": { + "$id": "7637", + "responseSegments": [ + "nextLink" + ], + "responseLocation": "Body" + } + } + } + ], + "parameters": [ + { + "$id": "7638", + "name": "endpoint", + "nameInRequest": "endpoint", + "doc": "Service host", + "type": { + "$id": "7639", + "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": "7640", + "type": { + "$id": "7641", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "https://management.azure.com" + } + } + ], + "decorators": [ + { + "$id": "7642", + "name": "Azure.ResourceManager.@armResourceOperations", + "arguments": { + "$id": "7643" + } + } + ], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypes", + "apiVersions": [ + "2024-11-01-preview", + "2025-03-01-preview" + ], + "parent": { + "$ref": "2389" + } + }, + { + "$id": "7644", + "kind": "client", + "name": "NodeTypeSkus", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "methods": [ + { + "$id": "7645", + "kind": "paging", + "name": "GetAvailableSkus", + "accessibility": "public", + "apiVersions": [ + "2024-11-01-preview", + "2025-03-01-preview" + ], + "doc": "Get a Service Fabric node type supported SKUs.", + "operation": { + "$id": "7646", + "name": "GetAvailableSkus", + "resourceName": "NodeTypeSkus", + "doc": "Get a Service Fabric node type supported SKUs.", + "accessibility": "public", + "parameters": [ + { + "$id": "7647", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "7648", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "7649", + "type": { + "$id": "7650", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-03-01-preview" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7651", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "7652", + "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": "7653", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "7654", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7655", + "name": "clusterName", + "nameInRequest": "clusterName", + "doc": "The name of the cluster resource.", + "type": { + "$id": "7656", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7657", + "name": "nodeTypeName", + "nameInRequest": "nodeTypeName", + "doc": "The name of the node type.", + "type": { + "$id": "7658", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7659", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "7660", + "kind": "constant", + "valueType": { + "$id": "7661", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "7662", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "2307" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "GET", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/nodeTypes/{nodeTypeName}/skus", + "bufferResponse": true, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypeSkus.list", + "decorators": [], + "examples": [ + { + "$id": "7663", + "kind": "http", + "name": "List a node type SKUs", + "description": "List a node type SKUs", + "filePath": "2025-03-01-preview/NodeTypeSkusListOperation_example.json", + "parameters": [ + { + "$id": "7664", + "parameter": { + "$ref": "7647" + }, + "value": { + "$id": "7665", + "kind": "string", + "type": { + "$ref": "7648" + }, + "value": "2025-03-01-preview" + } + }, + { + "$id": "7666", + "parameter": { + "$ref": "7655" + }, + "value": { + "$id": "7667", + "kind": "string", + "type": { + "$ref": "7656" + }, + "value": "myCluster" + } + }, + { + "$id": "7668", + "parameter": { + "$ref": "7657" + }, + "value": { + "$id": "7669", + "kind": "string", + "type": { + "$ref": "7658" + }, + "value": "BE" + } + }, + { + "$id": "7670", + "parameter": { + "$ref": "7653" + }, + "value": { + "$id": "7671", + "kind": "string", + "type": { + "$ref": "7654" + }, + "value": "resRg" + } + }, + { + "$id": "7672", + "parameter": { + "$ref": "7651" + }, + "value": { + "$id": "7673", + "kind": "string", + "type": { + "$ref": "7652" + }, + "value": "00000000-0000-0000-0000-000000000000" + } + } + ], + "responses": [ + { + "$id": "7674", + "response": { + "$ref": "7662" + }, + "statusCode": 200, + "bodyValue": { + "$id": "7675", + "kind": "model", + "type": { + "$ref": "2307" + }, + "value": { + "$id": "7676", + "nextLink": { + "$id": "7677", + "kind": "string", + "type": { + "$ref": "2350" + }, + "value": "http://examplelink.com" + }, + "value": { + "$id": "7678", + "kind": "array", + "type": { + "$ref": "2309" + }, + "value": [ + { + "$id": "7679", + "kind": "model", + "type": { + "$ref": "2310" + }, + "value": { + "$id": "7680", + "capacity": { + "$id": "7681", + "kind": "model", + "type": { + "$ref": "2329" + }, + "value": { + "$id": "7682", + "default": { + "$id": "7683", + "kind": "number", + "type": { + "$ref": "2339" + }, + "value": 1 + }, + "maximum": { + "$id": "7684", + "kind": "number", + "type": { + "$ref": "2335" + }, + "value": 100 + }, + "minimum": { + "$id": "7685", + "kind": "number", + "type": { + "$ref": "2331" + }, + "value": 1 + }, + "scaleType": { + "$id": "7686", + "kind": "string", + "type": { + "$ref": "354" + }, + "value": "Automatic" + } + } + }, + "resourceType": { + "$id": "7687", + "kind": "string", + "type": { + "$ref": "2312" + }, + "value": "Microsoft.ServiceFabric/managedClusters/nodeTypes" + }, + "sku": { + "$id": "7688", + "kind": "model", + "type": { + "$ref": "2317" + }, + "value": { + "$id": "7689", + "name": { + "$id": "7690", + "kind": "string", + "type": { + "$ref": "2319" + }, + "value": "Standard_S0" + }, + "tier": { + "$id": "7691", + "kind": "string", + "type": { + "$ref": "2323" + }, + "value": "Standard" + } + } + } + } + }, + { + "$id": "7692", + "kind": "model", + "type": { + "$ref": "2310" + }, + "value": { + "$id": "7693", + "capacity": { + "$id": "7694", + "kind": "model", + "type": { + "$ref": "2329" + }, + "value": { + "$id": "7695", + "default": { + "$id": "7696", + "kind": "number", + "type": { + "$ref": "2339" + }, + "value": 3 + }, + "maximum": { + "$id": "7697", + "kind": "number", + "type": { + "$ref": "2335" + }, + "value": 300 + }, + "minimum": { + "$id": "7698", + "kind": "number", + "type": { + "$ref": "2331" + }, + "value": 3 + }, + "scaleType": { + "$id": "7699", + "kind": "string", + "type": { + "$ref": "354" + }, + "value": "Automatic" + } + } + }, + "resourceType": { + "$id": "7700", + "kind": "string", + "type": { + "$ref": "2312" + }, + "value": "Microsoft.ServiceFabric/managedClusters/nodeTypes" + }, + "sku": { + "$id": "7701", + "kind": "model", + "type": { + "$ref": "2317" + }, + "value": { + "$id": "7702", + "name": { + "$id": "7703", + "kind": "string", + "type": { + "$ref": "2319" + }, + "value": "Standard_S1" + }, + "tier": { + "$id": "7704", + "kind": "string", + "type": { + "$ref": "2323" + }, + "value": "Standard" + } + } + } + } + }, + { + "$id": "7705", + "kind": "model", + "type": { + "$ref": "2310" + }, + "value": { + "$id": "7706", + "capacity": { + "$id": "7707", + "kind": "model", + "type": { + "$ref": "2329" + }, + "value": { + "$id": "7708", + "default": { + "$id": "7709", + "kind": "number", + "type": { + "$ref": "2339" + }, + "value": 1 + }, + "maximum": { + "$id": "7710", + "kind": "number", + "type": { + "$ref": "2335" + }, + "value": 1000 + }, + "minimum": { + "$id": "7711", + "kind": "number", + "type": { + "$ref": "2331" + }, + "value": 1 + }, + "scaleType": { + "$id": "7712", + "kind": "string", + "type": { + "$ref": "354" + }, + "value": "Automatic" + } + } + }, + "resourceType": { + "$id": "7713", + "kind": "string", + "type": { + "$ref": "2312" + }, + "value": "Microsoft.ServiceFabric/managedClusters/nodeTypes" + }, + "sku": { + "$id": "7714", + "kind": "model", + "type": { + "$ref": "2317" + }, + "value": { + "$id": "7715", + "name": { + "$id": "7716", + "kind": "string", + "type": { + "$ref": "2319" + }, + "value": "Standard_S2" + }, + "tier": { + "$id": "7717", + "kind": "string", + "type": { + "$ref": "2323" + }, + "value": "Standard" + } + } + } + } + }, + { + "$id": "7718", + "kind": "model", + "type": { + "$ref": "2310" + }, + "value": { + "$id": "7719", + "capacity": { + "$id": "7720", + "kind": "model", + "type": { + "$ref": "2329" + }, + "value": { + "$id": "7721", + "default": { + "$id": "7722", + "kind": "number", + "type": { + "$ref": "2339" + }, + "value": 3 + }, + "maximum": { + "$id": "7723", + "kind": "number", + "type": { + "$ref": "2335" + }, + "value": 1000 + }, + "minimum": { + "$id": "7724", + "kind": "number", + "type": { + "$ref": "2331" + }, + "value": 3 + }, + "scaleType": { + "$id": "7725", + "kind": "string", + "type": { + "$ref": "354" + }, + "value": "Automatic" + } + } + }, + "resourceType": { + "$id": "7726", + "kind": "string", + "type": { + "$ref": "2312" + }, + "value": "Microsoft.ServiceFabric/managedClusters/nodeTypes" + }, + "sku": { + "$id": "7727", + "kind": "model", + "type": { + "$ref": "2317" + }, + "value": { + "$id": "7728", + "name": { + "$id": "7729", + "kind": "string", + "type": { + "$ref": "2319" + }, + "value": "Standard_S3" + }, + "tier": { + "$id": "7730", + "kind": "string", + "type": { + "$ref": "2323" + }, + "value": "Standard" + } + } + } + } + } + ] + } + } + } + } + ] + } + ] + }, + "parameters": [ + { + "$id": "7731", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "7732", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7733", + "name": "clusterName", + "nameInRequest": "clusterName", + "doc": "The name of the cluster resource.", + "type": { + "$id": "7734", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7735", + "name": "nodeTypeName", + "nameInRequest": "nodeTypeName", + "doc": "The name of the node type.", + "type": { + "$id": "7736", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7737", + "name": "accept", + "nameInRequest": "accept", + "type": { + "$ref": "7660" + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "response": { + "$id": "7738", + "type": { + "$id": "7739", + "kind": "array", + "name": "ArrayNodeTypeAvailableSku", + "valueType": { + "$ref": "2310" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "resultSegments": [ + "value" + ] + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypeSkus.list", + "pagingMetadata": { + "$id": "7740", + "itemPropertySegments": [ + "value" + ], + "nextLink": { + "$id": "7741", + "responseSegments": [ + "nextLink" + ], + "responseLocation": "Body" + } + } + } + ], + "parameters": [ + { + "$id": "7742", + "name": "endpoint", + "nameInRequest": "endpoint", + "doc": "Service host", + "type": { + "$id": "7743", + "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": "7744", + "type": { + "$id": "7745", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "https://management.azure.com" + } + } + ], + "decorators": [ + { + "$id": "7746", + "name": "Azure.ResourceManager.@armResourceOperations", + "arguments": { + "$id": "7747" + } + } + ], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypeSkus", + "apiVersions": [ + "2024-11-01-preview", + "2025-03-01-preview" + ], + "parent": { + "$ref": "2389" + } + }, + { + "$id": "7748", + "kind": "client", + "name": "OperationResults", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "methods": [ + { + "$id": "7749", + "kind": "lro", + "name": "get", + "accessibility": "public", + "apiVersions": [ + "2024-11-01-preview", + "2025-03-01-preview" + ], + "doc": "Get long running operation result.", + "summary": "Get long running operation result.", + "operation": { + "$id": "7750", + "name": "get", + "resourceName": "OperationResults", + "summary": "Get long running operation result.", + "doc": "Get long running operation result.", + "accessibility": "public", + "parameters": [ + { + "$id": "7751", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "7752", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "7753", + "type": { + "$id": "7754", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-03-01-preview" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7755", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "7756", + "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": "7757", + "name": "location", + "nameInRequest": "location", + "doc": "The name of the Azure region.", + "type": { + "$id": "7758", + "kind": "string", + "name": "azureLocation", + "crossLanguageDefinitionId": "Azure.Core.azureLocation", + "baseType": { + "$id": "7759", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7760", + "name": "operationId", + "nameInRequest": "operationId", + "doc": "operation identifier.", + "type": { + "$id": "7761", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7762", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "7763", + "kind": "constant", + "valueType": { + "$id": "7764", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "7765", + "statusCodes": [ + 200 + ], + "headers": [], + "isErrorResponse": false + }, + { + "$id": "7766", + "statusCodes": [ + 202 + ], + "headers": [ + { + "$id": "7767", + "name": "location", + "nameInResponse": "Location", + "doc": "The Location header contains the URL where the status of the long running operation can be checked.", + "type": { + "$id": "7768", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + } + ], + "isErrorResponse": false + }, + { + "$id": "7769", + "statusCodes": [ + 204 + ], + "headers": [], + "isErrorResponse": false + } + ], + "httpMethod": "GET", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/providers/Microsoft.ServiceFabric/locations/{location}/managedClusterOperationResults/{operationId}", + "bufferResponse": true, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.OperationResults.get", + "decorators": [], + "examples": [ + { + "$id": "7770", + "kind": "http", + "name": "Get long running operation result", + "description": "Get long running operation result", + "filePath": "2025-03-01-preview/OperationResultsGet_example.json", + "parameters": [ + { + "$id": "7771", + "parameter": { + "$ref": "7755" + }, + "value": { + "$id": "7772", + "kind": "string", + "type": { + "$ref": "7756" + }, + "value": "00000000-0000-0000-0000-000000000000" + } + }, + { + "$id": "7773", + "parameter": { + "$ref": "7757" + }, + "value": { + "$id": "7774", + "kind": "string", + "type": { + "$ref": "7758" + }, + "value": "eastus" + } + }, + { + "$id": "7775", + "parameter": { + "$ref": "7751" + }, + "value": { + "$id": "7776", + "kind": "string", + "type": { + "$ref": "7752" + }, + "value": "2025-03-01-preview" + } + }, + { + "$id": "7777", + "parameter": { + "$ref": "7760" + }, + "value": { + "$id": "7778", + "kind": "string", + "type": { + "$ref": "7761" + }, + "value": "00000000-0000-0000-0000-000000001234" + } + } + ], + "responses": [ + { + "$id": "7779", + "response": { + "$ref": "7765" + }, + "statusCode": 200 + }, + { + "$id": "7780", + "response": { + "$ref": "7766" + }, + "statusCode": 202 + }, + { + "$id": "7781", + "response": { + "$ref": "7769" + }, + "statusCode": 204 + } + ] + } + ] + }, + "parameters": [ + { + "$id": "7782", + "name": "location", + "nameInRequest": "location", + "doc": "The name of the Azure region.", + "type": { + "$id": "7783", + "kind": "string", + "name": "azureLocation", + "crossLanguageDefinitionId": "Azure.Core.azureLocation", + "baseType": { + "$id": "7784", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7785", + "name": "operationId", + "nameInRequest": "operationId", + "doc": "operation identifier.", + "type": { + "$id": "7786", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7787", + "name": "accept", + "nameInRequest": "accept", + "type": { + "$id": "7788", + "kind": "constant", + "valueType": { + "$id": "7789", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "response": { + "$id": "7790" + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.OperationResults.get", + "lroMetadata": { + "$id": "7791", + "finalStateVia": 1, + "finalResponse": { + "$id": "7792", + "statusCodes": [ + 200 + ] + } + } + } + ], + "parameters": [ + { + "$id": "7793", + "name": "endpoint", + "nameInRequest": "endpoint", + "doc": "Service host", + "type": { + "$id": "7794", + "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": "7795", + "type": { + "$id": "7796", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "https://management.azure.com" + } + } + ], + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.OperationResults", + "apiVersions": [ + "2024-11-01-preview", + "2025-03-01-preview" + ], + "parent": { + "$ref": "2389" + } + }, + { + "$id": "7797", + "kind": "client", + "name": "OperationStatus", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "methods": [ + { + "$id": "7798", + "kind": "basic", + "name": "get", + "accessibility": "public", + "apiVersions": [ + "2024-11-01-preview", + "2025-03-01-preview" + ], + "doc": "Get long running operation status.", + "summary": "Get long running operation status.", + "operation": { + "$id": "7799", + "name": "get", + "resourceName": "OperationStatus", + "summary": "Get long running operation status.", + "doc": "Get long running operation status.", + "accessibility": "public", + "parameters": [ + { + "$id": "7800", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "7801", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "7802", + "type": { + "$id": "7803", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-03-01-preview" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7804", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "7805", + "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": "7806", + "name": "location", + "nameInRequest": "location", + "doc": "The name of the Azure region.", + "type": { + "$id": "7807", + "kind": "string", + "name": "azureLocation", + "crossLanguageDefinitionId": "Azure.Core.azureLocation", + "baseType": { + "$id": "7808", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7809", + "name": "operationId", + "nameInRequest": "operationId", + "doc": "operation identifier.", + "type": { + "$id": "7810", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7811", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "7812", + "kind": "constant", + "valueType": { + "$id": "7813", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "7814", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "2354" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "GET", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/providers/Microsoft.ServiceFabric/locations/{location}/managedClusterOperations/{operationId}", + "bufferResponse": true, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.OperationStatus.get", + "decorators": [], + "examples": [ + { + "$id": "7815", + "kind": "http", + "name": "Error response describing why the operation failed.", + "description": "Error response describing why the operation failed.", + "filePath": "2025-03-01-preview/OperationStatusFailed_example.json", + "parameters": [ + { + "$id": "7816", + "parameter": { + "$ref": "7804" + }, + "value": { + "$id": "7817", + "kind": "string", + "type": { + "$ref": "7805" + }, + "value": "00000000-0000-0000-0000-000000000000" + } + }, + { + "$id": "7818", + "parameter": { + "$ref": "7806" + }, + "value": { + "$id": "7819", + "kind": "string", + "type": { + "$ref": "7807" + }, + "value": "eastus" + } + }, + { + "$id": "7820", + "parameter": { + "$ref": "7800" + }, + "value": { + "$id": "7821", + "kind": "string", + "type": { + "$ref": "7801" + }, + "value": "2025-03-01-preview" + } + }, + { + "$id": "7822", + "parameter": { + "$ref": "7809" + }, + "value": { + "$id": "7823", + "kind": "string", + "type": { + "$ref": "7810" + }, + "value": "00000000-0000-0000-0000-000000001234" + } + } + ], + "responses": [ + { + "$id": "7824", + "response": { + "$ref": "7814" + }, + "statusCode": 200, + "bodyValue": { + "$id": "7825", + "kind": "model", + "type": { + "$ref": "2354" + }, + "value": { + "$id": "7826", + "name": { + "$id": "7827", + "kind": "string", + "type": { + "$ref": "2356" + }, + "value": "00000000-0000-0000-0000-000000001234" + }, + "startTime": { + "$id": "7828", + "kind": "string", + "type": { + "$ref": "2360" + }, + "value": "2022-01-03T23:58:02.2501337Z" + }, + "endTime": { + "$id": "7829", + "kind": "string", + "type": { + "$ref": "2365" + }, + "value": "2022-01-04T00:13:03.2790951Z" + }, + "percentComplete": { + "$id": "7830", + "kind": "number", + "type": { + "$ref": "2370" + }, + "value": 100 + }, + "status": { + "$id": "7831", + "kind": "string", + "type": { + "$ref": "2374" + }, + "value": "Failed" + }, + "error": { + "$id": "7832", + "kind": "model", + "type": { + "$ref": "2378" + }, + "value": { + "$id": "7833", + "code": { + "$id": "7834", + "kind": "string", + "type": { + "$ref": "2380" + }, + "value": "-2146233029" + }, + "message": { + "$id": "7835", + "kind": "string", + "type": { + "$ref": "2384" + }, + "value": "A task was canceled." + } + } + } + } + } + } + ] + }, + { + "$id": "7836", + "kind": "http", + "name": "OK. The request has succeeded.", + "description": "OK. The request has succeeded.", + "filePath": "2025-03-01-preview/OperationStatusSucceeded_example.json", + "parameters": [ + { + "$id": "7837", + "parameter": { + "$ref": "7804" + }, + "value": { + "$id": "7838", + "kind": "string", + "type": { + "$ref": "7805" + }, + "value": "00000000-0000-0000-0000-000000000000" + } + }, + { + "$id": "7839", + "parameter": { + "$ref": "7806" + }, + "value": { + "$id": "7840", + "kind": "string", + "type": { + "$ref": "7807" + }, + "value": "eastus" + } + }, + { + "$id": "7841", + "parameter": { + "$ref": "7800" + }, + "value": { + "$id": "7842", + "kind": "string", + "type": { + "$ref": "7801" + }, + "value": "2025-03-01-preview" + } + }, + { + "$id": "7843", + "parameter": { + "$ref": "7809" + }, + "value": { + "$id": "7844", + "kind": "string", + "type": { + "$ref": "7810" + }, + "value": "00000000-0000-0000-0000-000000001234" + } + } + ], + "responses": [ + { + "$id": "7845", + "response": { + "$ref": "7814" + }, + "statusCode": 200, + "bodyValue": { + "$id": "7846", + "kind": "model", + "type": { + "$ref": "2354" + }, + "value": { + "$id": "7847", + "name": { + "$id": "7848", + "kind": "string", + "type": { + "$ref": "2356" + }, + "value": "00000000-0000-0000-0000-000000001234" + }, + "startTime": { + "$id": "7849", + "kind": "string", + "type": { + "$ref": "2360" + }, + "value": "2022-01-03T23:58:02.2501337Z" + }, + "endTime": { + "$id": "7850", + "kind": "string", + "type": { + "$ref": "2365" + }, + "value": "2022-01-04T00:13:03.2790951Z" + }, + "percentComplete": { + "$id": "7851", + "kind": "number", + "type": { + "$ref": "2370" + }, + "value": 100 + }, + "status": { + "$id": "7852", + "kind": "string", + "type": { + "$ref": "2374" + }, + "value": "Succeeded" + } + } + } + } + ] + } + ] + }, + "parameters": [ + { + "$id": "7853", + "name": "location", + "nameInRequest": "location", + "doc": "The name of the Azure region.", + "type": { + "$id": "7854", + "kind": "string", + "name": "azureLocation", + "crossLanguageDefinitionId": "Azure.Core.azureLocation", + "baseType": { + "$id": "7855", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7856", + "name": "operationId", + "nameInRequest": "operationId", + "doc": "operation identifier.", + "type": { + "$id": "7857", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7858", + "name": "accept", + "nameInRequest": "accept", + "type": { + "$ref": "7812" + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "response": { + "$id": "7859", + "type": { + "$ref": "2354" + } + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.OperationStatus.get" + } + ], + "parameters": [ + { + "$id": "7860", + "name": "endpoint", + "nameInRequest": "endpoint", + "doc": "Service host", + "type": { + "$id": "7861", + "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": "7862", + "type": { + "$id": "7863", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "https://management.azure.com" + } + } + ], + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.OperationStatus", + "apiVersions": [ + "2024-11-01-preview", + "2025-03-01-preview" + ], + "parent": { + "$ref": "2389" + } + } + ] + } + ], + "auth": { + "$id": "7864", + "oAuth2": { + "$id": "7865", + "scopes": [ + "user_impersonation" + ] + } + } +} diff --git a/sdk/storage/ci.yml b/sdk/storage/ci.yml index 2ca0501b60bd..6d83bf7eebb6 100644 --- a/sdk/storage/ci.yml +++ b/sdk/storage/ci.yml @@ -9,9 +9,17 @@ trigger: paths: include: - sdk/storage/ + exclude: + - sdk/storage/Azure.ResourceManager.Storage/ - sdk/storage/Azure.Storage.DataMovement/ + exclude: + - sdk/storage/Azure.ResourceManager.Storage/ - sdk/storage/Azure.Storage.DataMovement.Blobs/ + exclude: + - sdk/storage/Azure.ResourceManager.Storage/ - sdk/storage/Azure.Storage.DataMovement.Files/ + exclude: + - sdk/storage/Azure.ResourceManager.Storage/ - sdk/storage/Azure.Storage.DataMovement.Blobs.Files.Shares/ exclude: - sdk/storage/Azure.ResourceManager.Storage/ diff --git a/sdk/support/Azure.ResourceManager.Support/api/Azure.ResourceManager.Support.net8.0.cs b/sdk/support/Azure.ResourceManager.Support/api/Azure.ResourceManager.Support.net8.0.cs index 7dc27c898fb7..e7597d973200 100644 --- a/sdk/support/Azure.ResourceManager.Support/api/Azure.ResourceManager.Support.net8.0.cs +++ b/sdk/support/Azure.ResourceManager.Support/api/Azure.ResourceManager.Support.net8.0.cs @@ -43,6 +43,8 @@ public partial class ProblemClassificationData : Azure.ResourceManager.Models.Re { internal ProblemClassificationData() { } public string DisplayName { get { throw null; } } + public System.Collections.Generic.IReadOnlyDictionary Metadata { get { throw null; } } + public Azure.ResourceManager.Support.ProblemClassificationData ParentProblemClassification { get { throw null; } } public System.Collections.Generic.IReadOnlyList SecondaryConsentEnabled { get { throw null; } } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Support.ProblemClassificationData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -159,6 +161,7 @@ public partial class SupportAzureServiceData : Azure.ResourceManager.Models.Reso { internal SupportAzureServiceData() { } public string DisplayName { get { throw null; } } + public System.Collections.Generic.IReadOnlyDictionary Metadata { get { throw null; } } public System.Collections.Generic.IReadOnlyList ResourceTypes { get { throw null; } } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Support.SupportAzureServiceData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -173,6 +176,8 @@ public partial class SupportAzureServiceResource : Azure.ResourceManager.ArmReso protected SupportAzureServiceResource() { } public virtual Azure.ResourceManager.Support.SupportAzureServiceData Data { get { throw null; } } public virtual bool HasData { get { throw null; } } + public virtual Azure.Response ClassifyProblemsProblemClassificationsNoSubscription(Azure.ResourceManager.Support.Models.ServiceProblemClassificationContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ClassifyProblemsProblemClassificationsNoSubscriptionAsync(Azure.ResourceManager.Support.Models.ServiceProblemClassificationContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string serviceName) { 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; } @@ -191,6 +196,12 @@ public static partial class SupportExtensions public static System.Threading.Tasks.Task> CheckNameAvailabilitySupportTicketsNoSubscriptionAsync(this Azure.ResourceManager.Resources.TenantResource tenantResource, Azure.ResourceManager.Support.Models.SupportNameAvailabilityContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.Response CheckSupportTicketNameAvailability(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.ResourceManager.Support.Models.SupportNameAvailabilityContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static System.Threading.Tasks.Task> CheckSupportTicketNameAvailabilityAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.ResourceManager.Support.Models.SupportNameAvailabilityContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.Response ClassifyProblemsProblemClassification(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, string problemServiceName, Azure.ResourceManager.Support.Models.ServiceProblemClassificationContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static System.Threading.Tasks.Task> ClassifyProblemsProblemClassificationAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, string problemServiceName, Azure.ResourceManager.Support.Models.ServiceProblemClassificationContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.Response ClassifyServicesServiceClassification(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.ResourceManager.Support.Models.ServiceClassificationContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static System.Threading.Tasks.Task> ClassifyServicesServiceClassificationAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.ResourceManager.Support.Models.ServiceClassificationContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.Response ClassifyServicesServiceClassificationsNoSubscription(this Azure.ResourceManager.Resources.TenantResource tenantResource, Azure.ResourceManager.Support.Models.ServiceClassificationContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static System.Threading.Tasks.Task> ClassifyServicesServiceClassificationsNoSubscriptionAsync(this Azure.ResourceManager.Resources.TenantResource tenantResource, Azure.ResourceManager.Support.Models.ServiceClassificationContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.ResourceManager.Support.ProblemClassificationResource GetProblemClassificationResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.Response GetSubscriptionFileWorkspace(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, string fileWorkspaceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static System.Threading.Tasks.Task> GetSubscriptionFileWorkspaceAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, string fileWorkspaceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -218,6 +229,8 @@ public static partial class SupportExtensions public static System.Threading.Tasks.Task> GetTenantSupportTicketAsync(this Azure.ResourceManager.Resources.TenantResource tenantResource, string supportTicketName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.ResourceManager.Support.TenantSupportTicketResource GetTenantSupportTicketResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.Support.TenantSupportTicketCollection GetTenantSupportTickets(this Azure.ResourceManager.Resources.TenantResource tenantResource) { throw null; } + public static Azure.Response LookUpResourceId(this Azure.ResourceManager.Resources.TenantResource tenantResource, Azure.ResourceManager.Support.Models.LookUpResourceIdContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static System.Threading.Tasks.Task> LookUpResourceIdAsync(this Azure.ResourceManager.Resources.TenantResource tenantResource, Azure.ResourceManager.Support.Models.LookUpResourceIdContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } public partial class SupportFileDetailData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { @@ -282,7 +295,7 @@ protected SupportTicketCommunicationCollection() { } } public partial class SupportTicketCommunicationData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - public SupportTicketCommunicationData(string subject, string body) { } + public SupportTicketCommunicationData() { } public string Body { get { throw null; } set { } } public Azure.ResourceManager.Support.Models.SupportTicketCommunicationDirection? CommunicationDirection { get { throw null; } } public Azure.ResourceManager.Support.Models.SupportTicketCommunicationType? CommunicationType { get { throw null; } } @@ -315,8 +328,8 @@ protected SupportTicketCommunicationResource() { } } public partial class SupportTicketData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - public SupportTicketData(string description, string problemClassificationId, Azure.ResourceManager.Support.Models.SupportSeverityLevel severity, Azure.ResourceManager.Support.Models.AdvancedDiagnosticConsent advancedDiagnosticConsent, Azure.ResourceManager.Support.Models.SupportContactProfile contactDetails, string title, string serviceId) { } - public Azure.ResourceManager.Support.Models.AdvancedDiagnosticConsent AdvancedDiagnosticConsent { get { throw null; } set { } } + public SupportTicketData() { } + public Azure.ResourceManager.Support.Models.AdvancedDiagnosticConsent? AdvancedDiagnosticConsent { get { throw null; } set { } } public Azure.ResourceManager.Support.Models.SupportContactProfile ContactDetails { get { throw null; } set { } } public System.DateTimeOffset? CreatedOn { get { throw null; } } public string Description { get { throw null; } set { } } @@ -334,7 +347,7 @@ public SupportTicketData(string description, string problemClassificationId, Azu public string ServiceDisplayName { get { throw null; } } public string ServiceId { get { throw null; } set { } } public Azure.ResourceManager.Support.Models.SupportServiceLevelAgreement ServiceLevelAgreement { get { throw null; } set { } } - public Azure.ResourceManager.Support.Models.SupportSeverityLevel Severity { get { throw null; } set { } } + public Azure.ResourceManager.Support.Models.SupportSeverityLevel? Severity { get { throw null; } set { } } public string Status { get { throw null; } } public string SupportEngineerEmailAddress { get { throw null; } } public string SupportPlanDisplayName { get { throw null; } } @@ -584,6 +597,10 @@ public partial class MockableSupportSubscriptionResource : Azure.ResourceManager protected MockableSupportSubscriptionResource() { } public virtual Azure.Response CheckSupportTicketNameAvailability(Azure.ResourceManager.Support.Models.SupportNameAvailabilityContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> CheckSupportTicketNameAvailabilityAsync(Azure.ResourceManager.Support.Models.SupportNameAvailabilityContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response ClassifyProblemsProblemClassification(string problemServiceName, Azure.ResourceManager.Support.Models.ServiceProblemClassificationContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ClassifyProblemsProblemClassificationAsync(string problemServiceName, Azure.ResourceManager.Support.Models.ServiceProblemClassificationContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response ClassifyServicesServiceClassification(Azure.ResourceManager.Support.Models.ServiceClassificationContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ClassifyServicesServiceClassificationAsync(Azure.ResourceManager.Support.Models.ServiceClassificationContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response GetSubscriptionFileWorkspace(string fileWorkspaceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetSubscriptionFileWorkspaceAsync(string fileWorkspaceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.Support.SubscriptionFileWorkspaceCollection GetSubscriptionFileWorkspaces() { throw null; } @@ -596,6 +613,8 @@ public partial class MockableSupportTenantResource : Azure.ResourceManager.ArmRe protected MockableSupportTenantResource() { } public virtual Azure.Response CheckNameAvailabilitySupportTicketsNoSubscription(Azure.ResourceManager.Support.Models.SupportNameAvailabilityContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> CheckNameAvailabilitySupportTicketsNoSubscriptionAsync(Azure.ResourceManager.Support.Models.SupportNameAvailabilityContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response ClassifyServicesServiceClassificationsNoSubscription(Azure.ResourceManager.Support.Models.ServiceClassificationContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ClassifyServicesServiceClassificationsNoSubscriptionAsync(Azure.ResourceManager.Support.Models.ServiceClassificationContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response GetSupportAzureService(string serviceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetSupportAzureServiceAsync(string serviceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.Support.SupportAzureServiceCollection GetSupportAzureServices() { throw null; } @@ -605,6 +624,8 @@ protected MockableSupportTenantResource() { } public virtual Azure.Response GetTenantSupportTicket(string supportTicketName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetTenantSupportTicketAsync(string supportTicketName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.Support.TenantSupportTicketCollection GetTenantSupportTickets() { throw null; } + public virtual Azure.Response LookUpResourceId(Azure.ResourceManager.Support.Models.LookUpResourceIdContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> LookUpResourceIdAsync(Azure.ResourceManager.Support.Models.LookUpResourceIdContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } } namespace Azure.ResourceManager.Support.Models @@ -631,19 +652,30 @@ public static partial class ArmSupportModelFactory { public static Azure.ResourceManager.Support.ChatTranscriptDetailData ChatTranscriptDetailData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IEnumerable messages = null, System.DateTimeOffset? startOn = default(System.DateTimeOffset?)) { throw null; } public static Azure.ResourceManager.Support.Models.ChatTranscriptMessageProperties ChatTranscriptMessageProperties(Azure.ResourceManager.Support.Models.TranscriptContentType? contentType = default(Azure.ResourceManager.Support.Models.TranscriptContentType?), Azure.ResourceManager.Support.Models.SupportTicketCommunicationDirection? communicationDirection = default(Azure.ResourceManager.Support.Models.SupportTicketCommunicationDirection?), string sender = null, string body = null, System.DateTimeOffset? createdOn = default(System.DateTimeOffset?)) { throw null; } + public static Azure.ResourceManager.Support.Models.ClassificationService ClassificationService(Azure.Core.ResourceIdentifier serviceId = null, string displayName = null, System.Collections.Generic.IEnumerable resourceTypes = null) { throw null; } public static Azure.ResourceManager.Support.FileWorkspaceDetailData FileWorkspaceDetailData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.DateTimeOffset? createdOn = default(System.DateTimeOffset?), System.DateTimeOffset? expireOn = default(System.DateTimeOffset?)) { throw null; } - public static Azure.ResourceManager.Support.ProblemClassificationData ProblemClassificationData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string displayName = null, System.Collections.Generic.IEnumerable secondaryConsentEnabled = null) { throw null; } + public static Azure.ResourceManager.Support.Models.LookUpResourceIdResult LookUpResourceIdResult(Azure.Core.ResourceIdentifier resourceId = null) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public static Azure.ResourceManager.Support.ProblemClassificationData ProblemClassificationData(Azure.Core.ResourceIdentifier id, string name, Azure.Core.ResourceType resourceType, Azure.ResourceManager.Models.SystemData systemData, string displayName, System.Collections.Generic.IEnumerable secondaryConsentEnabled) { throw null; } + public static Azure.ResourceManager.Support.ProblemClassificationData ProblemClassificationData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string displayName = null, System.Collections.Generic.IEnumerable secondaryConsentEnabled = null, System.Collections.Generic.IReadOnlyDictionary metadata = null, Azure.ResourceManager.Support.ProblemClassificationData parentProblemClassification = null) { throw null; } public static Azure.ResourceManager.Support.Models.SecondaryConsentEnabled SecondaryConsentEnabled(string description = null, string secondaryConsentEnabledType = null) { throw null; } - public static Azure.ResourceManager.Support.SupportAzureServiceData SupportAzureServiceData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string displayName = null, System.Collections.Generic.IEnumerable resourceTypes = null) { throw null; } + public static Azure.ResourceManager.Support.Models.ServiceClassificationAnswer ServiceClassificationAnswer(Azure.Core.ResourceIdentifier serviceId = null, string displayName = null, System.Collections.Generic.IEnumerable resourceTypes = null, Azure.ResourceManager.Support.Models.ClassificationService childService = null) { throw null; } + public static Azure.ResourceManager.Support.Models.ServiceClassificationOutput ServiceClassificationOutput(System.Collections.Generic.IEnumerable serviceClassificationResults = null) { throw null; } + public static Azure.ResourceManager.Support.Models.ServiceProblemClassificationContent ServiceProblemClassificationContent(string issueSummary = null, Azure.Core.ResourceIdentifier resourceId = null) { throw null; } + public static Azure.ResourceManager.Support.Models.ServiceProblemClassificationListResult ServiceProblemClassificationListResult(System.Collections.Generic.IEnumerable problemClassificationResults = null) { throw null; } + public static Azure.ResourceManager.Support.Models.ServiceProblemClassificationResult ServiceProblemClassificationResult(string problemId = null, string title = null, string description = null, Azure.Core.ResourceIdentifier serviceId = null, string problemClassificationId = null, Azure.Core.ResourceIdentifier relatedServiceId = null, string displayName = null, System.Collections.Generic.IEnumerable resourceTypes = null) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public static Azure.ResourceManager.Support.SupportAzureServiceData SupportAzureServiceData(Azure.Core.ResourceIdentifier id, string name, Azure.Core.ResourceType resourceType, Azure.ResourceManager.Models.SystemData systemData, string displayName, System.Collections.Generic.IEnumerable resourceTypes) { throw null; } + public static Azure.ResourceManager.Support.SupportAzureServiceData SupportAzureServiceData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string displayName = null, System.Collections.Generic.IEnumerable resourceTypes = null, System.Collections.Generic.IReadOnlyDictionary metadata = null) { throw null; } public static Azure.ResourceManager.Support.SupportFileDetailData SupportFileDetailData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.DateTimeOffset? createdOn = default(System.DateTimeOffset?), int? chunkSize = default(int?), int? fileSize = default(int?), int? numberOfChunks = default(int?)) { throw null; } public static Azure.ResourceManager.Support.Models.SupportNameAvailabilityResult SupportNameAvailabilityResult(bool? isNameAvailable = default(bool?), string reason = null, string message = null) { throw null; } public static Azure.ResourceManager.Support.Models.SupportServiceLevelAgreement SupportServiceLevelAgreement(System.DateTimeOffset? startOn = default(System.DateTimeOffset?), System.DateTimeOffset? expireOn = default(System.DateTimeOffset?), int? slaInMinutes = default(int?)) { throw null; } public static Azure.ResourceManager.Support.SupportTicketCommunicationData SupportTicketCommunicationData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.Support.Models.SupportTicketCommunicationType? communicationType = default(Azure.ResourceManager.Support.Models.SupportTicketCommunicationType?), Azure.ResourceManager.Support.Models.SupportTicketCommunicationDirection? communicationDirection = default(Azure.ResourceManager.Support.Models.SupportTicketCommunicationDirection?), string sender = null, string subject = null, string body = null, System.DateTimeOffset? createdOn = default(System.DateTimeOffset?)) { throw null; } - public static Azure.ResourceManager.Support.SupportTicketData SupportTicketData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string supportTicketId = null, string description = null, string problemClassificationId = null, string problemClassificationDisplayName = null, Azure.ResourceManager.Support.Models.SupportSeverityLevel severity = default(Azure.ResourceManager.Support.Models.SupportSeverityLevel), string enrollmentId = null, bool? require24X7Response = default(bool?), Azure.ResourceManager.Support.Models.AdvancedDiagnosticConsent advancedDiagnosticConsent = default(Azure.ResourceManager.Support.Models.AdvancedDiagnosticConsent), string problemScopingQuestions = null, string supportPlanId = null, Azure.ResourceManager.Support.Models.SupportContactProfile contactDetails = null, Azure.ResourceManager.Support.Models.SupportServiceLevelAgreement serviceLevelAgreement = null, string supportEngineerEmailAddress = null, string supportPlanType = null, string supportPlanDisplayName = null, string title = null, System.DateTimeOffset? problemStartOn = default(System.DateTimeOffset?), string serviceId = null, string serviceDisplayName = null, string status = null, System.DateTimeOffset? createdOn = default(System.DateTimeOffset?), System.DateTimeOffset? modifiedOn = default(System.DateTimeOffset?), string fileWorkspaceName = null, Azure.ResourceManager.Support.Models.IsTemporaryTicket? isTemporaryTicket = default(Azure.ResourceManager.Support.Models.IsTemporaryTicket?), Azure.Core.ResourceIdentifier technicalTicketDetailsResourceId = null, Azure.ResourceManager.Support.Models.QuotaTicketDetails quotaTicketDetails = null, System.Collections.Generic.IEnumerable secondaryConsent = null) { throw null; } + public static Azure.ResourceManager.Support.SupportTicketData SupportTicketData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string supportTicketId = null, string description = null, string problemClassificationId = null, string problemClassificationDisplayName = null, Azure.ResourceManager.Support.Models.SupportSeverityLevel? severity = default(Azure.ResourceManager.Support.Models.SupportSeverityLevel?), string enrollmentId = null, bool? require24X7Response = default(bool?), Azure.ResourceManager.Support.Models.AdvancedDiagnosticConsent? advancedDiagnosticConsent = default(Azure.ResourceManager.Support.Models.AdvancedDiagnosticConsent?), string problemScopingQuestions = null, string supportPlanId = null, Azure.ResourceManager.Support.Models.SupportContactProfile contactDetails = null, Azure.ResourceManager.Support.Models.SupportServiceLevelAgreement serviceLevelAgreement = null, string supportEngineerEmailAddress = null, string supportPlanType = null, string supportPlanDisplayName = null, string title = null, System.DateTimeOffset? problemStartOn = default(System.DateTimeOffset?), string serviceId = null, string serviceDisplayName = null, string status = null, System.DateTimeOffset? createdOn = default(System.DateTimeOffset?), System.DateTimeOffset? modifiedOn = default(System.DateTimeOffset?), string fileWorkspaceName = null, Azure.ResourceManager.Support.Models.IsTemporaryTicket? isTemporaryTicket = default(Azure.ResourceManager.Support.Models.IsTemporaryTicket?), Azure.Core.ResourceIdentifier technicalTicketDetailsResourceId = null, Azure.ResourceManager.Support.Models.QuotaTicketDetails quotaTicketDetails = null, System.Collections.Generic.IEnumerable secondaryConsent = null) { throw null; } } public partial class ChatTranscriptMessageProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - public ChatTranscriptMessageProperties() { } + public ChatTranscriptMessageProperties(string body) { } public string Body { get { throw null; } set { } } public Azure.ResourceManager.Support.Models.SupportTicketCommunicationDirection? CommunicationDirection { get { throw null; } } public Azure.ResourceManager.Support.Models.TranscriptContentType? ContentType { get { throw null; } } @@ -656,6 +688,19 @@ 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 ClassificationService : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal ClassificationService() { } + public string DisplayName { get { throw null; } } + public System.Collections.Generic.IReadOnlyList ResourceTypes { get { throw null; } } + public Azure.Core.ResourceIdentifier ServiceId { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Support.Models.ClassificationService System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Support.Models.ClassificationService System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.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 IsTemporaryTicket : System.IEquatable { @@ -674,6 +719,29 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public static bool operator !=(Azure.ResourceManager.Support.Models.IsTemporaryTicket left, Azure.ResourceManager.Support.Models.IsTemporaryTicket right) { throw null; } public override string ToString() { throw null; } } + public partial class LookUpResourceIdContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public LookUpResourceIdContent() { } + public string Identifier { get { throw null; } set { } } + public Azure.ResourceManager.Support.Models.SupportResourceTypeName? ResourceType { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Support.Models.LookUpResourceIdContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Support.Models.LookUpResourceIdContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class LookUpResourceIdResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal LookUpResourceIdResult() { } + public Azure.Core.ResourceIdentifier ResourceId { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Support.Models.LookUpResourceIdResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Support.Models.LookUpResourceIdResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.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 PreferredContactMethod : System.IEquatable { @@ -729,6 +797,82 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public partial class ServiceClassificationAnswer : Azure.ResourceManager.Support.Models.ClassificationService, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal ServiceClassificationAnswer() { } + public Azure.ResourceManager.Support.Models.ClassificationService ChildService { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Support.Models.ServiceClassificationAnswer System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Support.Models.ServiceClassificationAnswer System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ServiceClassificationContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ServiceClassificationContent() { } + public string AdditionalContext { get { throw null; } set { } } + public string IssueSummary { get { throw null; } set { } } + public Azure.Core.ResourceIdentifier ResourceId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Support.Models.ServiceClassificationContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Support.Models.ServiceClassificationContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ServiceClassificationOutput : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal ServiceClassificationOutput() { } + public System.Collections.Generic.IReadOnlyList ServiceClassificationResults { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Support.Models.ServiceClassificationOutput System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Support.Models.ServiceClassificationOutput System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ServiceProblemClassificationContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ServiceProblemClassificationContent(string issueSummary) { } + public string IssueSummary { get { throw null; } } + public Azure.Core.ResourceIdentifier ResourceId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Support.Models.ServiceProblemClassificationContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Support.Models.ServiceProblemClassificationContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ServiceProblemClassificationListResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal ServiceProblemClassificationListResult() { } + public System.Collections.Generic.IReadOnlyList ProblemClassificationResults { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Support.Models.ServiceProblemClassificationListResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Support.Models.ServiceProblemClassificationListResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ServiceProblemClassificationResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal ServiceProblemClassificationResult() { } + public string Description { get { throw null; } } + public string DisplayName { get { throw null; } } + public string ProblemClassificationId { get { throw null; } } + public string ProblemId { get { throw null; } } + public Azure.Core.ResourceIdentifier RelatedServiceId { get { throw null; } } + public System.Collections.Generic.IReadOnlyList ResourceTypes { get { throw null; } } + public Azure.Core.ResourceIdentifier ServiceId { get { throw null; } } + public string Title { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Support.Models.ServiceProblemClassificationResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Support.Models.ServiceProblemClassificationResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class SupportContactProfile : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public SupportContactProfile(string firstName, string lastName, Azure.ResourceManager.Support.Models.PreferredContactMethod preferredContactMethod, string primaryEmailAddress, string preferredTimeZone, string country, string preferredSupportLanguage) { } @@ -809,6 +953,23 @@ public enum SupportResourceType MicrosoftSupportSupportTickets = 0, MicrosoftSupportCommunications = 1, } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct SupportResourceTypeName : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public SupportResourceTypeName(string value) { throw null; } + public static Azure.ResourceManager.Support.Models.SupportResourceTypeName MicrosoftSupportSupportTickets { get { throw null; } } + public bool Equals(Azure.ResourceManager.Support.Models.SupportResourceTypeName 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.Support.Models.SupportResourceTypeName left, Azure.ResourceManager.Support.Models.SupportResourceTypeName right) { throw null; } + public static implicit operator Azure.ResourceManager.Support.Models.SupportResourceTypeName (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.Support.Models.SupportResourceTypeName left, Azure.ResourceManager.Support.Models.SupportResourceTypeName right) { throw null; } + public override string ToString() { throw null; } + } public partial class SupportServiceLevelAgreement : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public SupportServiceLevelAgreement() { } diff --git a/sdk/support/Azure.ResourceManager.Support/api/Azure.ResourceManager.Support.netstandard2.0.cs b/sdk/support/Azure.ResourceManager.Support/api/Azure.ResourceManager.Support.netstandard2.0.cs index 7dc27c898fb7..e7597d973200 100644 --- a/sdk/support/Azure.ResourceManager.Support/api/Azure.ResourceManager.Support.netstandard2.0.cs +++ b/sdk/support/Azure.ResourceManager.Support/api/Azure.ResourceManager.Support.netstandard2.0.cs @@ -43,6 +43,8 @@ public partial class ProblemClassificationData : Azure.ResourceManager.Models.Re { internal ProblemClassificationData() { } public string DisplayName { get { throw null; } } + public System.Collections.Generic.IReadOnlyDictionary Metadata { get { throw null; } } + public Azure.ResourceManager.Support.ProblemClassificationData ParentProblemClassification { get { throw null; } } public System.Collections.Generic.IReadOnlyList SecondaryConsentEnabled { get { throw null; } } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Support.ProblemClassificationData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -159,6 +161,7 @@ public partial class SupportAzureServiceData : Azure.ResourceManager.Models.Reso { internal SupportAzureServiceData() { } public string DisplayName { get { throw null; } } + public System.Collections.Generic.IReadOnlyDictionary Metadata { get { throw null; } } public System.Collections.Generic.IReadOnlyList ResourceTypes { get { throw null; } } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Support.SupportAzureServiceData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -173,6 +176,8 @@ public partial class SupportAzureServiceResource : Azure.ResourceManager.ArmReso protected SupportAzureServiceResource() { } public virtual Azure.ResourceManager.Support.SupportAzureServiceData Data { get { throw null; } } public virtual bool HasData { get { throw null; } } + public virtual Azure.Response ClassifyProblemsProblemClassificationsNoSubscription(Azure.ResourceManager.Support.Models.ServiceProblemClassificationContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ClassifyProblemsProblemClassificationsNoSubscriptionAsync(Azure.ResourceManager.Support.Models.ServiceProblemClassificationContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string serviceName) { 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; } @@ -191,6 +196,12 @@ public static partial class SupportExtensions public static System.Threading.Tasks.Task> CheckNameAvailabilitySupportTicketsNoSubscriptionAsync(this Azure.ResourceManager.Resources.TenantResource tenantResource, Azure.ResourceManager.Support.Models.SupportNameAvailabilityContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.Response CheckSupportTicketNameAvailability(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.ResourceManager.Support.Models.SupportNameAvailabilityContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static System.Threading.Tasks.Task> CheckSupportTicketNameAvailabilityAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.ResourceManager.Support.Models.SupportNameAvailabilityContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.Response ClassifyProblemsProblemClassification(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, string problemServiceName, Azure.ResourceManager.Support.Models.ServiceProblemClassificationContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static System.Threading.Tasks.Task> ClassifyProblemsProblemClassificationAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, string problemServiceName, Azure.ResourceManager.Support.Models.ServiceProblemClassificationContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.Response ClassifyServicesServiceClassification(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.ResourceManager.Support.Models.ServiceClassificationContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static System.Threading.Tasks.Task> ClassifyServicesServiceClassificationAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.ResourceManager.Support.Models.ServiceClassificationContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.Response ClassifyServicesServiceClassificationsNoSubscription(this Azure.ResourceManager.Resources.TenantResource tenantResource, Azure.ResourceManager.Support.Models.ServiceClassificationContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static System.Threading.Tasks.Task> ClassifyServicesServiceClassificationsNoSubscriptionAsync(this Azure.ResourceManager.Resources.TenantResource tenantResource, Azure.ResourceManager.Support.Models.ServiceClassificationContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.ResourceManager.Support.ProblemClassificationResource GetProblemClassificationResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.Response GetSubscriptionFileWorkspace(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, string fileWorkspaceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static System.Threading.Tasks.Task> GetSubscriptionFileWorkspaceAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, string fileWorkspaceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -218,6 +229,8 @@ public static partial class SupportExtensions public static System.Threading.Tasks.Task> GetTenantSupportTicketAsync(this Azure.ResourceManager.Resources.TenantResource tenantResource, string supportTicketName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.ResourceManager.Support.TenantSupportTicketResource GetTenantSupportTicketResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.Support.TenantSupportTicketCollection GetTenantSupportTickets(this Azure.ResourceManager.Resources.TenantResource tenantResource) { throw null; } + public static Azure.Response LookUpResourceId(this Azure.ResourceManager.Resources.TenantResource tenantResource, Azure.ResourceManager.Support.Models.LookUpResourceIdContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static System.Threading.Tasks.Task> LookUpResourceIdAsync(this Azure.ResourceManager.Resources.TenantResource tenantResource, Azure.ResourceManager.Support.Models.LookUpResourceIdContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } public partial class SupportFileDetailData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { @@ -282,7 +295,7 @@ protected SupportTicketCommunicationCollection() { } } public partial class SupportTicketCommunicationData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - public SupportTicketCommunicationData(string subject, string body) { } + public SupportTicketCommunicationData() { } public string Body { get { throw null; } set { } } public Azure.ResourceManager.Support.Models.SupportTicketCommunicationDirection? CommunicationDirection { get { throw null; } } public Azure.ResourceManager.Support.Models.SupportTicketCommunicationType? CommunicationType { get { throw null; } } @@ -315,8 +328,8 @@ protected SupportTicketCommunicationResource() { } } public partial class SupportTicketData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - public SupportTicketData(string description, string problemClassificationId, Azure.ResourceManager.Support.Models.SupportSeverityLevel severity, Azure.ResourceManager.Support.Models.AdvancedDiagnosticConsent advancedDiagnosticConsent, Azure.ResourceManager.Support.Models.SupportContactProfile contactDetails, string title, string serviceId) { } - public Azure.ResourceManager.Support.Models.AdvancedDiagnosticConsent AdvancedDiagnosticConsent { get { throw null; } set { } } + public SupportTicketData() { } + public Azure.ResourceManager.Support.Models.AdvancedDiagnosticConsent? AdvancedDiagnosticConsent { get { throw null; } set { } } public Azure.ResourceManager.Support.Models.SupportContactProfile ContactDetails { get { throw null; } set { } } public System.DateTimeOffset? CreatedOn { get { throw null; } } public string Description { get { throw null; } set { } } @@ -334,7 +347,7 @@ public SupportTicketData(string description, string problemClassificationId, Azu public string ServiceDisplayName { get { throw null; } } public string ServiceId { get { throw null; } set { } } public Azure.ResourceManager.Support.Models.SupportServiceLevelAgreement ServiceLevelAgreement { get { throw null; } set { } } - public Azure.ResourceManager.Support.Models.SupportSeverityLevel Severity { get { throw null; } set { } } + public Azure.ResourceManager.Support.Models.SupportSeverityLevel? Severity { get { throw null; } set { } } public string Status { get { throw null; } } public string SupportEngineerEmailAddress { get { throw null; } } public string SupportPlanDisplayName { get { throw null; } } @@ -584,6 +597,10 @@ public partial class MockableSupportSubscriptionResource : Azure.ResourceManager protected MockableSupportSubscriptionResource() { } public virtual Azure.Response CheckSupportTicketNameAvailability(Azure.ResourceManager.Support.Models.SupportNameAvailabilityContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> CheckSupportTicketNameAvailabilityAsync(Azure.ResourceManager.Support.Models.SupportNameAvailabilityContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response ClassifyProblemsProblemClassification(string problemServiceName, Azure.ResourceManager.Support.Models.ServiceProblemClassificationContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ClassifyProblemsProblemClassificationAsync(string problemServiceName, Azure.ResourceManager.Support.Models.ServiceProblemClassificationContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response ClassifyServicesServiceClassification(Azure.ResourceManager.Support.Models.ServiceClassificationContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ClassifyServicesServiceClassificationAsync(Azure.ResourceManager.Support.Models.ServiceClassificationContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response GetSubscriptionFileWorkspace(string fileWorkspaceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetSubscriptionFileWorkspaceAsync(string fileWorkspaceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.Support.SubscriptionFileWorkspaceCollection GetSubscriptionFileWorkspaces() { throw null; } @@ -596,6 +613,8 @@ public partial class MockableSupportTenantResource : Azure.ResourceManager.ArmRe protected MockableSupportTenantResource() { } public virtual Azure.Response CheckNameAvailabilitySupportTicketsNoSubscription(Azure.ResourceManager.Support.Models.SupportNameAvailabilityContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> CheckNameAvailabilitySupportTicketsNoSubscriptionAsync(Azure.ResourceManager.Support.Models.SupportNameAvailabilityContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response ClassifyServicesServiceClassificationsNoSubscription(Azure.ResourceManager.Support.Models.ServiceClassificationContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ClassifyServicesServiceClassificationsNoSubscriptionAsync(Azure.ResourceManager.Support.Models.ServiceClassificationContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response GetSupportAzureService(string serviceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetSupportAzureServiceAsync(string serviceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.Support.SupportAzureServiceCollection GetSupportAzureServices() { throw null; } @@ -605,6 +624,8 @@ protected MockableSupportTenantResource() { } public virtual Azure.Response GetTenantSupportTicket(string supportTicketName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetTenantSupportTicketAsync(string supportTicketName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.Support.TenantSupportTicketCollection GetTenantSupportTickets() { throw null; } + public virtual Azure.Response LookUpResourceId(Azure.ResourceManager.Support.Models.LookUpResourceIdContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> LookUpResourceIdAsync(Azure.ResourceManager.Support.Models.LookUpResourceIdContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } } namespace Azure.ResourceManager.Support.Models @@ -631,19 +652,30 @@ public static partial class ArmSupportModelFactory { public static Azure.ResourceManager.Support.ChatTranscriptDetailData ChatTranscriptDetailData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IEnumerable messages = null, System.DateTimeOffset? startOn = default(System.DateTimeOffset?)) { throw null; } public static Azure.ResourceManager.Support.Models.ChatTranscriptMessageProperties ChatTranscriptMessageProperties(Azure.ResourceManager.Support.Models.TranscriptContentType? contentType = default(Azure.ResourceManager.Support.Models.TranscriptContentType?), Azure.ResourceManager.Support.Models.SupportTicketCommunicationDirection? communicationDirection = default(Azure.ResourceManager.Support.Models.SupportTicketCommunicationDirection?), string sender = null, string body = null, System.DateTimeOffset? createdOn = default(System.DateTimeOffset?)) { throw null; } + public static Azure.ResourceManager.Support.Models.ClassificationService ClassificationService(Azure.Core.ResourceIdentifier serviceId = null, string displayName = null, System.Collections.Generic.IEnumerable resourceTypes = null) { throw null; } public static Azure.ResourceManager.Support.FileWorkspaceDetailData FileWorkspaceDetailData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.DateTimeOffset? createdOn = default(System.DateTimeOffset?), System.DateTimeOffset? expireOn = default(System.DateTimeOffset?)) { throw null; } - public static Azure.ResourceManager.Support.ProblemClassificationData ProblemClassificationData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string displayName = null, System.Collections.Generic.IEnumerable secondaryConsentEnabled = null) { throw null; } + public static Azure.ResourceManager.Support.Models.LookUpResourceIdResult LookUpResourceIdResult(Azure.Core.ResourceIdentifier resourceId = null) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public static Azure.ResourceManager.Support.ProblemClassificationData ProblemClassificationData(Azure.Core.ResourceIdentifier id, string name, Azure.Core.ResourceType resourceType, Azure.ResourceManager.Models.SystemData systemData, string displayName, System.Collections.Generic.IEnumerable secondaryConsentEnabled) { throw null; } + public static Azure.ResourceManager.Support.ProblemClassificationData ProblemClassificationData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string displayName = null, System.Collections.Generic.IEnumerable secondaryConsentEnabled = null, System.Collections.Generic.IReadOnlyDictionary metadata = null, Azure.ResourceManager.Support.ProblemClassificationData parentProblemClassification = null) { throw null; } public static Azure.ResourceManager.Support.Models.SecondaryConsentEnabled SecondaryConsentEnabled(string description = null, string secondaryConsentEnabledType = null) { throw null; } - public static Azure.ResourceManager.Support.SupportAzureServiceData SupportAzureServiceData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string displayName = null, System.Collections.Generic.IEnumerable resourceTypes = null) { throw null; } + public static Azure.ResourceManager.Support.Models.ServiceClassificationAnswer ServiceClassificationAnswer(Azure.Core.ResourceIdentifier serviceId = null, string displayName = null, System.Collections.Generic.IEnumerable resourceTypes = null, Azure.ResourceManager.Support.Models.ClassificationService childService = null) { throw null; } + public static Azure.ResourceManager.Support.Models.ServiceClassificationOutput ServiceClassificationOutput(System.Collections.Generic.IEnumerable serviceClassificationResults = null) { throw null; } + public static Azure.ResourceManager.Support.Models.ServiceProblemClassificationContent ServiceProblemClassificationContent(string issueSummary = null, Azure.Core.ResourceIdentifier resourceId = null) { throw null; } + public static Azure.ResourceManager.Support.Models.ServiceProblemClassificationListResult ServiceProblemClassificationListResult(System.Collections.Generic.IEnumerable problemClassificationResults = null) { throw null; } + public static Azure.ResourceManager.Support.Models.ServiceProblemClassificationResult ServiceProblemClassificationResult(string problemId = null, string title = null, string description = null, Azure.Core.ResourceIdentifier serviceId = null, string problemClassificationId = null, Azure.Core.ResourceIdentifier relatedServiceId = null, string displayName = null, System.Collections.Generic.IEnumerable resourceTypes = null) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public static Azure.ResourceManager.Support.SupportAzureServiceData SupportAzureServiceData(Azure.Core.ResourceIdentifier id, string name, Azure.Core.ResourceType resourceType, Azure.ResourceManager.Models.SystemData systemData, string displayName, System.Collections.Generic.IEnumerable resourceTypes) { throw null; } + public static Azure.ResourceManager.Support.SupportAzureServiceData SupportAzureServiceData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string displayName = null, System.Collections.Generic.IEnumerable resourceTypes = null, System.Collections.Generic.IReadOnlyDictionary metadata = null) { throw null; } public static Azure.ResourceManager.Support.SupportFileDetailData SupportFileDetailData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.DateTimeOffset? createdOn = default(System.DateTimeOffset?), int? chunkSize = default(int?), int? fileSize = default(int?), int? numberOfChunks = default(int?)) { throw null; } public static Azure.ResourceManager.Support.Models.SupportNameAvailabilityResult SupportNameAvailabilityResult(bool? isNameAvailable = default(bool?), string reason = null, string message = null) { throw null; } public static Azure.ResourceManager.Support.Models.SupportServiceLevelAgreement SupportServiceLevelAgreement(System.DateTimeOffset? startOn = default(System.DateTimeOffset?), System.DateTimeOffset? expireOn = default(System.DateTimeOffset?), int? slaInMinutes = default(int?)) { throw null; } public static Azure.ResourceManager.Support.SupportTicketCommunicationData SupportTicketCommunicationData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.Support.Models.SupportTicketCommunicationType? communicationType = default(Azure.ResourceManager.Support.Models.SupportTicketCommunicationType?), Azure.ResourceManager.Support.Models.SupportTicketCommunicationDirection? communicationDirection = default(Azure.ResourceManager.Support.Models.SupportTicketCommunicationDirection?), string sender = null, string subject = null, string body = null, System.DateTimeOffset? createdOn = default(System.DateTimeOffset?)) { throw null; } - public static Azure.ResourceManager.Support.SupportTicketData SupportTicketData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string supportTicketId = null, string description = null, string problemClassificationId = null, string problemClassificationDisplayName = null, Azure.ResourceManager.Support.Models.SupportSeverityLevel severity = default(Azure.ResourceManager.Support.Models.SupportSeverityLevel), string enrollmentId = null, bool? require24X7Response = default(bool?), Azure.ResourceManager.Support.Models.AdvancedDiagnosticConsent advancedDiagnosticConsent = default(Azure.ResourceManager.Support.Models.AdvancedDiagnosticConsent), string problemScopingQuestions = null, string supportPlanId = null, Azure.ResourceManager.Support.Models.SupportContactProfile contactDetails = null, Azure.ResourceManager.Support.Models.SupportServiceLevelAgreement serviceLevelAgreement = null, string supportEngineerEmailAddress = null, string supportPlanType = null, string supportPlanDisplayName = null, string title = null, System.DateTimeOffset? problemStartOn = default(System.DateTimeOffset?), string serviceId = null, string serviceDisplayName = null, string status = null, System.DateTimeOffset? createdOn = default(System.DateTimeOffset?), System.DateTimeOffset? modifiedOn = default(System.DateTimeOffset?), string fileWorkspaceName = null, Azure.ResourceManager.Support.Models.IsTemporaryTicket? isTemporaryTicket = default(Azure.ResourceManager.Support.Models.IsTemporaryTicket?), Azure.Core.ResourceIdentifier technicalTicketDetailsResourceId = null, Azure.ResourceManager.Support.Models.QuotaTicketDetails quotaTicketDetails = null, System.Collections.Generic.IEnumerable secondaryConsent = null) { throw null; } + public static Azure.ResourceManager.Support.SupportTicketData SupportTicketData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string supportTicketId = null, string description = null, string problemClassificationId = null, string problemClassificationDisplayName = null, Azure.ResourceManager.Support.Models.SupportSeverityLevel? severity = default(Azure.ResourceManager.Support.Models.SupportSeverityLevel?), string enrollmentId = null, bool? require24X7Response = default(bool?), Azure.ResourceManager.Support.Models.AdvancedDiagnosticConsent? advancedDiagnosticConsent = default(Azure.ResourceManager.Support.Models.AdvancedDiagnosticConsent?), string problemScopingQuestions = null, string supportPlanId = null, Azure.ResourceManager.Support.Models.SupportContactProfile contactDetails = null, Azure.ResourceManager.Support.Models.SupportServiceLevelAgreement serviceLevelAgreement = null, string supportEngineerEmailAddress = null, string supportPlanType = null, string supportPlanDisplayName = null, string title = null, System.DateTimeOffset? problemStartOn = default(System.DateTimeOffset?), string serviceId = null, string serviceDisplayName = null, string status = null, System.DateTimeOffset? createdOn = default(System.DateTimeOffset?), System.DateTimeOffset? modifiedOn = default(System.DateTimeOffset?), string fileWorkspaceName = null, Azure.ResourceManager.Support.Models.IsTemporaryTicket? isTemporaryTicket = default(Azure.ResourceManager.Support.Models.IsTemporaryTicket?), Azure.Core.ResourceIdentifier technicalTicketDetailsResourceId = null, Azure.ResourceManager.Support.Models.QuotaTicketDetails quotaTicketDetails = null, System.Collections.Generic.IEnumerable secondaryConsent = null) { throw null; } } public partial class ChatTranscriptMessageProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - public ChatTranscriptMessageProperties() { } + public ChatTranscriptMessageProperties(string body) { } public string Body { get { throw null; } set { } } public Azure.ResourceManager.Support.Models.SupportTicketCommunicationDirection? CommunicationDirection { get { throw null; } } public Azure.ResourceManager.Support.Models.TranscriptContentType? ContentType { get { throw null; } } @@ -656,6 +688,19 @@ 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 ClassificationService : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal ClassificationService() { } + public string DisplayName { get { throw null; } } + public System.Collections.Generic.IReadOnlyList ResourceTypes { get { throw null; } } + public Azure.Core.ResourceIdentifier ServiceId { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Support.Models.ClassificationService System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Support.Models.ClassificationService System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.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 IsTemporaryTicket : System.IEquatable { @@ -674,6 +719,29 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public static bool operator !=(Azure.ResourceManager.Support.Models.IsTemporaryTicket left, Azure.ResourceManager.Support.Models.IsTemporaryTicket right) { throw null; } public override string ToString() { throw null; } } + public partial class LookUpResourceIdContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public LookUpResourceIdContent() { } + public string Identifier { get { throw null; } set { } } + public Azure.ResourceManager.Support.Models.SupportResourceTypeName? ResourceType { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Support.Models.LookUpResourceIdContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Support.Models.LookUpResourceIdContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class LookUpResourceIdResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal LookUpResourceIdResult() { } + public Azure.Core.ResourceIdentifier ResourceId { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Support.Models.LookUpResourceIdResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Support.Models.LookUpResourceIdResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.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 PreferredContactMethod : System.IEquatable { @@ -729,6 +797,82 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public partial class ServiceClassificationAnswer : Azure.ResourceManager.Support.Models.ClassificationService, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal ServiceClassificationAnswer() { } + public Azure.ResourceManager.Support.Models.ClassificationService ChildService { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Support.Models.ServiceClassificationAnswer System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Support.Models.ServiceClassificationAnswer System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ServiceClassificationContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ServiceClassificationContent() { } + public string AdditionalContext { get { throw null; } set { } } + public string IssueSummary { get { throw null; } set { } } + public Azure.Core.ResourceIdentifier ResourceId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Support.Models.ServiceClassificationContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Support.Models.ServiceClassificationContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ServiceClassificationOutput : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal ServiceClassificationOutput() { } + public System.Collections.Generic.IReadOnlyList ServiceClassificationResults { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Support.Models.ServiceClassificationOutput System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Support.Models.ServiceClassificationOutput System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ServiceProblemClassificationContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ServiceProblemClassificationContent(string issueSummary) { } + public string IssueSummary { get { throw null; } } + public Azure.Core.ResourceIdentifier ResourceId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Support.Models.ServiceProblemClassificationContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Support.Models.ServiceProblemClassificationContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ServiceProblemClassificationListResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal ServiceProblemClassificationListResult() { } + public System.Collections.Generic.IReadOnlyList ProblemClassificationResults { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Support.Models.ServiceProblemClassificationListResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Support.Models.ServiceProblemClassificationListResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ServiceProblemClassificationResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal ServiceProblemClassificationResult() { } + public string Description { get { throw null; } } + public string DisplayName { get { throw null; } } + public string ProblemClassificationId { get { throw null; } } + public string ProblemId { get { throw null; } } + public Azure.Core.ResourceIdentifier RelatedServiceId { get { throw null; } } + public System.Collections.Generic.IReadOnlyList ResourceTypes { get { throw null; } } + public Azure.Core.ResourceIdentifier ServiceId { get { throw null; } } + public string Title { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Support.Models.ServiceProblemClassificationResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Support.Models.ServiceProblemClassificationResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class SupportContactProfile : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public SupportContactProfile(string firstName, string lastName, Azure.ResourceManager.Support.Models.PreferredContactMethod preferredContactMethod, string primaryEmailAddress, string preferredTimeZone, string country, string preferredSupportLanguage) { } @@ -809,6 +953,23 @@ public enum SupportResourceType MicrosoftSupportSupportTickets = 0, MicrosoftSupportCommunications = 1, } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct SupportResourceTypeName : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public SupportResourceTypeName(string value) { throw null; } + public static Azure.ResourceManager.Support.Models.SupportResourceTypeName MicrosoftSupportSupportTickets { get { throw null; } } + public bool Equals(Azure.ResourceManager.Support.Models.SupportResourceTypeName 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.Support.Models.SupportResourceTypeName left, Azure.ResourceManager.Support.Models.SupportResourceTypeName right) { throw null; } + public static implicit operator Azure.ResourceManager.Support.Models.SupportResourceTypeName (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.Support.Models.SupportResourceTypeName left, Azure.ResourceManager.Support.Models.SupportResourceTypeName right) { throw null; } + public override string ToString() { throw null; } + } public partial class SupportServiceLevelAgreement : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public SupportServiceLevelAgreement() { } diff --git a/sdk/support/Azure.ResourceManager.Support/samples/Generated/Samples/Sample_ProblemClassificationCollection.cs b/sdk/support/Azure.ResourceManager.Support/samples/Generated/Samples/Sample_ProblemClassificationCollection.cs index b1fbf098c33f..a9ae74961a77 100644 --- a/sdk/support/Azure.ResourceManager.Support/samples/Generated/Samples/Sample_ProblemClassificationCollection.cs +++ b/sdk/support/Azure.ResourceManager.Support/samples/Generated/Samples/Sample_ProblemClassificationCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_ProblemClassificationCollection [Ignore("Only validating compilation of examples")] public async Task Get_GetsDetailsOfProblemClassificationForAzureService() { - // Generated from example definition: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/GetProblemClassification.json + // Generated from example definition: specification/support/resource-manager/Microsoft.Support/preview/2023-06-01-preview/examples/GetProblemClassification.json // this example is just showing the usage of "ProblemClassifications_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -51,7 +51,7 @@ public async Task Get_GetsDetailsOfProblemClassificationForAzureService() [Ignore("Only validating compilation of examples")] public async Task GetAll_GetsListOfProblemClassificationsForAServiceForWhichASupportTicketCanBeCreated() { - // Generated from example definition: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/ListProblemClassifications.json + // Generated from example definition: specification/support/resource-manager/Microsoft.Support/preview/2023-06-01-preview/examples/ListProblemClassifications.json // this example is just showing the usage of "ProblemClassifications_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -85,7 +85,7 @@ public async Task GetAll_GetsListOfProblemClassificationsForAServiceForWhichASup [Ignore("Only validating compilation of examples")] public async Task Exists_GetsDetailsOfProblemClassificationForAzureService() { - // Generated from example definition: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/GetProblemClassification.json + // Generated from example definition: specification/support/resource-manager/Microsoft.Support/preview/2023-06-01-preview/examples/GetProblemClassification.json // this example is just showing the usage of "ProblemClassifications_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -113,7 +113,7 @@ public async Task Exists_GetsDetailsOfProblemClassificationForAzureService() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetsDetailsOfProblemClassificationForAzureService() { - // Generated from example definition: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/GetProblemClassification.json + // Generated from example definition: specification/support/resource-manager/Microsoft.Support/preview/2023-06-01-preview/examples/GetProblemClassification.json // this example is just showing the usage of "ProblemClassifications_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/support/Azure.ResourceManager.Support/samples/Generated/Samples/Sample_ProblemClassificationResource.cs b/sdk/support/Azure.ResourceManager.Support/samples/Generated/Samples/Sample_ProblemClassificationResource.cs index d4215054ee64..11d5bd31cd9b 100644 --- a/sdk/support/Azure.ResourceManager.Support/samples/Generated/Samples/Sample_ProblemClassificationResource.cs +++ b/sdk/support/Azure.ResourceManager.Support/samples/Generated/Samples/Sample_ProblemClassificationResource.cs @@ -19,7 +19,7 @@ public partial class Sample_ProblemClassificationResource [Ignore("Only validating compilation of examples")] public async Task Get_GetsDetailsOfProblemClassificationForAzureService() { - // Generated from example definition: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/GetProblemClassification.json + // Generated from example definition: specification/support/resource-manager/Microsoft.Support/preview/2023-06-01-preview/examples/GetProblemClassification.json // this example is just showing the usage of "ProblemClassifications_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/support/Azure.ResourceManager.Support/samples/Generated/Samples/Sample_SubscriptionFileWorkspaceCollection.cs b/sdk/support/Azure.ResourceManager.Support/samples/Generated/Samples/Sample_SubscriptionFileWorkspaceCollection.cs index f1d5ca80a0c0..287d1b1078b7 100644 --- a/sdk/support/Azure.ResourceManager.Support/samples/Generated/Samples/Sample_SubscriptionFileWorkspaceCollection.cs +++ b/sdk/support/Azure.ResourceManager.Support/samples/Generated/Samples/Sample_SubscriptionFileWorkspaceCollection.cs @@ -18,9 +18,9 @@ public partial class Sample_SubscriptionFileWorkspaceCollection { [Test] [Ignore("Only validating compilation of examples")] - public async Task CreateOrUpdate_CreateAFileWorkspaceForASubscription() + public async Task CreateOrUpdate_CreateASubscriptionScopedFileWorkspace() { - // Generated from example definition: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/CreateFileWorkspaceForSubscription.json + // Generated from example definition: specification/support/resource-manager/Microsoft.Support/preview/2023-06-01-preview/examples/CreateFileWorkspaceForSubscription.json // this example is just showing the usage of "FileWorkspaces_Create" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -30,7 +30,7 @@ public async Task CreateOrUpdate_CreateAFileWorkspaceForASubscription() // 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 = "132d901f-189d-4381-9214-fe68e27e05a1"; + string subscriptionId = "subid"; ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); @@ -53,7 +53,7 @@ public async Task CreateOrUpdate_CreateAFileWorkspaceForASubscription() [Ignore("Only validating compilation of examples")] public async Task Get_GetDetailsOfASubscriptionFileWorkspace() { - // Generated from example definition: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/GetFileWorkspaceDetailsForSubscription.json + // Generated from example definition: specification/support/resource-manager/Microsoft.Support/preview/2023-06-01-preview/examples/GetFileWorkspaceDetailsForSubscription.json // this example is just showing the usage of "FileWorkspaces_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -63,7 +63,7 @@ public async Task Get_GetDetailsOfASubscriptionFileWorkspace() // 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 = "132d901f-189d-4381-9214-fe68e27e05a1"; + string subscriptionId = "subid"; ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); @@ -85,7 +85,7 @@ public async Task Get_GetDetailsOfASubscriptionFileWorkspace() [Ignore("Only validating compilation of examples")] public async Task Exists_GetDetailsOfASubscriptionFileWorkspace() { - // Generated from example definition: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/GetFileWorkspaceDetailsForSubscription.json + // Generated from example definition: specification/support/resource-manager/Microsoft.Support/preview/2023-06-01-preview/examples/GetFileWorkspaceDetailsForSubscription.json // this example is just showing the usage of "FileWorkspaces_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -95,7 +95,7 @@ public async Task Exists_GetDetailsOfASubscriptionFileWorkspace() // 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 = "132d901f-189d-4381-9214-fe68e27e05a1"; + string subscriptionId = "subid"; ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); @@ -113,7 +113,7 @@ public async Task Exists_GetDetailsOfASubscriptionFileWorkspace() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetDetailsOfASubscriptionFileWorkspace() { - // Generated from example definition: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/GetFileWorkspaceDetailsForSubscription.json + // Generated from example definition: specification/support/resource-manager/Microsoft.Support/preview/2023-06-01-preview/examples/GetFileWorkspaceDetailsForSubscription.json // this example is just showing the usage of "FileWorkspaces_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -123,7 +123,7 @@ public async Task GetIfExists_GetDetailsOfASubscriptionFileWorkspace() // 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 = "132d901f-189d-4381-9214-fe68e27e05a1"; + string subscriptionId = "subid"; ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); diff --git a/sdk/support/Azure.ResourceManager.Support/samples/Generated/Samples/Sample_SubscriptionFileWorkspaceResource.cs b/sdk/support/Azure.ResourceManager.Support/samples/Generated/Samples/Sample_SubscriptionFileWorkspaceResource.cs index ca2aa4c2c40e..9e0ea71108ae 100644 --- a/sdk/support/Azure.ResourceManager.Support/samples/Generated/Samples/Sample_SubscriptionFileWorkspaceResource.cs +++ b/sdk/support/Azure.ResourceManager.Support/samples/Generated/Samples/Sample_SubscriptionFileWorkspaceResource.cs @@ -19,7 +19,7 @@ public partial class Sample_SubscriptionFileWorkspaceResource [Ignore("Only validating compilation of examples")] public async Task Get_GetDetailsOfASubscriptionFileWorkspace() { - // Generated from example definition: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/GetFileWorkspaceDetailsForSubscription.json + // Generated from example definition: specification/support/resource-manager/Microsoft.Support/preview/2023-06-01-preview/examples/GetFileWorkspaceDetailsForSubscription.json // this example is just showing the usage of "FileWorkspaces_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -29,7 +29,7 @@ public async Task Get_GetDetailsOfASubscriptionFileWorkspace() // this example assumes you already have this SubscriptionFileWorkspaceResource created on azure // for more information of creating SubscriptionFileWorkspaceResource, please refer to the document of SubscriptionFileWorkspaceResource - string subscriptionId = "132d901f-189d-4381-9214-fe68e27e05a1"; + string subscriptionId = "subid"; string fileWorkspaceName = "testworkspace"; ResourceIdentifier subscriptionFileWorkspaceResourceId = SubscriptionFileWorkspaceResource.CreateResourceIdentifier(subscriptionId, fileWorkspaceName); SubscriptionFileWorkspaceResource subscriptionFileWorkspace = client.GetSubscriptionFileWorkspaceResource(subscriptionFileWorkspaceResourceId); @@ -46,9 +46,9 @@ public async Task Get_GetDetailsOfASubscriptionFileWorkspace() [Test] [Ignore("Only validating compilation of examples")] - public async Task Update_CreateAFileWorkspaceForASubscription() + public async Task Update_CreateASubscriptionScopedFileWorkspace() { - // Generated from example definition: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/CreateFileWorkspaceForSubscription.json + // Generated from example definition: specification/support/resource-manager/Microsoft.Support/preview/2023-06-01-preview/examples/CreateFileWorkspaceForSubscription.json // this example is just showing the usage of "FileWorkspaces_Create" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -58,7 +58,7 @@ public async Task Update_CreateAFileWorkspaceForASubscription() // this example assumes you already have this SubscriptionFileWorkspaceResource created on azure // for more information of creating SubscriptionFileWorkspaceResource, please refer to the document of SubscriptionFileWorkspaceResource - string subscriptionId = "132d901f-189d-4381-9214-fe68e27e05a1"; + string subscriptionId = "subid"; string fileWorkspaceName = "testworkspace"; ResourceIdentifier subscriptionFileWorkspaceResourceId = SubscriptionFileWorkspaceResource.CreateResourceIdentifier(subscriptionId, fileWorkspaceName); SubscriptionFileWorkspaceResource subscriptionFileWorkspace = client.GetSubscriptionFileWorkspaceResource(subscriptionFileWorkspaceResourceId); diff --git a/sdk/support/Azure.ResourceManager.Support/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs b/sdk/support/Azure.ResourceManager.Support/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs index 0ca627e62f74..f2b9ec87ece4 100644 --- a/sdk/support/Azure.ResourceManager.Support/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs +++ b/sdk/support/Azure.ResourceManager.Support/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs @@ -19,9 +19,67 @@ public partial class Sample_SubscriptionResourceExtensions { [Test] [Ignore("Only validating compilation of examples")] - public async Task CheckSupportTicketNameAvailability_ChecksWhetherNameIsAvailableForASubscriptionSupportTicketResource() + public async Task ClassifyServicesServiceClassification_ClassifyListOfAzureServicesForASubscription() { - // Generated from example definition: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/CheckNameAvailabilityWithSubscription.json + // Generated from example definition: specification/support/resource-manager/Microsoft.Support/preview/2023-06-01-preview/examples/ClassifyServicesForSubscription.json + // this example is just showing the usage of "ServiceClassifications_ClassifyServices" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SubscriptionResource created on azure + // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); + SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); + + // invoke the operation + ServiceClassificationContent content = new ServiceClassificationContent + { + IssueSummary = "Can not connect to Windows VM", + ResourceId = new ResourceIdentifier("/subscriptions/76cb77fa-8b17-4eab-9493-b65dace99813/resourceGroups/rgname/providers/Microsoft.Compute/virtualMachines/vmname"), + }; + ServiceClassificationOutput result = await subscriptionResource.ClassifyServicesServiceClassificationAsync(content); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task ClassifyProblemsProblemClassification_ClassifyListOfProblemClassificationsForASpecifiedAzureServiceForASubscription() + { + // Generated from example definition: specification/support/resource-manager/Microsoft.Support/preview/2023-06-01-preview/examples/ClassifyProblemClassificationsForSubscription.json + // this example is just showing the usage of "ProblemClassifications_ClassifyProblems" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SubscriptionResource created on azure + // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); + SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); + + // invoke the operation + string problemServiceName = "serviceId1"; + ServiceProblemClassificationContent content = new ServiceProblemClassificationContent("Can not connect to Windows VM") + { + ResourceId = new ResourceIdentifier("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Compute/virtualMachines/vmname"), + }; + ServiceProblemClassificationListResult result = await subscriptionResource.ClassifyProblemsProblemClassificationAsync(problemServiceName, content); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CheckSupportTicketNameAvailability_ChecksWhetherNameIsAvailableForSubscriptionScopedSupportTicketResource() + { + // Generated from example definition: specification/support/resource-manager/Microsoft.Support/preview/2023-06-01-preview/examples/CheckNameAvailabilityWithSubscription.json // this example is just showing the usage of "SupportTickets_CheckNameAvailability" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -31,7 +89,7 @@ public async Task CheckSupportTicketNameAvailability_ChecksWhetherNameIsAvailabl // 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 = "132d901f-189d-4381-9214-fe68e27e05a1"; + string subscriptionId = "subid"; ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); diff --git a/sdk/support/Azure.ResourceManager.Support/samples/Generated/Samples/Sample_SubscriptionSupportTicketCollection.cs b/sdk/support/Azure.ResourceManager.Support/samples/Generated/Samples/Sample_SubscriptionSupportTicketCollection.cs index cee8fd403927..dd946da22436 100644 --- a/sdk/support/Azure.ResourceManager.Support/samples/Generated/Samples/Sample_SubscriptionSupportTicketCollection.cs +++ b/sdk/support/Azure.ResourceManager.Support/samples/Generated/Samples/Sample_SubscriptionSupportTicketCollection.cs @@ -19,9 +19,9 @@ public partial class Sample_SubscriptionSupportTicketCollection { [Test] [Ignore("Only validating compilation of examples")] - public async Task CreateOrUpdate_CreateATicketForBillingRelatedIssues() + public async Task CreateOrUpdate_CreateASubscriptionScopedTicketForBillingRelatedIssues() { - // Generated from example definition: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/CreateBillingSupportTicketForSubscription.json + // Generated from example definition: specification/support/resource-manager/Microsoft.Support/preview/2023-06-01-preview/examples/CreateBillingSupportTicketForSubscription.json // this example is just showing the usage of "SupportTickets_Create" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -31,7 +31,7 @@ public async Task CreateOrUpdate_CreateATicketForBillingRelatedIssues() // 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 = "132d901f-189d-4381-9214-fe68e27e05a1"; + string subscriptionId = "subid"; ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); @@ -40,12 +40,13 @@ public async Task CreateOrUpdate_CreateATicketForBillingRelatedIssues() // invoke the operation string supportTicketName = "testticket"; - SupportTicketData data = new SupportTicketData( - "my description", - "/providers/Microsoft.Support/services/billing_service_guid/problemClassifications/billing_problemClassification_guid", - SupportSeverityLevel.Moderate, - AdvancedDiagnosticConsent.No, - new SupportContactProfile( + SupportTicketData data = new SupportTicketData + { + Description = "my description", + ProblemClassificationId = "/providers/Microsoft.Support/services/billing_service_guid/problemClassifications/billing_problemClassification_guid", + Severity = SupportSeverityLevel.Moderate, + SupportPlanId = "U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw=", + ContactDetails = new SupportContactProfile( "abc", "xyz", PreferredContactMethod.Email, @@ -53,10 +54,8 @@ public async Task CreateOrUpdate_CreateATicketForBillingRelatedIssues() "Pacific Standard Time", "usa", "en-US"), - "my title", - "/providers/Microsoft.Support/services/billing_service_guid") - { - SupportPlanId = "U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw=", + Title = "my title", + ServiceId = "/providers/Microsoft.Support/services/billing_service_guid", FileWorkspaceName = "6f16735c-1530836f-e9970f1a-2e49-47b7-96cd-9746b83aa066", }; ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, supportTicketName, data); @@ -71,9 +70,9 @@ public async Task CreateOrUpdate_CreateATicketForBillingRelatedIssues() [Test] [Ignore("Only validating compilation of examples")] - public async Task CreateOrUpdate_CreateATicketForSubscriptionManagementRelatedIssuesForASubscription() + public async Task CreateOrUpdate_CreateASubscriptionScopedTicketForSubscriptionManagementRelatedIssues() { - // Generated from example definition: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/CreateSubMgmtSupportTicketForSubscription.json + // Generated from example definition: specification/support/resource-manager/Microsoft.Support/preview/2023-06-01-preview/examples/CreateSubMgmtSupportTicketForSubscription.json // this example is just showing the usage of "SupportTickets_Create" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -83,7 +82,7 @@ public async Task CreateOrUpdate_CreateATicketForSubscriptionManagementRelatedIs // 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 = "132d901f-189d-4381-9214-fe68e27e05a1"; + string subscriptionId = "subid"; ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); @@ -92,12 +91,13 @@ public async Task CreateOrUpdate_CreateATicketForSubscriptionManagementRelatedIs // invoke the operation string supportTicketName = "testticket"; - SupportTicketData data = new SupportTicketData( - "my description", - "/providers/Microsoft.Support/services/subscription_management_service_guid/problemClassifications/subscription_management_problemClassification_guid", - SupportSeverityLevel.Moderate, - AdvancedDiagnosticConsent.No, - new SupportContactProfile( + SupportTicketData data = new SupportTicketData + { + Description = "my description", + ProblemClassificationId = "/providers/Microsoft.Support/services/subscription_management_service_guid/problemClassifications/subscription_management_problemClassification_guid", + Severity = SupportSeverityLevel.Moderate, + SupportPlanId = "U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw=", + ContactDetails = new SupportContactProfile( "abc", "xyz", PreferredContactMethod.Email, @@ -105,10 +105,8 @@ public async Task CreateOrUpdate_CreateATicketForSubscriptionManagementRelatedIs "Pacific Standard Time", "usa", "en-US"), - "my title", - "/providers/Microsoft.Support/services/subscription_management_service_guid") - { - SupportPlanId = "U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw=", + Title = "my title", + ServiceId = "/providers/Microsoft.Support/services/subscription_management_service_guid", FileWorkspaceName = "6f16735c-1530836f-e9970f1a-2e49-47b7-96cd-9746b83aa066", }; ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, supportTicketName, data); @@ -123,9 +121,9 @@ public async Task CreateOrUpdate_CreateATicketForSubscriptionManagementRelatedIs [Test] [Ignore("Only validating compilation of examples")] - public async Task CreateOrUpdate_CreateATicketForTechnicalIssueRelatedToASpecificResourceForASubscription() + public async Task CreateOrUpdate_CreateASubscriptionScopedTicketForTechnicalIssueRelatedToASpecificResource() { - // Generated from example definition: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/CreateTechnicalSupportTicketForSubscription.json + // Generated from example definition: specification/support/resource-manager/Microsoft.Support/preview/2023-06-01-preview/examples/CreateTechnicalSupportTicketForSubscription.json // this example is just showing the usage of "SupportTickets_Create" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -135,7 +133,7 @@ public async Task CreateOrUpdate_CreateATicketForTechnicalIssueRelatedToASpecifi // 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 = "132d901f-189d-4381-9214-fe68e27e05a1"; + string subscriptionId = "subid"; ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); @@ -144,12 +142,15 @@ public async Task CreateOrUpdate_CreateATicketForTechnicalIssueRelatedToASpecifi // invoke the operation string supportTicketName = "testticket"; - SupportTicketData data = new SupportTicketData( - "my description", - "/providers/Microsoft.Support/services/virtual_machine_running_linux_service_guid/problemClassifications/problemClassification_guid", - SupportSeverityLevel.Moderate, - AdvancedDiagnosticConsent.Yes, - new SupportContactProfile( + SupportTicketData data = new SupportTicketData + { + Description = "my description", + ProblemClassificationId = "/providers/Microsoft.Support/services/virtual_machine_running_linux_service_guid/problemClassifications/problemClassification_guid", + Severity = SupportSeverityLevel.Moderate, + AdvancedDiagnosticConsent = AdvancedDiagnosticConsent.Yes, + ProblemScopingQuestions = "{\"articleId\":\"076846c1-4c0b-4b21-91c6-1a30246b3867\",\"scopingDetails\":[{\"question\":\"When did the problem begin?\",\"controlId\":\"problem_start_time\",\"orderId\":1,\"inputType\":\"static\",\"answer\":{\"displayValue\":\"2023-08-31T18:55:00.739Z\",\"value\":\"2023-08-31T18:55:00.739Z\",\"type\":\"datetime\"}},{\"question\":\"API Type of the Cosmos DB account\",\"controlId\":\"api_type\",\"orderId\":2,\"inputType\":\"static\",\"answer\":{\"displayValue\":\"Table\",\"value\":\"tables\",\"type\":\"string\"}},{\"question\":\"Table name\",\"controlId\":\"collection_name_table\",\"orderId\":11,\"inputType\":\"nonstatic\",\"answer\":{\"displayValue\":\"Select Table Name\",\"value\":\"dont_know_answer\",\"type\":\"string\"}},{\"question\":\"Provide additional details about the issue you're facing\",\"controlId\":\"problem_description\",\"orderId\":12,\"inputType\":\"nonstatic\",\"answer\":{\"displayValue\":\"test ticket, please ignore and close\",\"value\":\"test ticket, please ignore and close\",\"type\":\"string\"}}]}", + SupportPlanId = "U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw=", + ContactDetails = new SupportContactProfile( "abc", "xyz", PreferredContactMethod.Email, @@ -157,13 +158,10 @@ public async Task CreateOrUpdate_CreateATicketForTechnicalIssueRelatedToASpecifi "Pacific Standard Time", "usa", "en-US"), - "my title", - "/providers/Microsoft.Support/services/cddd3eb5-1830-b494-44fd-782f691479dc") - { - ProblemScopingQuestions = "{\"articleId\":\"076846c1-4c0b-4b21-91c6-1a30246b3867\",\"scopingDetails\":[{\"question\":\"When did the problem begin?\",\"controlId\":\"problem_start_time\",\"orderId\":1,\"inputType\":\"static\",\"answer\":{\"displayValue\":\"2023-08-31T18:55:00.739Z\",\"value\":\"2023-08-31T18:55:00.739Z\",\"type\":\"datetime\"}},{\"question\":\"API Type of the Cosmos DB account\",\"controlId\":\"api_type\",\"orderId\":2,\"inputType\":\"static\",\"answer\":{\"displayValue\":\"Table\",\"value\":\"tables\",\"type\":\"string\"}},{\"question\":\"Table name\",\"controlId\":\"collection_name_table\",\"orderId\":11,\"inputType\":\"nonstatic\",\"answer\":{\"displayValue\":\"Select Table Name\",\"value\":\"dont_know_answer\",\"type\":\"string\"}},{\"question\":\"Provide additional details about the issue you're facing\",\"controlId\":\"problem_description\",\"orderId\":12,\"inputType\":\"nonstatic\",\"answer\":{\"displayValue\":\"test ticket, please ignore and close\",\"value\":\"test ticket, please ignore and close\",\"type\":\"string\"}}]}", - SupportPlanId = "U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw=", + Title = "my title", + ServiceId = "/providers/Microsoft.Support/services/cddd3eb5-1830-b494-44fd-782f691479dc", FileWorkspaceName = "6f16735c-1530836f-e9970f1a-2e49-47b7-96cd-9746b83aa066", - TechnicalTicketDetailsResourceId = new ResourceIdentifier("/subscriptions/132d901f-189d-4381-9214-fe68e27e05a1/resourceGroups/test/providers/Microsoft.Compute/virtualMachines/testserver"), + TechnicalTicketDetailsResourceId = new ResourceIdentifier("/subscriptions/subid/resourceGroups/test/providers/Microsoft.Compute/virtualMachines/testserver"), SecondaryConsent = {new SecondaryConsent { UserConsent = UserConsent.Yes, @@ -184,7 +182,7 @@ public async Task CreateOrUpdate_CreateATicketForTechnicalIssueRelatedToASpecifi [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreateATicketToRequestQuotaIncreaseForActiveJobsAndJobSchedulesForABatchAccount() { - // Generated from example definition: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/CreateBatchQuotaTicketForSpecificBatchAccountForActiveJobs.json + // Generated from example definition: specification/support/resource-manager/Microsoft.Support/preview/2023-06-01-preview/examples/CreateBatchQuotaTicketForSpecificBatchAccountForActiveJobs.json // this example is just showing the usage of "SupportTickets_Create" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -194,7 +192,7 @@ public async Task CreateOrUpdate_CreateATicketToRequestQuotaIncreaseForActiveJob // 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 = "132d901f-189d-4381-9214-fe68e27e05a1"; + string subscriptionId = "subid"; ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); @@ -203,12 +201,14 @@ public async Task CreateOrUpdate_CreateATicketToRequestQuotaIncreaseForActiveJob // invoke the operation string supportTicketName = "testticket"; - SupportTicketData data = new SupportTicketData( - "my description", - "/providers/Microsoft.Support/services/quota_service_guid/problemClassifications/batch_problemClassification_guid", - SupportSeverityLevel.Moderate, - AdvancedDiagnosticConsent.Yes, - new SupportContactProfile( + SupportTicketData data = new SupportTicketData + { + Description = "my description", + ProblemClassificationId = "/providers/Microsoft.Support/services/quota_service_guid/problemClassifications/batch_problemClassification_guid", + Severity = SupportSeverityLevel.Moderate, + AdvancedDiagnosticConsent = AdvancedDiagnosticConsent.Yes, + SupportPlanId = "U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw=", + ContactDetails = new SupportContactProfile( "abc", "xyz", PreferredContactMethod.Email, @@ -216,10 +216,8 @@ public async Task CreateOrUpdate_CreateATicketToRequestQuotaIncreaseForActiveJob "Pacific Standard Time", "usa", "en-US"), - "my title", - "/providers/Microsoft.Support/services/quota_service_guid") - { - SupportPlanId = "U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw=", + Title = "my title", + ServiceId = "/providers/Microsoft.Support/services/quota_service_guid", QuotaTicketDetails = new QuotaTicketDetails { QuotaChangeRequestSubType = "Account", @@ -245,7 +243,7 @@ public async Task CreateOrUpdate_CreateATicketToRequestQuotaIncreaseForActiveJob [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreateATicketToRequestQuotaIncreaseForAzureSQLManagedInstance() { - // Generated from example definition: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/CreateSqlManagedInstanceQuotaTicket.json + // Generated from example definition: specification/support/resource-manager/Microsoft.Support/preview/2023-06-01-preview/examples/CreateSqlManagedInstanceQuotaTicket.json // this example is just showing the usage of "SupportTickets_Create" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -255,7 +253,7 @@ public async Task CreateOrUpdate_CreateATicketToRequestQuotaIncreaseForAzureSQLM // 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 = "132d901f-189d-4381-9214-fe68e27e05a1"; + string subscriptionId = "subid"; ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); @@ -264,12 +262,14 @@ public async Task CreateOrUpdate_CreateATicketToRequestQuotaIncreaseForAzureSQLM // invoke the operation string supportTicketName = "testticket"; - SupportTicketData data = new SupportTicketData( - "my description", - "/providers/Microsoft.Support/services/quota_service_guid/problemClassifications/sql_managedinstance_problemClassification_guid", - SupportSeverityLevel.Moderate, - AdvancedDiagnosticConsent.Yes, - new SupportContactProfile( + SupportTicketData data = new SupportTicketData + { + Description = "my description", + ProblemClassificationId = "/providers/Microsoft.Support/services/quota_service_guid/problemClassifications/sql_managedinstance_problemClassification_guid", + Severity = SupportSeverityLevel.Moderate, + AdvancedDiagnosticConsent = AdvancedDiagnosticConsent.Yes, + SupportPlanId = "U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw=", + ContactDetails = new SupportContactProfile( "abc", "xyz", PreferredContactMethod.Email, @@ -277,10 +277,8 @@ public async Task CreateOrUpdate_CreateATicketToRequestQuotaIncreaseForAzureSQLM "Pacific Standard Time", "usa", "en-US"), - "my title", - "/providers/Microsoft.Support/services/quota_service_guid") - { - SupportPlanId = "U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw=", + Title = "my title", + ServiceId = "/providers/Microsoft.Support/services/quota_service_guid", QuotaTicketDetails = new QuotaTicketDetails { QuotaChangeRequestSubType = "SQLMI", @@ -310,7 +308,7 @@ public async Task CreateOrUpdate_CreateATicketToRequestQuotaIncreaseForAzureSQLM [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreateATicketToRequestQuotaIncreaseForBatchAccountsForASubscription() { - // Generated from example definition: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/CreateBatchQuotaTicketForSubscription.json + // Generated from example definition: specification/support/resource-manager/Microsoft.Support/preview/2023-06-01-preview/examples/CreateBatchQuotaTicketForSubscription.json // this example is just showing the usage of "SupportTickets_Create" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -320,7 +318,7 @@ public async Task CreateOrUpdate_CreateATicketToRequestQuotaIncreaseForBatchAcco // 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 = "132d901f-189d-4381-9214-fe68e27e05a1"; + string subscriptionId = "subid"; ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); @@ -329,12 +327,14 @@ public async Task CreateOrUpdate_CreateATicketToRequestQuotaIncreaseForBatchAcco // invoke the operation string supportTicketName = "testticket"; - SupportTicketData data = new SupportTicketData( - "my description", - "/providers/Microsoft.Support/services/quota_service_guid/problemClassifications/batch_problemClassification_guid", - SupportSeverityLevel.Moderate, - AdvancedDiagnosticConsent.Yes, - new SupportContactProfile( + SupportTicketData data = new SupportTicketData + { + Description = "my description", + ProblemClassificationId = "/providers/Microsoft.Support/services/quota_service_guid/problemClassifications/batch_problemClassification_guid", + Severity = SupportSeverityLevel.Moderate, + AdvancedDiagnosticConsent = AdvancedDiagnosticConsent.Yes, + SupportPlanId = "U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw=", + ContactDetails = new SupportContactProfile( "abc", "xyz", PreferredContactMethod.Email, @@ -342,10 +342,8 @@ public async Task CreateOrUpdate_CreateATicketToRequestQuotaIncreaseForBatchAcco "Pacific Standard Time", "usa", "en-US"), - "my title", - "/providers/Microsoft.Support/services/quota_service_guid") - { - SupportPlanId = "U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw=", + Title = "my title", + ServiceId = "/providers/Microsoft.Support/services/quota_service_guid", QuotaTicketDetails = new QuotaTicketDetails { QuotaChangeRequestSubType = "Subscription", @@ -371,7 +369,7 @@ public async Task CreateOrUpdate_CreateATicketToRequestQuotaIncreaseForBatchAcco [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreateATicketToRequestQuotaIncreaseForComputeVMCores() { - // Generated from example definition: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/CreateCoresQuotaTicketForSubscription.json + // Generated from example definition: specification/support/resource-manager/Microsoft.Support/preview/2023-06-01-preview/examples/CreateCoresQuotaTicketForSubscription.json // this example is just showing the usage of "SupportTickets_Create" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -381,7 +379,7 @@ public async Task CreateOrUpdate_CreateATicketToRequestQuotaIncreaseForComputeVM // 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 = "132d901f-189d-4381-9214-fe68e27e05a1"; + string subscriptionId = "subid"; ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); @@ -390,12 +388,14 @@ public async Task CreateOrUpdate_CreateATicketToRequestQuotaIncreaseForComputeVM // invoke the operation string supportTicketName = "testticket"; - SupportTicketData data = new SupportTicketData( - "my description", - "/providers/Microsoft.Support/services/quota_service_guid/problemClassifications/cores_problemClassification_guid", - SupportSeverityLevel.Moderate, - AdvancedDiagnosticConsent.Yes, - new SupportContactProfile( + SupportTicketData data = new SupportTicketData + { + Description = "my description", + ProblemClassificationId = "/providers/Microsoft.Support/services/quota_service_guid/problemClassifications/cores_problemClassification_guid", + Severity = SupportSeverityLevel.Moderate, + AdvancedDiagnosticConsent = AdvancedDiagnosticConsent.Yes, + SupportPlanId = "U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw=", + ContactDetails = new SupportContactProfile( "abc", "xyz", PreferredContactMethod.Email, @@ -403,10 +403,8 @@ public async Task CreateOrUpdate_CreateATicketToRequestQuotaIncreaseForComputeVM "Pacific Standard Time", "usa", "en-US"), - "my title", - "/providers/Microsoft.Support/services/quota_service_guid") - { - SupportPlanId = "U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw=", + Title = "my title", + ServiceId = "/providers/Microsoft.Support/services/quota_service_guid", QuotaTicketDetails = new QuotaTicketDetails { QuotaChangeRequestVersion = "1.0", @@ -431,7 +429,7 @@ public async Task CreateOrUpdate_CreateATicketToRequestQuotaIncreaseForComputeVM [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreateATicketToRequestQuotaIncreaseForDTUsForAzureSynapseAnalytics() { - // Generated from example definition: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/CreateSqlDatawarehouseQuotaTicketForDTUs.json + // Generated from example definition: specification/support/resource-manager/Microsoft.Support/preview/2023-06-01-preview/examples/CreateSqlDatawarehouseQuotaTicketForDTUs.json // this example is just showing the usage of "SupportTickets_Create" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -441,7 +439,7 @@ public async Task CreateOrUpdate_CreateATicketToRequestQuotaIncreaseForDTUsForAz // 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 = "132d901f-189d-4381-9214-fe68e27e05a1"; + string subscriptionId = "subid"; ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); @@ -450,12 +448,14 @@ public async Task CreateOrUpdate_CreateATicketToRequestQuotaIncreaseForDTUsForAz // invoke the operation string supportTicketName = "testticket"; - SupportTicketData data = new SupportTicketData( - "my description", - "/providers/Microsoft.Support/services/quota_service_guid/problemClassifications/sql_datawarehouse_problemClassification_guid", - SupportSeverityLevel.Moderate, - AdvancedDiagnosticConsent.Yes, - new SupportContactProfile( + SupportTicketData data = new SupportTicketData + { + Description = "my description", + ProblemClassificationId = "/providers/Microsoft.Support/services/quota_service_guid/problemClassifications/sql_datawarehouse_problemClassification_guid", + Severity = SupportSeverityLevel.Moderate, + AdvancedDiagnosticConsent = AdvancedDiagnosticConsent.Yes, + SupportPlanId = "U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw=", + ContactDetails = new SupportContactProfile( "abc", "xyz", PreferredContactMethod.Email, @@ -463,10 +463,8 @@ public async Task CreateOrUpdate_CreateATicketToRequestQuotaIncreaseForDTUsForAz "Pacific Standard Time", "usa", "en-US"), - "my title", - "/providers/Microsoft.Support/services/quota_service_guid") - { - SupportPlanId = "U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw=", + Title = "my title", + ServiceId = "/providers/Microsoft.Support/services/quota_service_guid", QuotaTicketDetails = new QuotaTicketDetails { QuotaChangeRequestSubType = "DTUs", @@ -492,7 +490,7 @@ public async Task CreateOrUpdate_CreateATicketToRequestQuotaIncreaseForDTUsForAz [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreateATicketToRequestQuotaIncreaseForDTUsForSQLDatabase() { - // Generated from example definition: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/CreateSqlDatabaseQuotaTicketForDTUs.json + // Generated from example definition: specification/support/resource-manager/Microsoft.Support/preview/2023-06-01-preview/examples/CreateSqlDatabaseQuotaTicketForDTUs.json // this example is just showing the usage of "SupportTickets_Create" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -502,7 +500,7 @@ public async Task CreateOrUpdate_CreateATicketToRequestQuotaIncreaseForDTUsForSQ // 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 = "132d901f-189d-4381-9214-fe68e27e05a1"; + string subscriptionId = "subid"; ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); @@ -511,12 +509,14 @@ public async Task CreateOrUpdate_CreateATicketToRequestQuotaIncreaseForDTUsForSQ // invoke the operation string supportTicketName = "testticket"; - SupportTicketData data = new SupportTicketData( - "my description", - "/providers/Microsoft.Support/services/quota_service_guid/problemClassifications/sql_database_problemClassification_guid", - SupportSeverityLevel.Moderate, - AdvancedDiagnosticConsent.Yes, - new SupportContactProfile( + SupportTicketData data = new SupportTicketData + { + Description = "my description", + ProblemClassificationId = "/providers/Microsoft.Support/services/quota_service_guid/problemClassifications/sql_database_problemClassification_guid", + Severity = SupportSeverityLevel.Moderate, + AdvancedDiagnosticConsent = AdvancedDiagnosticConsent.Yes, + SupportPlanId = "U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw=", + ContactDetails = new SupportContactProfile( "abc", "xyz", PreferredContactMethod.Email, @@ -524,10 +524,8 @@ public async Task CreateOrUpdate_CreateATicketToRequestQuotaIncreaseForDTUsForSQ "Pacific Standard Time", "usa", "en-US"), - "my title", - "/providers/Microsoft.Support/services/quota_service_guid") - { - SupportPlanId = "U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw=", + Title = "my title", + ServiceId = "/providers/Microsoft.Support/services/quota_service_guid", QuotaTicketDetails = new QuotaTicketDetails { QuotaChangeRequestSubType = "DTUs", @@ -553,7 +551,7 @@ public async Task CreateOrUpdate_CreateATicketToRequestQuotaIncreaseForDTUsForSQ [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreateATicketToRequestQuotaIncreaseForLowPriorityCoresForMachineLearningService() { - // Generated from example definition: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/CreateMachineLearningQuotaTicketForLowPriorityCores.json + // Generated from example definition: specification/support/resource-manager/Microsoft.Support/preview/2023-06-01-preview/examples/CreateMachineLearningQuotaTicketForLowPriorityCores.json // this example is just showing the usage of "SupportTickets_Create" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -563,7 +561,7 @@ public async Task CreateOrUpdate_CreateATicketToRequestQuotaIncreaseForLowPriori // 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 = "132d901f-189d-4381-9214-fe68e27e05a1"; + string subscriptionId = "subid"; ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); @@ -572,12 +570,14 @@ public async Task CreateOrUpdate_CreateATicketToRequestQuotaIncreaseForLowPriori // invoke the operation string supportTicketName = "testticket"; - SupportTicketData data = new SupportTicketData( - "my description", - "/providers/Microsoft.Support/services/quota_service_guid/problemClassifications/machine_learning_service_problemClassification_guid", - SupportSeverityLevel.Moderate, - AdvancedDiagnosticConsent.Yes, - new SupportContactProfile( + SupportTicketData data = new SupportTicketData + { + Description = "my description", + ProblemClassificationId = "/providers/Microsoft.Support/services/quota_service_guid/problemClassifications/machine_learning_service_problemClassification_guid", + Severity = SupportSeverityLevel.Moderate, + AdvancedDiagnosticConsent = AdvancedDiagnosticConsent.Yes, + SupportPlanId = "U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw=", + ContactDetails = new SupportContactProfile( "abc", "xyz", PreferredContactMethod.Email, @@ -585,10 +585,8 @@ public async Task CreateOrUpdate_CreateATicketToRequestQuotaIncreaseForLowPriori "Pacific Standard Time", "usa", "en-US"), - "my title", - "/providers/Microsoft.Support/services/quota_service_guid") - { - SupportPlanId = "U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw=", + Title = "my title", + ServiceId = "/providers/Microsoft.Support/services/quota_service_guid", QuotaTicketDetails = new QuotaTicketDetails { QuotaChangeRequestSubType = "BatchAml", @@ -614,7 +612,7 @@ public async Task CreateOrUpdate_CreateATicketToRequestQuotaIncreaseForLowPriori [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreateATicketToRequestQuotaIncreaseForLowPriorityCoresForABatchAccount() { - // Generated from example definition: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/CreateBatchQuotaTicketForSpecificBatchAccountForLowPriorityCores.json + // Generated from example definition: specification/support/resource-manager/Microsoft.Support/preview/2023-06-01-preview/examples/CreateBatchQuotaTicketForSpecificBatchAccountForLowPriorityCores.json // this example is just showing the usage of "SupportTickets_Create" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -624,7 +622,7 @@ public async Task CreateOrUpdate_CreateATicketToRequestQuotaIncreaseForLowPriori // 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 = "132d901f-189d-4381-9214-fe68e27e05a1"; + string subscriptionId = "subid"; ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); @@ -633,12 +631,14 @@ public async Task CreateOrUpdate_CreateATicketToRequestQuotaIncreaseForLowPriori // invoke the operation string supportTicketName = "testticket"; - SupportTicketData data = new SupportTicketData( - "my description", - "/providers/Microsoft.Support/services/quota_service_guid/problemClassifications/batch_problemClassification_guid", - SupportSeverityLevel.Moderate, - AdvancedDiagnosticConsent.Yes, - new SupportContactProfile( + SupportTicketData data = new SupportTicketData + { + Description = "my description", + ProblemClassificationId = "/providers/Microsoft.Support/services/quota_service_guid/problemClassifications/batch_problemClassification_guid", + Severity = SupportSeverityLevel.Moderate, + AdvancedDiagnosticConsent = AdvancedDiagnosticConsent.Yes, + SupportPlanId = "U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw=", + ContactDetails = new SupportContactProfile( "abc", "xyz", PreferredContactMethod.Email, @@ -646,10 +646,8 @@ public async Task CreateOrUpdate_CreateATicketToRequestQuotaIncreaseForLowPriori "Pacific Standard Time", "usa", "en-US"), - "my title", - "/providers/Microsoft.Support/services/quota_service_guid") - { - SupportPlanId = "U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw=", + Title = "my title", + ServiceId = "/providers/Microsoft.Support/services/quota_service_guid", QuotaTicketDetails = new QuotaTicketDetails { QuotaChangeRequestSubType = "Account", @@ -675,7 +673,7 @@ public async Task CreateOrUpdate_CreateATicketToRequestQuotaIncreaseForLowPriori [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreateATicketToRequestQuotaIncreaseForPoolsForABatchAccount() { - // Generated from example definition: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/CreateBatchQuotaTicketForSpecificBatchAccountForPools.json + // Generated from example definition: specification/support/resource-manager/Microsoft.Support/preview/2023-06-01-preview/examples/CreateBatchQuotaTicketForSpecificBatchAccountForPools.json // this example is just showing the usage of "SupportTickets_Create" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -685,7 +683,7 @@ public async Task CreateOrUpdate_CreateATicketToRequestQuotaIncreaseForPoolsForA // 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 = "132d901f-189d-4381-9214-fe68e27e05a1"; + string subscriptionId = "subid"; ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); @@ -694,12 +692,14 @@ public async Task CreateOrUpdate_CreateATicketToRequestQuotaIncreaseForPoolsForA // invoke the operation string supportTicketName = "testticket"; - SupportTicketData data = new SupportTicketData( - "my description", - "/providers/Microsoft.Support/services/quota_service_guid/problemClassifications/batch_problemClassification_guid", - SupportSeverityLevel.Moderate, - AdvancedDiagnosticConsent.Yes, - new SupportContactProfile( + SupportTicketData data = new SupportTicketData + { + Description = "my description", + ProblemClassificationId = "/providers/Microsoft.Support/services/quota_service_guid/problemClassifications/batch_problemClassification_guid", + Severity = SupportSeverityLevel.Moderate, + AdvancedDiagnosticConsent = AdvancedDiagnosticConsent.Yes, + SupportPlanId = "U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw=", + ContactDetails = new SupportContactProfile( "abc", "xyz", PreferredContactMethod.Email, @@ -707,10 +707,8 @@ public async Task CreateOrUpdate_CreateATicketToRequestQuotaIncreaseForPoolsForA "Pacific Standard Time", "usa", "en-US"), - "my title", - "/providers/Microsoft.Support/services/quota_service_guid") - { - SupportPlanId = "U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw=", + Title = "my title", + ServiceId = "/providers/Microsoft.Support/services/quota_service_guid", QuotaTicketDetails = new QuotaTicketDetails { QuotaChangeRequestSubType = "Account", @@ -736,7 +734,7 @@ public async Task CreateOrUpdate_CreateATicketToRequestQuotaIncreaseForPoolsForA [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreateATicketToRequestQuotaIncreaseForServersForAzureSynapseAnalytics() { - // Generated from example definition: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/CreateSqlDatawarehouseQuotaTicketForServers.json + // Generated from example definition: specification/support/resource-manager/Microsoft.Support/preview/2023-06-01-preview/examples/CreateSqlDatawarehouseQuotaTicketForServers.json // this example is just showing the usage of "SupportTickets_Create" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -746,7 +744,7 @@ public async Task CreateOrUpdate_CreateATicketToRequestQuotaIncreaseForServersFo // 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 = "132d901f-189d-4381-9214-fe68e27e05a1"; + string subscriptionId = "subid"; ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); @@ -755,12 +753,14 @@ public async Task CreateOrUpdate_CreateATicketToRequestQuotaIncreaseForServersFo // invoke the operation string supportTicketName = "testticket"; - SupportTicketData data = new SupportTicketData( - "my description", - "/providers/Microsoft.Support/services/quota_service_guid/problemClassifications/sql_datawarehouse_problemClassification_guid", - SupportSeverityLevel.Moderate, - AdvancedDiagnosticConsent.Yes, - new SupportContactProfile( + SupportTicketData data = new SupportTicketData + { + Description = "my description", + ProblemClassificationId = "/providers/Microsoft.Support/services/quota_service_guid/problemClassifications/sql_datawarehouse_problemClassification_guid", + Severity = SupportSeverityLevel.Moderate, + AdvancedDiagnosticConsent = AdvancedDiagnosticConsent.Yes, + SupportPlanId = "U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw=", + ContactDetails = new SupportContactProfile( "abc", "xyz", PreferredContactMethod.Email, @@ -768,10 +768,8 @@ public async Task CreateOrUpdate_CreateATicketToRequestQuotaIncreaseForServersFo "Pacific Standard Time", "usa", "en-US"), - "my title", - "/providers/Microsoft.Support/services/quota_service_guid") - { - SupportPlanId = "U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw=", + Title = "my title", + ServiceId = "/providers/Microsoft.Support/services/quota_service_guid", QuotaTicketDetails = new QuotaTicketDetails { QuotaChangeRequestSubType = "Servers", @@ -797,7 +795,7 @@ public async Task CreateOrUpdate_CreateATicketToRequestQuotaIncreaseForServersFo [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreateATicketToRequestQuotaIncreaseForServersForSQLDatabase() { - // Generated from example definition: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/CreateSqlDatabaseQuotaTicketForServers.json + // Generated from example definition: specification/support/resource-manager/Microsoft.Support/preview/2023-06-01-preview/examples/CreateSqlDatabaseQuotaTicketForServers.json // this example is just showing the usage of "SupportTickets_Create" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -807,7 +805,7 @@ public async Task CreateOrUpdate_CreateATicketToRequestQuotaIncreaseForServersFo // 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 = "132d901f-189d-4381-9214-fe68e27e05a1"; + string subscriptionId = "subid"; ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); @@ -816,12 +814,14 @@ public async Task CreateOrUpdate_CreateATicketToRequestQuotaIncreaseForServersFo // invoke the operation string supportTicketName = "testticket"; - SupportTicketData data = new SupportTicketData( - "my description", - "/providers/Microsoft.Support/services/quota_service_guid/problemClassifications/sql_database_problemClassification_guid", - SupportSeverityLevel.Moderate, - AdvancedDiagnosticConsent.Yes, - new SupportContactProfile( + SupportTicketData data = new SupportTicketData + { + Description = "my description", + ProblemClassificationId = "/providers/Microsoft.Support/services/quota_service_guid/problemClassifications/sql_database_problemClassification_guid", + Severity = SupportSeverityLevel.Moderate, + AdvancedDiagnosticConsent = AdvancedDiagnosticConsent.Yes, + SupportPlanId = "U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw=", + ContactDetails = new SupportContactProfile( "abc", "xyz", PreferredContactMethod.Email, @@ -829,10 +829,8 @@ public async Task CreateOrUpdate_CreateATicketToRequestQuotaIncreaseForServersFo "Pacific Standard Time", "usa", "en-US"), - "my title", - "/providers/Microsoft.Support/services/quota_service_guid") - { - SupportPlanId = "U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw=", + Title = "my title", + ServiceId = "/providers/Microsoft.Support/services/quota_service_guid", QuotaTicketDetails = new QuotaTicketDetails { QuotaChangeRequestSubType = "Servers", @@ -858,7 +856,7 @@ public async Task CreateOrUpdate_CreateATicketToRequestQuotaIncreaseForServersFo [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreateATicketToRequestQuotaIncreaseForServicesThatDoNotRequireAdditionalDetailsInTheQuotaTicketDetailsObject() { - // Generated from example definition: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/CreateGenericQuotaTicket.json + // Generated from example definition: specification/support/resource-manager/Microsoft.Support/preview/2023-06-01-preview/examples/CreateGenericQuotaTicket.json // this example is just showing the usage of "SupportTickets_Create" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -868,7 +866,7 @@ public async Task CreateOrUpdate_CreateATicketToRequestQuotaIncreaseForServicesT // 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 = "132d901f-189d-4381-9214-fe68e27e05a1"; + string subscriptionId = "subid"; ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); @@ -877,12 +875,12 @@ public async Task CreateOrUpdate_CreateATicketToRequestQuotaIncreaseForServicesT // invoke the operation string supportTicketName = "testticket"; - SupportTicketData data = new SupportTicketData( - "Increase the maximum throughput per container limit to 10000 for account foo bar", - "/providers/Microsoft.Support/services/quota_service_guid/problemClassifications/cosmosdb_problemClassification_guid", - SupportSeverityLevel.Moderate, - AdvancedDiagnosticConsent.Yes, - new SupportContactProfile( + SupportTicketData data = new SupportTicketData + { + Description = "Increase the maximum throughput per container limit to 10000 for account foo bar", + ProblemClassificationId = "/providers/Microsoft.Support/services/quota_service_guid/problemClassifications/cosmosdb_problemClassification_guid", + Severity = SupportSeverityLevel.Moderate, + ContactDetails = new SupportContactProfile( "abc", "xyz", PreferredContactMethod.Email, @@ -890,8 +888,9 @@ public async Task CreateOrUpdate_CreateATicketToRequestQuotaIncreaseForServicesT "Pacific Standard Time", "usa", "en-US"), - "my title", - "/providers/Microsoft.Support/services/quota_service_guid"); + Title = "my title", + ServiceId = "/providers/Microsoft.Support/services/quota_service_guid", + }; ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, supportTicketName, data); SubscriptionSupportTicketResource result = lro.Value; @@ -906,7 +905,7 @@ public async Task CreateOrUpdate_CreateATicketToRequestQuotaIncreaseForServicesT [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreateATicketToRequestQuotaIncreaseForSpecificVMFamilyCoresForMachineLearningService() { - // Generated from example definition: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/CreateMachineLearningQuotaTicketForDedicatedCores.json + // Generated from example definition: specification/support/resource-manager/Microsoft.Support/preview/2023-06-01-preview/examples/CreateMachineLearningQuotaTicketForDedicatedCores.json // this example is just showing the usage of "SupportTickets_Create" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -916,7 +915,7 @@ public async Task CreateOrUpdate_CreateATicketToRequestQuotaIncreaseForSpecificV // 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 = "132d901f-189d-4381-9214-fe68e27e05a1"; + string subscriptionId = "subid"; ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); @@ -925,12 +924,14 @@ public async Task CreateOrUpdate_CreateATicketToRequestQuotaIncreaseForSpecificV // invoke the operation string supportTicketName = "testticket"; - SupportTicketData data = new SupportTicketData( - "my description", - "/providers/Microsoft.Support/services/quota_service_guid/problemClassifications/machine_learning_service_problemClassification_guid", - SupportSeverityLevel.Moderate, - AdvancedDiagnosticConsent.Yes, - new SupportContactProfile( + SupportTicketData data = new SupportTicketData + { + Description = "my description", + ProblemClassificationId = "/providers/Microsoft.Support/services/quota_service_guid/problemClassifications/machine_learning_service_problemClassification_guid", + Severity = SupportSeverityLevel.Moderate, + AdvancedDiagnosticConsent = AdvancedDiagnosticConsent.Yes, + SupportPlanId = "U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw=", + ContactDetails = new SupportContactProfile( "abc", "xyz", PreferredContactMethod.Email, @@ -938,10 +939,8 @@ public async Task CreateOrUpdate_CreateATicketToRequestQuotaIncreaseForSpecificV "Pacific Standard Time", "usa", "en-US"), - "my title", - "/providers/Microsoft.Support/services/quota_service_guid") - { - SupportPlanId = "U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw=", + Title = "my title", + ServiceId = "/providers/Microsoft.Support/services/quota_service_guid", QuotaTicketDetails = new QuotaTicketDetails { QuotaChangeRequestSubType = "BatchAml", @@ -967,7 +966,7 @@ public async Task CreateOrUpdate_CreateATicketToRequestQuotaIncreaseForSpecificV [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreateATicketToRequestQuotaIncreaseForSpecificVMFamilyCoresForABatchAccount() { - // Generated from example definition: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/CreateBatchQuotaTicketForSpecificBatchAccountForDedicatedCores.json + // Generated from example definition: specification/support/resource-manager/Microsoft.Support/preview/2023-06-01-preview/examples/CreateBatchQuotaTicketForSpecificBatchAccountForDedicatedCores.json // this example is just showing the usage of "SupportTickets_Create" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -977,7 +976,7 @@ public async Task CreateOrUpdate_CreateATicketToRequestQuotaIncreaseForSpecificV // 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 = "132d901f-189d-4381-9214-fe68e27e05a1"; + string subscriptionId = "subid"; ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); @@ -986,12 +985,14 @@ public async Task CreateOrUpdate_CreateATicketToRequestQuotaIncreaseForSpecificV // invoke the operation string supportTicketName = "testticket"; - SupportTicketData data = new SupportTicketData( - "my description", - "/providers/Microsoft.Support/services/quota_service_guid/problemClassifications/batch_problemClassification_guid", - SupportSeverityLevel.Moderate, - AdvancedDiagnosticConsent.Yes, - new SupportContactProfile( + SupportTicketData data = new SupportTicketData + { + Description = "my description", + ProblemClassificationId = "/providers/Microsoft.Support/services/quota_service_guid/problemClassifications/batch_problemClassification_guid", + Severity = SupportSeverityLevel.Moderate, + AdvancedDiagnosticConsent = AdvancedDiagnosticConsent.Yes, + SupportPlanId = "U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw=", + ContactDetails = new SupportContactProfile( "abc", "xyz", PreferredContactMethod.Email, @@ -999,10 +1000,8 @@ public async Task CreateOrUpdate_CreateATicketToRequestQuotaIncreaseForSpecificV "Pacific Standard Time", "usa", "en-US"), - "my title", - "/providers/Microsoft.Support/services/quota_service_guid") - { - SupportPlanId = "U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw=", + Title = "my title", + ServiceId = "/providers/Microsoft.Support/services/quota_service_guid", QuotaTicketDetails = new QuotaTicketDetails { QuotaChangeRequestSubType = "Account", @@ -1028,7 +1027,7 @@ public async Task CreateOrUpdate_CreateATicketToRequestQuotaIncreaseForSpecificV [Ignore("Only validating compilation of examples")] public async Task Get_GetDetailsOfASubscriptionTicket() { - // Generated from example definition: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/GetSubscriptionSupportTicketDetails.json + // Generated from example definition: specification/support/resource-manager/Microsoft.Support/preview/2023-06-01-preview/examples/GetSubscriptionSupportTicketDetails.json // this example is just showing the usage of "SupportTickets_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -1038,7 +1037,7 @@ public async Task Get_GetDetailsOfASubscriptionTicket() // 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 = "132d901f-189d-4381-9214-fe68e27e05a1"; + string subscriptionId = "subid"; ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); @@ -1060,7 +1059,7 @@ public async Task Get_GetDetailsOfASubscriptionTicket() [Ignore("Only validating compilation of examples")] public async Task GetAll_ListSupportTicketsCreatedOnOrAfterACertainDateAndInOpenStateForASubscription() { - // Generated from example definition: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/ListSupportTicketsCreatedOnOrAfterAndInOpenStateBySubscription.json + // Generated from example definition: specification/support/resource-manager/Microsoft.Support/preview/2023-06-01-preview/examples/ListSupportTicketsCreatedOnOrAfterAndInOpenStateBySubscription.json // this example is just showing the usage of "SupportTickets_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -1070,7 +1069,7 @@ public async Task GetAll_ListSupportTicketsCreatedOnOrAfterACertainDateAndInOpen // 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 = "132d901f-189d-4381-9214-fe68e27e05a1"; + string subscriptionId = "subid"; ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); @@ -1095,7 +1094,7 @@ public async Task GetAll_ListSupportTicketsCreatedOnOrAfterACertainDateAndInOpen [Ignore("Only validating compilation of examples")] public async Task GetAll_ListSupportTicketsCreatedOnOrAfterACertainDateAndInUpdatingStateForASubscription() { - // Generated from example definition: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/ListSupportTicketsCreatedOnOrAfterAndInUpdatingStateBySubscription.json + // Generated from example definition: specification/support/resource-manager/Microsoft.Support/preview/2023-06-01-preview/examples/ListSupportTicketsCreatedOnOrAfterAndInUpdatingStateBySubscription.json // this example is just showing the usage of "SupportTickets_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -1105,7 +1104,7 @@ public async Task GetAll_ListSupportTicketsCreatedOnOrAfterACertainDateAndInUpda // 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 = "132d901f-189d-4381-9214-fe68e27e05a1"; + string subscriptionId = "subid"; ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); @@ -1130,7 +1129,7 @@ public async Task GetAll_ListSupportTicketsCreatedOnOrAfterACertainDateAndInUpda [Ignore("Only validating compilation of examples")] public async Task GetAll_ListSupportTicketsForASubscription() { - // Generated from example definition: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/ListSupportTicketsBySubscription.json + // Generated from example definition: specification/support/resource-manager/Microsoft.Support/preview/2023-06-01-preview/examples/ListSupportTicketsBySubscription.json // this example is just showing the usage of "SupportTickets_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -1140,7 +1139,7 @@ public async Task GetAll_ListSupportTicketsForASubscription() // 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 = "132d901f-189d-4381-9214-fe68e27e05a1"; + string subscriptionId = "subid"; ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); @@ -1164,7 +1163,7 @@ public async Task GetAll_ListSupportTicketsForASubscription() [Ignore("Only validating compilation of examples")] public async Task GetAll_ListSupportTicketsInOpenStateForASubscription() { - // Generated from example definition: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/ListSupportTicketsInOpenStateBySubscription.json + // Generated from example definition: specification/support/resource-manager/Microsoft.Support/preview/2023-06-01-preview/examples/ListSupportTicketsInOpenStateBySubscription.json // this example is just showing the usage of "SupportTickets_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -1174,7 +1173,7 @@ public async Task GetAll_ListSupportTicketsInOpenStateForASubscription() // 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 = "132d901f-189d-4381-9214-fe68e27e05a1"; + string subscriptionId = "subid"; ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); @@ -1199,7 +1198,7 @@ public async Task GetAll_ListSupportTicketsInOpenStateForASubscription() [Ignore("Only validating compilation of examples")] public async Task GetAll_ListSupportTicketsInUpdatingStateForASubscription() { - // Generated from example definition: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/ListSupportTicketsInUpdatingStateBySubscription.json + // Generated from example definition: specification/support/resource-manager/Microsoft.Support/preview/2023-06-01-preview/examples/ListSupportTicketsInUpdatingStateBySubscription.json // this example is just showing the usage of "SupportTickets_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -1209,7 +1208,7 @@ public async Task GetAll_ListSupportTicketsInUpdatingStateForASubscription() // 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 = "132d901f-189d-4381-9214-fe68e27e05a1"; + string subscriptionId = "subid"; ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); @@ -1234,7 +1233,7 @@ public async Task GetAll_ListSupportTicketsInUpdatingStateForASubscription() [Ignore("Only validating compilation of examples")] public async Task GetAll_ListSupportTicketsWithACertainProblemClassificationIdForASubscription() { - // Generated from example definition: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/ListSupportTicketsProblemClassificationIdEqualsForSubscription.json + // Generated from example definition: specification/support/resource-manager/Microsoft.Support/preview/2023-06-01-preview/examples/ListSupportTicketsProblemClassificationIdEqualsForSubscription.json // this example is just showing the usage of "SupportTickets_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -1244,7 +1243,7 @@ public async Task GetAll_ListSupportTicketsWithACertainProblemClassificationIdFo // 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 = "132d901f-189d-4381-9214-fe68e27e05a1"; + string subscriptionId = "subid"; ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); @@ -1269,7 +1268,7 @@ public async Task GetAll_ListSupportTicketsWithACertainProblemClassificationIdFo [Ignore("Only validating compilation of examples")] public async Task GetAll_ListSupportTicketsWithACertainServiceIdForASubscription() { - // Generated from example definition: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/ListSupportTicketsServiceIdEqualsForSubscription.json + // Generated from example definition: specification/support/resource-manager/Microsoft.Support/preview/2023-06-01-preview/examples/ListSupportTicketsServiceIdEqualsForSubscription.json // this example is just showing the usage of "SupportTickets_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -1279,7 +1278,7 @@ public async Task GetAll_ListSupportTicketsWithACertainServiceIdForASubscription // 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 = "132d901f-189d-4381-9214-fe68e27e05a1"; + string subscriptionId = "subid"; ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); @@ -1304,7 +1303,7 @@ public async Task GetAll_ListSupportTicketsWithACertainServiceIdForASubscription [Ignore("Only validating compilation of examples")] public async Task Exists_GetDetailsOfASubscriptionTicket() { - // Generated from example definition: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/GetSubscriptionSupportTicketDetails.json + // Generated from example definition: specification/support/resource-manager/Microsoft.Support/preview/2023-06-01-preview/examples/GetSubscriptionSupportTicketDetails.json // this example is just showing the usage of "SupportTickets_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -1314,7 +1313,7 @@ public async Task Exists_GetDetailsOfASubscriptionTicket() // 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 = "132d901f-189d-4381-9214-fe68e27e05a1"; + string subscriptionId = "subid"; ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); @@ -1332,7 +1331,7 @@ public async Task Exists_GetDetailsOfASubscriptionTicket() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetDetailsOfASubscriptionTicket() { - // Generated from example definition: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/GetSubscriptionSupportTicketDetails.json + // Generated from example definition: specification/support/resource-manager/Microsoft.Support/preview/2023-06-01-preview/examples/GetSubscriptionSupportTicketDetails.json // this example is just showing the usage of "SupportTickets_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -1342,7 +1341,7 @@ public async Task GetIfExists_GetDetailsOfASubscriptionTicket() // 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 = "132d901f-189d-4381-9214-fe68e27e05a1"; + string subscriptionId = "subid"; ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); diff --git a/sdk/support/Azure.ResourceManager.Support/samples/Generated/Samples/Sample_SubscriptionSupportTicketResource.cs b/sdk/support/Azure.ResourceManager.Support/samples/Generated/Samples/Sample_SubscriptionSupportTicketResource.cs index b9ad9a35b302..34ef4041ffe3 100644 --- a/sdk/support/Azure.ResourceManager.Support/samples/Generated/Samples/Sample_SubscriptionSupportTicketResource.cs +++ b/sdk/support/Azure.ResourceManager.Support/samples/Generated/Samples/Sample_SubscriptionSupportTicketResource.cs @@ -20,7 +20,7 @@ public partial class Sample_SubscriptionSupportTicketResource [Ignore("Only validating compilation of examples")] public async Task Get_GetDetailsOfASubscriptionTicket() { - // Generated from example definition: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/GetSubscriptionSupportTicketDetails.json + // Generated from example definition: specification/support/resource-manager/Microsoft.Support/preview/2023-06-01-preview/examples/GetSubscriptionSupportTicketDetails.json // this example is just showing the usage of "SupportTickets_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -30,7 +30,7 @@ public async Task Get_GetDetailsOfASubscriptionTicket() // this example assumes you already have this SubscriptionSupportTicketResource created on azure // for more information of creating SubscriptionSupportTicketResource, please refer to the document of SubscriptionSupportTicketResource - string subscriptionId = "132d901f-189d-4381-9214-fe68e27e05a1"; + string subscriptionId = "subid"; string supportTicketName = "testticket"; ResourceIdentifier subscriptionSupportTicketResourceId = SubscriptionSupportTicketResource.CreateResourceIdentifier(subscriptionId, supportTicketName); SubscriptionSupportTicketResource subscriptionSupportTicket = client.GetSubscriptionSupportTicketResource(subscriptionSupportTicketResourceId); @@ -47,9 +47,9 @@ public async Task Get_GetDetailsOfASubscriptionTicket() [Test] [Ignore("Only validating compilation of examples")] - public async Task Update_UpdateAdvancedDiagnosticConsentOfASubscriptionSupportTicket() + public async Task Update_UpdateAdvancedDiagnosticConsentOfASupportTicket() { - // Generated from example definition: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/UpdateAdvancedDiagnosticConsentOfSupportTicketForSubscription.json + // Generated from example definition: specification/support/resource-manager/Microsoft.Support/preview/2023-06-01-preview/examples/UpdateAdvancedDiagnosticConsentOfSupportTicketForSubscription.json // this example is just showing the usage of "SupportTickets_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 @@ -59,7 +59,7 @@ public async Task Update_UpdateAdvancedDiagnosticConsentOfASubscriptionSupportTi // this example assumes you already have this SubscriptionSupportTicketResource created on azure // for more information of creating SubscriptionSupportTicketResource, please refer to the document of SubscriptionSupportTicketResource - string subscriptionId = "132d901f-189d-4381-9214-fe68e27e05a1"; + string subscriptionId = "subid"; string supportTicketName = "testticket"; ResourceIdentifier subscriptionSupportTicketResourceId = SubscriptionSupportTicketResource.CreateResourceIdentifier(subscriptionId, supportTicketName); SubscriptionSupportTicketResource subscriptionSupportTicket = client.GetSubscriptionSupportTicketResource(subscriptionSupportTicketResourceId); @@ -80,9 +80,9 @@ public async Task Update_UpdateAdvancedDiagnosticConsentOfASubscriptionSupportTi [Test] [Ignore("Only validating compilation of examples")] - public async Task Update_UpdateContactDetailsOfASubscriptionSupportTicket() + public async Task Update_UpdateContactDetailsOfASubscriptionScopedSupportTicket() { - // Generated from example definition: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/UpdateContactDetailsOfSupportTicketForSubscription.json + // Generated from example definition: specification/support/resource-manager/Microsoft.Support/preview/2023-06-01-preview/examples/UpdateContactDetailsOfSupportTicketForSubscription.json // this example is just showing the usage of "SupportTickets_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 @@ -92,7 +92,7 @@ public async Task Update_UpdateContactDetailsOfASubscriptionSupportTicket() // this example assumes you already have this SubscriptionSupportTicketResource created on azure // for more information of creating SubscriptionSupportTicketResource, please refer to the document of SubscriptionSupportTicketResource - string subscriptionId = "132d901f-189d-4381-9214-fe68e27e05a1"; + string subscriptionId = "subid"; string supportTicketName = "testticket"; ResourceIdentifier subscriptionSupportTicketResourceId = SubscriptionSupportTicketResource.CreateResourceIdentifier(subscriptionId, supportTicketName); SubscriptionSupportTicketResource subscriptionSupportTicket = client.GetSubscriptionSupportTicketResource(subscriptionSupportTicketResourceId); @@ -124,9 +124,9 @@ public async Task Update_UpdateContactDetailsOfASubscriptionSupportTicket() [Test] [Ignore("Only validating compilation of examples")] - public async Task Update_UpdateSeverityOfASubscriptionSupportTicket() + public async Task Update_UpdateSeverityOfASubscriptionScopedSupportTicket() { - // Generated from example definition: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/UpdateSeverityOfSupportTicketForSubscription.json + // Generated from example definition: specification/support/resource-manager/Microsoft.Support/preview/2023-06-01-preview/examples/UpdateSeverityOfSupportTicketForSubscription.json // this example is just showing the usage of "SupportTickets_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 @@ -136,7 +136,7 @@ public async Task Update_UpdateSeverityOfASubscriptionSupportTicket() // this example assumes you already have this SubscriptionSupportTicketResource created on azure // for more information of creating SubscriptionSupportTicketResource, please refer to the document of SubscriptionSupportTicketResource - string subscriptionId = "132d901f-189d-4381-9214-fe68e27e05a1"; + string subscriptionId = "subid"; string supportTicketName = "testticket"; ResourceIdentifier subscriptionSupportTicketResourceId = SubscriptionSupportTicketResource.CreateResourceIdentifier(subscriptionId, supportTicketName); SubscriptionSupportTicketResource subscriptionSupportTicket = client.GetSubscriptionSupportTicketResource(subscriptionSupportTicketResourceId); @@ -157,9 +157,9 @@ public async Task Update_UpdateSeverityOfASubscriptionSupportTicket() [Test] [Ignore("Only validating compilation of examples")] - public async Task Update_UpdateStatusOfASubscriptionSupportTicket() + public async Task Update_UpdateStatusOfASubscriptionScopedSupportTicket() { - // Generated from example definition: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/UpdateStatusOfSupportTicketForSubscription.json + // Generated from example definition: specification/support/resource-manager/Microsoft.Support/preview/2023-06-01-preview/examples/UpdateStatusOfSupportTicketForSubscription.json // this example is just showing the usage of "SupportTickets_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 @@ -169,7 +169,7 @@ public async Task Update_UpdateStatusOfASubscriptionSupportTicket() // this example assumes you already have this SubscriptionSupportTicketResource created on azure // for more information of creating SubscriptionSupportTicketResource, please refer to the document of SubscriptionSupportTicketResource - string subscriptionId = "132d901f-189d-4381-9214-fe68e27e05a1"; + string subscriptionId = "subid"; string supportTicketName = "testticket"; ResourceIdentifier subscriptionSupportTicketResourceId = SubscriptionSupportTicketResource.CreateResourceIdentifier(subscriptionId, supportTicketName); SubscriptionSupportTicketResource subscriptionSupportTicket = client.GetSubscriptionSupportTicketResource(subscriptionSupportTicketResourceId); @@ -190,9 +190,9 @@ public async Task Update_UpdateStatusOfASubscriptionSupportTicket() [Test] [Ignore("Only validating compilation of examples")] - public async Task CheckCommunicationNameAvailability_ChecksWhetherNameIsAvailableForCommunicationResourceForASubscriptionSupportTicket() + public async Task CheckCommunicationNameAvailability_ChecksWhetherNameIsAvailableForSubscriptionScopedCommunicationResource() { - // Generated from example definition: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/CheckNameAvailabilityForSupportTicketCommunication.json + // Generated from example definition: specification/support/resource-manager/Microsoft.Support/preview/2023-06-01-preview/examples/CheckNameAvailabilityForSupportTicketCommunication.json // this example is just showing the usage of "Communications_CheckNameAvailability" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -202,7 +202,7 @@ public async Task CheckCommunicationNameAvailability_ChecksWhetherNameIsAvailabl // this example assumes you already have this SubscriptionSupportTicketResource created on azure // for more information of creating SubscriptionSupportTicketResource, please refer to the document of SubscriptionSupportTicketResource - string subscriptionId = "132d901f-189d-4381-9214-fe68e27e05a1"; + string subscriptionId = "subid"; string supportTicketName = "testticket"; ResourceIdentifier subscriptionSupportTicketResourceId = SubscriptionSupportTicketResource.CreateResourceIdentifier(subscriptionId, supportTicketName); SubscriptionSupportTicketResource subscriptionSupportTicket = client.GetSubscriptionSupportTicketResource(subscriptionSupportTicketResourceId); diff --git a/sdk/support/Azure.ResourceManager.Support/samples/Generated/Samples/Sample_SupportAzureServiceCollection.cs b/sdk/support/Azure.ResourceManager.Support/samples/Generated/Samples/Sample_SupportAzureServiceCollection.cs index ed70838afa3a..246b4470254f 100644 --- a/sdk/support/Azure.ResourceManager.Support/samples/Generated/Samples/Sample_SupportAzureServiceCollection.cs +++ b/sdk/support/Azure.ResourceManager.Support/samples/Generated/Samples/Sample_SupportAzureServiceCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_SupportAzureServiceCollection [Ignore("Only validating compilation of examples")] public async Task Get_GetsDetailsOfTheAzureService() { - // Generated from example definition: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/GetService.json + // Generated from example definition: specification/support/resource-manager/Microsoft.Support/preview/2023-06-01-preview/examples/GetService.json // this example is just showing the usage of "Services_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -48,7 +48,7 @@ public async Task Get_GetsDetailsOfTheAzureService() [Ignore("Only validating compilation of examples")] public async Task GetAll_GetsListOfServicesForWhichASupportTicketCanBeCreated() { - // Generated from example definition: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/ListServices.json + // Generated from example definition: specification/support/resource-manager/Microsoft.Support/preview/2023-06-01-preview/examples/ListServices.json // this example is just showing the usage of "Services_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -78,7 +78,7 @@ public async Task GetAll_GetsListOfServicesForWhichASupportTicketCanBeCreated() [Ignore("Only validating compilation of examples")] public async Task Exists_GetsDetailsOfTheAzureService() { - // Generated from example definition: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/GetService.json + // Generated from example definition: specification/support/resource-manager/Microsoft.Support/preview/2023-06-01-preview/examples/GetService.json // this example is just showing the usage of "Services_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -102,7 +102,7 @@ public async Task Exists_GetsDetailsOfTheAzureService() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetsDetailsOfTheAzureService() { - // Generated from example definition: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/GetService.json + // Generated from example definition: specification/support/resource-manager/Microsoft.Support/preview/2023-06-01-preview/examples/GetService.json // this example is just showing the usage of "Services_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/support/Azure.ResourceManager.Support/samples/Generated/Samples/Sample_SupportAzureServiceResource.cs b/sdk/support/Azure.ResourceManager.Support/samples/Generated/Samples/Sample_SupportAzureServiceResource.cs index fd346f7867d2..e88efeeca17e 100644 --- a/sdk/support/Azure.ResourceManager.Support/samples/Generated/Samples/Sample_SupportAzureServiceResource.cs +++ b/sdk/support/Azure.ResourceManager.Support/samples/Generated/Samples/Sample_SupportAzureServiceResource.cs @@ -9,6 +9,7 @@ using System.Threading.Tasks; using Azure.Core; using Azure.Identity; +using Azure.ResourceManager.Support.Models; using NUnit.Framework; namespace Azure.ResourceManager.Support.Samples @@ -19,7 +20,7 @@ public partial class Sample_SupportAzureServiceResource [Ignore("Only validating compilation of examples")] public async Task Get_GetsDetailsOfTheAzureService() { - // Generated from example definition: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/GetService.json + // Generated from example definition: specification/support/resource-manager/Microsoft.Support/preview/2023-06-01-preview/examples/GetService.json // this example is just showing the usage of "Services_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -42,5 +43,30 @@ public async Task Get_GetsDetailsOfTheAzureService() // for demo we just print out the id Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task ClassifyProblemsProblemClassificationsNoSubscription_ClassifyListOfProblemClassificationsForASpecifiedAzureService() + { + // Generated from example definition: specification/support/resource-manager/Microsoft.Support/preview/2023-06-01-preview/examples/ClassifyProblemClassifications.json + // this example is just showing the usage of "ProblemClassificationsNoSubscription_ClassifyProblems" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SupportAzureServiceResource created on azure + // for more information of creating SupportAzureServiceResource, please refer to the document of SupportAzureServiceResource + string problemServiceName = "serviceId1"; + ResourceIdentifier supportAzureServiceResourceId = SupportAzureServiceResource.CreateResourceIdentifier(problemServiceName); + SupportAzureServiceResource supportAzureService = client.GetSupportAzureServiceResource(supportAzureServiceResourceId); + + // invoke the operation + ServiceProblemClassificationContent content = new ServiceProblemClassificationContent("Can not connect to Windows VM"); + ServiceProblemClassificationListResult result = await supportAzureService.ClassifyProblemsProblemClassificationsNoSubscriptionAsync(content); + + Console.WriteLine($"Succeeded: {result}"); + } } } diff --git a/sdk/support/Azure.ResourceManager.Support/samples/Generated/Samples/Sample_SupportTicketChatTranscriptCollection.cs b/sdk/support/Azure.ResourceManager.Support/samples/Generated/Samples/Sample_SupportTicketChatTranscriptCollection.cs index 16ddcb69769d..02df082dc242 100644 --- a/sdk/support/Azure.ResourceManager.Support/samples/Generated/Samples/Sample_SupportTicketChatTranscriptCollection.cs +++ b/sdk/support/Azure.ResourceManager.Support/samples/Generated/Samples/Sample_SupportTicketChatTranscriptCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_SupportTicketChatTranscriptCollection [Ignore("Only validating compilation of examples")] public async Task Get_GetChatTranscriptDetailsForASubscriptionSupportTicket() { - // Generated from example definition: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/GetchatTranscriptDetailsForSubscriptionSupportTicket.json + // Generated from example definition: specification/support/resource-manager/Microsoft.Support/preview/2023-06-01-preview/examples/GetchatTranscriptDetailsForSubscriptionSupportTicket.json // this example is just showing the usage of "ChatTranscripts_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -29,7 +29,7 @@ public async Task Get_GetChatTranscriptDetailsForASubscriptionSupportTicket() // this example assumes you already have this SubscriptionSupportTicketResource created on azure // for more information of creating SubscriptionSupportTicketResource, please refer to the document of SubscriptionSupportTicketResource - string subscriptionId = "132d901f-189d-4381-9214-fe68e27e05a1"; + string subscriptionId = "subid"; string supportTicketName = "testticket"; ResourceIdentifier subscriptionSupportTicketResourceId = SubscriptionSupportTicketResource.CreateResourceIdentifier(subscriptionId, supportTicketName); SubscriptionSupportTicketResource subscriptionSupportTicket = client.GetSubscriptionSupportTicketResource(subscriptionSupportTicketResourceId); @@ -52,7 +52,7 @@ public async Task Get_GetChatTranscriptDetailsForASubscriptionSupportTicket() [Ignore("Only validating compilation of examples")] public async Task GetAll_ListChatTranscriptsForASubscriptionSupportTicket() { - // Generated from example definition: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/ListChatTranscriptsForSubscriptionSupportTicket.json + // Generated from example definition: specification/support/resource-manager/Microsoft.Support/preview/2023-06-01-preview/examples/ListChatTranscriptsForSubscriptionSupportTicket.json // this example is just showing the usage of "ChatTranscripts_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -62,7 +62,7 @@ public async Task GetAll_ListChatTranscriptsForASubscriptionSupportTicket() // this example assumes you already have this SubscriptionSupportTicketResource created on azure // for more information of creating SubscriptionSupportTicketResource, please refer to the document of SubscriptionSupportTicketResource - string subscriptionId = "132d901f-189d-4381-9214-fe68e27e05a1"; + string subscriptionId = "subid"; string supportTicketName = "testticket"; ResourceIdentifier subscriptionSupportTicketResourceId = SubscriptionSupportTicketResource.CreateResourceIdentifier(subscriptionId, supportTicketName); SubscriptionSupportTicketResource subscriptionSupportTicket = client.GetSubscriptionSupportTicketResource(subscriptionSupportTicketResourceId); @@ -87,7 +87,7 @@ public async Task GetAll_ListChatTranscriptsForASubscriptionSupportTicket() [Ignore("Only validating compilation of examples")] public async Task Exists_GetChatTranscriptDetailsForASubscriptionSupportTicket() { - // Generated from example definition: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/GetchatTranscriptDetailsForSubscriptionSupportTicket.json + // Generated from example definition: specification/support/resource-manager/Microsoft.Support/preview/2023-06-01-preview/examples/GetchatTranscriptDetailsForSubscriptionSupportTicket.json // this example is just showing the usage of "ChatTranscripts_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -97,7 +97,7 @@ public async Task Exists_GetChatTranscriptDetailsForASubscriptionSupportTicket() // this example assumes you already have this SubscriptionSupportTicketResource created on azure // for more information of creating SubscriptionSupportTicketResource, please refer to the document of SubscriptionSupportTicketResource - string subscriptionId = "132d901f-189d-4381-9214-fe68e27e05a1"; + string subscriptionId = "subid"; string supportTicketName = "testticket"; ResourceIdentifier subscriptionSupportTicketResourceId = SubscriptionSupportTicketResource.CreateResourceIdentifier(subscriptionId, supportTicketName); SubscriptionSupportTicketResource subscriptionSupportTicket = client.GetSubscriptionSupportTicketResource(subscriptionSupportTicketResourceId); @@ -116,7 +116,7 @@ public async Task Exists_GetChatTranscriptDetailsForASubscriptionSupportTicket() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetChatTranscriptDetailsForASubscriptionSupportTicket() { - // Generated from example definition: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/GetchatTranscriptDetailsForSubscriptionSupportTicket.json + // Generated from example definition: specification/support/resource-manager/Microsoft.Support/preview/2023-06-01-preview/examples/GetchatTranscriptDetailsForSubscriptionSupportTicket.json // this example is just showing the usage of "ChatTranscripts_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -126,7 +126,7 @@ public async Task GetIfExists_GetChatTranscriptDetailsForASubscriptionSupportTic // this example assumes you already have this SubscriptionSupportTicketResource created on azure // for more information of creating SubscriptionSupportTicketResource, please refer to the document of SubscriptionSupportTicketResource - string subscriptionId = "132d901f-189d-4381-9214-fe68e27e05a1"; + string subscriptionId = "subid"; string supportTicketName = "testticket"; ResourceIdentifier subscriptionSupportTicketResourceId = SubscriptionSupportTicketResource.CreateResourceIdentifier(subscriptionId, supportTicketName); SubscriptionSupportTicketResource subscriptionSupportTicket = client.GetSubscriptionSupportTicketResource(subscriptionSupportTicketResourceId); diff --git a/sdk/support/Azure.ResourceManager.Support/samples/Generated/Samples/Sample_SupportTicketChatTranscriptResource.cs b/sdk/support/Azure.ResourceManager.Support/samples/Generated/Samples/Sample_SupportTicketChatTranscriptResource.cs index 643f6d61c37e..282ba8f657eb 100644 --- a/sdk/support/Azure.ResourceManager.Support/samples/Generated/Samples/Sample_SupportTicketChatTranscriptResource.cs +++ b/sdk/support/Azure.ResourceManager.Support/samples/Generated/Samples/Sample_SupportTicketChatTranscriptResource.cs @@ -19,7 +19,7 @@ public partial class Sample_SupportTicketChatTranscriptResource [Ignore("Only validating compilation of examples")] public async Task Get_GetChatTranscriptDetailsForASubscriptionSupportTicket() { - // Generated from example definition: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/GetchatTranscriptDetailsForSubscriptionSupportTicket.json + // Generated from example definition: specification/support/resource-manager/Microsoft.Support/preview/2023-06-01-preview/examples/GetchatTranscriptDetailsForSubscriptionSupportTicket.json // this example is just showing the usage of "ChatTranscripts_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -29,7 +29,7 @@ public async Task Get_GetChatTranscriptDetailsForASubscriptionSupportTicket() // this example assumes you already have this SupportTicketChatTranscriptResource created on azure // for more information of creating SupportTicketChatTranscriptResource, please refer to the document of SupportTicketChatTranscriptResource - string subscriptionId = "132d901f-189d-4381-9214-fe68e27e05a1"; + string subscriptionId = "subid"; string supportTicketName = "testticket"; string chatTranscriptName = "69586795-45e9-45b5-bd9e-c9bb237d3e44"; ResourceIdentifier supportTicketChatTranscriptResourceId = SupportTicketChatTranscriptResource.CreateResourceIdentifier(subscriptionId, supportTicketName, chatTranscriptName); diff --git a/sdk/support/Azure.ResourceManager.Support/samples/Generated/Samples/Sample_SupportTicketCommunicationCollection.cs b/sdk/support/Azure.ResourceManager.Support/samples/Generated/Samples/Sample_SupportTicketCommunicationCollection.cs index 339b0c43b628..d9aea400f5d6 100644 --- a/sdk/support/Azure.ResourceManager.Support/samples/Generated/Samples/Sample_SupportTicketCommunicationCollection.cs +++ b/sdk/support/Azure.ResourceManager.Support/samples/Generated/Samples/Sample_SupportTicketCommunicationCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_SupportTicketCommunicationCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_AddCommunicationToSubscriptionTicket() { - // Generated from example definition: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/CreateSupportTicketCommunication.json + // Generated from example definition: specification/support/resource-manager/Microsoft.Support/preview/2023-06-01-preview/examples/CreateSupportTicketCommunication.json // this example is just showing the usage of "Communications_Create" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -29,7 +29,7 @@ public async Task CreateOrUpdate_AddCommunicationToSubscriptionTicket() // this example assumes you already have this SubscriptionSupportTicketResource created on azure // for more information of creating SubscriptionSupportTicketResource, please refer to the document of SubscriptionSupportTicketResource - string subscriptionId = "132d901f-189d-4381-9214-fe68e27e05a1"; + string subscriptionId = "subid"; string supportTicketName = "testticket"; ResourceIdentifier subscriptionSupportTicketResourceId = SubscriptionSupportTicketResource.CreateResourceIdentifier(subscriptionId, supportTicketName); SubscriptionSupportTicketResource subscriptionSupportTicket = client.GetSubscriptionSupportTicketResource(subscriptionSupportTicketResourceId); @@ -39,9 +39,11 @@ public async Task CreateOrUpdate_AddCommunicationToSubscriptionTicket() // invoke the operation string communicationName = "testcommunication"; - SupportTicketCommunicationData data = new SupportTicketCommunicationData("This is a test message from a customer!", "This is a test message from a customer!") + SupportTicketCommunicationData data = new SupportTicketCommunicationData { Sender = "user@contoso.com", + Subject = "This is a test message from a customer!", + Body = "This is a test message from a customer!", }; ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, communicationName, data); SupportTicketCommunicationResource result = lro.Value; @@ -57,7 +59,7 @@ public async Task CreateOrUpdate_AddCommunicationToSubscriptionTicket() [Ignore("Only validating compilation of examples")] public async Task Get_GetCommunicationDetailsForASubscriptionSupportTicket() { - // Generated from example definition: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/GetCommunicationDetailsForSubscriptionSupportTicket.json + // Generated from example definition: specification/support/resource-manager/Microsoft.Support/preview/2023-06-01-preview/examples/GetCommunicationDetailsForSubscriptionSupportTicket.json // this example is just showing the usage of "Communications_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -67,7 +69,7 @@ public async Task Get_GetCommunicationDetailsForASubscriptionSupportTicket() // this example assumes you already have this SubscriptionSupportTicketResource created on azure // for more information of creating SubscriptionSupportTicketResource, please refer to the document of SubscriptionSupportTicketResource - string subscriptionId = "132d901f-189d-4381-9214-fe68e27e05a1"; + string subscriptionId = "subid"; string supportTicketName = "testticket"; ResourceIdentifier subscriptionSupportTicketResourceId = SubscriptionSupportTicketResource.CreateResourceIdentifier(subscriptionId, supportTicketName); SubscriptionSupportTicketResource subscriptionSupportTicket = client.GetSubscriptionSupportTicketResource(subscriptionSupportTicketResourceId); @@ -90,7 +92,7 @@ public async Task Get_GetCommunicationDetailsForASubscriptionSupportTicket() [Ignore("Only validating compilation of examples")] public async Task GetAll_ListCommunicationsForASubscriptionSupportTicket() { - // Generated from example definition: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/ListCommunicationsForSubscriptionSupportTicket.json + // Generated from example definition: specification/support/resource-manager/Microsoft.Support/preview/2023-06-01-preview/examples/ListCommunicationsForSubscriptionSupportTicket.json // this example is just showing the usage of "Communications_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -100,7 +102,7 @@ public async Task GetAll_ListCommunicationsForASubscriptionSupportTicket() // this example assumes you already have this SubscriptionSupportTicketResource created on azure // for more information of creating SubscriptionSupportTicketResource, please refer to the document of SubscriptionSupportTicketResource - string subscriptionId = "132d901f-189d-4381-9214-fe68e27e05a1"; + string subscriptionId = "subid"; string supportTicketName = "testticket"; ResourceIdentifier subscriptionSupportTicketResourceId = SubscriptionSupportTicketResource.CreateResourceIdentifier(subscriptionId, supportTicketName); SubscriptionSupportTicketResource subscriptionSupportTicket = client.GetSubscriptionSupportTicketResource(subscriptionSupportTicketResourceId); @@ -125,7 +127,7 @@ public async Task GetAll_ListCommunicationsForASubscriptionSupportTicket() [Ignore("Only validating compilation of examples")] public async Task GetAll_ListWebCommunicationCreatedOnOrAfterASpecificDateForASubscriptionSupportTicket() { - // Generated from example definition: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/ListWebCommunicationsForSubscriptionSupportTicketCreatedOnOrAfter.json + // Generated from example definition: specification/support/resource-manager/Microsoft.Support/preview/2023-06-01-preview/examples/ListWebCommunicationsForSubscriptionSupportTicketCreatedOnOrAfter.json // this example is just showing the usage of "Communications_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -135,7 +137,7 @@ public async Task GetAll_ListWebCommunicationCreatedOnOrAfterASpecificDateForASu // this example assumes you already have this SubscriptionSupportTicketResource created on azure // for more information of creating SubscriptionSupportTicketResource, please refer to the document of SubscriptionSupportTicketResource - string subscriptionId = "132d901f-189d-4381-9214-fe68e27e05a1"; + string subscriptionId = "subid"; string supportTicketName = "testticket"; ResourceIdentifier subscriptionSupportTicketResourceId = SubscriptionSupportTicketResource.CreateResourceIdentifier(subscriptionId, supportTicketName); SubscriptionSupportTicketResource subscriptionSupportTicket = client.GetSubscriptionSupportTicketResource(subscriptionSupportTicketResourceId); @@ -161,7 +163,7 @@ public async Task GetAll_ListWebCommunicationCreatedOnOrAfterASpecificDateForASu [Ignore("Only validating compilation of examples")] public async Task GetAll_ListWebCommunicationsForASubscriptionSupportTicket() { - // Generated from example definition: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/ListWebCommunicationsForSubscriptionSupportTicket.json + // Generated from example definition: specification/support/resource-manager/Microsoft.Support/preview/2023-06-01-preview/examples/ListWebCommunicationsForSubscriptionSupportTicket.json // this example is just showing the usage of "Communications_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -171,7 +173,7 @@ public async Task GetAll_ListWebCommunicationsForASubscriptionSupportTicket() // this example assumes you already have this SubscriptionSupportTicketResource created on azure // for more information of creating SubscriptionSupportTicketResource, please refer to the document of SubscriptionSupportTicketResource - string subscriptionId = "132d901f-189d-4381-9214-fe68e27e05a1"; + string subscriptionId = "subid"; string supportTicketName = "testticket"; ResourceIdentifier subscriptionSupportTicketResourceId = SubscriptionSupportTicketResource.CreateResourceIdentifier(subscriptionId, supportTicketName); SubscriptionSupportTicketResource subscriptionSupportTicket = client.GetSubscriptionSupportTicketResource(subscriptionSupportTicketResourceId); @@ -197,7 +199,7 @@ public async Task GetAll_ListWebCommunicationsForASubscriptionSupportTicket() [Ignore("Only validating compilation of examples")] public async Task Exists_GetCommunicationDetailsForASubscriptionSupportTicket() { - // Generated from example definition: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/GetCommunicationDetailsForSubscriptionSupportTicket.json + // Generated from example definition: specification/support/resource-manager/Microsoft.Support/preview/2023-06-01-preview/examples/GetCommunicationDetailsForSubscriptionSupportTicket.json // this example is just showing the usage of "Communications_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -207,7 +209,7 @@ public async Task Exists_GetCommunicationDetailsForASubscriptionSupportTicket() // this example assumes you already have this SubscriptionSupportTicketResource created on azure // for more information of creating SubscriptionSupportTicketResource, please refer to the document of SubscriptionSupportTicketResource - string subscriptionId = "132d901f-189d-4381-9214-fe68e27e05a1"; + string subscriptionId = "subid"; string supportTicketName = "testticket"; ResourceIdentifier subscriptionSupportTicketResourceId = SubscriptionSupportTicketResource.CreateResourceIdentifier(subscriptionId, supportTicketName); SubscriptionSupportTicketResource subscriptionSupportTicket = client.GetSubscriptionSupportTicketResource(subscriptionSupportTicketResourceId); @@ -226,7 +228,7 @@ public async Task Exists_GetCommunicationDetailsForASubscriptionSupportTicket() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetCommunicationDetailsForASubscriptionSupportTicket() { - // Generated from example definition: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/GetCommunicationDetailsForSubscriptionSupportTicket.json + // Generated from example definition: specification/support/resource-manager/Microsoft.Support/preview/2023-06-01-preview/examples/GetCommunicationDetailsForSubscriptionSupportTicket.json // this example is just showing the usage of "Communications_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -236,7 +238,7 @@ public async Task GetIfExists_GetCommunicationDetailsForASubscriptionSupportTick // this example assumes you already have this SubscriptionSupportTicketResource created on azure // for more information of creating SubscriptionSupportTicketResource, please refer to the document of SubscriptionSupportTicketResource - string subscriptionId = "132d901f-189d-4381-9214-fe68e27e05a1"; + string subscriptionId = "subid"; string supportTicketName = "testticket"; ResourceIdentifier subscriptionSupportTicketResourceId = SubscriptionSupportTicketResource.CreateResourceIdentifier(subscriptionId, supportTicketName); SubscriptionSupportTicketResource subscriptionSupportTicket = client.GetSubscriptionSupportTicketResource(subscriptionSupportTicketResourceId); diff --git a/sdk/support/Azure.ResourceManager.Support/samples/Generated/Samples/Sample_SupportTicketCommunicationResource.cs b/sdk/support/Azure.ResourceManager.Support/samples/Generated/Samples/Sample_SupportTicketCommunicationResource.cs index 486d9c0e9cd1..501b325cacb3 100644 --- a/sdk/support/Azure.ResourceManager.Support/samples/Generated/Samples/Sample_SupportTicketCommunicationResource.cs +++ b/sdk/support/Azure.ResourceManager.Support/samples/Generated/Samples/Sample_SupportTicketCommunicationResource.cs @@ -19,7 +19,7 @@ public partial class Sample_SupportTicketCommunicationResource [Ignore("Only validating compilation of examples")] public async Task Get_GetCommunicationDetailsForASubscriptionSupportTicket() { - // Generated from example definition: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/GetCommunicationDetailsForSubscriptionSupportTicket.json + // Generated from example definition: specification/support/resource-manager/Microsoft.Support/preview/2023-06-01-preview/examples/GetCommunicationDetailsForSubscriptionSupportTicket.json // this example is just showing the usage of "Communications_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -29,7 +29,7 @@ public async Task Get_GetCommunicationDetailsForASubscriptionSupportTicket() // this example assumes you already have this SupportTicketCommunicationResource created on azure // for more information of creating SupportTicketCommunicationResource, please refer to the document of SupportTicketCommunicationResource - string subscriptionId = "132d901f-189d-4381-9214-fe68e27e05a1"; + string subscriptionId = "subid"; string supportTicketName = "testticket"; string communicationName = "testmessage"; ResourceIdentifier supportTicketCommunicationResourceId = SupportTicketCommunicationResource.CreateResourceIdentifier(subscriptionId, supportTicketName, communicationName); @@ -49,7 +49,7 @@ public async Task Get_GetCommunicationDetailsForASubscriptionSupportTicket() [Ignore("Only validating compilation of examples")] public async Task Update_AddCommunicationToSubscriptionTicket() { - // Generated from example definition: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/CreateSupportTicketCommunication.json + // Generated from example definition: specification/support/resource-manager/Microsoft.Support/preview/2023-06-01-preview/examples/CreateSupportTicketCommunication.json // this example is just showing the usage of "Communications_Create" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -59,16 +59,18 @@ public async Task Update_AddCommunicationToSubscriptionTicket() // this example assumes you already have this SupportTicketCommunicationResource created on azure // for more information of creating SupportTicketCommunicationResource, please refer to the document of SupportTicketCommunicationResource - string subscriptionId = "132d901f-189d-4381-9214-fe68e27e05a1"; + string subscriptionId = "subid"; string supportTicketName = "testticket"; string communicationName = "testcommunication"; ResourceIdentifier supportTicketCommunicationResourceId = SupportTicketCommunicationResource.CreateResourceIdentifier(subscriptionId, supportTicketName, communicationName); SupportTicketCommunicationResource supportTicketCommunication = client.GetSupportTicketCommunicationResource(supportTicketCommunicationResourceId); // invoke the operation - SupportTicketCommunicationData data = new SupportTicketCommunicationData("This is a test message from a customer!", "This is a test message from a customer!") + SupportTicketCommunicationData data = new SupportTicketCommunicationData { Sender = "user@contoso.com", + Subject = "This is a test message from a customer!", + Body = "This is a test message from a customer!", }; ArmOperation lro = await supportTicketCommunication.UpdateAsync(WaitUntil.Completed, data); SupportTicketCommunicationResource result = lro.Value; diff --git a/sdk/support/Azure.ResourceManager.Support/samples/Generated/Samples/Sample_SupportTicketFileCollection.cs b/sdk/support/Azure.ResourceManager.Support/samples/Generated/Samples/Sample_SupportTicketFileCollection.cs index 0bd817586099..807a7ed86b05 100644 --- a/sdk/support/Azure.ResourceManager.Support/samples/Generated/Samples/Sample_SupportTicketFileCollection.cs +++ b/sdk/support/Azure.ResourceManager.Support/samples/Generated/Samples/Sample_SupportTicketFileCollection.cs @@ -17,9 +17,9 @@ public partial class Sample_SupportTicketFileCollection { [Test] [Ignore("Only validating compilation of examples")] - public async Task CreateOrUpdate_CreateAFileUnderASubscriptionWorkspace() + public async Task CreateOrUpdate_CreateASubscriptionScopedFile() { - // Generated from example definition: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/CreateFileForSubscription.json + // Generated from example definition: specification/support/resource-manager/Microsoft.Support/preview/2023-06-01-preview/examples/CreateFileForSubscription.json // this example is just showing the usage of "Files_Create" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -29,7 +29,7 @@ public async Task CreateOrUpdate_CreateAFileUnderASubscriptionWorkspace() // this example assumes you already have this SubscriptionFileWorkspaceResource created on azure // for more information of creating SubscriptionFileWorkspaceResource, please refer to the document of SubscriptionFileWorkspaceResource - string subscriptionId = "132d901f-189d-4381-9214-fe68e27e05a1"; + string subscriptionId = "subid"; string fileWorkspaceName = "testworkspace"; ResourceIdentifier subscriptionFileWorkspaceResourceId = SubscriptionFileWorkspaceResource.CreateResourceIdentifier(subscriptionId, fileWorkspaceName); SubscriptionFileWorkspaceResource subscriptionFileWorkspace = client.GetSubscriptionFileWorkspaceResource(subscriptionFileWorkspaceResourceId); @@ -59,7 +59,7 @@ public async Task CreateOrUpdate_CreateAFileUnderASubscriptionWorkspace() [Ignore("Only validating compilation of examples")] public async Task Get_GetDetailsOfASubscriptionFile() { - // Generated from example definition: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/GetFileDetailsForSubscription.json + // Generated from example definition: specification/support/resource-manager/Microsoft.Support/preview/2023-06-01-preview/examples/GetFileDetailsForSubscription.json // this example is just showing the usage of "Files_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -69,7 +69,7 @@ public async Task Get_GetDetailsOfASubscriptionFile() // this example assumes you already have this SubscriptionFileWorkspaceResource created on azure // for more information of creating SubscriptionFileWorkspaceResource, please refer to the document of SubscriptionFileWorkspaceResource - string subscriptionId = "132d901f-189d-4381-9214-fe68e27e05a1"; + string subscriptionId = "subid"; string fileWorkspaceName = "testworkspace"; ResourceIdentifier subscriptionFileWorkspaceResourceId = SubscriptionFileWorkspaceResource.CreateResourceIdentifier(subscriptionId, fileWorkspaceName); SubscriptionFileWorkspaceResource subscriptionFileWorkspace = client.GetSubscriptionFileWorkspaceResource(subscriptionFileWorkspaceResourceId); @@ -92,7 +92,7 @@ public async Task Get_GetDetailsOfASubscriptionFile() [Ignore("Only validating compilation of examples")] public async Task GetAll_ListFilesUnderAWorkspaceForASubscription() { - // Generated from example definition: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/ListFilesForSubscriptionUnderFileWorkspace.json + // Generated from example definition: specification/support/resource-manager/Microsoft.Support/preview/2023-06-01-preview/examples/ListFilesForSubscriptionUnderFileWorkspace.json // this example is just showing the usage of "Files_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -102,7 +102,7 @@ public async Task GetAll_ListFilesUnderAWorkspaceForASubscription() // this example assumes you already have this SubscriptionFileWorkspaceResource created on azure // for more information of creating SubscriptionFileWorkspaceResource, please refer to the document of SubscriptionFileWorkspaceResource - string subscriptionId = "132d901f-189d-4381-9214-fe68e27e05a1"; + string subscriptionId = "subid"; string fileWorkspaceName = "testworkspace"; ResourceIdentifier subscriptionFileWorkspaceResourceId = SubscriptionFileWorkspaceResource.CreateResourceIdentifier(subscriptionId, fileWorkspaceName); SubscriptionFileWorkspaceResource subscriptionFileWorkspace = client.GetSubscriptionFileWorkspaceResource(subscriptionFileWorkspaceResourceId); @@ -127,7 +127,7 @@ public async Task GetAll_ListFilesUnderAWorkspaceForASubscription() [Ignore("Only validating compilation of examples")] public async Task Exists_GetDetailsOfASubscriptionFile() { - // Generated from example definition: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/GetFileDetailsForSubscription.json + // Generated from example definition: specification/support/resource-manager/Microsoft.Support/preview/2023-06-01-preview/examples/GetFileDetailsForSubscription.json // this example is just showing the usage of "Files_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -137,7 +137,7 @@ public async Task Exists_GetDetailsOfASubscriptionFile() // this example assumes you already have this SubscriptionFileWorkspaceResource created on azure // for more information of creating SubscriptionFileWorkspaceResource, please refer to the document of SubscriptionFileWorkspaceResource - string subscriptionId = "132d901f-189d-4381-9214-fe68e27e05a1"; + string subscriptionId = "subid"; string fileWorkspaceName = "testworkspace"; ResourceIdentifier subscriptionFileWorkspaceResourceId = SubscriptionFileWorkspaceResource.CreateResourceIdentifier(subscriptionId, fileWorkspaceName); SubscriptionFileWorkspaceResource subscriptionFileWorkspace = client.GetSubscriptionFileWorkspaceResource(subscriptionFileWorkspaceResourceId); @@ -156,7 +156,7 @@ public async Task Exists_GetDetailsOfASubscriptionFile() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetDetailsOfASubscriptionFile() { - // Generated from example definition: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/GetFileDetailsForSubscription.json + // Generated from example definition: specification/support/resource-manager/Microsoft.Support/preview/2023-06-01-preview/examples/GetFileDetailsForSubscription.json // this example is just showing the usage of "Files_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -166,7 +166,7 @@ public async Task GetIfExists_GetDetailsOfASubscriptionFile() // this example assumes you already have this SubscriptionFileWorkspaceResource created on azure // for more information of creating SubscriptionFileWorkspaceResource, please refer to the document of SubscriptionFileWorkspaceResource - string subscriptionId = "132d901f-189d-4381-9214-fe68e27e05a1"; + string subscriptionId = "subid"; string fileWorkspaceName = "testworkspace"; ResourceIdentifier subscriptionFileWorkspaceResourceId = SubscriptionFileWorkspaceResource.CreateResourceIdentifier(subscriptionId, fileWorkspaceName); SubscriptionFileWorkspaceResource subscriptionFileWorkspace = client.GetSubscriptionFileWorkspaceResource(subscriptionFileWorkspaceResourceId); diff --git a/sdk/support/Azure.ResourceManager.Support/samples/Generated/Samples/Sample_SupportTicketFileResource.cs b/sdk/support/Azure.ResourceManager.Support/samples/Generated/Samples/Sample_SupportTicketFileResource.cs index 53ad4a9a8034..4a4bbc55f695 100644 --- a/sdk/support/Azure.ResourceManager.Support/samples/Generated/Samples/Sample_SupportTicketFileResource.cs +++ b/sdk/support/Azure.ResourceManager.Support/samples/Generated/Samples/Sample_SupportTicketFileResource.cs @@ -20,7 +20,7 @@ public partial class Sample_SupportTicketFileResource [Ignore("Only validating compilation of examples")] public async Task Get_GetDetailsOfASubscriptionFile() { - // Generated from example definition: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/GetFileDetailsForSubscription.json + // Generated from example definition: specification/support/resource-manager/Microsoft.Support/preview/2023-06-01-preview/examples/GetFileDetailsForSubscription.json // this example is just showing the usage of "Files_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -30,7 +30,7 @@ public async Task Get_GetDetailsOfASubscriptionFile() // this example assumes you already have this SupportTicketFileResource created on azure // for more information of creating SupportTicketFileResource, please refer to the document of SupportTicketFileResource - string subscriptionId = "132d901f-189d-4381-9214-fe68e27e05a1"; + string subscriptionId = "subid"; string fileWorkspaceName = "testworkspace"; string fileName = "test.txt"; ResourceIdentifier supportTicketFileResourceId = SupportTicketFileResource.CreateResourceIdentifier(subscriptionId, fileWorkspaceName, fileName); @@ -48,9 +48,9 @@ public async Task Get_GetDetailsOfASubscriptionFile() [Test] [Ignore("Only validating compilation of examples")] - public async Task Update_CreateAFileUnderASubscriptionWorkspace() + public async Task Update_CreateASubscriptionScopedFile() { - // Generated from example definition: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/CreateFileForSubscription.json + // Generated from example definition: specification/support/resource-manager/Microsoft.Support/preview/2023-06-01-preview/examples/CreateFileForSubscription.json // this example is just showing the usage of "Files_Create" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -60,7 +60,7 @@ public async Task Update_CreateAFileUnderASubscriptionWorkspace() // this example assumes you already have this SupportTicketFileResource created on azure // for more information of creating SupportTicketFileResource, please refer to the document of SupportTicketFileResource - string subscriptionId = "132d901f-189d-4381-9214-fe68e27e05a1"; + string subscriptionId = "subid"; string fileWorkspaceName = "testworkspace"; string fileName = "test.txt"; ResourceIdentifier supportTicketFileResourceId = SupportTicketFileResource.CreateResourceIdentifier(subscriptionId, fileWorkspaceName, fileName); @@ -87,7 +87,7 @@ public async Task Update_CreateAFileUnderASubscriptionWorkspace() [Ignore("Only validating compilation of examples")] public async Task Upload_UploadFileForSubscription() { - // Generated from example definition: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/UploadFileForSubscription.json + // Generated from example definition: specification/support/resource-manager/Microsoft.Support/preview/2023-06-01-preview/examples/UploadFileForSubscription.json // this example is just showing the usage of "Files_Upload" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -97,7 +97,7 @@ public async Task Upload_UploadFileForSubscription() // this example assumes you already have this SupportTicketFileResource created on azure // for more information of creating SupportTicketFileResource, please refer to the document of SupportTicketFileResource - string subscriptionId = "132d901f-189d-4381-9214-fe68e27e05a1"; + string subscriptionId = "subid"; string fileWorkspaceName = "testworkspaceName"; string fileName = "test.txt"; ResourceIdentifier supportTicketFileResourceId = SupportTicketFileResource.CreateResourceIdentifier(subscriptionId, fileWorkspaceName, fileName); diff --git a/sdk/support/Azure.ResourceManager.Support/samples/Generated/Samples/Sample_SupportTicketNoSubChatTranscriptCollection.cs b/sdk/support/Azure.ResourceManager.Support/samples/Generated/Samples/Sample_SupportTicketNoSubChatTranscriptCollection.cs index 86e09555db5f..0409d2e4788d 100644 --- a/sdk/support/Azure.ResourceManager.Support/samples/Generated/Samples/Sample_SupportTicketNoSubChatTranscriptCollection.cs +++ b/sdk/support/Azure.ResourceManager.Support/samples/Generated/Samples/Sample_SupportTicketNoSubChatTranscriptCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_SupportTicketNoSubChatTranscriptCollection [Ignore("Only validating compilation of examples")] public async Task Get_GetChatTranscriptDetailsForASubscriptionSupportTicket() { - // Generated from example definition: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/GetchatTranscriptDetailsForSupportTicket.json + // Generated from example definition: specification/support/resource-manager/Microsoft.Support/preview/2023-06-01-preview/examples/GetchatTranscriptDetailsForSupportTicket.json // this example is just showing the usage of "ChatTranscriptsNoSubscription_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -51,7 +51,7 @@ public async Task Get_GetChatTranscriptDetailsForASubscriptionSupportTicket() [Ignore("Only validating compilation of examples")] public async Task GetAll_ListChatTranscriptsForANoSubscriptionSupportTicket() { - // Generated from example definition: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/ListChatTranscriptsForSupportTicket.json + // Generated from example definition: specification/support/resource-manager/Microsoft.Support/preview/2023-06-01-preview/examples/ListChatTranscriptsForSupportTicket.json // this example is just showing the usage of "ChatTranscriptsNoSubscription_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -85,7 +85,7 @@ public async Task GetAll_ListChatTranscriptsForANoSubscriptionSupportTicket() [Ignore("Only validating compilation of examples")] public async Task Exists_GetChatTranscriptDetailsForASubscriptionSupportTicket() { - // Generated from example definition: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/GetchatTranscriptDetailsForSupportTicket.json + // Generated from example definition: specification/support/resource-manager/Microsoft.Support/preview/2023-06-01-preview/examples/GetchatTranscriptDetailsForSupportTicket.json // this example is just showing the usage of "ChatTranscriptsNoSubscription_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -113,7 +113,7 @@ public async Task Exists_GetChatTranscriptDetailsForASubscriptionSupportTicket() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetChatTranscriptDetailsForASubscriptionSupportTicket() { - // Generated from example definition: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/GetchatTranscriptDetailsForSupportTicket.json + // Generated from example definition: specification/support/resource-manager/Microsoft.Support/preview/2023-06-01-preview/examples/GetchatTranscriptDetailsForSupportTicket.json // this example is just showing the usage of "ChatTranscriptsNoSubscription_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/support/Azure.ResourceManager.Support/samples/Generated/Samples/Sample_SupportTicketNoSubChatTranscriptResource.cs b/sdk/support/Azure.ResourceManager.Support/samples/Generated/Samples/Sample_SupportTicketNoSubChatTranscriptResource.cs index 09811e9eaffd..b2e3fd991bc5 100644 --- a/sdk/support/Azure.ResourceManager.Support/samples/Generated/Samples/Sample_SupportTicketNoSubChatTranscriptResource.cs +++ b/sdk/support/Azure.ResourceManager.Support/samples/Generated/Samples/Sample_SupportTicketNoSubChatTranscriptResource.cs @@ -19,7 +19,7 @@ public partial class Sample_SupportTicketNoSubChatTranscriptResource [Ignore("Only validating compilation of examples")] public async Task Get_GetChatTranscriptDetailsForASubscriptionSupportTicket() { - // Generated from example definition: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/GetchatTranscriptDetailsForSupportTicket.json + // Generated from example definition: specification/support/resource-manager/Microsoft.Support/preview/2023-06-01-preview/examples/GetchatTranscriptDetailsForSupportTicket.json // this example is just showing the usage of "ChatTranscriptsNoSubscription_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/support/Azure.ResourceManager.Support/samples/Generated/Samples/Sample_SupportTicketNoSubCommunicationCollection.cs b/sdk/support/Azure.ResourceManager.Support/samples/Generated/Samples/Sample_SupportTicketNoSubCommunicationCollection.cs index 7bbd4df2b7fe..381c30892432 100644 --- a/sdk/support/Azure.ResourceManager.Support/samples/Generated/Samples/Sample_SupportTicketNoSubCommunicationCollection.cs +++ b/sdk/support/Azure.ResourceManager.Support/samples/Generated/Samples/Sample_SupportTicketNoSubCommunicationCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_SupportTicketNoSubCommunicationCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_AddCommunicationToNoSubscriptionTicket() { - // Generated from example definition: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/CreateNoSubscriptionSupportTicketCommunication.json + // Generated from example definition: specification/support/resource-manager/Microsoft.Support/preview/2023-06-01-preview/examples/CreateNoSubscriptionSupportTicketCommunication.json // this example is just showing the usage of "CommunicationsNoSubscription_Create" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -38,9 +38,11 @@ public async Task CreateOrUpdate_AddCommunicationToNoSubscriptionTicket() // invoke the operation string communicationName = "testcommunication"; - SupportTicketCommunicationData data = new SupportTicketCommunicationData("This is a test message from a customer!", "This is a test message from a customer!") + SupportTicketCommunicationData data = new SupportTicketCommunicationData { Sender = "user@contoso.com", + Subject = "This is a test message from a customer!", + Body = "This is a test message from a customer!", }; ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, communicationName, data); SupportTicketNoSubCommunicationResource result = lro.Value; @@ -56,7 +58,7 @@ public async Task CreateOrUpdate_AddCommunicationToNoSubscriptionTicket() [Ignore("Only validating compilation of examples")] public async Task Get_GetCommunicationDetailsForANoSubscriptionSupportTicket() { - // Generated from example definition: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/GetCommunicationDetailsForSupportTicket.json + // Generated from example definition: specification/support/resource-manager/Microsoft.Support/preview/2023-06-01-preview/examples/GetCommunicationDetailsForSupportTicket.json // this example is just showing the usage of "CommunicationsNoSubscription_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -88,7 +90,7 @@ public async Task Get_GetCommunicationDetailsForANoSubscriptionSupportTicket() [Ignore("Only validating compilation of examples")] public async Task GetAll_ListCommunicationsForANoSubscriptionSupportTicket() { - // Generated from example definition: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/ListCommunicationsForSupportTicket.json + // Generated from example definition: specification/support/resource-manager/Microsoft.Support/preview/2023-06-01-preview/examples/ListCommunicationsForSupportTicket.json // this example is just showing the usage of "CommunicationsNoSubscription_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -122,7 +124,7 @@ public async Task GetAll_ListCommunicationsForANoSubscriptionSupportTicket() [Ignore("Only validating compilation of examples")] public async Task GetAll_ListWebCommunicationCreatedOnOrAfterASpecificDateForANoSubscriptionSupportTicket() { - // Generated from example definition: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/ListWebCommunicationsForSupportTicketCreatedOnOrAfter.json + // Generated from example definition: specification/support/resource-manager/Microsoft.Support/preview/2023-06-01-preview/examples/ListWebCommunicationsForSupportTicketCreatedOnOrAfter.json // this example is just showing the usage of "CommunicationsNoSubscription_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -157,7 +159,7 @@ public async Task GetAll_ListWebCommunicationCreatedOnOrAfterASpecificDateForANo [Ignore("Only validating compilation of examples")] public async Task GetAll_ListWebCommunicationsForANoSubscriptionSupportTicket() { - // Generated from example definition: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/ListWebCommunicationsForSupportTicket.json + // Generated from example definition: specification/support/resource-manager/Microsoft.Support/preview/2023-06-01-preview/examples/ListWebCommunicationsForSupportTicket.json // this example is just showing the usage of "CommunicationsNoSubscription_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -192,7 +194,7 @@ public async Task GetAll_ListWebCommunicationsForANoSubscriptionSupportTicket() [Ignore("Only validating compilation of examples")] public async Task Exists_GetCommunicationDetailsForANoSubscriptionSupportTicket() { - // Generated from example definition: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/GetCommunicationDetailsForSupportTicket.json + // Generated from example definition: specification/support/resource-manager/Microsoft.Support/preview/2023-06-01-preview/examples/GetCommunicationDetailsForSupportTicket.json // this example is just showing the usage of "CommunicationsNoSubscription_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -220,7 +222,7 @@ public async Task Exists_GetCommunicationDetailsForANoSubscriptionSupportTicket( [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetCommunicationDetailsForANoSubscriptionSupportTicket() { - // Generated from example definition: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/GetCommunicationDetailsForSupportTicket.json + // Generated from example definition: specification/support/resource-manager/Microsoft.Support/preview/2023-06-01-preview/examples/GetCommunicationDetailsForSupportTicket.json // this example is just showing the usage of "CommunicationsNoSubscription_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/support/Azure.ResourceManager.Support/samples/Generated/Samples/Sample_SupportTicketNoSubCommunicationResource.cs b/sdk/support/Azure.ResourceManager.Support/samples/Generated/Samples/Sample_SupportTicketNoSubCommunicationResource.cs index 19ffbec29ddb..6aaa11ec1470 100644 --- a/sdk/support/Azure.ResourceManager.Support/samples/Generated/Samples/Sample_SupportTicketNoSubCommunicationResource.cs +++ b/sdk/support/Azure.ResourceManager.Support/samples/Generated/Samples/Sample_SupportTicketNoSubCommunicationResource.cs @@ -19,7 +19,7 @@ public partial class Sample_SupportTicketNoSubCommunicationResource [Ignore("Only validating compilation of examples")] public async Task Get_GetCommunicationDetailsForANoSubscriptionSupportTicket() { - // Generated from example definition: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/GetCommunicationDetailsForSupportTicket.json + // Generated from example definition: specification/support/resource-manager/Microsoft.Support/preview/2023-06-01-preview/examples/GetCommunicationDetailsForSupportTicket.json // this example is just showing the usage of "CommunicationsNoSubscription_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -48,7 +48,7 @@ public async Task Get_GetCommunicationDetailsForANoSubscriptionSupportTicket() [Ignore("Only validating compilation of examples")] public async Task Update_AddCommunicationToNoSubscriptionTicket() { - // Generated from example definition: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/CreateNoSubscriptionSupportTicketCommunication.json + // Generated from example definition: specification/support/resource-manager/Microsoft.Support/preview/2023-06-01-preview/examples/CreateNoSubscriptionSupportTicketCommunication.json // this example is just showing the usage of "CommunicationsNoSubscription_Create" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -64,9 +64,11 @@ public async Task Update_AddCommunicationToNoSubscriptionTicket() SupportTicketNoSubCommunicationResource supportTicketNoSubCommunication = client.GetSupportTicketNoSubCommunicationResource(supportTicketNoSubCommunicationResourceId); // invoke the operation - SupportTicketCommunicationData data = new SupportTicketCommunicationData("This is a test message from a customer!", "This is a test message from a customer!") + SupportTicketCommunicationData data = new SupportTicketCommunicationData { Sender = "user@contoso.com", + Subject = "This is a test message from a customer!", + Body = "This is a test message from a customer!", }; ArmOperation lro = await supportTicketNoSubCommunication.UpdateAsync(WaitUntil.Completed, data); SupportTicketNoSubCommunicationResource result = lro.Value; diff --git a/sdk/support/Azure.ResourceManager.Support/samples/Generated/Samples/Sample_SupportTicketNoSubFileCollection.cs b/sdk/support/Azure.ResourceManager.Support/samples/Generated/Samples/Sample_SupportTicketNoSubFileCollection.cs index a3f462c5da01..ad80991b7e5c 100644 --- a/sdk/support/Azure.ResourceManager.Support/samples/Generated/Samples/Sample_SupportTicketNoSubFileCollection.cs +++ b/sdk/support/Azure.ResourceManager.Support/samples/Generated/Samples/Sample_SupportTicketNoSubFileCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_SupportTicketNoSubFileCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreateAFileWorkspace() { - // Generated from example definition: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/CreateFile.json + // Generated from example definition: specification/support/resource-manager/Microsoft.Support/preview/2023-06-01-preview/examples/CreateFile.json // this example is just showing the usage of "FilesNoSubscription_Create" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -58,7 +58,7 @@ public async Task CreateOrUpdate_CreateAFileWorkspace() [Ignore("Only validating compilation of examples")] public async Task Get_GetDetailsOfASubscriptionFile() { - // Generated from example definition: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/GetFileDetails.json + // Generated from example definition: specification/support/resource-manager/Microsoft.Support/preview/2023-06-01-preview/examples/GetFileDetails.json // this example is just showing the usage of "FilesNoSubscription_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -90,7 +90,7 @@ public async Task Get_GetDetailsOfASubscriptionFile() [Ignore("Only validating compilation of examples")] public async Task GetAll_ListFilesUnderAWorkspace() { - // Generated from example definition: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/ListFilesUnderFileWorkspace.json + // Generated from example definition: specification/support/resource-manager/Microsoft.Support/preview/2023-06-01-preview/examples/ListFilesUnderFileWorkspace.json // this example is just showing the usage of "FilesNoSubscription_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -124,7 +124,7 @@ public async Task GetAll_ListFilesUnderAWorkspace() [Ignore("Only validating compilation of examples")] public async Task Exists_GetDetailsOfASubscriptionFile() { - // Generated from example definition: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/GetFileDetails.json + // Generated from example definition: specification/support/resource-manager/Microsoft.Support/preview/2023-06-01-preview/examples/GetFileDetails.json // this example is just showing the usage of "FilesNoSubscription_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -152,7 +152,7 @@ public async Task Exists_GetDetailsOfASubscriptionFile() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetDetailsOfASubscriptionFile() { - // Generated from example definition: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/GetFileDetails.json + // Generated from example definition: specification/support/resource-manager/Microsoft.Support/preview/2023-06-01-preview/examples/GetFileDetails.json // this example is just showing the usage of "FilesNoSubscription_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/support/Azure.ResourceManager.Support/samples/Generated/Samples/Sample_SupportTicketNoSubFileResource.cs b/sdk/support/Azure.ResourceManager.Support/samples/Generated/Samples/Sample_SupportTicketNoSubFileResource.cs index 47e88810d9a3..2c55d318f2d6 100644 --- a/sdk/support/Azure.ResourceManager.Support/samples/Generated/Samples/Sample_SupportTicketNoSubFileResource.cs +++ b/sdk/support/Azure.ResourceManager.Support/samples/Generated/Samples/Sample_SupportTicketNoSubFileResource.cs @@ -20,7 +20,7 @@ public partial class Sample_SupportTicketNoSubFileResource [Ignore("Only validating compilation of examples")] public async Task Get_GetDetailsOfASubscriptionFile() { - // Generated from example definition: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/GetFileDetails.json + // Generated from example definition: specification/support/resource-manager/Microsoft.Support/preview/2023-06-01-preview/examples/GetFileDetails.json // this example is just showing the usage of "FilesNoSubscription_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -49,7 +49,7 @@ public async Task Get_GetDetailsOfASubscriptionFile() [Ignore("Only validating compilation of examples")] public async Task Update_CreateAFileWorkspace() { - // Generated from example definition: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/CreateFile.json + // Generated from example definition: specification/support/resource-manager/Microsoft.Support/preview/2023-06-01-preview/examples/CreateFile.json // this example is just showing the usage of "FilesNoSubscription_Create" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -85,7 +85,7 @@ public async Task Update_CreateAFileWorkspace() [Ignore("Only validating compilation of examples")] public async Task Upload_UploadFile() { - // Generated from example definition: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/UploadFile.json + // Generated from example definition: specification/support/resource-manager/Microsoft.Support/preview/2023-06-01-preview/examples/UploadFile.json // this example is just showing the usage of "FilesNoSubscription_Upload" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/support/Azure.ResourceManager.Support/samples/Generated/Samples/Sample_TenantFileWorkspaceCollection.cs b/sdk/support/Azure.ResourceManager.Support/samples/Generated/Samples/Sample_TenantFileWorkspaceCollection.cs index fb6c01e1febc..01702546cdf9 100644 --- a/sdk/support/Azure.ResourceManager.Support/samples/Generated/Samples/Sample_TenantFileWorkspaceCollection.cs +++ b/sdk/support/Azure.ResourceManager.Support/samples/Generated/Samples/Sample_TenantFileWorkspaceCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_TenantFileWorkspaceCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreateAFileWorkspace() { - // Generated from example definition: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/CreateFileWorkspace.json + // Generated from example definition: specification/support/resource-manager/Microsoft.Support/preview/2023-06-01-preview/examples/CreateFileWorkspace.json // this example is just showing the usage of "FileWorkspacesNoSubscription_Create" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -49,7 +49,7 @@ public async Task CreateOrUpdate_CreateAFileWorkspace() [Ignore("Only validating compilation of examples")] public async Task Get_GetDetailsOfAFileWorkspace() { - // Generated from example definition: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/GetFileWorkspaceDetails.json + // Generated from example definition: specification/support/resource-manager/Microsoft.Support/preview/2023-06-01-preview/examples/GetFileWorkspaceDetails.json // this example is just showing the usage of "FileWorkspacesNoSubscription_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -77,7 +77,7 @@ public async Task Get_GetDetailsOfAFileWorkspace() [Ignore("Only validating compilation of examples")] public async Task Exists_GetDetailsOfAFileWorkspace() { - // Generated from example definition: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/GetFileWorkspaceDetails.json + // Generated from example definition: specification/support/resource-manager/Microsoft.Support/preview/2023-06-01-preview/examples/GetFileWorkspaceDetails.json // this example is just showing the usage of "FileWorkspacesNoSubscription_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -101,7 +101,7 @@ public async Task Exists_GetDetailsOfAFileWorkspace() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetDetailsOfAFileWorkspace() { - // Generated from example definition: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/GetFileWorkspaceDetails.json + // Generated from example definition: specification/support/resource-manager/Microsoft.Support/preview/2023-06-01-preview/examples/GetFileWorkspaceDetails.json // this example is just showing the usage of "FileWorkspacesNoSubscription_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/support/Azure.ResourceManager.Support/samples/Generated/Samples/Sample_TenantFileWorkspaceResource.cs b/sdk/support/Azure.ResourceManager.Support/samples/Generated/Samples/Sample_TenantFileWorkspaceResource.cs index 4d9f17109489..6494520cc904 100644 --- a/sdk/support/Azure.ResourceManager.Support/samples/Generated/Samples/Sample_TenantFileWorkspaceResource.cs +++ b/sdk/support/Azure.ResourceManager.Support/samples/Generated/Samples/Sample_TenantFileWorkspaceResource.cs @@ -19,7 +19,7 @@ public partial class Sample_TenantFileWorkspaceResource [Ignore("Only validating compilation of examples")] public async Task Get_GetDetailsOfAFileWorkspace() { - // Generated from example definition: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/GetFileWorkspaceDetails.json + // Generated from example definition: specification/support/resource-manager/Microsoft.Support/preview/2023-06-01-preview/examples/GetFileWorkspaceDetails.json // this example is just showing the usage of "FileWorkspacesNoSubscription_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -47,7 +47,7 @@ public async Task Get_GetDetailsOfAFileWorkspace() [Ignore("Only validating compilation of examples")] public async Task Update_CreateAFileWorkspace() { - // Generated from example definition: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/CreateFileWorkspace.json + // Generated from example definition: specification/support/resource-manager/Microsoft.Support/preview/2023-06-01-preview/examples/CreateFileWorkspace.json // this example is just showing the usage of "FileWorkspacesNoSubscription_Create" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/support/Azure.ResourceManager.Support/samples/Generated/Samples/Sample_TenantResourceExtensions.cs b/sdk/support/Azure.ResourceManager.Support/samples/Generated/Samples/Sample_TenantResourceExtensions.cs index 3bcbf149b607..6b1a822a5d5f 100644 --- a/sdk/support/Azure.ResourceManager.Support/samples/Generated/Samples/Sample_TenantResourceExtensions.cs +++ b/sdk/support/Azure.ResourceManager.Support/samples/Generated/Samples/Sample_TenantResourceExtensions.cs @@ -17,11 +17,36 @@ namespace Azure.ResourceManager.Support.Samples { public partial class Sample_TenantResourceExtensions { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task ClassifyServicesServiceClassificationsNoSubscription_ClassifyListOfAzureServices() + { + // Generated from example definition: specification/support/resource-manager/Microsoft.Support/preview/2023-06-01-preview/examples/ClassifyServices.json + // this example is just showing the usage of "ServiceClassificationsNoSubscription_ClassifyServices" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + TenantResource tenantResource = client.GetTenants().GetAllAsync().GetAsyncEnumerator().Current; + + // invoke the operation + ServiceClassificationContent content = new ServiceClassificationContent + { + IssueSummary = "Can not connect to Windows VM", + ResourceId = new ResourceIdentifier("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Compute/virtualMachines/vmname"), + }; + ServiceClassificationOutput result = await tenantResource.ClassifyServicesServiceClassificationsNoSubscriptionAsync(content); + + Console.WriteLine($"Succeeded: {result}"); + } + [Test] [Ignore("Only validating compilation of examples")] public async Task CheckNameAvailabilitySupportTicketsNoSubscription_ChecksWhetherNameIsAvailableForSupportTicketResource() { - // Generated from example definition: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/CheckNameAvailability.json + // Generated from example definition: specification/support/resource-manager/Microsoft.Support/preview/2023-06-01-preview/examples/CheckNameAvailability.json // this example is just showing the usage of "SupportTicketsNoSubscription_CheckNameAvailability" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -37,5 +62,30 @@ public async Task CheckNameAvailabilitySupportTicketsNoSubscription_ChecksWhethe Console.WriteLine($"Succeeded: {result}"); } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task LookUpResourceId_LookUpResourceIdOfSupportResourceType() + { + // Generated from example definition: specification/support/resource-manager/Microsoft.Support/preview/2023-06-01-preview/examples/LookUpResourceId.json + // this example is just showing the usage of "LookUpResourceId_Post" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + TenantResource tenantResource = client.GetTenants().GetAllAsync().GetAsyncEnumerator().Current; + + // invoke the operation + LookUpResourceIdContent content = new LookUpResourceIdContent + { + Identifier = "1234668596", + ResourceType = SupportResourceTypeName.MicrosoftSupportSupportTickets, + }; + LookUpResourceIdResult result = await tenantResource.LookUpResourceIdAsync(content); + + Console.WriteLine($"Succeeded: {result}"); + } } } diff --git a/sdk/support/Azure.ResourceManager.Support/samples/Generated/Samples/Sample_TenantSupportTicketCollection.cs b/sdk/support/Azure.ResourceManager.Support/samples/Generated/Samples/Sample_TenantSupportTicketCollection.cs index 6989740e4d71..815d19460ad2 100644 --- a/sdk/support/Azure.ResourceManager.Support/samples/Generated/Samples/Sample_TenantSupportTicketCollection.cs +++ b/sdk/support/Azure.ResourceManager.Support/samples/Generated/Samples/Sample_TenantSupportTicketCollection.cs @@ -21,7 +21,7 @@ public partial class Sample_TenantSupportTicketCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreateATicketForBillingRelatedIssues() { - // Generated from example definition: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/CreateBillingSupportTicket.json + // Generated from example definition: specification/support/resource-manager/Microsoft.Support/preview/2023-06-01-preview/examples/CreateBillingSupportTicket.json // this example is just showing the usage of "SupportTicketsNoSubscription_Create" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -36,12 +36,13 @@ public async Task CreateOrUpdate_CreateATicketForBillingRelatedIssues() // invoke the operation string supportTicketName = "testticket"; - SupportTicketData data = new SupportTicketData( - "my description", - "/providers/Microsoft.Support/services/billing_service_guid/problemClassifications/billing_problemClassification_guid", - SupportSeverityLevel.Moderate, - AdvancedDiagnosticConsent.No, - new SupportContactProfile( + SupportTicketData data = new SupportTicketData + { + Description = "my description", + ProblemClassificationId = "/providers/Microsoft.Support/services/billing_service_guid/problemClassifications/billing_problemClassification_guid", + Severity = SupportSeverityLevel.Moderate, + SupportPlanId = "U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw=", + ContactDetails = new SupportContactProfile( "abc", "xyz", PreferredContactMethod.Email, @@ -49,10 +50,8 @@ public async Task CreateOrUpdate_CreateATicketForBillingRelatedIssues() "Pacific Standard Time", "usa", "en-US"), - "my title", - "/providers/Microsoft.Support/services/billing_service_guid") - { - SupportPlanId = "U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw=", + Title = "my title", + ServiceId = "/providers/Microsoft.Support/services/billing_service_guid", FileWorkspaceName = "6f16735c-1530836f-e9970f1a-2e49-47b7-96cd-9746b83aa066", }; ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, supportTicketName, data); @@ -69,7 +68,7 @@ public async Task CreateOrUpdate_CreateATicketForBillingRelatedIssues() [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreateATicketForSubscriptionManagementRelatedIssues() { - // Generated from example definition: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/CreateSubMgmtSupportTicket.json + // Generated from example definition: specification/support/resource-manager/Microsoft.Support/preview/2023-06-01-preview/examples/CreateSubMgmtSupportTicket.json // this example is just showing the usage of "SupportTicketsNoSubscription_Create" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -84,12 +83,13 @@ public async Task CreateOrUpdate_CreateATicketForSubscriptionManagementRelatedIs // invoke the operation string supportTicketName = "testticket"; - SupportTicketData data = new SupportTicketData( - "my description", - "/providers/Microsoft.Support/services/subscription_management_service_guid/problemClassifications/subscription_management_problemClassification_guid", - SupportSeverityLevel.Moderate, - AdvancedDiagnosticConsent.Yes, - new SupportContactProfile( + SupportTicketData data = new SupportTicketData + { + Description = "my description", + ProblemClassificationId = "/providers/Microsoft.Support/services/subscription_management_service_guid/problemClassifications/subscription_management_problemClassification_guid", + Severity = SupportSeverityLevel.Moderate, + SupportPlanId = "U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw=", + ContactDetails = new SupportContactProfile( "abc", "xyz", PreferredContactMethod.Email, @@ -97,10 +97,8 @@ public async Task CreateOrUpdate_CreateATicketForSubscriptionManagementRelatedIs "Pacific Standard Time", "usa", "en-US"), - "my title", - "/providers/Microsoft.Support/services/subscription_management_service_guid") - { - SupportPlanId = "U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw=", + Title = "my title", + ServiceId = "/providers/Microsoft.Support/services/subscription_management_service_guid", FileWorkspaceName = "6f16735c-1530836f-e9970f1a-2e49-47b7-96cd-9746b83aa066", }; ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, supportTicketName, data); @@ -117,7 +115,7 @@ public async Task CreateOrUpdate_CreateATicketForSubscriptionManagementRelatedIs [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreateATicketForTechnicalIssueRelatedToASpecificResource() { - // Generated from example definition: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/CreateTechnicalSupportTicket.json + // Generated from example definition: specification/support/resource-manager/Microsoft.Support/preview/2023-06-01-preview/examples/CreateTechnicalSupportTicket.json // this example is just showing the usage of "SupportTicketsNoSubscription_Create" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -132,12 +130,15 @@ public async Task CreateOrUpdate_CreateATicketForTechnicalIssueRelatedToASpecifi // invoke the operation string supportTicketName = "testticket"; - SupportTicketData data = new SupportTicketData( - "my description", - "/providers/Microsoft.Support/services/virtual_machine_running_linux_service_guid/problemClassifications/problemClassification_guid", - SupportSeverityLevel.Moderate, - AdvancedDiagnosticConsent.Yes, - new SupportContactProfile( + SupportTicketData data = new SupportTicketData + { + Description = "my description", + ProblemClassificationId = "/providers/Microsoft.Support/services/virtual_machine_running_linux_service_guid/problemClassifications/problemClassification_guid", + Severity = SupportSeverityLevel.Moderate, + AdvancedDiagnosticConsent = AdvancedDiagnosticConsent.Yes, + ProblemScopingQuestions = "{\"articleId\":\"076846c1-4c0b-4b21-91c6-1a30246b3867\",\"scopingDetails\":[{\"question\":\"When did the problem begin?\",\"controlId\":\"problem_start_time\",\"orderId\":1,\"inputType\":\"static\",\"answer\":{\"displayValue\":\"2023-08-31T18:55:00.739Z\",\"value\":\"2023-08-31T18:55:00.739Z\",\"type\":\"datetime\"}},{\"question\":\"API Type of the Cosmos DB account\",\"controlId\":\"api_type\",\"orderId\":2,\"inputType\":\"static\",\"answer\":{\"displayValue\":\"Table\",\"value\":\"tables\",\"type\":\"string\"}},{\"question\":\"Table name\",\"controlId\":\"collection_name_table\",\"orderId\":11,\"inputType\":\"nonstatic\",\"answer\":{\"displayValue\":\"Select Table Name\",\"value\":\"dont_know_answer\",\"type\":\"string\"}},{\"question\":\"Provide additional details about the issue you're facing\",\"controlId\":\"problem_description\",\"orderId\":12,\"inputType\":\"nonstatic\",\"answer\":{\"displayValue\":\"test ticket, please ignore and close\",\"value\":\"test ticket, please ignore and close\",\"type\":\"string\"}}]}", + SupportPlanId = "U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw=", + ContactDetails = new SupportContactProfile( "abc", "xyz", PreferredContactMethod.Email, @@ -145,11 +146,8 @@ public async Task CreateOrUpdate_CreateATicketForTechnicalIssueRelatedToASpecifi "Pacific Standard Time", "usa", "en-US"), - "my title", - "/providers/Microsoft.Support/services/cddd3eb5-1830-b494-44fd-782f691479dc") - { - ProblemScopingQuestions = "{\"articleId\":\"076846c1-4c0b-4b21-91c6-1a30246b3867\",\"scopingDetails\":[{\"question\":\"When did the problem begin?\",\"controlId\":\"problem_start_time\",\"orderId\":1,\"inputType\":\"static\",\"answer\":{\"displayValue\":\"2023-08-31T18:55:00.739Z\",\"value\":\"2023-08-31T18:55:00.739Z\",\"type\":\"datetime\"}},{\"question\":\"API Type of the Cosmos DB account\",\"controlId\":\"api_type\",\"orderId\":2,\"inputType\":\"static\",\"answer\":{\"displayValue\":\"Table\",\"value\":\"tables\",\"type\":\"string\"}},{\"question\":\"Table name\",\"controlId\":\"collection_name_table\",\"orderId\":11,\"inputType\":\"nonstatic\",\"answer\":{\"displayValue\":\"Select Table Name\",\"value\":\"dont_know_answer\",\"type\":\"string\"}},{\"question\":\"Provide additional details about the issue you're facing\",\"controlId\":\"problem_description\",\"orderId\":12,\"inputType\":\"nonstatic\",\"answer\":{\"displayValue\":\"test ticket, please ignore and close\",\"value\":\"test ticket, please ignore and close\",\"type\":\"string\"}}]}", - SupportPlanId = "U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw=", + Title = "my title", + ServiceId = "/providers/Microsoft.Support/services/cddd3eb5-1830-b494-44fd-782f691479dc", FileWorkspaceName = "6f16735c-1530836f-e9970f1a-2e49-47b7-96cd-9746b83aa066", SecondaryConsent = {new SecondaryConsent { @@ -171,7 +169,7 @@ public async Task CreateOrUpdate_CreateATicketForTechnicalIssueRelatedToASpecifi [Ignore("Only validating compilation of examples")] public async Task Get_GetDetailsOfATicket() { - // Generated from example definition: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/GetSupportTicketDetails.json + // Generated from example definition: specification/support/resource-manager/Microsoft.Support/preview/2023-06-01-preview/examples/GetSupportTicketDetails.json // this example is just showing the usage of "SupportTicketsNoSubscription_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -199,7 +197,7 @@ public async Task Get_GetDetailsOfATicket() [Ignore("Only validating compilation of examples")] public async Task GetAll_ListSupportTickets() { - // Generated from example definition: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/ListSupportTickets.json + // Generated from example definition: specification/support/resource-manager/Microsoft.Support/preview/2023-06-01-preview/examples/ListSupportTickets.json // this example is just showing the usage of "SupportTicketsNoSubscription_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -229,7 +227,7 @@ public async Task GetAll_ListSupportTickets() [Ignore("Only validating compilation of examples")] public async Task GetAll_ListSupportTicketsCreatedOnOrAfterACertainDateAndInOpenState() { - // Generated from example definition: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/ListSupportTicketsCreatedOnOrAfterAndInOpenState.json + // Generated from example definition: specification/support/resource-manager/Microsoft.Support/preview/2023-06-01-preview/examples/ListSupportTicketsCreatedOnOrAfterAndInOpenState.json // this example is just showing the usage of "SupportTicketsNoSubscription_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -260,7 +258,7 @@ public async Task GetAll_ListSupportTicketsCreatedOnOrAfterACertainDateAndInOpen [Ignore("Only validating compilation of examples")] public async Task GetAll_ListSupportTicketsCreatedOnOrAfterACertainDateAndInUpdatingState() { - // Generated from example definition: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/ListSupportTicketsCreatedOnOrAfterAndInUpdatingState.json + // Generated from example definition: specification/support/resource-manager/Microsoft.Support/preview/2023-06-01-preview/examples/ListSupportTicketsCreatedOnOrAfterAndInUpdatingState.json // this example is just showing the usage of "SupportTicketsNoSubscription_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -291,7 +289,7 @@ public async Task GetAll_ListSupportTicketsCreatedOnOrAfterACertainDateAndInUpda [Ignore("Only validating compilation of examples")] public async Task GetAll_ListSupportTicketsInOpenState() { - // Generated from example definition: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/ListSupportTicketsInOpenState.json + // Generated from example definition: specification/support/resource-manager/Microsoft.Support/preview/2023-06-01-preview/examples/ListSupportTicketsInOpenState.json // this example is just showing the usage of "SupportTicketsNoSubscription_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -322,7 +320,7 @@ public async Task GetAll_ListSupportTicketsInOpenState() [Ignore("Only validating compilation of examples")] public async Task GetAll_ListSupportTicketsInUpdatingState() { - // Generated from example definition: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/ListSupportTicketsInUpdatingState.json + // Generated from example definition: specification/support/resource-manager/Microsoft.Support/preview/2023-06-01-preview/examples/ListSupportTicketsInUpdatingState.json // this example is just showing the usage of "SupportTicketsNoSubscription_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -353,7 +351,7 @@ public async Task GetAll_ListSupportTicketsInUpdatingState() [Ignore("Only validating compilation of examples")] public async Task GetAll_ListSupportTicketsWithACertainProblemClassificationId() { - // Generated from example definition: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/ListSupportTicketsProblemClassificationIdEquals.json + // Generated from example definition: specification/support/resource-manager/Microsoft.Support/preview/2023-06-01-preview/examples/ListSupportTicketsProblemClassificationIdEquals.json // this example is just showing the usage of "SupportTicketsNoSubscription_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -384,7 +382,7 @@ public async Task GetAll_ListSupportTicketsWithACertainProblemClassificationId() [Ignore("Only validating compilation of examples")] public async Task GetAll_ListSupportTicketsWithACertainServiceId() { - // Generated from example definition: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/ListSupportTicketsServiceIdEquals.json + // Generated from example definition: specification/support/resource-manager/Microsoft.Support/preview/2023-06-01-preview/examples/ListSupportTicketsServiceIdEquals.json // this example is just showing the usage of "SupportTicketsNoSubscription_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -415,7 +413,7 @@ public async Task GetAll_ListSupportTicketsWithACertainServiceId() [Ignore("Only validating compilation of examples")] public async Task Exists_GetDetailsOfATicket() { - // Generated from example definition: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/GetSupportTicketDetails.json + // Generated from example definition: specification/support/resource-manager/Microsoft.Support/preview/2023-06-01-preview/examples/GetSupportTicketDetails.json // this example is just showing the usage of "SupportTicketsNoSubscription_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -439,7 +437,7 @@ public async Task Exists_GetDetailsOfATicket() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetDetailsOfATicket() { - // Generated from example definition: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/GetSupportTicketDetails.json + // Generated from example definition: specification/support/resource-manager/Microsoft.Support/preview/2023-06-01-preview/examples/GetSupportTicketDetails.json // this example is just showing the usage of "SupportTicketsNoSubscription_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/support/Azure.ResourceManager.Support/samples/Generated/Samples/Sample_TenantSupportTicketResource.cs b/sdk/support/Azure.ResourceManager.Support/samples/Generated/Samples/Sample_TenantSupportTicketResource.cs index 4164c7a4f336..8c3400d6b8b6 100644 --- a/sdk/support/Azure.ResourceManager.Support/samples/Generated/Samples/Sample_TenantSupportTicketResource.cs +++ b/sdk/support/Azure.ResourceManager.Support/samples/Generated/Samples/Sample_TenantSupportTicketResource.cs @@ -20,7 +20,7 @@ public partial class Sample_TenantSupportTicketResource [Ignore("Only validating compilation of examples")] public async Task Get_GetDetailsOfATicket() { - // Generated from example definition: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/GetSupportTicketDetails.json + // Generated from example definition: specification/support/resource-manager/Microsoft.Support/preview/2023-06-01-preview/examples/GetSupportTicketDetails.json // this example is just showing the usage of "SupportTicketsNoSubscription_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -48,7 +48,7 @@ public async Task Get_GetDetailsOfATicket() [Ignore("Only validating compilation of examples")] public async Task Update_UpdateAdvancedDiagnosticConsentOfASupportTicket() { - // Generated from example definition: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/UpdateAdvancedDiagnosticConsentOfSupportTicket.json + // Generated from example definition: specification/support/resource-manager/Microsoft.Support/preview/2023-06-01-preview/examples/UpdateAdvancedDiagnosticConsentOfSupportTicket.json // this example is just showing the usage of "SupportTicketsNoSubscription_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 @@ -80,7 +80,7 @@ public async Task Update_UpdateAdvancedDiagnosticConsentOfASupportTicket() [Ignore("Only validating compilation of examples")] public async Task Update_UpdateContactDetailsOfASupportTicket() { - // Generated from example definition: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/UpdateContactDetailsOfSupportTicket.json + // Generated from example definition: specification/support/resource-manager/Microsoft.Support/preview/2023-06-01-preview/examples/UpdateContactDetailsOfSupportTicket.json // this example is just showing the usage of "SupportTicketsNoSubscription_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 @@ -123,7 +123,7 @@ public async Task Update_UpdateContactDetailsOfASupportTicket() [Ignore("Only validating compilation of examples")] public async Task Update_UpdateSeverityOfASupportTicket() { - // Generated from example definition: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/UpdateSeverityOfSupportTicket.json + // Generated from example definition: specification/support/resource-manager/Microsoft.Support/preview/2023-06-01-preview/examples/UpdateSeverityOfSupportTicket.json // this example is just showing the usage of "SupportTicketsNoSubscription_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 @@ -155,7 +155,7 @@ public async Task Update_UpdateSeverityOfASupportTicket() [Ignore("Only validating compilation of examples")] public async Task Update_UpdateStatusOfASupportTicket() { - // Generated from example definition: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/UpdateStatusOfSupportTicket.json + // Generated from example definition: specification/support/resource-manager/Microsoft.Support/preview/2023-06-01-preview/examples/UpdateStatusOfSupportTicket.json // this example is just showing the usage of "SupportTicketsNoSubscription_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 @@ -187,7 +187,7 @@ public async Task Update_UpdateStatusOfASupportTicket() [Ignore("Only validating compilation of examples")] public async Task CheckNameAvailabilityCommunicationsNoSubscription_ChecksWhetherNameIsAvailableForCommunicationResource() { - // Generated from example definition: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/CheckNameAvailabilityForNoSubscriptionSupportTicketCommunication.json + // Generated from example definition: specification/support/resource-manager/Microsoft.Support/preview/2023-06-01-preview/examples/CheckNameAvailabilityForNoSubscriptionSupportTicketCommunication.json // this example is just showing the usage of "CommunicationsNoSubscription_CheckNameAvailability" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/support/Azure.ResourceManager.Support/src/Generated/ArmSupportModelFactory.cs b/sdk/support/Azure.ResourceManager.Support/src/Generated/ArmSupportModelFactory.cs index ff20fff925be..a5ce3da6af27 100644 --- a/sdk/support/Azure.ResourceManager.Support/src/Generated/ArmSupportModelFactory.cs +++ b/sdk/support/Azure.ResourceManager.Support/src/Generated/ArmSupportModelFactory.cs @@ -7,6 +7,7 @@ using System; using System.Collections.Generic; +using System.ComponentModel; using System.Linq; using Azure.Core; using Azure.ResourceManager.Models; @@ -23,10 +24,12 @@ public static partial class ArmSupportModelFactory /// The systemData. /// Localized name of the Azure service. /// ARM Resource types. + /// Metadata about the service, only visible for 1P clients. /// A new instance for mocking. - public static SupportAzureServiceData SupportAzureServiceData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string displayName = null, IEnumerable resourceTypes = null) + public static SupportAzureServiceData SupportAzureServiceData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string displayName = null, IEnumerable resourceTypes = null, IReadOnlyDictionary metadata = null) { resourceTypes ??= new List(); + metadata ??= new Dictionary(); return new SupportAzureServiceData( id, @@ -35,6 +38,87 @@ public static SupportAzureServiceData SupportAzureServiceData(ResourceIdentifier systemData, displayName, resourceTypes?.ToList(), + metadata, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Set of problem classification objects classified. + /// A new instance for mocking. + public static ServiceClassificationOutput ServiceClassificationOutput(IEnumerable serviceClassificationResults = null) + { + serviceClassificationResults ??= new List(); + + return new ServiceClassificationOutput(serviceClassificationResults?.ToList(), serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Azure resource Id of the service. + /// Localized name of the azure service. + /// List of applicable ARM resource types for this service. + /// Child service. + /// A new instance for mocking. + public static ServiceClassificationAnswer ServiceClassificationAnswer(ResourceIdentifier serviceId = null, string displayName = null, IEnumerable resourceTypes = null, ClassificationService childService = null) + { + resourceTypes ??= new List(); + + return new ServiceClassificationAnswer(serviceId, displayName, resourceTypes?.ToList(), serializedAdditionalRawData: null, childService); + } + + /// Initializes a new instance of . + /// Azure resource Id of the service. + /// Localized name of the azure service. + /// List of applicable ARM resource types for this service. + /// A new instance for mocking. + public static ClassificationService ClassificationService(ResourceIdentifier serviceId = null, string displayName = null, IEnumerable resourceTypes = null) + { + resourceTypes ??= new List(); + + return new ClassificationService(serviceId, displayName, resourceTypes?.ToList(), serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Natural language description of the customer’s issue. + /// ARM resource Id of the resource that is having the issue. + /// A new instance for mocking. + public static ServiceProblemClassificationContent ServiceProblemClassificationContent(string issueSummary = null, ResourceIdentifier resourceId = null) + { + return new ServiceProblemClassificationContent(issueSummary, resourceId, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Set of problem classification objects classified. + /// A new instance for mocking. + public static ServiceProblemClassificationListResult ServiceProblemClassificationListResult(IEnumerable problemClassificationResults = null) + { + problemClassificationResults ??= new List(); + + return new ServiceProblemClassificationListResult(problemClassificationResults?.ToList(), serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Identifier that may be used for solution discovery or some other purposes. + /// Title of the problem classification result. + /// Description of the problem classification result. + /// Identifier of the service associated with this problem classification result. + /// Identifier that may be used for support ticket creation. + /// Azure resource Id of the service. + /// Localized name of the azure service. + /// List of applicable ARM resource types for this service. + /// A new instance for mocking. + public static ServiceProblemClassificationResult ServiceProblemClassificationResult(string problemId = null, string title = null, string description = null, ResourceIdentifier serviceId = null, string problemClassificationId = null, ResourceIdentifier relatedServiceId = null, string displayName = null, IEnumerable resourceTypes = null) + { + resourceTypes ??= new List(); + + return new ServiceProblemClassificationResult( + problemId, + title, + description, + serviceId, + problemClassificationId, + relatedServiceId, + displayName, + resourceTypes?.ToList(), serializedAdditionalRawData: null); } @@ -45,10 +129,13 @@ public static SupportAzureServiceData SupportAzureServiceData(ResourceIdentifier /// The systemData. /// Localized name of problem classification. /// This property indicates whether secondary consent is present for problem classification. + /// String-to-string dictionary for additional metadata. + /// Reference to the parent problem classification which has same structure as problem classification. /// A new instance for mocking. - public static ProblemClassificationData ProblemClassificationData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string displayName = null, IEnumerable secondaryConsentEnabled = null) + public static ProblemClassificationData ProblemClassificationData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string displayName = null, IEnumerable secondaryConsentEnabled = null, IReadOnlyDictionary metadata = null, ProblemClassificationData parentProblemClassification = null) { secondaryConsentEnabled ??= new List(); + metadata ??= new Dictionary(); return new ProblemClassificationData( id, @@ -57,6 +144,8 @@ public static ProblemClassificationData ProblemClassificationData(ResourceIdenti systemData, displayName, secondaryConsentEnabled?.ToList(), + metadata, + parentProblemClassification, serializedAdditionalRawData: null); } @@ -112,7 +201,7 @@ public static SupportNameAvailabilityResult SupportNameAvailabilityResult(bool? /// Additional ticket details associated with a quota support ticket request. /// This property indicates secondary consents for the support ticket. /// A new instance for mocking. - public static SupportTicketData SupportTicketData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string supportTicketId = null, string description = null, string problemClassificationId = null, string problemClassificationDisplayName = null, SupportSeverityLevel severity = default, string enrollmentId = null, bool? require24X7Response = null, AdvancedDiagnosticConsent advancedDiagnosticConsent = default, string problemScopingQuestions = null, string supportPlanId = null, SupportContactProfile contactDetails = null, SupportServiceLevelAgreement serviceLevelAgreement = null, string supportEngineerEmailAddress = null, string supportPlanType = null, string supportPlanDisplayName = null, string title = null, DateTimeOffset? problemStartOn = null, string serviceId = null, string serviceDisplayName = null, string status = null, DateTimeOffset? createdOn = null, DateTimeOffset? modifiedOn = null, string fileWorkspaceName = null, IsTemporaryTicket? isTemporaryTicket = null, ResourceIdentifier technicalTicketDetailsResourceId = null, QuotaTicketDetails quotaTicketDetails = null, IEnumerable secondaryConsent = null) + public static SupportTicketData SupportTicketData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string supportTicketId = null, string description = null, string problemClassificationId = null, string problemClassificationDisplayName = null, SupportSeverityLevel? severity = null, string enrollmentId = null, bool? require24X7Response = null, AdvancedDiagnosticConsent? advancedDiagnosticConsent = null, string problemScopingQuestions = null, string supportPlanId = null, SupportContactProfile contactDetails = null, SupportServiceLevelAgreement serviceLevelAgreement = null, string supportEngineerEmailAddress = null, string supportPlanType = null, string supportPlanDisplayName = null, string title = null, DateTimeOffset? problemStartOn = null, string serviceId = null, string serviceDisplayName = null, string status = null, DateTimeOffset? createdOn = null, DateTimeOffset? modifiedOn = null, string fileWorkspaceName = null, IsTemporaryTicket? isTemporaryTicket = null, ResourceIdentifier technicalTicketDetailsResourceId = null, QuotaTicketDetails quotaTicketDetails = null, IEnumerable secondaryConsent = null) { secondaryConsent ??= new List(); @@ -255,9 +344,9 @@ public static FileWorkspaceDetailData FileWorkspaceDetailData(ResourceIdentifier /// The resourceType. /// The systemData. /// Time in UTC (ISO 8601 format) when file workspace was created. - /// Size of each chunk. The size of each chunk should be provided in bytes and must not exceed 2.5 megabytes (MB). - /// Size of the file to be uploaded. The file size must not exceed 5 MB and should be provided in bytes. - /// Number of chunks to be uploaded. The maximum number of allowed chunks is 2. + /// Size of each chunk. + /// Size of the file to be uploaded. + /// Number of chunks to be uploaded. /// A new instance for mocking. public static SupportFileDetailData SupportFileDetailData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, DateTimeOffset? createdOn = null, int? chunkSize = null, int? fileSize = null, int? numberOfChunks = null) { @@ -272,5 +361,41 @@ public static SupportFileDetailData SupportFileDetailData(ResourceIdentifier id numberOfChunks, serializedAdditionalRawData: null); } + + /// Initializes a new instance of . + /// The resource Id of support resource type. + /// A new instance for mocking. + public static LookUpResourceIdResult LookUpResourceIdResult(ResourceIdentifier resourceId = null) + { + return new LookUpResourceIdResult(resourceId, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Localized name of the Azure service. + /// ARM Resource types. + /// A new instance for mocking. + [EditorBrowsable(EditorBrowsableState.Never)] + public static SupportAzureServiceData SupportAzureServiceData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, string displayName, IEnumerable resourceTypes) + { + return SupportAzureServiceData(id: id, name: name, resourceType: resourceType, systemData: systemData, displayName: displayName, resourceTypes: resourceTypes, metadata: default); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Localized name of problem classification. + /// This property indicates whether secondary consent is present for problem classification. + /// A new instance for mocking. + [EditorBrowsable(EditorBrowsableState.Never)] + public static ProblemClassificationData ProblemClassificationData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, string displayName, IEnumerable secondaryConsentEnabled) + { + return ProblemClassificationData(id: id, name: name, resourceType: resourceType, systemData: systemData, displayName: displayName, secondaryConsentEnabled: secondaryConsentEnabled, metadata: default, parentProblemClassification: default); + } } } diff --git a/sdk/support/Azure.ResourceManager.Support/src/Generated/Extensions/MockableSupportSubscriptionResource.cs b/sdk/support/Azure.ResourceManager.Support/src/Generated/Extensions/MockableSupportSubscriptionResource.cs index 3393b0f9da72..21d702065b59 100644 --- a/sdk/support/Azure.ResourceManager.Support/src/Generated/Extensions/MockableSupportSubscriptionResource.cs +++ b/sdk/support/Azure.ResourceManager.Support/src/Generated/Extensions/MockableSupportSubscriptionResource.cs @@ -17,6 +17,10 @@ namespace Azure.ResourceManager.Support.Mocking /// A class to add extension methods to SubscriptionResource. public partial class MockableSupportSubscriptionResource : ArmResource { + private ClientDiagnostics _serviceClassificationsClientDiagnostics; + private ServiceClassificationsRestOperations _serviceClassificationsRestClient; + private ClientDiagnostics _problemClassificationClientDiagnostics; + private ProblemClassificationsRestOperations _problemClassificationRestClient; private ClientDiagnostics _subscriptionSupportTicketSupportTicketsClientDiagnostics; private SupportTicketsRestOperations _subscriptionSupportTicketSupportTicketsRestClient; @@ -32,6 +36,10 @@ internal MockableSupportSubscriptionResource(ArmClient client, ResourceIdentifie { } + private ClientDiagnostics ServiceClassificationsClientDiagnostics => _serviceClassificationsClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.Support", ProviderConstants.DefaultProviderNamespace, Diagnostics); + private ServiceClassificationsRestOperations ServiceClassificationsRestClient => _serviceClassificationsRestClient ??= new ServiceClassificationsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint); + private ClientDiagnostics ProblemClassificationClientDiagnostics => _problemClassificationClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.Support", ProblemClassificationResource.ResourceType.Namespace, Diagnostics); + private ProblemClassificationsRestOperations ProblemClassificationRestClient => _problemClassificationRestClient ??= new ProblemClassificationsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, GetApiVersionOrNull(ProblemClassificationResource.ResourceType)); private ClientDiagnostics SubscriptionSupportTicketSupportTicketsClientDiagnostics => _subscriptionSupportTicketSupportTicketsClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.Support", SubscriptionSupportTicketResource.ResourceType.Namespace, Diagnostics); private SupportTicketsRestOperations SubscriptionSupportTicketSupportTicketsRestClient => _subscriptionSupportTicketSupportTicketsRestClient ??= new SupportTicketsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, GetApiVersionOrNull(SubscriptionSupportTicketResource.ResourceType)); @@ -61,7 +69,7 @@ public virtual SubscriptionSupportTicketCollection GetSubscriptionSupportTickets /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -92,7 +100,7 @@ public virtual async Task> GetSubscr /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -130,7 +138,7 @@ public virtual SubscriptionFileWorkspaceCollection GetSubscriptionFileWorkspaces /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -161,7 +169,7 @@ public virtual async Task> GetSubscr /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -179,6 +187,172 @@ public virtual Response GetSubscriptionFileWo return GetSubscriptionFileWorkspaces().Get(fileWorkspaceName, cancellationToken); } + /// + /// Classify the list of right Azure services. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Support/classifyServices + /// + /// + /// Operation Id + /// ServiceClassifications_ClassifyServices + /// + /// + /// Default Api Version + /// 2023-06-01-preview + /// + /// + /// + /// Input to check. + /// The cancellation token to use. + /// is null. + public virtual async Task> ClassifyServicesServiceClassificationAsync(ServiceClassificationContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ServiceClassificationsClientDiagnostics.CreateScope("MockableSupportSubscriptionResource.ClassifyServicesServiceClassification"); + scope.Start(); + try + { + var response = await ServiceClassificationsRestClient.ClassifyServicesAsync(Id.SubscriptionId, content, cancellationToken).ConfigureAwait(false); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Classify the list of right Azure services. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Support/classifyServices + /// + /// + /// Operation Id + /// ServiceClassifications_ClassifyServices + /// + /// + /// Default Api Version + /// 2023-06-01-preview + /// + /// + /// + /// Input to check. + /// The cancellation token to use. + /// is null. + public virtual Response ClassifyServicesServiceClassification(ServiceClassificationContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ServiceClassificationsClientDiagnostics.CreateScope("MockableSupportSubscriptionResource.ClassifyServicesServiceClassification"); + scope.Start(); + try + { + var response = ServiceClassificationsRestClient.ClassifyServices(Id.SubscriptionId, content, cancellationToken); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Classify the right problem classifications (categories) available for a specific Azure service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Support/services/{problemServiceName}/classifyProblems + /// + /// + /// Operation Id + /// ProblemClassifications_ClassifyProblems + /// + /// + /// Default Api Version + /// 2023-06-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the Azure service for which the problem classifications need to be retrieved. + /// Input to check. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual async Task> ClassifyProblemsProblemClassificationAsync(string problemServiceName, ServiceProblemClassificationContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(problemServiceName, nameof(problemServiceName)); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ProblemClassificationClientDiagnostics.CreateScope("MockableSupportSubscriptionResource.ClassifyProblemsProblemClassification"); + scope.Start(); + try + { + var response = await ProblemClassificationRestClient.ClassifyProblemsAsync(Id.SubscriptionId, problemServiceName, content, cancellationToken).ConfigureAwait(false); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Classify the right problem classifications (categories) available for a specific Azure service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Support/services/{problemServiceName}/classifyProblems + /// + /// + /// Operation Id + /// ProblemClassifications_ClassifyProblems + /// + /// + /// Default Api Version + /// 2023-06-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the Azure service for which the problem classifications need to be retrieved. + /// Input to check. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual Response ClassifyProblemsProblemClassification(string problemServiceName, ServiceProblemClassificationContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(problemServiceName, nameof(problemServiceName)); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ProblemClassificationClientDiagnostics.CreateScope("MockableSupportSubscriptionResource.ClassifyProblemsProblemClassification"); + scope.Start(); + try + { + var response = ProblemClassificationRestClient.ClassifyProblems(Id.SubscriptionId, problemServiceName, content, cancellationToken); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + /// /// Check the availability of a resource name. This API should be used to check the uniqueness of the name for support ticket creation for the selected subscription. /// @@ -192,7 +366,7 @@ public virtual Response GetSubscriptionFileWo /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -234,7 +408,7 @@ public virtual async Task> CheckSupportT /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource diff --git a/sdk/support/Azure.ResourceManager.Support/src/Generated/Extensions/MockableSupportTenantResource.cs b/sdk/support/Azure.ResourceManager.Support/src/Generated/Extensions/MockableSupportTenantResource.cs index 47b3a7075fa1..ce10b9191dae 100644 --- a/sdk/support/Azure.ResourceManager.Support/src/Generated/Extensions/MockableSupportTenantResource.cs +++ b/sdk/support/Azure.ResourceManager.Support/src/Generated/Extensions/MockableSupportTenantResource.cs @@ -17,8 +17,12 @@ namespace Azure.ResourceManager.Support.Mocking /// A class to add extension methods to TenantResource. public partial class MockableSupportTenantResource : ArmResource { + private ClientDiagnostics _serviceClassificationsNoSubscriptionClientDiagnostics; + private ServiceClassificationsNoSubscriptionRestOperations _serviceClassificationsNoSubscriptionRestClient; private ClientDiagnostics _tenantSupportTicketSupportTicketsNoSubscriptionClientDiagnostics; private SupportTicketsNoSubscriptionRestOperations _tenantSupportTicketSupportTicketsNoSubscriptionRestClient; + private ClientDiagnostics _lookUpResourceIdClientDiagnostics; + private LookUpResourceIdRestOperations _lookUpResourceIdRestClient; /// Initializes a new instance of the class for mocking. protected MockableSupportTenantResource() @@ -32,8 +36,12 @@ internal MockableSupportTenantResource(ArmClient client, ResourceIdentifier id) { } + private ClientDiagnostics ServiceClassificationsNoSubscriptionClientDiagnostics => _serviceClassificationsNoSubscriptionClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.Support", ProviderConstants.DefaultProviderNamespace, Diagnostics); + private ServiceClassificationsNoSubscriptionRestOperations ServiceClassificationsNoSubscriptionRestClient => _serviceClassificationsNoSubscriptionRestClient ??= new ServiceClassificationsNoSubscriptionRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint); private ClientDiagnostics TenantSupportTicketSupportTicketsNoSubscriptionClientDiagnostics => _tenantSupportTicketSupportTicketsNoSubscriptionClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.Support", TenantSupportTicketResource.ResourceType.Namespace, Diagnostics); private SupportTicketsNoSubscriptionRestOperations TenantSupportTicketSupportTicketsNoSubscriptionRestClient => _tenantSupportTicketSupportTicketsNoSubscriptionRestClient ??= new SupportTicketsNoSubscriptionRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, GetApiVersionOrNull(TenantSupportTicketResource.ResourceType)); + private ClientDiagnostics LookUpResourceIdClientDiagnostics => _lookUpResourceIdClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.Support", ProviderConstants.DefaultProviderNamespace, Diagnostics); + private LookUpResourceIdRestOperations LookUpResourceIdRestClient => _lookUpResourceIdRestClient ??= new LookUpResourceIdRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint); private string GetApiVersionOrNull(ResourceType resourceType) { @@ -61,7 +69,7 @@ public virtual SupportAzureServiceCollection GetSupportAzureServices() /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -69,7 +77,7 @@ public virtual SupportAzureServiceCollection GetSupportAzureServices() /// /// /// - /// Name of the Azure service. + /// Name of the Azure service for which the problem classifications need to be retrieved. /// The cancellation token to use. /// is null. /// is an empty string, and was expected to be non-empty. @@ -92,7 +100,7 @@ public virtual async Task> GetSupportAzure /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -100,7 +108,7 @@ public virtual async Task> GetSupportAzure /// /// /// - /// Name of the Azure service. + /// Name of the Azure service for which the problem classifications need to be retrieved. /// The cancellation token to use. /// is null. /// is an empty string, and was expected to be non-empty. @@ -130,7 +138,7 @@ public virtual TenantSupportTicketCollection GetTenantSupportTickets() /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -161,7 +169,7 @@ public virtual async Task> GetTenantSuppor /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -199,7 +207,7 @@ public virtual TenantFileWorkspaceCollection GetTenantFileWorkspaces() /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -230,7 +238,7 @@ public virtual async Task> GetTenantFileWo /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -248,6 +256,82 @@ public virtual Response GetTenantFileWorkspace(stri return GetTenantFileWorkspaces().Get(fileWorkspaceName, cancellationToken); } + /// + /// Classify the list of right Azure services. + /// + /// + /// Request Path + /// /providers/Microsoft.Support/classifyServices + /// + /// + /// Operation Id + /// ServiceClassificationsNoSubscription_ClassifyServices + /// + /// + /// Default Api Version + /// 2023-06-01-preview + /// + /// + /// + /// Input to check. + /// The cancellation token to use. + /// is null. + public virtual async Task> ClassifyServicesServiceClassificationsNoSubscriptionAsync(ServiceClassificationContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ServiceClassificationsNoSubscriptionClientDiagnostics.CreateScope("MockableSupportTenantResource.ClassifyServicesServiceClassificationsNoSubscription"); + scope.Start(); + try + { + var response = await ServiceClassificationsNoSubscriptionRestClient.ClassifyServicesAsync(content, cancellationToken).ConfigureAwait(false); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Classify the list of right Azure services. + /// + /// + /// Request Path + /// /providers/Microsoft.Support/classifyServices + /// + /// + /// Operation Id + /// ServiceClassificationsNoSubscription_ClassifyServices + /// + /// + /// Default Api Version + /// 2023-06-01-preview + /// + /// + /// + /// Input to check. + /// The cancellation token to use. + /// is null. + public virtual Response ClassifyServicesServiceClassificationsNoSubscription(ServiceClassificationContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ServiceClassificationsNoSubscriptionClientDiagnostics.CreateScope("MockableSupportTenantResource.ClassifyServicesServiceClassificationsNoSubscription"); + scope.Start(); + try + { + var response = ServiceClassificationsNoSubscriptionRestClient.ClassifyServices(content, cancellationToken); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + /// /// Check the availability of a resource name. This API should be used to check the uniqueness of the name for support ticket creation for the selected subscription. /// @@ -261,7 +345,7 @@ public virtual Response GetTenantFileWorkspace(stri /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -303,7 +387,7 @@ public virtual async Task> CheckNameAvai /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -331,5 +415,81 @@ public virtual Response CheckNameAvailabilitySupp throw; } } + + /// + /// This operation fetches ARM resource id of support resource type. + /// + /// + /// Request Path + /// /providers/Microsoft.Support/lookUpResourceId + /// + /// + /// Operation Id + /// LookUpResourceId_Post + /// + /// + /// Default Api Version + /// 2023-06-01-preview + /// + /// + /// + /// Look up resource id request body. + /// The cancellation token to use. + /// is null. + public virtual async Task> LookUpResourceIdAsync(LookUpResourceIdContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = LookUpResourceIdClientDiagnostics.CreateScope("MockableSupportTenantResource.LookUpResourceId"); + scope.Start(); + try + { + var response = await LookUpResourceIdRestClient.PostAsync(content, cancellationToken).ConfigureAwait(false); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// This operation fetches ARM resource id of support resource type. + /// + /// + /// Request Path + /// /providers/Microsoft.Support/lookUpResourceId + /// + /// + /// Operation Id + /// LookUpResourceId_Post + /// + /// + /// Default Api Version + /// 2023-06-01-preview + /// + /// + /// + /// Look up resource id request body. + /// The cancellation token to use. + /// is null. + public virtual Response LookUpResourceId(LookUpResourceIdContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = LookUpResourceIdClientDiagnostics.CreateScope("MockableSupportTenantResource.LookUpResourceId"); + scope.Start(); + try + { + var response = LookUpResourceIdRestClient.Post(content, cancellationToken); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } } } diff --git a/sdk/support/Azure.ResourceManager.Support/src/Generated/Extensions/SupportExtensions.cs b/sdk/support/Azure.ResourceManager.Support/src/Generated/Extensions/SupportExtensions.cs index ff09d24dca18..2aa62eeb2d9b 100644 --- a/sdk/support/Azure.ResourceManager.Support/src/Generated/Extensions/SupportExtensions.cs +++ b/sdk/support/Azure.ResourceManager.Support/src/Generated/Extensions/SupportExtensions.cs @@ -291,7 +291,7 @@ public static SubscriptionSupportTicketCollection GetSubscriptionSupportTickets( /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -329,7 +329,7 @@ public static async Task> GetSubscri /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -384,7 +384,7 @@ public static SubscriptionFileWorkspaceCollection GetSubscriptionFileWorkspaces( /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -422,7 +422,7 @@ public static async Task> GetSubscri /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -447,6 +447,146 @@ public static Response GetSubscriptionFileWor return GetMockableSupportSubscriptionResource(subscriptionResource).GetSubscriptionFileWorkspace(fileWorkspaceName, cancellationToken); } + /// + /// Classify the list of right Azure services. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Support/classifyServices + /// + /// + /// Operation Id + /// ServiceClassifications_ClassifyServices + /// + /// + /// Default Api Version + /// 2023-06-01-preview + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// Input to check. + /// The cancellation token to use. + /// or is null. + public static async Task> ClassifyServicesServiceClassificationAsync(this SubscriptionResource subscriptionResource, ServiceClassificationContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); + + return await GetMockableSupportSubscriptionResource(subscriptionResource).ClassifyServicesServiceClassificationAsync(content, cancellationToken).ConfigureAwait(false); + } + + /// + /// Classify the list of right Azure services. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Support/classifyServices + /// + /// + /// Operation Id + /// ServiceClassifications_ClassifyServices + /// + /// + /// Default Api Version + /// 2023-06-01-preview + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// Input to check. + /// The cancellation token to use. + /// or is null. + public static Response ClassifyServicesServiceClassification(this SubscriptionResource subscriptionResource, ServiceClassificationContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); + + return GetMockableSupportSubscriptionResource(subscriptionResource).ClassifyServicesServiceClassification(content, cancellationToken); + } + + /// + /// Classify the right problem classifications (categories) available for a specific Azure service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Support/services/{problemServiceName}/classifyProblems + /// + /// + /// Operation Id + /// ProblemClassifications_ClassifyProblems + /// + /// + /// Default Api Version + /// 2023-06-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// Name of the Azure service for which the problem classifications need to be retrieved. + /// Input to check. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// , or is null. + public static async Task> ClassifyProblemsProblemClassificationAsync(this SubscriptionResource subscriptionResource, string problemServiceName, ServiceProblemClassificationContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); + + return await GetMockableSupportSubscriptionResource(subscriptionResource).ClassifyProblemsProblemClassificationAsync(problemServiceName, content, cancellationToken).ConfigureAwait(false); + } + + /// + /// Classify the right problem classifications (categories) available for a specific Azure service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Support/services/{problemServiceName}/classifyProblems + /// + /// + /// Operation Id + /// ProblemClassifications_ClassifyProblems + /// + /// + /// Default Api Version + /// 2023-06-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// Name of the Azure service for which the problem classifications need to be retrieved. + /// Input to check. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// , or is null. + public static Response ClassifyProblemsProblemClassification(this SubscriptionResource subscriptionResource, string problemServiceName, ServiceProblemClassificationContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); + + return GetMockableSupportSubscriptionResource(subscriptionResource).ClassifyProblemsProblemClassification(problemServiceName, content, cancellationToken); + } + /// /// Check the availability of a resource name. This API should be used to check the uniqueness of the name for support ticket creation for the selected subscription. /// @@ -460,7 +600,7 @@ public static Response GetSubscriptionFileWor /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -496,7 +636,7 @@ public static async Task> CheckSupportTi /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -549,7 +689,7 @@ public static SupportAzureServiceCollection GetSupportAzureServices(this TenantR /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -562,7 +702,7 @@ public static SupportAzureServiceCollection GetSupportAzureServices(this TenantR /// /// /// The instance the method will execute against. - /// Name of the Azure service. + /// Name of the Azure service for which the problem classifications need to be retrieved. /// The cancellation token to use. /// or is null. /// is an empty string, and was expected to be non-empty. @@ -587,7 +727,7 @@ public static async Task> GetSupportAzureS /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -600,7 +740,7 @@ public static async Task> GetSupportAzureS /// /// /// The instance the method will execute against. - /// Name of the Azure service. + /// Name of the Azure service for which the problem classifications need to be retrieved. /// The cancellation token to use. /// or is null. /// is an empty string, and was expected to be non-empty. @@ -642,7 +782,7 @@ public static TenantSupportTicketCollection GetTenantSupportTickets(this TenantR /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -680,7 +820,7 @@ public static async Task> GetTenantSupport /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -735,7 +875,7 @@ public static TenantFileWorkspaceCollection GetTenantFileWorkspaces(this TenantR /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -773,7 +913,7 @@ public static async Task> GetTenantFileWor /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -798,6 +938,70 @@ public static Response GetTenantFileWorkspace(this return GetMockableSupportTenantResource(tenantResource).GetTenantFileWorkspace(fileWorkspaceName, cancellationToken); } + /// + /// Classify the list of right Azure services. + /// + /// + /// Request Path + /// /providers/Microsoft.Support/classifyServices + /// + /// + /// Operation Id + /// ServiceClassificationsNoSubscription_ClassifyServices + /// + /// + /// Default Api Version + /// 2023-06-01-preview + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// Input to check. + /// The cancellation token to use. + /// or is null. + public static async Task> ClassifyServicesServiceClassificationsNoSubscriptionAsync(this TenantResource tenantResource, ServiceClassificationContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(tenantResource, nameof(tenantResource)); + + return await GetMockableSupportTenantResource(tenantResource).ClassifyServicesServiceClassificationsNoSubscriptionAsync(content, cancellationToken).ConfigureAwait(false); + } + + /// + /// Classify the list of right Azure services. + /// + /// + /// Request Path + /// /providers/Microsoft.Support/classifyServices + /// + /// + /// Operation Id + /// ServiceClassificationsNoSubscription_ClassifyServices + /// + /// + /// Default Api Version + /// 2023-06-01-preview + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// Input to check. + /// The cancellation token to use. + /// or is null. + public static Response ClassifyServicesServiceClassificationsNoSubscription(this TenantResource tenantResource, ServiceClassificationContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(tenantResource, nameof(tenantResource)); + + return GetMockableSupportTenantResource(tenantResource).ClassifyServicesServiceClassificationsNoSubscription(content, cancellationToken); + } + /// /// Check the availability of a resource name. This API should be used to check the uniqueness of the name for support ticket creation for the selected subscription. /// @@ -811,7 +1015,7 @@ public static Response GetTenantFileWorkspace(this /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -847,7 +1051,7 @@ public static async Task> CheckNameAvail /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -869,5 +1073,69 @@ public static Response CheckNameAvailabilitySuppo return GetMockableSupportTenantResource(tenantResource).CheckNameAvailabilitySupportTicketsNoSubscription(content, cancellationToken); } + + /// + /// This operation fetches ARM resource id of support resource type. + /// + /// + /// Request Path + /// /providers/Microsoft.Support/lookUpResourceId + /// + /// + /// Operation Id + /// LookUpResourceId_Post + /// + /// + /// Default Api Version + /// 2023-06-01-preview + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// Look up resource id request body. + /// The cancellation token to use. + /// or is null. + public static async Task> LookUpResourceIdAsync(this TenantResource tenantResource, LookUpResourceIdContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(tenantResource, nameof(tenantResource)); + + return await GetMockableSupportTenantResource(tenantResource).LookUpResourceIdAsync(content, cancellationToken).ConfigureAwait(false); + } + + /// + /// This operation fetches ARM resource id of support resource type. + /// + /// + /// Request Path + /// /providers/Microsoft.Support/lookUpResourceId + /// + /// + /// Operation Id + /// LookUpResourceId_Post + /// + /// + /// Default Api Version + /// 2023-06-01-preview + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// Look up resource id request body. + /// The cancellation token to use. + /// or is null. + public static Response LookUpResourceId(this TenantResource tenantResource, LookUpResourceIdContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(tenantResource, nameof(tenantResource)); + + return GetMockableSupportTenantResource(tenantResource).LookUpResourceId(content, cancellationToken); + } } } diff --git a/sdk/support/Azure.ResourceManager.Support/src/Generated/Models/ChatTranscriptMessageProperties.Serialization.cs b/sdk/support/Azure.ResourceManager.Support/src/Generated/Models/ChatTranscriptMessageProperties.Serialization.cs index 7b5b4aed3fb1..e63c0646f9a1 100644 --- a/sdk/support/Azure.ResourceManager.Support/src/Generated/Models/ChatTranscriptMessageProperties.Serialization.cs +++ b/sdk/support/Azure.ResourceManager.Support/src/Generated/Models/ChatTranscriptMessageProperties.Serialization.cs @@ -49,11 +49,8 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("sender"u8); writer.WriteStringValue(Sender); } - if (Optional.IsDefined(Body)) - { - writer.WritePropertyName("body"u8); - writer.WriteStringValue(Body); - } + writer.WritePropertyName("body"u8); + writer.WriteStringValue(Body); if (options.Format != "W" && Optional.IsDefined(CreatedOn)) { writer.WritePropertyName("createdDate"u8); diff --git a/sdk/support/Azure.ResourceManager.Support/src/Generated/Models/ChatTranscriptMessageProperties.cs b/sdk/support/Azure.ResourceManager.Support/src/Generated/Models/ChatTranscriptMessageProperties.cs index 2fc008785816..58a04a958520 100644 --- a/sdk/support/Azure.ResourceManager.Support/src/Generated/Models/ChatTranscriptMessageProperties.cs +++ b/sdk/support/Azure.ResourceManager.Support/src/Generated/Models/ChatTranscriptMessageProperties.cs @@ -46,8 +46,13 @@ public partial class ChatTranscriptMessageProperties private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - public ChatTranscriptMessageProperties() + /// Body of the communication. + /// is null. + public ChatTranscriptMessageProperties(string body) { + Argument.AssertNotNull(body, nameof(body)); + + Body = body; } /// Initializes a new instance of . @@ -67,6 +72,11 @@ internal ChatTranscriptMessageProperties(TranscriptContentType? contentType, Sup _serializedAdditionalRawData = serializedAdditionalRawData; } + /// Initializes a new instance of for deserialization. + internal ChatTranscriptMessageProperties() + { + } + /// Content type. public TranscriptContentType? ContentType { get; } /// Direction of communication. diff --git a/sdk/support/Azure.ResourceManager.Support/src/Generated/Models/ClassificationService.Serialization.cs b/sdk/support/Azure.ResourceManager.Support/src/Generated/Models/ClassificationService.Serialization.cs new file mode 100644 index 000000000000..e7e562d3e64b --- /dev/null +++ b/sdk/support/Azure.ResourceManager.Support/src/Generated/Models/ClassificationService.Serialization.cs @@ -0,0 +1,169 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.Support.Models +{ + public partial class ClassificationService : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ClassificationService)} does not support writing '{format}' format."); + } + + if (options.Format != "W" && Optional.IsDefined(ServiceId)) + { + writer.WritePropertyName("serviceId"u8); + writer.WriteStringValue(ServiceId); + } + if (options.Format != "W" && Optional.IsDefined(DisplayName)) + { + writer.WritePropertyName("displayName"u8); + writer.WriteStringValue(DisplayName); + } + if (Optional.IsCollectionDefined(ResourceTypes)) + { + writer.WritePropertyName("resourceTypes"u8); + writer.WriteStartArray(); + foreach (var item in ResourceTypes) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ClassificationService IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ClassificationService)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeClassificationService(document.RootElement, options); + } + + internal static ClassificationService DeserializeClassificationService(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ResourceIdentifier serviceId = default; + string displayName = default; + IReadOnlyList resourceTypes = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("serviceId"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null || property.Value.ValueKind == JsonValueKind.String && property.Value.GetString().Length == 0) + { + continue; + } + serviceId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("displayName"u8)) + { + displayName = property.Value.GetString(); + continue; + } + if (property.NameEquals("resourceTypes"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(new ResourceType(item.GetString())); + } + resourceTypes = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ClassificationService(serviceId, displayName, resourceTypes ?? 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(ClassificationService)} does not support writing '{options.Format}' format."); + } + } + + ClassificationService IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeClassificationService(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ClassificationService)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/support/Azure.ResourceManager.Support/src/Generated/Models/ClassificationService.cs b/sdk/support/Azure.ResourceManager.Support/src/Generated/Models/ClassificationService.cs new file mode 100644 index 000000000000..3bf6d735065f --- /dev/null +++ b/sdk/support/Azure.ResourceManager.Support/src/Generated/Models/ClassificationService.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; + +namespace Azure.ResourceManager.Support.Models +{ + /// Service Classification result object. + public partial class ClassificationService + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private protected IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal ClassificationService() + { + ResourceTypes = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// Azure resource Id of the service. + /// Localized name of the azure service. + /// List of applicable ARM resource types for this service. + /// Keeps track of any properties unknown to the library. + internal ClassificationService(ResourceIdentifier serviceId, string displayName, IReadOnlyList resourceTypes, IDictionary serializedAdditionalRawData) + { + ServiceId = serviceId; + DisplayName = displayName; + ResourceTypes = resourceTypes; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Azure resource Id of the service. + public ResourceIdentifier ServiceId { get; } + /// Localized name of the azure service. + public string DisplayName { get; } + /// List of applicable ARM resource types for this service. + public IReadOnlyList ResourceTypes { get; } + } +} diff --git a/sdk/support/Azure.ResourceManager.Support/src/Generated/Models/LookUpResourceIdContent.Serialization.cs b/sdk/support/Azure.ResourceManager.Support/src/Generated/Models/LookUpResourceIdContent.Serialization.cs new file mode 100644 index 000000000000..e48071c4d344 --- /dev/null +++ b/sdk/support/Azure.ResourceManager.Support/src/Generated/Models/LookUpResourceIdContent.Serialization.cs @@ -0,0 +1,144 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.Support.Models +{ + public partial class LookUpResourceIdContent : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(LookUpResourceIdContent)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(Identifier)) + { + writer.WritePropertyName("identifier"u8); + writer.WriteStringValue(Identifier); + } + if (Optional.IsDefined(ResourceType)) + { + writer.WritePropertyName("type"u8); + writer.WriteStringValue(ResourceType.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 + } + } + } + + LookUpResourceIdContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(LookUpResourceIdContent)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeLookUpResourceIdContent(document.RootElement, options); + } + + internal static LookUpResourceIdContent DeserializeLookUpResourceIdContent(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string identifier = default; + SupportResourceTypeName? type = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("identifier"u8)) + { + identifier = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + type = new SupportResourceTypeName(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new LookUpResourceIdContent(identifier, type, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(LookUpResourceIdContent)} does not support writing '{options.Format}' format."); + } + } + + LookUpResourceIdContent IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeLookUpResourceIdContent(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(LookUpResourceIdContent)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/support/Azure.ResourceManager.Support/src/Generated/Models/LookUpResourceIdContent.cs b/sdk/support/Azure.ResourceManager.Support/src/Generated/Models/LookUpResourceIdContent.cs new file mode 100644 index 000000000000..5e971952cb15 --- /dev/null +++ b/sdk/support/Azure.ResourceManager.Support/src/Generated/Models/LookUpResourceIdContent.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.Support.Models +{ + /// The look up resource Id request body. + public partial class LookUpResourceIdContent + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public LookUpResourceIdContent() + { + } + + /// Initializes a new instance of . + /// The System generated Id that is unique. Use supportTicketId property for Microsoft.Support/supportTickets resource type. + /// The type of resource. + /// Keeps track of any properties unknown to the library. + internal LookUpResourceIdContent(string identifier, SupportResourceTypeName? resourceType, IDictionary serializedAdditionalRawData) + { + Identifier = identifier; + ResourceType = resourceType; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The System generated Id that is unique. Use supportTicketId property for Microsoft.Support/supportTickets resource type. + public string Identifier { get; set; } + /// The type of resource. + public SupportResourceTypeName? ResourceType { get; set; } + } +} diff --git a/sdk/support/Azure.ResourceManager.Support/src/Generated/Models/LookUpResourceIdResult.Serialization.cs b/sdk/support/Azure.ResourceManager.Support/src/Generated/Models/LookUpResourceIdResult.Serialization.cs new file mode 100644 index 000000000000..4928e8a866c0 --- /dev/null +++ b/sdk/support/Azure.ResourceManager.Support/src/Generated/Models/LookUpResourceIdResult.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.Support.Models +{ + public partial class LookUpResourceIdResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(LookUpResourceIdResult)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(ResourceId)) + { + writer.WritePropertyName("resourceId"u8); + writer.WriteStringValue(ResourceId); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + LookUpResourceIdResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(LookUpResourceIdResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeLookUpResourceIdResult(document.RootElement, options); + } + + internal static LookUpResourceIdResult DeserializeLookUpResourceIdResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ResourceIdentifier resourceId = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("resourceId"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null || property.Value.ValueKind == JsonValueKind.String && property.Value.GetString().Length == 0) + { + continue; + } + resourceId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new LookUpResourceIdResult(resourceId, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(LookUpResourceIdResult)} does not support writing '{options.Format}' format."); + } + } + + LookUpResourceIdResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeLookUpResourceIdResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(LookUpResourceIdResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/support/Azure.ResourceManager.Support/src/Generated/Models/LookUpResourceIdResult.cs b/sdk/support/Azure.ResourceManager.Support/src/Generated/Models/LookUpResourceIdResult.cs new file mode 100644 index 000000000000..b1de510f96bd --- /dev/null +++ b/sdk/support/Azure.ResourceManager.Support/src/Generated/Models/LookUpResourceIdResult.cs @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.Support.Models +{ + /// The look up resource id response. + public partial class LookUpResourceIdResult + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal LookUpResourceIdResult() + { + } + + /// Initializes a new instance of . + /// The resource Id of support resource type. + /// Keeps track of any properties unknown to the library. + internal LookUpResourceIdResult(ResourceIdentifier resourceId, IDictionary serializedAdditionalRawData) + { + ResourceId = resourceId; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The resource Id of support resource type. + public ResourceIdentifier ResourceId { get; } + } +} diff --git a/sdk/support/Azure.ResourceManager.Support/src/Generated/Models/ServiceClassificationAnswer.Serialization.cs b/sdk/support/Azure.ResourceManager.Support/src/Generated/Models/ServiceClassificationAnswer.Serialization.cs new file mode 100644 index 000000000000..7624e3ae5443 --- /dev/null +++ b/sdk/support/Azure.ResourceManager.Support/src/Generated/Models/ServiceClassificationAnswer.Serialization.cs @@ -0,0 +1,150 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.Support.Models +{ + public partial class ServiceClassificationAnswer : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.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(ServiceClassificationAnswer)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(ChildService)) + { + writer.WritePropertyName("childService"u8); + writer.WriteObjectValue(ChildService, options); + } + } + + ServiceClassificationAnswer IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ServiceClassificationAnswer)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeServiceClassificationAnswer(document.RootElement, options); + } + + internal static ServiceClassificationAnswer DeserializeServiceClassificationAnswer(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ClassificationService childService = default; + ResourceIdentifier serviceId = default; + string displayName = default; + IReadOnlyList resourceTypes = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("childService"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + childService = DeserializeClassificationService(property.Value, options); + continue; + } + if (property.NameEquals("serviceId"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + serviceId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("displayName"u8)) + { + displayName = property.Value.GetString(); + continue; + } + if (property.NameEquals("resourceTypes"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(new ResourceType(item.GetString())); + } + resourceTypes = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ServiceClassificationAnswer(serviceId, displayName, resourceTypes ?? new ChangeTrackingList(), serializedAdditionalRawData, childService); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ServiceClassificationAnswer)} does not support writing '{options.Format}' format."); + } + } + + ServiceClassificationAnswer IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeServiceClassificationAnswer(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ServiceClassificationAnswer)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/support/Azure.ResourceManager.Support/src/Generated/Models/ServiceClassificationAnswer.cs b/sdk/support/Azure.ResourceManager.Support/src/Generated/Models/ServiceClassificationAnswer.cs new file mode 100644 index 000000000000..c6fd225c16f1 --- /dev/null +++ b/sdk/support/Azure.ResourceManager.Support/src/Generated/Models/ServiceClassificationAnswer.cs @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.Support.Models +{ + /// Service Classification result object. + public partial class ServiceClassificationAnswer : ClassificationService + { + /// Initializes a new instance of . + internal ServiceClassificationAnswer() + { + } + + /// Initializes a new instance of . + /// Azure resource Id of the service. + /// Localized name of the azure service. + /// List of applicable ARM resource types for this service. + /// Keeps track of any properties unknown to the library. + /// Child service. + internal ServiceClassificationAnswer(ResourceIdentifier serviceId, string displayName, IReadOnlyList resourceTypes, IDictionary serializedAdditionalRawData, ClassificationService childService) : base(serviceId, displayName, resourceTypes, serializedAdditionalRawData) + { + ChildService = childService; + } + + /// Child service. + public ClassificationService ChildService { get; } + } +} diff --git a/sdk/support/Azure.ResourceManager.Support/src/Generated/Models/ServiceClassificationContent.Serialization.cs b/sdk/support/Azure.ResourceManager.Support/src/Generated/Models/ServiceClassificationContent.Serialization.cs new file mode 100644 index 000000000000..b18d23712fba --- /dev/null +++ b/sdk/support/Azure.ResourceManager.Support/src/Generated/Models/ServiceClassificationContent.Serialization.cs @@ -0,0 +1,155 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.Support.Models +{ + public partial class ServiceClassificationContent : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ServiceClassificationContent)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(IssueSummary)) + { + writer.WritePropertyName("issueSummary"u8); + writer.WriteStringValue(IssueSummary); + } + if (Optional.IsDefined(ResourceId)) + { + writer.WritePropertyName("resourceId"u8); + writer.WriteStringValue(ResourceId); + } + if (Optional.IsDefined(AdditionalContext)) + { + writer.WritePropertyName("additionalContext"u8); + writer.WriteStringValue(AdditionalContext); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ServiceClassificationContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ServiceClassificationContent)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeServiceClassificationContent(document.RootElement, options); + } + + internal static ServiceClassificationContent DeserializeServiceClassificationContent(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string issueSummary = default; + ResourceIdentifier resourceId = default; + string additionalContext = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("issueSummary"u8)) + { + issueSummary = property.Value.GetString(); + continue; + } + if (property.NameEquals("resourceId"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + resourceId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("additionalContext"u8)) + { + additionalContext = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ServiceClassificationContent(issueSummary, resourceId, additionalContext, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ServiceClassificationContent)} does not support writing '{options.Format}' format."); + } + } + + ServiceClassificationContent IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeServiceClassificationContent(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ServiceClassificationContent)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/support/Azure.ResourceManager.Support/src/Generated/Models/ServiceClassificationContent.cs b/sdk/support/Azure.ResourceManager.Support/src/Generated/Models/ServiceClassificationContent.cs new file mode 100644 index 000000000000..21c0abdecb51 --- /dev/null +++ b/sdk/support/Azure.ResourceManager.Support/src/Generated/Models/ServiceClassificationContent.cs @@ -0,0 +1,74 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.Support.Models +{ + /// Input to problem classification Classification API. + public partial class ServiceClassificationContent + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public ServiceClassificationContent() + { + } + + /// Initializes a new instance of . + /// Natural language description of the customer’s issue. + /// ARM resource Id of the resource that is having the issue. + /// Additional information in the form of a string. + /// Keeps track of any properties unknown to the library. + internal ServiceClassificationContent(string issueSummary, ResourceIdentifier resourceId, string additionalContext, IDictionary serializedAdditionalRawData) + { + IssueSummary = issueSummary; + ResourceId = resourceId; + AdditionalContext = additionalContext; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Natural language description of the customer’s issue. + public string IssueSummary { get; set; } + /// ARM resource Id of the resource that is having the issue. + public ResourceIdentifier ResourceId { get; set; } + /// Additional information in the form of a string. + public string AdditionalContext { get; set; } + } +} diff --git a/sdk/support/Azure.ResourceManager.Support/src/Generated/Models/ServiceClassificationOutput.Serialization.cs b/sdk/support/Azure.ResourceManager.Support/src/Generated/Models/ServiceClassificationOutput.Serialization.cs new file mode 100644 index 000000000000..99f4bfe4e98c --- /dev/null +++ b/sdk/support/Azure.ResourceManager.Support/src/Generated/Models/ServiceClassificationOutput.Serialization.cs @@ -0,0 +1,143 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.Support.Models +{ + public partial class ServiceClassificationOutput : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ServiceClassificationOutput)} does not support writing '{format}' format."); + } + + if (Optional.IsCollectionDefined(ServiceClassificationResults)) + { + writer.WritePropertyName("serviceClassificationResults"u8); + writer.WriteStartArray(); + foreach (var item in ServiceClassificationResults) + { + 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 + } + } + } + + ServiceClassificationOutput IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ServiceClassificationOutput)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeServiceClassificationOutput(document.RootElement, options); + } + + internal static ServiceClassificationOutput DeserializeServiceClassificationOutput(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList serviceClassificationResults = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("serviceClassificationResults"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(ServiceClassificationAnswer.DeserializeServiceClassificationAnswer(item, options)); + } + serviceClassificationResults = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ServiceClassificationOutput(serviceClassificationResults ?? 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(ServiceClassificationOutput)} does not support writing '{options.Format}' format."); + } + } + + ServiceClassificationOutput IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeServiceClassificationOutput(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ServiceClassificationOutput)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/support/Azure.ResourceManager.Support/src/Generated/Models/ServiceClassificationOutput.cs b/sdk/support/Azure.ResourceManager.Support/src/Generated/Models/ServiceClassificationOutput.cs new file mode 100644 index 000000000000..a9d28c2dc711 --- /dev/null +++ b/sdk/support/Azure.ResourceManager.Support/src/Generated/Models/ServiceClassificationOutput.cs @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.Support.Models +{ + /// Output of the service classification API. + public partial class ServiceClassificationOutput + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal ServiceClassificationOutput() + { + ServiceClassificationResults = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// Set of problem classification objects classified. + /// Keeps track of any properties unknown to the library. + internal ServiceClassificationOutput(IReadOnlyList serviceClassificationResults, IDictionary serializedAdditionalRawData) + { + ServiceClassificationResults = serviceClassificationResults; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Set of problem classification objects classified. + public IReadOnlyList ServiceClassificationResults { get; } + } +} diff --git a/sdk/support/Azure.ResourceManager.Support/src/Generated/Models/ServiceProblemClassificationContent.Serialization.cs b/sdk/support/Azure.ResourceManager.Support/src/Generated/Models/ServiceProblemClassificationContent.Serialization.cs new file mode 100644 index 000000000000..b24c49c0dca3 --- /dev/null +++ b/sdk/support/Azure.ResourceManager.Support/src/Generated/Models/ServiceProblemClassificationContent.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.Support.Models +{ + public partial class ServiceProblemClassificationContent : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ServiceProblemClassificationContent)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("issueSummary"u8); + writer.WriteStringValue(IssueSummary); + if (Optional.IsDefined(ResourceId)) + { + writer.WritePropertyName("resourceId"u8); + writer.WriteStringValue(ResourceId); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ServiceProblemClassificationContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ServiceProblemClassificationContent)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeServiceProblemClassificationContent(document.RootElement, options); + } + + internal static ServiceProblemClassificationContent DeserializeServiceProblemClassificationContent(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string issueSummary = default; + ResourceIdentifier resourceId = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("issueSummary"u8)) + { + issueSummary = property.Value.GetString(); + continue; + } + if (property.NameEquals("resourceId"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + resourceId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ServiceProblemClassificationContent(issueSummary, resourceId, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ServiceProblemClassificationContent)} does not support writing '{options.Format}' format."); + } + } + + ServiceProblemClassificationContent IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeServiceProblemClassificationContent(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ServiceProblemClassificationContent)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/support/Azure.ResourceManager.Support/src/Generated/Models/ServiceProblemClassificationContent.cs b/sdk/support/Azure.ResourceManager.Support/src/Generated/Models/ServiceProblemClassificationContent.cs new file mode 100644 index 000000000000..a04052bb8f76 --- /dev/null +++ b/sdk/support/Azure.ResourceManager.Support/src/Generated/Models/ServiceProblemClassificationContent.cs @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.Support.Models +{ + /// Input to problem classification Classification API. + public partial class ServiceProblemClassificationContent + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Natural language description of the customer’s issue. + /// is null. + public ServiceProblemClassificationContent(string issueSummary) + { + Argument.AssertNotNull(issueSummary, nameof(issueSummary)); + + IssueSummary = issueSummary; + } + + /// Initializes a new instance of . + /// Natural language description of the customer’s issue. + /// ARM resource Id of the resource that is having the issue. + /// Keeps track of any properties unknown to the library. + internal ServiceProblemClassificationContent(string issueSummary, ResourceIdentifier resourceId, IDictionary serializedAdditionalRawData) + { + IssueSummary = issueSummary; + ResourceId = resourceId; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal ServiceProblemClassificationContent() + { + } + + /// Natural language description of the customer’s issue. + public string IssueSummary { get; } + /// ARM resource Id of the resource that is having the issue. + public ResourceIdentifier ResourceId { get; set; } + } +} diff --git a/sdk/support/Azure.ResourceManager.Support/src/Generated/Models/ServiceProblemClassificationListResult.Serialization.cs b/sdk/support/Azure.ResourceManager.Support/src/Generated/Models/ServiceProblemClassificationListResult.Serialization.cs new file mode 100644 index 000000000000..6fb7e4385786 --- /dev/null +++ b/sdk/support/Azure.ResourceManager.Support/src/Generated/Models/ServiceProblemClassificationListResult.Serialization.cs @@ -0,0 +1,143 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.Support.Models +{ + public partial class ServiceProblemClassificationListResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ServiceProblemClassificationListResult)} does not support writing '{format}' format."); + } + + if (Optional.IsCollectionDefined(ProblemClassificationResults)) + { + writer.WritePropertyName("problemClassificationResults"u8); + writer.WriteStartArray(); + foreach (var item in ProblemClassificationResults) + { + 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 + } + } + } + + ServiceProblemClassificationListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ServiceProblemClassificationListResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeServiceProblemClassificationListResult(document.RootElement, options); + } + + internal static ServiceProblemClassificationListResult DeserializeServiceProblemClassificationListResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList problemClassificationResults = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("problemClassificationResults"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(ServiceProblemClassificationResult.DeserializeServiceProblemClassificationResult(item, options)); + } + problemClassificationResults = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ServiceProblemClassificationListResult(problemClassificationResults ?? 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(ServiceProblemClassificationListResult)} does not support writing '{options.Format}' format."); + } + } + + ServiceProblemClassificationListResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeServiceProblemClassificationListResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ServiceProblemClassificationListResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/support/Azure.ResourceManager.Support/src/Generated/Models/ServiceProblemClassificationListResult.cs b/sdk/support/Azure.ResourceManager.Support/src/Generated/Models/ServiceProblemClassificationListResult.cs new file mode 100644 index 000000000000..07d4f1089685 --- /dev/null +++ b/sdk/support/Azure.ResourceManager.Support/src/Generated/Models/ServiceProblemClassificationListResult.cs @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.Support.Models +{ + /// Output of the problem classification Classification API. + public partial class ServiceProblemClassificationListResult + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal ServiceProblemClassificationListResult() + { + ProblemClassificationResults = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// Set of problem classification objects classified. + /// Keeps track of any properties unknown to the library. + internal ServiceProblemClassificationListResult(IReadOnlyList problemClassificationResults, IDictionary serializedAdditionalRawData) + { + ProblemClassificationResults = problemClassificationResults; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Set of problem classification objects classified. + public IReadOnlyList ProblemClassificationResults { get; } + } +} diff --git a/sdk/support/Azure.ResourceManager.Support/src/Generated/Models/ServiceProblemClassificationResult.Serialization.cs b/sdk/support/Azure.ResourceManager.Support/src/Generated/Models/ServiceProblemClassificationResult.Serialization.cs new file mode 100644 index 000000000000..c7f2394f9ecd --- /dev/null +++ b/sdk/support/Azure.ResourceManager.Support/src/Generated/Models/ServiceProblemClassificationResult.Serialization.cs @@ -0,0 +1,252 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.Support.Models +{ + public partial class ServiceProblemClassificationResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ServiceProblemClassificationResult)} does not support writing '{format}' format."); + } + + if (options.Format != "W" && Optional.IsDefined(ProblemId)) + { + writer.WritePropertyName("problemId"u8); + writer.WriteStringValue(ProblemId); + } + if (options.Format != "W" && Optional.IsDefined(Title)) + { + writer.WritePropertyName("title"u8); + writer.WriteStringValue(Title); + } + if (options.Format != "W" && Optional.IsDefined(Description)) + { + writer.WritePropertyName("description"u8); + writer.WriteStringValue(Description); + } + if (options.Format != "W" && Optional.IsDefined(ServiceId)) + { + writer.WritePropertyName("serviceId"u8); + writer.WriteStringValue(ServiceId); + } + if (options.Format != "W" && Optional.IsDefined(ProblemClassificationId)) + { + writer.WritePropertyName("problemClassificationId"u8); + writer.WriteStringValue(ProblemClassificationId); + } + writer.WritePropertyName("relatedService"u8); + writer.WriteStartObject(); + if (options.Format != "W" && Optional.IsDefined(RelatedServiceId)) + { + writer.WritePropertyName("serviceId"u8); + writer.WriteStringValue(RelatedServiceId); + } + if (options.Format != "W" && Optional.IsDefined(DisplayName)) + { + writer.WritePropertyName("displayName"u8); + writer.WriteStringValue(DisplayName); + } + if (Optional.IsCollectionDefined(ResourceTypes)) + { + writer.WritePropertyName("resourceTypes"u8); + writer.WriteStartArray(); + foreach (var item in ResourceTypes) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + writer.WriteEndObject(); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ServiceProblemClassificationResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ServiceProblemClassificationResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeServiceProblemClassificationResult(document.RootElement, options); + } + + internal static ServiceProblemClassificationResult DeserializeServiceProblemClassificationResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string problemId = default; + string title = default; + string description = default; + ResourceIdentifier serviceId = default; + string problemClassificationId = default; + ResourceIdentifier serviceId0 = default; + string displayName = default; + IReadOnlyList resourceTypes = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("problemId"u8)) + { + problemId = property.Value.GetString(); + continue; + } + if (property.NameEquals("title"u8)) + { + title = property.Value.GetString(); + continue; + } + if (property.NameEquals("description"u8)) + { + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("serviceId"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null || property.Value.ValueKind == JsonValueKind.String && property.Value.GetString().Length == 0) + { + continue; + } + serviceId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("problemClassificationId"u8)) + { + problemClassificationId = property.Value.GetString(); + continue; + } + if (property.NameEquals("relatedService"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("serviceId"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null || property0.Value.ValueKind == JsonValueKind.String && property0.Value.GetString().Length == 0) + { + continue; + } + serviceId0 = new ResourceIdentifier(property0.Value.GetString()); + continue; + } + if (property0.NameEquals("displayName"u8)) + { + displayName = property0.Value.GetString(); + continue; + } + if (property0.NameEquals("resourceTypes"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property0.Value.EnumerateArray()) + { + array.Add(new ResourceType(item.GetString())); + } + resourceTypes = array; + continue; + } + } + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ServiceProblemClassificationResult( + problemId, + title, + description, + serviceId, + problemClassificationId, + serviceId0, + displayName, + resourceTypes ?? 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(ServiceProblemClassificationResult)} does not support writing '{options.Format}' format."); + } + } + + ServiceProblemClassificationResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeServiceProblemClassificationResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ServiceProblemClassificationResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/support/Azure.ResourceManager.Support/src/Generated/Models/ServiceProblemClassificationResult.cs b/sdk/support/Azure.ResourceManager.Support/src/Generated/Models/ServiceProblemClassificationResult.cs new file mode 100644 index 000000000000..b7a14c2a9d82 --- /dev/null +++ b/sdk/support/Azure.ResourceManager.Support/src/Generated/Models/ServiceProblemClassificationResult.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; +using Azure.Core; + +namespace Azure.ResourceManager.Support.Models +{ + /// ProblemClassification Classification result object. + public partial class ServiceProblemClassificationResult + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal ServiceProblemClassificationResult() + { + ResourceTypes = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// Identifier that may be used for solution discovery or some other purposes. + /// Title of the problem classification result. + /// Description of the problem classification result. + /// Identifier of the service associated with this problem classification result. + /// Identifier that may be used for support ticket creation. + /// Azure resource Id of the service. + /// Localized name of the azure service. + /// List of applicable ARM resource types for this service. + /// Keeps track of any properties unknown to the library. + internal ServiceProblemClassificationResult(string problemId, string title, string description, ResourceIdentifier serviceId, string problemClassificationId, ResourceIdentifier relatedServiceId, string displayName, IReadOnlyList resourceTypes, IDictionary serializedAdditionalRawData) + { + ProblemId = problemId; + Title = title; + Description = description; + ServiceId = serviceId; + ProblemClassificationId = problemClassificationId; + RelatedServiceId = relatedServiceId; + DisplayName = displayName; + ResourceTypes = resourceTypes; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Identifier that may be used for solution discovery or some other purposes. + public string ProblemId { get; } + /// Title of the problem classification result. + public string Title { get; } + /// Description of the problem classification result. + public string Description { get; } + /// Identifier of the service associated with this problem classification result. + public ResourceIdentifier ServiceId { get; } + /// Identifier that may be used for support ticket creation. + public string ProblemClassificationId { get; } + /// Azure resource Id of the service. + public ResourceIdentifier RelatedServiceId { get; } + /// Localized name of the azure service. + public string DisplayName { get; } + /// List of applicable ARM resource types for this service. + public IReadOnlyList ResourceTypes { get; } + } +} diff --git a/sdk/support/Azure.ResourceManager.Support/src/Generated/Models/SupportContactProfile.cs b/sdk/support/Azure.ResourceManager.Support/src/Generated/Models/SupportContactProfile.cs index 22b32db63db0..d725d03fd6f9 100644 --- a/sdk/support/Azure.ResourceManager.Support/src/Generated/Models/SupportContactProfile.cs +++ b/sdk/support/Azure.ResourceManager.Support/src/Generated/Models/SupportContactProfile.cs @@ -79,7 +79,7 @@ public SupportContactProfile(string firstName, string lastName, PreferredContact /// Preferred contact method. /// Primary email address. /// Additional email addresses listed will be copied on any correspondence about the support ticket. - /// Phone number. This is required if preferred contact method is phone. + /// Phone number. This is required if preferred contact method is phone. It is also required when submitting 'critical' or 'highestcriticalimpact' severity cases. /// Time zone of the user. This is the name of the time zone from [Microsoft Time Zone Index Values](https://support.microsoft.com/help/973627/microsoft-time-zone-index-values). /// Country of the user. This is the ISO 3166-1 alpha-3 code. /// Preferred language of support from Azure. Support languages vary based on the severity you choose for your support ticket. Learn more at [Azure Severity and responsiveness](https://azure.microsoft.com/support/plans/response). Use the standard language-country code. Valid values are 'en-us' for English, 'zh-hans' for Chinese, 'es-es' for Spanish, 'fr-fr' for French, 'ja-jp' for Japanese, 'ko-kr' for Korean, 'ru-ru' for Russian, 'pt-br' for Portuguese, 'it-it' for Italian, 'zh-tw' for Chinese and 'de-de' for German. @@ -113,7 +113,7 @@ internal SupportContactProfile() public string PrimaryEmailAddress { get; set; } /// Additional email addresses listed will be copied on any correspondence about the support ticket. public IList AdditionalEmailAddresses { get; } - /// Phone number. This is required if preferred contact method is phone. + /// Phone number. This is required if preferred contact method is phone. It is also required when submitting 'critical' or 'highestcriticalimpact' severity cases. public string PhoneNumber { get; set; } /// Time zone of the user. This is the name of the time zone from [Microsoft Time Zone Index Values](https://support.microsoft.com/help/973627/microsoft-time-zone-index-values). public string PreferredTimeZone { get; set; } diff --git a/sdk/support/Azure.ResourceManager.Support/src/Generated/Models/SupportContactProfileContent.cs b/sdk/support/Azure.ResourceManager.Support/src/Generated/Models/SupportContactProfileContent.cs index 645d37724cf7..193ee62baf74 100644 --- a/sdk/support/Azure.ResourceManager.Support/src/Generated/Models/SupportContactProfileContent.cs +++ b/sdk/support/Azure.ResourceManager.Support/src/Generated/Models/SupportContactProfileContent.cs @@ -57,7 +57,7 @@ public SupportContactProfileContent() /// Preferred contact method. /// Primary email address. /// Email addresses listed will be copied on any correspondence about the support ticket. - /// Phone number. This is required if preferred contact method is phone. + /// Phone number. This is required if preferred contact method is phone. It is also required when submitting 'critical' or 'highestcriticalimpact' severity cases. /// Time zone of the user. This is the name of the time zone from [Microsoft Time Zone Index Values](https://support.microsoft.com/help/973627/microsoft-time-zone-index-values). /// Country of the user. This is the ISO 3166-1 alpha-3 code. /// Preferred language of support from Azure. Support languages vary based on the severity you choose for your support ticket. Learn more at [Azure Severity and responsiveness](https://azure.microsoft.com/support/plans/response/). Use the standard language-country code. Valid values are 'en-us' for English, 'zh-hans' for Chinese, 'es-es' for Spanish, 'fr-fr' for French, 'ja-jp' for Japanese, 'ko-kr' for Korean, 'ru-ru' for Russian, 'pt-br' for Portuguese, 'it-it' for Italian, 'zh-tw' for Chinese and 'de-de' for German. @@ -86,7 +86,7 @@ internal SupportContactProfileContent(string firstName, string lastName, Preferr public string PrimaryEmailAddress { get; set; } /// Email addresses listed will be copied on any correspondence about the support ticket. public IList AdditionalEmailAddresses { get; } - /// Phone number. This is required if preferred contact method is phone. + /// Phone number. This is required if preferred contact method is phone. It is also required when submitting 'critical' or 'highestcriticalimpact' severity cases. public string PhoneNumber { get; set; } /// Time zone of the user. This is the name of the time zone from [Microsoft Time Zone Index Values](https://support.microsoft.com/help/973627/microsoft-time-zone-index-values). public string PreferredTimeZone { get; set; } diff --git a/sdk/support/Azure.ResourceManager.Support/src/Generated/Models/SupportResourceTypeName.cs b/sdk/support/Azure.ResourceManager.Support/src/Generated/Models/SupportResourceTypeName.cs new file mode 100644 index 000000000000..953a4782e1e9 --- /dev/null +++ b/sdk/support/Azure.ResourceManager.Support/src/Generated/Models/SupportResourceTypeName.cs @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.Support.Models +{ + /// The type of resource. + public readonly partial struct SupportResourceTypeName : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public SupportResourceTypeName(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string MicrosoftSupportSupportTicketsValue = "Microsoft.Support/supportTickets"; + + /// Microsoft.Support/supportTickets. + public static SupportResourceTypeName MicrosoftSupportSupportTickets { get; } = new SupportResourceTypeName(MicrosoftSupportSupportTicketsValue); + /// Determines if two values are the same. + public static bool operator ==(SupportResourceTypeName left, SupportResourceTypeName right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(SupportResourceTypeName left, SupportResourceTypeName right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator SupportResourceTypeName(string value) => new SupportResourceTypeName(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is SupportResourceTypeName other && Equals(other); + /// + public bool Equals(SupportResourceTypeName 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/support/Azure.ResourceManager.Support/src/Generated/Models/UpdateSupportTicket.cs b/sdk/support/Azure.ResourceManager.Support/src/Generated/Models/UpdateSupportTicket.cs index 360a8e225223..dfc25c290b6a 100644 --- a/sdk/support/Azure.ResourceManager.Support/src/Generated/Models/UpdateSupportTicket.cs +++ b/sdk/support/Azure.ResourceManager.Support/src/Generated/Models/UpdateSupportTicket.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.Support.Models { - /// Updates severity, ticket status, contact details, advanced diagnostic consent and secondary consent in the support ticket. + /// Updates severity, ticket status, and contact details in the support ticket. public partial class UpdateSupportTicket { /// diff --git a/sdk/support/Azure.ResourceManager.Support/src/Generated/ProblemClassificationCollection.cs b/sdk/support/Azure.ResourceManager.Support/src/Generated/ProblemClassificationCollection.cs index 5e678671d6dc..ec94ae3002c2 100644 --- a/sdk/support/Azure.ResourceManager.Support/src/Generated/ProblemClassificationCollection.cs +++ b/sdk/support/Azure.ResourceManager.Support/src/Generated/ProblemClassificationCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -109,7 +109,7 @@ public virtual async Task> GetAsync(stri /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -154,7 +154,7 @@ public virtual Response Get(string problemClassif /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -183,7 +183,7 @@ public virtual AsyncPageable GetAllAsync(Cancella /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -212,7 +212,7 @@ public virtual Pageable GetAll(CancellationToken /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -255,7 +255,7 @@ public virtual async Task> ExistsAsync(string problemClassificati /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -298,7 +298,7 @@ public virtual Response Exists(string problemClassificationName, Cancellat /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -343,7 +343,7 @@ public virtual async Task> GetIf /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource diff --git a/sdk/support/Azure.ResourceManager.Support/src/Generated/ProblemClassificationData.Serialization.cs b/sdk/support/Azure.ResourceManager.Support/src/Generated/ProblemClassificationData.Serialization.cs index 39b2e1b4bd9a..430ccf05a886 100644 --- a/sdk/support/Azure.ResourceManager.Support/src/Generated/ProblemClassificationData.Serialization.cs +++ b/sdk/support/Azure.ResourceManager.Support/src/Generated/ProblemClassificationData.Serialization.cs @@ -54,6 +54,22 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri } writer.WriteEndArray(); } + if (options.Format != "W" && Optional.IsCollectionDefined(Metadata)) + { + writer.WritePropertyName("metadata"u8); + writer.WriteStartObject(); + foreach (var item in Metadata) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + if (Optional.IsDefined(ParentProblemClassification)) + { + writer.WritePropertyName("parentProblemClassification"u8); + writer.WriteObjectValue(ParentProblemClassification, options); + } writer.WriteEndObject(); } @@ -83,6 +99,8 @@ internal static ProblemClassificationData DeserializeProblemClassificationData(J SystemData systemData = default; string displayName = default; IReadOnlyList secondaryConsentEnabled = default; + IReadOnlyDictionary metadata = default; + ProblemClassificationData parentProblemClassification = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -139,6 +157,29 @@ internal static ProblemClassificationData DeserializeProblemClassificationData(J secondaryConsentEnabled = array; continue; } + if (property0.NameEquals("metadata"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property1 in property0.Value.EnumerateObject()) + { + dictionary.Add(property1.Name, property1.Value.GetString()); + } + metadata = dictionary; + continue; + } + if (property0.NameEquals("parentProblemClassification"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + parentProblemClassification = DeserializeProblemClassificationData(property0.Value, options); + continue; + } } continue; } @@ -155,6 +196,8 @@ internal static ProblemClassificationData DeserializeProblemClassificationData(J systemData, displayName, secondaryConsentEnabled ?? new ChangeTrackingList(), + metadata ?? new ChangeTrackingDictionary(), + parentProblemClassification, serializedAdditionalRawData); } diff --git a/sdk/support/Azure.ResourceManager.Support/src/Generated/ProblemClassificationData.cs b/sdk/support/Azure.ResourceManager.Support/src/Generated/ProblemClassificationData.cs index 426da075e1e3..acaf6a8a5994 100644 --- a/sdk/support/Azure.ResourceManager.Support/src/Generated/ProblemClassificationData.cs +++ b/sdk/support/Azure.ResourceManager.Support/src/Generated/ProblemClassificationData.cs @@ -55,6 +55,7 @@ public partial class ProblemClassificationData : ResourceData internal ProblemClassificationData() { SecondaryConsentEnabled = new ChangeTrackingList(); + Metadata = new ChangeTrackingDictionary(); } /// Initializes a new instance of . @@ -64,11 +65,15 @@ internal ProblemClassificationData() /// The systemData. /// Localized name of problem classification. /// This property indicates whether secondary consent is present for problem classification. + /// String-to-string dictionary for additional metadata. + /// Reference to the parent problem classification which has same structure as problem classification. /// Keeps track of any properties unknown to the library. - internal ProblemClassificationData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, string displayName, IReadOnlyList secondaryConsentEnabled, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + internal ProblemClassificationData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, string displayName, IReadOnlyList secondaryConsentEnabled, IReadOnlyDictionary metadata, ProblemClassificationData parentProblemClassification, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) { DisplayName = displayName; SecondaryConsentEnabled = secondaryConsentEnabled; + Metadata = metadata; + ParentProblemClassification = parentProblemClassification; _serializedAdditionalRawData = serializedAdditionalRawData; } @@ -76,5 +81,9 @@ internal ProblemClassificationData(ResourceIdentifier id, string name, ResourceT public string DisplayName { get; } /// This property indicates whether secondary consent is present for problem classification. public IReadOnlyList SecondaryConsentEnabled { get; } + /// String-to-string dictionary for additional metadata. + public IReadOnlyDictionary Metadata { get; } + /// Reference to the parent problem classification which has same structure as problem classification. + public ProblemClassificationData ParentProblemClassification { get; } } } diff --git a/sdk/support/Azure.ResourceManager.Support/src/Generated/ProblemClassificationResource.cs b/sdk/support/Azure.ResourceManager.Support/src/Generated/ProblemClassificationResource.cs index c77d5efa7c7d..216d92b0e363 100644 --- a/sdk/support/Azure.ResourceManager.Support/src/Generated/ProblemClassificationResource.cs +++ b/sdk/support/Azure.ResourceManager.Support/src/Generated/ProblemClassificationResource.cs @@ -99,7 +99,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -139,7 +139,7 @@ public virtual async Task> GetAsync(Canc /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource diff --git a/sdk/support/Azure.ResourceManager.Support/src/Generated/RestOperations/ChatTranscriptsNoSubscriptionRestOperations.cs b/sdk/support/Azure.ResourceManager.Support/src/Generated/RestOperations/ChatTranscriptsNoSubscriptionRestOperations.cs index ded8caa5101b..4d97c5702c79 100644 --- a/sdk/support/Azure.ResourceManager.Support/src/Generated/RestOperations/ChatTranscriptsNoSubscriptionRestOperations.cs +++ b/sdk/support/Azure.ResourceManager.Support/src/Generated/RestOperations/ChatTranscriptsNoSubscriptionRestOperations.cs @@ -32,7 +32,7 @@ public ChatTranscriptsNoSubscriptionRestOperations(HttpPipeline pipeline, string { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-04-01"; + _apiVersion = apiVersion ?? "2023-06-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/support/Azure.ResourceManager.Support/src/Generated/RestOperations/ChatTranscriptsRestOperations.cs b/sdk/support/Azure.ResourceManager.Support/src/Generated/RestOperations/ChatTranscriptsRestOperations.cs index 2008ee3607f9..ae8ca39a6347 100644 --- a/sdk/support/Azure.ResourceManager.Support/src/Generated/RestOperations/ChatTranscriptsRestOperations.cs +++ b/sdk/support/Azure.ResourceManager.Support/src/Generated/RestOperations/ChatTranscriptsRestOperations.cs @@ -32,7 +32,7 @@ public ChatTranscriptsRestOperations(HttpPipeline pipeline, string applicationId { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-04-01"; + _apiVersion = apiVersion ?? "2023-06-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/support/Azure.ResourceManager.Support/src/Generated/RestOperations/CommunicationsNoSubscriptionRestOperations.cs b/sdk/support/Azure.ResourceManager.Support/src/Generated/RestOperations/CommunicationsNoSubscriptionRestOperations.cs index 0ff2d48f1ffc..1386f752036b 100644 --- a/sdk/support/Azure.ResourceManager.Support/src/Generated/RestOperations/CommunicationsNoSubscriptionRestOperations.cs +++ b/sdk/support/Azure.ResourceManager.Support/src/Generated/RestOperations/CommunicationsNoSubscriptionRestOperations.cs @@ -32,7 +32,7 @@ public CommunicationsNoSubscriptionRestOperations(HttpPipeline pipeline, string { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-04-01"; + _apiVersion = apiVersion ?? "2023-06-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/support/Azure.ResourceManager.Support/src/Generated/RestOperations/CommunicationsRestOperations.cs b/sdk/support/Azure.ResourceManager.Support/src/Generated/RestOperations/CommunicationsRestOperations.cs index a3369a4f26b9..fb96ab0220c1 100644 --- a/sdk/support/Azure.ResourceManager.Support/src/Generated/RestOperations/CommunicationsRestOperations.cs +++ b/sdk/support/Azure.ResourceManager.Support/src/Generated/RestOperations/CommunicationsRestOperations.cs @@ -32,7 +32,7 @@ public CommunicationsRestOperations(HttpPipeline pipeline, string applicationId, { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-04-01"; + _apiVersion = apiVersion ?? "2023-06-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/support/Azure.ResourceManager.Support/src/Generated/RestOperations/FileWorkspacesNoSubscriptionRestOperations.cs b/sdk/support/Azure.ResourceManager.Support/src/Generated/RestOperations/FileWorkspacesNoSubscriptionRestOperations.cs index 943d29e8c3b3..b416139e9968 100644 --- a/sdk/support/Azure.ResourceManager.Support/src/Generated/RestOperations/FileWorkspacesNoSubscriptionRestOperations.cs +++ b/sdk/support/Azure.ResourceManager.Support/src/Generated/RestOperations/FileWorkspacesNoSubscriptionRestOperations.cs @@ -31,7 +31,7 @@ public FileWorkspacesNoSubscriptionRestOperations(HttpPipeline pipeline, string { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-04-01"; + _apiVersion = apiVersion ?? "2023-06-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/support/Azure.ResourceManager.Support/src/Generated/RestOperations/FileWorkspacesRestOperations.cs b/sdk/support/Azure.ResourceManager.Support/src/Generated/RestOperations/FileWorkspacesRestOperations.cs index 915bddf4eb83..fbc343788ccf 100644 --- a/sdk/support/Azure.ResourceManager.Support/src/Generated/RestOperations/FileWorkspacesRestOperations.cs +++ b/sdk/support/Azure.ResourceManager.Support/src/Generated/RestOperations/FileWorkspacesRestOperations.cs @@ -31,7 +31,7 @@ public FileWorkspacesRestOperations(HttpPipeline pipeline, string applicationId, { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-04-01"; + _apiVersion = apiVersion ?? "2023-06-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/support/Azure.ResourceManager.Support/src/Generated/RestOperations/FilesNoSubscriptionRestOperations.cs b/sdk/support/Azure.ResourceManager.Support/src/Generated/RestOperations/FilesNoSubscriptionRestOperations.cs index a107f20ab41d..5c07a2d9b49d 100644 --- a/sdk/support/Azure.ResourceManager.Support/src/Generated/RestOperations/FilesNoSubscriptionRestOperations.cs +++ b/sdk/support/Azure.ResourceManager.Support/src/Generated/RestOperations/FilesNoSubscriptionRestOperations.cs @@ -32,7 +32,7 @@ public FilesNoSubscriptionRestOperations(HttpPipeline pipeline, string applicati { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-04-01"; + _apiVersion = apiVersion ?? "2023-06-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/support/Azure.ResourceManager.Support/src/Generated/RestOperations/FilesRestOperations.cs b/sdk/support/Azure.ResourceManager.Support/src/Generated/RestOperations/FilesRestOperations.cs index ba6429c7d0bd..75de4793a764 100644 --- a/sdk/support/Azure.ResourceManager.Support/src/Generated/RestOperations/FilesRestOperations.cs +++ b/sdk/support/Azure.ResourceManager.Support/src/Generated/RestOperations/FilesRestOperations.cs @@ -32,7 +32,7 @@ public FilesRestOperations(HttpPipeline pipeline, string applicationId, Uri endp { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-04-01"; + _apiVersion = apiVersion ?? "2023-06-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/support/Azure.ResourceManager.Support/src/Generated/RestOperations/LookUpResourceIdRestOperations.cs b/sdk/support/Azure.ResourceManager.Support/src/Generated/RestOperations/LookUpResourceIdRestOperations.cs new file mode 100644 index 000000000000..b3a48c32b685 --- /dev/null +++ b/sdk/support/Azure.ResourceManager.Support/src/Generated/RestOperations/LookUpResourceIdRestOperations.cs @@ -0,0 +1,115 @@ +// 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.Support.Models; + +namespace Azure.ResourceManager.Support +{ + internal partial class LookUpResourceIdRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of LookUpResourceIdRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// server parameter. + /// Api Version. + /// or is null. + public LookUpResourceIdRestOperations(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 ?? "2023-06-01-preview"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreatePostRequestUri(LookUpResourceIdContent content) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/providers/Microsoft.Support/lookUpResourceId", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreatePostRequest(LookUpResourceIdContent content) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/providers/Microsoft.Support/lookUpResourceId", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content0 = new Utf8JsonRequestContent(); + content0.JsonWriter.WriteObjectValue(content, ModelSerializationExtensions.WireOptions); + request.Content = content0; + _userAgent.Apply(message); + return message; + } + + /// This operation fetches ARM resource id of support resource type. + /// Look up resource id request body. + /// The cancellation token to use. + /// is null. + public async Task> PostAsync(LookUpResourceIdContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(content, nameof(content)); + + using var message = CreatePostRequest(content); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + LookUpResourceIdResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = LookUpResourceIdResult.DeserializeLookUpResourceIdResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// This operation fetches ARM resource id of support resource type. + /// Look up resource id request body. + /// The cancellation token to use. + /// is null. + public Response Post(LookUpResourceIdContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(content, nameof(content)); + + using var message = CreatePostRequest(content); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + LookUpResourceIdResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = LookUpResourceIdResult.DeserializeLookUpResourceIdResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/support/Azure.ResourceManager.Support/src/Generated/RestOperations/ProblemClassificationsNoSubscriptionRestOperations.cs b/sdk/support/Azure.ResourceManager.Support/src/Generated/RestOperations/ProblemClassificationsNoSubscriptionRestOperations.cs new file mode 100644 index 000000000000..edd893ef9db3 --- /dev/null +++ b/sdk/support/Azure.ResourceManager.Support/src/Generated/RestOperations/ProblemClassificationsNoSubscriptionRestOperations.cs @@ -0,0 +1,125 @@ +// 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.Support.Models; + +namespace Azure.ResourceManager.Support +{ + internal partial class ProblemClassificationsNoSubscriptionRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of ProblemClassificationsNoSubscriptionRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// server parameter. + /// Api Version. + /// or is null. + public ProblemClassificationsNoSubscriptionRestOperations(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 ?? "2023-06-01-preview"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateClassifyProblemsRequestUri(string problemServiceName, ServiceProblemClassificationContent content) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/providers/Microsoft.Support/services/", false); + uri.AppendPath(problemServiceName, true); + uri.AppendPath("/classifyProblems", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateClassifyProblemsRequest(string problemServiceName, ServiceProblemClassificationContent content) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/providers/Microsoft.Support/services/", false); + uri.AppendPath(problemServiceName, true); + uri.AppendPath("/classifyProblems", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content0 = new Utf8JsonRequestContent(); + content0.JsonWriter.WriteObjectValue(content, ModelSerializationExtensions.WireOptions); + request.Content = content0; + _userAgent.Apply(message); + return message; + } + + /// Classify the right problem classifications (categories) available for a specific Azure service. + /// Name of the Azure service for which the problem classifications need to be retrieved. + /// Input to check. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + public async Task> ClassifyProblemsAsync(string problemServiceName, ServiceProblemClassificationContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(problemServiceName, nameof(problemServiceName)); + Argument.AssertNotNull(content, nameof(content)); + + using var message = CreateClassifyProblemsRequest(problemServiceName, content); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ServiceProblemClassificationListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = ServiceProblemClassificationListResult.DeserializeServiceProblemClassificationListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Classify the right problem classifications (categories) available for a specific Azure service. + /// Name of the Azure service for which the problem classifications need to be retrieved. + /// Input to check. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + public Response ClassifyProblems(string problemServiceName, ServiceProblemClassificationContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(problemServiceName, nameof(problemServiceName)); + Argument.AssertNotNull(content, nameof(content)); + + using var message = CreateClassifyProblemsRequest(problemServiceName, content); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ServiceProblemClassificationListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = ServiceProblemClassificationListResult.DeserializeServiceProblemClassificationListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/support/Azure.ResourceManager.Support/src/Generated/RestOperations/ProblemClassificationsRestOperations.cs b/sdk/support/Azure.ResourceManager.Support/src/Generated/RestOperations/ProblemClassificationsRestOperations.cs index 58bdb8d2f269..099a0f789105 100644 --- a/sdk/support/Azure.ResourceManager.Support/src/Generated/RestOperations/ProblemClassificationsRestOperations.cs +++ b/sdk/support/Azure.ResourceManager.Support/src/Generated/RestOperations/ProblemClassificationsRestOperations.cs @@ -32,10 +32,104 @@ public ProblemClassificationsRestOperations(HttpPipeline pipeline, string applic { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-04-01"; + _apiVersion = apiVersion ?? "2023-06-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } + internal RequestUriBuilder CreateClassifyProblemsRequestUri(string subscriptionId, string problemServiceName, ServiceProblemClassificationContent content) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Microsoft.Support/services/", false); + uri.AppendPath(problemServiceName, true); + uri.AppendPath("/classifyProblems", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateClassifyProblemsRequest(string subscriptionId, string problemServiceName, ServiceProblemClassificationContent content) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Microsoft.Support/services/", false); + uri.AppendPath(problemServiceName, true); + uri.AppendPath("/classifyProblems", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content0 = new Utf8JsonRequestContent(); + content0.JsonWriter.WriteObjectValue(content, ModelSerializationExtensions.WireOptions); + request.Content = content0; + _userAgent.Apply(message); + return message; + } + + /// Classify the right problem classifications (categories) available for a specific Azure service. + /// The ID of the target subscription. The value must be an UUID. + /// Name of the Azure service for which the problem classifications need to be retrieved. + /// Input to check. + /// The cancellation token to use. + /// , or is null. + /// or is an empty string, and was expected to be non-empty. + public async Task> ClassifyProblemsAsync(string subscriptionId, string problemServiceName, ServiceProblemClassificationContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(problemServiceName, nameof(problemServiceName)); + Argument.AssertNotNull(content, nameof(content)); + + using var message = CreateClassifyProblemsRequest(subscriptionId, problemServiceName, content); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ServiceProblemClassificationListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = ServiceProblemClassificationListResult.DeserializeServiceProblemClassificationListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Classify the right problem classifications (categories) available for a specific Azure service. + /// The ID of the target subscription. The value must be an UUID. + /// Name of the Azure service for which the problem classifications need to be retrieved. + /// Input to check. + /// The cancellation token to use. + /// , or is null. + /// or is an empty string, and was expected to be non-empty. + public Response ClassifyProblems(string subscriptionId, string problemServiceName, ServiceProblemClassificationContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(problemServiceName, nameof(problemServiceName)); + Argument.AssertNotNull(content, nameof(content)); + + using var message = CreateClassifyProblemsRequest(subscriptionId, problemServiceName, content); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ServiceProblemClassificationListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = ServiceProblemClassificationListResult.DeserializeServiceProblemClassificationListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + internal RequestUriBuilder CreateListRequestUri(string serviceName) { var uri = new RawRequestUriBuilder(); @@ -145,7 +239,7 @@ internal HttpMessage CreateGetRequest(string serviceName, string problemClassifi } /// Get problem classification details for a specific Azure service. - /// Name of the Azure service available for support. + /// Name of the Azure service for which the problem classifications need to be retrieved. /// Name of problem classification. /// The cancellation token to use. /// or is null. @@ -174,7 +268,7 @@ public async Task> GetAsync(string serviceNa } /// Get problem classification details for a specific Azure service. - /// Name of the Azure service available for support. + /// Name of the Azure service for which the problem classifications need to be retrieved. /// Name of problem classification. /// The cancellation token to use. /// or is null. diff --git a/sdk/support/Azure.ResourceManager.Support/src/Generated/RestOperations/ServiceClassificationsNoSubscriptionRestOperations.cs b/sdk/support/Azure.ResourceManager.Support/src/Generated/RestOperations/ServiceClassificationsNoSubscriptionRestOperations.cs new file mode 100644 index 000000000000..db9242510ea9 --- /dev/null +++ b/sdk/support/Azure.ResourceManager.Support/src/Generated/RestOperations/ServiceClassificationsNoSubscriptionRestOperations.cs @@ -0,0 +1,115 @@ +// 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.Support.Models; + +namespace Azure.ResourceManager.Support +{ + internal partial class ServiceClassificationsNoSubscriptionRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of ServiceClassificationsNoSubscriptionRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// server parameter. + /// Api Version. + /// or is null. + public ServiceClassificationsNoSubscriptionRestOperations(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 ?? "2023-06-01-preview"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateClassifyServicesRequestUri(ServiceClassificationContent content) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/providers/Microsoft.Support/classifyServices", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateClassifyServicesRequest(ServiceClassificationContent content) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/providers/Microsoft.Support/classifyServices", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content0 = new Utf8JsonRequestContent(); + content0.JsonWriter.WriteObjectValue(content, ModelSerializationExtensions.WireOptions); + request.Content = content0; + _userAgent.Apply(message); + return message; + } + + /// Classify the list of right Azure services. + /// Input to check. + /// The cancellation token to use. + /// is null. + public async Task> ClassifyServicesAsync(ServiceClassificationContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(content, nameof(content)); + + using var message = CreateClassifyServicesRequest(content); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ServiceClassificationOutput value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = ServiceClassificationOutput.DeserializeServiceClassificationOutput(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Classify the list of right Azure services. + /// Input to check. + /// The cancellation token to use. + /// is null. + public Response ClassifyServices(ServiceClassificationContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(content, nameof(content)); + + using var message = CreateClassifyServicesRequest(content); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ServiceClassificationOutput value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = ServiceClassificationOutput.DeserializeServiceClassificationOutput(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/support/Azure.ResourceManager.Support/src/Generated/RestOperations/ServiceClassificationsRestOperations.cs b/sdk/support/Azure.ResourceManager.Support/src/Generated/RestOperations/ServiceClassificationsRestOperations.cs new file mode 100644 index 000000000000..a1e7525f9001 --- /dev/null +++ b/sdk/support/Azure.ResourceManager.Support/src/Generated/RestOperations/ServiceClassificationsRestOperations.cs @@ -0,0 +1,125 @@ +// 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.Support.Models; + +namespace Azure.ResourceManager.Support +{ + internal partial class ServiceClassificationsRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of ServiceClassificationsRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// server parameter. + /// Api Version. + /// or is null. + public ServiceClassificationsRestOperations(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 ?? "2023-06-01-preview"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateClassifyServicesRequestUri(string subscriptionId, ServiceClassificationContent content) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Microsoft.Support/classifyServices", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateClassifyServicesRequest(string subscriptionId, ServiceClassificationContent content) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Microsoft.Support/classifyServices", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content0 = new Utf8JsonRequestContent(); + content0.JsonWriter.WriteObjectValue(content, ModelSerializationExtensions.WireOptions); + request.Content = content0; + _userAgent.Apply(message); + return message; + } + + /// Classify the list of right Azure services. + /// The ID of the target subscription. The value must be an UUID. + /// Input to check. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + public async Task> ClassifyServicesAsync(string subscriptionId, ServiceClassificationContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNull(content, nameof(content)); + + using var message = CreateClassifyServicesRequest(subscriptionId, content); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ServiceClassificationOutput value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = ServiceClassificationOutput.DeserializeServiceClassificationOutput(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Classify the list of right Azure services. + /// The ID of the target subscription. The value must be an UUID. + /// Input to check. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + public Response ClassifyServices(string subscriptionId, ServiceClassificationContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNull(content, nameof(content)); + + using var message = CreateClassifyServicesRequest(subscriptionId, content); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ServiceClassificationOutput value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = ServiceClassificationOutput.DeserializeServiceClassificationOutput(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/support/Azure.ResourceManager.Support/src/Generated/RestOperations/ServicesRestOperations.cs b/sdk/support/Azure.ResourceManager.Support/src/Generated/RestOperations/ServicesRestOperations.cs index 03cb614db2b4..808e6e67adce 100644 --- a/sdk/support/Azure.ResourceManager.Support/src/Generated/RestOperations/ServicesRestOperations.cs +++ b/sdk/support/Azure.ResourceManager.Support/src/Generated/RestOperations/ServicesRestOperations.cs @@ -32,7 +32,7 @@ public ServicesRestOperations(HttpPipeline pipeline, string applicationId, Uri e { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-04-01"; + _apiVersion = apiVersion ?? "2023-06-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -127,7 +127,7 @@ internal HttpMessage CreateGetRequest(string serviceName) } /// Gets a specific Azure service for support ticket creation. - /// Name of the Azure service. + /// Name of the Azure service for which the problem classifications need to be retrieved. /// The cancellation token to use. /// is null. /// is an empty string, and was expected to be non-empty. @@ -154,7 +154,7 @@ public async Task> GetAsync(string serviceName } /// Gets a specific Azure service for support ticket creation. - /// Name of the Azure service. + /// Name of the Azure service for which the problem classifications need to be retrieved. /// The cancellation token to use. /// is null. /// is an empty string, and was expected to be non-empty. diff --git a/sdk/support/Azure.ResourceManager.Support/src/Generated/RestOperations/SupportTicketsNoSubscriptionRestOperations.cs b/sdk/support/Azure.ResourceManager.Support/src/Generated/RestOperations/SupportTicketsNoSubscriptionRestOperations.cs index 813d8cc13959..93ada9244d09 100644 --- a/sdk/support/Azure.ResourceManager.Support/src/Generated/RestOperations/SupportTicketsNoSubscriptionRestOperations.cs +++ b/sdk/support/Azure.ResourceManager.Support/src/Generated/RestOperations/SupportTicketsNoSubscriptionRestOperations.cs @@ -32,7 +32,7 @@ public SupportTicketsNoSubscriptionRestOperations(HttpPipeline pipeline, string { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-04-01"; + _apiVersion = apiVersion ?? "2023-06-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/support/Azure.ResourceManager.Support/src/Generated/RestOperations/SupportTicketsRestOperations.cs b/sdk/support/Azure.ResourceManager.Support/src/Generated/RestOperations/SupportTicketsRestOperations.cs index a780c6838bd7..c105d2f8cd2c 100644 --- a/sdk/support/Azure.ResourceManager.Support/src/Generated/RestOperations/SupportTicketsRestOperations.cs +++ b/sdk/support/Azure.ResourceManager.Support/src/Generated/RestOperations/SupportTicketsRestOperations.cs @@ -32,7 +32,7 @@ public SupportTicketsRestOperations(HttpPipeline pipeline, string applicationId, { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-04-01"; + _apiVersion = apiVersion ?? "2023-06-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/support/Azure.ResourceManager.Support/src/Generated/SubscriptionFileWorkspaceCollection.cs b/sdk/support/Azure.ResourceManager.Support/src/Generated/SubscriptionFileWorkspaceCollection.cs index 31b0cd2b481c..64022de9e61a 100644 --- a/sdk/support/Azure.ResourceManager.Support/src/Generated/SubscriptionFileWorkspaceCollection.cs +++ b/sdk/support/Azure.ResourceManager.Support/src/Generated/SubscriptionFileWorkspaceCollection.cs @@ -62,7 +62,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -111,7 +111,7 @@ public virtual async Task> Creat /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -160,7 +160,7 @@ public virtual ArmOperation CreateOrUpdate(Wa /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -205,7 +205,7 @@ public virtual async Task> GetAsync( /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -250,7 +250,7 @@ public virtual Response Get(string fileWorksp /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -293,7 +293,7 @@ public virtual async Task> ExistsAsync(string fileWorkspaceName, /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -336,7 +336,7 @@ public virtual Response Exists(string fileWorkspaceName, CancellationToken /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -381,7 +381,7 @@ public virtual async Task> G /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource diff --git a/sdk/support/Azure.ResourceManager.Support/src/Generated/SubscriptionFileWorkspaceResource.cs b/sdk/support/Azure.ResourceManager.Support/src/Generated/SubscriptionFileWorkspaceResource.cs index a5d4c5dd5b7a..e93f071e89e1 100644 --- a/sdk/support/Azure.ResourceManager.Support/src/Generated/SubscriptionFileWorkspaceResource.cs +++ b/sdk/support/Azure.ResourceManager.Support/src/Generated/SubscriptionFileWorkspaceResource.cs @@ -107,7 +107,7 @@ public virtual SupportTicketFileCollection GetSupportTicketFiles() /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -138,7 +138,7 @@ public virtual async Task> GetSupportTicketF /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -169,7 +169,7 @@ public virtual Response GetSupportTicketFile(string f /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -209,7 +209,7 @@ public virtual async Task> GetAsync( /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -249,7 +249,7 @@ public virtual Response Get(CancellationToken /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -293,7 +293,7 @@ public virtual async Task> Updat /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource diff --git a/sdk/support/Azure.ResourceManager.Support/src/Generated/SubscriptionSupportTicketCollection.cs b/sdk/support/Azure.ResourceManager.Support/src/Generated/SubscriptionSupportTicketCollection.cs index 0273ae0f655f..d4b7bdc35318 100644 --- a/sdk/support/Azure.ResourceManager.Support/src/Generated/SubscriptionSupportTicketCollection.cs +++ b/sdk/support/Azure.ResourceManager.Support/src/Generated/SubscriptionSupportTicketCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -114,7 +114,7 @@ public virtual async Task> Creat /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -163,7 +163,7 @@ public virtual ArmOperation CreateOrUpdate(Wa /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -208,7 +208,7 @@ public virtual async Task> GetAsync( /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -253,7 +253,7 @@ public virtual Response Get(string supportTic /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -285,7 +285,7 @@ public virtual AsyncPageable GetAllAsync(int? /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -317,7 +317,7 @@ public virtual Pageable GetAll(int? top = nul /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -360,7 +360,7 @@ public virtual async Task> ExistsAsync(string supportTicketName, /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -403,7 +403,7 @@ public virtual Response Exists(string supportTicketName, CancellationToken /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -448,7 +448,7 @@ public virtual async Task> G /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource diff --git a/sdk/support/Azure.ResourceManager.Support/src/Generated/SubscriptionSupportTicketResource.cs b/sdk/support/Azure.ResourceManager.Support/src/Generated/SubscriptionSupportTicketResource.cs index c899d282e939..b551e8ca3f48 100644 --- a/sdk/support/Azure.ResourceManager.Support/src/Generated/SubscriptionSupportTicketResource.cs +++ b/sdk/support/Azure.ResourceManager.Support/src/Generated/SubscriptionSupportTicketResource.cs @@ -113,7 +113,7 @@ public virtual SupportTicketCommunicationCollection GetSupportTicketCommunicatio /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -144,7 +144,7 @@ public virtual async Task> GetSuppo /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -182,7 +182,7 @@ public virtual SupportTicketChatTranscriptCollection GetSupportTicketChatTranscr /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -213,7 +213,7 @@ public virtual async Task> GetSupp /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -244,7 +244,7 @@ public virtual Response GetSupportTicketCha /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -284,7 +284,7 @@ public virtual async Task> GetAsync( /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -324,7 +324,7 @@ public virtual Response Get(CancellationToken /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -366,7 +366,7 @@ public virtual async Task> UpdateAsy /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -408,7 +408,7 @@ public virtual Response Update(UpdateSupportT /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -450,7 +450,7 @@ public virtual async Task> CheckCommunic /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource diff --git a/sdk/support/Azure.ResourceManager.Support/src/Generated/SupportAzureServiceCollection.cs b/sdk/support/Azure.ResourceManager.Support/src/Generated/SupportAzureServiceCollection.cs index 9c1bccf98e1f..5ea3c7c42534 100644 --- a/sdk/support/Azure.ResourceManager.Support/src/Generated/SupportAzureServiceCollection.cs +++ b/sdk/support/Azure.ResourceManager.Support/src/Generated/SupportAzureServiceCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -73,7 +73,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// - /// Name of the Azure service. + /// Name of the Azure service for which the problem classifications need to be retrieved. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. @@ -110,7 +110,7 @@ public virtual async Task> GetAsync(string /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -118,7 +118,7 @@ public virtual async Task> GetAsync(string /// /// /// - /// Name of the Azure service. + /// Name of the Azure service for which the problem classifications need to be retrieved. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. @@ -155,7 +155,7 @@ public virtual Response Get(string serviceName, Can /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -184,7 +184,7 @@ public virtual AsyncPageable GetAllAsync(Cancellati /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -213,7 +213,7 @@ public virtual Pageable GetAll(CancellationToken ca /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -221,7 +221,7 @@ public virtual Pageable GetAll(CancellationToken ca /// /// /// - /// Name of the Azure service. + /// Name of the Azure service for which the problem classifications need to be retrieved. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. @@ -256,7 +256,7 @@ public virtual async Task> ExistsAsync(string serviceName, Cancel /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -264,7 +264,7 @@ public virtual async Task> ExistsAsync(string serviceName, Cancel /// /// /// - /// Name of the Azure service. + /// Name of the Azure service for which the problem classifications need to be retrieved. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. @@ -299,7 +299,7 @@ public virtual Response Exists(string serviceName, CancellationToken cance /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -307,7 +307,7 @@ public virtual Response Exists(string serviceName, CancellationToken cance /// /// /// - /// Name of the Azure service. + /// Name of the Azure service for which the problem classifications need to be retrieved. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. @@ -344,7 +344,7 @@ public virtual async Task> GetIfEx /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -352,7 +352,7 @@ public virtual async Task> GetIfEx /// /// /// - /// Name of the Azure service. + /// Name of the Azure service for which the problem classifications need to be retrieved. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. diff --git a/sdk/support/Azure.ResourceManager.Support/src/Generated/SupportAzureServiceData.Serialization.cs b/sdk/support/Azure.ResourceManager.Support/src/Generated/SupportAzureServiceData.Serialization.cs index 35b3bba98e38..5d18d9a64f90 100644 --- a/sdk/support/Azure.ResourceManager.Support/src/Generated/SupportAzureServiceData.Serialization.cs +++ b/sdk/support/Azure.ResourceManager.Support/src/Generated/SupportAzureServiceData.Serialization.cs @@ -53,6 +53,17 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri } writer.WriteEndArray(); } + if (options.Format != "W" && Optional.IsCollectionDefined(Metadata)) + { + writer.WritePropertyName("metadata"u8); + writer.WriteStartObject(); + foreach (var item in Metadata) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } writer.WriteEndObject(); } @@ -82,6 +93,7 @@ internal static SupportAzureServiceData DeserializeSupportAzureServiceData(JsonE SystemData systemData = default; string displayName = default; IReadOnlyList resourceTypes = default; + IReadOnlyDictionary metadata = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -138,6 +150,20 @@ internal static SupportAzureServiceData DeserializeSupportAzureServiceData(JsonE resourceTypes = array; continue; } + if (property0.NameEquals("metadata"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property1 in property0.Value.EnumerateObject()) + { + dictionary.Add(property1.Name, property1.Value.GetString()); + } + metadata = dictionary; + continue; + } } continue; } @@ -154,6 +180,7 @@ internal static SupportAzureServiceData DeserializeSupportAzureServiceData(JsonE systemData, displayName, resourceTypes ?? new ChangeTrackingList(), + metadata ?? new ChangeTrackingDictionary(), serializedAdditionalRawData); } diff --git a/sdk/support/Azure.ResourceManager.Support/src/Generated/SupportAzureServiceData.cs b/sdk/support/Azure.ResourceManager.Support/src/Generated/SupportAzureServiceData.cs index 6fc3f05cc6e9..c0261220b2a8 100644 --- a/sdk/support/Azure.ResourceManager.Support/src/Generated/SupportAzureServiceData.cs +++ b/sdk/support/Azure.ResourceManager.Support/src/Generated/SupportAzureServiceData.cs @@ -54,6 +54,7 @@ public partial class SupportAzureServiceData : ResourceData internal SupportAzureServiceData() { ResourceTypes = new ChangeTrackingList(); + Metadata = new ChangeTrackingDictionary(); } /// Initializes a new instance of . @@ -63,11 +64,13 @@ internal SupportAzureServiceData() /// The systemData. /// Localized name of the Azure service. /// ARM Resource types. + /// Metadata about the service, only visible for 1P clients. /// Keeps track of any properties unknown to the library. - internal SupportAzureServiceData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, string displayName, IReadOnlyList resourceTypes, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + internal SupportAzureServiceData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, string displayName, IReadOnlyList resourceTypes, IReadOnlyDictionary metadata, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) { DisplayName = displayName; ResourceTypes = resourceTypes; + Metadata = metadata; _serializedAdditionalRawData = serializedAdditionalRawData; } @@ -75,5 +78,7 @@ internal SupportAzureServiceData(ResourceIdentifier id, string name, ResourceTyp public string DisplayName { get; } /// ARM Resource types. public IReadOnlyList ResourceTypes { get; } + /// Metadata about the service, only visible for 1P clients. + public IReadOnlyDictionary Metadata { get; } } } diff --git a/sdk/support/Azure.ResourceManager.Support/src/Generated/SupportAzureServiceResource.cs b/sdk/support/Azure.ResourceManager.Support/src/Generated/SupportAzureServiceResource.cs index e40a05014b6b..8f9f21e446f2 100644 --- a/sdk/support/Azure.ResourceManager.Support/src/Generated/SupportAzureServiceResource.cs +++ b/sdk/support/Azure.ResourceManager.Support/src/Generated/SupportAzureServiceResource.cs @@ -12,6 +12,7 @@ using Azure.Core; using Azure.Core.Pipeline; using Azure.ResourceManager.Resources; +using Azure.ResourceManager.Support.Models; namespace Azure.ResourceManager.Support { @@ -33,6 +34,8 @@ public static ResourceIdentifier CreateResourceIdentifier(string serviceName) private readonly ClientDiagnostics _supportAzureServiceServicesClientDiagnostics; private readonly ServicesRestOperations _supportAzureServiceServicesRestClient; + private readonly ClientDiagnostics _problemClassificationsNoSubscriptionClientDiagnostics; + private readonly ProblemClassificationsNoSubscriptionRestOperations _problemClassificationsNoSubscriptionRestClient; private readonly SupportAzureServiceData _data; /// Gets the resource type for the operations. @@ -60,6 +63,8 @@ internal SupportAzureServiceResource(ArmClient client, ResourceIdentifier id) : _supportAzureServiceServicesClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.Support", ResourceType.Namespace, Diagnostics); TryGetApiVersion(ResourceType, out string supportAzureServiceServicesApiVersion); _supportAzureServiceServicesRestClient = new ServicesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, supportAzureServiceServicesApiVersion); + _problemClassificationsNoSubscriptionClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.Support", ProviderConstants.DefaultProviderNamespace, Diagnostics); + _problemClassificationsNoSubscriptionRestClient = new ProblemClassificationsNoSubscriptionRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint); #if DEBUG ValidateResourceId(Id); #endif @@ -106,7 +111,7 @@ public virtual ProblemClassificationCollection GetProblemClassifications() /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -137,7 +142,7 @@ public virtual async Task> GetProblemCla /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -168,7 +173,7 @@ public virtual Response GetProblemClassification( /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -208,7 +213,7 @@ public virtual async Task> GetAsync(Cancel /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -234,5 +239,81 @@ public virtual Response Get(CancellationToken cance throw; } } + + /// + /// Classify the right problem classifications (categories) available for a specific Azure service. + /// + /// + /// Request Path + /// /providers/Microsoft.Support/services/{problemServiceName}/classifyProblems + /// + /// + /// Operation Id + /// ProblemClassificationsNoSubscription_ClassifyProblems + /// + /// + /// Default Api Version + /// 2023-06-01-preview + /// + /// + /// + /// Input to check. + /// The cancellation token to use. + /// is null. + public virtual async Task> ClassifyProblemsProblemClassificationsNoSubscriptionAsync(ServiceProblemClassificationContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = _problemClassificationsNoSubscriptionClientDiagnostics.CreateScope("SupportAzureServiceResource.ClassifyProblemsProblemClassificationsNoSubscription"); + scope.Start(); + try + { + var response = await _problemClassificationsNoSubscriptionRestClient.ClassifyProblemsAsync(Id.Name, content, cancellationToken).ConfigureAwait(false); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Classify the right problem classifications (categories) available for a specific Azure service. + /// + /// + /// Request Path + /// /providers/Microsoft.Support/services/{problemServiceName}/classifyProblems + /// + /// + /// Operation Id + /// ProblemClassificationsNoSubscription_ClassifyProblems + /// + /// + /// Default Api Version + /// 2023-06-01-preview + /// + /// + /// + /// Input to check. + /// The cancellation token to use. + /// is null. + public virtual Response ClassifyProblemsProblemClassificationsNoSubscription(ServiceProblemClassificationContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = _problemClassificationsNoSubscriptionClientDiagnostics.CreateScope("SupportAzureServiceResource.ClassifyProblemsProblemClassificationsNoSubscription"); + scope.Start(); + try + { + var response = _problemClassificationsNoSubscriptionRestClient.ClassifyProblems(Id.Name, content, cancellationToken); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } } } diff --git a/sdk/support/Azure.ResourceManager.Support/src/Generated/SupportFileDetailData.cs b/sdk/support/Azure.ResourceManager.Support/src/Generated/SupportFileDetailData.cs index 1a0c1e991d6c..5ca2fb72f24e 100644 --- a/sdk/support/Azure.ResourceManager.Support/src/Generated/SupportFileDetailData.cs +++ b/sdk/support/Azure.ResourceManager.Support/src/Generated/SupportFileDetailData.cs @@ -61,9 +61,9 @@ public SupportFileDetailData() /// The resourceType. /// The systemData. /// Time in UTC (ISO 8601 format) when file workspace was created. - /// Size of each chunk. The size of each chunk should be provided in bytes and must not exceed 2.5 megabytes (MB). - /// Size of the file to be uploaded. The file size must not exceed 5 MB and should be provided in bytes. - /// Number of chunks to be uploaded. The maximum number of allowed chunks is 2. + /// Size of each chunk. + /// Size of the file to be uploaded. + /// Number of chunks to be uploaded. /// Keeps track of any properties unknown to the library. internal SupportFileDetailData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, DateTimeOffset? createdOn, int? chunkSize, int? fileSize, int? numberOfChunks, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) { @@ -76,11 +76,11 @@ internal SupportFileDetailData(ResourceIdentifier id, string name, ResourceType /// Time in UTC (ISO 8601 format) when file workspace was created. public DateTimeOffset? CreatedOn { get; } - /// Size of each chunk. The size of each chunk should be provided in bytes and must not exceed 2.5 megabytes (MB). + /// Size of each chunk. public int? ChunkSize { get; set; } - /// Size of the file to be uploaded. The file size must not exceed 5 MB and should be provided in bytes. + /// Size of the file to be uploaded. public int? FileSize { get; set; } - /// Number of chunks to be uploaded. The maximum number of allowed chunks is 2. + /// Number of chunks to be uploaded. public int? NumberOfChunks { get; set; } } } diff --git a/sdk/support/Azure.ResourceManager.Support/src/Generated/SupportTicketChatTranscriptCollection.cs b/sdk/support/Azure.ResourceManager.Support/src/Generated/SupportTicketChatTranscriptCollection.cs index 2c3f5c4ca769..d09353c6b227 100644 --- a/sdk/support/Azure.ResourceManager.Support/src/Generated/SupportTicketChatTranscriptCollection.cs +++ b/sdk/support/Azure.ResourceManager.Support/src/Generated/SupportTicketChatTranscriptCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -109,7 +109,7 @@ public virtual async Task> GetAsyn /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -154,7 +154,7 @@ public virtual Response Get(string chatTran /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -184,7 +184,7 @@ public virtual AsyncPageable GetAllAsync(Ca /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -214,7 +214,7 @@ public virtual Pageable GetAll(Cancellation /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -257,7 +257,7 @@ public virtual async Task> ExistsAsync(string chatTranscriptName, /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -300,7 +300,7 @@ public virtual Response Exists(string chatTranscriptName, CancellationToke /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -345,7 +345,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource diff --git a/sdk/support/Azure.ResourceManager.Support/src/Generated/SupportTicketChatTranscriptResource.cs b/sdk/support/Azure.ResourceManager.Support/src/Generated/SupportTicketChatTranscriptResource.cs index 2f123fe93697..74023948918a 100644 --- a/sdk/support/Azure.ResourceManager.Support/src/Generated/SupportTicketChatTranscriptResource.cs +++ b/sdk/support/Azure.ResourceManager.Support/src/Generated/SupportTicketChatTranscriptResource.cs @@ -100,7 +100,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -140,7 +140,7 @@ public virtual async Task> GetAsyn /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource diff --git a/sdk/support/Azure.ResourceManager.Support/src/Generated/SupportTicketCommunicationCollection.cs b/sdk/support/Azure.ResourceManager.Support/src/Generated/SupportTicketCommunicationCollection.cs index 1f8407a61be8..be56867194bf 100644 --- a/sdk/support/Azure.ResourceManager.Support/src/Generated/SupportTicketCommunicationCollection.cs +++ b/sdk/support/Azure.ResourceManager.Support/src/Generated/SupportTicketCommunicationCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task> Crea /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -162,7 +162,7 @@ public virtual ArmOperation CreateOrUpdate(W /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -207,7 +207,7 @@ public virtual async Task> GetAsync /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get(string communica /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -284,7 +284,7 @@ public virtual AsyncPageable GetAllAsync(int /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -316,7 +316,7 @@ public virtual Pageable GetAll(int? top = nu /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -359,7 +359,7 @@ public virtual async Task> ExistsAsync(string communicationName, /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -402,7 +402,7 @@ public virtual Response Exists(string communicationName, CancellationToken /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -447,7 +447,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource diff --git a/sdk/support/Azure.ResourceManager.Support/src/Generated/SupportTicketCommunicationData.Serialization.cs b/sdk/support/Azure.ResourceManager.Support/src/Generated/SupportTicketCommunicationData.Serialization.cs index e22ff7de213a..3b01b83d8b48 100644 --- a/sdk/support/Azure.ResourceManager.Support/src/Generated/SupportTicketCommunicationData.Serialization.cs +++ b/sdk/support/Azure.ResourceManager.Support/src/Generated/SupportTicketCommunicationData.Serialization.cs @@ -54,10 +54,16 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("sender"u8); writer.WriteStringValue(Sender); } - writer.WritePropertyName("subject"u8); - writer.WriteStringValue(Subject); - writer.WritePropertyName("body"u8); - writer.WriteStringValue(Body); + if (Optional.IsDefined(Subject)) + { + writer.WritePropertyName("subject"u8); + writer.WriteStringValue(Subject); + } + if (Optional.IsDefined(Body)) + { + writer.WritePropertyName("body"u8); + writer.WriteStringValue(Body); + } if (options.Format != "W" && Optional.IsDefined(CreatedOn)) { writer.WritePropertyName("createdDate"u8); diff --git a/sdk/support/Azure.ResourceManager.Support/src/Generated/SupportTicketCommunicationData.cs b/sdk/support/Azure.ResourceManager.Support/src/Generated/SupportTicketCommunicationData.cs index f0ef7e1ffaad..9f80ba2ee56d 100644 --- a/sdk/support/Azure.ResourceManager.Support/src/Generated/SupportTicketCommunicationData.cs +++ b/sdk/support/Azure.ResourceManager.Support/src/Generated/SupportTicketCommunicationData.cs @@ -52,16 +52,8 @@ public partial class SupportTicketCommunicationData : ResourceData private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - /// Subject of the communication. - /// Body of the communication. - /// or is null. - public SupportTicketCommunicationData(string subject, string body) + public SupportTicketCommunicationData() { - Argument.AssertNotNull(subject, nameof(subject)); - Argument.AssertNotNull(body, nameof(body)); - - Subject = subject; - Body = body; } /// Initializes a new instance of . @@ -87,11 +79,6 @@ internal SupportTicketCommunicationData(ResourceIdentifier id, string name, Reso _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Initializes a new instance of for deserialization. - internal SupportTicketCommunicationData() - { - } - /// Communication type. public SupportTicketCommunicationType? CommunicationType { get; } /// Direction of communication. diff --git a/sdk/support/Azure.ResourceManager.Support/src/Generated/SupportTicketCommunicationResource.cs b/sdk/support/Azure.ResourceManager.Support/src/Generated/SupportTicketCommunicationResource.cs index a4d0fd568d78..3b308ada29b3 100644 --- a/sdk/support/Azure.ResourceManager.Support/src/Generated/SupportTicketCommunicationResource.cs +++ b/sdk/support/Azure.ResourceManager.Support/src/Generated/SupportTicketCommunicationResource.cs @@ -100,7 +100,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -140,7 +140,7 @@ public virtual async Task> GetAsync /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -180,7 +180,7 @@ public virtual Response Get(CancellationToke /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -226,7 +226,7 @@ public virtual async Task> Upda /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource diff --git a/sdk/support/Azure.ResourceManager.Support/src/Generated/SupportTicketData.Serialization.cs b/sdk/support/Azure.ResourceManager.Support/src/Generated/SupportTicketData.Serialization.cs index 544e21d58fca..e3e2627cca69 100644 --- a/sdk/support/Azure.ResourceManager.Support/src/Generated/SupportTicketData.Serialization.cs +++ b/sdk/support/Azure.ResourceManager.Support/src/Generated/SupportTicketData.Serialization.cs @@ -44,17 +44,26 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("supportTicketId"u8); writer.WriteStringValue(SupportTicketId); } - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - writer.WritePropertyName("problemClassificationId"u8); - writer.WriteStringValue(ProblemClassificationId); + if (Optional.IsDefined(Description)) + { + writer.WritePropertyName("description"u8); + writer.WriteStringValue(Description); + } + if (Optional.IsDefined(ProblemClassificationId)) + { + writer.WritePropertyName("problemClassificationId"u8); + writer.WriteStringValue(ProblemClassificationId); + } if (options.Format != "W" && Optional.IsDefined(ProblemClassificationDisplayName)) { writer.WritePropertyName("problemClassificationDisplayName"u8); writer.WriteStringValue(ProblemClassificationDisplayName); } - writer.WritePropertyName("severity"u8); - writer.WriteStringValue(Severity.ToString()); + if (Optional.IsDefined(Severity)) + { + writer.WritePropertyName("severity"u8); + writer.WriteStringValue(Severity.Value.ToString()); + } if (Optional.IsDefined(EnrollmentId)) { writer.WritePropertyName("enrollmentId"u8); @@ -65,8 +74,11 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("require24X7Response"u8); writer.WriteBooleanValue(Require24X7Response.Value); } - writer.WritePropertyName("advancedDiagnosticConsent"u8); - writer.WriteStringValue(AdvancedDiagnosticConsent.ToString()); + if (Optional.IsDefined(AdvancedDiagnosticConsent)) + { + writer.WritePropertyName("advancedDiagnosticConsent"u8); + writer.WriteStringValue(AdvancedDiagnosticConsent.Value.ToString()); + } if (Optional.IsDefined(ProblemScopingQuestions)) { writer.WritePropertyName("problemScopingQuestions"u8); @@ -77,8 +89,11 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("supportPlanId"u8); writer.WriteStringValue(SupportPlanId); } - writer.WritePropertyName("contactDetails"u8); - writer.WriteObjectValue(ContactDetails, options); + if (Optional.IsDefined(ContactDetails)) + { + writer.WritePropertyName("contactDetails"u8); + writer.WriteObjectValue(ContactDetails, options); + } if (Optional.IsDefined(ServiceLevelAgreement)) { writer.WritePropertyName("serviceLevelAgreement"u8); @@ -99,15 +114,21 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("supportPlanDisplayName"u8); writer.WriteStringValue(SupportPlanDisplayName); } - writer.WritePropertyName("title"u8); - writer.WriteStringValue(Title); + if (Optional.IsDefined(Title)) + { + writer.WritePropertyName("title"u8); + writer.WriteStringValue(Title); + } if (Optional.IsDefined(ProblemStartOn)) { writer.WritePropertyName("problemStartTime"u8); writer.WriteStringValue(ProblemStartOn.Value, "O"); } - writer.WritePropertyName("serviceId"u8); - writer.WriteStringValue(ServiceId); + if (Optional.IsDefined(ServiceId)) + { + writer.WritePropertyName("serviceId"u8); + writer.WriteStringValue(ServiceId); + } if (options.Format != "W" && Optional.IsDefined(ServiceDisplayName)) { writer.WritePropertyName("serviceDisplayName"u8); @@ -189,10 +210,10 @@ internal static SupportTicketData DeserializeSupportTicketData(JsonElement eleme string description = default; string problemClassificationId = default; string problemClassificationDisplayName = default; - SupportSeverityLevel severity = default; + SupportSeverityLevel? severity = default; string enrollmentId = default; bool? require24X7Response = default; - AdvancedDiagnosticConsent advancedDiagnosticConsent = default; + AdvancedDiagnosticConsent? advancedDiagnosticConsent = default; string problemScopingQuestions = default; string supportPlanId = default; SupportContactProfile contactDetails = default; @@ -271,6 +292,10 @@ internal static SupportTicketData DeserializeSupportTicketData(JsonElement eleme } if (property0.NameEquals("severity"u8)) { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } severity = new SupportSeverityLevel(property0.Value.GetString()); continue; } @@ -290,6 +315,10 @@ internal static SupportTicketData DeserializeSupportTicketData(JsonElement eleme } if (property0.NameEquals("advancedDiagnosticConsent"u8)) { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } advancedDiagnosticConsent = new AdvancedDiagnosticConsent(property0.Value.GetString()); continue; } @@ -305,6 +334,10 @@ internal static SupportTicketData DeserializeSupportTicketData(JsonElement eleme } if (property0.NameEquals("contactDetails"u8)) { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } contactDetails = SupportContactProfile.DeserializeSupportContactProfile(property0.Value, options); continue; } diff --git a/sdk/support/Azure.ResourceManager.Support/src/Generated/SupportTicketData.cs b/sdk/support/Azure.ResourceManager.Support/src/Generated/SupportTicketData.cs index a0f36f8a21f6..f11bf47c1020 100644 --- a/sdk/support/Azure.ResourceManager.Support/src/Generated/SupportTicketData.cs +++ b/sdk/support/Azure.ResourceManager.Support/src/Generated/SupportTicketData.cs @@ -52,29 +52,8 @@ public partial class SupportTicketData : ResourceData private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - /// Detailed description of the question or issue. - /// Each Azure service has its own set of issue categories, also known as problem classification. This parameter is the unique Id for the type of problem you are experiencing. - /// A value that indicates the urgency of the case, which in turn determines the response time according to the service level agreement of the technical support plan you have with Azure. Note: 'Highest critical impact', also known as the 'Emergency - Severe impact' level in the Azure portal is reserved only for our Premium customers. - /// Advanced diagnostic consent to be updated on the support ticket. - /// Contact information of the user requesting to create a support ticket. - /// Title of the support ticket. - /// This is the resource Id of the Azure service resource associated with the support ticket. - /// , , , or is null. - public SupportTicketData(string description, string problemClassificationId, SupportSeverityLevel severity, AdvancedDiagnosticConsent advancedDiagnosticConsent, SupportContactProfile contactDetails, string title, string serviceId) + public SupportTicketData() { - Argument.AssertNotNull(description, nameof(description)); - Argument.AssertNotNull(problemClassificationId, nameof(problemClassificationId)); - Argument.AssertNotNull(contactDetails, nameof(contactDetails)); - Argument.AssertNotNull(title, nameof(title)); - Argument.AssertNotNull(serviceId, nameof(serviceId)); - - Description = description; - ProblemClassificationId = problemClassificationId; - Severity = severity; - AdvancedDiagnosticConsent = advancedDiagnosticConsent; - ContactDetails = contactDetails; - Title = title; - ServiceId = serviceId; SecondaryConsent = new ChangeTrackingList(); } @@ -111,7 +90,7 @@ public SupportTicketData(string description, string problemClassificationId, Sup /// Additional ticket details associated with a quota support ticket request. /// This property indicates secondary consents for the support ticket. /// Keeps track of any properties unknown to the library. - internal SupportTicketData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, string supportTicketId, string description, string problemClassificationId, string problemClassificationDisplayName, SupportSeverityLevel severity, string enrollmentId, bool? require24X7Response, AdvancedDiagnosticConsent advancedDiagnosticConsent, string problemScopingQuestions, string supportPlanId, SupportContactProfile contactDetails, SupportServiceLevelAgreement serviceLevelAgreement, SupportEngineer supportEngineer, string supportPlanType, string supportPlanDisplayName, string title, DateTimeOffset? problemStartOn, string serviceId, string serviceDisplayName, string status, DateTimeOffset? createdOn, DateTimeOffset? modifiedOn, string fileWorkspaceName, IsTemporaryTicket? isTemporaryTicket, TechnicalTicketDetails technicalTicketDetails, QuotaTicketDetails quotaTicketDetails, IList secondaryConsent, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + internal SupportTicketData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, string supportTicketId, string description, string problemClassificationId, string problemClassificationDisplayName, SupportSeverityLevel? severity, string enrollmentId, bool? require24X7Response, AdvancedDiagnosticConsent? advancedDiagnosticConsent, string problemScopingQuestions, string supportPlanId, SupportContactProfile contactDetails, SupportServiceLevelAgreement serviceLevelAgreement, SupportEngineer supportEngineer, string supportPlanType, string supportPlanDisplayName, string title, DateTimeOffset? problemStartOn, string serviceId, string serviceDisplayName, string status, DateTimeOffset? createdOn, DateTimeOffset? modifiedOn, string fileWorkspaceName, IsTemporaryTicket? isTemporaryTicket, TechnicalTicketDetails technicalTicketDetails, QuotaTicketDetails quotaTicketDetails, IList secondaryConsent, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) { SupportTicketId = supportTicketId; Description = description; @@ -143,11 +122,6 @@ internal SupportTicketData(ResourceIdentifier id, string name, ResourceType reso _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Initializes a new instance of for deserialization. - internal SupportTicketData() - { - } - /// System generated support ticket Id that is unique. public string SupportTicketId { get; set; } /// Detailed description of the question or issue. @@ -157,13 +131,13 @@ internal SupportTicketData() /// Localized name of problem classification. public string ProblemClassificationDisplayName { get; } /// A value that indicates the urgency of the case, which in turn determines the response time according to the service level agreement of the technical support plan you have with Azure. Note: 'Highest critical impact', also known as the 'Emergency - Severe impact' level in the Azure portal is reserved only for our Premium customers. - public SupportSeverityLevel Severity { get; set; } + public SupportSeverityLevel? Severity { get; set; } /// Enrollment Id associated with the support ticket. public string EnrollmentId { get; set; } /// Indicates if this requires a 24x7 response from Azure. public bool? Require24X7Response { get; set; } /// Advanced diagnostic consent to be updated on the support ticket. - public AdvancedDiagnosticConsent AdvancedDiagnosticConsent { get; set; } + public AdvancedDiagnosticConsent? AdvancedDiagnosticConsent { get; set; } /// Problem scoping questions associated with the support ticket. public string ProblemScopingQuestions { get; set; } /// Support plan id associated with the support ticket. diff --git a/sdk/support/Azure.ResourceManager.Support/src/Generated/SupportTicketFileCollection.cs b/sdk/support/Azure.ResourceManager.Support/src/Generated/SupportTicketFileCollection.cs index e7a465100317..379b18c25acd 100644 --- a/sdk/support/Azure.ResourceManager.Support/src/Generated/SupportTicketFileCollection.cs +++ b/sdk/support/Azure.ResourceManager.Support/src/Generated/SupportTicketFileCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -115,7 +115,7 @@ public virtual async Task> CreateOrUpdat /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -166,7 +166,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -211,7 +211,7 @@ public virtual async Task> GetAsync(string f /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -256,7 +256,7 @@ public virtual Response Get(string fileName, Cancella /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -286,7 +286,7 @@ public virtual AsyncPageable GetAllAsync(Cancellation /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -316,7 +316,7 @@ public virtual Pageable GetAll(CancellationToken canc /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -359,7 +359,7 @@ public virtual async Task> ExistsAsync(string fileName, Cancellat /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -402,7 +402,7 @@ public virtual Response Exists(string fileName, CancellationToken cancella /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -447,7 +447,7 @@ public virtual async Task> GetIfExis /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource diff --git a/sdk/support/Azure.ResourceManager.Support/src/Generated/SupportTicketFileResource.cs b/sdk/support/Azure.ResourceManager.Support/src/Generated/SupportTicketFileResource.cs index 3170ca8aa341..7a7947843d2e 100644 --- a/sdk/support/Azure.ResourceManager.Support/src/Generated/SupportTicketFileResource.cs +++ b/sdk/support/Azure.ResourceManager.Support/src/Generated/SupportTicketFileResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> GetAsync(Cancella /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -181,7 +181,7 @@ public virtual Response Get(CancellationToken cancell /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -229,7 +229,7 @@ public virtual async Task> UpdateAsync(W /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -277,7 +277,7 @@ public virtual ArmOperation Update(WaitUntil waitUnti /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -319,7 +319,7 @@ public virtual async Task UploadAsync(UploadFileContent content, Cance /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource diff --git a/sdk/support/Azure.ResourceManager.Support/src/Generated/SupportTicketNoSubChatTranscriptCollection.cs b/sdk/support/Azure.ResourceManager.Support/src/Generated/SupportTicketNoSubChatTranscriptCollection.cs index 44efbbbe1551..ede1d7d2b9d5 100644 --- a/sdk/support/Azure.ResourceManager.Support/src/Generated/SupportTicketNoSubChatTranscriptCollection.cs +++ b/sdk/support/Azure.ResourceManager.Support/src/Generated/SupportTicketNoSubChatTranscriptCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -109,7 +109,7 @@ public virtual async Task> Ge /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -154,7 +154,7 @@ public virtual Response Get(string cha /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -184,7 +184,7 @@ public virtual AsyncPageable GetAllAsy /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -214,7 +214,7 @@ public virtual Pageable GetAll(Cancell /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -257,7 +257,7 @@ public virtual async Task> ExistsAsync(string chatTranscriptName, /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -300,7 +300,7 @@ public virtual Response Exists(string chatTranscriptName, CancellationToke /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -345,7 +345,7 @@ public virtual async Task /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource diff --git a/sdk/support/Azure.ResourceManager.Support/src/Generated/SupportTicketNoSubChatTranscriptResource.cs b/sdk/support/Azure.ResourceManager.Support/src/Generated/SupportTicketNoSubChatTranscriptResource.cs index 30d0f0af44f2..a562d6314bed 100644 --- a/sdk/support/Azure.ResourceManager.Support/src/Generated/SupportTicketNoSubChatTranscriptResource.cs +++ b/sdk/support/Azure.ResourceManager.Support/src/Generated/SupportTicketNoSubChatTranscriptResource.cs @@ -99,7 +99,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -139,7 +139,7 @@ public virtual async Task> Ge /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource diff --git a/sdk/support/Azure.ResourceManager.Support/src/Generated/SupportTicketNoSubCommunicationCollection.cs b/sdk/support/Azure.ResourceManager.Support/src/Generated/SupportTicketNoSubCommunicationCollection.cs index 63e1582114ae..7e2171220b0c 100644 --- a/sdk/support/Azure.ResourceManager.Support/src/Generated/SupportTicketNoSubCommunicationCollection.cs +++ b/sdk/support/Azure.ResourceManager.Support/src/Generated/SupportTicketNoSubCommunicationCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -162,7 +162,7 @@ public virtual ArmOperation CreateOrUpd /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -207,7 +207,7 @@ public virtual async Task> Get /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get(string comm /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -284,7 +284,7 @@ public virtual AsyncPageable GetAllAsyn /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -316,7 +316,7 @@ public virtual Pageable GetAll(int? top /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -359,7 +359,7 @@ public virtual async Task> ExistsAsync(string communicationName, /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -402,7 +402,7 @@ public virtual Response Exists(string communicationName, CancellationToken /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -447,7 +447,7 @@ public virtual async Task /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource diff --git a/sdk/support/Azure.ResourceManager.Support/src/Generated/SupportTicketNoSubCommunicationResource.cs b/sdk/support/Azure.ResourceManager.Support/src/Generated/SupportTicketNoSubCommunicationResource.cs index fe6fa9fa5fe6..86ffa820e88f 100644 --- a/sdk/support/Azure.ResourceManager.Support/src/Generated/SupportTicketNoSubCommunicationResource.cs +++ b/sdk/support/Azure.ResourceManager.Support/src/Generated/SupportTicketNoSubCommunicationResource.cs @@ -99,7 +99,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -139,7 +139,7 @@ public virtual async Task> Get /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -179,7 +179,7 @@ public virtual Response Get(Cancellatio /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -225,7 +225,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource diff --git a/sdk/support/Azure.ResourceManager.Support/src/Generated/SupportTicketNoSubFileCollection.cs b/sdk/support/Azure.ResourceManager.Support/src/Generated/SupportTicketNoSubFileCollection.cs index e64dc57708c8..125a01c65a22 100644 --- a/sdk/support/Azure.ResourceManager.Support/src/Generated/SupportTicketNoSubFileCollection.cs +++ b/sdk/support/Azure.ResourceManager.Support/src/Generated/SupportTicketNoSubFileCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -115,7 +115,7 @@ public virtual async Task> CreateOr /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -166,7 +166,7 @@ public virtual ArmOperation CreateOrUpdate(WaitU /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -211,7 +211,7 @@ public virtual async Task> GetAsync(str /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -256,7 +256,7 @@ public virtual Response Get(string fileName, Can /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -286,7 +286,7 @@ public virtual AsyncPageable GetAllAsync(Cancell /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -316,7 +316,7 @@ public virtual Pageable GetAll(CancellationToken /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -359,7 +359,7 @@ public virtual async Task> ExistsAsync(string fileName, Cancellat /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -402,7 +402,7 @@ public virtual Response Exists(string fileName, CancellationToken cancella /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -447,7 +447,7 @@ public virtual async Task> GetI /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource diff --git a/sdk/support/Azure.ResourceManager.Support/src/Generated/SupportTicketNoSubFileResource.cs b/sdk/support/Azure.ResourceManager.Support/src/Generated/SupportTicketNoSubFileResource.cs index 1f420ac8a35e..e44b8bea9d43 100644 --- a/sdk/support/Azure.ResourceManager.Support/src/Generated/SupportTicketNoSubFileResource.cs +++ b/sdk/support/Azure.ResourceManager.Support/src/Generated/SupportTicketNoSubFileResource.cs @@ -100,7 +100,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -140,7 +140,7 @@ public virtual async Task> GetAsync(Can /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -180,7 +180,7 @@ public virtual Response Get(CancellationToken ca /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -228,7 +228,7 @@ public virtual async Task> UpdateAs /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -276,7 +276,7 @@ public virtual ArmOperation Update(WaitUntil wai /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -318,7 +318,7 @@ public virtual async Task UploadAsync(UploadFileContent content, Cance /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource diff --git a/sdk/support/Azure.ResourceManager.Support/src/Generated/TenantFileWorkspaceCollection.cs b/sdk/support/Azure.ResourceManager.Support/src/Generated/TenantFileWorkspaceCollection.cs index 741c6644e1de..8ff86bf6e8fe 100644 --- a/sdk/support/Azure.ResourceManager.Support/src/Generated/TenantFileWorkspaceCollection.cs +++ b/sdk/support/Azure.ResourceManager.Support/src/Generated/TenantFileWorkspaceCollection.cs @@ -62,7 +62,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -111,7 +111,7 @@ public virtual async Task> CreateOrUpd /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -160,7 +160,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUnti /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -205,7 +205,7 @@ public virtual async Task> GetAsync(string /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -250,7 +250,7 @@ public virtual Response Get(string fileWorkspaceNam /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -293,7 +293,7 @@ public virtual async Task> ExistsAsync(string fileWorkspaceName, /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -336,7 +336,7 @@ public virtual Response Exists(string fileWorkspaceName, CancellationToken /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -381,7 +381,7 @@ public virtual async Task> GetIfEx /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource diff --git a/sdk/support/Azure.ResourceManager.Support/src/Generated/TenantFileWorkspaceResource.cs b/sdk/support/Azure.ResourceManager.Support/src/Generated/TenantFileWorkspaceResource.cs index c3cf32a835b8..0e345fa01510 100644 --- a/sdk/support/Azure.ResourceManager.Support/src/Generated/TenantFileWorkspaceResource.cs +++ b/sdk/support/Azure.ResourceManager.Support/src/Generated/TenantFileWorkspaceResource.cs @@ -106,7 +106,7 @@ public virtual SupportTicketNoSubFileCollection GetSupportTicketNoSubFiles() /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -137,7 +137,7 @@ public virtual async Task> GetSupportTi /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -168,7 +168,7 @@ public virtual Response GetSupportTicketNoSubFil /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -208,7 +208,7 @@ public virtual async Task> GetAsync(Cancel /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -248,7 +248,7 @@ public virtual Response Get(CancellationToken cance /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -292,7 +292,7 @@ public virtual async Task> UpdateAsync /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource diff --git a/sdk/support/Azure.ResourceManager.Support/src/Generated/TenantSupportTicketCollection.cs b/sdk/support/Azure.ResourceManager.Support/src/Generated/TenantSupportTicketCollection.cs index 8fe321bbfd72..e767d1fac0c0 100644 --- a/sdk/support/Azure.ResourceManager.Support/src/Generated/TenantSupportTicketCollection.cs +++ b/sdk/support/Azure.ResourceManager.Support/src/Generated/TenantSupportTicketCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -114,7 +114,7 @@ public virtual async Task> CreateOrUpd /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -163,7 +163,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUnti /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -208,7 +208,7 @@ public virtual async Task> GetAsync(string /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -253,7 +253,7 @@ public virtual Response Get(string supportTicketNam /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -285,7 +285,7 @@ public virtual AsyncPageable GetAllAsync(int? top = /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -317,7 +317,7 @@ public virtual Pageable GetAll(int? top = null, str /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -360,7 +360,7 @@ public virtual async Task> ExistsAsync(string supportTicketName, /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -403,7 +403,7 @@ public virtual Response Exists(string supportTicketName, CancellationToken /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -448,7 +448,7 @@ public virtual async Task> GetIfEx /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource diff --git a/sdk/support/Azure.ResourceManager.Support/src/Generated/TenantSupportTicketResource.cs b/sdk/support/Azure.ResourceManager.Support/src/Generated/TenantSupportTicketResource.cs index 99646f4df32a..55fb10b838bd 100644 --- a/sdk/support/Azure.ResourceManager.Support/src/Generated/TenantSupportTicketResource.cs +++ b/sdk/support/Azure.ResourceManager.Support/src/Generated/TenantSupportTicketResource.cs @@ -112,7 +112,7 @@ public virtual SupportTicketNoSubCommunicationCollection GetSupportTicketNoSubCo /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -143,7 +143,7 @@ public virtual async Task> Get /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -181,7 +181,7 @@ public virtual SupportTicketNoSubChatTranscriptCollection GetSupportTicketNoSubC /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -212,7 +212,7 @@ public virtual async Task> Ge /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -243,7 +243,7 @@ public virtual Response GetSupportTick /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -283,7 +283,7 @@ public virtual async Task> GetAsync(Cancel /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -323,7 +323,7 @@ public virtual Response Get(CancellationToken cance /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -365,7 +365,7 @@ public virtual async Task> UpdateAsync(Upd /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -407,7 +407,7 @@ public virtual Response Update(UpdateSupportTicket /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -449,7 +449,7 @@ public virtual async Task> CheckNameAvai /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource diff --git a/sdk/support/Azure.ResourceManager.Support/src/autorest.md b/sdk/support/Azure.ResourceManager.Support/src/autorest.md index 365e4f42b23a..f8f592275e9c 100644 --- a/sdk/support/Azure.ResourceManager.Support/src/autorest.md +++ b/sdk/support/Azure.ResourceManager.Support/src/autorest.md @@ -7,7 +7,7 @@ azure-arm: true csharp: true library-name: Support namespace: Azure.ResourceManager.Support -require: https://github.com/Azure/azure-rest-api-specs/blob/a013dabbe84aeb3f5d48b0e30d15fdfbb6a8d062/specification/support/resource-manager/readme.md +require: /mnt/vss/_work/1/s/azure-rest-api-specs/specification/support/resource-manager/readme.md #tag: package-preview-2024-04 output-folder: $(this-folder)/Generated clear-output-folder: true